From 7cc052b7992ff4c1cf7c83bd6bdaf0b2922e0937 Mon Sep 17 00:00:00 2001 From: Lemon Date: Wed, 2 Apr 2025 13:39:25 +0800 Subject: [PATCH] =?UTF-8?q?update=20=200x13=E7=94=B5=E6=B5=81=E3=80=81?= =?UTF-8?q?=E5=85=85=E7=94=B5=E5=BA=A6=E6=95=B0=E9=83=BD=E4=B8=BA0?= =?UTF-8?q?=E4=B8=8D=E4=BF=9D=E5=AD=98=E5=88=B0redis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsowell/pile/service/impl/PileBasicInfoServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java index 94296f1b2..6df36df1d 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java @@ -633,8 +633,9 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService { BigDecimal outputVoltage = new BigDecimal(realTimeMonitorData.getOutputVoltage()); BigDecimal outputCurrent = new BigDecimal(realTimeMonitorData.getOutputCurrent()); - if (outputCurrent.compareTo(BigDecimal.ZERO) == 0) { - // 电流等于0,不保存到redis + String chargingDegree = realTimeMonitorData.getChargingDegree(); // 充电度数 + if (outputCurrent.compareTo(BigDecimal.ZERO) == 0 && StringUtils.equals(Constants.ZERO, chargingDegree)) { + // 电流等于0, 并且充电度数也为0时,不保存到redis return; }