puzhibing
2026-07-30 df04b62bab37455bd549f670cd47b25f7728e889
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyDetailServiceImpl.java
@@ -1,7 +1,6 @@
package com.ruoyi.chargingPile.service.impl;
import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.feignClient.AppUserVipDetailClient;
@@ -203,16 +202,22 @@
    @Override
    public Boolean isStrategyPriceConsistent(List<TAccountingStrategyDetail> accountingStrategyDetails) {
        Map<Integer, BigDecimal> phaseToElectrovalence = new HashMap<>();
        Map<Integer, BigDecimal> phaseToServiceFee = new HashMap<>();
        Map<Integer, BigDecimal> phaseToCostServiceFee = new HashMap<>();
        for (TAccountingStrategyDetail detail : accountingStrategyDetails) {
            Integer type = detail.getType();
            BigDecimal electrovalence = detail.getElectrovalence();
            BigDecimal serviceFee = detail.getServiceCharge();
            BigDecimal costServiceCharge = detail.getCostServiceCharge();
            if (phaseToServiceFee.containsKey(type)) {
                BigDecimal existingElectrovalence = phaseToElectrovalence.get(type);
                BigDecimal existingFee = phaseToServiceFee.get(type);
                BigDecimal existingCostServiceCharge = phaseToCostServiceFee.get(type);
                if (existingElectrovalence.compareTo(electrovalence) != 0) {
                    return false; // 发现不一致的电价
                }
                if (existingFee.compareTo(serviceFee) != 0) {
                    return false; // 发现不一致的服务费
                }
@@ -220,11 +225,12 @@
                    return false; // 发现不一致的原价服务费
                }
            } else {
                phaseToElectrovalence.put(type, electrovalence);
                phaseToServiceFee.put(type, serviceFee);
                phaseToCostServiceFee.put(type, costServiceCharge);
            }
        }
        return true; // 所有相同阶段的服务费一致
        return true; // 所有相同阶段的电价、服务费均一致
    }
    @Override