From b5bc0b851586c8ac4c74602a173fa5c141ef1353 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Wed, 13 Jan 2021 23:42:11 +0800
Subject: [PATCH] 客户列表接口修改
---
src/main/java/org/springblade/modules/Netty/controller/nettyController.java | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/src/main/java/org/springblade/modules/Netty/controller/nettyController.java b/src/main/java/org/springblade/modules/Netty/controller/nettyController.java
index fa922f8..e9a0ed8 100644
--- a/src/main/java/org/springblade/modules/Netty/controller/nettyController.java
+++ b/src/main/java/org/springblade/modules/Netty/controller/nettyController.java
@@ -159,21 +159,33 @@
int zT = 0;
+ String arr = "";
+
+
//将得到的设备与查询所得设备进行匹配
for (int i = 0; i < childList.size(); i++) {
for (int j = 0; j < pages.size(); j++) {
if (childList.get(i).get("eqid") != null) {
if (childList.get(i).get("eqid").equals(pages.get(j).getDeviceNumber())) {
+ zT = 1;
+ arr += pages.get(j).getId() + ",";
List<String> outData = new ArrayList<>();
outData.add("LC8109085B#@");
Channel channel = channelHashMap.get(pages.get(j).getDeviceNumber());
channel.writeAndFlush(Unpooled.copiedBuffer(outData.get(0), CharsetUtil.UTF_8));
+ break;
}
}
}
}
+
+ if (!arr.equals("")){
+ String substring = arr.substring(0, arr.length() - 1);
+ equipmentService.updataType(substring);
+ }
+
if (zT == 0) {
- return R.success("暂无设备撤");
+ return R.success("暂无设备布防");
}
return R.success("设备布防");
}
@@ -201,11 +213,15 @@
int zT = 0;
+ String arr = "";
+
//将得到的设备与查询所得设备进行匹配
for (int i = 0; i < childList.size(); i++) {
for (int j = 0; j < pages.size(); j++) {
if (childList.get(i).get("eqid") != null) {
if (childList.get(i).get("eqid").equals(pages.get(j).getDeviceNumber())) {
+ zT = 1;
+ arr += pages.get(j).getId() + ",";
List<String> outData = new ArrayList<>();
outData.add("LC8109085C#@");
Channel channel = channelHashMap.get(pages.get(j).getDeviceNumber());
@@ -215,6 +231,11 @@
}
}
+ if (!arr.equals("")){
+ String substring = arr.substring(0, arr.length() - 1);
+ equipmentService.updataTypeC(substring);
+ }
+
if (zT == 0) {
return R.success("暂无设备布防");
}
--
Gitblit v1.9.3