字段修改

This commit is contained in:
yangsb
2024-03-29 15:01:40 +08:00
parent ca1994644d
commit 29e1bbaae7
11 changed files with 18 additions and 26 deletions
@@ -1,12 +1,9 @@
package com.cf.imes.module.executor.controller.admin.plan; package com.cf.imes.module.executor.controller.admin.plan;
import cn.hutool.core.util.RandomUtil;
import com.cf.imes.framework.common.pojo.CommonResult; import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog; import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import com.cf.imes.module.executor.controller.admin.plan.dto.Metrial;
import com.cf.imes.module.executor.controller.admin.plan.vo.*; import com.cf.imes.module.executor.controller.admin.plan.vo.*;
import com.cf.imes.module.executor.service.optimizeplan.OptimizePlanService; import com.cf.imes.module.executor.service.optimizeplan.OptimizePlanService;
import com.cf.imes.module.executor.util.RandomUtils;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@@ -18,7 +15,6 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@@ -46,7 +46,7 @@ public class BlockPlaceMessage {
@Schema(description = "点阵") @Schema(description = "点阵")
private List<Point> points; private List<Point> points;
@Schema(description = "原造型偏移信息") @Schema(description = "原造型偏移信息")
private OrgSizeOutOff orgSizeOutOff; private OldSizeOutOff olgSizeOutOff;
@Schema(description = "尺寸扩展信息(造型)") @Schema(description = "尺寸扩展信息(造型)")
private SizeOutOff sizeOutOff; private SizeOutOff sizeOutOff;
@Schema(description = "跟优化位置 漂移多少?X") @Schema(description = "跟优化位置 漂移多少?X")
@@ -9,7 +9,7 @@ import java.util.List;
* @author Beal * @author Beal
*/ */
@Data @Data
public class Metrial { public class Material {
@Schema(description = "生产单id") @Schema(description = "生产单id")
private String orderId; private String orderId;
@@ -9,7 +9,7 @@ import lombok.Data;
* @date: 2024/3/22 17:00 * @date: 2024/3/22 17:00
*/ */
@Data @Data
public class OrgPointDetail { public class OldPointDetail {
@Schema(description = "点id") @Schema(description = "点id")
private Long pointId; private Long pointId;
@Schema(description = "x") @Schema(description = "x")
@@ -7,7 +7,7 @@ import lombok.Data;
* @author Beal * @author Beal
*/ */
@Data @Data
public class OrgSizeOutOff { public class OldSizeOutOff {
private Integer left; private Integer left;
private Integer right; private Integer right;
private Integer upper; private Integer upper;
@@ -22,7 +22,7 @@ public class ScrapBoard {
@Schema(description ="排单ID") @Schema(description ="排单ID")
private Long planId; private Long planId;
@Schema(description ="源排单ID") @Schema(description ="源排单ID")
private Long orgPlanId; private Long oldPlanId;
@Schema(description ="未使用 = 0, 已使用 = 1") @Schema(description ="未使用 = 0, 已使用 = 1")
private Integer status; private Integer status;
@Schema(description ="正面 = 0, 正面右转 = 1, 正面后转 = 2, 正面左转 = 3, 反面 = 4, 反面右转 = 5, 反面后转 = 6, 反面左转 = 7") @Schema(description ="正面 = 0, 正面右转 = 1, 正面后转 = 2, 正面左转 = 3, 反面 = 4, 反面右转 = 5, 反面后转 = 6, 反面左转 = 7")
@@ -1,7 +1,6 @@
package com.cf.imes.module.executor.controller.admin.plan.vo; package com.cf.imes.module.executor.controller.admin.plan.vo;
import com.cf.imes.module.executor.controller.admin.goods.vo.GoodsRespVO; import com.cf.imes.module.executor.controller.admin.plan.dto.Material;
import com.cf.imes.module.executor.controller.admin.plan.dto.Metrial;
import com.cf.imes.module.executor.controller.admin.plate.vo.PlateRespVO; import com.cf.imes.module.executor.controller.admin.plate.vo.PlateRespVO;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@@ -10,7 +9,6 @@ import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@@ -56,7 +54,7 @@ public class OptimizeParamRespVO {
@Schema(description = "生产单列表") @Schema(description = "生产单列表")
private List<OrderResp> orderList; private List<OrderResp> orderList;
@Schema(description = "大板使用信息列表") @Schema(description = "大板使用信息列表")
private List<Metrial> metrialList; private List<Material> materialList;
/*@Schema(description = "商品列表") /*@Schema(description = "商品列表")
private List<GoodsRespVO> goodsList;*/ private List<GoodsRespVO> goodsList;*/
@Schema(description = "小板列表") @Schema(description = "小板列表")
@@ -1,7 +1,6 @@
package com.cf.imes.module.executor.controller.admin.plate.vo; package com.cf.imes.module.executor.controller.admin.plate.vo;
import com.cf.imes.module.executor.controller.admin.plan.dto.*; import com.cf.imes.module.executor.controller.admin.plan.dto.*;
import com.cf.imes.module.executor.controller.admin.plan.vo.PlanOptimizeDataDTO;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@@ -31,8 +30,8 @@ public class PlateDetailVO {
@Schema(description = "是否新版本") @Schema(description = "是否新版本")
private Boolean newVersion; private Boolean newVersion;
@Schema(description = "org点详情列表") @Schema(description = "原始点详情列表")
private List<OrgPointDetail> orgPointDetailList; private List<OldPointDetail> olgPointDetailList;
@Schema(description = "开料尺寸") @Schema(description = "开料尺寸")
private KaiLiaoSize kaiLiaoSize; private KaiLiaoSize kaiLiaoSize;
@@ -1,12 +1,11 @@
package com.cf.imes.module.executor.service.optimizeplan; package com.cf.imes.module.executor.service.optimizeplan;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.cf.imes.framework.common.util.json.JsonUtils; import com.cf.imes.framework.common.util.json.JsonUtils;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX; import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.query.MPJLambdaWrapperX; import com.cf.imes.framework.mybatis.core.query.MPJLambdaWrapperX;
import com.cf.imes.module.executor.controller.admin.plan.dto.Metrial; import com.cf.imes.module.executor.controller.admin.plan.dto.Material;
import com.cf.imes.module.executor.controller.admin.plan.vo.*; import com.cf.imes.module.executor.controller.admin.plan.vo.*;
import com.cf.imes.module.executor.controller.admin.plate.vo.PlateDetailVO; import com.cf.imes.module.executor.controller.admin.plate.vo.PlateDetailVO;
import com.cf.imes.module.executor.dal.dataobject.goods.GoodsDO; import com.cf.imes.module.executor.dal.dataobject.goods.GoodsDO;
@@ -213,9 +212,9 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
return RandomUtils.randomPojo(OptimizeParamRespVO.class); return RandomUtils.randomPojo(OptimizeParamRespVO.class);
} }
//暂时先mock //暂时先mock
ArrayList<Metrial> list = new ArrayList<>(); ArrayList<Material> list = new ArrayList<>();
list.add(RandomUtils.randomPojo(Metrial.class)); list.add(RandomUtils.randomPojo(Material.class));
list.add(RandomUtils.randomPojo(Metrial.class)); list.add(RandomUtils.randomPojo(Material.class));
ArrayList<PlateDetailVO> plateDetailVOS = new ArrayList<>(); ArrayList<PlateDetailVO> plateDetailVOS = new ArrayList<>();
plateDetailVOS.add(RandomUtils.randomPojo(PlateDetailVO.class)); plateDetailVOS.add(RandomUtils.randomPojo(PlateDetailVO.class));
plateDetailVOS.add(RandomUtils.randomPojo(PlateDetailVO.class)); plateDetailVOS.add(RandomUtils.randomPojo(PlateDetailVO.class));
@@ -223,7 +222,7 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
if( CollectionUtil.isNotEmpty(optimizePlanParam.getPlateList())) { if( CollectionUtil.isNotEmpty(optimizePlanParam.getPlateList())) {
optimizePlanParam.getPlateList().get(0).setPlateDetailList(plateDetailVOS); optimizePlanParam.getPlateList().get(0).setPlateDetailList(plateDetailVOS);
} }
optimizePlanParam.setMetrialList(list); optimizePlanParam.setMaterialList(list);
return optimizePlanParam; return optimizePlanParam;
} }
@@ -26,7 +26,7 @@ public interface MachineTemplateMapper extends BaseMapperX<MachineTemplateDO> {
default PageResult<MachineTemplateDO> selectPage(MachinePageReqVO reqVO, Collection<Long> ids) { default PageResult<MachineTemplateDO> selectPage(MachinePageReqVO reqVO, Collection<Long> ids) {
return selectPage(reqVO, new LambdaQueryWrapperX<MachineTemplateDO>() return selectPage(reqVO, new LambdaQueryWrapperX<MachineTemplateDO>()
.eqIfPresent(MachineTemplateDO::getMachineType, reqVO.getMachineType()) .eqIfPresent(MachineTemplateDO::getMachineType, reqVO.getMachineType())
.inIfPresent(MachineTemplateDO::getId, ids) //.inIfPresent(MachineTemplateDO::getId, ids)
.likeIfPresent(MachineTemplateDO::getName, reqVO.getName()) .likeIfPresent(MachineTemplateDO::getName, reqVO.getName())
.betweenIfPresent(MachineTemplateDO::getCreateTime, reqVO.getCreateTime()) .betweenIfPresent(MachineTemplateDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(MachineTemplateDO::getCreateTime)); .orderByDesc(MachineTemplateDO::getCreateTime));
@@ -361,15 +361,15 @@ public class MachineTemplateServiceImpl implements MachineTemplateService {
@Override @Override
public PageResult<MachineTemplateDO> page(MachinePageReqVO pageParam) { public PageResult<MachineTemplateDO> page(MachinePageReqVO pageParam) {
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); /* LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
List<Long> machineIds = userMachineMapper.selectList(new LambdaQueryWrapperX<UserMachineDO>().eq(UserMachineDO::getUserId, loginUser.getId())) List<Long> machineIds = userMachineMapper.selectList(new LambdaQueryWrapperX<UserMachineDO>().eq(UserMachineDO::getUserId, loginUser.getId()))
.stream() .stream()
.map(e -> e.getMachineId()) .map(e -> e.getMachineId())
.collect(Collectors.toList()); .collect(Collectors.toList());
if(CollectionUtil.isEmpty(machineIds)) { if(CollectionUtil.isEmpty(machineIds)) {
return new PageResult<>(); return new PageResult<>();
} }*/
return machineTemplateMapper.selectPage(pageParam, machineIds); return machineTemplateMapper.selectPage(pageParam, new ArrayList<>());
} }