From e30ffbcb28d5cf24a5cf11d7487b1f9a8d82540e Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Fri, 10 Dec 2021 17:24:56 +0800
Subject: [PATCH] 1.押运
---
src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 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..d5fdc5c 100644
--- a/src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
+++ b/src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
@@ -95,6 +95,7 @@
<if test="accreditationRecords.endTime!=null and accreditationRecords.endTime!='' and accreditationRecords.endTime!='undefined'">
and sar.create_time <= #{accreditationRecords.endTime}
</if>
+ order by sar.id desc
</select>
<!--自定义详情信息-->
@@ -210,6 +211,7 @@
<if test="accreditationRecords.endTime!=null and accreditationRecords.endTime!='' and accreditationRecords.endTime!='undefined'">
and sar.create_time <= #{accreditationRecords.endTime}
</if>
+ order by sar.id desc
</select>
@@ -306,6 +308,7 @@
<if test="accreditationRecords.endTime!=null and accreditationRecords.endTime!='' and accreditationRecords.endTime!='undefined'">
and sar.create_time <= #{accreditationRecords.endTime}
</if>
+ order by sar.id desc
</select>
@@ -402,5 +405,17 @@
<if test="accreditationRecords.endTime!=null and accreditationRecords.endTime!='' and accreditationRecords.endTime!='undefined'">
and sar.create_time <= #{accreditationRecords.endTime}
</if>
+ order by sar.id desc
+ </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 = 2) and user_id = #{userId} and type = #{type}
</select>
</mapper>
--
Gitblit v1.9.3