Browse Source

维度统计

v6
yanyan 1 year ago
parent
commit
f2b451c4a4
  1. 10
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComprehensiveAnalysisMapper.xml
  2. 36
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

10
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/ComprehensiveAnalysisMapper.xml

@ -23,7 +23,7 @@
and r.enterprise_number is not null
and r.check_category is not null
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or
r.law_enforcer_id_two=#{userId})
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 != ''">
@ -60,7 +60,7 @@
and r.enterprise_number is not null
and r.check_category is not null
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or
r.law_enforcer_id_two=#{userId})
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 != ''">
@ -97,7 +97,7 @@
and r.enterprise_number is not null
and r.check_category is not null
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or
r.law_enforcer_id_two=#{userId})
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 != ''">
@ -134,7 +134,7 @@
and r.check_category is not null
and e.id is not null
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or
r.law_enforcer_id_two=#{userId})
r.law_enforcer_id_two like concat('%',#{userId}, '%'))
</if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and r.bureau_dept_id=#{bureauDeptId}</if>
<if test="dateType != null and dateType != '' and dateType == 'year' ">
@ -210,7 +210,7 @@
and (c.rid is not null or c.complaint_department_id is not null)
and c.enforce_type is not null
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or
r.law_enforcer_id_two=#{userId})
r.law_enforcer_id_two like concat('%',#{userId}, '%'))
</if>
<if test="bureauDeptId != null and bureauDeptId != '' ">and( r.bureau_dept_id=#{bureauDeptId} or
c.complaint_department_id=#{bureauDeptId})

36
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

@ -141,7 +141,7 @@
</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="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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-->
@ -193,7 +193,7 @@
</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="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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-->
@ -245,7 +245,7 @@
</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="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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-->
@ -777,7 +777,7 @@
and r.bureau_dept_id is not null
<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="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="deptId != null and deptId != ''">
and r.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
@ -882,7 +882,7 @@
and r.bureau_dept_id is not null
<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="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="deptId != null and deptId != ''">
and r.dept_id in (select sd.dept_id from sys_dept sd where find_in_set(#{deptId}, sd.ancestors) or sd.dept_id = #{deptId})
</if>
@ -946,7 +946,7 @@
</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="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="qy != null and qy != ''">
and (e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '区%')or
e.enterprise_address like concat('深圳市',substring_index(#{qy}, "区",1), '新区%'))
@ -1006,7 +1006,7 @@
</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="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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
@ -1149,7 +1149,7 @@
</if>
<if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="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>
</select>
@ -1177,7 +1177,7 @@
</if>
<if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="beginTime != null and beginTime != ''">
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d')>=DATE_SUB(STR_TO_DATE(#{beginTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)
</if>
@ -1209,7 +1209,7 @@
</if>
<if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="beginTime != null and beginTime != ''">
and DATE_FORMAT(DATE_SUB(r.enforcement_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
</if>
@ -1234,7 +1234,7 @@
<if test="deptId != null and deptId != ''">
and r.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 test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="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>
</select>
@ -1257,7 +1257,7 @@
</if>
<if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="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>
</select>
@ -1396,7 +1396,7 @@
</if>
<if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="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>
</select>
@ -1419,7 +1419,7 @@
</if>
<if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="beginTime != null and beginTime != ''">
and DATE_FORMAT(r.enforcement_time,'%Y-%m-%d')>=DATE_SUB(STR_TO_DATE(#{beginTime},"%Y-%m-%d"),INTERVAL TO_DAYS(STR_TO_DATE(#{endTime},"%Y-%m-%d"))-TO_DAYS(STR_TO_DATE(#{beginTime},"%Y-%m-%d"))+1 day)
</if>
@ -1446,7 +1446,7 @@
</if>
<if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="beginTime != null and beginTime != ''">
and DATE_FORMAT(DATE_SUB(r.enforcement_time,INTERVAL -1 year),'%Y-%m-%d') >= DATE_FORMAT(#{beginTime},'%Y-%m-%d')
</if>
@ -1470,7 +1470,7 @@
<if test="deptId != null and deptId != ''">
and r.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 test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="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>
</select>
@ -1497,7 +1497,7 @@
</if>
<if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="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>
</where>
@ -1524,7 +1524,7 @@
</if>
<if test="uniteCheck == '1'.toString()"> and (r.union_no is not null and r.union_no != '')</if>
<if test="uniteCheck == '0'.toString()"> and (r.union_no is null or r.union_no = '')</if>
<if test="userId != null and userId != '' ">and( r.law_enforcer_id=#{userId} or r.law_enforcer_id_two=#{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="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>
</where>

Loading…
Cancel
Save