diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java index 8f41d10..831dade 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java @@ -344,7 +344,7 @@ public class MonitorServiceImpl implements MonitorService { Thread.currentThread().interrupt(); } pool.shutdown(); - redisTemplate.opsForValue().set(moniter_station_cache_final, JSONObject.toJSONString(stationList)); + redisTemplate.opsForValue().set(moniter_station_cache_final, stationList); } /** diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java index 352d070..1d7072e 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java @@ -467,7 +467,7 @@ public class RealMonitorServiceImpl implements IRealMonitorService { } pool.shutdown(); log.info(thread.getName() + "步骤12所有线程完成 耗时 : {}",System.currentTimeMillis() - beginTime); - redisTemplate.opsForValue().set(moniter_station_key, stationList); + redisTemplate.opsForValue().set(moniter_station_key, JSONObject.toJSONString(stationList)); } /** @@ -851,12 +851,10 @@ public class RealMonitorServiceImpl implements IRealMonitorService { if(ObjectUtil.isEmpty(message) || CollectionUtil.isEmpty(message.getDeptIds())){ return null; } - Object json = redisTemplate.opsForValue().get(moniter_station_key); - if(ObjectUtil.isEmpty(json)){ + List realStationVoList = (List) redisTemplate.opsForValue().get(moniter_station_key); + if(ObjectUtil.isEmpty(realStationVoList)){ return null; } - // 获取所有监控缓存数据 - List realStationVoList = JSONObject.parseObject(json.toString(),new TypeReference>() {}); if(CollectionUtil.isEmpty(realStationVoList)){ return null; }