From eeb3c3a505d3ea2e03e5755b51538ed8c3003681 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 14 Aug 2021 08:49:40 +0800
Subject: [PATCH] 报名接口查询修改,新增审查字段

---
 src/main/java/org/springblade/modules/system/mapper/UserMapper.xml |   36 +++++++++++++++++++++++++++++++++++-
 1 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
index ce83c57..18ab95e 100644
--- a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -42,7 +42,9 @@
         <result column="dispatch" property="dispatch"/>
         <result column="my_picture" property="myPicture"/>
         <result column="is_apply" property="isApply"/>
-        <result column="deptname" property="deptname"/>
+        <result column="is_apply" property="isApply"/>
+        <result column="is_train" property="isTrain"/>
+        <result column="birthtime" property="birthtime"/>
     </resultMap>
 
     <select id="selectUserPage" resultMap="userResultMap">
@@ -294,4 +296,36 @@
         )
     </select>
 
+
+    <select id="selectInr" resultType="java.util.HashMap">
+        SELECT real_name as realName,id FROM  blade_user
+        WHERE role_id='1412226235153731586'
+          <if test="deptid!=null and deptid!='' and dept!='1123598813738675201'">
+              and dept_id=#{deptid}
+          </if>
+    </select>
+
+    <!--查询当前年份已有的保安证编号-->
+    <select id="getSecurityPaperCount" resultType="java.lang.Integer">
+        select count(*) from blade_user
+        where securitynumber like concat('%', #{pre},'%')
+    </select>
+
+    <!--查询当前公司未持证保安没有报名的人员-->
+    <select id="getNotApplyIdList" resultType="org.springblade.modules.system.entity.User">
+        select DISTINCT
+        bu.id,is_apply isApply
+        from
+        blade_user bu
+        left join
+        sys_apply sa
+        on
+        sa.user_id = bu.id
+        where 1=1
+		and (hold=2 or hold = 3)
+        and (sa.is_exam != 1 or sa.is_exam is null)
+        and (bu.is_apply != 1 or bu.is_apply is null)
+        and (sa.apply_status !=2 or sa.apply_status is null)
+        and bu.dept_id = #{deptId}
+    </select>
 </mapper>

--
Gitblit v1.9.3