From d495f9b8cdc83663e4189bc3cc72ac9543ff5555 Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期二, 25 十月 2022 18:18:06 +0800
Subject: [PATCH] changes

---
 ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java
index b207274..7e4519c 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/PoleService.java
@@ -471,7 +471,7 @@
                 DeviceOnLineCountVO air = new DeviceOnLineCountVO();
                 airEquipments.forEach(
                         device -> {
-                            String s = redisUtils.get(DeviceRedisKey.AIR + device.getAirMac());
+                            String s = redisUtils.get(DeviceRedisKey.AIR + device.getMac());
                             if (s != null) {
                                 RedisDeviceStatus redisDeviceStatus = JSON.parseObject(s, RedisDeviceStatus.class);
                                 if (redisDeviceStatus.getStatus() == 0) {
@@ -745,7 +745,6 @@
 //        }
 //        return list;
 //    }
-
     public List<Pole> isTrue(List<Pole> list, PoleStatesParam param) {
         //瀹炰綋鐏潌
         List<Pole> isTrue = new ArrayList<>();
@@ -882,7 +881,7 @@
         }
         String deviceName = byId.getDeviceCode();
         if (deviceName.isEmpty()) {
-            throw new BusinessException("璇ョ伅鏉哅ca涓虹┖");
+            throw new BusinessException("璇ョ伅鏉哅ac涓虹┖");
         }
         IRequestFrame build = FrameBuilder.builderA5().orderType(A5OrderEnum.REQUEST_LIGHT_DATA.getCode()).innerFrame(new A5LightResetReqInnerFrame()).build();
         CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(deviceName, build);
@@ -1303,17 +1302,17 @@
         Long poleId = param.getPoleId();
         Pole pole = getById(poleId);
         PoleBinding air = poleBindingService.getOne(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getPoleId, poleId).eq(PoleBinding::getDeviceType, 3));
-        PoleBinding nova = poleBindingService.getOne(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getPoleId, poleId).eq(PoleBinding::getDeviceType, 1));
-        LedPlayerEntity LED = SpringContextHolder.getBean(LedPlayerEntityService.class).getOne(Wrappers.lambdaQuery(LedPlayerEntity.class).eq(LedPlayerEntity::getSn, nova.getDeviceCode()));
-        if (pole == null) {
-            throw new BusinessException("鐏潌涓嶅瓨鍦�");
-        }
         if (air == null) {
             throw new BusinessException("鏈粦瀹氬ぇ姘旂洃娴嬭澶�");
         }
+        PoleBinding nova = poleBindingService.getOne(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getPoleId, poleId).eq(PoleBinding::getDeviceType, 1));
         if (nova == null) {
             throw new BusinessException("鏈粦瀹歯ova璁惧");
         }
+        LedPlayerEntity LED = SpringContextHolder.getBean(LedPlayerEntityService.class).getOne(Wrappers.lambdaQuery(LedPlayerEntity.class).eq(LedPlayerEntity::getSn, nova.getDeviceCode()));
+        if (pole == null) {
+            throw new BusinessException("鐏潌涓嶅瓨鍦�");
+        }
         //鑾峰彇澶ф皵鐩戞祴鏁版嵁
         A5AtmosphereHeartbeatReportInnerFrame.HeartBeatDataPackage data = SpringContextHolder.getBean(AirDataService.class).getDataByPoleid(poleId);
         //鎺ㄩ�佹暟鎹�

--
Gitblit v1.9.3