From 54a6c048c97011cd2a99fbef2065afe0a167fcfc Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期一, 22 七月 2024 13:46:05 +0800
Subject: [PATCH] fix:成绩统计导出完善
---
src/main/resources/mapper/SubjectMapper.xml | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/SubjectMapper.xml b/src/main/resources/mapper/SubjectMapper.xml
index c7b6258..e7d4ac5 100644
--- a/src/main/resources/mapper/SubjectMapper.xml
+++ b/src/main/resources/mapper/SubjectMapper.xml
@@ -116,9 +116,9 @@
<select id="allSubject" resultMap="BaseResultMap">
select
- ts.id, ts.name
+ DISTINCT ts.id, ts.name
from t_subject ts
- <if test="deptIds != null and deptIds.size > 0">
+ <if test="admin == false and deptIds != null and deptIds.size > 0">
INNER JOIN t_subject_dept tsd ON tsd.subject_id = ts.id
AND tsd.dept_id IN
<foreach collection="deptIds" open="(" separator="," close=")" item="deptId">#{deptId}</foreach>
@@ -126,6 +126,16 @@
where ts.deleted = 0
</select>
+ <select id="listByDeptId" resultMap="BaseResultMap">
+ select ts.id,
+ ts.name
+ from t_subject ts
+ INNER JOIN t_subject_dept tsd ON tsd.subject_id = ts.id
+ AND tsd.dept_id = #{deptId}
+ where ts.deleted = 0
+ </select>
+
+
<select id="page" resultMap="BaseResultMap"
parameterType="com.mindskip.xzs.viewmodel.admin.education.SubjectPageRequestVM">
SELECT
--
Gitblit v1.8.0