室外环境预警信息最新20条api
This commit is contained in:
parent
d9ec7b0860
commit
0b7fc42131
|
|
@ -111,6 +111,11 @@ public interface DataCenterMapper {
|
||||||
*/
|
*/
|
||||||
List<DevAttributeVo> getPitDevAttributeWarnRecord(@Param("proId") Integer proId);
|
List<DevAttributeVo> getPitDevAttributeWarnRecord(@Param("proId") Integer proId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询室外环境报警记录 -- 最新20条
|
||||||
|
*/
|
||||||
|
List<DevAttributeVo> getPowerDevAttributeRecordByWarn(@Param("proId") Integer proId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新设备采集数据值
|
* 更新设备采集数据值
|
||||||
* @param devId
|
* @param devId
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,15 @@ public class ProjectDetailsViewController extends BaseController {
|
||||||
return projectDetailsViewService.getDevAttributeRecordByDevId(devId);
|
return projectDetailsViewService.getDevAttributeRecordByDevId(devId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询室外感知设备预警数据 -- 预警数据(最新20条)
|
||||||
|
* @param proId 工程id
|
||||||
|
*/
|
||||||
|
@GetMapping("/getPowerDevAttributeRecordByWarn")
|
||||||
|
public AjaxResult getPowerDevAttributeRecordByWarn(Integer proId) {
|
||||||
|
return projectDetailsViewService.getPowerDevAttributeRecordByWarn(proId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询有限空间监测设备历史数据 / 每监测项各10条数据
|
* 查询有限空间监测设备历史数据 / 每监测项各10条数据
|
||||||
* @param devId 设备id
|
* @param devId 设备id
|
||||||
|
|
@ -77,8 +86,8 @@ public class ProjectDetailsViewController extends BaseController {
|
||||||
* 查询组塔监测设备 -- 预警数据(最新10条)
|
* 查询组塔监测设备 -- 预警数据(最新10条)
|
||||||
* @param proId 工程id
|
* @param proId 工程id
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getPowerDevAttributeRecordByWarn")
|
@GetMapping("/getTowerDevAttributeRecordByWarn")
|
||||||
public AjaxResult getPowerDevAttributeRecordByWarn(Integer proId) {
|
public AjaxResult getTowerDevAttributeRecordByWarn(Integer proId) {
|
||||||
return projectDetailsViewService.getTowerDevAttributeWarnRecord(proId);
|
return projectDetailsViewService.getTowerDevAttributeWarnRecord(proId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,4 +69,8 @@ public class ProjectDetailsViewServiceImpl {
|
||||||
return AjaxResult.success(records);
|
return AjaxResult.success(records);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AjaxResult getPowerDevAttributeRecordByWarn(Integer proId) {
|
||||||
|
return AjaxResult.success(dataCenterMapper.getPowerDevAttributeRecordByWarn(proId));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -195,4 +195,20 @@
|
||||||
tddr.create_time DESC
|
tddr.create_time DESC
|
||||||
limit 10
|
limit 10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getPowerDevAttributeRecordByWarn" resultType="com.bonus.data.entity.DevAttributeVo">
|
||||||
|
SELECT
|
||||||
|
tddr.dev_id,tddr.dev_name,tddr.dev_type,tddr.attribute_name as jcName,tddr.attribute_val as jcValue,
|
||||||
|
tddr.is_warn,tddr.create_time as jcTime
|
||||||
|
FROM
|
||||||
|
tb_dev_data_record AS tddr
|
||||||
|
LEFT JOIN tb_device device ON device.id = tddr.dev_id
|
||||||
|
LEFT JOIN tb_bd_device_record tbdr ON tbdr.id = device.bd_id
|
||||||
|
WHERE
|
||||||
|
tddr.is_warn = '1'
|
||||||
|
AND tbdr.pro_id = #{proId} AND tddr.dev_type = 'environmental'
|
||||||
|
ORDER BY
|
||||||
|
tddr.create_time DESC
|
||||||
|
limit 20
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue