From edbb2fe4eabbb7c526fb2f7313bead37d38928e2 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期一, 15 八月 2022 14:57:16 +0800
Subject: [PATCH] 充电桩上电请求

---
 ximon-admin/src/main/java/com/sandu/ximon/admin/service/VnnoxService.java |   42 ++++++++++++++++++++++++++++++------------
 1 files changed, 30 insertions(+), 12 deletions(-)

diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/VnnoxService.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/VnnoxService.java
index 209edf0..c7e54af 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/VnnoxService.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/VnnoxService.java
@@ -110,7 +110,10 @@
      */
     public Map<String, Object> screenStatusChange(List<LedPlayerEntity> playerList, Integer screenStatus) {
         playerList.forEach(item -> {
-            if (item.getPlayerId().isEmpty() || item.getPlayerName().isEmpty() || item.getPlayerName() == null || item.getPlayerId() == null) {
+            if (item.getName() == null || item.getPlayerId() == null) {
+                throw new BusinessException("playerId鎴杙layerName涓虹┖");
+            }
+            if (item.getPlayerId().isEmpty() || item.getName().isEmpty()) {
                 throw new BusinessException("playerId鎴杙layerName涓虹┖");
             }
         });
@@ -135,12 +138,12 @@
         playerList.forEach(n -> {
             if (finalSuccess.contains(n.getPlayerId())) {
                 NovaPushResultVO vo = new NovaPushResultVO();
-                vo.setName(n.getPlayerName());
+                vo.setName(n.getName());
                 vo.setPlayerId(n.getPlayerId());
                 successList.add(vo);
             } else if (finalFail.contains(n.getPlayerId())) {
                 NovaPushResultVO vo = new NovaPushResultVO();
-                vo.setName(n.getPlayerName());
+                vo.setName(n.getName());
                 vo.setPlayerId(n.getPlayerId());
                 faileList.add(vo);
             }
@@ -158,7 +161,10 @@
 
     public Map<String, Object> volChange(List<LedPlayerEntity> playerList, Integer vol) {
         playerList.forEach(item -> {
-            if (item.getPlayerId().isEmpty() || item.getPlayerName().isEmpty() || item.getPlayerName() == null || item.getPlayerId() == null) {
+            if (item.getName() == null || item.getPlayerId() == null) {
+                throw new BusinessException("playerId鎴杙layerName涓虹┖");
+            }
+            if (item.getPlayerId().isEmpty() || item.getName().isEmpty()) {
                 throw new BusinessException("playerId鎴杙layerName涓虹┖");
             }
         });
@@ -178,12 +184,12 @@
         playerList.forEach(n -> {
             if (finalSuccess.contains(n.getPlayerId())) {
                 NovaPushResultVO vo = new NovaPushResultVO();
-                vo.setName(n.getPlayerName());
+                vo.setName(n.getName());
                 vo.setPlayerId(n.getPlayerId());
                 successList.add(vo);
             } else if (finalFail.contains(n.getPlayerId())) {
                 NovaPushResultVO vo = new NovaPushResultVO();
-                vo.setName(n.getPlayerName());
+                vo.setName(n.getName());
                 vo.setPlayerId(n.getPlayerId());
                 faileList.add(vo);
             }
@@ -196,7 +202,10 @@
 
     public Map<String, Object> brightnessChange(List<LedPlayerEntity> playerList, Integer brightness) {
         playerList.forEach(item -> {
-            if (item.getPlayerId().isEmpty() || item.getPlayerName().isEmpty() || item.getPlayerName() == null || item.getPlayerId() == null) {
+            if (item.getName() == null || item.getPlayerId() == null) {
+                throw new BusinessException("playerId鎴杙layerName涓虹┖");
+            }
+            if (item.getPlayerId().isEmpty() || item.getName().isEmpty()) {
                 throw new BusinessException("playerId鎴杙layerName涓虹┖");
             }
         });
@@ -216,12 +225,12 @@
         playerList.forEach(n -> {
             if (finalSuccess.contains(n.getPlayerId())) {
                 NovaPushResultVO vo = new NovaPushResultVO();
-                vo.setName(n.getPlayerName());
+                vo.setName(n.getName());
                 vo.setPlayerId(n.getPlayerId());
                 successList.add(vo);
             } else if (finalFail.contains(n.getPlayerId())) {
                 NovaPushResultVO vo = new NovaPushResultVO();
-                vo.setName(n.getPlayerName());
+                vo.setName(n.getName());
                 vo.setPlayerId(n.getPlayerId());
                 faileList.add(vo);
             }
@@ -288,7 +297,10 @@
     public Map<String, Object> reboot(List<NovaPushResultVO> nova) {
         List<String> playerIds = new ArrayList<>();
         nova.forEach(item -> {
-            if (item.getPlayerId().isEmpty() || item.getName().isEmpty() || item.getName() == null || item.getPlayerId() == null) {
+            if (item.getName() == null || item.getPlayerId() == null) {
+                throw new BusinessException("playerId鎴杙layerName涓虹┖");
+            }
+            if (item.getPlayerId().isEmpty() || item.getName().isEmpty()) {
                 throw new BusinessException("playerId鎴杙layerName涓虹┖");
             }
             playerIds.add(item.getPlayerId());
@@ -327,7 +339,10 @@
     public Map<String, Object> syncPlay(List<NovaPushResultVO> nova, Integer option) {
         List<String> playerIds = new ArrayList<>();
         nova.forEach(item -> {
-            if (item.getPlayerId().isEmpty() || item.getName().isEmpty() || item.getName() == null || item.getPlayerId() == null) {
+            if (item.getName() == null || item.getPlayerId() == null) {
+                throw new BusinessException("playerId鎴杙layerName涓虹┖");
+            }
+            if (item.getPlayerId().isEmpty() || item.getName().isEmpty()) {
                 throw new BusinessException("playerId鎴杙layerName涓虹┖");
             }
             playerIds.add(item.getPlayerId());
@@ -364,7 +379,10 @@
     public Map<String, Object> ntpSync(List<NovaPushResultVO> nova, boolean enable) {
         List<String> playerIds = new ArrayList<>();
         nova.forEach(item -> {
-            if (item.getPlayerId().isEmpty() || item.getName().isEmpty() || item.getName() == null || item.getPlayerId() == null) {
+            if (item.getName() == null || item.getPlayerId() == null) {
+                throw new BusinessException("playerId鎴杙layerName涓虹┖");
+            }
+            if (item.getPlayerId().isEmpty() || item.getName().isEmpty()) {
                 throw new BusinessException("playerId鎴杙layerName涓虹┖");
             }
             playerIds.add(item.getPlayerId());

--
Gitblit v1.9.3