Commit 82346463 authored by 高东东's avatar 高东东

修改值显示bug

parent 50cc60f1
......@@ -303,19 +303,19 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
equipmentSpeIndex.setValue(value);
String enumStr = equipmentSpecificIndex.getValueEnum();
if (!ObjectUtils.isEmpty(enumStr)) {
try {
JSONArray jsonArray = JSONArray.parseArray(enumStr);
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
if (jsonObject.get("key").equals(equipmentSpecificIndex.getValue())) {
equipmentSpeIndex.setValueLabel(jsonObject.getString("label"));
}
}
} catch (Exception e) {
}
}
if (!ObjectUtils.isEmpty(enumStr)) {
try {
JSONArray jsonArray = JSONArray.parseArray(enumStr);
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
if (jsonObject.get("key").equals(value)) {
equipmentSpeIndex.setValueLabel(jsonObject.getString("label"));
}
}
} catch (Exception e) {
}
}
equipmentSpecificIndexList.add(equipmentSpeIndex);
......
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