diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChargeAlgorithmService.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChargeAlgorithmService.java index 2fc616276..7f25d94ed 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChargeAlgorithmService.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChargeAlgorithmService.java @@ -236,9 +236,18 @@ public class ChargeAlgorithmService { detailInfo = new ChargeAlgorithmData.ChargingDetailInfo(); String dateStr = DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:00", DateUtils.parseDate(realTimeData_0x23.getDateTime())); - // 获取0x13数据 + // 获取该时间的0x13数据 + List RealTimeDataList = collect_0x13.get(dateStr); + if (RealTimeDataList != null) { + RealTimeMonitorData realTimeData_0x13 = RealTimeDataList.get(0); + + detailInfo.setGunTemp(realTimeData_0x13.getGunLineTemperature()); + detailInfo.setCurrentSoc(new BigDecimal(realTimeData_0x13.getSOC()).intValue()); + }else { + detailInfo.setGunTemp("0"); + detailInfo.setCurrentSoc(new BigDecimal(realTimeData_0x23.getSoc()).intValue()); + } detailInfo.setReadCurrentCharge(transactionRecordsData.getAmmeterTotalEnd()); - detailInfo.setCurrentSoc(new BigDecimal(realTimeData_0x23.getSoc()).intValue()); detailInfo.setReportTime(realTimeData_0x23.getDateTime().replaceAll("[^0-9]", "")); detailInfo.setMaxAllowElectricity(new BigDecimal(parameterConfigData.getBmsMaxCurrent()).toBigInteger().toString()); detailInfo.setSingleMaxAllowVoltage(new BigDecimal(parameterConfigData.getBmsMaxVoltage()).setScale(1, RoundingMode.HALF_DOWN).toString()); @@ -276,15 +285,7 @@ public class ChargeAlgorithmService { // detailInfo.setVentTemp(); // detailInfo.setEnvironmentTemp(); } - // 获取该时间的0x13数据 - List RealTimeDataList = collect_0x13.get(dateStr); - if (RealTimeDataList != null) { - RealTimeMonitorData realTimeData_0x13 = RealTimeDataList.get(0); - detailInfo.setGunTemp(realTimeData_0x13.getGunLineTemperature()); - }else { - detailInfo.setGunTemp("0"); - } resultList.add(detailInfo); }