From 83951265b64dfa8364c00b8f4050a2deeb222dc0 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Thu, 18 Jul 2024 15:52:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(all):=20=E4=BF=AE=E6=94=B9=E6=9E=97?= =?UTF-8?q?=E6=B0=8F=E8=AE=A2=E5=8D=95=E5=8F=B7=E7=9A=84=E5=8F=96=E5=80=BC?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/factorydata/linsy/entity/PackageInfoEntity.java | 2 ++ .../com/logpm/factorydata/linsy/mq/FactoryOrderListener.java | 1 + .../com/logpm/factorydata/linsy/mq/NodeDataPushListener.java | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/entity/PackageInfoEntity.java b/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/entity/PackageInfoEntity.java index b27f120fa..710150390 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/entity/PackageInfoEntity.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/entity/PackageInfoEntity.java @@ -25,6 +25,8 @@ public class PackageInfoEntity extends BaseEntity { private String deliveryNoteId; @ApiModelProperty(value = "订单号") private String orderCode; + @ApiModelProperty(value = "单据编号") + private String billCode; @ApiModelProperty(value = "已推送节点编码") private Integer workedNodeCode; @ApiModelProperty(value = "父项物料编码") diff --git a/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/mq/FactoryOrderListener.java b/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/mq/FactoryOrderListener.java index 418726e5c..b454b72a1 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/mq/FactoryOrderListener.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/mq/FactoryOrderListener.java @@ -107,6 +107,7 @@ public class FactoryOrderListener { orderInfoEntity.setLogId(ObjectUtil.isNotEmpty(logId) ? logId.toString() : null); orderInfoEntity.setDeliveryNoteId(vo.getId().toString()); orderInfoEntity.setOrderCode(vo.getCustomizedBillCode()); + orderInfoEntity.setBillCode(vo.getBillCode()); infoEntities.add(orderInfoEntity); } packageInfoService.saveBatch(infoEntities); diff --git a/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/mq/NodeDataPushListener.java b/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/mq/NodeDataPushListener.java index b8690f4f0..f095bf6a3 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/mq/NodeDataPushListener.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-linsy/src/main/java/com/logpm/factorydata/linsy/mq/NodeDataPushListener.java @@ -22,7 +22,6 @@ import com.logpm.factorydata.vo.PushData; import com.logpm.factorydata.vo.SendMsg; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.bouncycastle.util.Pack; import org.springblade.common.constant.WorkNodeEnums; import org.springblade.common.constant.factorydata.FactoryDataConstants; import org.springframework.amqp.core.ExchangeTypes; @@ -142,6 +141,8 @@ public class NodeDataPushListener { List collect = value.stream().map(PushData::getPackageCode).collect(Collectors.toList()); // 5 根据订单号,包件码 查看数据是否齐套,齐套直接推送工厂 List entities = packageInfoMap.get(orderCode); + PackageInfoEntity infoEntity = entities.get(0); + String billCode = infoEntity.getBillCode(); // 过滤掉entities 中的 workedNodeCode < code 的数据 List workerList = entities.stream() .filter(packageInfoEntity -> !collect.contains(packageInfoEntity.getBarcode())) @@ -174,7 +175,7 @@ public class NodeDataPushListener { } // 推送工厂 JSONObject sendObj = new JSONObject(); - sendObj.set("billCode", orderCode); + sendObj.set("billCode", billCode); sendObj.set("status", factoryByNodeAndStatus.getText()); sendObj.set("packages", entities.stream().map(packageInfoEntity -> { JSONObject jsonObject = new JSONObject();