From 7a7acc33c5658643a54c42bfd6f70ed3881a3248 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期六, 31 八月 2024 19:24:44 +0800
Subject: [PATCH] 点位新增部级标签、点位导入导出优化
---
ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml
index ce044f0..0dbd85f 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml
@@ -181,4 +181,30 @@
LIMIT 1
</if>
</select>
+
+ <select id="selectAndDeptName" resultType="com.ycl.platform.domain.entity.CheckIndexVideo">
+ WITH temp AS (
+ SELECT
+ r.id,
+ r.dept_id,
+ r.platform_online,
+ r.monitor_qualification,
+ d.area,
+ ROW_NUMBER() OVER(PARTITION BY r.dept_id ORDER BY r.create_time DESC) AS rn
+ FROM
+ t_check_index_video r
+ JOIN
+ sys_dept d ON r.dept_id = d.dept_id
+ )
+ SELECT
+ id,
+ dept_id,
+ area as deptName,
+ platform_online,
+ monitor_qualification
+ FROM
+ temp
+ WHERE
+ rn = 1;
+ </select>
</mapper>
--
Gitblit v1.8.0