吉安感知网项目-后端
linwei
103 mins ago 08ddfad4530a014094c06fe68b8c2d9a0753403a
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdTaskResultMapper.xml
@@ -25,6 +25,7 @@
        <result column="distribute_dept_name" property="distributeDeptName"/>
        <result column="patrol_task_name" property="patrolTaskName"/>
        <result column="attachment_type" property="attachmentType"/>
        <result column="event_name" property="eventName"/>
    </resultMap>
    <resultMap id="gdTaskResultExcelResultMap" type="org.sxkj.gd.workorder.excel.GdTaskResultExcel">
@@ -75,6 +76,9 @@
        <if test="gdTaskResult.createUser != null">
            AND tr.create_user = #{gdTaskResult.createUser}
        </if>
        <if test="gdTaskResult.attachmentType != null">
            AND tr.attachment_type = #{gdTaskResult.attachmentType}
        </if>
        ORDER BY tr.create_time DESC
    </select>
@@ -82,7 +86,8 @@
        SELECT
            tr.*,
            COALESCE ( bu.real_name, bu.NAME ) AS distribute_user_name,
            bd.dept_name AS distribute_dept_name
            bd.dept_name AS distribute_dept_name,
            ce.event_name
        FROM
            ja_gd_task_result tr
            LEFT JOIN (
@@ -101,6 +106,12 @@
        WHERE
            tr.is_deleted = 0
          AND tr.patrol_task_id = #{patrolTaskId}
          <if test="attachmentTypes != null and attachmentTypes.size() > 0">
          AND tr.attachment_type IN
          <foreach collection="attachmentTypes" item="type" open="(" separator="," close=")">
              #{type}
          </foreach>
          </if>
    </select>
@@ -133,14 +144,14 @@
            patrol_task_id, result_code, result_url, shoot_time,
            photo_data, longitude, latitude, distribute_status, area_code,
            create_user, create_dept, create_time, update_user, update_time,
            status, is_deleted
            status, is_deleted, attachment_type, geojson
        ) VALUES
        <foreach collection="list" item="item" separator=",">
            (
                #{item.patrolTaskId}, #{item.resultCode}, #{item.resultUrl}, #{item.shootTime},
                CASE WHEN #{item.photoData} IS NULL THEN NULL ELSE CAST(#{item.photoData} AS JSONB) END, #{item.longitude}, #{item.latitude}, #{item.distributeStatus}, #{item.areaCode},
                #{item.createUser}, #{item.createDept}, #{item.createTime}, #{item.updateUser}, #{item.updateTime},
                #{item.status}, #{item.isDeleted}
                #{item.status}, #{item.isDeleted}, #{item.attachmentType}, #{item.geojson}
            )
        </foreach>
    </insert>