From a159411fb1790f1378a25cef0766f418299cd1d8 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Mon, 19 May 2025 21:11:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=90=88=E5=B9=B6=2046981=20=E7=94=B5?= =?UTF-8?q?=E5=AD=90=E5=8C=96=E6=A3=80=E9=AA=8C=20NC=E5=88=A4=E5=AE=9A=20?= =?UTF-8?q?=E8=99=9A=E7=BB=93=E6=9E=84=E4=B8=8D=E5=8F=AF=E5=BD=95=E5=85=A5?= =?UTF-8?q?=20=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/busi/MesInputDefectRecordService.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java index e65b1ca..4c5e254 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java @@ -160,6 +160,8 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService //检查物料 part = checkPartByPartNo(model.getPartNo(), model.getOrganizeCode()); + //20250517-46981 电子化检验 NC判定 虚结构不可录入 + checkPartIsImaginaryStructure(model.getOrganizeCode(), model.getPartNo()); //获取NC-零件检测-单据 if(!Objects.isNull(model.getId())){ @@ -1073,6 +1075,8 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService throw new ImppBusiException(String.format("【%s】此条码对应【%s】物料号未维护零件类型,请检查数据", produceSn.getProductSn(), produceSn.getPartNo())); } + //20250517-46981 电子化检验 NC判定 虚结构不可录入 + checkPartIsImaginaryStructure(org, part.getPartNo()); return part; } @@ -1404,4 +1408,15 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService detail.setSystemSyncStatus(CommonEnumUtil.FALSE); detail.setSystemSyncDatetime(MesPcnExtConstWords.EMPTY); } + + private void checkPartIsImaginaryStructure(String organizeCode, String partNo) { + DdlPackBean productVersionPackBean = DdlPackBean.getDdlPackBean(organizeCode); + DdlPreparedPack.getStringEqualPack("虚零件", "description", productVersionPackBean); + DdlPreparedPack.getStringEqualPack(partNo, "partNo", productVersionPackBean); + int count = productVersionRepository.findByHqlWhereCount(productVersionPackBean); + if (count > 0) { + throw new ImppBusiException(String.format("物料号【%s】为虚零件,请检查数据", partNo)); + } + } + } From 5a8339521bf8d72a27c663b87a684da1de9f4b30 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Tue, 20 May 2025 16:57:46 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=9B=9E=E5=A4=B446981=20=E7=94=B5?= =?UTF-8?q?=E5=AD=90=E5=8C=96=E6=A3=80=E9=AA=8C=20NC=E5=88=A4=E5=AE=9A=20?= =?UTF-8?q?=E8=99=9A=E7=BB=93=E6=9E=84=E4=B8=8D=E5=8F=AF=E5=BD=95=E5=85=A5?= =?UTF-8?q?=20=E9=9C=80=E6=B1=82=E6=80=BB=E9=83=A8=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E6=84=8F=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/busi/MesInputDefectRecordService.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java index 4c5e254..e65b1ca 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java @@ -160,8 +160,6 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService //检查物料 part = checkPartByPartNo(model.getPartNo(), model.getOrganizeCode()); - //20250517-46981 电子化检验 NC判定 虚结构不可录入 - checkPartIsImaginaryStructure(model.getOrganizeCode(), model.getPartNo()); //获取NC-零件检测-单据 if(!Objects.isNull(model.getId())){ @@ -1075,8 +1073,6 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService throw new ImppBusiException(String.format("【%s】此条码对应【%s】物料号未维护零件类型,请检查数据", produceSn.getProductSn(), produceSn.getPartNo())); } - //20250517-46981 电子化检验 NC判定 虚结构不可录入 - checkPartIsImaginaryStructure(org, part.getPartNo()); return part; } @@ -1408,15 +1404,4 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService detail.setSystemSyncStatus(CommonEnumUtil.FALSE); detail.setSystemSyncDatetime(MesPcnExtConstWords.EMPTY); } - - private void checkPartIsImaginaryStructure(String organizeCode, String partNo) { - DdlPackBean productVersionPackBean = DdlPackBean.getDdlPackBean(organizeCode); - DdlPreparedPack.getStringEqualPack("虚零件", "description", productVersionPackBean); - DdlPreparedPack.getStringEqualPack(partNo, "partNo", productVersionPackBean); - int count = productVersionRepository.findByHqlWhereCount(productVersionPackBean); - if (count > 0) { - throw new ImppBusiException(String.format("物料号【%s】为虚零件,请检查数据", partNo)); - } - } - } From 967cde9401b2f60b373506c450ae8f58a96c1091 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Wed, 21 May 2025 18:18:19 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=B1=87=E6=8A=A5?= =?UTF-8?q?=E6=9C=AA=E5=AE=8C=E6=88=90=E6=95=B0=E8=AE=A1=E6=95=B0=E4=B8=8D?= =?UTF-8?q?=E5=87=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pcn/apiservice/serviceimpl/busi/MesFengRenBatchReportService.java | 2 +- .../ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesFengRenBatchReportService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesFengRenBatchReportService.java index 3feeaa5..594a580 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesFengRenBatchReportService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesFengRenBatchReportService.java @@ -163,7 +163,7 @@ public class MesFengRenBatchReportService implements IMesFengRenBatchReportServi MesPackageDataContext packageDataContext = (MesPackageDataContext) queryPackSpecQtyFengRenBatchReport(reqBean, stepResult, model.getPartNo()); //计数 - Double unCompleteQty = MathOperation.sub(workOrderDb.getQty(), workOrderDb.getReportedQty()); + Double unCompleteQty = MathOperation.sub(workOrderDb.getQty(), reportedQty); if (MathOperation.compareTo(unCompleteQty, new Double(0)) < 0) unCompleteQty = new Double(0); if (MathOperation.compareTo(reportedQty, workOrderDb.getQty()) < 0) workOrderStatus = MesExtEnumUtil.ORDER_STATUS.PROCESS.getValue(); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java index 9216727..9d36806 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java @@ -1101,7 +1101,7 @@ public class MesWorkOrderService implements IMesWorkOrderService { //汇报数量与未完成数量的修改 先给入参对象赋值, 下面没有报错的情况下再赋给工单DB对象 mesWorkOrder.setReportedQty(MathOperation.add(mesWorkOrder.getNum(), mesWorkOrderDb.getReportedQty())); - double unCompleteQty = MathOperation.sub(mesWorkOrderDb.getQty(), mesWorkOrderDb.getReportedQty()); + double unCompleteQty = MathOperation.sub(mesWorkOrderDb.getQty(), mesWorkOrder.getReportedQty()); mesWorkOrder.setUnCompleteQty(unCompleteQty > 0 ? unCompleteQty : 0); //更新工单状态