21f077e7 康伟

kangwei:隐患排查大屏中的风险库统计增加日常检查次数(查询巡检数)

1 个父辈 343f5545
......@@ -8,12 +8,14 @@
d.depart_name AS depart_name,
ifnull( dl.fxk_count, 0 ) AS fxk_count,
ifnull( di.yhpc_count, 0 ) AS yhpc_count,
ifnull( aq.aqyh_count, 0 ) AS aqyh_count
ifnull( aq.aqyh_count, 0 ) AS aqyh_count,
ifnull( ir.xj_count, 0 ) AS xj_count
FROM
sys_depart d
LEFT JOIN ( SELECT depart_id, count( id ) fxk_count FROM danger_level_manage WHERE create_time LIKE CONCAT(#{year},'%') GROUP BY depart_id ) dl ON dl.depart_id = d.id
LEFT JOIN ( SELECT depart_id, count( id ) yhpc_count FROM danger_inspection_record WHERE create_time LIKE CONCAT(#{year},'%') GROUP BY depart_id ) di ON di.depart_id = d.id
LEFT JOIN ( SELECT depart_id, count( id ) aqyh_count FROM ajh_rectification_info WHERE create_time LIKE CONCAT(#{year},'%') GROUP BY depart_id ) aq ON aq.depart_id = d.id
LEFT JOIN ( SELECT depart_id, count( id ) xj_count FROM danger_inspection_record WHERE create_time LIKE CONCAT(#{year},'%') GROUP BY depart_id ) ir ON ir.depart_id = d.id
WHERE
d.depart_type = 1
ORDER BY
......
......@@ -26,4 +26,6 @@ public class RiskDatabaseResult {
@ApiModelProperty(value = "隐患排查事件数量")
private Integer aqyhCount;
@ApiModelProperty(value = "巡检数量")
private Integer xjCount;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!