From 5776846493004403a16f2657913f9f7691f39b52 Mon Sep 17 00:00:00 2001 From: jun Date: Tue, 26 Nov 2024 15:18:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#bug=2043977=20=E8=8A=9C=E6=B9=96?= =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E7=8E=AF=E5=A2=83=E8=BE=B9=E7=BC=98=E7=AB=AF?= =?UTF-8?q?=EF=BC=8C=E8=B4=A8=E6=A3=80=E5=8D=95=E6=98=8E=E7=BB=86=E8=A1=A8?= =?UTF-8?q?=EF=BC=8C=E5=90=8C=E6=AD=A5=E7=8A=B6=E6=80=81=E5=86=99=E5=85=A5?= =?UTF-8?q?=E4=B8=BA1=EF=BC=8C=E4=B8=94=E6=9C=89=E5=86=99=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E7=8A=B6=E6=80=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/busi/MesInputDefectRecordService.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 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 b06ef49..6e3d9f5 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 @@ -328,6 +328,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService detail.setId(null); detail.setOrganizeCode(org); detail.setPid(model.getPartInspection().getId()); + setSystemSyncStatus(detail); ConvertBean.serviceModelInitialize(detail, AuthUtil.getSessionUser().getUserName()); } @@ -402,6 +403,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService detail.setId(null); detail.setOrganizeCode(org); detail.setPid(partInspection.getId()); + setSystemSyncStatus(detail); ConvertBean.serviceModelInitialize(detail, AuthUtil.getSessionUser().getUserName()); } @@ -429,7 +431,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService } //查询条码所在库位 // 20241010不找当前所在库位,先找生产版本库位,再找2000 - // srcLocateNo = getDestLocateNo(model, org); + // srcLocateNo = getDestLocateNo(model, org); } if (Objects.isNull(srcLocateNo)) { srcLocateNo = configService.getCfgValue(org, "LGORT"); @@ -477,6 +479,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService detail.setId(null); detail.setOrganizeCode(org); detail.setPid(model.getPartInspection().getId()); + setSystemSyncStatus(detail); ConvertBean.serviceModelInitialize(detail, AuthUtil.getSessionUser().getUserName()); } @@ -506,7 +509,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService //移库 if (model.getOptType() != 2) { - String srcLocateNo = configService.getCfgValue(org, "LGORT"); + String srcLocateNo = configService.getCfgValue(org, "LGORT"); DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); DdlPreparedPack.getStringEqualPack(model.getPartNo(), "partNo", ddlPackBean); @@ -610,6 +613,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService List resultDetailList = partInspectionDetailRepository.findByHqlWhere(packBean); resultDetailList.forEach(k -> { k.setIsDeleted(MesCommonConstant.TRUE_INTEGER); + setSystemSyncStatus(k); ConvertBean.serviceModelUpdate(model.getPartInspection(), AuthUtil.getSessionUser().getUserName()); }); @@ -977,9 +981,8 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService private List checkPartInspectionDetail(MesPartInspection partInspection, String org) { DdlPackBean packBean = DdlPackBean.getDdlPackBean(org); DdlPreparedPack.getNumEqualPack(partInspection.getId(), MesPcnExtConstWords.PID, packBean); - List detailList = partInspectionDetailRepository.findByHqlWhere(packBean); - return detailList; + return partInspectionDetailRepository.findByHqlWhere(packBean); } @Override @@ -1071,7 +1074,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService } produceSn.setSnStatus(MesExtEnumUtil.PRODUCE_SN_STATUS.OFFLINE.getValue()); ConvertBean.serviceModelUpdate(produceSn, userName); - produceSnExtService.update(produceSn); + produceSnExtService.update(produceSn); produceSnLog.setProductSn(produceSn.getProductSn()); produceSnLog.setCustSn(produceSn.getCustSn()); @@ -1081,4 +1084,9 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService ConvertBean.serviceModelInitialize(produceSnLog, userName); produceSnLogRepository.save(produceSnLog); } + + private void setSystemSyncStatus(MesPartInspectionDetail detail) { + detail.setSystemSyncStatus(CommonEnumUtil.FALSE); + detail.setSystemSyncDatetime(MesPcnExtConstWords.EMPTY); + } }