From be8effb68cc97b6fa1752c030092f647a9f14a64 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo Date: Wed, 10 Apr 2024 12:35:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(all):=20=E5=A2=9E=E5=8A=A0=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E6=8E=A7=E5=88=B6=E5=BF=97=E9=82=A6=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zbom/mq/ZbomNodeDataPushListener.java | 13 +++++++++---- .../factorydata/zbom/pros/ZbFactoryProperties.java | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java index 01d36c6b0..29bd7ba88 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java @@ -25,6 +25,7 @@ import com.logpm.factorydata.zbom.service.IFactoryNodeOrderService; import com.logpm.factorydata.zbom.service.IFactoryNodePushFailService; import com.logpm.factorydata.zbom.service.IFactoryNodePushService; import com.logpm.factorydata.zbom.service.IOrderPackageService; +import com.logpm.factorydata.zbom.util.ZbomUtil; import com.logpm.factorydata.zbom.vo.NoSignNumberDTO; import com.logpm.factorydata.zbom.vo.NodeConfirmParamDTO; import com.logpm.factorydata.zbom.vo.NodeDataDTO; @@ -134,10 +135,14 @@ public class ZbomNodeDataPushListener { for (NodeConfirmParamDTO nodeConfirmParam : nodeConfirmLsit) { String key = nodeConfirmParam.getDepartCode() + nodeConfirmParam.getPlatformOrderCode(); String body = JSONUtil.toJsonStr(nodeConfirmParam); -// String result = ZbomUtil.pushZbomSystem(zbProperties, body, ZbomConstants.Method.ROUTE_NODE_CONFIRM); - JSONObject jsonObject = new JSONObject(); - jsonObject.set("code", "0"); - String result = JSONUtil.toJsonStr(jsonObject); + String result = null; + if (zbProperties.isEnable()) { + result = ZbomUtil.pushZbomSystem(zbProperties, body, ZbomConstants.Method.ROUTE_NODE_CONFIRM); + } else { + JSONObject jsonObject = new JSONObject(); + jsonObject.set("code", "0"); + result = JSONUtil.toJsonStr(jsonObject); + } log.info("zb节点推送数据:参数{},返回值{}。", body, result); if (StrUtil.isNotBlank(result)) { ZbFactoryNodePushFailEntity build = ZbFactoryNodePushFailEntity.builder().content(body).resultContent(result).build(); diff --git a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/pros/ZbFactoryProperties.java b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/pros/ZbFactoryProperties.java index 1486f7aed..f9a7f21b3 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/pros/ZbFactoryProperties.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/pros/ZbFactoryProperties.java @@ -19,5 +19,6 @@ public class ZbFactoryProperties { private String customerid; private String secretkey; private String url; + private boolean enable = true; }