|
|
@@ -5,6 +5,8 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.zksy.base.alarm.domain.WarningThreshold;
|
|
|
+import com.zksy.base.alarm.service.WarningThresholdService;
|
|
|
import com.zksy.base.domain.EquipmentBase;
|
|
|
import com.zksy.base.domain.EquipmentStatus;
|
|
|
import com.zksy.base.domain.EquipmentType;
|
|
|
@@ -23,6 +25,7 @@ import com.zksy.manhole.dto.in.ManholeDevicePageInDTO;
|
|
|
import com.zksy.manhole.dto.out.EquipmentBaseOutDTO;
|
|
|
import com.zksy.manhole.dto.out.EquipmentStatusOutDTO;
|
|
|
import com.zksy.manhole.dto.out.ManholeDataOutDTO;
|
|
|
+import com.zksy.manhole.dto.out.WarningThresholdOutDTO;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -53,6 +56,9 @@ public class ManholeDeviceController extends BaseController
|
|
|
@Autowired
|
|
|
private ManholeDataService manholeDataService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private WarningThresholdService warningThresholdService;
|
|
|
+
|
|
|
/**
|
|
|
* 分页查询监测设备台账列表
|
|
|
*/
|
|
|
@@ -110,6 +116,14 @@ public class ManholeDeviceController extends BaseController
|
|
|
ManholeDataOutDTO manholeDataOutDTO = BeanUtil.copyProperties(manholeData, ManholeDataOutDTO.class);
|
|
|
outDTO.setManholeData(manholeDataOutDTO);
|
|
|
}
|
|
|
+ // 查询设备预警阈值
|
|
|
+ List<WarningThreshold> warningThresholdList = warningThresholdService.list(new LambdaQueryWrapper<WarningThreshold>()
|
|
|
+ .eq(WarningThreshold::getDeviceCode, outDTO.getEquipmentCode())
|
|
|
+ .orderByDesc(WarningThreshold::getCreateTime));
|
|
|
+ if(CollUtil.isNotEmpty(warningThresholdList)){
|
|
|
+ List<WarningThresholdOutDTO> warningThresholdOutDTOList = BeanUtil.copyToList(warningThresholdList, WarningThresholdOutDTO.class);
|
|
|
+ outDTO.setWarningThresholdList(warningThresholdOutDTOList);
|
|
|
+ }
|
|
|
return AjaxResult2.success(outDTO);
|
|
|
}
|
|
|
|