| | |
| | | <mapper namespace="org.sxkj.gd.workorder.mapper.GdTaskResultMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="gdTaskResultResultMap" type="org.sxkj.gd.workorder.entity.GdTaskResultEntity"> |
| | | <resultMap id="gdTaskResultResultMap" type="org.sxkj.gd.workorder.vo.GdTaskResultVO"> |
| | | <result column="id" property="id"/> |
| | | <result column="patrol_task_id" property="patrolTaskId"/> |
| | | <result column="result_code" property="resultCode"/> |
| | |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="status" property="status"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | <result column="distribute_user_name" property="distributeUserName"/> |
| | | <result column="distribute_dept_name" property="distributeDeptName"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | select * from ja_gd_task_result where is_deleted = 0 |
| | | </select> |
| | | |
| | | <select id="selectGdTaskResultListByPatrolTaskId" resultMap="gdTaskResultResultMap"> |
| | | select tr.*, |
| | | IFNULL(bu.real_name, bu.name) as distribute_user_name, |
| | | bd.dept_name as distribute_dept_name |
| | | from ja_gd_task_result tr |
| | | left join ja_gd_clue_event ce on ce.result_id = tr.id and ce.is_deleted = 0 |
| | | left join blade_user bu on bu.id = ce.create_user and bu.is_deleted = 0 |
| | | left join blade_dept bd on bd.id = ce.create_dept and bd.is_deleted = 0 |
| | | where tr.is_deleted = 0 |
| | | and tr.patrol_task_id = #{patrolTaskId} |
| | | </select> |
| | | |
| | | |
| | | <select id="exportGdTaskResult" resultType="org.sxkj.gd.workorder.excel.GdTaskResultExcel"> |
| | | SELECT * FROM ja_gd_task_result ${ew.customSqlSegment} |