|
|
|
|
@ -73,15 +73,15 @@ |
|
|
|
|
|
|
|
|
|
SELECT 'UnderInvestigation' AS status, count(*) AS count |
|
|
|
|
FROM tht_hidden_danger_base hdb |
|
|
|
|
LEFT JOIN tht_hidden_danger_road hdr |
|
|
|
|
LEFT JOIN tht_hidden_danger_road hdr |
|
|
|
|
ON hdb.business_id = hdr.business_id AND hdb.pc_count = hdr.pc_count |
|
|
|
|
LEFT JOIN department dp ON hdb.handle_dept = dp.cdepartmentid |
|
|
|
|
LEFT JOIN enum_type et ON et.ENUMTYPEID = '6601' AND et.enumvalue = hdb.status |
|
|
|
|
LEFT JOIN department dp ON hdb.handle_dept = dp.cdepartmentid |
|
|
|
|
LEFT JOIN enum_type et ON et.ENUMTYPEID = '6601' AND et.enumvalue = hdb.status |
|
|
|
|
WHERE |
|
|
|
|
1 = 1 |
|
|
|
|
AND hdb.status = '10' |
|
|
|
|
AND hdr.nid is not null |
|
|
|
|
AND hdb.approve_status in ('0','-1',null) |
|
|
|
|
AND COALESCE(hdb.approve_status,'0')IN('0','-1') |
|
|
|
|
<if test="cdepartmentid != null"> |
|
|
|
|
AND hdr.belong_xq like concat(concat(#{cdepartmentid}::text,'%')) |
|
|
|
|
</if> |
|
|
|
|
|