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.

121 lines
4.5 KiB

3 months ago
<?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.*,
3 months ago
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
2 months ago
<if test="dto.taskName != null and dto.taskName != ''">
3 months ago
and t.task_name like concat('%',#{dto.taskName},'%')
</if>
<if test="dto.startTime != null">
and t.start_time between #{dto.startTime} and #{dto.endTime}
</if>
<if test="dto.endTime != null">
and t.end_time between #{dto.startTime} and #{dto.endTime}
</if>
<if test="dto.status != null and dto.status != 0">
<if test="dto.status != 2">
and t.delivery_status = #{dto.status}
</if>
<if test="dto.status == 3">
and t.aduit_status = 0
</if>
</if>
3 months ago
order by
t.id desc
</select>
2 months ago
<select id="detail" 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="id != null">
and t.id = #{id}
</if>
order by
t.id desc
</select>
3 months ago
<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}
3 months ago
</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,
aduit_status as aduitStatus,
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
3 months ago
from
task_deliverable
where
del_flag = 0
<if test="id != null">
and task_id = #{id}
3 months ago
</if>
</select>
</mapper>