From 62eb499b0c969f246d3245d1429a97da4de1ce28 Mon Sep 17 00:00:00 2001
From: 钟日健 <arsn163@163.com>
Date: Mon, 01 Jun 2026 20:46:13 +0800
Subject: [PATCH] feat: 成绩查询增加年龄查询返回

---
 src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml b/src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
index 1f74690..9c51ba7 100644
--- a/src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
+++ b/src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
@@ -16,7 +16,8 @@
             ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING( bu.cardid,7,4),0) age,
             bu1.real_name applyName,
             bt1.dept_name applyUnit,
-            bu.user_type userType
+            bu.user_type userType,
+            bu.paper_time as userPaperTime
         FROM
             sys_accreditation_records sar
         left join
@@ -32,6 +33,9 @@
         WHERE  1=1
         and bu.status = 1
         and bu.is_deleted = 0
+        <if test="accreditationRecords.userPaperTime != null and accreditationRecords.userPaperTime !=''">
+            AND DATE_FORMAT(bu.paper_time,'%Y-%m-%d')  = #{accreditationRecords.userPaperTime}
+        </if>
         <if test="accreditationRecords.deptName!=null and  accreditationRecords.deptName!=''">
             and bt.dept_name like concat('%', #{accreditationRecords.deptName},'%')
         </if>
@@ -226,7 +230,8 @@
         ELT(sar.audit_status,"待审核","审核通过","审核不通过") auditStatus,
         sar.audit_time auditTime,
         sar.audit_detail auditDetail,
-        if(bu.user_type=6,"是","否") userType
+        if(bu.user_type=6,"是","否") userType,
+        DATE_FORMAT(bu.paper_time,'%Y-%m-%d') as userPaperTime
         FROM
         sys_accreditation_records sar
         left join
@@ -257,6 +262,9 @@
         1=1
         and bu.status = 1
         and bu.is_deleted = 0
+        <if test="accreditationRecords.userPaperTime != null and accreditationRecords.userPaperTime !=''">
+            AND DATE_FORMAT(bu.paper_time,'%Y-%m-%d')  = #{accreditationRecords.userPaperTime}
+        </if>
         <if test="accreditationRecords.deptName!=null and  accreditationRecords.deptName!=''">
             and bt.dept_name like concat('%', #{accreditationRecords.deptName},'%')
         </if>

--
Gitblit v1.9.3