|
|
@@ -351,12 +351,12 @@ public class IotBoardServiceImpl implements IotBoardService {
|
|
|
List<Map<String, String>> mapList = iotBoardMapper.countSensorNums(orgPath);
|
|
|
List<IotBoardTotalData.SensorData> sensorDataList = new ArrayList<>();
|
|
|
for (SensorType sensorType : SensorType.values()) {
|
|
|
- Optional<Map<String, String>> mapOptional = mapList.stream().filter(m -> ObjectUtil.equal(sensorType.getCode().toString(), m.get(DEVICE_TYPE))).findAny();
|
|
|
+ Optional<Map<String, String>> mapOptional = mapList.stream().filter(m -> ObjectUtil.equal(sensorType.getCode().toString(), String.valueOf(m.get(DEVICE_TYPE)))).findAny();
|
|
|
int sensorNum = 0;
|
|
|
if (mapOptional.isPresent()) {
|
|
|
sensorNum = Integer.parseInt(mapOptional.get().get(MAP_VALUE));
|
|
|
}
|
|
|
- Optional<Map<String, String>> alarmNumoptional = alarmCountMap.stream().filter(m -> ObjectUtil.equal(sensorType.getCode().toString(), m.get(DEVICE_TYPE))).findAny();
|
|
|
+ Optional<Map<String, String>> alarmNumoptional = alarmCountMap.stream().filter(m -> ObjectUtil.equal(sensorType.getCode().toString(), String.valueOf(m.get(DEVICE_TYPE)))).findAny();
|
|
|
int alarmNum = 0;
|
|
|
if (alarmNumoptional.isPresent()) {
|
|
|
alarmNum = Integer.parseInt(alarmNumoptional.get().get(MAP_VALUE));
|
|
|
@@ -375,7 +375,7 @@ public class IotBoardServiceImpl implements IotBoardService {
|
|
|
|
|
|
//录像天数存储
|
|
|
List<Map<String, String>> videoCheckMap = iotBoardMapper.selectVideoDaysStorage(orgPath, new Date());
|
|
|
- HashMap<Integer, Integer> hashMap = new HashMap<>();
|
|
|
+ HashMap<Integer, Integer> hashMap = new LinkedHashMap<>();
|
|
|
for (Map<String, String> map : videoCheckMap) {
|
|
|
hashMap.put(Integer.parseInt(map.get("planDays")), Integer.parseInt(map.get(MAP_VALUE)));
|
|
|
}
|