diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java index dcad0f5a..032cd781 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java @@ -327,7 +327,15 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi XhpcRateDto xhpcRateDto = xhpcRateList.get(k); XhpcRate xhpcRate =new XhpcRate(); xhpcRate.setChargingStationId(chargingStationId); - xhpcRate.setName(xhpcRateDto.getName()); + if("00".equals(xhpcRateDto.getId())){ + xhpcRate.setName("尖费率"); + }else if ("01".equals(xhpcRateDto.getId())){ + xhpcRate.setName("峰费率"); + }else if ("02".equals(xhpcRateDto.getId())){ + xhpcRate.setName("平费率"); + }else{ + xhpcRate.setName("谷费率"); + } xhpcRate.setPowerFee(xhpcRateDto.getPowerFee()); xhpcRate.setServiceFee(xhpcRateDto.getServiceFee()); xhpcRate.setRateModelId(rateModelId); diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml index e5944e3a..b96f9be6 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml @@ -694,7 +694,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" power_fee as powerFee, service_fee as serviceFee, name as name, - rate_value as rateValue + rate_value as id from xhpc_rate where charging_station_id=#{chargingStationId} and del_flag =0 GROUP BY rate_value @@ -706,7 +706,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" rt.start_time as startTime, replace(rt.end_time,'00:00:00','24:00:00') AS endTime, rt.rate_id as rateId, - rt.rate_value as rateValue, + rt.rate_value as id, ra.name as rateName from xhpc_rate_time as rt left join xhpc_rate as ra on ra.rate_id =rt.rate_id @@ -717,7 +717,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" rt.start_time as startTime, replace(rt.end_time,'00:00:00','24:00:00') AS endTime, rt.rate_id as rateId, - rt.rate_value as rateValue, + rt.rate_value as id, ra.name as rateName from xhpc_rate_time as rt left join xhpc_rate as ra on ra.rate_id =rt.rate_id