|
|
@ -15,7 +15,6 @@ |
|
|
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_delete = 0 |
|
|
and t1.bureau_dept_name is not null |
|
|
and t1.bureau_dept_name is not null |
|
|
and t1.is_submit = 1 |
|
|
and t1.is_submit = 1 |
|
|
@ -314,69 +313,6 @@ |
|
|
|
|
|
|
|
|
<!-- 获取单独部门执法 (实)--> |
|
|
<!-- 获取单独部门执法 (实)--> |
|
|
<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 |
|
|
|
|
|
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.is_delete = 0 |
|
|
|
|
|
and t1.enterprise_name 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"> |
|
|
|
|
|
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 |
|
|
|
|
|
count(1) as _count |
|
|
|
|
|
from |
|
|
|
|
|
( |
|
|
|
|
|
select |
|
|
|
|
|
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.is_delete = 0 |
|
|
|
|
|
and t1.enterprise_name 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 != '' |
|
|
|
|
|
<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> |
|
|
|
|
|
GROUP BY t1.union_no HAVING COUNT(1) < 2) as t |
|
|
|
|
|
)--> |
|
|
|
|
|
select |
|
|
select |
|
|
count(1) |
|
|
count(1) |
|
|
from |
|
|
from |
|
|
@ -409,45 +345,6 @@ |
|
|
|
|
|
|
|
|
<!-- 联合检查数量统计 (实)--> |
|
|
<!-- 联合检查数量统计 (实)--> |
|
|
<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 |
|
|
|
|
|
COUNT(1) AS lhjcs |
|
|
|
|
|
FROM ( |
|
|
|
|
|
SELECT |
|
|
|
|
|
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.is_delete = 0 |
|
|
|
|
|
and t1.enterprise_name 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 != '' |
|
|
|
|
|
<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> |
|
|
|
|
|
GROUP BY t1.union_no |
|
|
|
|
|
HAVING COUNT(1) > 1 |
|
|
|
|
|
) AS t--> |
|
|
|
|
|
select |
|
|
select |
|
|
COUNT(distinct union_no) as lhjcs |
|
|
COUNT(distinct union_no) as lhjcs |
|
|
from |
|
|
from |
|
|
@ -485,72 +382,6 @@ |
|
|
|
|
|
|
|
|
<!-- 获取区域检查趋势分析(季度) --> |
|
|
<!-- 获取区域检查趋势分析(季度) --> |
|
|
<select id="getQuarterlyRegionList" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|
|
<select id="getQuarterlyRegionList" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|
|
<!--select |
|
|
|
|
|
t3.code, |
|
|
|
|
|
t3.name, |
|
|
|
|
|
sum(case when QUARTER(t1.enforcement_time)= 1 then 1 else 0 end) as firstQuarter, |
|
|
|
|
|
sum(case when QUARTER(t1.enforcement_time)= 2 then 1 else 0 end) as secondQuarter, |
|
|
|
|
|
sum(case when QUARTER(t1.enforcement_time)= 3 then 1 else 0 end) as thirdQuarter, |
|
|
|
|
|
sum(case when QUARTER(t1.enforcement_time)= 4 then 1 else 0 end) as fourthQuarter |
|
|
|
|
|
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 and t3.`level` = 3 |
|
|
|
|
|
<where> |
|
|
|
|
|
t3.code is not null |
|
|
|
|
|
and t1.is_delete = 0 |
|
|
|
|
|
and t1.is_submit = 1 |
|
|
|
|
|
<if test="yearTime !=null "> |
|
|
|
|
|
and DATE_FORMAT(t1.enforcement_time,'%Y')= DATE_FORMAT(#{yearTime},'%Y') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="code !=null and code!=''"> |
|
|
|
|
|
and t3.code = #{code} |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
|
|
|
group by |
|
|
|
|
|
t3.code, |
|
|
|
|
|
t3.name |
|
|
|
|
|
<if test="Sorting =='GP'"> |
|
|
|
|
|
<if test="quarter=='Q1'"> |
|
|
|
|
|
order by |
|
|
|
|
|
firstQuarter desc |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="quarter=='Q2'"> |
|
|
|
|
|
order by |
|
|
|
|
|
secondQuarter desc |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="quarter=='Q3'"> |
|
|
|
|
|
order by |
|
|
|
|
|
thirdQuarter desc |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="quarter=='Q4'"> |
|
|
|
|
|
order by |
|
|
|
|
|
fourthQuarter desc |
|
|
|
|
|
</if> |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="Sorting =='DP'"> |
|
|
|
|
|
<if test="quarter=='Q1'"> |
|
|
|
|
|
order by |
|
|
|
|
|
firstQuarter |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="quarter=='Q2'"> |
|
|
|
|
|
order by |
|
|
|
|
|
fourthQuarter |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="quarter=='Q3'"> |
|
|
|
|
|
order by |
|
|
|
|
|
thirdQuarter |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="quarter=='Q4'"> |
|
|
|
|
|
order by |
|
|
|
|
|
fourthQuarter |
|
|
|
|
|
</if> |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="scope =='topFive'"> |
|
|
|
|
|
limit 5 |
|
|
|
|
|
</if>--> |
|
|
|
|
|
SELECT |
|
|
SELECT |
|
|
t3.code, |
|
|
t3.code, |
|
|
t3.name, |
|
|
t3.name, |
|
|
@ -575,71 +406,6 @@ |
|
|
|
|
|
|
|
|
<!-- 获取领域检查趋势分析(季度) --> |
|
|
<!-- 获取领域检查趋势分析(季度) --> |
|
|
<select id="getDomainQuarterList" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|
|
<select id="getDomainQuarterList" resultType="com.zdxt.enforcementcode.domain.vo.CimDashboardOverviewVo" parameterType="com.zdxt.enforcementcode.domain.bo.CimDashboardOverviewQueryBo"> |
|
|
<!--select |
|
|
|
|
|
t3.domain_id as code, |
|
|
|
|
|
t3.domain_name as name, |
|
|
|
|
|
sum(case when QUARTER(t1.enforcement_time)= 1 then 1 else 0 end) as firstQuarter, |
|
|
|
|
|
sum(case when QUARTER(t1.enforcement_time)= 2 then 1 else 0 end) as secondQuarter, |
|
|
|
|
|
sum(case when QUARTER(t1.enforcement_time)= 3 then 1 else 0 end) as thirdQuarter, |
|
|
|
|
|
sum(case when QUARTER(t1.enforcement_time)= 4 then 1 else 0 end) as fourthQuarter |
|
|
|
|
|
from enforcement_registration t1 |
|
|
|
|
|
left join sys_dept t2 on |
|
|
|
|
|
t1.bureau_dept_id = t2.dept_id |
|
|
|
|
|
left join dashboard_domain_dept t3 on |
|
|
|
|
|
t2.dept_id = t3.dept_id |
|
|
|
|
|
<where> |
|
|
|
|
|
t3.domain_id is not null |
|
|
|
|
|
and t1.is_delete = 0 |
|
|
|
|
|
and t1.is_submit = 1 |
|
|
|
|
|
<if test="yearTime !=null"> |
|
|
|
|
|
and DATE_FORMAT(t1.enforcement_time,'%Y')= DATE_FORMAT(#{yearTime},'%Y') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="code !=null and code!=''"> |
|
|
|
|
|
and t3.domain_id = #{code} |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
|
|
|
group by |
|
|
|
|
|
t3.domain_id , |
|
|
|
|
|
t3.domain_name |
|
|
|
|
|
<if test="Sorting =='GP'"> |
|
|
|
|
|
<if test="quarter=='Q1'"> |
|
|
|
|
|
order by |
|
|
|
|
|
firstQuarter desc |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="quarter=='Q2'"> |
|
|
|
|
|
order by |
|
|
|
|
|
secondQuarter desc |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="quarter=='Q3'"> |
|
|
|
|
|
order by |
|
|
|
|
|
thirdQuarter desc |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="quarter=='Q4'"> |
|
|
|
|
|
order by |
|
|
|
|
|
fourthQuarter desc |
|
|
|
|
|
</if> |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="Sorting =='DP'"> |
|
|
|
|
|
<if test="quarter=='Q1'"> |
|
|
|
|
|
order by |
|
|
|
|
|
firstQuarter |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="quarter=='Q2'"> |
|
|
|
|
|
order by |
|
|
|
|
|
secondQuarter |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="quarter=='Q3'"> |
|
|
|
|
|
order by |
|
|
|
|
|
thirdQuarter |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="quarter=='Q4'"> |
|
|
|
|
|
order by |
|
|
|
|
|
fourthQuarter |
|
|
|
|
|
</if> |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="scope =='topFive'"> |
|
|
|
|
|
limit 5 |
|
|
|
|
|
</if>--> |
|
|
|
|
|
SELECT |
|
|
SELECT |
|
|
t3.domain_id as code, |
|
|
t3.domain_id as code, |
|
|
t3.domain_name as name, |
|
|
t3.domain_name as name, |
|
|
|