|
|
|
@ -75,8 +75,10 @@ public class NodeDataPushListener {
|
|
|
|
|
log.info("接收到节点数据推送:{}", msg); |
|
|
|
|
// 1 校验数据
|
|
|
|
|
if (checkData(msg)) { |
|
|
|
|
log.info("数据校验不通过"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
JSONObject entries = JSONUtil.parseObj(msg); |
|
|
|
|
// 节点
|
|
|
|
|
String node = entries.getStr("node"); |
|
|
|
@ -335,12 +337,17 @@ public class NodeDataPushListener {
|
|
|
|
|
entity.setOperationCode(operationCode); |
|
|
|
|
entity.setSendUrl(mengTianProperties.getHost() + url); |
|
|
|
|
String resBody = ""; |
|
|
|
|
String resultCode = ""; |
|
|
|
|
try { |
|
|
|
|
if(mengTianProperties.getEnable()){ |
|
|
|
|
HttpResponse execute = post.execute(); |
|
|
|
|
resBody = execute.body(); |
|
|
|
|
log.info("推送工厂结果:{}", resBody); |
|
|
|
|
JSONObject entries = JSONUtil.parseObj(resBody); |
|
|
|
|
String resultCode = entries.getStr("Result"); |
|
|
|
|
resultCode = entries.getStr("Result"); |
|
|
|
|
} else { |
|
|
|
|
resBody = "总线推送开关未开启"; |
|
|
|
|
} |
|
|
|
|
log.info("推送工厂结果:{}", resBody); |
|
|
|
|
entity.setResultContent(resBody); |
|
|
|
|
entity.setSendStatus(StrUtil.isEmpty(resultCode) ? "-1" : resultCode); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|