zhaowenrui 1 ano atrás
pai
commit
b1c53b65a3

+ 3 - 3
src/main/java/com/sooka/sponest/data/digitalforest/controller/ForestBigDataController.java

@@ -158,13 +158,13 @@ public class ForestBigDataController extends BaseController {
     }
 
 
-    @ApiOperation(value = "远程调用查询林长统计", notes = "远程调用查询林长统计")
+
     @GetMapping ("/linLeaderCount")
     public R linLeaderCount() {
         return R.ok(forestBigDataService.linLeaderCount());
     }
 
-    @ApiOperation(value = "远程调用查询重点防火", notes = "远程调用查询重点防火")
+
     @GetMapping ("/focusOnFire")
     public R focusOnFire() {
         return R.ok(forestBigDataService.focusOnFire());
@@ -190,7 +190,7 @@ public class ForestBigDataController extends BaseController {
         return R.ok(forestBigDataService.selectForestGridCount(centerdataTForestGridLevel));
     }
 
-    @ApiOperation(value = "远程调用查询珍稀古树", notes = "远程调用查询珍稀古树")
+    @ApiOperation(value = "珍稀古树(市级用用户按区县,区县用户按乡镇统计珍稀古树数量)", notes = "珍稀古树(市级用用户按区县,区县用户按乡镇统计珍稀古树数量)")
     @GetMapping ("/selectTreeCount")
     public R selectTreeCount(CenterdataTForestTrees centerdataTForestTrees) {
         return R.ok(forestBigDataService.selectTreeCount(centerdataTForestTrees));

+ 16 - 3
src/main/java/com/sooka/sponest/data/digitalforest/service/impl/ForestBigDataServiceImpl.java

@@ -2,6 +2,7 @@ package com.sooka.sponest.data.digitalforest.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.utils.DateUtils;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.sooka.sponest.data.app.domain.VisuForestCloudMapVO;
@@ -207,7 +208,11 @@ public class ForestBigDataServiceImpl extends BaseServiceImpl implements IForest
     public List<Map<String,Object>> selectResourcesAreaCount(CenterdataTForestResources centerdataTForestResources) throws IOException {
         setSookaDataBase(centerdataTForestResources);
         List<Map<String,Object>> list = forestBigDataMapper.selectResourcesAreaCount(centerdataTForestResources);
-        return deptLevelUtil.getDeptLevel(list);
+        String deptId = "";
+        if (!StringUtils.isNull(centerdataTForestResources.getDeptId())){
+            deptId = String.valueOf(centerdataTForestResources.getDeptId());
+        }
+        return deptLevelUtil.getDeptLevel(list,deptId);
     }
 
     @DataScopeMutiDept(deptAlias = "d")
@@ -215,7 +220,11 @@ public class ForestBigDataServiceImpl extends BaseServiceImpl implements IForest
     public List<Map<String,Object>> selectForestGridCount(CenterdataTForestGridLevelVo centerdataTForestGridLevel) throws IOException {
         setSookaDataBase(centerdataTForestGridLevel);
         List<Map<String,Object>> list = forestBigDataMapper.selectForestGridCount(centerdataTForestGridLevel);
-        return deptLevelUtil.getDeptLevel(list);
+        String deptId = "";
+        if (!StringUtils.isNull(centerdataTForestGridLevel.getDeptId())){
+            deptId = String.valueOf(centerdataTForestGridLevel.getDeptId());
+        }
+        return deptLevelUtil.getDeptLevel(list,deptId);
     }
 
     @DataScopeMutiDept(deptAlias = "d")
@@ -223,7 +232,11 @@ public class ForestBigDataServiceImpl extends BaseServiceImpl implements IForest
     public List<Map<String,Object>> selectTreeCount(CenterdataTForestTrees centerdataTForestTrees) {
         setSookaDataBase(centerdataTForestTrees);
         List<Map<String,Object>> list = forestBigDataMapper.selectTreeCount(centerdataTForestTrees);
-        return deptLevelUtil.getDeptLevel(list);
+        String deptId = "";
+        if (!StringUtils.isNull(centerdataTForestTrees.getDeptId())){
+            deptId = String.valueOf(centerdataTForestTrees.getDeptId());
+        }
+        return deptLevelUtil.getDeptLevel(list,deptId);
     }
 
 }

+ 4 - 3
src/main/resources/mapper/digitalforest/ForestBigDataMapper.xml

@@ -205,11 +205,11 @@
     <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")
         UNION all
-        SELECT COUNT(lin_job) as value ,  '村级林长' name FROM `centerdata_t_forest_linleader` WHERE lin_job = "forest_lin_linzhang" and lin_level = "forest_lin_sq"
+        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"
         UNION all
-        SELECT COUNT(lin_job) as value ,  '乡镇街林长' name FROM `centerdata_t_forest_linleader` WHERE lin_job = "forest_lin_linzhang" and lin_level = "forest_lin_xz"
+        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"
         UNION all
-        SELECT COUNT(lin_job) as value ,  '县区林长' name FROM `centerdata_t_forest_linleader` WHERE lin_job = "forest_lin_linzhang" and lin_level = "forest_lin_xq"
+        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"
         UNION all
         SELECT COUNT(lin_job) as value ,  '护林员' name FROM `centerdata_t_forest_linleader` WHERE   lin_job = "forest_lin_hly"
     </select>
@@ -253,4 +253,5 @@
         group by a.dept_id
         order by a.create_time desc
     </select>
+
 </mapper>