75 lines
2.9 KiB
XML
75 lines
2.9 KiB
XML
<?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.ruoyi.bgt.mapper.BgtProjectTaskProgressMapper">
|
|
|
|
<resultMap type="com.ruoyi.bgt.domain.BgtProjectTaskProgress" id="BgtProjectTaskProgressResult">
|
|
<result property="id" column="id"/>
|
|
<result property="projectId" column="project_id"/>
|
|
<result property="sectionId" column="section_id"/>
|
|
<result property="subId" column="sub_id"/>
|
|
<result property="taskId" column="task_id"/>
|
|
<result property="progressName" column="progress_name"/>
|
|
<result property="director" column="director"/>
|
|
<result property="uploader" column="uploader"/>
|
|
<result property="progress" column="progress"/>
|
|
<result property="progressDescribe" column="progress_describe"/>
|
|
<result property="progressAnnex" column="progress_annex"/>
|
|
<result property="auditStatus" column="audit_status"/>
|
|
<result property="reviewerId" column="reviewer_id"/>
|
|
<result property="delFlag" column="del_flag"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="remark" column="remark"/>
|
|
</resultMap>
|
|
|
|
<select id="appQueryPageList" resultType="com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressVO">
|
|
select bptp.id,
|
|
bptp.progress_name,
|
|
bptp.uploader,
|
|
bptp.progress,
|
|
bptp.audit_status,
|
|
bptp.upload_time,
|
|
bptp.task_staff_num,
|
|
bptp.task_name,
|
|
bptp.project_name
|
|
from bgt_project_task_progress bptp
|
|
|
|
<where>
|
|
<if test="dto.uploaderId != null ">
|
|
and bptp.uploader_id = #{dto.uploaderId}
|
|
</if>
|
|
<if test="dto.reviewerId != null ">
|
|
and bptp.reviewer_id = #{dto.reviewerId}
|
|
</if>
|
|
<if test="dto.auditStatus != null and dto.auditStatus != '' ">
|
|
and bptp.audit_status = #{dto.auditStatus}
|
|
</if>
|
|
<if test="dto.taskId != null">
|
|
and bptp.task_id = #{dto.taskId}
|
|
</if>
|
|
</where>
|
|
order by bptp.id desc
|
|
</select>
|
|
|
|
<select id="getProgressByTaskIds" resultType="com.ruoyi.bgt.domain.BgtProjectTaskProgress">
|
|
SELECT *
|
|
FROM (
|
|
SELECT
|
|
*,
|
|
ROW_NUMBER() OVER (PARTITION BY task_id ORDER BY progress DESC) as rn
|
|
FROM bgt_project_task_progress
|
|
WHERE audit_status = '2'
|
|
AND task_id IN
|
|
<foreach item="taskId" collection="taskIds" open="(" separator="," close=")">
|
|
#{taskId}
|
|
</foreach>
|
|
) AS sub
|
|
WHERE sub.rn = 1 order by create_time desc
|
|
</select>
|
|
|
|
</mapper>
|