From 9d601a3b3c1cb1d96035caab8ab1198a9401ca1c Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 12 Mar 2025 18:25:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBug=EF=BC=9A45420=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=B9=E9=87=8F=E5=B9=B6=E5=8F=91=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=8D=A1=E6=8E=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 c0a9705..ee61972 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 @@ -370,7 +370,8 @@ public class MesNcProcessingService implements IMesNcProcessingService { String workCenterCode = null == model.getPartInspection() ? null : model.getPartInspection().getWorkCenterCode(); assert model.getPartInspection() != null; model.getPartInspection().setQmsSync(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue()); - if (!Objects.equals(model.getPartInspection().getNcStatus(), MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue())) { + MesPartInspection existedInspection = partInspectionRepository.getById(model.getPartInspection().getId()); + if (existedInspection != null && !Objects.equals(existedInspection.getNcStatus(), MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue())) { throw new ImppBusiException(String.format("零件【%s】已进行过NC处理,请勿重复操作!", part.getPartNo())); } MesProduceSn sn = getProduceSn(model.getSn(), org);