|
@@ -105,7 +105,7 @@
|
|
<if test="mark != null and mark == 'item'">
|
|
<if test="mark != null and mark == 'item'">
|
|
subitem_code
|
|
subitem_code
|
|
</if>
|
|
</if>
|
|
- ORDER BY total
|
|
|
|
|
|
+ ORDER BY total DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getRecordYearMonth" parameterType="LawenforcementViewBO" resultType="map">
|
|
<select id="getRecordYearMonth" parameterType="LawenforcementViewBO" resultType="map">
|
|
@@ -133,4 +133,33 @@
|
|
GROUP BY d
|
|
GROUP BY d
|
|
) c ON c.d = a.d
|
|
) c ON c.d = a.d
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="getRecordCheckType" resultType="map">
|
|
|
|
+ SELECT check_object_type objType, count(*) total FROM lawenforcement_record GROUP BY check_object_type
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getRecordCheckFrequency" resultType="map">
|
|
|
|
+ SELECT a.name, IFNULL(num, 0) num
|
|
|
|
+ FROM (
|
|
|
|
+ SELECT '10' name UNION SELECT '10-20' name UNION SELECT '20-50' name UNION SELECT '50-100' name UNION SELECT '100' name
|
|
|
|
+ ) a
|
|
|
|
+ LEFT JOIN (
|
|
|
|
+ SELECT CASE WHEN total <= 10 THEN '10'
|
|
|
|
+ WHEN total > 10 AND total <= 20 THEN '10-20'
|
|
|
|
+ WHEN total > 20 AND total <= 50 THEN '20-50'
|
|
|
|
+ WHEN total > 50 AND total <= 100 THEN '50-100'
|
|
|
|
+ ELSE '100' END name, count(*) num
|
|
|
|
+ FROM ( SELECT count(*) total FROM lawenforcement_record GROUP BY check_object_name ) t
|
|
|
|
+ GROUP BY name
|
|
|
|
+ ) b ON b.name = a.name
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getRecordJobType" parameterType="LawenforcementViewBO" resultType="map">
|
|
|
|
+ SELECT dict_label jobType, count(*) total, count(c.record_id) lian
|
|
|
|
+ FROM lawenforcement_record a
|
|
|
|
+ LEFT JOIN lawenforcement_case c ON c.record_id = a.id
|
|
|
|
+ RIGHT JOIN ${onest_system}.sys_dict_data dict ON dict.dict_value = a.job_type
|
|
|
|
+ WHERE dict_type = 'lawenforcement_jobType'
|
|
|
|
+ GROUP BY dict_label
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|