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

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

View File

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