Jelajahi Sumber

数字林业可视化接口

hanfucheng 11 bulan lalu
induk
melakukan
2596c1922f

+ 3 - 7
src/main/resources/mapper/digitalforest/ForestViewNewMapper.xml

@@ -46,13 +46,9 @@
             centerdata_t_forest_gdzcwc a
             LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
         WHERE
-        a.`year` = YEAR(CURRENT_DATE)
-        <choose>
-            <when test="deptId != null">
-                and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
-            </when>
-            <otherwise>${params.dataScope}</otherwise>
-        </choose>
+            a.`year` = YEAR(CURRENT_DATE)
+            and FIND_IN_SET( #{deptId}, CONCAT( d.ancestors, ",", d.dept_id) )
+            ${params.dataScope}
     </select>
 
     <select id="selectForestAreaList" parameterType="CenterdataTForestForestationArea" resultType="map">