From b431c00a3e736e27599cd34793c65369fdb7b8cd Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Thu, 04 Jan 2024 15:50:50 +0800
Subject: [PATCH] 模拟成绩查询修改

---
 src/main/java/org/springblade/modules/exam/mapper/ScoreAuditRecordsMapper.xml |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/springblade/modules/exam/mapper/ScoreAuditRecordsMapper.xml b/src/main/java/org/springblade/modules/exam/mapper/ScoreAuditRecordsMapper.xml
index e350d6e..dba7af8 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ScoreAuditRecordsMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ScoreAuditRecordsMapper.xml
@@ -11,8 +11,9 @@
             bu.sex,bu.cardid idCardNo,
             ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING( bu.cardid,7,4),0) age,
             bu1.real_name applyRealName,
-            ke.exam_name examName,
-            bt1.dept_name applyUnitName
+            ke.exam_name examName,date_format(ke.start_time,'%Y-%m-%d') examTime,
+            bt1.dept_name applyUnitName,
+            bu2.real_name as auditUserName
         FROM
             sys_score_audit_records ssar
         left join
@@ -47,10 +48,15 @@
             sys_jurisdiction sj
         on
             sj.id = si.jurisdiction
+        left join
+            blade_user bu2
+        on
+            ssar.audit_user = bu2.id
         WHERE
             1=1
         and bu.status = 1
         and bu.is_deleted = 0
+        and es.is_deleted = 0
         <if test="scoreAuditRecords.jurisdiction!=null and scoreAuditRecords.jurisdiction!='' and scoreAuditRecords.jurisdiction!='1372091709474910209'">
             and (sj.id=#{scoreAuditRecords.jurisdiction} or sj.parent_id=#{scoreAuditRecords.jurisdiction})
         </if>
@@ -69,6 +75,9 @@
         <if test="scoreAuditRecords.examName!=null and  scoreAuditRecords.examName!=''">
             and ke.exam_name like concat('%', #{scoreAuditRecords.examName},'%')
         </if>
+        <if test="scoreAuditRecords.examTime!=null and  scoreAuditRecords.examTime!=''">
+            and date_format(ke.start_time,'%Y-%m-%d') = #{scoreAuditRecords.examTime}
+        </if>
         <if test="scoreAuditRecords.trainUnitId!=null and  scoreAuditRecords.trainUnitId!=''">
             and bt1.id = #{scoreAuditRecords.trainUnitId}
         </if>

--
Gitblit v1.9.3