Compare commits
2 Commits
0adba6f5cb
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d3130c4fe | |||
| 96d7f8d803 |
@@ -127,5 +127,11 @@ public class HotHiddenDangerPlanVo implements Serializable {
|
|||||||
@ExcelProperty(value = "未完成数")
|
@ExcelProperty(value = "未完成数")
|
||||||
private Long pendingCount;
|
private Long pendingCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待审核人数
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "待审核人数")
|
||||||
|
private Long pendingAuditCount;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,13 +21,15 @@
|
|||||||
p.is_auto_generated_by_backend,
|
p.is_auto_generated_by_backend,
|
||||||
p.plan_date_key,
|
p.plan_date_key,
|
||||||
COALESCE(stats.completed_count, 0) AS completedCount,
|
COALESCE(stats.completed_count, 0) AS completedCount,
|
||||||
COALESCE(stats.pending_count, 0) AS pendingCount
|
COALESCE(stats.pending_count, 0) AS pendingCount,
|
||||||
|
COALESCE(stats.pending_audit_count, 0) AS pendingAuditCount
|
||||||
FROM hot_hidden_danger_plan p
|
FROM hot_hidden_danger_plan p
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT
|
SELECT
|
||||||
i.plan_id,
|
i.plan_id,
|
||||||
SUM(CASE WHEN i.status IN (3, 9) THEN 1 ELSE 0 END) AS completed_count,
|
SUM(CASE WHEN i.status IN (3, 9) THEN 1 ELSE 0 END) AS completed_count,
|
||||||
SUM(CASE WHEN i.status IS NULL OR i.status NOT IN (3, 9) THEN 1 ELSE 0 END) AS pending_count
|
SUM(CASE WHEN i.status IS NULL OR i.status NOT IN (3, 9) THEN 1 ELSE 0 END) AS pending_count,
|
||||||
|
SUM(CASE WHEN i.status IN (2, 5) THEN 1 ELSE 0 END) AS pending_audit_count
|
||||||
FROM hot_hidden_danger_inspection i
|
FROM hot_hidden_danger_inspection i
|
||||||
WHERE i.is_deleted = 0
|
WHERE i.is_deleted = 0
|
||||||
GROUP BY i.plan_id
|
GROUP BY i.plan_id
|
||||||
|
|||||||
Reference in New Issue
Block a user