baizonghao
2023-03-18 807dc1fff85979874fbfc185918025e6b922ee3c
ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml
@@ -85,13 +85,16 @@
                and t4.name like concat('%', #{categorySmall},'%')
            </if>
            <if test="street != null">
                and ubc.community_id = #{street}
                and ubc.street_id = #{street}
            </if>
            <if test="site">
                and ubc.site like concat('%', #{site},'%')
            </if>
            <if test="startTime !='' and endTime !='' and startTime!=null and endTime !=null">
                and ubc.create_time between #{startTime} and #{endTime}
            </if>
            <if test="violationsTypeId !=null">
                and uv.grade_id = #{violationsTypeId}
            </if>
        </where>
@@ -413,14 +416,22 @@
    </select>
    <select id="selectOnTimeCaseCount" resultType="java.lang.Long">
        SELECT COUNT(1) FROM ums_dispose_record WHERE end_time &lt; limit_time
        SELECT COUNT(1)
        FROM ums_dispose_record
        WHERE end_time &lt; limit_time
    </select>
    <select id="selectOnTimeCaseLastMonthCount" resultType="java.lang.Long">
        SELECT COUNT(1) FROM ums_dispose_record WHERE end_time &lt; limit_time  AND PERIOD_DIFF( date_format( now( ), '%Y%m' ), date_format( create_time, '%Y%m' ) ) =1
        SELECT COUNT(1)
        FROM ums_dispose_record
        WHERE end_time &lt; limit_time
          AND PERIOD_DIFF(date_format(now(), '%Y%m'), date_format(create_time, '%Y%m')) = 1
    </select>
    <select id="selectOnTimeCaseRecentlyMonthCount" resultType="java.lang.Long">
        SELECT COUNT(1) FROM ums_dispose_record WHERE end_time &lt; limit_time  AND PERIOD_DIFF( date_format( now( ), '%Y%m' ), date_format( create_time, '%Y%m' ) ) =0
        SELECT COUNT(1)
        FROM ums_dispose_record
        WHERE end_time &lt; limit_time
          AND PERIOD_DIFF(date_format(now(), '%Y%m'), date_format(create_time, '%Y%m')) = 0
    </select>
</mapper>