missing fees
This commit is contained in:
parent
930996ad2a
commit
e2ffbefd33
@ -135,7 +135,7 @@ public class QueryStationsInfoController {
|
||||
//运营商id
|
||||
String operatorIdEvcs = xhpcChargingStation.getOperatorIdEvcs();
|
||||
chargingStationDto.setOperatorId(operatorIdEvcs == null ? "MA6DFCTD5"
|
||||
: operatorIdEvcs.length() == 9 ? operatorId : operatorIdEvcs.substring(9, 19));
|
||||
: operatorIdEvcs.length() == 9 ? operatorId : operatorIdEvcs.substring(9, 18));
|
||||
//详细地址
|
||||
chargingStationDto.setAddress(xhpcChargingStation.getAddress());
|
||||
//充电站省直辖区编码
|
||||
@ -162,8 +162,10 @@ public class QueryStationsInfoController {
|
||||
stationInfo.setStationLat(chargingStationDto.getLat());
|
||||
stationInfo.setConstruction(chargingStationDto.getConstruction());
|
||||
String[] fees = getFees(chargingStationDto.getRateModelId());
|
||||
stationInfo.setElectricityFee(fees[0]);
|
||||
stationInfo.setServiceFee(fees[1]);
|
||||
if (fees != null) {
|
||||
stationInfo.setElectricityFee(fees[0]);
|
||||
stationInfo.setServiceFee(fees[1]);
|
||||
}
|
||||
//获取该充电站的下的所有充电设备列表
|
||||
Set<String> piles = chargingStationDto.getPiles();
|
||||
List<EquipmentInfo> equipmentInfos = getEquipmentInfos(piles);
|
||||
@ -182,6 +184,10 @@ public class QueryStationsInfoController {
|
||||
private String[] getFees(Long rateModelId) {
|
||||
|
||||
CacheRateModel cacheRateModel = REDIS.getCacheObject("rateModel:".concat(rateModelId.toString()));
|
||||
if (cacheRateModel == null) {
|
||||
log.error("rate model missing: {}", rateModelId);
|
||||
return null;
|
||||
}
|
||||
if (cacheRateModel.getPp() != null) {
|
||||
return cacheRateModel.getPp();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user