|
|
|
@ -88,17 +88,20 @@ |
|
|
|
|
|
|
|
|
|
|
|
UNION ALL |
|
|
|
UNION ALL |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 待办总数 |
|
|
|
SELECT 'InGovernance' AS status,count(*) AS count |
|
|
|
SELECT 'InGovernance' AS status,count(*) AS count |
|
|
|
FROM tht_hidden_danger_base hdb |
|
|
|
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 |
|
|
|
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 department dp ON hdb.handle_dept = dp.cdepartmentid |
|
|
|
LEFT JOIN enum_type et ON et.ENUMTYPEID = '6601' AND et.enumvalue = hdb.status |
|
|
|
LEFT JOIN enum_type et ON et.ENUMTYPEID = '6601' AND et.enumvalue = hdb.status |
|
|
|
|
|
|
|
LEFT JOIN tht_timeline tt ON tt.business_id = hdb.business_id |
|
|
|
WHERE |
|
|
|
WHERE |
|
|
|
1 = 1 |
|
|
|
1 = 1 |
|
|
|
AND hdb.status = '10' |
|
|
|
AND hdb.status = '10' |
|
|
|
AND hdr.nid is not null |
|
|
|
AND hdr.nid is not null |
|
|
|
AND COALESCE(hdb.approve_status,'0')IN('0','-1') |
|
|
|
AND tt.operator = #{nuserid} |
|
|
|
|
|
|
|
AND COALESCE(hdb.approve_status,'0') not IN('0','-1') AND hdb.approve_status is not null |
|
|
|
<if test="cdepartmentid != null"> |
|
|
|
<if test="cdepartmentid != null"> |
|
|
|
AND hdr.belong_xq like concat(concat(#{cdepartmentid}::text,'%')) |
|
|
|
AND hdr.belong_xq like concat(concat(#{cdepartmentid}::text,'%')) |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
@ -178,11 +181,13 @@ |
|
|
|
<![CDATA[ |
|
|
|
<![CDATA[ |
|
|
|
AND NOW() >= COALESCE(hdb.pc_end_time, hdb.pc_start_time + INTERVAL '1 day' * tpc.param_value::INTEGER) - INTERVAL '3 day' |
|
|
|
AND NOW() >= COALESCE(hdb.pc_end_time, hdb.pc_start_time + INTERVAL '1 day' * tpc.param_value::INTEGER) - INTERVAL '3 day' |
|
|
|
AND NOW() <= COALESCE ( hdb.pc_end_time, hdb.pc_start_time + INTERVAL '1 day' * tpc.param_value :: INTEGER ) |
|
|
|
AND NOW() <= COALESCE ( hdb.pc_end_time, hdb.pc_start_time + INTERVAL '1 day' * tpc.param_value :: INTEGER ) |
|
|
|
and hdb.status = '10' |
|
|
|
AND hdb.status = '10' |
|
|
|
AND COALESCE(hdb.approve_status,'0') IN ( '0', '-1') |
|
|
|
AND hdr.nid is not null |
|
|
|
|
|
|
|
AND COALESCE(hdb.approve_status,'0')IN('0','-1') |
|
|
|
]]> |
|
|
|
]]> |
|
|
|
|
|
|
|
|
|
|
|
UNION ALL |
|
|
|
UNION ALL |
|
|
|
|
|
|
|
|
|
|
|
SELECT DISTINCT 'Delay' AS status, count(*) AS count |
|
|
|
SELECT DISTINCT 'Delay' AS status, count(*) AS count |
|
|
|
FROM tht_hidden_danger_base hdb |
|
|
|
FROM tht_hidden_danger_base hdb |
|
|
|
LEFT JOIN tht_param_config tpc ON tpc.param_code = 'THT_PC_ROAD_XT' |
|
|
|
LEFT JOIN tht_param_config tpc ON tpc.param_code = 'THT_PC_ROAD_XT' |
|
|
|
@ -198,12 +203,12 @@ |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
<![CDATA[ |
|
|
|
<![CDATA[ |
|
|
|
AND NOW() >= COALESCE ( hdb.pc_end_time, hdb.pc_start_time + INTERVAL '1 day' * tpc.param_value :: INTEGER ) |
|
|
|
AND NOW() >= COALESCE ( hdb.pc_end_time, hdb.pc_start_time + INTERVAL '1 day' * tpc.param_value :: INTEGER ) |
|
|
|
and hdb.status = '10' |
|
|
|
AND hdb.status = '10' |
|
|
|
AND COALESCE(hdb.approve_status,'0') IN ( '0', '-1') |
|
|
|
AND hdr.nid is not null |
|
|
|
|
|
|
|
AND COALESCE(hdb.approve_status,'0')IN('0','-1') |
|
|
|
]]> |
|
|
|
]]> |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <select id="getHigDangerDealt" resultType="com.hisense.hiatmp.model.common.HighDangerBase">--> |
|
|
|
<!-- <select id="getHigDangerDealt" resultType="com.hisense.hiatmp.model.common.HighDangerBase">--> |
|
|
|
<!-- SELECT hdb.*,hdr.pc_type,hdr.pc_end_time as--> |
|
|
|
<!-- SELECT hdb.*,hdr.pc_type,hdr.pc_end_time as--> |
|
|
|
<!-- road_pc_end_time,hdr.belong_xq,hdr.xzjd,bs.section_name,bs.section_code--> |
|
|
|
<!-- road_pc_end_time,hdr.belong_xq,hdr.xzjd,bs.section_name,bs.section_code--> |
|
|
|
@ -489,6 +494,12 @@ |
|
|
|
FROM tht_danger_items |
|
|
|
FROM tht_danger_items |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getDangerItemsById" resultType="com.hisense.hiatmp.model.common.ThtDangerItems"> |
|
|
|
|
|
|
|
SELECT DISTINCT * |
|
|
|
|
|
|
|
FROM tht_danger_items |
|
|
|
|
|
|
|
WHERE id = #{id} |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="isExtraExistence" resultType="com.hisense.hiatmp.model.common.HiddenDangerDTO"> |
|
|
|
<select id="isExtraExistence" resultType="com.hisense.hiatmp.model.common.HiddenDangerDTO"> |
|
|
|
SELECT * |
|
|
|
SELECT * |
|
|
|
FROM tht_hidden_danger_road_info |
|
|
|
FROM tht_hidden_danger_road_info |
|
|
|
|