From 06dca3a4e9a0bff8a1a39200b57ef9049652cb39 Mon Sep 17 00:00:00 2001 From: Guoqs <123@jsowell.com> Date: Mon, 20 Jan 2025 14:02:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E4=B8=8D=E7=94=A8=E6=8F=92=E6=9E=AA?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UploadRealTimeMonitorHandler.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/jsowell-netty/src/main/java/com/jsowell/netty/handler/yunkuaichong/UploadRealTimeMonitorHandler.java b/jsowell-netty/src/main/java/com/jsowell/netty/handler/yunkuaichong/UploadRealTimeMonitorHandler.java index 1e041cd9c..534491896 100644 --- a/jsowell-netty/src/main/java/com/jsowell/netty/handler/yunkuaichong/UploadRealTimeMonitorHandler.java +++ b/jsowell-netty/src/main/java/com/jsowell/netty/handler/yunkuaichong/UploadRealTimeMonitorHandler.java @@ -252,23 +252,23 @@ public class UploadRealTimeMonitorHandler extends AbstractYkcHandler { ); } - // 插枪状态 - String plugRedisKey = CacheConstants.CHARGER_PLUGGED_IN_STATUS + pileConnectorCode; - if (StringUtils.equals("01", isChargerPluggedIn)) { - // 插枪状态 - if (redisCache.setnx(plugRedisKey, pileConnectorCode, CacheConstants.cache_expire_time_30d)) { - // log.info("时间:{}, 枪口号:{}, 首次插入充电枪", DateUtils.getDateTime(), pileConnectorCode); - // 设置成功说明 第一次插枪 - // pileBasicInfoService.firstPlugInCharger(pileConnectorCode); - } - } else { - // 未插枪状态 - if (redisCache.hasKey(plugRedisKey) && redisCache.deleteObject(plugRedisKey)) { - // log.info("时间:{}, 枪口号:{}, 首次拔出充电枪", DateUtils.getDateTime(), pileConnectorCode); - // redis有值,并且删除成功,说明首次拔枪 - // pileBasicInfoService.firstUnplugCharger(pileConnectorCode); - } - } + // 插枪状态 2025年1月20日14点01分暂不用此逻辑 + // String plugRedisKey = CacheConstants.CHARGER_PLUGGED_IN_STATUS + pileConnectorCode; + // if (StringUtils.equals("01", isChargerPluggedIn)) { + // // 插枪状态 + // if (redisCache.setnx(plugRedisKey, pileConnectorCode, CacheConstants.cache_expire_time_30d)) { + // // log.info("时间:{}, 枪口号:{}, 首次插入充电枪", DateUtils.getDateTime(), pileConnectorCode); + // // 设置成功说明 第一次插枪 + // // pileBasicInfoService.firstPlugInCharger(pileConnectorCode); + // } + // } else { + // // 未插枪状态 + // if (redisCache.hasKey(plugRedisKey) && redisCache.deleteObject(plugRedisKey)) { + // // log.info("时间:{}, 枪口号:{}, 首次拔出充电枪", DateUtils.getDateTime(), pileConnectorCode); + // // redis有值,并且删除成功,说明首次拔枪 + // // pileBasicInfoService.firstUnplugCharger(pileConnectorCode); + // } + // } // 公共方法修改状态 pileBasicInfoService.updateStatus(BytesUtil.bcd2Str(ykcDataProtocol.getFrameType()), pileSn, connectorCode, connectorStatus, isChargerPluggedIn);