From 727a69f859060093e685582fa10e5de82dcc138a Mon Sep 17 00:00:00 2001
From: Van333 <van666666@foxmail.com>
Date: 星期四, 29 十二月 2022 15:37:49 +0800
Subject: [PATCH] 放假备份。完成集中控制器对接。
---
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java
index 9bd92c3..60a29fa 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/controller/PoleController.java
@@ -14,7 +14,6 @@
import com.sandu.ximon.admin.dto.DeviceStatusDto;
import com.sandu.ximon.admin.param.*;
import com.sandu.ximon.admin.security.PermissionConfig;
-import com.sandu.ximon.admin.security.SecurityUtils;
import com.sandu.ximon.admin.service.AirEquipmentService;
import com.sandu.ximon.admin.service.IpVolumeService;
import com.sandu.ximon.admin.service.MonitorService;
@@ -63,12 +62,12 @@
return ResponseUtil.success(poleService.updatePole(poleId, param));
}
- @PostMapping("/delete/{poleId}")
- public ResponseVO<Object> deletePole(@PathVariable Long poleId) {
+ @PostMapping("/delete")
+ public ResponseVO<Object> deletePole(@RequestBody List<Long> poleIds) {
if (!permissionConfig.check(MenuEnum.POLE_DELETE.getCode())) {
return ResponseUtil.fail("缂哄皯瀵瑰簲鐢ㄦ埛鏉冮檺");
}
- return ResponseUtil.success(poleService.deletePole(poleId));
+ return ResponseUtil.success(poleService.deletePole(poleIds));
}
@PostMapping("/listDetail")
@@ -172,9 +171,11 @@
}
boolean result = poleService.bindPole(poleId, param);
if (result) {
- //璁惧绫诲瀷锛�0璺伅锛�1nove锛�2鍏呯數妗╋紝3澶ф皵鐩戞祴锛�4姘磋川鐩戞祴锛�5ip闊虫煴锛�6lcd骞垮憡鏈猴紝7鎽勫儚澶达紝8鏉嗕綋鍊炬祴锛�9涓�閿晳鍔�, 10鐔欒, 11鍐滆��
+ //璁惧绫诲瀷锛�0璺伅锛�1nove锛�2鍏呯數妗╋紝3澶ф皵鐩戞祴锛�4姘磋川鐩戞祴锛�5ip闊虫煴锛�6lcd骞垮憡鏈猴紝7鎽勫儚澶达紝8鏉嗕綋鍊炬祴锛�
+ // 9涓�閿晳鍔�, 10鐔欒, 11鍐滆��,12鏈湴璇虹摝锛�13PLC
switch (param.getDeviceType().toString()) {
case PoleBindingEnums.LIGHT:
+ case PoleBindingEnums.PLC:
Pole pole = poleService.getById(poleId);
if (pole != null) {
pole.setPoleName(param.getDeviceName());
@@ -224,7 +225,7 @@
if (!permissionConfig.check(MenuEnum.UNBIND.getCode())) {
return ResponseUtil.fail("缂哄皯瀵瑰簲鐢ㄦ埛鏉冮檺");
}
- boolean result = poleService.unBindPole(poleId, param.getDeviceCode());
+ boolean result = poleService.unBindPole(poleId, param.getDeviceCode(), param.getDeviceType());
if (result) {
//璁惧绫诲瀷锛�0璺伅锛�1led灞忓箷锛�2鍏呯數妗╋紝3澶ф皵鐩戞祴锛�4姘磋川鐩戞祴锛�5ip闊虫煴锛�6lcd骞垮憡鏈猴紝7鎽勫儚澶达紝8鏉嗕綋鍊炬祴锛�9涓�閿晳鍔�, 10鐔欒, 11鍐滆��
switch (param.getDeviceType().toString()) {
@@ -398,7 +399,7 @@
throw new BusinessException("鎾斁鏃堕棿闇�澶т簬闆朵笖灏忎簬86400000 !");
}
VnnoxResult vnnoxResult = poleService.pushAirDataToNova(param);
- if (vnnoxResult.getSuccess().size() != 0) {
+ if (vnnoxResult != null && vnnoxResult.getSuccess() != null && !vnnoxResult.getSuccess().isEmpty()) {
return ResponseUtil.success("鎺ㄩ�佹垚鍔�");
} else {
return ResponseUtil.fail("鎺ㄩ�佸け璐�");
--
Gitblit v1.9.3