| | |
| | | <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"> |
| | |
| | | <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> |
| | | |
| | |
| | | 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 ( |
| | |
| | | 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> |
| | | |
| | | |
| | |
| | | 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, attachment_type |
| | | 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.attachmentType} |
| | | #{item.status}, #{item.isDeleted}, #{item.attachmentType}, #{item.geojson} |
| | | ) |
| | | </foreach> |
| | | </insert> |