From 0dee81f06575d115d64adde8fc3a4ea94607f9ef Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 06 Aug 2021 11:44:17 +0800
Subject: [PATCH] 1.考试报名新增判断,同一人,同一场考试,已报名且未考试,审核通过和待审核的不能再次报名 2.考试接口修改
---
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml | 69 ++++++++++++++++++++++++++++++++++
1 files changed, 69 insertions(+), 0 deletions(-)
diff --git a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
index 812baa4..fcc3705 100644
--- a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
+++ b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -41,6 +41,9 @@
<if test="information.jurisdiction!=null and information.jurisdiction!=''">
and jurisdiction=#{jurisdiction}
</if>
+ <if test="information.departmentid!=null and information.departmentid!=''">
+ and departmentid=#{departmentid}
+ </if>
</select>
<delete id="deleteIn">
@@ -92,4 +95,70 @@
GROUP BY u.dept_id, d.dept_name
</select>
+ <delete id="deleteDept">
+ delete
+ from blade_dept
+ where id = #{departmentid}
+ </delete>
+
+ <!--资格审查异常数量-->
+ <select id="selectExtype" resultType="java.util.HashMap">
+ SELECT A.num as zc,
+ B.num as bzc
+ FROM (
+ SELECT COUNT(*) AS num,
+ u.dept_id
+ FROM blade_user u
+ WHERE u.examination_type = 0
+ GROUP BY u.dept_id
+ ) A
+ LEFT JOIN (
+ SELECT COUNT(*) AS num,
+ u.dept_id
+ FROM blade_user u
+ WHERE u.examination_type = 1
+ GROUP BY u.dept_id
+ ) B ON A.dept_id = B.dept_id
+ WHERE A.dept_id = #{deptid}
+ </select>
+ <!--保安员持证和未持证数量-->
+ <select id="selectHold" resultType="java.util.HashMap">
+ SELECT IFNULL(A.thisnum, 0) AS cz,
+ IFNULL(B.lastnum, 0) AS wcz
+ FROM (SELECT COUNT(*) AS thisnum, dept_id
+ FROM blade_user
+ WHERE role_id = '1412226235153731586' AND hold = 0
+ GROUP BY dept_id) A
+ LEFT JOIN (SELECT COUNT(*) AS lastnum, dept_id
+ FROM blade_user
+ WHERE role_id = '1412226235153731586' AND hold = 1
+ GROUP BY dept_id) B ON A.dept_id = B.dept_id
+ WHERE A.dept_id =#{deptid}
+ </select>
+ <!--派遣服务单位统计-->
+ <select id="selectDis" resultType="java.util.HashMap">
+ SELECT u.name,
+ COUNT(dispatcher_unit_id) AS num
+ FROM sys_dispatcher d
+ LEFT JOIN sys_dispatcher_unit u ON d.dispatcher_unit_id = u.id
+ WHERE d.dept_id = #{deptid}
+ GROUP BY u.name
+ </select>
+
+ <select id="selectDisp" resultType="java.util.HashMap">
+ SELECT COUNT(d.NAME) AS num,
+ u.real_name
+ FROM sys_dispatcher d
+ LEFT JOIN blade_user u ON u.cardid = d.cardid
+ WHERE d.dept_id = #{deptid}
+ GROUP BY u.real_name
+ </select>
+
+ <select id="selectSoil" resultType="java.util.HashMap">
+ SELECT A.numj,
+ B.numz
+ FROM (SELECT COUNT(*) AS numj, deptid FROM sys_socil GROUP BY deptid) A
+ LEFT JOIN (SELECT COUNT(*) AS numz, dept_id FROM blade_user GROUP BY dept_id) B ON A.deptid = B.dept_id
+ WHERE A.deptid = #{deptid}
+ </select>
</mapper>
--
Gitblit v1.9.3