|
|
|
@ -33,13 +33,12 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="statisticalLawEnforcementItem" parameterType="StatisticalVo" resultMap="StatisticalVoResult"> |
|
|
|
select law_enforcement_item,count(*) as total from enforcement_registration |
|
|
|
<where> |
|
|
|
<if test="params.beginTime != null and params.beginTime != ''"> |
|
|
|
AND create_time = #{params.beginTime} |
|
|
|
</if> |
|
|
|
AND DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' ) |
|
|
|
</where> |
|
|
|
select law_enforcement_item,count(*) as total from enforcement_registration er |
|
|
|
where DATE_FORMAT(er.enforcement_time, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m') |
|
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
|
<!-- 数据范围过滤 --> |
|
|
|
${params.dataScope} |
|
|
|
</if> |
|
|
|
GROUP BY law_enforcement_item |
|
|
|
</select> |
|
|
|
<select id="statisticalLawEnforcer" parameterType="StatisticalVo" resultMap="StatisticalVoResult"> |
|
|
|
@ -50,7 +49,7 @@ |
|
|
|
FROM |
|
|
|
enforcement_registration |
|
|
|
WHERE |
|
|
|
DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' ) |
|
|
|
DATE_FORMAT( enforcement_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' ) |
|
|
|
GROUP BY |
|
|
|
law_enforcer_id UNION ALL |
|
|
|
SELECT |
|
|
|
@ -60,7 +59,7 @@ |
|
|
|
FROM |
|
|
|
enforcement_registration er |
|
|
|
<where> |
|
|
|
and DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' ) |
|
|
|
and DATE_FORMAT( er.enforcement_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' ) |
|
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
|
<!-- 数据范围过滤 --> |
|
|
|
${params.dataScope} |
|
|
|
@ -82,7 +81,7 @@ |
|
|
|
LEFT JOIN ( select dict_label,dict_value from sys_dict_data where dict_type = 'enterpriseType') sdd |
|
|
|
on ei.enterprise_type = sdd.dict_value |
|
|
|
<where> |
|
|
|
and DATE_FORMAT( er.create_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' ) |
|
|
|
and DATE_FORMAT( er.enforcement_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' ) |
|
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
|
<!-- 数据范围过滤 --> |
|
|
|
${params.dataScope} |
|
|
|
@ -96,7 +95,7 @@ |
|
|
|
COUNT(CASE WHEN is_complaint = 1 THEN 1 END) AS complaint_count |
|
|
|
from enforcement_registration er |
|
|
|
<where> |
|
|
|
AND DATE_FORMAT(create_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' ) |
|
|
|
AND DATE_FORMAT(er.enforcement_time, '%Y%m' ) = DATE_FORMAT( CURDATE(), '%Y%m' ) |
|
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
|
<!-- 数据范围过滤 --> |
|
|
|
${params.dataScope} |
|
|
|
|