From 903d3c3954b73c3518aaa1528a95a24a4896e058 Mon Sep 17 00:00:00 2001 From: cjl <276999030@qq.com> Date: Fri, 18 Aug 2023 15:09:43 +0800 Subject: [PATCH] fix:实测补偿修复 --- screen-api/src/main/java/com/moral/api/service/impl/DustldServiceImpl.java | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/screen-api/src/main/java/com/moral/api/service/impl/DustldServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/DustldServiceImpl.java index ebdc974..ecff651 100644 --- a/screen-api/src/main/java/com/moral/api/service/impl/DustldServiceImpl.java +++ b/screen-api/src/main/java/com/moral/api/service/impl/DustldServiceImpl.java @@ -80,7 +80,30 @@ String start = timeForm.getStart(); String end = timeForm.getEnd(); List<Double> dust = historySecondCruiserMapper.getDust(start, end, mac); - list.addAll(dust); + ArrayList<Double> rsDouble = new ArrayList<>(); + for (Double aDouble : dust) { + double v =0.0; + if (aDouble>=0 && aDouble<40 ){ + v = aDouble + 170; + } + if (aDouble>=40 && aDouble<60 ){ + v = aDouble + 130; + } + if (aDouble>=60 && aDouble<100 ){ + v = aDouble + 110; + } + if (aDouble>=100 && aDouble<150 ){ + v = aDouble + 70; + } + if (aDouble>=150 && aDouble<180 ){ + v = aDouble + 30; + } + if (aDouble>=180){ + v= aDouble; + } + rsDouble.add(v); + } + list.addAll(rsDouble); } } String format = ""; -- Gitblit v1.8.0