From b7a16d3fd24fa578878c8f5336ac28633e0699aa Mon Sep 17 00:00:00 2001 From: zhaoqiaobo Date: Thu, 11 Apr 2024 10:22:30 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(all):=20=E4=BF=AE=E6=94=B9=E5=BF=97?= =?UTF-8?q?=E9=82=A6=E6=8E=A8=E9=80=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1 修改志邦推送逻辑,只要部分签收之后就只能推部分签收 --- .../factorydata/zbom/enums/ZbomNodeEnums.java | 14 ++++++++++++++ .../zbom/mq/ZbomNodeDataPushListener.java | 8 ++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/enums/ZbomNodeEnums.java b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/enums/ZbomNodeEnums.java index 946c4bda6..7c19a8f8d 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/enums/ZbomNodeEnums.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/enums/ZbomNodeEnums.java @@ -29,4 +29,18 @@ public enum ZbomNodeEnums { this.value = value; } + /** + * 根据code查询枚举 + * @param code + * @return + */ + public static ZbomNodeEnums getByCode(String code) { + for (ZbomNodeEnums item : ZbomNodeEnums.values()) { + if (item.getCode().equals(code)) { + return item; + } + } + return null; + } + } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java index ccb1cbe21..84e863a3d 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java @@ -257,18 +257,22 @@ public class ZbomNodeDataPushListener { } else { // 查询当前未签收的数量与当前签收数量比较,如果未签收数较大,则是部分签收 paramDTO.setNode(ZbomNodeMappingEnums.getZbomByNodeAndStatus(nodeEnums, ZbomConstants.Status.SIGN_FOR_SECTION_STATUS).getCode()); - currentNode = ZbomNodeMappingEnums.getZbomByNodeAndStatus(nodeEnums, ZbomConstants.Status.SIGN_FOR_SECTION_STATUS); paramDTO.setSignQty(nodeData.getSignQty()); if (ObjectUtil.isNotEmpty(noSignNumberMap) && noSignNumberMap.containsKey(key)) { Integer noSignNum = noSignNumberMap.get(key); if (noSignNum <= signNumber) { // 全部签收 paramDTO.setNode(ZbomNodeMappingEnums.getZbomByNodeAndStatus(nodeEnums, ZbomConstants.Status.SIGN_FOR_ALL_STATUS).getCode()); - currentNode = ZbomNodeMappingEnums.getZbomByNodeAndStatus(nodeEnums, ZbomConstants.Status.SIGN_FOR_ALL_STATUS); } } else { continue; } + String pushNode = nodeOrderEntity.getPushNode(); + // 如果之前发送的是部分签收,则之后的所有签收节点都发部分签收 + if (StrUtil.isNotEmpty(pushNode) && pushNode.contains(ZbomNodeEnums.PARTIAL_RECEIPT.getIndex().toString())) { + paramDTO.setNode(ZbomNodeMappingEnums.getZbomByNodeAndStatus(nodeEnums, ZbomConstants.Status.SIGN_FOR_SECTION_STATUS).getCode()); + } + currentNode = ZbomNodeEnums.getByCode(paramDTO.getNode()); } } Integer index = currentNode.getIndex(); From 72f77d43a09d1c4cc6d0543bbb36e01a450f4148 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo Date: Thu, 11 Apr 2024 11:01:20 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix(service):=20=E4=BF=AE=E6=94=B9=E9=83=A8?= =?UTF-8?q?=E5=88=86=E7=AD=BE=E6=94=B6=E8=8A=82=E7=82=B9=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java index 84e863a3d..7aa75fe8a 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java @@ -262,14 +262,16 @@ public class ZbomNodeDataPushListener { Integer noSignNum = noSignNumberMap.get(key); if (noSignNum <= signNumber) { // 全部签收 + log.info("{} 全部签收", platformOrderCode); paramDTO.setNode(ZbomNodeMappingEnums.getZbomByNodeAndStatus(nodeEnums, ZbomConstants.Status.SIGN_FOR_ALL_STATUS).getCode()); } } else { continue; } - String pushNode = nodeOrderEntity.getPushNode(); + Integer currentNode1 = nodeOrderEntity.getCurrentNode(); // 如果之前发送的是部分签收,则之后的所有签收节点都发部分签收 - if (StrUtil.isNotEmpty(pushNode) && pushNode.contains(ZbomNodeEnums.PARTIAL_RECEIPT.getIndex().toString())) { + if (ObjectUtil.isNotEmpty(currentNode1) && ObjectUtil.equal(currentNode1, ZbomNodeEnums.PARTIAL_RECEIPT.getIndex())) { + log.info("{} 部分签收", platformOrderCode); paramDTO.setNode(ZbomNodeMappingEnums.getZbomByNodeAndStatus(nodeEnums, ZbomConstants.Status.SIGN_FOR_SECTION_STATUS).getCode()); } currentNode = ZbomNodeEnums.getByCode(paramDTO.getNode()); From 867e97e481cea465fa94c72c52d97d4ee0d0a9f6 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo Date: Thu, 11 Apr 2024 11:02:47 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix(service):=20=E4=BF=AE=E6=94=B9=E5=BF=97?= =?UTF-8?q?=E9=82=A6=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java index 7aa75fe8a..211312b0d 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java @@ -268,9 +268,9 @@ public class ZbomNodeDataPushListener { } else { continue; } - Integer currentNode1 = nodeOrderEntity.getCurrentNode(); + String pushNode = nodeOrderEntity.getPushNode(); // 如果之前发送的是部分签收,则之后的所有签收节点都发部分签收 - if (ObjectUtil.isNotEmpty(currentNode1) && ObjectUtil.equal(currentNode1, ZbomNodeEnums.PARTIAL_RECEIPT.getIndex())) { + if (StrUtil.isNotEmpty(pushNode) && pushNode.contains(ZbomNodeEnums.PARTIAL_RECEIPT.getIndex().toString())) { log.info("{} 部分签收", platformOrderCode); paramDTO.setNode(ZbomNodeMappingEnums.getZbomByNodeAndStatus(nodeEnums, ZbomConstants.Status.SIGN_FOR_SECTION_STATUS).getCode()); }