|
|
@ -1,5 +1,7 @@ |
|
|
|
package com.hnac.hzims.operational.config.service.impl; |
|
|
|
package com.hnac.hzims.operational.config.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.lang.TypeReference; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
@ -75,10 +77,11 @@ public class CentralMonitorServiceImpl implements CentralMonitorService { |
|
|
|
if (CollectionUtil.isEmpty(codeList)) { |
|
|
|
if (CollectionUtil.isEmpty(codeList)) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
List<RealStationVo> result = (List<RealStationVo>) redisTemplate.opsForValue().get(moniter_station_key); |
|
|
|
Object json = redisTemplate.opsForValue().get(moniter_station_key); |
|
|
|
if (StringUtil.isEmpty(result)) { |
|
|
|
if (StringUtil.isEmpty(json)) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
List<RealStationVo> result = JSONObject.parseObject(json.toString(), new TypeReference<List<RealStationVo>>() {}); |
|
|
|
return result.stream().filter(o -> codeList.contains(o.getStationCode())).collect(Collectors.toList()); |
|
|
|
return result.stream().filter(o -> codeList.contains(o.getStationCode())).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|