baizonghao
2023-02-24 bee1fe3c6f0bf1fe56672f71a001741bc8e9517d
统计报警时间,查询空指针
1个文件已修改
26 ■■■■■ 已修改文件
ycl-platform/src/main/resources/mapper/unlawful/UnlawfulMapper.xml 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/resources/mapper/unlawful/UnlawfulMapper.xml
@@ -263,9 +263,6 @@
<!--    分页数量-->
    <select id="getTotalByType" resultType="java.lang.Integer">
        select
            SUM( CASE WHEN num is null THEN 0 ELSE num END )
        from(
                SELECT
                count(*) num
                FROM
@@ -280,14 +277,8 @@
                <if test="startTime !='' and endTime !='' and startTime!=null and endTime !=null">
                    and ubc.create_time between #{startTime} and #{endTime}
                </if>
                group by
                t4.id
            ) a
    </select>
    <select id="getTotalByStreet" resultType="java.lang.Integer">
        select
            SUM( CASE WHEN num is null THEN 1 ELSE num END )
        from(
                SELECT
                count(*) num
                FROM
@@ -298,18 +289,12 @@
                LEFT JOIN ums_sccg_region t5 ON ubc.street_id = t5.id
                WHERE
                ubc.category = 1
                AND t4.`name` IS NOT NULL
        and t4.`name` is NOT NULL
                <if test="startTime !='' and endTime !='' and startTime!=null and endTime !=null">
                    and ubc.create_time between #{startTime} and #{endTime}
                </if>
                GROUP BY
                ubc.community_id
            ) a
    </select>
    <select id="getTotalBySite" resultType="java.lang.Integer">
        select
            SUM(num)
        from(
                SELECT
                count(*) num
                FROM
@@ -324,14 +309,8 @@
                <if test="startTime !='' and endTime !='' and startTime!=null and endTime !=null">
                    and ubc.create_time between #{startTime} and #{endTime}
                </if>
                GROUP BY
                ubc.site
            ) a
    </select>
    <select id="getTotalByTime" resultType="java.lang.Integer">
        select
            SUM( CASE WHEN num is null THEN 1 ELSE num END )
        from(
                SELECT
                count(*) num
                FROM
@@ -346,8 +325,5 @@
                <if test="startTime !='' and endTime !='' and startTime!=null and endTime !=null">
                    and ubc.alarm_time between #{startTime} and #{endTime}
                </if>
                GROUP BY
                ubc.alarm_time
            ) a
    </select>
</mapper>