From a1f98403986462ee6d33c8af2051ea90d7fa7d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Mon, 30 Sep 2024 14:50:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=98=E5=8E=9F=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DcDeviceController.java | 100 +++++++++--------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java b/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java index 66ca53e1..0e76ad10 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java @@ -124,56 +124,56 @@ public class DcDeviceController extends BaseController { @PostMapping("pileNumberQuery") public AjaxResult devicePileNumberQueryDevice(@RequestBody Map parameter) throws HttpException, IOException, InterruptedException { List dcDevices = dcDeviceService.devicePileNumberQueryDevice(parameter); - String deviceType = String.valueOf(parameter.get("deviceType")); - if (deviceType.equals("15")){ - AjaxResult ajaxResult = ConfluenceAreaEarlyWarningDeviceBatteryLowWarning(); - Object data = ajaxResult.get("data"); - if (data instanceof List) { - List> dataList = (List>) data; - for (Map entry : dataList) { - String functionId = (String) entry.get("functionId"); - String device = (String) entry.get("device"); - System.out.println("device:"+device); - System.out.println("functionId:"+functionId); - Object result = entry.get("result"); - if (result instanceof Map) { - Map resultMap = (Map) result; - Integer resultCode = (Integer) resultMap.get("code"); - if (resultCode==200){ - Object innerData = resultMap.get("data"); - if (innerData instanceof List) { - List> innerDataList = (List>) innerData; - for (Map innerEntry : innerDataList) { - Integer innerCode = (Integer) innerEntry.get("code"); - System.out.println("Inner Code: " + innerCode); - if (innerCode==200){ - for (DcDevice dcDevice : dcDevices) { - if (String.valueOf(dcDevice.getId()).equals(device)){ - dcDevice.setDeviceState("1"); - } - } - }else { - for (DcDevice dcDevice : dcDevices) { - if (String.valueOf(dcDevice.getId()).equals(device)){ - dcDevice.setDeviceState("0"); - } - } - } - } - } - }else { - for (DcDevice dcDevice : dcDevices) { - if (String.valueOf(dcDevice.getId()).equals(device)){ - dcDevice.setDeviceState("0"); - } - } - } - - } - } - } - - } +// String deviceType = String.valueOf(parameter.get("deviceType")); +// if (deviceType.equals("15")){ +// AjaxResult ajaxResult = ConfluenceAreaEarlyWarningDeviceBatteryLowWarning(); +// Object data = ajaxResult.get("data"); +// if (data instanceof List) { +// List> dataList = (List>) data; +// for (Map entry : dataList) { +// String functionId = (String) entry.get("functionId"); +// String device = (String) entry.get("device"); +// System.out.println("device:"+device); +// System.out.println("functionId:"+functionId); +// Object result = entry.get("result"); +// if (result instanceof Map) { +// Map resultMap = (Map) result; +// Integer resultCode = (Integer) resultMap.get("code"); +// if (resultCode==200){ +// Object innerData = resultMap.get("data"); +// if (innerData instanceof List) { +// List> innerDataList = (List>) innerData; +// for (Map innerEntry : innerDataList) { +// Integer innerCode = (Integer) innerEntry.get("code"); +// System.out.println("Inner Code: " + innerCode); +// if (innerCode==200){ +// for (DcDevice dcDevice : dcDevices) { +// if (String.valueOf(dcDevice.getId()).equals(device)){ +// dcDevice.setDeviceState("1"); +// } +// } +// }else { +// for (DcDevice dcDevice : dcDevices) { +// if (String.valueOf(dcDevice.getId()).equals(device)){ +// dcDevice.setDeviceState("0"); +// } +// } +// } +// } +// } +// }else { +// for (DcDevice dcDevice : dcDevices) { +// if (String.valueOf(dcDevice.getId()).equals(device)){ +// dcDevice.setDeviceState("0"); +// } +// } +// } +// +// } +// } +// } +// +// } return AjaxResult.success(dcDevices); }