From cccb705d0007796019d8dbc5bb56817e856fb075 Mon Sep 17 00:00:00 2001
From: luohairen <3399054449@qq.com>
Date: 星期三, 27 十一月 2024 00:09:52 +0800
Subject: [PATCH] 上级批复,计划日志展示
---
business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml b/business/src/main/resources/mapper/ProjectPlanExamineRecordMapper.xml
index 32dc202..be6c346 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,
@@ -103,5 +116,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;
+ </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