From 7eb393a50844b5030cbf170541a2a57e4adcfe9f Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 11 Apr 2025 09:36:27 +0800 Subject: [PATCH 1/2] =?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()); From 3993b18a0ef62235719ef05d4572f9aba772cff5 Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 11 Apr 2025 09:36:27 +0800 Subject: [PATCH 2/2] =?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 | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 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 f7b69d9..c541b46 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 @@ -966,10 +966,31 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService if (StringUtil.isEmpty(detail.getVin())) { MesPcnException.throwMesBusiException("发运单【%s】零件号【%s】vin号为空,请检查数据", orderManagement.getShippingCode(), detail.getPartNo()); } - final boolean matchCfgValue = mesConfigService.checkCfgValueIsContainItem(orderManagement.getOrganizeCode(), MesPcnExtConstWords.MES_SHIPPING_QUEUE_SAVE_CFG, null, null, ",", orderManagement.getShippingGroupCode()); + final boolean matchCfgValue = mesConfigService.checkCfgValueIsContainItem(orderManagement.getOrganizeCode(), MesPcnExtConstWords.MES_SHIPPING_QUEUE_SAVE_CFG, MesPcnExtConstWords.MES_SHIPPING_QUEUE_SAVE_CFG, null, ",", orderManagement.getShippingGroupCode()); 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());