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); }