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..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 @@ -257,18 +257,24 @@ 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) { // 全部签收 + log.info("{} 全部签收", platformOrderCode); 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())) { + log.info("{} 部分签收", platformOrderCode); + paramDTO.setNode(ZbomNodeMappingEnums.getZbomByNodeAndStatus(nodeEnums, ZbomConstants.Status.SIGN_FOR_SECTION_STATUS).getCode()); + } + currentNode = ZbomNodeEnums.getByCode(paramDTO.getNode()); } } Integer index = currentNode.getIndex();