zouyx 2 years ago
parent
commit
774df846d6
  1. 12
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementCheckStatisticsMapper.xml

12
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementCheckStatisticsMapper.xml

@ -22,7 +22,11 @@
from enforcement_registration e from enforcement_registration e
inner join sys_dept s on e.law_enforcement_id=s.dept_id inner join sys_dept s on e.law_enforcement_id=s.dept_id
inner join enterprise_information i on e.enterprise_number=i.enterprise_number inner join enterprise_information i on e.enterprise_number=i.enterprise_number
where find_in_set(#{deptId},s.ancestors) and (year(e.create_time)=#{year}) and (month(e.create_time)in(${month})) <where>
<if test="deptId != null and deptId != ''">and find_in_set(#{deptId},s.ancestors)</if>
<if test="year != null and year != ''">and (year(e.create_time)=#{year})</if>
<if test="month != null and month != ''">and (month(e.create_time)in(${month}))</if>
</where>
order by e.enterprise_name order by e.enterprise_name
</select> </select>
@ -31,7 +35,11 @@
from enforcement_registration e from enforcement_registration e
inner join sys_dept s on e.law_enforcement_id=s.dept_id inner join sys_dept s on e.law_enforcement_id=s.dept_id
inner join enterprise_information i on e.enterprise_number=i.enterprise_number inner join enterprise_information i on e.enterprise_number=i.enterprise_number
where !find_in_set((select dept_id from sys_dept where dept_name="区"),s.ancestors) and (year(e.create_time)=#{year}) and (month(e.create_time)in(${month})) <where>
and !find_in_set((select dept_id from sys_dept where dept_name="区"),s.ancestors)
<if test="year != null and year != ''">and (year(e.create_time)=#{year})</if>
<if test="month != null and month != ''">and (month(e.create_time)in(${month}))</if>
</where>
order by e.enterprise_name order by e.enterprise_name
</select> </select>

Loading…
Cancel
Save