diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plate/vo/NoPlanPlatePageReqVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plate/vo/NoPlanPlatePageReqVO.java index 150e8a1a9..0d63cafd8 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plate/vo/NoPlanPlatePageReqVO.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/plate/vo/NoPlanPlatePageReqVO.java @@ -87,7 +87,7 @@ public class NoPlanPlatePageReqVO extends PageParam { @Schema(description = "纹路") - private Boolean texture; + private Integer texture; @Schema(description = "异形") diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plate/PlateServiceImpl.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plate/PlateServiceImpl.java index 9049fcccd..56347d1e0 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plate/PlateServiceImpl.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plate/PlateServiceImpl.java @@ -67,7 +67,6 @@ import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.e import static com.cf.imes.framework.common.util.json.JsonUtils.parseObject; import static com.cf.imes.framework.common.util.json.JsonUtils.toJsonString; import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId; -import static com.cf.imes.module.executor.enums.ErrorCodeConstants.LIST_CHANGES_ARE_PROHIBITED; import static com.cf.imes.module.executor.enums.ErrorCodeConstants.PLAN_NOT_EXISTS; import static com.cf.imes.module.system.enums.ErrorCodeConstants.*; /** @@ -260,7 +259,14 @@ public class PlateServiceImpl implements PlateService { @Override public PageResult getGoodsPlate(GoodsPlateFilterPageReqVO pageReqVO) { - PlanDO planDO = validatePlanExists(pageReqVO.getPlanId()); + PlanDO planDO = planMapper.selectById(pageReqVO.getPlanId()); + + AssertUtils.notEmpty(planDO,PLAN_NOT_EXISTS); + + if(planDO.getStatus().equals(PlanStatusEnum.OPENED.getStatus())){ + throw exception(THIS_PLAN_PLATE_OPTIMIZE_IS_ALL); + } + if (planDO.getType().equals(PlanTypeEnum.MIXEDORDERPLAN.getType())) { @@ -535,18 +541,5 @@ public class PlateServiceImpl implements PlateService { } } - private PlanDO validatePlanExists(Long id) { - PlanDO planDO = planMapper.selectById(id); - - AssertUtils.notEmpty(planDO,PLAN_NOT_EXISTS); - - if(planDO.getStatus().equals(PlanStatusEnum.OPENING.getStatus()) || planDO.getStatus().equals(PlanStatusEnum.OPENED.getStatus())){ - throw exception(LIST_CHANGES_ARE_PROHIBITED); - } - - return planDO; - - } - } \ No newline at end of file diff --git a/cf-module-system/cf-module-system-api/src/main/java/com/cf/imes/module/system/enums/ErrorCodeConstants.java b/cf-module-system/cf-module-system-api/src/main/java/com/cf/imes/module/system/enums/ErrorCodeConstants.java index 74315c438..12053a2aa 100644 --- a/cf-module-system/cf-module-system-api/src/main/java/com/cf/imes/module/system/enums/ErrorCodeConstants.java +++ b/cf-module-system/cf-module-system-api/src/main/java/com/cf/imes/module/system/enums/ErrorCodeConstants.java @@ -329,6 +329,7 @@ public class ErrorCodeConstants { public static final ErrorCode THIS_PLAN_OPTIMIZE_DATA_ERROR = new ErrorCode(1_002_041_044, "当前排单已全部开料,无法进行再次优化"); + public static final ErrorCode THIS_PLAN_PLATE_OPTIMIZE_IS_ALL = new ErrorCode(1_002_041_046, "当前排单已全部开料,无法进行选择");