|
@@ -284,4 +284,49 @@
|
|
order by a.create_time desc
|
|
order by a.create_time desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="getForestResourceCount" resultType="java.util.Map">
|
|
|
|
+ select '水鹤' name,count(*) value from centerdata_t_forest_watercrane a
|
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
|
+ where 1=1 ${params.dataScope}
|
|
|
|
+ union all
|
|
|
|
+ select '取水口' name,count(*) value from centerdata_t_forest_waterintake a
|
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
|
+ where 1=1 ${params.dataScope}
|
|
|
|
+ union all
|
|
|
|
+ SELECT a.dict_label name,count(b.firehydrant_type) value FROM ${database_system}.sys_dict_data a left join
|
|
|
|
+ (SELECT a.firehydrant_type FROM centerdata_t_forest_firehydrant a
|
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
|
+ where 1=1 ${params.dataScope}) b on a.dict_value = b.firehydrant_type
|
|
|
|
+ where a.dict_type = 'firehydrant'
|
|
|
|
+ GROUP BY a.dict_value
|
|
|
|
+ union all
|
|
|
|
+ select '泡沫液' name,count(*) value from centerdata_t_firecontrol_foam_liquid a
|
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
|
+ where 1=1 ${params.dataScope}
|
|
|
|
+ union all
|
|
|
|
+ select '水源信息' name,count(*) value from centerdata_t_forest_channel a
|
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
|
+ where 1=1 ${params.dataScope}
|
|
|
|
+ union all
|
|
|
|
+ select '植树造林-植树区域' name,count(*) value from centerdata_t_forest_afforestationarea a
|
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
|
+ where 1=1 ${params.dataScope}
|
|
|
|
+ union all
|
|
|
|
+ select '野生动物-动物监测' name,count(*) value from centerdata_t_forest_animal a
|
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
|
+ where 1=1 ${params.dataScope}
|
|
|
|
+ union all
|
|
|
|
+ select '森林防火队' name,count(*) value from centerdata_t_forest_fireteam a
|
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
|
+ where 1=1 ${params.dataScope}
|
|
|
|
+ union all
|
|
|
|
+ select '林长管理' name,count(*) value from centerdata_t_forest_linleader a
|
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
|
+ where 1=1 ${params.dataScope}
|
|
|
|
+ union all
|
|
|
|
+ select '林业资源' name,count(*) value from centerdata_t_forest_resources a
|
|
|
|
+ left join ${database_system}.sys_dept d on d.dept_id = a.dept_id
|
|
|
|
+ where 1=1 ${params.dataScope}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|