增加箱门告警手动生成功能
This commit is contained in:
@ -180,20 +180,17 @@ public class DeviceDetailServiceImpl implements IDeviceDetailService {
|
||||
if (StringUtils.isNotEmpty(anfangIds)) {
|
||||
Device anfangDevice = iDeviceService.selectDeviceByDeviceId(Long.parseLong(anfangIds));
|
||||
//获取当前安防告警状态
|
||||
|
||||
anfangInfoVo.setDoorStatus(0);
|
||||
CommonResult<HaiWeiDeviceInfoVo> cache = haiWeiService.getCache(anfangDevice.getDeviceId());
|
||||
HaiWeiDeviceInfoVo checkedData = cache.getCheckedData();
|
||||
List<HaiWeiPropertyVo> propertyList = checkedData.getPropertyList();
|
||||
for (HaiWeiPropertyVo haiWeiPropertyVo : propertyList) {
|
||||
if (haiWeiPropertyVo.getNameEn().equals("三菱FX2N_1_open")) {
|
||||
// HashMap<Object, Object> hashMap1 = new HashMap<Object, Object>() {{
|
||||
// put("upType", 0);
|
||||
// put("identifier", "xiangmen");
|
||||
// put("unit", "");
|
||||
// put("value", haiWeiPropertyVo.getValue());
|
||||
// put("name", haiWeiPropertyVo.getNameCn());
|
||||
// }};
|
||||
anfangInfoVo.setDoorStatus(Integer.parseInt(haiWeiPropertyVo.getValue().toString()));
|
||||
if(cache != null){
|
||||
HaiWeiDeviceInfoVo checkedData = cache.getCheckedData();
|
||||
if(checkedData != null){
|
||||
List<HaiWeiPropertyVo> propertyList = checkedData.getPropertyList();
|
||||
for (HaiWeiPropertyVo haiWeiPropertyVo : propertyList) {
|
||||
if (haiWeiPropertyVo.getNameEn().equals("三菱FX2N_1_open")) {
|
||||
anfangInfoVo.setDoorStatus(Integer.parseInt(haiWeiPropertyVo.getValue().toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
UploadedPhotos uploadedPhotos = new UploadedPhotos();
|
||||
@ -214,7 +211,7 @@ public class DeviceDetailServiceImpl implements IDeviceDetailService {
|
||||
if (uploadedPhotos1.size() > 5) {
|
||||
uploadedPhotos1 = uploadedPhotos1.subList(0, 5);
|
||||
}
|
||||
anfangInfoVo.setDoorStatus(doorStatus);
|
||||
// anfangInfoVo.setDoorStatus(doorStatus);
|
||||
anfangInfoVo.setAnfangList(uploadedPhotos1);
|
||||
}
|
||||
//安防设备
|
||||
|
Reference in New Issue
Block a user