|
|
@@ -238,15 +238,14 @@ public class IotBoardServiceImpl implements IotBoardService {
|
|
|
Map<String, Object> hashMap = new HashMap<>();
|
|
|
long currentAlarm = value.stream().filter(d -> ObjectUtil.isNull(d.getEndTime())).count();
|
|
|
long unDealAlarm = value.stream().filter(d -> ObjectUtil.isNull(d.getDoTime())).count();
|
|
|
- long needAlarm = value.stream().anyMatch(d -> ObjectUtil.isNull(d.getEndTime()) && ObjectUtil.isNull(d.getDoTime())) ? 1 : 0;
|
|
|
+ int needAlarm = value.stream().anyMatch(d -> ObjectUtil.isNull(d.getEndTime()) && ObjectUtil.isNull(d.getDoTime())) ? 1 : 0;
|
|
|
|
|
|
hashMap.put("key", value.get(0).getSourceTypeDes());
|
|
|
hashMap.put("historyAlarm", value.size());
|
|
|
hashMap.put("currentAlarm", (int) currentAlarm);
|
|
|
hashMap.put("unDealAlarm", (int) unDealAlarm);
|
|
|
- hashMap.put("needAlarm", (int) needAlarm);
|
|
|
+ hashMap.put("needAlarm", (needAlarm == 1 && productTypes.contains(value.get(0).getSourceType())) ? 1 : 0);
|
|
|
hashMap.put("currentAlarmData", getAlarmDataList(value, listEntry.getKey().toString(), cacheList));
|
|
|
- hashMap.put("needNotice", productTypes.contains(value.get(0).getSourceType()) ? 1 : 0);
|
|
|
|
|
|
resultList.add(hashMap);
|
|
|
}
|
|
|
@@ -261,7 +260,6 @@ public class IotBoardServiceImpl implements IotBoardService {
|
|
|
hashMap.put("unDealAlarm", 0);
|
|
|
hashMap.put("needAlarm", 0);
|
|
|
hashMap.put("currentAlarmData", Lists.newArrayList());
|
|
|
- hashMap.put("needNotice", 0);
|
|
|
resultList.add(hashMap);
|
|
|
}
|
|
|
}
|
|
|
@@ -311,7 +309,6 @@ public class IotBoardServiceImpl implements IotBoardService {
|
|
|
hashMap.put("unDealAlarm", 0);
|
|
|
hashMap.put("needAlarm", 0);
|
|
|
hashMap.put("currentAlarmData", Lists.newArrayList());
|
|
|
- hashMap.put("needNotice", 0);
|
|
|
resultList.add(hashMap);
|
|
|
}
|
|
|
|