Commit fad9a2b4 authored by KeYong's avatar KeYong

修改绍兴现场反馈查询iot数据横坐标排序及指标数据出不来问题

parent b5bb31e4
......@@ -2370,8 +2370,15 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
Map<String, String> timeAndValue = new HashMap<>();
for (Map<String, String> mapList : sortedList) {
if (mapList.containsKey(indexKey)) {
timeAndValue.put(mapList.get("time"), mapList.get(indexKey));
allTimeList.add(mapList.get("time"));
boolean isNum = StringUtil.isNumeric(mapList.get(indexKey));
if (isNum) {
try {
timeAndValue.put(change(mapList.get("time")), mapList.get(indexKey));
allTimeList.add(change(mapList.get("time")));
} catch (ParseException e) {
throw new RuntimeException(e);
}
}
}
}
dateValueMapInfo.put(equipInfo.getId(), timeAndValue);
......@@ -2398,14 +2405,11 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
values.add(lastValue);
try {
allTimeListNew.add(change(allTimeList.get(i)));
} catch (ParseException e) {
throw new RuntimeException(e);
}
allTimeListNew.add(allTimeList.get(i));
}
yaxisList.add(values);
Collections.sort(allTimeListNew);
equipTrendResultVo.setxAxisData(allTimeListNew);
}
equipTrendResultVo.setyAxisData(yaxisList);
......@@ -2584,7 +2588,10 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
for (String key : equipIndexKeyNew) {
if (mapList.containsKey(key) && !ObjectUtils.isEmpty(mapList.get(key))) {
if (stringIntegerHashMapIn.containsKey(dateX)) {
stringIntegerHashMapIn.get(dateX).add(new BigDecimal(mapList.get(key)));
boolean isNum = StringUtil.isNumeric(mapList.get(key));
if (isNum) {
stringIntegerHashMapIn.get(dateX).add(new BigDecimal(mapList.get(key)));
}
} else {
List<BigDecimal> bigDecimals = new ArrayList<>();
if (!ObjectUtils.isEmpty(mapList.get(key))) {
......
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