From 7c9742190965b22f4ea3864aa8588fad19e0be58 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 29 Sep 2021 20:27:18 +0800
Subject: [PATCH] 培训审核查询修改
---
src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml b/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
index ab191c8..f3d32a4 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
@@ -101,9 +101,19 @@
<select id="selectExamPaperPage" resultType="org.springblade.modules.exam.vo.ExamPaperVO">
SELECT
- *
+ ke.*,
+ bu.real_name realName,
+ bd.dept_name deptName
FROM
- ksxt_exam
+ ksxt_exam ke
+ left join
+ blade_user bu
+ on
+ ke.creator = bu.id
+ left join
+ blade_dept bd
+ on
+ bd.id = bu.dept_id
where
1=1
<if test="paper.examType!=null and paper.examType!=''">
@@ -111,6 +121,9 @@
</if>
<if test="paper.examName!=null and paper.examName!=''">
and exam_name like concat('%',#{paper.examName},'%')
+ </if>
+ <if test="paper.deptId!=null and paper.deptId!=''">
+ and bd.id = #{paper.deptId}
</if>
<if test="paper.auditStatus!=null and paper.auditStatus!=''">
and audit_status = #{paper.auditStatus}
@@ -198,13 +211,10 @@
)
</select>
- <!--查询前缀相同的准考证数量-->
+ <!--查询是当前前缀已生成准考证号码最大的一位-->
<select id="getCandidateNoCount" resultType="java.lang.Integer">
- select count(*) from sys_training_registration
- where 1=1
- <if test="result!=null and result!=''">
- and candidate_no like concat('%', #{result},'%')
- </if>
+ select ifnull(max(0+RIGHT(candidate_no,4)),0) from sys_training_registration
+ where candidate_no like concat('%', #{result},'%')
</select>
<!--查询当前考试已报名的人员培训报名数据集合-->
--
Gitblit v1.9.3