|
|
@ -542,17 +542,18 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
if(CollectionUtil.isEmpty(modelList)){ |
|
|
|
if(CollectionUtil.isEmpty(modelList)){ |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
List<WaterLevelVo> list = new ArrayList<>(); |
|
|
|
List<WaterLevelVo> list = new CopyOnWriteArrayList<>(); |
|
|
|
modelList.forEach(item -> { |
|
|
|
CountDownLatch countDownLatch = new CountDownLatch(modelList.size()); |
|
|
|
|
|
|
|
for(HzimsAnalyzeModelStationEntity item : modelList){ |
|
|
|
|
|
|
|
pool.submit(() -> { |
|
|
|
|
|
|
|
try{ |
|
|
|
List<MultiAnalyzeCodePO> multiAnalyzeCodePOList=new ArrayList<>(); |
|
|
|
List<MultiAnalyzeCodePO> multiAnalyzeCodePOList=new ArrayList<>(); |
|
|
|
MultiAnalyzeCodePO multiAnalyzeCodePO=new MultiAnalyzeCodePO(); |
|
|
|
MultiAnalyzeCodePO multiAnalyzeCodePO=new MultiAnalyzeCodePO(); |
|
|
|
multiAnalyzeCodePO.setDeviceCode(item.getInstanceCode()); |
|
|
|
multiAnalyzeCodePO.setDeviceCode(item.getInstanceCode()); |
|
|
|
multiAnalyzeCodePO.setSignages(Collections.singletonList(HomePageConstant.FRONT_WATER_LEVEL)); |
|
|
|
multiAnalyzeCodePO.setSignages(Collections.singletonList(HomePageConstant.FRONT_WATER_LEVEL)); |
|
|
|
multiAnalyzeCodePOList.add(multiAnalyzeCodePO); |
|
|
|
multiAnalyzeCodePOList.add(multiAnalyzeCodePO); |
|
|
|
R<List<AnalyzeCodeBySignagesVO>>result=analyseDataSearchClient.getAnalyzeCodeBySignages(multiAnalyzeCodePOList); |
|
|
|
R<List<AnalyzeCodeBySignagesVO>>result=analyseDataSearchClient.getAnalyzeCodeBySignages(multiAnalyzeCodePOList); |
|
|
|
if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){ |
|
|
|
if(result.isSuccess() && CollectionUtil.isNotEmpty(result.getData())){ |
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
WaterLevelVo waterLevelVo=new WaterLevelVo(); |
|
|
|
WaterLevelVo waterLevelVo=new WaterLevelVo(); |
|
|
|
waterLevelVo.setStationCode(item.getStationId()); |
|
|
|
waterLevelVo.setStationCode(item.getStationId()); |
|
|
|
// 前水位
|
|
|
|
// 前水位
|
|
|
@ -571,7 +572,20 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
Map<Integer, String> rearCurveMap=this.getWaterLevelMap(item.getInstanceCode(),HomePageConstant.REAR_WATER_LEVEL); |
|
|
|
Map<Integer, String> rearCurveMap=this.getWaterLevelMap(item.getInstanceCode(),HomePageConstant.REAR_WATER_LEVEL); |
|
|
|
waterLevelVo.setRearCurveMap(rearCurveMap); |
|
|
|
waterLevelVo.setRearCurveMap(rearCurveMap); |
|
|
|
list.add(waterLevelVo); |
|
|
|
list.add(waterLevelVo); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
countDownLatch.countDown(); |
|
|
|
|
|
|
|
}catch (Exception exception){ |
|
|
|
|
|
|
|
log.error("load_water_level_error : {}",exception.getMessage()); |
|
|
|
|
|
|
|
countDownLatch.countDown(); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
countDownLatch.await(); |
|
|
|
|
|
|
|
} catch (InterruptedException e) { |
|
|
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
|
|
Thread.currentThread().interrupt(); |
|
|
|
|
|
|
|
} |
|
|
|
redisTemplate.opsForValue().set(loadwater_level_key,list); |
|
|
|
redisTemplate.opsForValue().set(loadwater_level_key,list); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|