Browse Source

统计用到的创建时间改成执法时间

v6
蟑螂恶霸 1 year ago
parent
commit
f0af76febd
  1. 34
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml
  2. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml

34
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml

@ -187,19 +187,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and bureau_dept_name like concat('%', #{bureauDeptName}, '%') and bureau_dept_name like concat('%', #{bureauDeptName}, '%')
</if> </if>
<if test="beginTime != null and beginTime != ''"> <if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d') >= #{beginTime} and DATE_FORMAT(enforcement_time,'%Y-%m-%d') >= #{beginTime}
</if> </if>
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
and #{endTime} >= DATE_FORMAT(create_time,'%Y-%m-%d') and #{endTime} >= DATE_FORMAT(enforcement_time,'%Y-%m-%d')
</if> </if>
<if test="year != null and year != ''"> <if test="year != null and year != ''">
and YEAR(create_time) = #{year} and YEAR(enforcement_time) = #{year}
</if> </if>
<if test="quarter != null and quarter != '' "> <if test="quarter != null and quarter != '' ">
and QUARTER(create_time) = #{quarter} and QUARTER(enforcement_time) = #{quarter}
</if> </if>
<if test="month != null and month != '' "> <if test="month != null and month != '' ">
and DATE_FORMAT(create_time, '%m') = #{month} and DATE_FORMAT(enforcement_time, '%m') = #{month}
</if> </if>
<if test="params.dataScope != null and params.dataScope != ''"> <if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope} ${params.dataScope}
@ -223,19 +223,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bureau_dept_name like concat('%', #{bureauDeptName}, '%') bureau_dept_name like concat('%', #{bureauDeptName}, '%')
</if> </if>
<if test="beginTime != null and beginTime != ''"> <if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d') >= #{beginTime} and DATE_FORMAT(enforcement_time,'%Y-%m-%d') >= #{beginTime}
</if> </if>
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
and #{endTime} >= DATE_FORMAT(create_time,'%Y-%m-%d') and #{endTime} >= DATE_FORMAT(enforcement_time,'%Y-%m-%d')
</if> </if>
<if test="year != null and year != ''"> <if test="year != null and year != ''">
and YEAR(create_time) = #{year} and YEAR(enforcement_time) = #{year}
</if> </if>
<if test="quarter != null and quarter != '' "> <if test="quarter != null and quarter != '' ">
and QUARTER(create_time) = #{quarter} and QUARTER(enforcement_time) = #{quarter}
</if> </if>
<if test="month != null and month != '' "> <if test="month != null and month != '' ">
and DATE_FORMAT(create_time, '%m') = #{month} and DATE_FORMAT(enforcement_time, '%m') = #{month}
</if> </if>
<if test="params.dataScope != null and params.dataScope != ''"> <if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope} ${params.dataScope}
@ -291,19 +291,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and bureau_dept_name like concat('%', #{bureauDeptName}, '%') and bureau_dept_name like concat('%', #{bureauDeptName}, '%')
</if> </if>
<if test="beginTime != null and beginTime != ''"> <if test="beginTime != null and beginTime != ''">
and <![CDATA[ create_time >= concat('%', #{beginTime}, '%') ]]> and <![CDATA[ create_time >= concat('%', #{enforcement_time}, '%') ]]>
</if> </if>
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
and <![CDATA[ create_time <= concat('%', #{endTime}, '%') ]]> and <![CDATA[ create_time <= concat('%', #{enforcement_time}, '%') ]]>
</if> </if>
<if test="year != null and year != ''"> <if test="year != null and year != ''">
and YEAR(create_time) = #{year} and YEAR(enforcement_time) = #{year}
</if> </if>
<if test="quarter != null and quarter != '' "> <if test="quarter != null and quarter != '' ">
and QUARTER(create_time) = #{quarter} and QUARTER(enforcement_time) = #{quarter}
</if> </if>
<if test="month != null and month != '' "> <if test="month != null and month != '' ">
and DATE_FORMAT(create_time, '%m') = #{month} and DATE_FORMAT(enforcement_time, '%m') = #{month}
</if> </if>
<if test="params.dataScope != null and params.dataScope != ''"> <if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope} ${params.dataScope}
@ -359,7 +359,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM enforcement_inspection_program FROM enforcement_inspection_program
<where> <where>
<if test="year != null and year != ''"> <if test="year != null and year != ''">
AND YEAR(create_time) = #{year} AND YEAR(enforcement_time) = #{year}
</if> </if>
<if test="params.dataScope != null and params.dataScope != ''"> <if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope} ${params.dataScope}
@ -424,7 +424,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM enforcement_inspection_program FROM enforcement_inspection_program
<where> <where>
<if test="year != null and year != ''"> <if test="year != null and year != ''">
AND YEAR(create_time) = #{year} AND YEAR(enforcement_time) = #{year}
</if> </if>
<if test="params.dataScope != null and params.dataScope != ''"> <if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope} ${params.dataScope}

2
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml

@ -505,7 +505,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.dataScope} ${params.dataScope}
</if> </if>
</where> </where>
order by create_time desc order by enforcement_time desc
</select> </select>
<select id="selectEnforcementRegistrationAndAddressList" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult"> <select id="selectEnforcementRegistrationAndAddressList" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult">

Loading…
Cancel
Save