From 19f40c8e0649ae81b3f0183a6f4c8aa6c3db39bc Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 18 Nov 2021 17:54:37 +0800
Subject: [PATCH] 证书打印信息导出修改,已过考试的,系统每天凌晨1点定时清理,标记为缺考,并生成缺考记录,保安员导入新增年龄判断,超过60岁的不能导入

---
 src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml |   13 +++++++++++--
 1 files changed, 11 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 317e9c1..1400c89 100644
--- a/src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
+++ b/src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
@@ -45,8 +45,6 @@
         sj.id = si.jurisdiction
         WHERE
             1=1
-        and bu.status = 1
-        and bu.is_deleted = 0
         <if test="accreditationRecords.deptName!=null and  accreditationRecords.deptName!=''">
             and bt.dept_name like concat('%', #{accreditationRecords.deptName},'%')
         </if>
@@ -403,4 +401,15 @@
             and sar.create_time &lt;= #{accreditationRecords.endTime}
         </if>
     </select>
+
+    <!--根据用户 id 查询上岗证申请记录-->
+    <select id="getAccreditationRecordsByUserIdCount" resultType="java.lang.Integer">
+        select count(*) from sys_accreditation_records where user_id = #{userId} and type = 1
+    </select>
+
+
+    <!--根据用户 id 查询当前人员是否有待审核和审核通过的记录数-->
+    <select id="getAccreditationRecordsByUserIdAuditCount" resultType="java.lang.Integer">
+        select count(*) from sys_accreditation_records where (audit_status = 1 or audit_status = 3) and user_id = #{userId} and type = 2
+    </select>
 </mapper>

--
Gitblit v1.9.3