Browse Source

feat(all): 金牌工厂订单数据

1 修改金牌回传时,仓库无法匹配时报错问题
visual
zhaoqiaobo 5 months ago
parent
commit
2b5c67f1fd
  1. 18
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mq/NodeDataPushListener.java

18
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mq/NodeDataPushListener.java

@ -154,7 +154,7 @@ public class NodeDataPushListener {
}
} else {
// 2 如果当前包条有仓库 则是仓配数据 按当前仓是否是金牌的末端仓推送, 如果到了运单末端仓,不是金牌的末端仓,则按运单末端仓回推
String text = IDict.getByCode(WarehouseEnums.class, oldFactoeyVO.getWarehouse()).getText();
String text = IDict.getTextByCode(WarehouseEnums.class, oldFactoeyVO.getWarehouse());
if (StrUtil.equals(warehouseName, text)) {
return true;
} else {
@ -195,7 +195,7 @@ public class NodeDataPushListener {
}
JSONObject js = new JSONObject();
js.set("extOrderNo", orderCode);
js.set("extWaybillNO", waybillNumber);
js.set("extWaybillNO", oldFactoeyVO.getCustomOrderNo());
js.set("transportNo", transportNo);
js.set("doTime", entries.getStr("operatorTime"));
js.set("syscode", "huitong");
@ -239,17 +239,17 @@ public class NodeDataPushListener {
});
JSONObject js = new JSONObject();
js.set("extOrderNo", sendOrderCode);
js.set("extWaybillNO", waybillNumber);
js.set("extWaybillNO", oldFactoeyVO.getCustomOrderNo());
js.set("detail", detail);
js.set("shipNo", oldFactoeyVO.getTransportNo());
js.set("shipNo", oldFactoeyVO.getShipNo());
js.set("targetNo", transportNo);
js.set("targetType", 1);
js.set("doType", 32);
js.set("doLocation", "");
js.set("doTime", entries.getStr("operatorTime"));
js.set("sendSite", mainJson.getStr("sendWarehouseName"));
js.set("endSite", mainJson.getStr("warehouseName"));
js.set("passSite", mainJson.getStr("acceptWarehouseName"));
js.set("sendSite", filterDatum.getWaybillStartWarehouse());
js.set("endSite", filterDatum.getWarehouseName());
js.set("passSite", filterDatum.getDestinationWarehouse());
js.set("doRemark", "");
js.set("reqSn", (RandomUtil.randomLong(100000000000000000L, 999999999999999999L)) + "");
js.set("syscode", "huitong");
@ -278,6 +278,7 @@ public class NodeDataPushListener {
} catch (Exception e) {
log.error("推送工厂失败:{}", e);
}
pushOrderSet.add(orderCode + transportNo);
}
ArrayList<Object> objects = new ArrayList<>();
objects.add(filterDatum);
@ -293,7 +294,8 @@ public class NodeDataPushListener {
.exchange(FactoryDataConstants.Mq.Exchanges.NODE_DATA_PUSH_DELAYED)
.routingKey(FactoryDataConstants.Mq.RoutingKeys.JP_NODE_DATA_PUSH)
.message(JSONUtil.toJsonStr(nodePushMsg, HutoolConfigUtil.jsonConfigByDataTimeFormat()))
.delay(3000)
// 3-10秒随机
.delay(1000 * RandomUtil.randomInt(3, 11))
.build());
}
}

Loading…
Cancel
Save