|
|
@@ -0,0 +1,75 @@
|
|
|
+<?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.ydtech.modules.task.dao.TaskProjectMapper">
|
|
|
+
|
|
|
+ <resultMap id="BaseResultMap" type="com.ydtech.modules.task.entity.vo.TaskProjectVo">
|
|
|
+ <id property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="projectType" column="project_type" jdbcType="VARCHAR"/>
|
|
|
+ <result property="projectName" column="project_name" jdbcType="VARCHAR"/>
|
|
|
+ <result property="projectDesc" column="project_desc" jdbcType="DECIMAL"/>
|
|
|
+ <result property="projectStatus" column="project_status" jdbcType="VARCHAR"/>
|
|
|
+ <result property="creator" column="creator" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="createTimeStart" column="createTimeStart" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createTimeEnd" column="createTimeEnd" jdbcType="VARCHAR"/>
|
|
|
+ <collection property="taskList" ofType="com.ydtech.modules.task.entity.po.TaskTask"
|
|
|
+ resultMap="taskList"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <resultMap id="taskList" type="com.ydtech.modules.task.entity.po.TaskTask">
|
|
|
+ <result property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="projectId" column="project_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="taskName" column="task_name" jdbcType="VARCHAR"/>
|
|
|
+ <result property="taskDesc" column="task_desc" jdbcType="VARCHAR"/>
|
|
|
+ <result property="taskStartTime" column="task_start_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="taskEmdTo" column="task_end_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
|
|
|
+ <result property="taskFirst" column="task_first" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="creator" column="creator" jdbcType="TIMESTAMP"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="selectProject" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ a.id,
|
|
|
+ a.project_type,
|
|
|
+ a.project_name,
|
|
|
+ a.project_desc,
|
|
|
+ a.project_status,
|
|
|
+ a.creator,
|
|
|
+ a.create_time,
|
|
|
+ b.task_name,
|
|
|
+ b.parent_id,
|
|
|
+ b.project_id,
|
|
|
+ b.task_desc,
|
|
|
+ b.task_start_time,
|
|
|
+ b.task_end_time,
|
|
|
+ b.task_status,
|
|
|
+ b.task_first,
|
|
|
+ b.create_time,
|
|
|
+ b.creator
|
|
|
+ from task_project a
|
|
|
+ left join task_task b on a.id = b.project_id
|
|
|
+ where
|
|
|
+ 1=1
|
|
|
+ <if test="taskProjectVo.projectType != null and taskProjectVo.projectType != ''">
|
|
|
+ and a.project_type = #{taskProjectVo.projectType}
|
|
|
+ </if>
|
|
|
+ <if test="taskProjectVo.id != null and taskProjectVo.id != ''">
|
|
|
+ and a.id = #{taskProjectVo.id}
|
|
|
+ </if>
|
|
|
+ <if test="taskProjectVo.projectDesc != null and taskProjectVo.projectDesc != ''">
|
|
|
+ and a.project_desc like concat(#{taskProjectVo.projectDesc},'%')
|
|
|
+ </if>
|
|
|
+ <if test="taskProjectVo.projectStatus != null and taskProjectVo.voucherId != ''">
|
|
|
+ and a.project_status = #{taskProjectVo.projectStatus}
|
|
|
+ </if>
|
|
|
+ <if test="taskProjectVo.createTimeStart != null and taskProjectVo.createTimeStart != ''">
|
|
|
+ and a.create_time >= #{taskProjectVo.createTimeStart}
|
|
|
+ </if>
|
|
|
+ <if test="taskProjectVo.createTimeEnd != null and taskProjectVo.createTimeEnd != ''">
|
|
|
+ and a.create_time <= #{taskProjectVo.createTimeEnd}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+</mapper>
|