Browse Source

交通气象检测接口

develop
lau572 7 months ago
parent
commit
6a870a12a8
  1. 6
      zc-business/src/main/java/com/zc/business/service/impl/DcWeatherMonitoringServiceImpl.java

6
zc-business/src/main/java/com/zc/business/service/impl/DcWeatherMonitoringServiceImpl.java

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

Loading…
Cancel
Save