You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
3.6 KiB
90 lines
3.6 KiB
<?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.research.system.persist.dao.TaskDao">
|
|
|
|
<resultMap id="BaseResultMap" type="com.research.system.domain.vo.TaskVo$TaskResult">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="proj_id" jdbcType="BIGINT" property="projId" />
|
|
<result column="proj_org_id" jdbcType="BIGINT" property="projOrgId" />
|
|
<result column="task_name" jdbcType="VARCHAR" property="taskName" />
|
|
<result column="task_type" jdbcType="CHAR" property="taskType" />
|
|
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
|
|
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
|
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
|
<result column="initiator" jdbcType="VARCHAR" property="initiator" />
|
|
<result column="priority" jdbcType="INTEGER" property="priority" />
|
|
<result column="status" jdbcType="TINYINT" property="status" />
|
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="ktGroupName" jdbcType="BIGINT" property="ktGroupName" />
|
|
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
|
<result column="deliverables" jdbcType="LONGVARCHAR" property="deliverables" />
|
|
<collection property="deliverableList" select="queryDeliverableList"
|
|
ofType="com.research.system.domain.vo.TaskVo$DeliverableResult"
|
|
column="id">
|
|
</collection>
|
|
<collection property="executorList" select="queryExecutorList"
|
|
ofType="com.research.system.domain.vo.TaskVo$ExecutorResult"
|
|
column="id">
|
|
</collection>
|
|
</resultMap>
|
|
|
|
<select id="queryList" resultMap="BaseResultMap">
|
|
select
|
|
t.*,
|
|
g.kt_group_name as ktGroupName
|
|
from
|
|
task_list t
|
|
left join
|
|
kts_kt_group g on g.id = t.kt_group_id
|
|
where
|
|
t.del_flag = 0
|
|
<if test="dto.taskName != null">
|
|
and t.task_name like concat('%',#{dto.taskName},'%')
|
|
</if>
|
|
order by
|
|
t.id desc
|
|
</select>
|
|
|
|
<select id="queryExecutorList" resultType="com.research.system.domain.vo.TaskVo$ExecutorResult">
|
|
select
|
|
e.executor_id as executorId,
|
|
m.member_name as memberName
|
|
from
|
|
task_executor e
|
|
left join
|
|
kts_kt_group_member m on e.executor_id = m.id
|
|
where
|
|
e.del_flag = 0
|
|
<if test="id != null">
|
|
and
|
|
e.task_id = #{id}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="queryDeliverableList" resultType="com.research.system.domain.vo.TaskVo$DeliverableResult">
|
|
select
|
|
id,
|
|
task_id as taskId,
|
|
deliverable_name as deliverableName,
|
|
deliverable_url as deliverableUrl,
|
|
delivery_status as deliveryStatus,
|
|
submitter_account as submitterAccount,
|
|
delivery_instructions as deliveryInstructions,
|
|
reference_materials as referenceMaterials,
|
|
submission_time as submissionTime,
|
|
reviewer_account as reviewerAccount,
|
|
review_time as reviewTime,
|
|
create_by as createBy,
|
|
create_time as createTime
|
|
from
|
|
task_deliverable
|
|
where
|
|
del_flag = 0
|
|
<if test="id != null">
|
|
and
|
|
task_id = #{id}
|
|
</if>
|
|
</select>
|
|
|
|
</mapper>
|
|
|