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 c6c3434e5..b882634c6 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 @@ -140,9 +140,9 @@ public class NodeDataPushListener { return; } // 订单 warehouse 不为空为干线,否则为仓配,推送干线的同时回推仓配 - Map orderCodeMap = orderDetailEntities.stream().collect(Collectors.toMap(PushOrderDetailEntity::getOrderId, PushOrderDetailEntity::getCustomItemNo)); + // Map orderCodeMap = orderDetailEntities.stream().collect(Collectors.toMap(PushOrderDetailEntity::getOrderId, PushOrderDetailEntity::getCustomItemNo)); Map detailEntityMap = orderDetailEntities.stream().collect(Collectors.toMap(PushOrderDetailEntity::getCustomItemNo, v -> v)); - List orderIds = orderDetailEntities.stream().map(PushOrderDetailEntity::getOrderId).collect(Collectors.toList()); + // List orderIds = orderDetailEntities.stream().map(PushOrderDetailEntity::getOrderId).collect(Collectors.toList()); // Map pushOrderEntityMap = new HashMap<>(); // if (CollUtil.isNotEmpty(orderIds)) { // List pushOrderEntities = pushOrderService.listByIds(orderIds); @@ -166,8 +166,8 @@ public class NodeDataPushListener { } JSONObject mainJson = JSONUtil.parseObj(main); // 到站 一个订单只发送一次 - for (String orderCode : orderCodes) { - if (pushEntityMap.containsKey(orderCode)) { + // for (String orderCode : orderCodes) { + if (pushEntityMap.containsKey(sendOrderCode)) { continue; } String arriveFor = "carrier"; @@ -175,7 +175,7 @@ public class NodeDataPushListener { if (ObjectUtil.isNotEmpty(pushOrderEntity) && StrUtil.isNotEmpty(pushOrderEntity.getWarehouse())) { arriveFor = "stock"; } - PushOrderDetailEntity pushOrderDetailEntity = detailEntityMap.get(orderCode); + PushOrderDetailEntity pushOrderDetailEntity = detailEntityMap.get(sendOrderCode); String boxCodeList = pushOrderDetailEntity.getBoxCodeList(); JSONArray boxCodeListJson = JSONUtil.parseArray(boxCodeList); // JSONArray details = new JSONArray(); @@ -185,9 +185,9 @@ public class NodeDataPushListener { detail.set(item.toString(), 1); // details.add(jsonObject); }); - if (!CollUtil.contains(pushEntityMap.keySet(), orderCode)) { + if (!CollUtil.contains(pushEntityMap.keySet(), sendOrderCode)) { JSONObject js = new JSONObject(); - js.set("extOrderNo", orderCode); + js.set("extOrderNo", sendOrderCode); js.set("extWaybillNO", mainJson.getStr("serviceNumber")); js.set("detail", detail); // js.set("shipNo", mainJson.getStr("waybillNumber")); @@ -218,7 +218,7 @@ public class NodeDataPushListener { log.info("推送工厂结果:{}", result); // 保存推送记录 factoryNodePushService.save(FactoryNodePushEntity.builder() - .orderCode(orderCode) + .orderCode(sendOrderCode) .node(FactoryNodeEnums.FINAL_NET_ARRIVE_CAR.getCode().toString()) .content(JSONUtil.toJsonStr(js)) .resultContent(result) @@ -228,7 +228,7 @@ public class NodeDataPushListener { log.error("推送工厂失败:{}", e); } } - } + // } } else { // 入库一个包件一次 Map pushEntityMap = new HashMap<>();