|
|
|
@ -956,6 +956,7 @@ public class RealMonitorServiceImpl implements IRealMonitorService {
|
|
|
|
|
*/ |
|
|
|
|
private void waterLevel(List<WaterLevelVo> list, RealStationVo station) { |
|
|
|
|
station.setWaterLevel(0.0); |
|
|
|
|
station.setWaterColor(0); |
|
|
|
|
if(CollectionUtil.isEmpty(list)){ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -964,6 +965,14 @@ public class RealMonitorServiceImpl implements IRealMonitorService {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
station.setWaterLevel(levelList.get(0)); |
|
|
|
|
if(station.getWaterLevelMax() <= 0 || station.getWaterLevel() <= 0){ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if(station.getWaterLevelMax() < station.getWaterLevel()){ |
|
|
|
|
station.setWaterColor(2); |
|
|
|
|
}else if((station.getWaterLevel() / station.getWaterLevelMax()) > 0.9){ |
|
|
|
|
station.setWaterColor(1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|