From fff17863066252145e89436f68728c24c6c405ca Mon Sep 17 00:00:00 2001 From: ZZ Date: Wed, 16 Mar 2022 15:43:05 +0800 Subject: [PATCH] =?UTF-8?q?0C=E5=8D=8F=E8=AE=AE=E6=9B=B4=E6=96=B0,?= =?UTF-8?q?=E4=B8=8B=E5=8F=91=E8=B4=B9=E7=8E=87=E5=93=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pp/logic/RateModelConfigReplyDataLogic.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RateModelConfigReplyDataLogic.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RateModelConfigReplyDataLogic.java index 6b70a67b..bd7fbaec 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RateModelConfigReplyDataLogic.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RateModelConfigReplyDataLogic.java @@ -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 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 = "充电桩收到计费模型应答";