From 6a870a12a8d29c63aac3e38ab4783481184a9356 Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Sun, 28 Apr 2024 18:39:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A4=E9=80=9A=E6=B0=94=E8=B1=A1=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DcWeatherMonitoringServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcWeatherMonitoringServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcWeatherMonitoringServiceImpl.java index 5b2363b9..230af5cb 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcWeatherMonitoringServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcWeatherMonitoringServiceImpl.java @@ -49,7 +49,7 @@ public class DcWeatherMonitoringServiceImpl implements IDcWeatherMonitoringServi List 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);