From ce2f10fe98357f0289369cbc9759a3a0c2da8f91 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Wed, 9 Apr 2025 18:25:47 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E7=BA=BF=20=E5=8A=A0?= =?UTF-8?q?=E5=B7=A5=E8=AE=B0=E5=BD=95=E6=B1=87=E6=8A=A5=E7=8A=B6=E6=80=81?= =?UTF-8?q?=20=E5=8F=AA=E7=9C=8B=E5=BD=93=E5=89=8D=E5=B7=A5=E4=BD=8D?= =?UTF-8?q?=E7=9A=84=E8=A3=85=E9=85=8D=E4=BB=B6=E7=9A=84=E6=B1=87=E6=8A=A5?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/step/MesProductionRecordGenerateStepService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ef056d1..f6f14c4 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 @@ -146,7 +146,11 @@ public class MesProductionRecordGenerateStepService extends BaseStepService { //排序 List productionAssemblySortContextList = prodRuleContext.getSortAssemblyDataContext(); Optional optional = CollectionUtils.isEmpty(productionAssemblySortContextList) ? null : - productionAssemblySortContextList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getReportType()) && o.getReportType().compareTo(MesExtEnumUtil.MES_REPORT_TYPE.NO_REPORT.getValue()) != 0)).findFirst(); + productionAssemblySortContextList.stream().filter(o -> (null != o + && !StringUtils.isEmpty(o.getWorkCellCode()) && !StringUtils.isEmpty(o.getReportType()) + && o.getWorkCellCode().equals(reqBean.getWorkCellCode()) + && o.getReportType().compareTo(MesExtEnumUtil.MES_REPORT_TYPE.NO_REPORT.getValue()) != 0 + && o.getReportType().compareTo(MesPcnExtConstWords.ZERO) != 0)).findFirst(); if (null == optional || !optional.isPresent()) { productionRecord.setReportType(MesExtEnumUtil.MES_REPORT_TYPE.NO_REPORT.getValue()); productionRecord.setReportStatus(MesExtEnumUtil.REPORT_STATUS.REPORT_STATUS_30.getValue()); From 952cbdbae0f5c914c5f6bc7a3d9b5d63b6c3798d Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Wed, 9 Apr 2025 19:40:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E7=BA=BF=20=E5=8A=A0?= =?UTF-8?q?=E5=B7=A5=E8=AE=B0=E5=BD=95=E6=B1=87=E6=8A=A5=E7=8A=B6=E6=80=81?= =?UTF-8?q?=20=E5=8F=AA=E7=9C=8B=E5=BD=93=E5=89=8D=E5=B7=A5=E4=BD=8D?= =?UTF-8?q?=E7=9A=84=E8=A3=85=E9=85=8D=E4=BB=B6=E7=9A=84=E6=B1=87=E6=8A=A5?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/step/MesProductionRecordGenerateStepService.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/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 f6f14c4..5d19268 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 @@ -139,7 +139,7 @@ public class MesProductionRecordGenerateStepService extends BaseStepService { if (workCenter.getCenterType().compareTo(MesExtEnumUtil.WORK_CENTER_TYPE.NOSORT.getValue()) == 0) { //非排序 - productionRecord.setReportType((null != prodRuleContext && !StringUtils.isEmpty(prodRuleContext.getReportType())) ? prodRuleContext.getReportType() : MesExtEnumUtil.NOSORT_REPORT_TYPE.NO_REPORT.getValue()); + productionRecord.setReportType((null != prodRuleContext && !StringUtils.isEmpty(prodRuleContext.getReportType()) && prodRuleContext.getReportType().compareTo(MesPcnExtConstWords.ZERO) != 0) ? prodRuleContext.getReportType() : MesExtEnumUtil.NOSORT_REPORT_TYPE.NO_REPORT.getValue()); if (productionRecord.getReportType().compareTo(MesExtEnumUtil.NOSORT_REPORT_TYPE.NO_REPORT.getValue()) != 0) productionRecord.setReportPartNo(productionPsOutContext.getPartNo()); productionRecord.setReportStatus(productionRecord.getReportType().compareTo(MesExtEnumUtil.NOSORT_REPORT_TYPE.NO_REPORT.getValue()) != 0 ? MesExtEnumUtil.REPORT_STATUS.REPORT_STATUS_10.getValue() : MesExtEnumUtil.REPORT_STATUS.REPORT_STATUS_30.getValue()); } else { From 7eb393a50844b5030cbf170541a2a57e4adcfe9f Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 11 Apr 2025 09:36:27 +0800 Subject: [PATCH 3/3] =?UTF-8?q?46214=20PCN=EF=BC=9A=E5=8F=91=E8=BF=90?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E7=95=8C=E9=9D=A2=EF=BC=8C=E5=86=99=E5=85=A5?= =?UTF-8?q?=E5=8F=91=E8=BF=90=E9=98=9F=E5=88=97=E8=A1=A8=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E9=85=8D=E7=BD=AE=E8=BF=9B=E8=A1=8C=E5=8D=A1?= =?UTF-8?q?=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../busi/MesSortShippingCheckService.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 f7b69d9..c747eb9 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 @@ -970,6 +970,27 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService if (!matchCfgValue) { return; } + int limitValue = 0; + List limitConfig = mesConfigService.getConfigList(orderManagement.getOrganizeCode(), MesPcnExtConstWords.MES_SHIPPING_QUEUE_SAVE_CFG, "LIMIT", null); + if (!CollectionUtils.isEmpty(limitConfig)) { + String strLimitValue = limitConfig.get(0).getCfgValue(); + if (!StringUtil.isEmpty(strLimitValue)) { + try { + limitValue = Integer.parseInt(strLimitValue); + } catch (Exception ignored) { + + } + } + } + if (limitValue > 0) { + DdlPackBean packBean = DdlPackBean.getDdlPackBean(orderManagement.getOrganizeCode()); + DdlPreparedPack.getStringEqualPack(orderManagement.getShippingGroupCode(), "shippingGroupCode", packBean); + DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.QUEUE_ORDER_STATUS.CREATE.getValue(), "queueStatus", packBean); + int count = shippingQueueRDao.findByHqlWhereCount(packBean); + if (count >= limitValue) { + MesPcnException.throwMesBusiException("当前发运组【%s】的发运队列已满,请稍后重试!", orderManagement.getShippingGroupCode()); + } + } MesShippingQueue mesShippingQueue = new MesShippingQueue(); mesShippingQueue.setOrganizeCode(orderManagement.getOrganizeCode());