Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
057b970d28
|
|
@ -95,6 +95,11 @@ public interface DataCenterMapper {
|
|||
*/
|
||||
List<DevAttributeVo> getTowerDevAttributeRecordByDay(@Param("proId") Integer proId);
|
||||
|
||||
/**
|
||||
* 查询基坑/有限空间 监测设备当日记录
|
||||
*/
|
||||
List<DevAttributeVo> getPitDevAttributeRecordByDay(@Param("proId") Integer proId);
|
||||
|
||||
/**
|
||||
* 查询组塔监测设备报警记录 -- 最新10条
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class ProjectDetailsViewController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询有限空间监测设备历史数据 / 每监测项各10条数据
|
||||
* 查询(基坑/有限空间) 监测设备历史数据 / 每监测项各10条数据
|
||||
* @param devId 设备id
|
||||
*/
|
||||
@GetMapping("/getPitDevAttributeRecordByDevice")
|
||||
|
|
@ -74,14 +74,24 @@ public class ProjectDetailsViewController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询组塔监测设备 -- 当日监测数据
|
||||
* 查询(基坑/有限空间)感知设备 -- 当日监测数据
|
||||
* @param proId 工程id
|
||||
*/
|
||||
@GetMapping("/getPowerDevAttributeRecordByDay")
|
||||
public AjaxResult getPowerDevAttributeRecordByProId(Integer proId) {
|
||||
return projectDetailsViewService.getPowerDevAttributeRecordByProId(proId);
|
||||
@GetMapping("/getPitDevAttributeRecordByDay")
|
||||
public AjaxResult getPitDevAttributeRecordByDay(Integer proId) {
|
||||
return projectDetailsViewService.getPitDevAttributeRecordByDay(proId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询(基坑/有限空间)监测设备 -- 预警数据(最新10条)
|
||||
* @param proId 工程id
|
||||
*/
|
||||
@GetMapping("/getPitDevAttributeRecordByWarn")
|
||||
public AjaxResult getPitDevAttributeWarnRecord(Integer proId) {
|
||||
return projectDetailsViewService.getPitDevAttributeWarnRecord(proId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询组塔监测设备 -- 预警数据(最新10条)
|
||||
* @param proId 工程id
|
||||
|
|
@ -92,14 +102,13 @@ public class ProjectDetailsViewController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询有限空间监测设备 -- 预警数据(最新10条)
|
||||
* 查询组塔监测设备 -- 当日监测数据
|
||||
* @param proId 工程id
|
||||
*/
|
||||
@GetMapping("/getPitDevAttributeRecordByWarn")
|
||||
public AjaxResult getPitDevAttributeWarnRecord(Integer proId) {
|
||||
return projectDetailsViewService.getPitDevAttributeWarnRecord(proId);
|
||||
@GetMapping("/getTowerDevAttributeRecordByDay")
|
||||
public AjaxResult getTowerDevAttributeRecordByDay(Integer proId) {
|
||||
return projectDetailsViewService.getTowerDevAttributeRecordByDay(proId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class ProjectDetailsViewServiceImpl {
|
|||
return AjaxResult.success(records);
|
||||
}
|
||||
|
||||
public AjaxResult getPowerDevAttributeRecordByProId(Integer proId) {
|
||||
public AjaxResult getTowerDevAttributeRecordByDay(Integer proId) {
|
||||
List<DevAttributeVo> records = dataCenterMapper.getTowerDevAttributeRecordByDay(proId);
|
||||
if (records.isEmpty()) {
|
||||
return AjaxResult.error("暂无数据");
|
||||
|
|
@ -53,6 +53,10 @@ public class ProjectDetailsViewServiceImpl {
|
|||
return AjaxResult.success(records);
|
||||
}
|
||||
|
||||
public AjaxResult getPitDevAttributeRecordByDay(Integer proId) {
|
||||
return AjaxResult.success(dataCenterMapper.getPitDevAttributeRecordByDay(proId));
|
||||
}
|
||||
|
||||
public AjaxResult getTowerDevAttributeWarnRecord(Integer proId) {
|
||||
List<DevAttributeVo> records = dataCenterMapper.getTowerDevAttributeWarnRecord(proId);
|
||||
if (records.isEmpty()) {
|
||||
|
|
|
|||
|
|
@ -211,4 +211,18 @@
|
|||
tddr.create_time DESC
|
||||
limit 20
|
||||
</select>
|
||||
|
||||
<select id="getPitDevAttributeRecordByDay" 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.create_time >= DATE_SUB(NOW(), INTERVAL 1 DAY)
|
||||
AND tbdr.pro_id = #{proId} AND tddr.dev_type = 'limited'
|
||||
ORDER BY
|
||||
tddr.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue