0C协议更新,下发费率响应

This commit is contained in:
ZZ 2022-03-16 15:43:05 +08:00
parent 52d84b8579
commit fff1786306

View File

@ -39,13 +39,21 @@ public class RateModelConfigReplyDataLogic implements ServiceLogic {
String result = FAIL;
if (HEX_01.equals(configResult)) {
// 确定设置成功的rateModelId 可能涉及协议修改
final String pkey = "pile:".concat(pileRateModelConfigReplyData.getPileNo());
Map<String, Object> cachePile = REDIS.getCacheMap(pkey);
ChargingStationDto cacheStation = REDIS.getCacheObject("station:".concat(cachePile.get("stationId").toString()));
cachePile.put("rateModelId", cacheStation.getRateModelId());
String version = (String) cachePile.get("version");
if (!"0A".equals(version) && !"0B".equals(version)) {
Long stationRateModelId = cacheStation.getRateModelId();
if (stationRateModelId.equals(pileRateModelConfigReplyData.getRateModelId())) {
cachePile.put("rateModelId", cacheStation.getRateModelId());
result = OK;
}
} else {
cachePile.put("rateModelId", cacheStation.getRateModelId());
result = OK;
}
REDIS.setCacheMap(pkey, cachePile);
result = OK;
}
String remark = "充电桩收到计费模型应答";