From f0f5ff137d084f45818837bb0372fa8a255693db Mon Sep 17 00:00:00 2001 From: liuzhaotian Date: Tue, 21 Jan 2025 10:26:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E6=8E=92=E5=8D=95-=E7=BA=B9=E8=B7=AF?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=8F=82=E6=95=B0=E7=B1=BB=E5=9E=8B=E4=BF=AE?= =?UTF-8?q?=E6=94=B9,=E8=8E=B7=E5=8F=96=E5=AE=9E=E9=99=85=E5=A4=A7?= =?UTF-8?q?=E6=9D=BF=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/plate/vo/NoPlanPlatePageReqVO.java | 2 +- .../service/plate/PlateServiceImpl.java | 23 +++++++------------ .../system/enums/ErrorCodeConstants.java | 1 + 3 files changed, 10 insertions(+), 16 deletions(-) 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, "当前排单已全部开料,无法进行选择");