diff --git a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/domain/BeaconDevice.java b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/domain/BeaconDevice.java index 6cb3b95..d29770f 100644 --- a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/domain/BeaconDevice.java +++ b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/domain/BeaconDevice.java @@ -23,6 +23,16 @@ public class BeaconDevice { private String deviceStatus; + private String ifAlarm; + + public String getIfAlarm() { + return ifAlarm; + } + + public void setIfAlarm(String ifAlarm) { + this.ifAlarm = ifAlarm; + } + public String getDeviceStatus() { return deviceStatus; } diff --git a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/service/impl/HwDeviceServiceImpl.java b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/service/impl/HwDeviceServiceImpl.java index 2feee14..d920323 100644 --- a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/service/impl/HwDeviceServiceImpl.java +++ b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/service/impl/HwDeviceServiceImpl.java @@ -1180,6 +1180,17 @@ public class HwDeviceServiceImpl implements IHwDeviceService { beaconDevice.setDeviceLocation(hwDevices.get(i).getDeviceLocation()); beaconDevice.setDeviceLocation("白银市"); beaconDevice.setDeviceModeId(hwDevices.get(i).getDeviceModeId()); + //查询是否报警 + Long integer = hwDeviceMapper.selectDeviceIfAlarm(hwDevices.get(i).getDeviceId()); + String ifAlarm = new String(); + if (integer>0){ + //正常 + ifAlarm="1"; + } + else { + ifAlarm="0"; + } + beaconDevice.setIfAlarm(ifAlarm); lists.add(beaconDevice); } } @@ -1187,7 +1198,6 @@ public class HwDeviceServiceImpl implements IHwDeviceService { } } -// System.out.println(lists); return lists; } return null; @@ -1263,6 +1273,9 @@ public class HwDeviceServiceImpl implements IHwDeviceService { List> list = new ArrayList>(); Long total = 0l; for (int i = 0; i < str.length; i++) { + + + map.put("deviceId",str[i]); if (i== str.length-2){ map.replace("pageSize",pageSize%str.length); @@ -1276,6 +1289,7 @@ public class HwDeviceServiceImpl implements IHwDeviceService { List> list1 = this.selectBeaconDevicesHistory(map); total = total+Long.valueOf(list1.get(list1.size()-1).get("total").toString()); list1.remove(list1.size()-1); + List> list2 = new ArrayList>(); //在弹出框中进行对比时,对历史数据进行过滤,根据传入的传感器类型