diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/NotificationService.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/NotificationService.java index 262f531f6..2c97c5e80 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/NotificationService.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/NotificationService.java @@ -131,10 +131,12 @@ public class NotificationService { logger.error("平台类型:{}, 平台名称:{}, 站点id:{}, 订单编号:{}, 设备充电中状态变化推送error:{}", secretInfoVO.getPlatformType(), secretInfoVO.getPlatformName(), stationId, orderCode, e.getMessage()); } - try { - platformService.notificationEquipChargeStatus(orderCode); - }catch (Exception e){ - logger.error("notification_equip_charge_status error", e); + finally { + try { + platformService.notificationEquipChargeStatus(orderCode); + }catch (Exception e){ + logger.error("notification_equip_charge_status error", e); + } } } } 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 1e6567158..59fe2f367 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 @@ -24,10 +24,7 @@ import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -149,6 +146,10 @@ public class ChargeAlgorithmService { List chargingDetailInfos = transformData(transactionCode, chargerOutputInfoList, parameterConfigData, transactionRecordsData); + chargingDetailInfos.stream() + .filter(info -> info.getCurrentSoc() > 100) // 只处理 currentSoc > 100 的元素 + .forEach(info -> info.setCurrentSoc(100)); + Collections.reverse(chargingDetailInfos); data.setChargingDetailInfo(chargingDetailInfos);