|
@@ -26,6 +26,7 @@ import com.zcxk.rmcp.core.dao.DeviceAlarmMapper;
|
|
|
import com.zcxk.rmcp.core.dao.DeviceAlarmRuleMapper;
|
|
|
import com.zcxk.rmcp.core.dao.DeviceMapper;
|
|
|
|
|
|
+import com.zcxk.rmcp.core.entity.AlarmType;
|
|
|
import com.zcxk.rmcp.core.entity.Device;
|
|
|
import com.zcxk.rmcp.core.entity.DeviceAlarm;
|
|
|
|
|
@@ -91,11 +92,13 @@ public class DeviceAlarmServiceImpl implements DeviceAlarmService {
|
|
|
List<DeviceAlarm> deviceAlarmList = new ArrayList<>();
|
|
|
|
|
|
// 1,查找产品对应的告警类型,
|
|
|
- AlarmTypePageDto alarmTypeDto = new AlarmTypePageDto();
|
|
|
- alarmTypeDto.setTenantId(device.getTenantId());
|
|
|
- alarmTypeDto.setProductCategroyId(device.getCategoryId());
|
|
|
- alarmTypeDto.setDeviceTypeId(device.getProductId());
|
|
|
- List<AlarmTypeDto> alarmTypeList = alarmTypeMapper.selectList(alarmTypeDto);
|
|
|
+ AlarmType alarmTypeCondition = new AlarmType();
|
|
|
+ alarmTypeCondition.setTenantId(device.getTenantId());
|
|
|
+ alarmTypeCondition.setProductCategroyId(device.getCategoryId());
|
|
|
+ alarmTypeCondition.setDeviceTypeId(device.getProductId());
|
|
|
+ alarmTypeCondition.setAlarmStatus(1);
|
|
|
+
|
|
|
+ List<AlarmTypeDto> alarmTypeList = alarmTypeMapper.findList(alarmTypeCondition);
|
|
|
for (AlarmTypeDto alarmType : alarmTypeList) {
|
|
|
|
|
|
// 2,获取规则对应的测点以及表达式进行报警判断
|