Browse Source

Merge pull request 'fix(all): 增加开关控制志邦数据推送' (#22) from dev into pre-production

Reviewed-on: #22
master
zhaoqiaobo 10 months ago
parent
commit
56e933ff7a
  1. 9
      blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomNodeDataPushListener.java
  2. 1
      blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/pros/ZbFactoryProperties.java

9
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.IFactoryNodePushFailService;
import com.logpm.factorydata.zbom.service.IFactoryNodePushService; import com.logpm.factorydata.zbom.service.IFactoryNodePushService;
import com.logpm.factorydata.zbom.service.IOrderPackageService; 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.NoSignNumberDTO;
import com.logpm.factorydata.zbom.vo.NodeConfirmParamDTO; import com.logpm.factorydata.zbom.vo.NodeConfirmParamDTO;
import com.logpm.factorydata.zbom.vo.NodeDataDTO; import com.logpm.factorydata.zbom.vo.NodeDataDTO;
@ -134,10 +135,14 @@ public class ZbomNodeDataPushListener {
for (NodeConfirmParamDTO nodeConfirmParam : nodeConfirmLsit) { for (NodeConfirmParamDTO nodeConfirmParam : nodeConfirmLsit) {
String key = nodeConfirmParam.getDepartCode() + nodeConfirmParam.getPlatformOrderCode(); String key = nodeConfirmParam.getDepartCode() + nodeConfirmParam.getPlatformOrderCode();
String body = JSONUtil.toJsonStr(nodeConfirmParam); String body = JSONUtil.toJsonStr(nodeConfirmParam);
// String result = ZbomUtil.pushZbomSystem(zbProperties, body, ZbomConstants.Method.ROUTE_NODE_CONFIRM); String result = null;
if (zbProperties.isEnable()) {
result = ZbomUtil.pushZbomSystem(zbProperties, body, ZbomConstants.Method.ROUTE_NODE_CONFIRM);
} else {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.set("code", "0"); jsonObject.set("code", "0");
String result = JSONUtil.toJsonStr(jsonObject); result = JSONUtil.toJsonStr(jsonObject);
}
log.info("zb节点推送数据:参数{},返回值{}。", body, result); log.info("zb节点推送数据:参数{},返回值{}。", body, result);
if (StrUtil.isNotBlank(result)) { if (StrUtil.isNotBlank(result)) {
ZbFactoryNodePushFailEntity build = ZbFactoryNodePushFailEntity.builder().content(body).resultContent(result).build(); ZbFactoryNodePushFailEntity build = ZbFactoryNodePushFailEntity.builder().content(body).resultContent(result).build();

1
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 customerid;
private String secretkey; private String secretkey;
private String url; private String url;
private boolean enable = true;
} }

Loading…
Cancel
Save