From 495fad8166b5952c013aea275243cb9ee6e7fa2a Mon Sep 17 00:00:00 2001 From: cjl <276999030@qq.com> Date: Tue, 10 Oct 2023 13:43:45 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/qa' into qa --- screen-api/src/main/java/com/moral/api/service/impl/DustldServiceImpl.java | 36 ++++++++++++++++-------------------- 1 files changed, 16 insertions(+), 20 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 dd304f4..aeefda9 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 @@ -90,29 +90,25 @@ for (TimeForm timeForm : tables) { String start = timeForm.getStart(); String end = timeForm.getEnd(); - List<Double> dust = historySecondCruiserMapper.getDust(start, end, mac); + List<String> dust = historySecondCruiserMapper.getDust(start, end, mac); ArrayList<Double> rsDouble = new ArrayList<>(); - for (Double aDouble : dust) { - double v =0.0; + for (String s : dust) { + double aDouble = Double.parseDouble(s); + if (aDouble>=0 && aDouble<40 ){ - v = aDouble + 170; + aDouble = aDouble + 170; + }else if (aDouble>=40 && aDouble<60){ + aDouble = aDouble + 130; + }else if (aDouble>=60 && aDouble<100 ){ + aDouble = aDouble + 110; + }else if (aDouble>=100 && aDouble<150){ + aDouble = aDouble + 70; + }else if (aDouble>=150 && aDouble<180){ + aDouble = aDouble + 30; + }else { + aDouble= aDouble+0; } - 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); + rsDouble.add(aDouble); } list.addAll(rsDouble); } -- Gitblit v1.8.0