From d035447f2948d3e1e0d4d6b2fa89c6b59c10f834 Mon Sep 17 00:00:00 2001 From: jun Date: Wed, 9 Oct 2024 14:48:07 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E6=8A=A5=E5=B7=A5=E5=A2=9E=E5=8A=A0bom?= =?UTF-8?q?=E6=80=BB=E8=A1=8C=E6=95=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java | 10 +++++++--- .../serviceimpl/step/MesReportNoSortStepService.java | 1 + .../apiservice/serviceimpl/step/MesReportSortStepService.java | 5 ++++- 3 files changed, 12 insertions(+), 4 deletions(-) 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 af1742b..99972c0 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 @@ -286,6 +286,7 @@ public class MesWorkOrderService implements IMesWorkOrderService { newMesProductOffLine.setSapWorkCenter(oldMesWorkOrder.getErpWorkCenter()); newMesProductOffLine.setOrganizeCode(oldMesWorkOrder.getOrganizeCode()); newMesProductOffLine.setDescription(nowTime); + newMesProductOffLine.setBomTotalSize(mesBoms.size()); ConvertBean.serviceModelInitialize(newMesProductOffLine, userName); mesProductOffLineList.add(newMesProductOffLine); } @@ -356,6 +357,7 @@ public class MesWorkOrderService implements IMesWorkOrderService { newMesProductOffLine.setOrganizeCode(organizeCode); newMesProductOffLine.setDescription(mesProductionRecord.getCompleteDateTime()); newMesProductOffLine.setBomCode(mesBom.getBomCode()); + newMesProductOffLine.setBomTotalSize(mesBoms.size()); ConvertBean.serviceModelInitialize(newMesProductOffLine, userName); mesProductOffLineList.add(newMesProductOffLine); } @@ -692,6 +694,7 @@ public class MesWorkOrderService implements IMesWorkOrderService { newMesProductOffLine.setSapWorkCenter(mesProductVersion.getWorkCenterCode()); newMesProductOffLine.setOrganizeCode(oldMesWorkOrder.getOrganizeCode()); newMesProductOffLine.setDescription(productionRecord.getCompleteDateTime()); + newMesProductOffLine.setBomTotalSize(map.entrySet().size()); ConvertBean.serviceModelInitialize(newMesProductOffLine, userName); mesProductOffLineList.add(newMesProductOffLine); } @@ -1042,7 +1045,7 @@ public class MesWorkOrderService implements IMesWorkOrderService { List mesProductOffLineList = new ArrayList<>(); String nowTime = TimeTool.getNowTime(true); for (MesBom mesBom : mesBoms) { - mesProductOffLineList.add(creatMesProductOffLine(mesWorkOrder, mesProductVersion, sn, mesBom, nowTime)); + mesProductOffLineList.add(creatMesProductOffLine(mesWorkOrder, mesProductVersion, sn, mesBom, nowTime,mesBoms.size())); } mesProductOffLineRDao.saveAll(mesProductOffLineList); } @@ -1069,7 +1072,7 @@ public class MesWorkOrderService implements IMesWorkOrderService { List mesProductOffLineList = new ArrayList<>(); String nowTime = TimeTool.getNowTime(true); for (MesBom mesBom : mesBomList) { - mesProductOffLineList.add(creatMesProductOffLine(mesWorkOrder, mesProductVersion, sn, mesBom, nowTime)); + mesProductOffLineList.add(creatMesProductOffLine(mesWorkOrder, mesProductVersion, sn, mesBom, nowTime, mesBomList.size())); } mesProductOffLineRDao.saveAll(mesProductOffLineList); } @@ -1303,7 +1306,7 @@ public class MesWorkOrderService implements IMesWorkOrderService { } private MesProductOffLine creatMesProductOffLine(MesWorkOrder mesWorkOrder, MesProductVersion mesProductVersion, - String sn, MesBom mesBom, String nowTime) { + String sn, MesBom mesBom, String nowTime,Integer bomTotalSize) { MesProductOffLine newMesProductOffLine; newMesProductOffLine = new MesProductOffLine(); newMesProductOffLine.setReportPartNo(mesWorkOrder.getPartNo()); @@ -1327,6 +1330,7 @@ public class MesWorkOrderService implements IMesWorkOrderService { newMesProductOffLine.setSapWorkCenter(mesWorkOrder.getErpWorkCenter()); newMesProductOffLine.setOrganizeCode(mesWorkOrder.getOrganizeCode()); newMesProductOffLine.setDescription(nowTime); + newMesProductOffLine.setBomTotalSize(bomTotalSize); ConvertBean.serviceModelInitialize(newMesProductOffLine, mesWorkOrder.getCreateUser()); return newMesProductOffLine; } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesReportNoSortStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesReportNoSortStepService.java index edaa28a..b4a01c7 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesReportNoSortStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesReportNoSortStepService.java @@ -184,6 +184,7 @@ public class MesReportNoSortStepService extends BaseStepService { newMesProductOffLine.setReportType(oldMesWorkOrder.getReportType()); newMesProductOffLine.setSapWorkCenter(oldMesWorkOrder.getErpWorkCenter()); newMesProductOffLine.setOrganizeCode(oldMesWorkOrder.getOrganizeCode()); + newMesProductOffLine.setBomTotalSize(mesBoms.size()); ConvertBean.serviceModelInitialize(newMesProductOffLine, userName); mesProductOffLineList.add(newMesProductOffLine); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesReportSortStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesReportSortStepService.java index 14b9fe9..70cc874 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesReportSortStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesReportSortStepService.java @@ -209,7 +209,10 @@ public class MesReportSortStepService extends BaseStepService { } //保存报工记录 - mesProductOffLineRDao.saveAll(mesProductOffLineList); + if(CollectionUtils.isNotEmpty(mesProductOffLineList)){ + mesProductOffLineList.forEach(t->t.setBomTotalSize(mesProductOffLineList.size())); + mesProductOffLineRDao.saveAll(mesProductOffLineList); + } //保存移库记录 mesMoveRDao.saveAll(mesMoveList); } From 1ae36b99e2cfb68e0d62576c6942ba259d573d6a Mon Sep 17 00:00:00 2001 From: jun Date: Wed, 9 Oct 2024 15:09:39 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E5=8F=91=E8=BF=90=E6=95=B0=E6=8D=AEdoubl?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../busi/MesSortShippingCheckController.java | 10 +++---- .../busi/MesSortShippingCheckService.java | 31 +++++++++------------- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesSortShippingCheckController.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesSortShippingCheckController.java index 2104a06..ce0fbfc 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesSortShippingCheckController.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesSortShippingCheckController.java @@ -93,15 +93,15 @@ public class MesSortShippingCheckController { organizeCode = !StringUtils.isEmpty(model.getOrganizeCode()) ? model.getOrganizeCode() : AuthUtil.getOrganize().getOrganizeCode(); userInfo = !StringUtils.isEmpty(model.getUserInfo()) ? model.getUserInfo() : AuthUtil.getSessionUser().getUserName(); + //增加单据锁 + moduleKey = organizeCode + key + "SHIPPING_CODE:" + model.getShippingCode(); - moduleKey = organizeCode + key + "SN:" + model.getSn(); - - log.info("工厂:{} 排序发运扫描条码 --- {} --- START --- 操作人:{} --- THREAD:{}", organizeCode, moduleKey, userInfo, Thread.currentThread().getName()); + log.info("工厂:{} 排序发运扫描条码 --- {} --- START --- 操作人:{} --- THREAD:{}", organizeCode, model.getSn(), userInfo, Thread.currentThread().getName()); //加锁 lockFlg = redisLockUtil.redisLock(moduleKey); - log.info("工厂:{} 排序发运扫描条码 --- {} --- LOCKED --- 操作人:{} --- THREAD:{}", organizeCode, moduleKey, userInfo, Thread.currentThread().getName()); + log.info("工厂:{} 排序发运扫描条码 --- {} --- LOCKED --- 操作人:{} --- THREAD:{}", organizeCode, model.getSn(), userInfo, Thread.currentThread().getName()); // 数据校验 ValidatorBean.checkNotNull(model.getShippingCode(), "发运单不能为空"); @@ -118,7 +118,7 @@ public class MesSortShippingCheckController { //解锁 if (lockFlg) { redisLockUtil.redisUnLock(lockFlg, moduleKey); - log.info("工厂:{} 排序发运扫描条码 --- {} --- UNLOCK --- 操作人:{} --- THREAD:{}", organizeCode, moduleKey, userInfo, Thread.currentThread().getName()); + log.info("工厂:{} 排序发运扫描条码 --- {} --- UNLOCK --- 操作人:{} --- THREAD:{}", organizeCode, model.getSn(), userInfo, Thread.currentThread().getName()); } } } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java index 3b094c5..4425446 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java @@ -491,14 +491,19 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService DdlPackBean packBean = DdlPackBean.getDdlPackBean(orderManagement.getOrganizeCode()); DdlPreparedPack.getStringEqualPack(orderManagement.getShippingCode(),"shippingCode",packBean); MesLoadingListDetail listDetail = listDetailRepository.getByProperty(packBean); + MesLoadingList loadingList = null; if(!Objects.isNull(listDetail)){ packBean = DdlPackBean.getDdlPackBean(orderManagement.getOrganizeCode()); DdlPreparedPack.getNumEqualPack(listDetail.getPid(), "id", packBean); - MesLoadingList loadingList = listRepository.getByProperty(packBean); + loadingList = listRepository.getByProperty(packBean); if(!Objects.isNull(loadingList)){ orderManagement.setOrderCode(loadingList.getOrderCode()); orderManagement.setLoadingListId(loadingList.getId()); } + //更新装车单明细对应的发运单状态=发运 + listDetail.setStatus(MesExtEnumUtil.LOADING_ORDER_DETAIL_SHIPPING_STATUS.SHIPPINGED.getValue()); + ConvertBean.serviceModelUpdate(listDetail, userInfo); + listDetailRepository.update(listDetail); } //发运单状态修改为校验完成 orderManagement.setSystemSyncStatus(CommonEnumUtil.FALSE); @@ -549,15 +554,6 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService ConvertBean.serviceModelUpdate(orderManagement,userInfo); update(orderManagement); shippingOrderManagementDetailRepository.saveAll(orderManagementDetailList); - //1.更新装车单明细对应的发运单状态=发运 - DdlPackBean vehiclesOrderDetailPackBean = DdlPackBean.getDdlPackBean(organizeCode); - DdlPreparedPack.getStringEqualPack(orderManagement.getShippingCode(), "shippingCode", vehiclesOrderDetailPackBean); - MesLoadingListDetail vehiclesOrderDetail = vehiclesOrderDetailRepository.getByProperty(vehiclesOrderDetailPackBean); - if(!StringUtil.isEmpty(vehiclesOrderDetail)){ - vehiclesOrderDetail.setStatus(MesExtEnumUtil.LOADING_ORDER_DETAIL_SHIPPING_STATUS.SHIPPINGED.getValue()); - ConvertBean.serviceModelUpdate(vehiclesOrderDetail, userInfo); - vehiclesOrderDetailRepository.save(vehiclesOrderDetail); - } if(StringUtils.isEmpty(orderManagement.getOrderCode()) || StringUtils.isEmpty(orderManagement.getLoadingListId())){ //保存当前发运单明细报工 jisShippingRepository.saveAll(getMesJisShippings(orderManagement,userInfo)); @@ -581,15 +577,12 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService //保存当前发运单明细报工 jisShippingRepository.saveAll(getMesJisShippings(mesShippingOrderManagement,userInfo)); } - - if(!StringUtil.isEmpty(vehiclesOrderDetail)){ - MesLoadingList loadingList = vehiclesOrderRepository.getById(vehiclesOrderDetail.getPid()); - if (!StringUtils.isEmpty(loadingList)) { - loadingList.setSystemSyncStatus(CommonEnumUtil.FALSE); - loadingList.setStatus(MesExtEnumUtil.MES_LOADING_STATUS.ASN.getValue()); - ConvertBean.serviceModelUpdate(loadingList, userInfo); - shippingLoadingCheckService.update(loadingList); - } + //更新装车单状态 + if (!StringUtils.isEmpty(loadingList)) { + loadingList.setSystemSyncStatus(CommonEnumUtil.FALSE); + loadingList.setStatus(MesExtEnumUtil.MES_LOADING_STATUS.ASN.getValue()); + ConvertBean.serviceModelUpdate(loadingList, userInfo); + shippingLoadingCheckService.update(loadingList); } } } From 09b9c21a47d92c6eb873a11917e362838f6d11e2 Mon Sep 17 00:00:00 2001 From: jun Date: Wed, 9 Oct 2024 18:44:28 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E5=8F=91=E8=BF=90=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=E6=A0=A1=E9=AA=8C=E9=80=BB=E8=BE=91=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java index 4425446..d74d230 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java @@ -251,7 +251,7 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService //判断是否需要排序校验 默认排序则需要校验 if (!StringUtils.isEmpty(orderManagement.getScanSeqWay()) && orderManagement.getScanSeqWay() == MesExtEnumUtil.SHIPPING_GROUP_SCAN_CONFIRM_SEQ_MODE.DEFAULT_SORT.getValue()) { //获取明细中最小的 - Optional minPartNO = model.getDetailList().stream().filter(k -> StringUtils.isEmpty(k.getBarcode())) + Optional minPartNO = model.getDetailList().stream().filter(k -> StringUtils.isEmpty(k.getBarcode()) && !Objects.equals(k.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER)) .min(Comparator.comparingLong(k -> k.getCustInfoSeq())).map(k -> k.getPartNo()); //若扫描的不是最小顺序 则报错 if (minPartNO.isPresent() && !minPartNO.get().equals(produceSn.getPartNo())) { From c82eb99317674d5fcea4b698e16b95b0019a7895 Mon Sep 17 00:00:00 2001 From: "xiangwei.zhang" <752558143@qq.com> Date: Thu, 10 Oct 2024 11:09:29 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E5=88=A4=E6=96=AD=E5=8F=AF=E7=96=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pcn/apiservice/serviceimpl/busi/MesInputDefectRecordService.java | 4 ++-- .../mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java | 2 +- 2 files changed, 3 insertions(+), 3 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 fd07b33..6983822 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 @@ -375,7 +375,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService MesProductVersion version = productVersionRepository.getByProperty(ddlPackBean); if (version != null) { - srcLocateNo = version.getShipInventoryPoint(); + srcLocateNo = version.getReceiveInventoryPoint(); } } if (model.getOptType() != 2) { @@ -440,7 +440,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService MesProductVersion version = productVersionRepository.getByProperty(ddlPackBean); if (version != null) { - srcLocateNo = version.getShipInventoryPoint(); + srcLocateNo = version.getReceiveInventoryPoint(); } MesMove move = createMove(model, srcLocateNo, configService.getCfgValue(org, "UMLGO"), org, null == produceSn ? model.getWorkCenterCode() : produceSn.getWorkCenterCode()); 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 a4b4fe8..0dab27e 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 @@ -339,7 +339,7 @@ public class MesNcProcessingService implements IMesNcProcessingService { MesProductVersion version = productVersionRepository.getByProperty(ddlPackBean); if (version != null) { - source = version.getShipInventoryPoint(); + source = version.getReceiveInventoryPoint(); } } From 01dac4fe8ca3542525ae5923689682ddbb54256f Mon Sep 17 00:00:00 2001 From: gsz Date: Thu, 10 Oct 2024 16:21:30 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=99?= =?UTF-8?q?=E7=AD=92=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../busi/MesRawPartChargingServiceImpl.java | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesRawPartChargingServiceImpl.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesRawPartChargingServiceImpl.java index 53f0bd9..1f3dffc 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesRawPartChargingServiceImpl.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesRawPartChargingServiceImpl.java @@ -144,18 +144,19 @@ public class MesRawPartChargingServiceImpl implements IMesRawPartChargingService checkNotNull(mesRawPartChargingModel); List mesRawPartChargingList = findMesRawPartCharging(mesRawPartChargingModel); - if(CollectionUtils.isEmpty(mesRawPartChargingList)){ - MesPcnException.throwMesBusiException("料筒条码【%s】未绑定,无需初始化", mesRawPartChargingModel.getPackageSn()); - } - for (MesRawPartCharging mesRawPartCharging : mesRawPartChargingList) { - //删除绑定信息 - mesRawPartCharging.setIsDeleted(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()); - ConvertBean.serviceModelUpdate(mesRawPartCharging,mesRawPartChargingModel.getUserName()); - mesRawPartChargingRepository.update(mesRawPartCharging); - //保存日志 - saveLog(mesRawPartChargingModel, mesRawPartCharging, MesExtEnumUtil.CHARGING_LOG_STATUS.CLEAR); + if(!CollectionUtils.isEmpty(mesRawPartChargingList)){ + for (MesRawPartCharging mesRawPartCharging : mesRawPartChargingList) { + //删除绑定信息 + mesRawPartCharging.setIsDeleted(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()); + ConvertBean.serviceModelUpdate(mesRawPartCharging,mesRawPartChargingModel.getUserName()); + mesRawPartChargingRepository.update(mesRawPartCharging); + //保存日志 + saveLog(mesRawPartChargingModel, mesRawPartCharging, MesExtEnumUtil.CHARGING_LOG_STATUS.CLEAR); + } +// MesPcnException.throwMesBusiException("料筒条码【%s】未绑定,无需初始化", mesRawPartChargingModel.getPackageSn()); } + } private List getMesRawPackagePartList(MesRawPartChargingModel mesRawPartChargingModel, MesRawPackageDetail packageDetail) { From fa064ebd7dfa65153e1e2d52545baa3ddfe0e998 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Thu, 10 Oct 2024 16:24:19 +0800 Subject: [PATCH 06/16] =?UTF-8?q?=E6=89=93=E5=8D=B0=E7=AD=96=E7=95=A5=20?= =?UTF-8?q?=E9=9B=B6=E4=BB=B6=E6=9D=A1=E7=A0=81=E7=BC=96=E7=A0=81=E8=A7=84?= =?UTF-8?q?=E5=88=99=20=E5=AD=97=E6=AE=B5=E7=94=A8=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pcn/apiservice/serviceimpl/print/strategy/AionPrintStrategy.java | 4 ++-- .../pcn/apiservice/serviceimpl/print/strategy/GqxnyPrintStrategy.java | 4 ++-- .../serviceimpl/print/strategy/XiaoPengNewPrintStrategy.java | 4 ++-- .../apiservice/serviceimpl/print/strategy/XiaoPengPrintStrategy.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/AionPrintStrategy.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/AionPrintStrategy.java index e1be928..eec3318 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/AionPrintStrategy.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/AionPrintStrategy.java @@ -136,8 +136,8 @@ public class AionPrintStrategy implements IPrintTemplateStrategyService { if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo()); MesNumberRule numberRule = numberRuleRepository.getByProperty( new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.RULE_CODE}, - new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProcessMatchRule()}); - if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProcessMatchRule()); + new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProductMatchRule()}); + if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProductMatchRule()); return numberRule; } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/GqxnyPrintStrategy.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/GqxnyPrintStrategy.java index ac7858c..bb8770e 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/GqxnyPrintStrategy.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/GqxnyPrintStrategy.java @@ -151,8 +151,8 @@ public class GqxnyPrintStrategy implements IPrintTemplateStrategyService { if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo()); MesNumberRule numberRule = numberRuleRepository.getByProperty( new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.RULE_CODE}, - new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProcessMatchRule()}); - if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProcessMatchRule()); + new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProductMatchRule()}); + if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProductMatchRule()); return numberRule; } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengNewPrintStrategy.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengNewPrintStrategy.java index 7c66b42..bae9400 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengNewPrintStrategy.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengNewPrintStrategy.java @@ -123,8 +123,8 @@ public class XiaoPengNewPrintStrategy implements IPrintTemplateStrategyService { if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo()); MesNumberRule numberRule = numberRuleRepository.getByProperty( new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.RULE_CODE}, - new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProcessMatchRule()}); - if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProcessMatchRule()); + new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProductMatchRule()}); + if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProductMatchRule()); return numberRule; } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengPrintStrategy.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengPrintStrategy.java index f2f6eed..a2b9ad7 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengPrintStrategy.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengPrintStrategy.java @@ -125,8 +125,8 @@ public class XiaoPengPrintStrategy implements IPrintTemplateStrategyService { if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo()); MesNumberRule numberRule = numberRuleRepository.getByProperty( new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.RULE_CODE}, - new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProcessMatchRule()}); - if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProcessMatchRule()); + new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProductMatchRule()}); + if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProductMatchRule()); return numberRule; } From 9a20923aa90434be9597baa3283ba323dd7412dc Mon Sep 17 00:00:00 2001 From: "xiangwei.zhang" <752558143@qq.com> Date: Thu, 10 Oct 2024 16:29:38 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E5=88=A4=E6=96=AD=E5=8F=AF=E7=96=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/base/MesReworkTaskServiceImpl.java | 51 +++++++++++++++++++++- .../busi/MesInputDefectRecordService.java | 20 ++++++--- .../serviceimpl/busi/MesNcProcessingService.java | 13 +++++- 3 files changed, 75 insertions(+), 9 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java index a82f7af..3972592 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java @@ -133,6 +133,9 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService { @Autowired private MesQmsScrapRepository mesQmsScrapRepository; + @Autowired + private MesProductVersionRepository productVersionRepository; + @Override public ListPager queryReworkTask(MesReworkTask mesReworkTask, Pager pager) { String organizeCode = !StringUtils.isEmpty(mesReworkTask.getOrganizeCode())?mesReworkTask.getOrganizeCode():AuthUtil.getOrganizeCode(); @@ -282,6 +285,23 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService { if (MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.LOT.getValue() == mesReworkTask.getType()) { mesReworkTask.setReworkedQty(requestModel.getReworkedQty()); mesReworkTask.setScrapQty(requestModel.getScrapQty()); + // 如果是批次还需要移库 + DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); + DdlPreparedPack.getStringEqualPack(requestModel.getPartNo(), "partNo", ddlPackBean); + + MesProductVersion version = productVersionRepository.getByProperty(ddlPackBean); + String target = mesConfigService.getCfgValue(requestModel.getOrganizeCode(), "LGORT"); + if (version != null) { + target = version.getReceiveInventoryPoint(); + } + String workCenterCode = ""; + // 获取替换条码信息列表 + + if (mesPartInspection != null) { + workCenterCode = mesPartInspection.getWorkCenterCode(); + } + doCreateReworkMove(requestModel,getDestLocateNo(requestModel.getOrganizeCode(), mesPartInspection.getId()),target,workCenterCode,mesReworkTask.getPartNo(), mesPartInspection.getId()); + } else { //拆解 if(!CollectionUtils.isEmpty(requestModel.getAssemblyModelList())){ @@ -782,6 +802,14 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService { userName, organizeCode, 1).getResultList().get(0).toString(); } + private String getDestLocateNo(String organizeCode, Long partInspectionId) { + DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode); + DdlPreparedPack.getNumEqualPack(partInspectionId, "partInspectionId", packBean); + DdlPreparedPack.getOrderBy(null, null, packBean); + MesMove mesMove = moveRepository.getByProperty(packBean); + return Objects.isNull(mesMove) ? null : mesMove.getUmlgo(); + } + private String getDestLocateNo(String organizeCode, String productSn) { DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode); DdlPreparedPack.getStringEqualPack(productSn, "productSn", packBean); @@ -789,8 +817,6 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService { MesMove mesMove = moveRepository.getByProperty(packBean); return Objects.isNull(mesMove) ? null : mesMove.getUmlgo(); } - - private MesPartInspection getMesPartInspection(MesReworkTask mesReworkTask) { DdlPackBean packBean = DdlPackBean.getDdlPackBean(mesReworkTask.getOrganizeCode()); DdlPreparedPack.getStringEqualPack(mesReworkTask.getSn(), "sn", packBean); @@ -916,4 +942,25 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService { ConvertBean.serviceModelInitialize(move, requestModel.getUserName()); moveRepository.insert(move); } + + + private void doCreateReworkMove(MesReworkTaskRequestModel requestModel,String srcLocate, String destLocate,String workCenterCode,String partNo,Long partInspectionId) { + MesPartSap mesPartSap = mesPartService.getMesPartSapByPartNo(partNo, requestModel.getOrganizeCode()); + MesMove move = new MesMove(); + move.setMatnr(mesPartSap.getPartNo()); + move.setOrganizeCode(requestModel.getOrganizeCode()); + move.setFactoryCode(requestModel.getOrganizeCode()); + move.setLgort(srcLocate); + move.setUmlgo(destLocate); + move.setPartInspectionId(partInspectionId); + move.setMenge(1d); + move.setMeins(mesPartSap.getUnit()); + move.setPostDate(TimeTool.getToday()); + move.setPostTime(TimeTool.getTimeShortWithColon()); + move.setMoveType(MesExtEnumUtil.MOVE_TYPE.RETURN_MOVE.getValue()); + move.setProductSn(requestModel.getSn()); + move.setWorkCenter(workCenterCode); + ConvertBean.serviceModelInitialize(move, requestModel.getUserName()); + moveRepository.insert(move); + } } 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 6983822..15473cc 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 @@ -224,11 +224,20 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService //返工单返修完成,需可疑品移正常库 if (model.isTransferFlg() && model.getSourceType() == MesExtEnumUtil.PART_INSPECTION_SOURCE_TYPE.SINGLE.getValue()) { - //移库 - if (model.getOptType() != 2) { - MesMove move = createMove(model, getDestLocateNo(model, org), configService.getCfgValue(org, "LGORT"), org, null == produceSn ? model.getWorkCenterCode() : produceSn.getWorkCenterCode()); - moveRepository.save(move); + //电子化检验 + String target = configService.getCfgValue(org, "LGORT"); + + DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); + DdlPreparedPack.getStringEqualPack(model.getPartNo(), "partNo", ddlPackBean); + + MesProductVersion version = productVersionRepository.getByProperty(ddlPackBean); + if (version != null) { + target = version.getReceiveInventoryPoint(); } + + MesMove move = createMove(model, getDestLocateNo(model, org), target, org, null == produceSn ? model.getWorkCenterCode() : produceSn.getWorkCenterCode()); + moveRepository.save(move); + } //判断首次合格还是 多次检验最终为合格品 @@ -365,7 +374,8 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService ConvertBean.serviceModelInitialize(produceSn, AuthUtil.getSessionUser().getUserName()); produceSnExtService.update(produceSn); //查询条码所在库位 - srcLocateNo = getDestLocateNo(model, org); + // 20241010不找当前所在库位,先找生产版本库位,再找2000 + // srcLocateNo = getDestLocateNo(model, org); } if (Objects.isNull(srcLocateNo)) { srcLocateNo = configService.getCfgValue(org, "LGORT"); 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 0dab27e..8ad3bbd 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 @@ -376,7 +376,7 @@ public class MesNcProcessingService implements IMesNcProcessingService { MesProductVersion version = productVersionRepository.getByProperty(ddlPackBean); if (version != null) { - target = version.getShipInventoryPoint(); + target = version.getReceiveInventoryPoint(); } //移库 转正常、放行:8000移至2000 @@ -517,8 +517,17 @@ public class MesNcProcessingService implements IMesNcProcessingService { } partInspectionRepository.save(model.getPartInspection()); + String target = configService.getCfgValue(org, "LGORT"); + DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(); + DdlPreparedPack.getStringEqualPack(model.getPart().getPartNo(), "partNo", ddlPackBean); + + MesProductVersion version = productVersionRepository.getByProperty(ddlPackBean); + if (version != null) { + target = version.getReceiveInventoryPoint(); + } + //移库 转正常、放行:8000移至2000 - MesMove move = createMove(model, sourceValue, configService.getCfgValue(org, "LGORT"), org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE); + MesMove move = createMove(model, sourceValue, target, org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.NORMAL_MOVE); ConvertBean.serviceModelInitialize(move,model.getUserName()); moveRepository.save(move); From 48f0360fb830e18238aa971aca8e9a0856b84409 Mon Sep 17 00:00:00 2001 From: "xiangwei.zhang" <752558143@qq.com> Date: Fri, 11 Oct 2024 16:43:03 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E5=8A=A0=E5=B7=A5=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=8A=A0=E6=AF=AB=E7=A7=92=EF=BC=8C=E5=AE=A2?= =?UTF-8?q?=E9=80=80=E5=93=81=E5=92=8C=E7=94=B5=E5=AD=90=E5=8C=96=E6=A3=80?= =?UTF-8?q?=E9=AA=8C=E6=9F=A5=E8=AF=A2=E4=B8=B2=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java | 2 +- .../apiservice/serviceimpl/busi/MesInputDefectRecordService.java | 6 ++++++ .../serviceimpl/step/MesProductionRecordGenerateStepService.java | 7 +++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java index 3972592..2d31dee 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/base/MesReworkTaskServiceImpl.java @@ -953,7 +953,7 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService { move.setLgort(srcLocate); move.setUmlgo(destLocate); move.setPartInspectionId(partInspectionId); - move.setMenge(1d); + move.setMenge(Double.valueOf(requestModel.getReworkedQty()+"")); move.setMeins(mesPartSap.getUnit()); move.setPostDate(TimeTool.getToday()); move.setPostTime(TimeTool.getTimeShortWithColon()); 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 15473cc..2782ffb 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 @@ -486,9 +486,15 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService */ private MesPartInspection getPartInspection(MesPartInspectionInputModel inputModel, String org) { + Integer refundFlag = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(); + if (inputModel.getOptType() == 2) { + refundFlag = CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(); + } + //根据条码找最近一条单据 DdlPackBean packBean = DdlPackBean.getDdlPackBean(org); DdlPreparedPack.getStringEqualPack(inputModel.getSn(), "sn", packBean); + DdlPreparedPack.getNumEqualPack(refundFlag, "refundFlag", packBean); DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean); MesPartInspection partInspection = partInspectionRepository.getByProperty(packBean); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java index 3fb0141..8460bd5 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java @@ -24,10 +24,8 @@ import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.UUID; +import java.text.SimpleDateFormat; +import java.util.*; import java.util.stream.Collectors; /** @@ -152,6 +150,7 @@ public class MesProductionRecordGenerateStepService extends BaseStepService { productionRecord.setOrganizeCode(reqBean.getOrganizeCode()); ConvertBean.serviceModelInitialize(productionRecord, reqBean.getUserInfo()); productionRecord.setCompleteDateTime(productionRecord.getModifyDatetime()); + productionRecord.setCreateDatetime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS")).format(new Date())); productionRecord.setFid(UUID.randomUUID().toString()); productionRecord.setOneMouldMoreId(UUID.randomUUID().toString()); From f30dea31ba4efb4d5bccbfb795d016292a338335 Mon Sep 17 00:00:00 2001 From: "xiangwei.zhang" <752558143@qq.com> Date: Sat, 12 Oct 2024 11:44:58 +0800 Subject: [PATCH 09/16] =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=B9=BF=E5=B7=9E?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../busi/MesSortShippingCheckService.java | 80 ---------------------- 1 file changed, 80 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java index fd53146..6caad26 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesSortShippingCheckService.java @@ -303,78 +303,6 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService DdlPackBean recentlyOrderPackBean = DdlPackBean.getDdlPackBean(organizeCode); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.SHIPPING_ORDER_STATUS.SHIPPED.getValue(), "status", recentlyOrderPackBean); DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"modifyDatetime"}, recentlyOrderPackBean); - MesShippingOrderManagement recentlyVehiclesOrder = shippingOrderManagementRepository.getByProperty(recentlyOrderPackBean); - - model.setDetailList(detailList); - model.setShippingCode(orderManagement.getShippingCode()); - if (!StringUtils.isEmpty(recentlyVehiclesOrder)) { - - model.setRecentlyScanShippingCode(recentlyVehiclesOrder.getShippingCode()); - } - - return model; - } - - @Override - public MesSortShippingCheckModel saveSn(MesSortShippingCheckModel model, String organizeCode, String userInfo) { - //校验发运单是否存在 - MesShippingOrderManagement orderManagement = checkMesShippingOrderManagement(model, organizeCode); - //零件发运组 - MesPartShippingGroup shippingGroup = getMesPartShippingGroup(organizeCode, orderManagement.getShippingGroupCode()); - //根据条码找到对应的物料号,若物料号一致,则修改扫描flg,将flg改为true. - //根据扫描的发运单以及前端传的发运单明细,进行匹配,若没有找到扫描的发运单,则提示扫描的发运单号不在此装车单中,请检查数据!。 - //1 跳过 - if(!Objects.isNull(model.getIsPass()) && Objects.equals(MesPcnExtConstWords.ONE,model.getIsPass())){ - Optional shippingOrderManagementDetailOptional = model.getDetailList().stream().filter(t -> !Objects.equals(t.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER)).findFirst(); - if(shippingOrderManagementDetailOptional.isPresent()){ - MesShippingOrderManagementDetail mesShippingOrderManagementDetail = shippingOrderManagementDetailOptional.get(); - MesProduceSn produceSn = new MesProduceSn(); - produceSn.setProductSn(model.getSn()); - updateOrderManagementDetails(userInfo, produceSn, orderManagement, mesShippingOrderManagementDetail,MesExtEnumUtil.SHIPPING_ORDER_DETAIL_SHIPPING_STATUS.SKIP.getValue(),MesPcnExtConstWords.SHIP_PASS); - }else{ - throw new ImppBusiException(String.format("【%s】明细已全部扫描完成,请检查数据!", orderManagement.getShippingCode())); - } - }else{ - //校验条码 - MesProduceSn produceSn = checkSn(model, organizeCode); - boolean scanFlg = false; - for (MesShippingOrderManagementDetail detail : model.getDetailList()) { - if (detail.getPartNo().equals(produceSn.getPartNo()) && StringUtils.isEmpty(detail.getBarcode()) && !Objects.equals(detail.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER)) { - //校验发运单明细顺序 - if(!StringUtils.isEmpty(shippingGroup.getIsEnableShippingFailSafe()) && CommonEnumUtil.VALID == shippingGroup.getIsEnableShippingFailSafe()){ - Optional first = model.getDetailList().stream().filter(k -> k.getCustInfoSeq().compareTo(detail.getCustInfoSeq()) < 0 && !Objects.equals(k.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER)).findFirst(); - if(first.isPresent()){ - throw new ImppBusiException(String.format("发运单【%s】启用明细顺序防错,序号【%s】前还有未扫描的发运单明细,请检查数据!", orderManagement.getShippingCode(), detail.getCustInfoSeq())); - } - } - - //判断是否需要排序校验 默认排序则需要校验 - if (!StringUtils.isEmpty(orderManagement.getScanSeqWay()) && orderManagement.getScanSeqWay() == MesExtEnumUtil.SHIPPING_GROUP_SCAN_CONFIRM_SEQ_MODE.DEFAULT_SORT.getValue()) { - //获取明细中最小的 - Optional minPartNO = model.getDetailList().stream().filter(k -> StringUtils.isEmpty(k.getBarcode()) && !Objects.equals(k.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER)) - .min(Comparator.comparingLong(k -> k.getCustInfoSeq())).map(k -> k.getPartNo()); - //若扫描的不是最小顺序 则报错 - if (minPartNO.isPresent() && !minPartNO.get().equals(produceSn.getPartNo())) { - throw new ImppBusiException(String.format("【%s】此条码扫描顺序错误,请检查数据!", model.getSn())); - } - } - //校验客户零件信息是否存在 - DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode); - DdlPreparedPack.getStringEqualPack(detail.getPartNo(), "erpPartNo", packBean); - DdlPreparedPack.getStringEqualPack(detail.getCustPartNo(), "custPartNo", packBean); - if(!mesCustomerPartRepository.isExitByHql(packBean)){ - throw new ImppBusiException(String.format("零件号【%s】客户零件号【%s】关系不存在,请检查数据!", detail.getPartNo(),detail.getCustPartNo())); - } - - scanFlg = true; - updateOrderManagementDetails(userInfo, produceSn, orderManagement, detail,MesExtEnumUtil.SHIPPING_ORDER_DETAIL_SHIPPING_STATUS.SHIPPINGED.getValue(),"扫描完成"); - break; - } - } - if (!scanFlg) { - throw new ImppBusiException(String.format("【%s】此条码对应的【%s】物料号与发运单中物料号不匹配,请检查数据!", model.getSn(), produceSn.getPartNo())); - } - } return shippingOrderManagementRepository.getByProperty(recentlyOrderPackBean); } @@ -550,7 +478,6 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService //更新发运单 ConvertBean.serviceModelUpdate(orderManagement,userInfo); update(orderManagement); - shippingOrderManagementDetailRepository.saveAll(orderManagementDetailList); //不记忆时更新明细 if (!StringUtils.isEmpty(orderManagement.getIsEnableMemory()) && !Objects.equals(orderManagement.getIsEnableMemory(), MesCommonConstant.TRUE_INTEGER)){ shippingOrderManagementDetailRepository.saveAll(orderManagementDetailList); @@ -600,13 +527,6 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService MesEquipmentVariable mesEquipmentVariable = mesEquipmentExtService.getMesEquipmentVariable(organizeCode, rule.getEquipmentCode(), rule.getEquipVariableId()); if (Objects.isNull(mesEquipmentVariable)) { MesPcnException.throwMesBusiException("设备【%s】设备变量ID【%s】信息不存在,请检查", rule.getEquipmentCode(), rule.getEquipVariableId()); - //更新装车单状态 - if (!StringUtils.isEmpty(loadingList)) { - loadingList.setSystemSyncStatus(CommonEnumUtil.FALSE); - loadingList.setStatus(MesExtEnumUtil.MES_LOADING_STATUS.ASN.getValue()); - ConvertBean.serviceModelUpdate(loadingList, userInfo); - shippingLoadingCheckService.update(loadingList); - } } //设备通道 MesEquipmentChannel mesEquipmentChannel = mesEquipmentExtService.getMesEquipmentChannel(organizeCode, rule.getEquipmentCode(), mesEquipmentVariable.getChannel()); From be37923e97f7b9335a08cab3578b1c6d4938d4e4 Mon Sep 17 00:00:00 2001 From: jun Date: Sat, 12 Oct 2024 14:55:58 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E6=8A=A5=E5=B7=A5?= =?UTF-8?q?=E6=BC=94=E7=A4=BA=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/pcn/apiservice/serviceimpl/busi/MesWorkOrderService.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 34787b3..ce3564b 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 @@ -1677,10 +1677,8 @@ public class MesWorkOrderService implements IMesWorkOrderService { private MesMove createMove(MesPartSap mesPart, MesProductionRecord record, String source, String target, String erpWorkCenterCode, Double qty, Integer moveType,String userName) { MesMove move = new MesMove(); - move.setMeins(record.getReportPartNo()); - if (!Objects.isNull(mesPart)) { - move.setMeins(mesPart.getUnit()); - } + move.setMatnr(mesPart.getPartNo()); + move.setMeins(mesPart.getUnit()); move.setOrganizeCode(record.getOrganizeCode()); move.setFactoryCode(record.getOrganizeCode()); move.setLgort(source); From 84e6e651726681e109832c0448ca2b0f5060887e Mon Sep 17 00:00:00 2001 From: gsz Date: Sat, 12 Oct 2024 15:05:59 +0800 Subject: [PATCH 11/16] =?UTF-8?q?SPS=E5=8D=95=E6=8D=AE=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=8F=92=E5=85=A5PrintedSnLog=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../busi/MesPullingOrderInfoService.java | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java index df02190..35f9524 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java @@ -56,6 +56,9 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { @Autowired private IMesConfigService configService; + @Autowired + private IMesPrintedSnLogRepository snLogRao; + @Override public ListPager queryMesPullingOrderInfoByPager(MesPullingOrderInfo bean, Pager pager) { DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode()); @@ -176,6 +179,7 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { List pullingOrderInfos = mesPullingOrderInfoRepository.findByHqlWhere(packBean); if (!CollectionUtils.isEmpty(pullingOrderInfos)) { //把查出来的拉动单打印并修改打印状态为已打印 + List snLogList = new ArrayList<>(); for (MesPullingOrderInfo pullingOrderInfo : pullingOrderInfos) { //查询拉动组明细 DdlPackBean partPackBean = DdlPackBean.getDdlPackBean(pullingOrderInfo.getOrganizeCode()); @@ -188,9 +192,24 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { pullingOrderInfo.setPrintTime(TimeTool.getNowTime(true)); pullingOrderInfo.setPrintStatus(MesExtEnumUtil.PRINT_STATUS.PRINTED.getValue()); + pullingOrderInfo.setIsPrint(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()); ConvertBean.serviceModelUpdate(pullingOrderInfo, userName); + + //10-12 打印补打拉动单新增log表 + MesPrintedSnLog snLog = new MesPrintedSnLog(); + snLog.setBarcode(pullingOrderInfo.getPullingOrderNo()); + snLog.setCustPartNo(pullingOrderInfo.getCustPartNo()); + snLog.setWorkOrderNo(pullingOrderInfo.getWorkOrderNo()); + snLog.setPartNo(pullingOrderInfo.getPartNo()); + snLog.setPartName(pullingOrderInfo.getPartName()); + ConvertBean.serviceModelInitialize(snLog, userName); + snLog.setOrganizeCode(bean.getOrganizeCode()); + snLogList.add(snLog); + } mesPullingOrderInfoRepository.saveAll(pullingOrderInfos); + //保存打印条码记录 + snLogRao.saveAll(snLogList); } return pullingOrderInfos; } @@ -267,7 +286,7 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { String rule = mesPartPullDetail.getRuleValidation(); if (mesPullingOrderInfo.getScanValidationType() == MesExtEnumUtil.PART_PULL_DETAIL_SCAN_VALIDATION_TYPE.HOMEMADE_VALIDATE.getValue()) { List produceSnList = mesProduceSnExtService.getProduceSnList(mesPullingOrderInfo.getOrganizeCode(), mesPullingOrderInfo.getProductSn()); - if(CollectionUtils.isEmpty(produceSnList)){ + if (CollectionUtils.isEmpty(produceSnList)) { return false; } return mesPartPullDetail.getPullPartNo().equals(produceSnList.get(0).getPartNo()); From 1ebb40569f3af90cc78265e21e33bfa97c7b2f4a Mon Sep 17 00:00:00 2001 From: "castle.zang" Date: Sat, 12 Oct 2024 15:12:03 +0800 Subject: [PATCH 12/16] =?UTF-8?q?=E7=94=B5=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/pcn/api/busi/IMesEarlyWarningService.java | 48 +++++++++ .../pcn/apiservice/config/WebServiceConfig.java | 118 ++++++++++----------- .../busi/MesEarlyWarningKanBanController.java | 98 +++++++++++++++++ .../busi/MesEarlyWarningServiceImpl.java | 71 +++++++++++++ 4 files changed, 276 insertions(+), 59 deletions(-) create mode 100644 modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/IMesEarlyWarningService.java create mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesEarlyWarningKanBanController.java create mode 100644 modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesEarlyWarningServiceImpl.java diff --git a/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/IMesEarlyWarningService.java b/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/IMesEarlyWarningService.java new file mode 100644 index 0000000..58ff47e --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-api/src/main/java/cn/estsh/i3plus/ext/mes/pcn/api/busi/IMesEarlyWarningService.java @@ -0,0 +1,48 @@ +package cn.estsh.i3plus.ext.mes.pcn.api.busi; + +import cn.estsh.i3plus.pojo.mes.bean.MesEarlyWarningKanBan; +import cn.estsh.i3plus.pojo.mes.model.MesEarlyWarningKanBanModel; + +import java.util.List; + +public interface IMesEarlyWarningService { + + /** + * 查询出需要轮询组的id 和 轮询的时间(切换组时查询一下) + * 如果idList 数量为1,时间则是定时刷新时间 + * + * 添加新的组时需要查询一下 + */ + List getEarlyWarningList(String organizeCode); + + /** + * 保存配置 + * @param model + */ + void saveEarlyWarning(MesEarlyWarningKanBanModel model); + + /** + * 更新配置 + * @param earlyWarning + */ + void updateEarlyWarning(MesEarlyWarningKanBan earlyWarning); + + /** + * 软删配置 + */ + void deleteEarlyWarning(Long id, String organizeCode,String userName); + + /** + * 获取看板数据 + * @param id + */ + MesEarlyWarningKanBan getKanbanData(Long id,String organizeCode); + + /** + * 获取看板数据 + * @param id + */ + void getData(Long id,String organizeCode); + + +} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/config/WebServiceConfig.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/config/WebServiceConfig.java index a035b0a..e3c4679 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/config/WebServiceConfig.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/config/WebServiceConfig.java @@ -1,59 +1,59 @@ -///** -// * Licensed to the Apache Software Foundation (ASF) under one -// * or more contributor license agreements. See the NOTICE file -// * distributed with this work for additional information -// * regarding copyright ownership. The ASF licenses this file -// * to you under the Apache ImppLicense, Version 2.0 (the -// * "ImppLicense"); you may not use this file except in compliance -// * with the ImppLicense. You may obtain a copy of the ImppLicense at -// * -// * http://www.apache.org/licenses/LICENSE-2.0 -// * -// * Unless required by applicable law or agreed to in writing, -// * software distributed under the ImppLicense is distributed on an -// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// * KIND, either express or implied. See the ImppLicense for the -// * specific language governing permissions and limitations -// * under the ImppLicense. -// */ -//package cn.estsh.i3plus.ext.mes.pcn.apiservice.config; -// -// -// -//import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.webservice.DcsForEquipmentServer; -//import org.apache.cxf.Bus; -//import org.apache.cxf.jaxws.EndpointImpl; -//import org.apache.cxf.transport.servlet.CXFServlet; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.boot.web.servlet.ServletRegistrationBean; -//import org.springframework.context.annotation.Bean; -//import org.springframework.context.annotation.Configuration; -// -//import javax.xml.ws.Endpoint; -// -///** -// * @Description : WebService Server 服务配置 -// * WSDL URL: /block/softswitch/server/web-service?wsdl -// * @Reference : -// * @Author : wei.peng -// * @CreateDate : 2019/9/10 下午3:13 -// * @Modify: -// **/ -//@Configuration -//public class WebServiceConfig { -// -// @Autowired -// private Bus bus; -// -// @Bean("cxfServletRegistration") -// public ServletRegistrationBean dispatcherServlet() { -// return new ServletRegistrationBean(new CXFServlet(), "/*"); -// } -// -// @Bean -// public Endpoint endpoint() { -// EndpointImpl endpoint = new EndpointImpl(bus, new DcsForEquipmentServer()); -// endpoint.publish("/DCSForEquipmentService"); -// return endpoint; -// } -//} +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache ImppLicense, Version 2.0 (the + * "ImppLicense"); you may not use this file except in compliance + * with the ImppLicense. You may obtain a copy of the ImppLicense at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the ImppLicense is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the ImppLicense for the + * specific language governing permissions and limitations + * under the ImppLicense. + */ +package cn.estsh.i3plus.ext.mes.pcn.apiservice.config; + + + +import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.webservice.DcsForEquipmentServer; +import org.apache.cxf.Bus; +import org.apache.cxf.jaxws.EndpointImpl; +import org.apache.cxf.transport.servlet.CXFServlet; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.web.servlet.ServletRegistrationBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.xml.ws.Endpoint; + +/** + * @Description : WebService Server 服务配置 + * WSDL URL: /block/softswitch/server/web-service?wsdl + * @Reference : + * @Author : wei.peng + * @CreateDate : 2019/9/10 下午3:13 + * @Modify: + **/ +@Configuration +public class WebServiceConfig { + + @Autowired + private Bus bus; + + @Bean("cxfServletRegistration") + public ServletRegistrationBean dispatcherServlet() { + return new ServletRegistrationBean(new CXFServlet(), "/i3plus-pcn/*"); + } + + @Bean + public Endpoint endpoint() { + EndpointImpl endpoint = new EndpointImpl(bus, new DcsForEquipmentServer()); + endpoint.publish("/DCSForEquipmentService"); + return endpoint; + } +} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesEarlyWarningKanBanController.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesEarlyWarningKanBanController.java new file mode 100644 index 0000000..31214b0 --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesEarlyWarningKanBanController.java @@ -0,0 +1,98 @@ +package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi; + +import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.MesEarlyWarningServiceImpl; +import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant; +import cn.estsh.i3plus.pojo.mes.bean.MesEarlyWarningKanBan; +import cn.estsh.i3plus.pojo.mes.model.MesEarlyWarningKanBanModel; +import cn.estsh.impp.framework.boot.util.ResultBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@RestController +@RequestMapping(MesCommonConstant.MES_YANFEN + "/earlyWarningKanBan") +public class MesEarlyWarningKanBanController { + + @Autowired + private MesEarlyWarningServiceImpl mesEarlyWarningService; + + /** + * 获取所有的线末大屏配置 + * @param organizeCode + * @return + */ + @GetMapping(path = "/list/{organizeCode}") + public ResultBean getEarlyWarningList(@PathVariable String organizeCode){ + List list; + try { + list = mesEarlyWarningService.getEarlyWarningList(organizeCode); + } catch (Exception e) { + return ResultBean.fail(e.getMessage()); + } + return ResultBean.success("查询成功").setResultList(list); + } + + /** + * 保存配置 + * @param model + * @return + */ + @PostMapping(path = "/save") + public ResultBean saveEarlyWarningList(@RequestBody MesEarlyWarningKanBanModel model){ + try { + mesEarlyWarningService.saveEarlyWarning(model); + } catch (Exception e) { + return ResultBean.fail(e.getMessage()); + } + return ResultBean.success("查询成功"); + } + + /** + * 更新配置 + * @param earlyWarning + */ + @PostMapping(path = "/update") + public ResultBean updateEarlyWarning(@RequestBody MesEarlyWarningKanBan earlyWarning){ + try { + mesEarlyWarningService.updateEarlyWarning(earlyWarning); + } catch (Exception e) { + return ResultBean.fail(e.getMessage()); + } + return ResultBean.success("更新成功"); + } + + /** + * 软删配置 + */ + @GetMapping(path = "/delete/{id}/{organizeCode}/{userName}") + public ResultBean deleteEarlyWarning(@PathVariable Long id, @PathVariable String organizeCode,@PathVariable String userName){ + try { + mesEarlyWarningService.deleteEarlyWarning(id,organizeCode,userName); + } catch (Exception e) { + return ResultBean.fail(e.getMessage()); + } + return ResultBean.success("删除成功"); + } + + + /** + * 获取看板配置 + */ + @GetMapping(path = "/get/{id}/{organizeCode}") + public ResultBean getKanbanData(@PathVariable Long id,@PathVariable String organizeCode){ + try { + mesEarlyWarningService.getKanbanData(id,organizeCode); + } catch (Exception e) { + return ResultBean.fail(e.getMessage()); + } + return ResultBean.success("删除成功"); + } + + + @GetMapping(path = "/getData/{id}/{organizeCode}") + public ResultBean getData(@PathVariable Long id,@PathVariable String organizeCode){ + return null; + } + +} diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesEarlyWarningServiceImpl.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesEarlyWarningServiceImpl.java new file mode 100644 index 0000000..b68c974 --- /dev/null +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesEarlyWarningServiceImpl.java @@ -0,0 +1,71 @@ +package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi; + +import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesEarlyWarningService; +import cn.estsh.i3plus.ext.mes.pcn.apiservice.util.MesPcnException; +import cn.estsh.i3plus.platform.common.convert.ConvertBean; +import cn.estsh.i3plus.pojo.base.bean.DdlPackBean; +import cn.estsh.i3plus.pojo.mes.bean.MesEarlyWarningKanBan; +import cn.estsh.i3plus.pojo.mes.model.MesEarlyWarningKanBanModel; +import cn.estsh.i3plus.pojo.mes.repository.MesEarlyWarningKanBanRepository; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.beanutils.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.lang.reflect.InvocationTargetException; +import java.util.List; + +@Slf4j +@Service +public class MesEarlyWarningServiceImpl implements IMesEarlyWarningService { + + @Autowired + private MesEarlyWarningKanBanRepository earlyWarningKanBanRao; + + @Override + public List getEarlyWarningList(String organizeCode) { + + DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(organizeCode); + return earlyWarningKanBanRao.findByHqlWhere(ddlPackBean); + } + + @Override + public void saveEarlyWarning(MesEarlyWarningKanBanModel model) { + MesEarlyWarningKanBan kanBan = new MesEarlyWarningKanBan(); + try { + BeanUtils.copyProperties(kanBan,model); + } catch (IllegalAccessException | InvocationTargetException e) { + log.error(e.getMessage()); + MesPcnException.throwMesBusiException("类型转换出错!"+e.getMessage()); + } + ConvertBean.saveOrUpdate(kanBan,model.getCreateUser()); + earlyWarningKanBanRao.insert(kanBan); + + } + + @Override + public void updateEarlyWarning(MesEarlyWarningKanBan earlyWarning) { + ConvertBean.saveOrUpdate(earlyWarning,earlyWarning.getCreateUser()); + earlyWarningKanBanRao.insert(earlyWarning); + + } + + @Override + public void deleteEarlyWarning(Long id, String organizeCode,String userName) { + earlyWarningKanBanRao.deleteWeaklyByProperties(new String[]{"id","organizeCode"},new Object[]{id,organizeCode},userName); + } + + @Override + public MesEarlyWarningKanBan getKanbanData(Long id,String organizeCode) { + List list = earlyWarningKanBanRao.findByProperty(new String[]{"id", "organizeCode"}, new Object[]{id, organizeCode}); + if (!list.isEmpty()){ + return list.get(0); + } + return new MesEarlyWarningKanBan(); + } + + @Override + public void getData(Long id, String organizeCode) { + + } +} From 7a4df0d18409c82d16e0e5ec37e02cf21541b047 Mon Sep 17 00:00:00 2001 From: jun Date: Sat, 12 Oct 2024 19:40:13 +0800 Subject: [PATCH 13/16] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=8F=91=E8=BF=90?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sShippingScanSnAndOrderStrategyServiceImpl.java | 54 ++++++++++++++++------ 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/shippingscan/strategy/MesShippingScanSnAndOrderStrategyServiceImpl.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/shippingscan/strategy/MesShippingScanSnAndOrderStrategyServiceImpl.java index 5ad1559..c41952e 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/shippingscan/strategy/MesShippingScanSnAndOrderStrategyServiceImpl.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/shippingscan/strategy/MesShippingScanSnAndOrderStrategyServiceImpl.java @@ -67,23 +67,34 @@ public class MesShippingScanSnAndOrderStrategyServiceImpl implements IMesShippin @Override public MesSortShippingCheckModel doScan(MesSortShippingCheckModel model, MesShippingOrderManagement orderManagement, MesPartShippingGroup shippingGroup) { if (!Objects.isNull(model.getLastShippingDetailId())) { - //校验条码 - MesProduceSn produceSn = checkSn(model); //更新单据信息 model.getDetailList().stream().filter(t -> t.getId().equals(model.getLastShippingDetailId())).forEach(detail -> { - detail.setBarcode(model.getSn()); + //第一次扫描的是条码 + if(StringUtils.isEmpty(detail.getVisualOrderNo())){ + detail.setVisualOrderNo(model.getSn()); + model.setSn(detail.getBarcode()); + }else{ + detail.setBarcode(model.getSn()); + } + MesProduceSn produceSn = checkSn(model); updateOrderManagementDetails(orderManagement, detail, getMesWorkOrder(model, produceSn, detail), produceSn, model.getUserInfo()); }); model.setLastShippingDetailId(null); } else { - //校验目视单 - MesWorkOrder workOrder = getWorkOrder(model); + //查询工单 + MesWorkOrder workOrder = mesWorkOrderExtService.getWorkOrder(model.getOrganizeCode(), model.getSn()); + //扫描的工单或条码对应的零件 + String partNo = getPartNo(model, workOrder); boolean scanFlg = false; for (MesShippingOrderManagementDetail detail : model.getDetailList()) { - if (detail.getPartNo().equals(workOrder.getPartNo()) && StringUtils.isEmpty(detail.getBarcode()) && !Objects.equals(detail.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER)) { + if (detail.getPartNo().equals(partNo) && StringUtils.isEmpty(detail.getBarcode()) && !Objects.equals(detail.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER)) { //校验发运明细 - checkShippingDetails(model, orderManagement, shippingGroup, workOrder.getPartNo(), detail); - detail.setVisualOrderNo(model.getSn()); + checkShippingDetails(model, orderManagement, shippingGroup, partNo, detail); + detail.setBarcode(model.getSn()); + //如果第一次扫描的是目视单,先缓存数据用于第二次校验 + if(!Objects.isNull(workOrder)){ + detail.setVisualOrderNo(model.getSn()); + } //校验通过的明细ID model.setLastShippingDetailId(detail.getId()); scanFlg = true; @@ -91,25 +102,42 @@ public class MesShippingScanSnAndOrderStrategyServiceImpl implements IMesShippin } } if (!scanFlg) { - throw new ImppBusiException(String.format("【%s】此目视单对应的【%s】物料号与发运单中物料号不匹配,请检查数据!", model.getSn(), workOrder.getPartNo())); + throw new ImppBusiException(String.format("【%s】此目视单对应的【%s】物料号与发运单中物料号不匹配,请检查数据!", model.getSn(), partNo)); } } return model; } + private String getPartNo(MesSortShippingCheckModel model, MesWorkOrder workOrder) { + //校验目视单是否已经扫描 + if (model.getDetailList().stream().anyMatch(t -> !StringUtils.isEmpty(t.getVisualOrderNo()) && t.getVisualOrderNo().contains(model.getSn()))) { + throw new ImppBusiException(String.format("【%s】此目视单已经扫描过,请检查数据!", model.getSn())); + } + if (Objects.isNull(workOrder)) { + //如果扫描的是条码,校验条码 + return checkSn(model).getPartNo(); + }else{ + //校验目视单状态 + if (MesExtEnumUtil.ORDER_STATUS.COMPLETE.getValue() != workOrder.getWorkOrderStatus() || MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue() != workOrder.getQcStatus()) { + throw new ImppBusiException(String.format("目视单【%s】状态为【%s】质量状态为【%s】,不允许发运!", model.getSn(), MesExtEnumUtil.ORDER_STATUS.valueOfDescription(workOrder.getWorkOrderStatus()), MesExtEnumUtil.PRODUCE_QC_STATUS.valueOfDescription(workOrder.getQcStatus()))); + } + return workOrder.getPartNo(); + } + } + private MesWorkOrder getMesWorkOrder(MesSortShippingCheckModel model, MesProduceSn produceSn, MesShippingOrderManagementDetail detail) { MesWorkOrder workOrder = mesWorkOrderExtService.getWorkOrder(model.getOrganizeCode(), detail.getVisualOrderNo()); if (Objects.isNull(workOrder)) { - throw new ImppBusiException(String.format("目视单【%s】不存在,请检查数据!", model.getSn())); + throw new ImppBusiException(String.format("目视单【%s】不存在,请检查数据!", detail.getVisualOrderNo())); } //校验目视单状态 if (MesExtEnumUtil.ORDER_STATUS.COMPLETE.getValue() != workOrder.getWorkOrderStatus() || MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue() != workOrder.getQcStatus()) { - throw new ImppBusiException(String.format("目视单【%s】状态为【%s】质量状态为【%s】,不允许发运!", model.getSn(), MesExtEnumUtil.ORDER_STATUS.valueOfDescription(workOrder.getWorkOrderStatus()), MesExtEnumUtil.PRODUCE_QC_STATUS.valueOfDescription(workOrder.getQcStatus()))); + throw new ImppBusiException(String.format("目视单【%s】状态为【%s】质量状态为【%s】,不允许发运!", detail.getVisualOrderNo(), MesExtEnumUtil.ORDER_STATUS.valueOfDescription(workOrder.getWorkOrderStatus()), MesExtEnumUtil.PRODUCE_QC_STATUS.valueOfDescription(workOrder.getQcStatus()))); } //校验条码是否匹配 if (!Objects.equals(produceSn.getCustSn(), workOrder.getCustSn())) { - throw new ImppBusiException(String.format("目视单【%s】条码【%s】与扫描条码【%s】,不匹配!", detail.getVisualOrderNo(), workOrder.getCustSn(), model.getSn())); + throw new ImppBusiException(String.format("目视单【%s】条码【%s】与扫描条码【%s】,不匹配!", detail.getVisualOrderNo(), workOrder.getCustSn(), produceSn.getCustSn())); } //校验零件是否匹配 if (!Objects.equals(produceSn.getPartNo(), workOrder.getPartNo())) { @@ -165,7 +193,7 @@ public class MesShippingScanSnAndOrderStrategyServiceImpl implements IMesShippin private MesProduceSn checkSn(MesSortShippingCheckModel model) { //校验条码是否重复扫描 - Optional optional = model.getDetailList().stream().filter(k -> !StringUtils.isEmpty(k.getBarcode()) && k.getBarcode().equals(model.getSn())).findFirst(); + Optional optional = model.getDetailList().stream().filter(k -> !StringUtils.isEmpty(k.getBarcode()) && k.getBarcode().contains(model.getSn())).findFirst(); if (optional.isPresent()) { throw new ImppBusiException(String.format("【%s】此条码已经扫描过,请检查数据!", model.getSn())); } From 5bd431ac550c0bd43551271249c6dbf1a30ce39c Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Tue, 15 Oct 2024 09:56:57 +0800 Subject: [PATCH 14/16] =?UTF-8?q?=E8=A3=85=E9=85=8D=E4=BB=B6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=20=E5=88=97=E5=A2=9E=E5=8A=A0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../step/MesAssemblyShowNosortStepService.java | 47 ++++++++++------ .../MesAssemblyShowSortPreCraftStepService.java | 7 +++ .../step/MesAssemblyShowSortStepService.java | 65 ++++++++++++++-------- .../MesProductionRecordGenerateStepService.java | 2 +- .../ext/mes/pcn/pojo/util/MesPcnExtConstWords.java | 2 + 5 files changed, 82 insertions(+), 41 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowNosortStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowNosortStepService.java index de69db4..a5fc886 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowNosortStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowNosortStepService.java @@ -3,6 +3,7 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step; import cn.estsh.i3plus.ext.mes.pcn.api.busi.*; import cn.estsh.i3plus.ext.mes.pcn.pojo.context.*; import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; +import cn.estsh.i3plus.mes.pcn.actor.shipping.dispatch.IFsmCommonService; import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService; import cn.estsh.i3plus.mes.pcn.util.PojoAttrUtil; import cn.estsh.i3plus.mes.pcn.util.StringUtil; @@ -54,6 +55,9 @@ public class MesAssemblyShowNosortStepService extends BaseStepService { @Autowired private IMesWorkOrderExtService workOrderExtService; + @Autowired + private IFsmCommonService fsmCommonService; + @Override public StepResult execute(StationRequestBean reqBean) { @@ -433,16 +437,18 @@ public class MesAssemblyShowNosortStepService extends BaseStepService { //显示装配件信息 public Boolean showProductionAssembly(StationRequestBean reqBean, StationResultBean resultBean, MesWorkCenter workCenter, List prodRuleContextList) { + Boolean isNeedShowMatchRule = checkIsNeedShowMatchRule(reqBean); + for (MesProdRuleContext prodRuleContext : prodRuleContextList) { if (null == prodRuleContext || StringUtils.isEmpty(prodRuleContext.getAssemblyDataJson())) continue; //封装匹配当前设备的装配件信息 - List assemblyShowContextList = getAssemblyShowContextList(prodRuleContext.getAssemblyDataContext(workCenter)); + List assemblyShowContextList = getAssemblyShowContextList(prodRuleContext.getAssemblyDataContext(workCenter), isNeedShowMatchRule); if (CollectionUtils.isEmpty(assemblyShowContextList)) continue; //装配件清单列表标题 - List attrBeanList = dataAttrList(prodRuleContext.getWorkOrderNo()); + List attrBeanList = dataAttrList(prodRuleContext.getWorkOrderNo(), isNeedShowMatchRule); //封装多表格 resultBean.addStationResultBeans(new StationResultBean().dataType(MesPcnEnumUtil.STATION_DATA_TYPE.TABLE.getValue()).dataAttrList(attrBeanList).resultList(assemblyShowContextList)); @@ -458,18 +464,24 @@ public class MesAssemblyShowNosortStepService extends BaseStepService { } + //未知腔数配置【工位参数】 + private Boolean checkIsNeedShowMatchRule(StationRequestBean reqBean) { + String assemblyShowMrCfg = fsmCommonService.handleFsmWcpcMapDataForDoScan(reqBean).get(MesPcnExtConstWords.ASSEMBLY_SHOW_MR_CFG); + return (!StringUtils.isEmpty(assemblyShowMrCfg) && assemblyShowMrCfg.equals(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValueStr())) ? true : false; + } + private String getWorkOrderNo(Map productionPartMap, Integer foreignKey) { return (!CollectionUtils.isEmpty(productionPartMap) && productionPartMap.containsKey(foreignKey)) ? productionPartMap.get(foreignKey).getWorkOrderNo() : null; } //封装匹配当前设备的装配件信息 - private List getAssemblyShowContextList(List productionAssemblyContextList) { + private List getAssemblyShowContextList(List productionAssemblyContextList, Boolean isNeedShowMatchRule) { if (CollectionUtils.isEmpty(productionAssemblyContextList)) return null; List assemblyShowContextList = new ArrayList<>(); for (MesProductionAssemblyContext item : productionAssemblyContextList) { //不显示且不扫描/仅目视的不显示出来 if (null == item || MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.checkIsNoShow(item.getMatchType())) continue; - assemblyShowContextList.add(assemblyShowContext(item)); + assemblyShowContextList.add(assemblyShowContext(item, isNeedShowMatchRule)); } assemblyShowContextList = assemblyShowContextList.stream().filter(o -> null != o).sorted(Comparator.comparing(MesAssemblyShowContext::getRouteSeq)).collect(Collectors.toList()); @@ -481,30 +493,31 @@ public class MesAssemblyShowNosortStepService extends BaseStepService { } //封装装配件信息 - private MesAssemblyShowContext assemblyShowContext(MesProductionAssemblyContext o) { + private MesAssemblyShowContext assemblyShowContext(MesProductionAssemblyContext productionAssemblyContext, Boolean isNeedShowMatchRule) { MesAssemblyShowContext assemblyShowContext = new MesAssemblyShowContext(); - BeanUtils.copyProperties(o, assemblyShowContext); - if (!MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.checkIsNeedShowMatchRule(assemblyShowContext.getMatchType())) { - assemblyShowContext.setMatchTypeName(MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType())); - } else { - assemblyShowContext.setMatchTypeName(MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType()) + "【" + assemblyShowContext.getMatchRule() + "】"); - } + BeanUtils.copyProperties(productionAssemblyContext, assemblyShowContext); + if (isNeedShowMatchRule) assemblyShowContext.setMatchTypeName(showMatchRule(assemblyShowContext)); assemblyShowContext.setAssemblyStatusName(MesExtEnumUtil.ASSEMBLY_STATUS.valueOfDescription(assemblyShowContext.getAssemblyStatus())); if (MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue() != assemblyShowContext.getAssemblyStatus()) assemblyShowContext.setColor(StringUtils.isEmpty(assemblyShowContext.getShowColor()) ? MesExtEnumUtil.COLOR.GREEN.getValue() : assemblyShowContext.getShowColor()); return assemblyShowContext; } + private String showMatchRule(MesAssemblyShowContext assemblyShowContext) { + if (!MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.checkIsNeedShowMatchRule(assemblyShowContext.getMatchType())) return MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType()); + return MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType()) + "【" + assemblyShowContext.getMatchRule() + "】"; + } + //装配件清单列表标题 - private List dataAttrList(String workOrderNo) { + private List dataAttrList(String workOrderNo, Boolean isNeedShowMatchRule) { List attrBeanList = new ArrayList<>(); PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.INDEX, "序号"); - PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.MATCH_TYPE_NAME, "装配方式"); + if (isNeedShowMatchRule) PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.MATCH_TYPE_NAME, "装配方式"); if (!StringUtils.isEmpty(workOrderNo)) PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.WORK_ORDER_NO, "生产工单编号"); - PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.PART_NO, "零件编码"); - PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_PART_NO, "原料编码"); - PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_PART_NAME, "原料名称"); - PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_SN, "原料条码"); + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.PART_NO, "产成零件编码"); + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_PART_NO, "零件编码"); + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_PART_NAME, "零件名称"); + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_SN, "零件条码"); PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_STATUS_NAME, "装配状态"); return attrBeanList; } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortPreCraftStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortPreCraftStepService.java index d892485..45d658a 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortPreCraftStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortPreCraftStepService.java @@ -5,11 +5,14 @@ import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProdRuleContext; import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionProcessContext; import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionPsInContext; import cn.estsh.i3plus.pojo.mes.bean.MesWorkCell; +import cn.estsh.i3plus.pojo.mes.bean.MesWorkCenter; import cn.estsh.i3plus.pojo.mes.model.StationRequestBean; +import cn.estsh.i3plus.pojo.mes.model.StationResultBean; import cn.estsh.i3plus.pojo.mes.model.StepResult; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import java.util.List; import java.util.Map; /** @@ -33,4 +36,8 @@ public class MesAssemblyShowSortPreCraftStepService extends MesAssemblyShowSortS return prodRuleCfgExtService.getProdRuleSortPreCraftContext(prodRuleContext, workCellMap, reqBean.getWorkCellCode()); } + public Boolean showProductionAssembly(StationRequestBean reqBean, StationResultBean resultBean, MesWorkCenter workCenter, List prodRuleContextList) { + return showProductionAssembly(reqBean, resultBean, workCenter, prodRuleContextList, true); + } + } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortStepService.java index 8c36909..56f1e4d 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesAssemblyShowSortStepService.java @@ -5,6 +5,7 @@ import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionDispatchContextStepSer import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionProcessContextStepService; import cn.estsh.i3plus.ext.mes.pcn.pojo.context.*; import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; +import cn.estsh.i3plus.mes.pcn.actor.shipping.dispatch.IFsmCommonService; import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService; import cn.estsh.i3plus.mes.pcn.util.PojoAttrUtil; import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; @@ -46,6 +47,9 @@ public class MesAssemblyShowSortStepService extends BaseStepService { @Autowired public IMesProdRuleCfgExtService prodRuleCfgExtService; + @Autowired + private IFsmCommonService fsmCommonService; + @Override public StepResult execute(StationRequestBean reqBean) { @@ -95,7 +99,7 @@ public class MesAssemblyShowSortStepService extends BaseStepService { } //显示装配件信息 - if (!showProductionAssembly(reqBean, resultBean, workCenter, prodRuleContextList, false)) + if (!showProductionAssembly(reqBean, resultBean, workCenter, prodRuleContextList)) return stepSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), stepResult, "当前未查询到相关的装配件清单"); return stepSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), stepResult, "显示装配件扫描项成功!"); @@ -110,16 +114,18 @@ public class MesAssemblyShowSortStepService extends BaseStepService { } //装配件清单列表标题 - private List dataAttrList(List prodRuleContextList, Boolean isNeedShowCell) { + private List dataAttrList(List prodRuleContextList, Boolean isNeedShowCell, Boolean isNeedShowMatchRule) { List attrBeanList = new ArrayList<>(); PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.INDEX, "序号"); if (isNeedShowCell) PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.WORK_CELL_CODE, "工位代码"); - PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.MATCH_TYPE_NAME, "装配方式"); - if (prodRuleContextList.size() > 1) PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.WORK_ORDER_NO, "生产工单编号"); - PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.PART_NO, "零件编码"); - PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_PART_NO, "原料编码"); - PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_PART_NAME, "原料名称"); - PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_SN, "原料条码"); + if (isNeedShowMatchRule) PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.MATCH_TYPE_NAME, "装配方式"); + if (prodRuleContextList.size() > 1) { + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.WORK_ORDER_NO, "生产工单编号"); + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.PART_NO, "产成零件编码"); + } + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_PART_NO, "零件编码"); + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_PART_NAME, "零件名称"); + PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_SN, "零件条码"); PojoAttrUtil.loadPojoAttrs(attrBeanList, MesPcnExtConstWords.ASSEMBLY_STATUS_NAME, "装配状态"); return attrBeanList; } @@ -157,22 +163,28 @@ public class MesAssemblyShowSortStepService extends BaseStepService { } + public Boolean showProductionAssembly(StationRequestBean reqBean, StationResultBean resultBean, MesWorkCenter workCenter, List prodRuleContextList) { + return showProductionAssembly(reqBean, resultBean, workCenter, prodRuleContextList, false); + } + public Boolean showProductionAssembly(StationRequestBean reqBean, StationResultBean resultBean, MesWorkCenter workCenter, List prodRuleContextList, Boolean isNeedShowCell) { List attrBeanList = null; - if (isNeedShowCell) isNeedShowCell = checkIsNeedShowCell(reqBean, workCenter, prodRuleContextList); + if (isNeedShowCell) isNeedShowCell = checkIsNeedShowCell(reqBean, prodRuleContextList); + + Boolean isNeedShowMatchRule = checkIsNeedShowMatchRule(reqBean); for (MesProdRuleContext prodRuleContext : prodRuleContextList) { if (null == prodRuleContext || StringUtils.isEmpty(prodRuleContext.getAssemblyDataJson())) continue; //封装匹配当前设备的装配件信息 - List assemblyShowContextList = getAssemblyShowContextList(prodRuleContext.getAssemblyDataContext(workCenter)); + List assemblyShowContextList = getAssemblyShowContextList(prodRuleContext.getAssemblyDataContext(workCenter), isNeedShowMatchRule); if (CollectionUtils.isEmpty(assemblyShowContextList)) continue; //装配件清单列表标题 - if (CollectionUtils.isEmpty(attrBeanList)) attrBeanList = dataAttrList(prodRuleContextList, isNeedShowCell); + if (CollectionUtils.isEmpty(attrBeanList)) attrBeanList = dataAttrList(prodRuleContextList, isNeedShowCell, isNeedShowMatchRule); //封装多表格 resultBean.addStationResultBeans(new StationResultBean().dataType(MesPcnEnumUtil.STATION_DATA_TYPE.TABLE.getValue()).dataAttrList(attrBeanList).resultList(assemblyShowContextList)); @@ -189,22 +201,28 @@ public class MesAssemblyShowSortStepService extends BaseStepService { } //验证是否需要演示工位代码列 - private Boolean checkIsNeedShowCell(StationRequestBean reqBean, MesWorkCenter workCenter, List prodRuleContextList) { + private Boolean checkIsNeedShowCell(StationRequestBean reqBean, List prodRuleContextList) { for (MesProdRuleContext prodRuleContext : prodRuleContextList) { if (null == prodRuleContext || StringUtils.isEmpty(prodRuleContext.getAssemblyDataJson())) continue; - if (!prodRuleContext.getAssemblyDataContext(workCenter).get(0).getWorkCellCode().equals(reqBean.getWorkCellCode())) return true; + if (!prodRuleContext.getSortAssemblyDataContext().get(0).getWorkCellCode().equals(reqBean.getWorkCellCode())) return true; } return false; } + //未知腔数配置【工位参数】 + private Boolean checkIsNeedShowMatchRule(StationRequestBean reqBean) { + String assemblyShowMrCfg = fsmCommonService.handleFsmWcpcMapDataForDoScan(reqBean).get(MesPcnExtConstWords.ASSEMBLY_SHOW_MR_CFG); + return (!StringUtils.isEmpty(assemblyShowMrCfg) && assemblyShowMrCfg.equals(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValueStr())) ? true : false; + } + //封装匹配当前设备的装配件信息 - private List getAssemblyShowContextList(List productionAssemblyContextList) { + private List getAssemblyShowContextList(List productionAssemblyContextList, Boolean isNeedShowMatchRule) { if (CollectionUtils.isEmpty(productionAssemblyContextList)) return null; List assemblyShowContextList = new ArrayList<>(); for (MesProductionAssemblyContext item : productionAssemblyContextList) { //不显示且不扫描/仅目视的不显示出来 if (null == item || MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.checkIsNoShow(item.getMatchType())) continue; - assemblyShowContextList.add(assemblyShowContext(item)); + assemblyShowContextList.add(assemblyShowContext(item, isNeedShowMatchRule)); } assemblyShowContextList = sortAssemblyShowContextList(assemblyShowContextList); @@ -216,18 +234,19 @@ public class MesAssemblyShowSortStepService extends BaseStepService { } //封装装配件信息 - private MesAssemblyShowContext assemblyShowContext(MesProductionAssemblyContext o) { + private MesAssemblyShowContext assemblyShowContext(MesProductionAssemblyContext productionAssemblyContext, Boolean isNeedShowMatchRule) { MesAssemblyShowContext assemblyShowContext = new MesAssemblyShowContext(); - BeanUtils.copyProperties(o, assemblyShowContext); - if (!MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.checkIsNeedShowMatchRule(assemblyShowContext.getMatchType())) { - assemblyShowContext.setMatchTypeName(MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType())); - } else { - assemblyShowContext.setMatchTypeName(MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType()) + "【" + assemblyShowContext.getMatchRule() + "】"); - } - assemblyShowContext.setAssemblyStatusName(MesExtEnumUtil.ASSEMBLY_STATUS.valueOfDescription(o.getAssemblyStatus())); + BeanUtils.copyProperties(productionAssemblyContext, assemblyShowContext); + if (isNeedShowMatchRule) assemblyShowContext.setMatchTypeName(showMatchRule(assemblyShowContext)); + assemblyShowContext.setAssemblyStatusName(MesExtEnumUtil.ASSEMBLY_STATUS.valueOfDescription(assemblyShowContext.getAssemblyStatus())); if (MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue() != assemblyShowContext.getAssemblyStatus()) assemblyShowContext.setColor(StringUtils.isEmpty(assemblyShowContext.getShowColor()) ? MesExtEnumUtil.COLOR.GREEN.getValue() : assemblyShowContext.getShowColor()); return assemblyShowContext; } + private String showMatchRule(MesAssemblyShowContext assemblyShowContext) { + if (!MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.checkIsNeedShowMatchRule(assemblyShowContext.getMatchType())) return MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType()); + return MesExtEnumUtil.ASSEMBLY_MATCH_TYPE.valueOfDescription(assemblyShowContext.getMatchType()) + "【" + assemblyShowContext.getMatchRule() + "】"; + } + } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java index 07982ee..1abe33c 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductionRecordGenerateStepService.java @@ -171,7 +171,7 @@ public class MesProductionRecordGenerateStepService extends BaseStepService { productionRecord.setOrganizeCode(reqBean.getOrganizeCode()); ConvertBean.serviceModelInitialize(productionRecord, reqBean.getUserInfo()); productionRecord.setCompleteDateTime(productionRecord.getModifyDatetime()); - productionRecord.setCreateDatetime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS")).format(new Date())); + productionRecord.setCreateDatetime((new SimpleDateFormat(MesPcnExtConstWords.DATE_FORMAT_SSS)).format(new Date())); productionRecord.setFid(UUID.randomUUID().toString()); productionRecord.setOneMouldMoreId(UUID.randomUUID().toString()); diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java index f9a1b14..2ef180c 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtConstWords.java @@ -280,6 +280,8 @@ public class MesPcnExtConstWords { // 非排序需要验证主条码是否是自制件[工步参数] public static final String NEED_CHECK_IS_PS = "NEED_CHECK_IS_PS"; + // 装配件显示规则配置[工位参数] + public static final String ASSEMBLY_SHOW_MR_CFG = "ASSEMBLY_SHOW_MR_CFG"; // 非排序是否支持顺序强过,前道强过[工位参数] public static final String IS_ALLOW_JUMP = "IS_ALLOW_JUMP"; // 未知腔数[工位参数] From 8cb8b90b15890d659e47dca42e280457294f291a Mon Sep 17 00:00:00 2001 From: gsz Date: Tue, 15 Oct 2024 11:58:07 +0800 Subject: [PATCH 15/16] =?UTF-8?q?SPS=E6=8B=89=E5=8A=A8=E4=B8=8D=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E5=BC=BA=E8=BF=87=E9=A1=BA=E5=BA=8F=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java index 35f9524..329e8d3 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesPullingOrderInfoService.java @@ -140,6 +140,7 @@ public class MesPullingOrderInfoService implements IMesPullingOrderInfoService { DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode()); DdlPreparedPack.getStringEqualPack(bean.getPullCode(), "pullCode", packBean); DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean); + DdlPreparedPack.getNumNOEqualPack(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(), "isPassCode", packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_PULL_ORDER_TYPE.SPS_PULL.getValue(), "pullOrderType", packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PULL_ORDER_STATUS.KITTING_PULL.getValue(), "pullOrderStatus", packBean); From c7a5f904a0c2ac0512e8006f8f2dd3924a4bc6f7 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Tue, 15 Oct 2024 13:29:41 +0800 Subject: [PATCH 16/16] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apiservice/serviceimpl/step/MesProductResultReadStepService.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/step/MesProductResultReadStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultReadStepService.java index 6696155..74a562e 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultReadStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultReadStepService.java @@ -7,6 +7,7 @@ import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesEquipVariableCfgCollectContex import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionProcessContext; import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords; import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService; +import cn.estsh.i3plus.mes.pcn.util.StringUtil; import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil; import cn.estsh.i3plus.pojo.mes.bean.MesEquipmentVariable; import cn.estsh.i3plus.pojo.mes.bean.MesEquipmentVariableCfg; @@ -229,7 +230,7 @@ public class MesProductResultReadStepService extends BaseStepService { Integer equipVariableValue = StringUtils.isEmpty(shotCounterList.get(0).getEquipVariableCollectContextList().get(0).getEquipVariableValue()) ? MesPcnExtConstWords.ZERO : Integer.valueOf(shotCounterList.get(0).getEquipVariableCollectContextList().get(0).getEquipVariableValue()); if (shotCounterCached.compareTo(equipVariableValue) != 0) { productionCustomContextStepService.dispatchShortCounter(reqBean, equipVariableValue); - log.info("工厂{}生产线{}工位{}:FSM STATE DISPATCHER --- DO STEP --- mesProductResultReadStepService EXEC --- shotCounterCached:{} --- UPDATE:{}", reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), shotCounterCached, equipVariableValue); + log.info("工厂{}生产线{}工位{}:FSM STATE DISPATCHER --- DO STEP --- {} EXEC --- shotCounterCached:{} --- UPDATE:{}", reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), StringUtil.toLowerCaseFirst(this.getClass().getSimpleName()), shotCounterCached, equipVariableValue); } if (shotCounterCached.compareTo(equipVariableValue) >= 0) return false; return true;