吉安感知网项目-后端
linwei
2026-08-04 89fd0b6ff97e90220376cec824eaf8eabb9d0a3e
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdClueEventMapper.xml
@@ -78,7 +78,7 @@
    <resultMap id="gdClueEventCountVoResultMap" type="org.sxkj.gd.workorder.vo.GdClueEventCountVO">
        <result column="total_count" property="totalCount"/>
        <result column="my_count" property="myCount"/>
        <result column="returned_count" property="returnedCount"/>
        <result column="disposing_count" property="disposingCount"/>
        <result column="disposed_count" property="disposedCount"/>
        <result column="completed_count" property="completedCount"/>
    </resultMap>
@@ -145,7 +145,8 @@
            </foreach>
        </if>
        <if test="keyword != null and keyword != ''">
            and ce.event_num::VARCHAR like concat('%', #{keyword}, '%')
            and (ce.event_num::VARCHAR like concat('%', #{keyword}, '%')
                 or ce.event_name::VARCHAR like like concat('%', #{keyword}, '%'))
        </if>
        <if test="onlyMine != null and onlyMine == 1">
            and ce.dispose_user = #{userId}
@@ -208,7 +209,7 @@
    <select id="selectGdClueEventCount" resultMap="gdClueEventCountVoResultMap">
        select count(1) as total_count,
        COALESCE(sum(case when ce.dispose_user = #{userId} then 1 else 0 end), 0) as my_count,
        COALESCE(sum(case when ce.event_status = 2 then 1 else 0 end), 0) as returned_count,
        COALESCE(sum(case when ce.event_status = 1 then 1 else 0 end), 0) as disposing_count,
        COALESCE(sum(case when ce.event_status = 3 then 1 else 0 end), 0) as disposed_count,
        COALESCE(sum(case when ce.event_status = 4 then 1 else 0 end), 0) as completed_count
        from ja_gd_clue_event ce
@@ -223,7 +224,8 @@
            </foreach>
        </if>
        <if test="keyword != null and keyword != ''">
            and ce.event_num like concat('%', #{keyword}, '%')
            and (ce.event_num like concat('%', #{keyword}, '%')
                 or ce.event_name like concat('%', #{keyword}, '%'))
        </if>
    </select>