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>
@@ -279,7 +282,7 @@
    <select id="selectRegisterCount" resultType="java.lang.Long">
        select count(1)
        from ums_base_case
        where state in (2, 6,7,8,9)
        where state in (2, 6, 7, 8, 9)
          and to_days(create_time) = TO_DAYS(now());
    </select>
@@ -334,7 +337,7 @@
        WHEN t1.state = 7 THEN '处置'
        WHEN t1.state = 8 THEN '核查'
        WHEN t1.state = 9 THEN '结案'
        END) `status`              ,
        END) `status` ,
        dd.`name` as grade
        FROM
        ums_base_case t1
@@ -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>