From 4fa826960b4a4d758733715a19ce0d2abdf77ba7 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 31 Dec 2021 18:25:35 +0800
Subject: [PATCH] 新增学历统计接口
---
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 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 b736049..e266e75 100644
--- a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
+++ b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -124,7 +124,7 @@
<if test="information.createDeptId!=null and information.createDeptId!=''">
and bu.dept_id =#{information.createDeptId}
</if>
- order by i.id desc
+ order by i.establishTime asc
</select>
<delete id="deleteIn">
@@ -1314,4 +1314,30 @@
</if>
</select>
+ <!--查询学历统计信息-->
+ <select id="getEducationStatistics" resultType="java.util.HashMap">
+ SELECT
+ ifnull(b.num,0) value,a.dict_value name
+ FROM
+ ( SELECT dict_key, dict_value FROM blade_dict_biz WHERE CODE = "educationType" AND parent_id = 1442114073897521153 ) a
+ LEFT JOIN (
+ SELECT
+ count( * ) num,
+ education
+ FROM
+ blade_user bu
+ left join blade_dept bd on bu.dept_id = bd.id
+ left join sys_information si on si.departmentid = bd.id
+ left join sys_jurisdiction sj on sj.id = si.jurisdiction
+ where 1=1
+ <if test="jurisdiction!=null and jurisdiction != '' and jurisdiction!='1372091709474910209'">
+ and (sj.id = #{jurisdiction} or sj.parent_id = #{jurisdiction})
+ </if>
+ <if test="deptId!=null and deptId != ''">
+ and bu.dept_id = #{deptId}
+ </if>
+ GROUP BY
+ education ) b ON a.dict_key = b.education
+ </select>
+
</mapper>
--
Gitblit v1.9.3