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; }