From 069890b9c521dd3599def7c497037886d4aaccf5 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Tue, 24 Dec 2024 19:08:00 +0800 Subject: [PATCH] uat-temp-xw-2412241000-44315; uat-temp-castle-20241224-44242-new --- .../serviceimpl/busi/MesBoxingErrorProofingService.java | 6 ++++-- .../serviceimpl/busi/MesInputDefectRecordService.java | 16 ++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesBoxingErrorProofingService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesBoxingErrorProofingService.java index 1d5ebf0..441e6d1 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesBoxingErrorProofingService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesBoxingErrorProofingService.java @@ -132,6 +132,7 @@ public class MesBoxingErrorProofingService implements IMesBoxingErrorProofingSer qty = getQty(packingDefine, split); } mesPackage = mesPackageRDao.insert(getMesPackage(mesPackageDetail, mesPart, qty, packingDefine,packageOneCode)); + mesPackage.setIsPackage(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()); } return ResultBean.success("箱条码扫描成功,请扫零件条码!").setResultObject(mesPackage); } else { @@ -158,7 +159,8 @@ public class MesBoxingErrorProofingService implements IMesBoxingErrorProofingSer }else { //扫描的是箱条码 mesPackageDetail.setIsScanPackage(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()); - this.doScan(mesPackageDetail); + mesPackageDetail.setPackageNo(mesPackageDetail.getSerialNumber()); + return this.doScan(mesPackageDetail); } } //校验条码规则 @@ -533,7 +535,7 @@ public class MesBoxingErrorProofingService implements IMesBoxingErrorProofingSer if (produceSn.getQcStatus() == MesExtEnumUtil.PRODUCE_QC_STATUS.SCRAP.getValue()){ MesPcnException.throwMesBusiException("扫描条码【%s】零件号【%s】,QC为报废状态,不能包装此零件!", mesPackage.getPackageSn(), partNo); } - //SN 条码状态 + //SN 条码状态 if (produceSn.getSnStatus() == MesExtEnumUtil.PRODUCE_SN_STATUS.UNKNOW.getValue()){ MesPcnException.throwMesBusiException("扫描条码【%s】零件号【%s】,条码状态为未知,不能包装此零件!", mesPackage.getPackageSn(), partNo); } 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 5345723..bb96e2a 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 @@ -474,10 +474,12 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService if (model.getOptType() != 2) { //移库 //移库 - String destLocateNo = getDestLocateNo(model, org); String dest = configService.getCfgValue(org, "UMLGO"); - if (!StringUtils.isEmpty(destLocateNo) && Objects.equals(dest, destLocateNo)) { - return; + if (model.getSourceType() == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()){ + String destLocateNo = getDestLocateNo(model, org); + if (!StringUtils.isEmpty(destLocateNo) && Objects.equals(dest, destLocateNo)) { + return; + } } MesMove move = createMove(model, srcLocateNo, dest, org, null == produceSn ? model.getWorkCenterCode() : produceSn.getWorkCenterCode()); moveRepository.save(move); @@ -566,10 +568,12 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService srcLocateNo = version.getReceiveInventoryPoint(); } //移库 - String destLocateNo = getDestLocateNo(model, org); String dest = configService.getCfgValue(org, "UMLGO"); - if (!StringUtils.isEmpty(destLocateNo) && Objects.equals(dest, destLocateNo)) { - return; + if (model.getSourceType() == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()){ + String destLocateNo = getDestLocateNo(model, org); + if (!StringUtils.isEmpty(destLocateNo) && Objects.equals(dest, destLocateNo)) { + return; + } } MesMove move = createMove(model, srcLocateNo, dest, org, null == produceSn ? model.getWorkCenterCode() : produceSn.getWorkCenterCode()); moveRepository.save(move);