|
|
@ -49,7 +49,7 @@ public class DcWeatherMonitoringServiceImpl implements IDcWeatherMonitoringServi |
|
|
|
List<DcDevice> deviceList = dcDeviceService.listDevice(dcDevice); |
|
|
|
|
|
|
|
//正常路段里程
|
|
|
|
BigDecimal normalMileage = BigDecimal.ZERO; |
|
|
|
BigDecimal normalMileage = new BigDecimal("154.585"); |
|
|
|
//降水里程
|
|
|
|
BigDecimal rainfallMileage = BigDecimal.ZERO; |
|
|
|
//团雾路段(处)
|
|
|
@ -65,9 +65,9 @@ public class DcWeatherMonitoringServiceImpl implements IDcWeatherMonitoringServi |
|
|
|
|
|
|
|
for (DcDevice device : deviceList) { |
|
|
|
if (StringUtils.isNotEmpty(device.getStakeMarkRange())){ |
|
|
|
String[] stakeMarkRange = device.getStakeMarkRange().split(","); |
|
|
|
String[] stakeMarkRange = device.getStakeMarkRange().split("-"); |
|
|
|
BigDecimal detectionRange = StakeMarkUtils.getKilometre(stakeMarkRange[1],stakeMarkRange[0]); |
|
|
|
normalMileage = normalMileage.add(detectionRange).setScale(2, RoundingMode.HALF_UP); |
|
|
|
// normalMileage = normalMileage.add(detectionRange).setScale(2, RoundingMode.HALF_UP);
|
|
|
|
deviceRange.put(device.getIotDeviceId(),detectionRange); |
|
|
|
} else { |
|
|
|
deviceRange.put(device.getIotDeviceId(),BigDecimal.ZERO); |
|
|
|