金瑞铭需求修改

breach-zhy
zhouhy 5 months ago
parent 9a3cd8860b
commit e5c3c4e176

@ -23,6 +23,16 @@ public class BeaconDevice {
private String deviceStatus; private String deviceStatus;
private String ifAlarm;
public String getIfAlarm() {
return ifAlarm;
}
public void setIfAlarm(String ifAlarm) {
this.ifAlarm = ifAlarm;
}
public String getDeviceStatus() { public String getDeviceStatus() {
return deviceStatus; return deviceStatus;
} }

@ -1180,6 +1180,17 @@ public class HwDeviceServiceImpl implements IHwDeviceService {
beaconDevice.setDeviceLocation(hwDevices.get(i).getDeviceLocation()); beaconDevice.setDeviceLocation(hwDevices.get(i).getDeviceLocation());
beaconDevice.setDeviceLocation("白银市"); beaconDevice.setDeviceLocation("白银市");
beaconDevice.setDeviceModeId(hwDevices.get(i).getDeviceModeId()); 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); lists.add(beaconDevice);
} }
} }
@ -1187,7 +1198,6 @@ public class HwDeviceServiceImpl implements IHwDeviceService {
} }
} }
// System.out.println(lists);
return lists; return lists;
} }
return null; return null;
@ -1263,6 +1273,9 @@ public class HwDeviceServiceImpl implements IHwDeviceService {
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
Long total = 0l; Long total = 0l;
for (int i = 0; i < str.length; i++) { for (int i = 0; i < str.length; i++) {
map.put("deviceId",str[i]); map.put("deviceId",str[i]);
if (i== str.length-2){ if (i== str.length-2){
map.replace("pageSize",pageSize%str.length); map.replace("pageSize",pageSize%str.length);
@ -1276,6 +1289,7 @@ public class HwDeviceServiceImpl implements IHwDeviceService {
List<Map<String, Object>> list1 = this.selectBeaconDevicesHistory(map); List<Map<String, Object>> list1 = this.selectBeaconDevicesHistory(map);
total = total+Long.valueOf(list1.get(list1.size()-1).get("total").toString()); total = total+Long.valueOf(list1.get(list1.size()-1).get("total").toString());
list1.remove(list1.size()-1); list1.remove(list1.size()-1);
List<Map<String, Object>> list2 = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> list2 = new ArrayList<Map<String, Object>>();
//在弹出框中进行对比时,对历史数据进行过滤,根据传入的传感器类型 //在弹出框中进行对比时,对历史数据进行过滤,根据传入的传感器类型

Loading…
Cancel
Save