From 4611ca4bdc90ed83f533d759bf54ddb8ff70afab Mon Sep 17 00:00:00 2001
From: luohairen <3399054449@qq.com>
Date: 星期四, 28 十一月 2024 01:23:44 +0800
Subject: [PATCH] 进度上报、查看
---
business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml | 64 +++++++++++++++++++++++++++++++-
1 files changed, 62 insertions(+), 2 deletions(-)
diff --git a/business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml b/business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml
index 32dc202..1f5eea5 100644
--- a/business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml
+++ b/business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml
@@ -20,6 +20,19 @@
<result column="gmt_create" property="gmtCreate" />
<result column="gmt_update" property="gmtUpdate" />
</resultMap>
+
+ <resultMap id="selectInfoResultMap" type="com.ycl.domain.vo.DepartmentApprovalResponseVO">
+ <id property="id" column="id" />
+ <result property="title" column="title" />
+ <result property="departmentExamine" column="department_examine" />
+ <result property="departmentApproval" column="department_approval" />
+ <result property="departmentApprovalReply" column="department_approval_reply" />
+ <result property="manageExamine" column="manage_examine" />
+ <result property="manageApproval" column="manage_approval" />
+ <result property="manageApprovalReply" column="manage_approval_reply" />
+ <result property="gmtCreate" column="gmt_create" />
+ </resultMap>
+
<insert id="insertOne">
insert into t_project_plan_examine_record (
project_plan_record_id,
@@ -36,7 +49,8 @@
delay_start_time,
delay_end_time,
gmt_create,
- gmt_update
+ gmt_update,
+ deleted
) values (
#{projectPlanRecordId},
#{projectPlanInfoId},
@@ -52,9 +66,18 @@
#{delayStartTime},
#{delayEndTime},
#{gmtCreate},
- #{gmtUpdate}
+ #{gmtUpdate},
+ #{deleted}
)
</insert>
+ <update id="updateByForm">
+ update t_project_plan_examine_record
+ set
+ department_approval_reply = #{form.departmentApprovalReply},
+ manage_approval_reply = #{form.manageApprovalReply}
+ where
+ id = #{form.id}
+ </update>
<select id="getById" resultMap="BaseResultMap">
@@ -103,5 +126,42 @@
WHERE
TPPER.deleted = 0
</select>
+ <select id="selectInfo" resultType="com.ycl.domain.vo.DepartmentApprovalResponseVO">
+ SELECT
+ ranked.id,
+ (SELECT title FROM t_project_plan_info WHERE id = ranked.project_plan_info_id) as title,
+ ranked.department_examine,
+ ranked.department_approval,
+ ranked.department_approval_reply,
+ ranked.manage_examine,
+ ranked.manage_approval,
+ ranked.manage_approval_reply,
+ ranked.gmt_create
+ FROM (
+ SELECT
+ *,
+ ROW_NUMBER() OVER (PARTITION BY project_plan_info_id ORDER BY gmt_update DESC) AS rn
+ FROM t_project_plan_examine_record AS pper
+ WHERE project_plan_record_id = #{projectPlanRecordId}
+ ) AS ranked
+ WHERE rn = 1 AND ranked.deleted = 0
+ </select>
+
+ <select id="getPlanLog" resultType="com.ycl.domain.vo.DepartmentApprovalResponseVO">
+ SELECT
+ pper.id,
+ (SELECT title FROM t_project_plan_info WHERE id = pper.project_plan_info_id) as title,
+ pper.department_examine,
+ pper.department_approval,
+ pper.department_approval_reply,
+ pper.manage_examine,
+ pper.manage_approval,
+ pper.manage_approval_reply,
+ pper.gmt_create
+ FROM t_project_plan_examine_record AS pper
+ WHERE
+ pper.project_plan_record_id = #{projectPlanRecordId}
+ ORDER BY gmt_update DESC
+ </select>
</mapper>
--
Gitblit v1.8.0