From b0625931bc528429d592f642bdd759e7dbdfb1c3 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 19 Oct 2021 22:21:07 +0800
Subject: [PATCH] 1.保安员新增接口修改,单个新增保安员默认密码为身份证号后6位,账号为身份证号, 2.考试成绩可以按天导出 3.个人图片批量导入接口修改 4.保安员批量导入修改,如有重复的账号导入的跳过,导入完成后返回提示信息

---
 src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml |   72 ++++++++++++++++++++++++++++++++++++
 1 files changed, 72 insertions(+), 0 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 ff44c7d..00ae3b2 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
@@ -126,6 +126,9 @@
         <if test="examScore.qualified!=null">
             and es.qualified = #{examScore.qualified}
         </if>
+        <if test="examScore.examDate!=null">
+            and date_format(es.exam_time,'%Y-%m-%d') = #{examScore.examDate}
+        </if>
     </select>
 
     <!--考试成绩详情信息-->
@@ -315,4 +318,73 @@
     <select id="getLheoryGradeLess60" resultType="org.springblade.modules.exam.entity.ExamScore">
         select * from exam_score where all_grade &lt; 30
     </select>
+
+    <!--导出-按条件查询成绩数据-模拟考试-->
+    <select id="getExamScoreList" resultType="org.springblade.modules.exam.excel.ExportExamScoreExcel">
+        SELECT
+        ke.exam_name examName,bu.real_name securityName,bu.cardid idCardNo,
+        bd.dept_name companyName,
+        es.exam_time examTime,exam_end_time examEndTime,
+        es.theory_grade theoryGrade,es.learn_grade learnGrade,
+        all_grade allGrade
+         from
+        exam_score es
+        left join
+        ksxt_exam ke
+        on
+        ke.id = es.exam_id
+        left join
+        blade_user bu
+        on
+        es.user_id = bu.id
+        left join
+        blade_dept bd
+        on
+        bd.id = bu.dept_id
+        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)
+        <if test="examScore.examName!=null and  examScore.examName!=''">
+            and ke.exam_name like concat('%', #{examScore.examName},'%')
+        </if>
+        <if test="examScore.companyName!=null and  examScore.companyName!=''">
+            and bd.dept_name like concat('%', #{examScore.companyName},'%')
+        </if>
+        <if test="examScore.securityName!=null and  examScore.securityName!=''">
+            and bu.real_name like concat('%', #{examScore.securityName},'%')
+        </if>
+        <if test="examScore.account!=null and  examScore.account!=''">
+            and bu.account like concat('%', #{examScore.account},'%')
+        </if>
+        <if test="examScore.trainUnitId!=null">
+            and str.training_unit_id = #{examScore.trainUnitId}
+        </if>
+        <if test="examScore.userId!=null and  examScore.userId!=''">
+            and es.user_id = #{examScore.userId}
+        </if>
+        <if test="examScore.deptId!=null and  examScore.deptId!=''">
+            and bd.id = #{examScore.deptId}
+        </if>
+        <if test="examScore.isExam!=null and  examScore.isExam!=''">
+            and str.is_exam = #{examScore.isExam}
+        </if>
+        <if test="examScore.examType!=null and  examScore.examType!=''">
+            and ke.exam_type = #{examScore.examType}
+        </if>
+        <if test="examScore.candidateNo!=null and  examScore.candidateNo!=''">
+            and es.candidate_no = #{examScore.candidateNo}
+        </if>
+        <if test="examScore.qualified!=null">
+            and es.qualified = #{examScore.qualified}
+        </if>
+        <if test="examScore.examDate!=null and examScore.examDate!=''">
+            and date_format(es.exam_time,'%Y-%m-%d') = #{examScore.examDate}
+        </if>
+    </select>
+
+
 </mapper>

--
Gitblit v1.9.3