From 0871b5e33e5025bf635ff783fbe62ef452fb7c09 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Fri, 25 Oct 2024 18:19:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(all):=20=E4=BF=AE=E6=94=B9=E9=87=91?= =?UTF-8?q?=E7=89=8C=E5=9B=9E=E4=BC=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1 修改金牌回传问题 --- .../logpm/factorydata/jinpai/mq/NodeDataPushListener.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mq/NodeDataPushListener.java b/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mq/NodeDataPushListener.java index 181a2b733..536ad3f1e 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/mq/NodeDataPushListener.java +++ b/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 orderDetailEntities = pushOrderDetailService.list(Wrappers.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", "");