Commit d46dc7d4 authored by KeYong's avatar KeYong

修改绍兴站偶发物联编码丢失问题

parent 38b09d63
......@@ -788,6 +788,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
return;
}
String iotCode = equipmentSpecific.getIotCode();
topicEntity.setIotCode(iotCode);
StringBuilder endIndex = new StringBuilder(iotCode).insert(8, '/');
String iotTopic = "influxdb/" + endIndex;
JSONObject msg = new JSONObject();
......@@ -2535,6 +2536,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
prefix = iotCode.substring(0, 8);
suffix = iotCode.substring(8);
} else {
log.error("错误的物联编码是:", topicEntity.getIotCode());
throw new BadRequest("装备物联编码错误,请确认!");
}
switch (valueEnum) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment