From f5ab91c2d93ceae4ef2a96cae7b42aac6cae1642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E7=AC=91=E7=9D=80=E9=9D=A2=E5=AF=B9=E6=98=8E?= =?UTF-8?q?=E5=A4=A9?= <752558143@qq.com> Date: Sun, 14 Jul 2024 15:53:42 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pcn/apiservice/controller/busi/MesNcProcessingController.java | 5 ++++- .../mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesNcProcessingController.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesNcProcessingController.java index 7c62e61..1fc4490 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesNcProcessingController.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesNcProcessingController.java @@ -37,7 +37,7 @@ public class MesNcProcessingController { try { - partInspection.setOrganizeCode(AuthUtil.getOrganizeCode()); + partInspection.setOrganizeCode(partInspection.getOrganizeCode()); ListPager partInspectionListPager = ncProcessingService.queryPartInspectionByPager(partInspection, pager); return ResultBean.success("查询成功").setListPager(partInspectionListPager); } catch (ImppBusiException imppException) { @@ -88,6 +88,9 @@ public class MesNcProcessingController { if (model.getType() == MesExtEnumUtil.NC_TYPE.REWORK.getValue() || model.getType() == MesExtEnumUtil.NC_TYPE.SCRAP.getValue()) { ValidatorBean.checkNotNull(model.getPerson(), "责任人不能为空"); + if (model.getPerson().getId() == null) { + throw new ImppBusiException("责任人不能为空"); + } ValidatorBean.checkNotNull(model.getInventoryLocationCode(), "区域代码不能为空"); } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java index 7bbaf1b..816c383 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java @@ -109,6 +109,8 @@ public class MesNcProcessingService implements IMesNcProcessingService { DdlPreparedPack.getStringEqualPack(partInspection.getLotNo(), "lotNo", packBean); DdlPreparedPack.getNumEqualPack(partInspection.getQty(), "qty", packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue(), "inspectionStatus", packBean); + DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue(), "ncStatus", packBean); + DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean); pager = PagerHelper.getPager(pager, partInspectionRepository.findByHqlWhereCount(packBean));