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));