|
@@ -47,16 +47,25 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectVisualRy" parameterType="ForestCloudMapVO" resultType="ForestCloudRYBO">
|
|
|
- SELECT
|
|
|
- a.dict_label as job ,a.dict_value as jobValue ,count(b.user_id) as number ,'' as jobType,a.dict_sort
|
|
|
- FROM
|
|
|
- ( SELECT dict_label, dict_value,dict_sort FROM ${database_system}.sys_dict_data WHERE dict_type = 'forest_lin_job' and
|
|
|
- status='0' ) a
|
|
|
- LEFT JOIN ( SELECT DISTINCT a.user_id,a.lin_job FROM ${database_data}.centerdata_t_forest_linleader a left join ${database_system}.sys_dept d on a.dept_id=d.dept_id where 1=1 ${params.dataScope}) b ON a.dict_value = b.lin_job
|
|
|
- GROUP BY
|
|
|
- a.dict_value
|
|
|
- ORDER BY
|
|
|
- a.dict_sort
|
|
|
+ SELECT a.dict_label as job,
|
|
|
+ a.dict_value as jobValue,
|
|
|
+ count(b.user_id) as number,
|
|
|
+ '' as jobType,
|
|
|
+ a.dict_sort
|
|
|
+ FROM (SELECT dict_label, dict_value, dict_sort
|
|
|
+ FROM ${database_system}.sys_dict_data
|
|
|
+ WHERE dict_type = 'forest_lin_job'
|
|
|
+ and status = '0') a
|
|
|
+ LEFT JOIN (SELECT DISTINCT a.user_id, a.lin_job
|
|
|
+ FROM ${database_data}.centerdata_t_forest_linleader a
|
|
|
+ left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
|
|
|
+ <where>
|
|
|
+ <if test="level != null and level != ''">and a.lin_level = #{level}</if>
|
|
|
+ ${params.dataScope}
|
|
|
+ </where>
|
|
|
+ ) b ON a.dict_value = b.lin_job
|
|
|
+ GROUP BY a.dict_value
|
|
|
+ ORDER BY a.dict_sort
|
|
|
</select>
|
|
|
|
|
|
<select id="selectZXRS" parameterType="ForestCloudMapVO" resultType="ForestCloudRyZxBO">
|
|
@@ -100,6 +109,9 @@
|
|
|
<if test="name != null and name != ''">
|
|
|
and a.lin_name like concat('%', #{name}, '%')
|
|
|
</if>
|
|
|
+ <if test="level != null and level != ''">
|
|
|
+ and a.lin_level = #{level}
|
|
|
+ </if>
|
|
|
<choose>
|
|
|
<when test="deptId != null and deptId != ''">
|
|
|
and FIND_IN_SET( #{deptId}, CONCAT(d.ancestors,',',d.dept_id) )
|
|
@@ -110,4 +122,26 @@
|
|
|
</choose>
|
|
|
order by a.num,a.create_time desc
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+
|
|
|
+ <select id="getNumByLevel" parameterType="ForestLeaderVO" resultType="map">
|
|
|
+ SELECT
|
|
|
+ a.dict_label name,
|
|
|
+ a.dict_value level,
|
|
|
+ b.num
|
|
|
+ FROM
|
|
|
+ ${database_system}.sys_dict_data a
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT
|
|
|
+ a.lin_level,
|
|
|
+ count( a.id ) num
|
|
|
+ FROM
|
|
|
+ centerdata_t_forest_linleader a
|
|
|
+ LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
|
|
|
+ where 1= 1 ${params.dataScope}
|
|
|
+ GROUP BY
|
|
|
+ a.lin_level
|
|
|
+ ) b ON a.dict_value = b.lin_level
|
|
|
+ WHERE
|
|
|
+ a.dict_type = 'forest_lin_level'
|
|
|
+ </select>
|
|
|
+</mapper>
|