|
@@ -168,9 +168,16 @@ public class MonitorInfoController {
|
|
|
parm.setDeviceId(item.getDeviceId());
|
|
|
parm.setAttributeId(item.getAttributeId());
|
|
|
parm.setType(type);
|
|
|
- if (type == 4||type == 3) {
|
|
|
+ if (type == 4 || type == 3) {
|
|
|
//更新压力值或状态值
|
|
|
- item.setAttributeValue(monitorDataReportService.getDeviceAttributeValue(item.getDeviceCode(),item.getAttributeId()).setScale(3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ item.setAttributeValue(monitorDataReportService.getDeviceAttributeValue(item.getDeviceCode(), item.getAttributeId()).setScale(3, BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ }
|
|
|
+ //查询报警信息
|
|
|
+ List<AlarmDetailsDto> alarmDetailsDtos = alarmDetailsService.selectByDeviceAttributeId(sceneId, item.getDeviceId().intValue(), item.getAttributeId().intValue());
|
|
|
+ if (alarmDetailsDtos.size() > 0) {
|
|
|
+ item.setIsAlarm(1);
|
|
|
+ } else {
|
|
|
+ item.setIsAlarm(0);
|
|
|
}
|
|
|
DeviceSetupRecordEntity recordEntity = deviceSetupRecordService.selectLastOne(parm);
|
|
|
if (recordEntity != null) {
|