12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.qunzhixinxi.hnqz.admin.mapper.WmTaskSupervisionMapper">
- <resultMap id="wmTaskSupervisionMap"
- type="com.qunzhixinxi.hnqz.admin.api.entity.WmTaskSupervision">
- <result property="supervisionId" column="sup_id"/>
- <result property="taskId" column="task_id"/>
- <result property="packageId" column="pkg_id"/>
- <result property="supervisionResult" column="sup_res"/>
- <result property="supervisionState" column="sup_state"/>
- <result property="modifiable" column="modifiable"/>
- <result property="roleId" column="role_id"/>
- <result property="remarks" column="remarks"/>
- <result property="createBy" column="create_by"/>
- <result property="updateBy" column="update_by"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- </resultMap>
- <select id="selectByPkgIds" resultMap="wmTaskSupervisionMap">
- SELECT
- sup_id,
- t.id task_id,
- t.score_package_id pkg_id,
- sup.sup_res,
- sup.sup_state,
- sup.modifiable,
- sup.role_id,
- sup.remarks,
- sup.create_by,
- sup.update_by,
- sup.create_time,
- sup.update_time
- FROM wm_task AS t
- JOIN (SELECT DISTINCT h.target_id
- FROM sys_chain_node_check_his h
- WHERE h.node_id = 6
- AND h.check_result = 1
- ) c ON c.target_id = t.id
- LEFT JOIN wm_task_sup AS sup ON sup.task_id = t.id
- LEFT JOIN ops_freeze_task f2099 ON f2099.target_id = t.id
- <where>
- t.del_flag = '0'
- AND t.task_status = '3'
- AND f2099.target_id is null
- <if test="pkgIds != null and pkgIds.size > 0">
- AND t.score_package_id IN
- <foreach collection="pkgIds" item="pid" open="(" close=")" separator=",">#{pid}</foreach>
- </if>
- </where>
- </select>
- </mapper>
|