|
|
@ -29,13 +29,6 @@ |
|
|
<result property="qrCodeUrl" column="qr_code_url" /> |
|
|
<result property="qrCodeUrl" column="qr_code_url" /> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
|
<resultMap type="com.zdxt.enforcementcode.domain.bo.StatisticsIndicatorPartBo" id="StatisticalVoResult"> |
|
|
|
|
|
<result property="createTime" column="create_time" /> |
|
|
|
|
|
<result property="userId" column="user_id" /> |
|
|
|
|
|
<result property="deptId" column="dept_id" /> |
|
|
|
|
|
<result property="name" column="name" /> |
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
|
|
<select id="statisticalPanelDept" resultType="integer" parameterType="com.zdxt.enforcementcode.domain.bo.StatisticsIndicatorPartBo"> |
|
|
<select id="statisticalPanelDept" resultType="integer" parameterType="com.zdxt.enforcementcode.domain.bo.StatisticsIndicatorPartBo"> |
|
|
select count(*) from (select * from ZFZTJDM111915 group by CODE) x |
|
|
select count(*) from (select * from ZFZTJDM111915 group by CODE) x |
|
|
</select> |
|
|
</select> |
|
|
@ -122,7 +115,6 @@ |
|
|
<!-- 执法登记 --> |
|
|
<!-- 执法登记 --> |
|
|
<select id="staisticalRegistration" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer"> |
|
|
<select id="staisticalRegistration" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer"> |
|
|
select count(1) from enforcement_registration r |
|
|
select count(1) from enforcement_registration r |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and r.bureau_dept_name is not null |
|
|
and r.bureau_dept_name is not null |
|
|
and r.is_submit = 1 |
|
|
and r.is_submit = 1 |
|
|
@ -143,15 +135,7 @@ |
|
|
<if test="uniteCheck == '0'.toString()"> and r.unite_check is not null</if> |
|
|
<if test="uniteCheck == '0'.toString()"> and r.unite_check is not null</if> |
|
|
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if> |
|
|
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if> |
|
|
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%')) </if> |
|
|
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%')) </if> |
|
|
<!-- <if test="bureauDeptId != null and bureauDeptId != '' ">and r.bureau_dept_id=#{bureauDeptId}</if> --> |
|
|
|
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
and YEAR(r.enforcement_time)=#{year} |
|
|
and YEAR(r.enforcement_time)=#{year} |
|
|
</if> |
|
|
</if> |
|
|
@ -168,14 +152,11 @@ |
|
|
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') |
|
|
and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') |
|
|
</if> |
|
|
</if> |
|
|
<!-- 数据范围过滤 --> |
|
|
<!-- 数据范围过滤 --> |
|
|
<!-- <if test="params.dataScope != null and params.dataScope != ''">--> |
|
|
|
|
|
<!-- ${params.dataScope}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
<select id="staisticalRegistration_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
<select id="staisticalRegistration_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
select count(1) from enforcement_registration r |
|
|
select count(1) from enforcement_registration r |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and r.bureau_dept_name is not null |
|
|
and r.bureau_dept_name is not null |
|
|
and r.is_submit = 1 |
|
|
and r.is_submit = 1 |
|
|
@ -197,14 +178,7 @@ |
|
|
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if> |
|
|
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if> |
|
|
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%')) </if> |
|
|
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%')) </if> |
|
|
<if test="bureauDeptId != null and bureauDeptId != '' ">and r.bureau_dept_id=#{bureauDeptId}</if> |
|
|
<if test="bureauDeptId != null and bureauDeptId != '' ">and r.bureau_dept_id=#{bureauDeptId}</if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
and YEAR(r.enforcement_time)+1=#{year} |
|
|
and YEAR(r.enforcement_time)+1=#{year} |
|
|
</if> |
|
|
</if> |
|
|
@ -228,7 +202,6 @@ |
|
|
</select> |
|
|
</select> |
|
|
<select id="staisticalRegistration_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
<select id="staisticalRegistration_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
select count(1) from enforcement_registration r |
|
|
select count(1) from enforcement_registration r |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and r.bureau_dept_name is not null |
|
|
and r.bureau_dept_name is not null |
|
|
and r.is_submit = 1 |
|
|
and r.is_submit = 1 |
|
|
@ -250,14 +223,7 @@ |
|
|
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if> |
|
|
<if test="uniteCheck == '1'.toString()"> and r.unite_check is null</if> |
|
|
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%')) </if> |
|
|
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%')) </if> |
|
|
<if test="bureauDeptId != null and bureauDeptId != '' ">and r.bureau_dept_id=#{bureauDeptId}</if> |
|
|
<if test="bureauDeptId != null and bureauDeptId != '' ">and r.bureau_dept_id=#{bureauDeptId}</if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
and YEAR(r.enforcement_time)+1=#{year} |
|
|
and YEAR(r.enforcement_time)+1=#{year} |
|
|
</if> |
|
|
</if> |
|
|
@ -283,7 +249,6 @@ |
|
|
<!-- 执法预告 --> |
|
|
<!-- 执法预告 --> |
|
|
<select id="staisticalLawEnforcement" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer"> |
|
|
<select id="staisticalLawEnforcement" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer"> |
|
|
select count(1) from enterprise_law_enforcement n |
|
|
select count(1) from enterprise_law_enforcement n |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on n.enterprise_number=e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and n.enterprise_number is not null |
|
|
and n.enterprise_number is not null |
|
|
<if test="params.zone != null and params.zone != ''"> |
|
|
<if test="params.zone != null and params.zone != ''"> |
|
|
@ -293,14 +258,7 @@ |
|
|
and n.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
and n.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if> |
|
|
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
and YEAR(n.check_time)=#{year} |
|
|
and YEAR(n.check_time)=#{year} |
|
|
</if> |
|
|
</if> |
|
|
@ -324,7 +282,6 @@ |
|
|
</select> |
|
|
</select> |
|
|
<select id="staisticalLawEnforcement_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
<select id="staisticalLawEnforcement_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
select count(1) from enterprise_law_enforcement n |
|
|
select count(1) from enterprise_law_enforcement n |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on n.enterprise_number=e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and n.enterprise_number is not null |
|
|
and n.enterprise_number is not null |
|
|
<if test="params.zone != null and params.zone != ''"> |
|
|
<if test="params.zone != null and params.zone != ''"> |
|
|
@ -335,14 +292,6 @@ |
|
|
</if> |
|
|
</if> |
|
|
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if> |
|
|
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if> |
|
|
<if test="bureauDeptId != null and bureauDeptId != '' ">and n.bureau_dept_id=#{bureauDeptId}</if> |
|
|
<if test="bureauDeptId != null and bureauDeptId != '' ">and n.bureau_dept_id=#{bureauDeptId}</if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
and YEAR(n.check_time)+1=#{year} |
|
|
and YEAR(n.check_time)+1=#{year} |
|
|
</if> |
|
|
</if> |
|
|
@ -366,7 +315,6 @@ |
|
|
</select> |
|
|
</select> |
|
|
<select id="staisticalLawEnforcement_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
<select id="staisticalLawEnforcement_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
select count(1) from enterprise_law_enforcement n |
|
|
select count(1) from enterprise_law_enforcement n |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on n.enterprise_number=e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and n.enterprise_number is not null |
|
|
and n.enterprise_number is not null |
|
|
<if test="params.zone != null and params.zone != ''"> |
|
|
<if test="params.zone != null and params.zone != ''"> |
|
|
@ -377,14 +325,6 @@ |
|
|
</if> |
|
|
</if> |
|
|
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if> |
|
|
<if test="userId != null and userId != '' ">and( n.law_enforcer_id=#{userId} or n.law_enforcer_id_two=#{userId}) </if> |
|
|
<if test="bureauDeptId != null and bureauDeptId != '' ">and n.bureau_dept_id=#{bureauDeptId}</if> |
|
|
<if test="bureauDeptId != null and bureauDeptId != '' ">and n.bureau_dept_id=#{bureauDeptId}</if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
and YEAR(n.check_time)+1=#{year} |
|
|
and YEAR(n.check_time)+1=#{year} |
|
|
</if> |
|
|
</if> |
|
|
@ -410,7 +350,6 @@ |
|
|
<!-- 执法投诉 --> |
|
|
<!-- 执法投诉 --> |
|
|
<select id="staisticalComplaint" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer"> |
|
|
<select id="staisticalComplaint" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer"> |
|
|
select count(1) from complaint_statistics c |
|
|
select count(1) from complaint_statistics c |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on c.enterprise_number=e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and (c.rid is not null or c.complaint_department_id is not null) |
|
|
and (c.rid is not null or c.complaint_department_id is not null) |
|
|
and c.enforce_type is not null |
|
|
and c.enforce_type is not null |
|
|
@ -422,14 +361,7 @@ |
|
|
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if> |
|
|
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
and YEAR(c.complaint_time)=#{year} |
|
|
and YEAR(c.complaint_time)=#{year} |
|
|
</if> |
|
|
</if> |
|
|
@ -453,7 +385,6 @@ |
|
|
</select> |
|
|
</select> |
|
|
<select id="staisticalComplaint_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
<select id="staisticalComplaint_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
select count(1) from complaint_statistics c |
|
|
select count(1) from complaint_statistics c |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on c.enterprise_number=e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and (c.rid is not null or c.complaint_department_id is not null) |
|
|
and (c.rid is not null or c.complaint_department_id is not null) |
|
|
and c.enforce_type is not null |
|
|
and c.enforce_type is not null |
|
|
@ -465,14 +396,7 @@ |
|
|
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if> |
|
|
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
and YEAR(c.complaint_time)+1=#{year} |
|
|
and YEAR(c.complaint_time)+1=#{year} |
|
|
</if> |
|
|
</if> |
|
|
@ -496,7 +420,6 @@ |
|
|
</select> |
|
|
</select> |
|
|
<select id="staisticalComplaint_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
<select id="staisticalComplaint_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
select count(1) from complaint_statistics c |
|
|
select count(1) from complaint_statistics c |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on c.enterprise_number=e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and (c.rid is not null or c.complaint_department_id is not null) |
|
|
and (c.rid is not null or c.complaint_department_id is not null) |
|
|
and c.enforce_type is not null |
|
|
and c.enforce_type is not null |
|
|
@ -508,14 +431,7 @@ |
|
|
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if> |
|
|
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
and YEAR(c.complaint_time)+1=#{year} |
|
|
and YEAR(c.complaint_time)+1=#{year} |
|
|
</if> |
|
|
</if> |
|
|
@ -541,7 +457,6 @@ |
|
|
<!-- 执法预警 --> |
|
|
<!-- 执法预警 --> |
|
|
<select id="staisticalWarning" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer"> |
|
|
<select id="staisticalWarning" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="integer"> |
|
|
select COALESCE(SUM(w.enforcement_number), 0) from law_enforcement_warning_list w |
|
|
select COALESCE(SUM(w.enforcement_number), 0) from law_enforcement_warning_list w |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on w.enterprise_number=e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and w.enterprise_number is not null |
|
|
and w.enterprise_number is not null |
|
|
and warn_type = 1 |
|
|
and warn_type = 1 |
|
|
@ -549,14 +464,6 @@ |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
and w.enforcement_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
and w.enforcement_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
and YEAR(w.create_time)=#{year} |
|
|
and YEAR(w.create_time)=#{year} |
|
|
</if> |
|
|
</if> |
|
|
@ -580,7 +487,6 @@ |
|
|
</select> |
|
|
</select> |
|
|
<select id="staisticalWarning_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
<select id="staisticalWarning_rr" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
select COALESCE(SUM(w.enforcement_number), 0) from law_enforcement_warning_list w |
|
|
select COALESCE(SUM(w.enforcement_number), 0) from law_enforcement_warning_list w |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on w.enterprise_number=e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and w.enterprise_number is not null |
|
|
and w.enterprise_number is not null |
|
|
and warn_type = 1 |
|
|
and warn_type = 1 |
|
|
@ -588,14 +494,7 @@ |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
and w.enforcement_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
and w.enforcement_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
and YEAR(w.create_time)+1=#{year} |
|
|
and YEAR(w.create_time)+1=#{year} |
|
|
</if> |
|
|
</if> |
|
|
@ -619,7 +518,6 @@ |
|
|
</select> |
|
|
</select> |
|
|
<select id="staisticalWarning_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
<select id="staisticalWarning_yoy" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="double"> |
|
|
select COALESCE(SUM(w.enforcement_number), 0) from law_enforcement_warning_list w |
|
|
select COALESCE(SUM(w.enforcement_number), 0) from law_enforcement_warning_list w |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on w.enterprise_number=e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and w.enterprise_number is not null |
|
|
and w.enterprise_number is not null |
|
|
and warn_type = 1 |
|
|
and warn_type = 1 |
|
|
@ -627,14 +525,6 @@ |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
and w.enforcement_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
and w.enforcement_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
<if test="dateType != null and dateType != '' and dateType == 'year' "> |
|
|
and YEAR(w.create_time)+1=#{year} |
|
|
and YEAR(w.create_time)+1=#{year} |
|
|
</if> |
|
|
</if> |
|
|
@ -767,7 +657,6 @@ |
|
|
<!-- 被检查企业次数排行 --> |
|
|
<!-- 被检查企业次数排行 --> |
|
|
<select id="staisticalRegistration_order" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map"> |
|
|
<select id="staisticalRegistration_order" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map"> |
|
|
select r.enterprise_name, count(1) as num from enforcement_registration r |
|
|
select r.enterprise_name, count(1) as num from enforcement_registration r |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and r.bureau_dept_name is not null |
|
|
and r.bureau_dept_name is not null |
|
|
and r.is_submit = 1 |
|
|
and r.is_submit = 1 |
|
|
@ -785,35 +674,13 @@ |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
and r.bureau_dept_id in (select sd.dept_id from sys_dept sd where sd.area_node = #{deptId} or sd.dept_id = #{deptId}) |
|
|
and r.bureau_dept_id in (select sd.dept_id from sys_dept sd where sd.area_node = #{deptId} or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="beginTime != null and beginTime != ''"> |
|
|
<if test="beginTime != null and beginTime != ''"> |
|
|
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >=#{beginTime} |
|
|
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >=#{beginTime} |
|
|
</if> |
|
|
</if> |
|
|
<if test="endTime != null and endTime != ''"> |
|
|
<if test="endTime != null and endTime != ''"> |
|
|
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} |
|
|
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">--> |
|
|
|
|
|
<!-- and YEAR(r.create_time)=#{year}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">--> |
|
|
|
|
|
<!-- and YEAR(r.create_time)=#{year}--> |
|
|
|
|
|
<!-- and QUARTER(r.create_time)=#{quarter}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">--> |
|
|
|
|
|
<!-- and YEAR(r.create_time)=#{year}--> |
|
|
|
|
|
<!-- and MONTH(r.create_time)=#{month}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">--> |
|
|
|
|
|
<!-- and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')--> |
|
|
|
|
|
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 数据范围过滤 --> |
|
|
<!-- 数据范围过滤 --> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
@ -828,7 +695,6 @@ |
|
|
<!-- 被投诉单位排行 --> |
|
|
<!-- 被投诉单位排行 --> |
|
|
<select id="staisticalComplaint_order" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map"> |
|
|
<select id="staisticalComplaint_order" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map"> |
|
|
select c.complaint_department, count(1) as num from complaint_statistics c |
|
|
select c.complaint_department, count(1) as num from complaint_statistics c |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on c.enterprise_number=e.enterprise_number --> |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
and (c.rid is not null or c.complaint_department_id is not null) |
|
|
and (c.rid is not null or c.complaint_department_id is not null) |
|
|
and c.enforce_type is not null |
|
|
and c.enforce_type is not null |
|
|
@ -837,35 +703,13 @@ |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="beginTime != null and beginTime != ''"> |
|
|
<if test="beginTime != null and beginTime != ''"> |
|
|
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >=#{beginTime} |
|
|
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >=#{beginTime} |
|
|
</if> |
|
|
</if> |
|
|
<if test="endTime != null and endTime != ''"> |
|
|
<if test="endTime != null and endTime != ''"> |
|
|
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} |
|
|
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">--> |
|
|
|
|
|
<!-- and YEAR(c.complaint_time)=#{year}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">--> |
|
|
|
|
|
<!-- and YEAR(c.complaint_time)=#{year}--> |
|
|
|
|
|
<!-- and QUARTER(c.complaint_time)=#{quarter}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">--> |
|
|
|
|
|
<!-- and YEAR(c.complaint_time)=#{year}--> |
|
|
|
|
|
<!-- and MONTH(c.complaint_time)=#{month}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">--> |
|
|
|
|
|
<!-- and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')--> |
|
|
|
|
|
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d')--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- 数据范围过滤 --> |
|
|
<!-- 数据范围过滤 --> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
${params.dataScope} |
|
|
${params.dataScope} |
|
|
@ -879,8 +723,7 @@ |
|
|
<!-- 执法检查数量排行 --> |
|
|
<!-- 执法检查数量排行 --> |
|
|
<select id="staisticalBureau_order" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map"> |
|
|
<select id="staisticalBureau_order" parameterType="com.zdxt.enforcementcode.domain.bo.SixAnalysisParamsBo" resultType="map"> |
|
|
select r.bureau_dept_name, count(1) as num from enforcement_registration r |
|
|
select r.bureau_dept_name, count(1) as num from enforcement_registration r |
|
|
<!-- left join (select * from enterprise_information group by enterprise_number) e on r.enterprise_number = e.enterprise_number --> |
|
|
<where> |
|
|
<where> |
|
|
|
|
|
and r.bureau_dept_name is not null |
|
|
and r.bureau_dept_name is not null |
|
|
and r.is_submit = 1 |
|
|
and r.is_submit = 1 |
|
|
and r.law_enforcement_id is not null |
|
|
and r.law_enforcement_id is not null |
|
|
@ -897,35 +740,13 @@ |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
and r.bureau_dept_id in (select sd.dept_id from sys_dept sd where sd.area_node = #{deptId} or sd.dept_id = #{deptId}) |
|
|
and r.bureau_dept_id in (select sd.dept_id from sys_dept sd where sd.area_node = #{deptId} or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="qy != null and qy != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))--> |
|
|
|
|
|
<!-- <if test="jd != null and jd != ''">--> |
|
|
|
|
|
<!-- and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区',#{jd},'%')or--> |
|
|
|
|
|
<!-- e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%'))--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="beginTime != null and beginTime != ''"> |
|
|
<if test="beginTime != null and beginTime != ''"> |
|
|
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >=#{beginTime} |
|
|
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >=#{beginTime} |
|
|
</if> |
|
|
</if> |
|
|
<if test="endTime != null and endTime != ''"> |
|
|
<if test="endTime != null and endTime != ''"> |
|
|
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} |
|
|
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">--> |
|
|
|
|
|
<!-- and YEAR(r.create_time)=#{year}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">--> |
|
|
|
|
|
<!-- and YEAR(r.create_time)=#{year}--> |
|
|
|
|
|
<!-- and QUARTER(r.create_time)=#{quarter}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">--> |
|
|
|
|
|
<!-- and YEAR(r.create_time)=#{year}--> |
|
|
|
|
|
<!-- and MONTH(r.create_time)=#{month}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">--> |
|
|
|
|
|
<!-- and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')--> |
|
|
|
|
|
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- 数据范围过滤 --> |
|
|
<!-- 数据范围过滤 --> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
${params.dataScope} |
|
|
${params.dataScope} |
|
|
@ -976,21 +797,6 @@ |
|
|
<if test="endTime != null and endTime != ''"> |
|
|
<if test="endTime != null and endTime != ''"> |
|
|
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} |
|
|
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">--> |
|
|
|
|
|
<!-- and YEAR(r.create_time)=#{year}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">--> |
|
|
|
|
|
<!-- and YEAR(r.create_time)=#{year}--> |
|
|
|
|
|
<!-- and QUARTER(r.create_time)=#{quarter}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">--> |
|
|
|
|
|
<!-- and YEAR(r.create_time)=#{year}--> |
|
|
|
|
|
<!-- and MONTH(r.create_time)=#{month}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">--> |
|
|
|
|
|
<!-- and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')--> |
|
|
|
|
|
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- 数据范围过滤 --> |
|
|
<!-- 数据范围过滤 --> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
${params.dataScope} |
|
|
${params.dataScope} |
|
|
@ -1032,21 +838,7 @@ |
|
|
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%')) |
|
|
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区',#{jd},'%')) |
|
|
</if> |
|
|
</if> |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">--> |
|
|
|
|
|
<!-- and YEAR(r.create_time)=#{year}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">--> |
|
|
|
|
|
<!-- and YEAR(r.create_time)=#{year}--> |
|
|
|
|
|
<!-- and QUARTER(r.create_time)=#{quarter}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">--> |
|
|
|
|
|
<!-- and YEAR(r.create_time)=#{year}--> |
|
|
|
|
|
<!-- and MONTH(r.create_time)=#{month}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">--> |
|
|
|
|
|
<!-- and DATE_FORMAT(r.create_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')--> |
|
|
|
|
|
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.create_time,'%Y-%m-%d')--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="beginTime != null and beginTime != ''"> |
|
|
<if test="beginTime != null and beginTime != ''"> |
|
|
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >=#{beginTime} |
|
|
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >=#{beginTime} |
|
|
</if> |
|
|
</if> |
|
|
@ -1089,21 +881,7 @@ |
|
|
<if test="endTime != null and endTime != ''"> |
|
|
<if test="endTime != null and endTime != ''"> |
|
|
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} |
|
|
and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{endTime} |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'year' ">--> |
|
|
|
|
|
<!-- and YEAR(c.complaint_time)=#{year}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'quarter' ">--> |
|
|
|
|
|
<!-- and YEAR(c.complaint_time)=#{year}--> |
|
|
|
|
|
<!-- and QUARTER(c.complaint_time)=#{quarter}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'month' ">--> |
|
|
|
|
|
<!-- and YEAR(c.complaint_time)=#{year}--> |
|
|
|
|
|
<!-- and MONTH(c.complaint_time)=#{month}--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- <if test="dateType != null and dateType != '' and dateType == 'day' ">--> |
|
|
|
|
|
<!-- and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')--> |
|
|
|
|
|
<!-- and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d')--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<!-- 数据范围过滤 --> |
|
|
<!-- 数据范围过滤 --> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
${params.dataScope} |
|
|
${params.dataScope} |
|
|
@ -1152,11 +930,10 @@ |
|
|
and r.is_complaint is not null |
|
|
and r.is_complaint is not null |
|
|
and r.check_category is not null |
|
|
and r.check_category is not null |
|
|
and r.bureau_dept_id is not null |
|
|
and r.bureau_dept_id is not null |
|
|
<!-- <if test="params.zone != null and params.zone != ''"> and r.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone}) </if>--> |
|
|
<if test="params.zone != null and params.zone != ''"> and r.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone}) </if>--> |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
and r.bureau_dept_id in (select sd.dept_id from sys_dept sd where sd.area_node = #{deptId} or sd.dept_id = #{deptId}) |
|
|
and r.bureau_dept_id in (select sd.dept_id from sys_dept sd where sd.area_node = #{deptId} or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%')) </if>--> |
|
|
|
|
|
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if> |
|
|
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if> |
|
|
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') </if> |
|
|
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') </if> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
@ -1231,11 +1008,9 @@ |
|
|
and r.enterprise_number is not null |
|
|
and r.enterprise_number is not null |
|
|
and r.law_enforcer is not null |
|
|
and r.law_enforcer is not null |
|
|
and r.bureau_dept_id is not null |
|
|
and r.bureau_dept_id is not null |
|
|
<!-- <if test="params.zone != null and params.zone != ''"> and r.bureau_dept_id in (select dept_id from sys_dept where zone = #{params.zone}) </if>--> |
|
|
|
|
|
<if test="deptId != null and deptId != ''"> |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
and r.bureau_dept_id in (select sd.dept_id from sys_dept sd where sd.area_node = #{deptId} or sd.dept_id = #{deptId}) |
|
|
and r.bureau_dept_id in (select sd.dept_id from sys_dept sd where sd.area_node = #{deptId} or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two like concat('%',#{userId}, '%')) </if>--> |
|
|
|
|
|
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if> |
|
|
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if> |
|
|
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') </if> |
|
|
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(r.enforcement_time,'%Y-%m-%d') </if> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
@ -1648,13 +1423,10 @@ |
|
|
and (c.rid is not null or c.complaint_department_id is not null) |
|
|
and (c.rid is not null or c.complaint_department_id is not null) |
|
|
and c.enforce_type is not null |
|
|
and c.enforce_type is not null |
|
|
and c.enterprise_number is not null |
|
|
and c.enterprise_number is not null |
|
|
<!-- <if test="params.zone != null and params.zone != ''">--> |
|
|
|
|
|
<!-- and c.complaint_department_id in (select dept_id from sys_dept where zone = #{params.zone})--> |
|
|
|
|
|
<!-- </if>--> |
|
|
|
|
|
<if test="deptId != null and deptId != ''"> |
|
|
<if test="deptId != null and deptId != ''"> |
|
|
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
and c.complaint_department_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId}) |
|
|
</if> |
|
|
</if> |
|
|
<!-- <if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or c.law_enforcer_id_two=#{userId}) </if>--> |
|
|
|
|
|
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if> |
|
|
<if test="beginTime != null and beginTime != ''"> and DATE_FORMAT(c.complaint_time,'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d') </if> |
|
|
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d') </if> |
|
|
<if test="endTime != null and endTime != ''"> and DATE_FORMAT(#{endTime},'%Y-%m-%d') >= DATE_FORMAT(c.complaint_time,'%Y-%m-%d') </if> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
<if test="params.dataScope != null and params.dataScope != ''"> |
|
|
|