|
@@ -191,13 +191,6 @@
|
|
|
limit 5
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectCenterdataTForestPlanHz"
|
|
|
- resultType="com.sooka.sponest.data.digitalforest.domain.bo.CenterdataTForestPlanTj">
|
|
|
- select a.* ,b.totalarea from (select SUM(CASE WHEN plan_last_time>=plan_end_time THEN 1 ELSE 0 END) totalywc, SUM(CASE WHEN plan_last_time>plan_start_time and plan_last_time< plan_end_time THEN 1 ELSE 0 END) totaljxz,
|
|
|
- SUM(CASE WHEN plan_last_time< plan_start_time THEN 1 ELSE 0 END) totalwks,count(id) total
|
|
|
- from centerdata_t_forest_plan ) a, (select sum(area) as totalarea from centerdata_t_forest_afforestationarea) b
|
|
|
- </select>
|
|
|
-
|
|
|
<select id="queryTaskArea" resultType="map">
|
|
|
SELECT
|
|
|
d.ancestors,
|
|
@@ -209,6 +202,9 @@
|
|
|
centerdata_t_afforestation_task a
|
|
|
LEFT JOIN
|
|
|
${database_system}.sys_dept d ON d.dept_id = a.dept_id
|
|
|
+ <where>
|
|
|
+ ${params.dataScope}
|
|
|
+ </where>
|
|
|
GROUP BY
|
|
|
a.dept_id, d.ancestors;
|
|
|
|
|
@@ -246,6 +242,9 @@
|
|
|
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
|
|
|
d.ancestors, a.dept_id;
|
|
|
</select>
|