From 8b375fe00a241b3a769b82fe3dac8d1c9dce8a02 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 16 Jun 2022 14:36:07 +0800
Subject: [PATCH] 模拟考试修改
---
src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 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 a2cd388..37332dd 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
@@ -69,9 +69,9 @@
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') endTime,
+ 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,
+ bu.real_name securityName,company,bu.cardid cardNo,bu.sex,bu.paper_time paperTime,bu.securitynumber securityNumber,bu.avatar,
bd.dept_name companyName,bu.user_type isPaper
from
exam_score es
@@ -87,13 +87,15 @@
blade_dept bd
on
bd.id = bu.dept_id
+ 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
where
1=1
- and (str.is_exam = 2 or str.is_exam = 3 or str.is_exam = 4)
+ 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!=''">
and ke.exam_name like concat('%', #{examScore.examName},'%')
</if>
@@ -111,6 +113,9 @@
</if>
<if test="examScore.userId!=null and examScore.userId!=''">
and es.user_id = #{examScore.userId}
+ </if>
+ <if test="examScore.jurisdiction!=null and examScore.jurisdiction!='' and examScore.jurisdiction!='1372091709474910209'">
+ and (sj.id=#{examScore.jurisdiction} or sj.parent_id = #{examScore.jurisdiction})
</if>
<if test="examScore.deptId!=null and examScore.deptId!=''">
and bd.id = #{examScore.deptId}
@@ -379,9 +384,11 @@
sys_training_registration str
on
str.id = es.apply_id
+ left join sys_information si on si.departmentid = bd.id
+ left join sys_jurisdiction sj on sj.id = si.jurisdiction
where
1=1
- and (str.is_exam = 2 or str.is_exam = 3 or str.is_exam = 4)
+ 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!='' and examScore.examName!='undefined'">
and ke.exam_name like concat('%', #{examScore.examName},'%')
</if>
@@ -432,6 +439,9 @@
</if>
<if test="examScore.examDate!=null and examScore.examDate!=''">
and date_format(ke.start_time,'%Y-%m-%d') = #{examScore.examDate}
+ </if>
+ <if test="examScore.jurisdiction!=null and examScore.jurisdiction!='' and examScore.jurisdiction!='1372091709474910209'">
+ and (sj.id=#{examScore.jurisdiction} or sj.parent_id = #{examScore.jurisdiction})
</if>
<if test="examScore.sortName!=null and examScore.sortName!='' and examScore.sortName!='companyName'">
ORDER BY es.${examScore.sortName} ${examScore.sort},es.id desc
@@ -517,5 +527,15 @@
id
</select>
+ <!--查询考试成绩-->
+ <select id="getExamScoreLists" resultType="org.springblade.modules.exam.entity.ExamScore">
+ SELECT * from exam_score where date_format(exam_time,'%Y-%M-%d') = date_format(now(),'%Y-%M-%d')
+ </select>
+
+ <!--查询考试成绩按时间-->
+ <select id="getExamScoreListByTime" resultType="org.springblade.modules.exam.entity.ExamScore">
+ SELECT * from exam_score where date_format(exam_time,'%Y-%M-%d') = date_format(#{time},'%Y-%M-%d')
+ </select>
+
</mapper>
--
Gitblit v1.9.3