|
|
@ -256,10 +256,17 @@ |
|
|
left join dashboard_area_info t3 on |
|
|
left join dashboard_area_info t3 on |
|
|
t2.area_node = t3.code |
|
|
t2.area_node = t3.code |
|
|
<where> |
|
|
<where> |
|
|
t1.is_delete = 0 |
|
|
t1.is_submit = 1 |
|
|
and t1.is_submit = 1 |
|
|
and t1.is_delete = 0 |
|
|
and t1.enterprise_name is not null |
|
|
and t1.enterprise_name is not null |
|
|
and t1.enterprise_number is not null |
|
|
and t1.enterprise_number is not null |
|
|
|
|
|
and t1.bureau_dept_name is not null |
|
|
|
|
|
and t1.law_enforcement_id is not null |
|
|
|
|
|
and t1.law_enforcer is not null |
|
|
|
|
|
and t1.law_enforcer_two is not null |
|
|
|
|
|
and t1.is_complaint is not null |
|
|
|
|
|
and t1.check_category is not null |
|
|
|
|
|
and t1.bureau_dept_id is not null |
|
|
<if test="dayTime !=null"> |
|
|
<if test="dayTime !=null"> |
|
|
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') |
|
|
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') |
|
|
</if> |
|
|
</if> |
|
|
@ -274,7 +281,7 @@ |
|
|
|
|
|
|
|
|
<!-- 获取单独部门执法 (实)--> |
|
|
<!-- 获取单独部门执法 (实)--> |
|
|
<select id="getSepDeptLawCount" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo" resultType="java.lang.Long"> |
|
|
<select id="getSepDeptLawCount" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo" resultType="java.lang.Long"> |
|
|
select |
|
|
<!--select |
|
|
( |
|
|
( |
|
|
select |
|
|
select |
|
|
count(1) |
|
|
count(1) |
|
|
@ -286,8 +293,15 @@ |
|
|
t2.area_node = t3.code |
|
|
t2.area_node = t3.code |
|
|
<where> |
|
|
<where> |
|
|
t1.is_submit = 1 |
|
|
t1.is_submit = 1 |
|
|
|
|
|
and t1.is_delete = 0 |
|
|
and t1.enterprise_name is not null |
|
|
and t1.enterprise_name is not null |
|
|
and t1.enterprise_number is not null |
|
|
and t1.enterprise_number is not null |
|
|
|
|
|
and t1.bureau_dept_name is not null |
|
|
|
|
|
and t1.dept_id is not null |
|
|
|
|
|
and t1.law_enforcer_id is not null |
|
|
|
|
|
and t1.law_enforcer_id_other is not null |
|
|
|
|
|
and t1.law_enforcement_type is not null |
|
|
|
|
|
and t1.bureau_dept_id is not null |
|
|
<if test="dayTime !=null"> |
|
|
<if test="dayTime !=null"> |
|
|
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') |
|
|
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') |
|
|
</if> |
|
|
</if> |
|
|
@ -310,8 +324,15 @@ |
|
|
t2.area_node = t3.code |
|
|
t2.area_node = t3.code |
|
|
<where> |
|
|
<where> |
|
|
t1.is_submit = 1 |
|
|
t1.is_submit = 1 |
|
|
|
|
|
and t1.is_delete = 0 |
|
|
and t1.enterprise_name is not null |
|
|
and t1.enterprise_name is not null |
|
|
and t1.enterprise_number is not null |
|
|
and t1.enterprise_number is not null |
|
|
|
|
|
and t1.bureau_dept_name is not null |
|
|
|
|
|
and t1.dept_id is not null |
|
|
|
|
|
and t1.law_enforcer_id is not null |
|
|
|
|
|
and t1.law_enforcer_id_other is not null |
|
|
|
|
|
and t1.law_enforcement_type is not null |
|
|
|
|
|
and t1.bureau_dept_id is not null |
|
|
and t1.union_no is not null |
|
|
and t1.union_no is not null |
|
|
and t1.union_no != '' |
|
|
and t1.union_no != '' |
|
|
<if test="dayTime !=null"> |
|
|
<if test="dayTime !=null"> |
|
|
@ -322,13 +343,40 @@ |
|
|
</if> |
|
|
</if> |
|
|
</where> |
|
|
</where> |
|
|
GROUP BY t1.union_no HAVING COUNT(1) < 2) as t |
|
|
GROUP BY t1.union_no HAVING COUNT(1) < 2) as t |
|
|
) |
|
|
)--> |
|
|
|
|
|
select |
|
|
|
|
|
count(1) |
|
|
|
|
|
from |
|
|
|
|
|
enforcement_registration t1 |
|
|
|
|
|
left join sys_dept t2 on |
|
|
|
|
|
t1.bureau_dept_id = t2.dept_id |
|
|
|
|
|
left join dashboard_area_info t3 on |
|
|
|
|
|
t2.area_node = t3.code |
|
|
|
|
|
<where> |
|
|
|
|
|
t1.is_submit = 1 |
|
|
|
|
|
and t1.law_enforcement_id is not null |
|
|
|
|
|
and t1.enterprise_name is not null |
|
|
|
|
|
and t1.enterprise_number is not null |
|
|
|
|
|
and t1.law_enforcer is not null |
|
|
|
|
|
and t1.law_enforcer_two is not null |
|
|
|
|
|
and t1.is_complaint is not null |
|
|
|
|
|
and t1.check_category is not null |
|
|
|
|
|
and t1.bureau_dept_id is not null |
|
|
|
|
|
and t1.is_real_union = 0 |
|
|
|
|
|
<if test="dayTime !=null"> |
|
|
|
|
|
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'"> |
|
|
|
|
|
and t3.code = #{code} |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
|
|
|
|
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 联合检查数量统计 (实)--> |
|
|
<!-- 联合检查数量统计 (实)--> |
|
|
<select id="getUnionLawCount" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo" resultType="java.lang.Long"> |
|
|
<select id="getUnionLawCount" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo" resultType="java.lang.Long"> |
|
|
SELECT |
|
|
<!--SELECT |
|
|
COUNT(1) AS lhjcs |
|
|
COUNT(1) AS lhjcs |
|
|
FROM ( |
|
|
FROM ( |
|
|
SELECT |
|
|
SELECT |
|
|
@ -340,8 +388,15 @@ |
|
|
t2.area_node = t3.code |
|
|
t2.area_node = t3.code |
|
|
<where> |
|
|
<where> |
|
|
t1.is_submit = 1 |
|
|
t1.is_submit = 1 |
|
|
|
|
|
and t1.is_delete = 0 |
|
|
and t1.enterprise_name is not null |
|
|
and t1.enterprise_name is not null |
|
|
and t1.enterprise_number is not null |
|
|
and t1.enterprise_number is not null |
|
|
|
|
|
and t1.bureau_dept_name is not null |
|
|
|
|
|
and t1.dept_id is not null |
|
|
|
|
|
and t1.law_enforcer_id is not null |
|
|
|
|
|
and t1.law_enforcer_id_other is not null |
|
|
|
|
|
and t1.law_enforcement_type is not null |
|
|
|
|
|
and t1.bureau_dept_id is not null |
|
|
and t1.union_no IS NOT NULL |
|
|
and t1.union_no IS NOT NULL |
|
|
and t1.union_no != '' |
|
|
and t1.union_no != '' |
|
|
<if test="dayTime !=null"> |
|
|
<if test="dayTime !=null"> |
|
|
@ -359,7 +414,40 @@ |
|
|
</where> |
|
|
</where> |
|
|
GROUP BY t1.union_no |
|
|
GROUP BY t1.union_no |
|
|
HAVING COUNT(1) > 1 |
|
|
HAVING COUNT(1) > 1 |
|
|
) AS t |
|
|
) AS t--> |
|
|
|
|
|
select |
|
|
|
|
|
COUNT(distinct union_no) as lhjcs |
|
|
|
|
|
from |
|
|
|
|
|
enforcement_registration t1 |
|
|
|
|
|
left join sys_dept t2 on |
|
|
|
|
|
t1.bureau_dept_id = t2.dept_id |
|
|
|
|
|
left join dashboard_area_info t3 on |
|
|
|
|
|
t2.area_node = t3.code |
|
|
|
|
|
<where> |
|
|
|
|
|
t1.union_no is not null |
|
|
|
|
|
and t1.is_submit = 1 |
|
|
|
|
|
and t1.law_enforcement_id is not null |
|
|
|
|
|
and t1.enterprise_name is not null |
|
|
|
|
|
and t1.enterprise_number is not null |
|
|
|
|
|
and t1.law_enforcer is not null |
|
|
|
|
|
and t1.law_enforcer_two is not null |
|
|
|
|
|
and t1.is_complaint is not null |
|
|
|
|
|
and t1.check_category is not null |
|
|
|
|
|
and t1.bureau_dept_id is not null |
|
|
|
|
|
and is_real_union = 1 |
|
|
|
|
|
<if test="dayTime !=null"> |
|
|
|
|
|
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="code !=null and code!='' and code!='20220210190102183-D7DD-E31F5E9C1'"> |
|
|
|
|
|
and t3.code = #{code} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="monthTime !=null"> |
|
|
|
|
|
and DATE_FORMAT(t1.enforcement_time,'%Y-%m') = DATE_FORMAT(#{monthTime},'%Y-%m') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="enterpriseNumber !=null and enterpriseNumber !=''"> |
|
|
|
|
|
and t1.enterprise_number = #{enterpriseNumber} |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<!-- 获取区域检查趋势分析(季度) --> |
|
|
<!-- 获取区域检查趋势分析(季度) --> |
|
|
@ -561,8 +649,16 @@ |
|
|
<where> |
|
|
<where> |
|
|
t1.dict_type = 'law_enforce_category' |
|
|
t1.dict_type = 'law_enforce_category' |
|
|
and t2.is_submit = 1 |
|
|
and t2.is_submit = 1 |
|
|
|
|
|
and t2.is_delete = 0 |
|
|
and t2.enterprise_name is not null |
|
|
and t2.enterprise_name is not null |
|
|
and t2.enterprise_number is not null |
|
|
and t2.enterprise_number is not null |
|
|
|
|
|
and t2.bureau_dept_name is not null |
|
|
|
|
|
and t2.law_enforcement_id is not null |
|
|
|
|
|
and t2.law_enforcer is not null |
|
|
|
|
|
and t2.law_enforcer_two is not null |
|
|
|
|
|
and t2.is_complaint is not null |
|
|
|
|
|
and t2.check_category is not null |
|
|
|
|
|
and t2.bureau_dept_id is not null |
|
|
<if test="dayTime !=null"> |
|
|
<if test="dayTime !=null"> |
|
|
and DATE_FORMAT(t2.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') |
|
|
and DATE_FORMAT(t2.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') |
|
|
</if> |
|
|
</if> |
|
|
@ -595,8 +691,12 @@ |
|
|
left join dashboard_area_info t3 on |
|
|
left join dashboard_area_info t3 on |
|
|
t2.area_node = t3.code |
|
|
t2.area_node = t3.code |
|
|
<where> |
|
|
<where> |
|
|
t1.enterprise_name is not null |
|
|
t1.bureau_dept_name is not null |
|
|
|
|
|
and t1.dept_id is not null |
|
|
|
|
|
and t1.enterprise_name is not null |
|
|
and t1.enterprise_number is not null |
|
|
and t1.enterprise_number is not null |
|
|
|
|
|
and t1.law_enforcer_id is not null |
|
|
|
|
|
and t1.bureau_dept_id is not null |
|
|
<if test="dayTime !=null"> |
|
|
<if test="dayTime !=null"> |
|
|
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') |
|
|
and DATE_FORMAT(t1.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') |
|
|
</if> |
|
|
</if> |
|
|
@ -614,8 +714,12 @@ |
|
|
t3.area_node = t4.code |
|
|
t3.area_node = t4.code |
|
|
<where> |
|
|
<where> |
|
|
t1.dict_type = 'no_check_category' |
|
|
t1.dict_type = 'no_check_category' |
|
|
|
|
|
and t2.bureau_dept_name is not null |
|
|
|
|
|
and t2.dept_id is not null |
|
|
and t2.enterprise_name is not null |
|
|
and t2.enterprise_name is not null |
|
|
and t2.enterprise_number is not null |
|
|
and t2.enterprise_number is not null |
|
|
|
|
|
and t2.law_enforcer_id is not null |
|
|
|
|
|
and t2.bureau_dept_id is not null |
|
|
<if test="dayTime !=null"> |
|
|
<if test="dayTime !=null"> |
|
|
and DATE_FORMAT(t2.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') |
|
|
and DATE_FORMAT(t2.enforcement_time,'%Y-%m-%d') = DATE_FORMAT(#{dayTime},'%Y-%m-%d') |
|
|
</if> |
|
|
</if> |
|
|
|