Browse Source

feat(all): 修改金牌回传问题

1 修改金牌回传问题
visual
zhaoqiaobo 5 months ago
parent
commit
0871b5e33e
  1. 7
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mq/NodeDataPushListener.java

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

@ -6,6 +6,7 @@ import cn.hutool.core.lang.UUID;
import cn.hutool.core.util.EnumUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONArray;
@ -104,11 +105,14 @@ public class NodeDataPushListener {
List<PushOrderDetailEntity> orderDetailEntities = pushOrderDetailService.list(Wrappers.<PushOrderDetailEntity>lambdaQuery()
.in(PushOrderDetailEntity::getCustomItemNo, sendOrderCode)
);
Boolean flag = Boolean.FALSE;
if (CollUtil.isEmpty(orderDetailEntities)) {
// 去老系统查
if (StrUtil.isNotEmpty(jinPaiProperties.getOldSystemHost()) && StrUtil.isNotEmpty(jinPaiProperties.getFindOldDataUrl())) {
try {
log.info("去老系统查询:{}", sendOrderCode);
String result = HttpUtil.get(jinPaiProperties.getOldSystemHost() + jinPaiProperties.getFindOldDataUrl() + "?orderCode=" + sendOrderCode);
log.info("老系统查询结果:{}", result);
if (StrUtil.isNotEmpty(result)) {
JSONObject jsonObject = JSONUtil.parseObj(result);
Integer code = jsonObject.getInt("code");
@ -116,6 +120,7 @@ public class NodeDataPushListener {
JSONArray data = jsonObject.getJSONArray("data");
if (CollUtil.isNotEmpty(data)) {
orderDetailEntities = data.toList(PushOrderDetailEntity.class);
flag = Boolean.TRUE;
}
}
}
@ -189,7 +194,7 @@ public class NodeDataPushListener {
js.set("endSite", mainJson.getStr("warehouseName"));
js.set("passSite", mainJson.getStr("acceptWarehouseName"));
js.set("doRemark", "");
js.set("reqSn", pushOrderEntity.getId());
js.set("reqSn", (RandomUtil.randomLong(19, 19) - RandomUtil.randomLong(19) + RandomUtil.randomLong(19)) + "");
js.set("syscode", "huitong");
js.set("carNo", mainJson.getStr("carNumber"));
js.set("carHangNo", "");

Loading…
Cancel
Save