|
@@ -203,20 +203,35 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="linLeaderCount" resultType="map">
|
|
|
- SELECT COUNT(lin_job) as value , '三员[治安员,卫生员,技术员]' name FROM `centerdata_t_forest_linleader` WHERE lin_job in ( "forest_lin_jy", "forest_lin_wsy", "forest_lin_jsy")
|
|
|
+ SELECT COUNT(*) as value , '三员[治安员,卫生员,技术员]' name FROM `centerdata_t_forest_linleader` a
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
+ where 1=1 AND a.lin_job in ("forest_lin_jy","forest_lin_wsy","forest_lin_jsy") ${params.dataScope}
|
|
|
UNION all
|
|
|
- SELECT COUNT(lin_job) as value , '村级林长' name FROM `centerdata_t_forest_linleader` WHERE lin_job in ("forest_lin_linzhang","forest_lin_fulinzhang","forest_lin_zonglinzhang","forest_lin_fuzonglinzhang","forest_lin_wgz") and lin_level = "forest_lin_sq"
|
|
|
+ SELECT COUNT(*) as value , '村级林长' name FROM `centerdata_t_forest_linleader` a
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
+ where 1=1 AND a.lin_job in ("forest_lin_linzhang","forest_lin_fulinzhang","forest_lin_zonglinzhang","forest_lin_fuzonglinzhang","forest_lin_wgz") and lin_level = "forest_lin_sq" ${params.dataScope}
|
|
|
UNION all
|
|
|
- SELECT COUNT(lin_job) as value , '乡镇街林长' name FROM `centerdata_t_forest_linleader` WHERE lin_job in ("forest_lin_linzhang","forest_lin_fulinzhang","forest_lin_zonglinzhang","forest_lin_fuzonglinzhang","forest_lin_wgz") and lin_level = "forest_lin_xz"
|
|
|
+ SELECT COUNT(*) as value , '乡镇街林长' name FROM `centerdata_t_forest_linleader` a
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
+ where 1=1 AND a.lin_job in ("forest_lin_linzhang","forest_lin_fulinzhang","forest_lin_zonglinzhang","forest_lin_fuzonglinzhang","forest_lin_wgz") and lin_level = "forest_lin_xz" ${params.dataScope}
|
|
|
UNION all
|
|
|
- SELECT COUNT(lin_job) as value , '县区林长' name FROM `centerdata_t_forest_linleader` WHERE lin_job in ("forest_lin_linzhang","forest_lin_fulinzhang","forest_lin_zonglinzhang","forest_lin_fuzonglinzhang","forest_lin_wgz") and lin_level = "forest_lin_xq"
|
|
|
+ SELECT COUNT(*) as value , '县区林长' name FROM `centerdata_t_forest_linleader` a
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
+ where 1=1 AND a.lin_job in ("forest_lin_linzhang","forest_lin_fulinzhang","forest_lin_zonglinzhang","forest_lin_fuzonglinzhang","forest_lin_wgz") and lin_level = "forest_lin_xq" ${params.dataScope}
|
|
|
UNION all
|
|
|
- SELECT COUNT(lin_job) as value , '护林员' name FROM `centerdata_t_forest_linleader` WHERE lin_job = "forest_lin_hly"
|
|
|
+ SELECT COUNT(*) as value , '护林员' name FROM `centerdata_t_forest_linleader` a
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
+ where 1=1 AND a.lin_job = "forest_lin_hly" ${params.dataScope}
|
|
|
</select>
|
|
|
|
|
|
|
|
|
<select id="focusOnFire" resultType="map">
|
|
|
- SELECT SUM(plots_area) as area ,COUNT(DISTINCT forest_species)as species,dept_name as deptName FROM `centerdata_t_forest_keyfireproofplots` GROUP BY dept_name
|
|
|
+ SELECT SUM(a.plots_area) as area ,COUNT(DISTINCT a.forest_species)as species,a.dept_name as deptName FROM `centerdata_t_forest_keyfireproofplots` a
|
|
|
+ left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
|
|
|
+ <where>
|
|
|
+ ${params.dataScope}
|
|
|
+ </where>
|
|
|
+ GROUP BY deptName
|
|
|
</select>
|
|
|
|
|
|
<select id="selectResourcesAreaCount" resultType="java.util.Map">
|