|
@ -88,21 +88,21 @@ public class TbHomeController { |
|
|
|
|
|
|
|
|
List<DustMonitorVo> monitorVoList = new ArrayList<>(); |
|
|
List<DustMonitorVo> monitorVoList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
HashMap<String, List<DustMonitorVo>> hashMap = new HashMap<>(); |
|
|
|
|
|
List<TbDustTargetinfo> list = tbDustTargetinfoService.lambdaQuery() |
|
|
List<TbDustTargetinfo> list = tbDustTargetinfoService.lambdaQuery() |
|
|
.eq(TbDustTargetinfo::getEquipId, equipId) |
|
|
.eq(TbDustTargetinfo::getEquipId, equipId) |
|
|
.list(); |
|
|
.list(); |
|
|
Map<Object, Object> dustdata = redisUtil.hmget(KeyUtils.dustdataTag); |
|
|
Map<Object, Object> dustdata = redisUtil.hmget(KeyUtils.dustdataTag); |
|
|
for (TbDustTargetinfo targetinfo : list) { |
|
|
for (TbDustTargetinfo targetinfo : list) { |
|
|
DustMonitorVo dustMonitorVo = new DustMonitorVo(); |
|
|
DustMonitorVo dustMonitorVo = new DustMonitorVo(); |
|
|
RedisDataVo redisDataVo = (RedisDataVo) dustdata.get(targetinfo.getTargetCode()); |
|
|
|
|
|
|
|
|
/* RedisDataVo redisDataVo = (RedisDataVo) dustdata.get(targetinfo.getTargetCode()); |
|
|
if (redisDataVo != null){ |
|
|
if (redisDataVo != null){ |
|
|
dustMonitorVo.setValue(redisDataVo.getValue()); |
|
|
dustMonitorVo.setValue(redisDataVo.getValue()); |
|
|
dustMonitorVo.setAlarmLevel(redisDataVo.getAlarmLevel()); |
|
|
dustMonitorVo.setAlarmLevel(redisDataVo.getAlarmLevel()); |
|
|
dustMonitorVo.setStatus(redisDataVo.getStatus()); |
|
|
dustMonitorVo.setStatus(redisDataVo.getStatus()); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}*/ |
|
|
BeanUtil.copyProperties(targetinfo, dustMonitorVo); |
|
|
BeanUtil.copyProperties(targetinfo, dustMonitorVo); |
|
|
|
|
|
dustMonitorVo.setTargetId(targetinfo.getId()); |
|
|
|
|
|
monitorVoList.add(dustMonitorVo); |
|
|
} |
|
|
} |
|
|
return Result.ok(monitorVoList); |
|
|
return Result.ok(monitorVoList); |
|
|
} |
|
|
} |
|
|