预警信息
This commit is contained in:
parent
2148619314
commit
d214b89b56
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.base.domain;
|
package com.bonus.base.domain;
|
||||||
|
|
||||||
import com.bonus.common.core.annotation.Excel;
|
import com.bonus.common.core.annotation.Excel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
|
|
@ -44,6 +45,30 @@ public class TbProPower implements Serializable {
|
||||||
@Size(max = 50,message = "杆塔纬度最大长度要小于 50")
|
@Size(max = 50,message = "杆塔纬度最大长度要小于 50")
|
||||||
private String lat;
|
private String lat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 感知设备类型数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="感知设备类型数")
|
||||||
|
private Integer devTypeNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 感知设备数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="感知设备数量")
|
||||||
|
private Integer devNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备正常数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="设备正常数量")
|
||||||
|
private Integer successNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备异常数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="设备异常数量")
|
||||||
|
private Integer errorNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否删除
|
* 是否删除
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -145,15 +145,15 @@ public class ProjectViewTwoController extends BaseController {
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 根据工程id获取大屏首页地图工程信息
|
// * 根据工程id获取大屏首页地图工程信息
|
||||||
* @param record
|
// * @param record
|
||||||
* @return
|
// * @return
|
||||||
*/
|
// */
|
||||||
@GetMapping("/getProjectAndDeviceById")
|
// @GetMapping("/getProjectAndDeviceById")
|
||||||
public AjaxResult getProjectAndDeviceById(DeviceNumByProjectVo record) {
|
// public AjaxResult getProjectAndDeviceById(DeviceNumByProjectVo record) {
|
||||||
return success(projectViewService.getProjectAndDeviceById(record));
|
// return success(projectViewService.getProjectAndDeviceById(record));
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,7 @@ public class ProjectViewServiceImpl {
|
||||||
if (CollectionUtils.isNotEmpty(powerList)) {
|
if (CollectionUtils.isNotEmpty(powerList)) {
|
||||||
record.setProPowerList(powerList);
|
record.setProPowerList(powerList);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -272,11 +273,11 @@ public class ProjectViewServiceImpl {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 根据工程id获取大屏首页地图工程信息
|
// * 根据工程id获取大屏首页地图工程信息
|
||||||
* @return
|
// * @return
|
||||||
*/
|
// */
|
||||||
public DeviceNumByProjectVo getProjectAndDeviceById(DeviceNumByProjectVo record) {
|
// public DeviceNumByProjectVo getProjectAndDeviceById(DeviceNumByProjectVo record) {
|
||||||
return deviceNumByProjectMapper.getProjectAndDeviceById(record);
|
// return deviceNumByProjectMapper.getProjectAndDeviceById(record);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,30 @@ public class ProjectAreaGroupVo implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String proStatus;
|
private String proStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 感知设备类型数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="感知设备类型数")
|
||||||
|
private Integer devTypeNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 感知设备数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="感知设备数量")
|
||||||
|
private Integer devNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备正常数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="设备正常数量")
|
||||||
|
private Integer successNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备异常数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value="设备异常数量")
|
||||||
|
private Integer errorNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 杆塔信息集合
|
* 杆塔信息集合
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -198,34 +198,48 @@
|
||||||
|
|
||||||
<select id="getProjectListGroupAreaByTypeCode" resultType="com.bonus.screen.vo.ProjectAreaGroupVo">
|
<select id="getProjectListGroupAreaByTypeCode" resultType="com.bonus.screen.vo.ProjectAreaGroupVo">
|
||||||
SELECT
|
SELECT
|
||||||
a.id AS areaId,
|
a.id AS areaId,
|
||||||
a.area_name as areaName,
|
a.area_name as areaName,
|
||||||
p.id AS projectId,
|
tp.id AS projectId,
|
||||||
p.pro_name AS projectName,
|
tp.pro_name AS projectName,
|
||||||
p.lon,p.lat
|
tp.lon,tp.lat,
|
||||||
|
count(distinct td.dev_type) as devTypeNum,
|
||||||
|
count(td.id) as devNum,
|
||||||
|
count(case when td.dev_warn = 0 then 1 end) as successNum,
|
||||||
|
count(case when td.dev_warn = 1 then 1 end) as errorNum
|
||||||
FROM
|
FROM
|
||||||
tb_project p
|
tb_project tp
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
tb_area a ON a.id = p.area_id
|
tb_area a ON a.id = tp.area_id
|
||||||
|
left join tb_bd_device_record tbdr on tp.id = tbdr.pro_id
|
||||||
|
left join tb_device td on tbdr.record_id = td.bd_id and td.dev_status = 0 and td.del_flag = 0
|
||||||
<where>
|
<where>
|
||||||
p.del_flag = 0
|
tp.del_flag = 0
|
||||||
<if test="projectTypeCode != null">
|
<if test="projectTypeCode != null">
|
||||||
and p.pro_type = #{projectTypeCode}
|
and tp.pro_type = #{projectTypeCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="areaId != null">
|
<if test="areaId != null">
|
||||||
and p.area_id = #{areaId}
|
and tp.area_id = #{areaId}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
group by tp.id
|
||||||
</select>
|
</select>
|
||||||
<select id="getProPowerListByProId" resultType="com.bonus.base.domain.TbProPower">
|
<select id="getProPowerListByProId" resultType="com.bonus.base.domain.TbProPower">
|
||||||
select id as id,
|
select
|
||||||
pro_id as proId,
|
tpp.id as id,
|
||||||
gt_name as gtName,
|
tpp.pro_id as proId,
|
||||||
lon as lon,
|
tpp.gt_name as gtName,
|
||||||
lat as lat
|
tpp.lon as lon,
|
||||||
from tb_pro_power
|
tpp.lat as lat,
|
||||||
where pro_id = #{proId}
|
count(distinct td.dev_type) as devTypeNum,
|
||||||
and del_flag = 0
|
count(td.id) as devNum,
|
||||||
|
count(case when td.dev_warn = 0 then 1 end) as successNum,
|
||||||
|
count(case when td.dev_warn = 1 then 1 end) as errorNum
|
||||||
|
from tb_pro_power tpp
|
||||||
|
left join tb_bd_device_record tbdr on tpp.id = tbdr.power_id
|
||||||
|
left join tb_device td on tbdr.record_id = td.bd_id and td.dev_status = 0 and td.del_flag = 0
|
||||||
|
where tpp.pro_id = #{proId}
|
||||||
|
and tpp.del_flag = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="getList" resultType="java.lang.Integer">
|
<select id="getList" resultType="java.lang.Integer">
|
||||||
select count(1) from tb_team where del_flag = 0 and pro_id = #{id}
|
select count(1) from tb_team where del_flag = 0 and pro_id = #{id}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,9 @@
|
||||||
LEFT JOIN tb_bd_device_record tbdr ON td.dev_code = tbdr.dev_code
|
LEFT JOIN tb_bd_device_record tbdr ON td.dev_code = tbdr.dev_code
|
||||||
LEFT JOIN tb_project tp ON tbdr.pro_id = tp.id
|
LEFT JOIN tb_project tp ON tbdr.pro_id = tp.id
|
||||||
WHERE tddr.is_warn = 1
|
WHERE tddr.is_warn = 1
|
||||||
|
<if test="devTypeCode != null and devTypeCode != ''">
|
||||||
|
and td.dev_type = #{devTypeCode}
|
||||||
|
</if>
|
||||||
<if test="proName != null and proName != ''">
|
<if test="proName != null and proName != ''">
|
||||||
and tp.pro_name like concat('%',#{proName},'%')
|
and tp.pro_name like concat('%',#{proName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue