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/exam/mapper/ExamScoreMapper.xml | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml b/src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
index e67c4bd..916259e 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
@@ -72,6 +72,7 @@
ke.exam_name examName,date_format(ke.start_time,'%Y-%m-%d') startTime,date_format(ke.end_time,'%Y-%m-%d %H:%i:%s') endTime,
str.is_exam isExam,
bu.real_name securityName,company,bu.account,bu.sex,bu.paper_time paperTime,bu.securitynumber securityNumber,bu.avatar,
+ ifnull(TIMESTAMPDIFF(YEAR, SUBSTRING(bu.cardid, 7, 8), CURDATE()),0) AS age,
bd.dept_name companyName,bu.user_type isPaper,bud.unit_name unitName
from
exam_score es
@@ -525,13 +526,17 @@
id
</select>
<select id="getList" resultType="org.springblade.modules.exam.vo.ExamScoreVO">
+ SELECT * FROM (
SELECT
es.id,es.theory_grade theoryGrade,ifnull(learn_grade,-1) learnGrade,es.user_id userId,es.exam_id examId,
es.exam_time examTime,all_grade allGrade,exam_end_time examEndTime,qualified,es.candidate_no candidateNo,
ke.exam_name examName,date_format(ke.start_time,'%Y-%m-%d') startTime,date_format(ke.end_time,'%Y-%m-%d %H:%i:%s') endTime,
str.is_exam isExam,
bu.real_name securityName,company,bu.account,bu.sex,bu.paper_time paperTime,bu.securitynumber securityNumber,bu.avatar,
- bd.dept_name companyName,bd.id as deptId,bu.user_type isPaper,bud.unit_name unitName
+ bd.dept_name companyName,bd.id as deptId,bu.user_type isPaper,bud.unit_name unitName,
+ CASE WHEN ssir.id IS NULL THEN
+ '未签到' ELSE '已签到'
+ END AS state
from
exam_score es
left join ksxt_exam ke on ke.id = es.exam_id
@@ -541,6 +546,7 @@
left join sys_information si on si.departmentid = bd.id
left join sys_jurisdiction sj on sj.id = si.jurisdiction
left join sys_training_registration str on str.id = es.apply_id
+ LEFT JOIN sys_sign_in_records ssir ON ssir.candidate_no = str.candidate_no
where 1=1 and es.is_deleted = 0
and (str.is_exam = 2 or str.is_exam = 3 or str.is_exam = 4 or str.is_exam = 5)
<if test="examScore.examName!=null and examScore.examName!=''">
@@ -609,6 +615,13 @@
<if test="examScore.sortName==null or examScore.sortName==''">
order by es.id desc
</if>
+ ) result WHERE 1=1
+ <if test="examScore.state != null and examScore.state !='' ">
+ AND result.state = #{examScore.state}
+ </if>
+
+
+
</select>
--
Gitblit v1.9.3