Browse Source

Merge branch 'dev' into pre-production

master
zhaoqiaobo 8 months ago
parent
commit
944f900183
  1. 2
      blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomFactoryOrderListener.java
  2. 9
      blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java
  3. 14
      blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/pros/ZbFactoryProperties.java

2
blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomFactoryOrderListener.java

@ -188,7 +188,7 @@ public class ZbomFactoryOrderListener {
packageInfoService.saveBatch(packageInfoEntities); packageInfoService.saveBatch(packageInfoEntities);
} }
// 处理暂存单 // 处理暂存单
if(zbFactoryProperties.isAdvance()){ if(zbFactoryProperties.getIsAdvance()){
receiptService.buildAdvance(zbReceiptDTO, packageCode); receiptService.buildAdvance(zbReceiptDTO, packageCode);
} }
} }

9
blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java

@ -139,7 +139,7 @@ public class ZbomNodeDataPushListener {
String key = nodeConfirmParam.getDepartCode() + nodeConfirmParam.getPlatformOrderCode(); String key = nodeConfirmParam.getDepartCode() + nodeConfirmParam.getPlatformOrderCode();
String body = JSONUtil.toJsonStr(nodeConfirmParam); String body = JSONUtil.toJsonStr(nodeConfirmParam);
String result = null; String result = null;
if (zbProperties.isEnable()) { if (zbProperties.getEnable()) {
result = ZbomUtil.pushZbomSystem(zbProperties, body, ZbomConstants.Method.ROUTE_NODE_CONFIRM); result = ZbomUtil.pushZbomSystem(zbProperties, body, ZbomConstants.Method.ROUTE_NODE_CONFIRM);
} else { } else {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
@ -214,6 +214,7 @@ public class ZbomNodeDataPushListener {
Map<String, Integer> noSignNumberMap, Map<String, ZbFactoryNodeOrderEntity> nodeOrderMap, Map<String, Integer> noSignNumberMap, Map<String, ZbFactoryNodeOrderEntity> nodeOrderMap,
List<NodeConfirmParamDTO> nodeConfirmLsit, Map<String, SendMsg> sendMsgMap) { List<NodeConfirmParamDTO> nodeConfirmLsit, Map<String, SendMsg> sendMsgMap) {
if (CollUtil.isNotEmpty(orders)) { if (CollUtil.isNotEmpty(orders)) {
Integer nodeDelay = zbProperties.getDelayedTime() * 60 * 1000;
for (NodeDataDTO nodeData : orders) { for (NodeDataDTO nodeData : orders) {
ZbomNodeEnums zbNode = ZbomNodeMappingEnums.getZbomByNodeAndStatus(workNodeEnums); ZbomNodeEnums zbNode = ZbomNodeMappingEnums.getZbomByNodeAndStatus(workNodeEnums);
String departCode = nodeData.getDepartCode(); String departCode = nodeData.getDepartCode();
@ -242,7 +243,6 @@ public class ZbomNodeDataPushListener {
if (ObjectUtil.isNotEmpty(nodeOrderEntity.getPushNode()) && !StrUtil.contains(nodeOrderEntity.getPushNode(), ZbomNodeEnums.DELIVERY_ARRIVAL.getIndex().toString())) { if (ObjectUtil.isNotEmpty(nodeOrderEntity.getPushNode()) && !StrUtil.contains(nodeOrderEntity.getPushNode(), ZbomNodeEnums.DELIVERY_ARRIVAL.getIndex().toString())) {
// 第一次签收,节点改为送货抵达 // 第一次签收,节点改为送货抵达
currentNode = ZbomNodeEnums.DELIVERY_ARRIVAL; currentNode = ZbomNodeEnums.DELIVERY_ARRIVAL;
Integer nodeDelay = 30 * 60 * 1000;
buildSendMag(sendMsgMap, nodeData, key, paramDTO, node, nodeDelay); buildSendMag(sendMsgMap, nodeData, key, paramDTO, node, nodeDelay);
} else { } else {
// 查询当前未签收的数量与当前签收数量比较,如果未签收数较大,则是部分签收 // 查询当前未签收的数量与当前签收数量比较,如果未签收数较大,则是部分签收
@ -267,20 +267,19 @@ public class ZbomNodeDataPushListener {
} }
} }
Integer index = currentNode.getIndex(); Integer index = currentNode.getIndex();
Integer startNodeDelay = 15 * 60 * 1000;
// 历史必须节点需要补发 // 历史必须节点需要补发
if (ObjectUtil.isEmpty(nodeOrderEntity.getPushNode())) { if (ObjectUtil.isEmpty(nodeOrderEntity.getPushNode())) {
// 历史不存在,当前节点不是第一个节点,则需要补发第一个节点 // 历史不存在,当前节点不是第一个节点,则需要补发第一个节点
if (!ObjectUtil.equal(index, ZbomNodeEnums.STATION_DEPART.getIndex())) { if (!ObjectUtil.equal(index, ZbomNodeEnums.STATION_DEPART.getIndex())) {
currentNode = ZbomNodeEnums.STATION_DEPART; currentNode = ZbomNodeEnums.STATION_DEPART;
buildSendMag(sendMsgMap, nodeData, key, paramDTO, node, startNodeDelay); buildSendMag(sendMsgMap, nodeData, key, paramDTO, node, nodeDelay);
} }
} else { } else {
// 历史节点存在,但是历史节点中不包含第一个节点,且当前节点不是第一个节点,则需要补发第一个节点 // 历史节点存在,但是历史节点中不包含第一个节点,且当前节点不是第一个节点,则需要补发第一个节点
if (!ObjectUtil.equal(index, ZbomNodeEnums.STATION_DEPART.getIndex()) if (!ObjectUtil.equal(index, ZbomNodeEnums.STATION_DEPART.getIndex())
&& !StrUtil.contains(nodeOrderEntity.getPushNode(), ZbomNodeEnums.STATION_DEPART.getIndex().toString())) { && !StrUtil.contains(nodeOrderEntity.getPushNode(), ZbomNodeEnums.STATION_DEPART.getIndex().toString())) {
currentNode = ZbomNodeEnums.STATION_DEPART; currentNode = ZbomNodeEnums.STATION_DEPART;
buildSendMag(sendMsgMap, nodeData, key, paramDTO, node, startNodeDelay); buildSendMag(sendMsgMap, nodeData, key, paramDTO, node, nodeDelay);
} }
} }
// 组装历史节点数据 // 组装历史节点数据

14
blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/pros/ZbFactoryProperties.java

@ -19,7 +19,17 @@ public class ZbFactoryProperties {
private String customerid; private String customerid;
private String secretkey; private String secretkey;
private String url; private String url;
private boolean isAdvance = false; /**
private boolean enable = true; * 签收延迟推送时间分钟
*/
private Integer delayedTime = 30;
/**
* 是否推送暂存单到新系统
*/
private Boolean isAdvance = false;
/**
* 是否推送数据到志邦
*/
private Boolean enable = true;
} }

Loading…
Cancel
Save