瀏覽代碼

数字林业可视化接口

hanfucheng 11 月之前
父節點
當前提交
1073b7eb53

+ 9 - 0
src/main/java/com/sooka/sponest/data/digitalforest/controller/ForestViewNewController.java

@@ -134,4 +134,13 @@ public class ForestViewNewController extends BaseController {
         return R.ok(iForestViewNewService.selectWildPlant(centerdataTForestPlant));
         return R.ok(iForestViewNewService.selectWildPlant(centerdataTForestPlant));
     }
     }
 
 
+    /*
+    * 野生植物详情
+    */
+    @ApiOperation(value = "野生植物详情", notes = "野生植物详情")
+    @GetMapping("/remotePlantList")
+    public R remotePlantList(CenterdataTForestPlant centerdataTForestPlant) {
+        return R.ok(iForestViewNewService.remotePlantList(centerdataTForestPlant));
+    }
+
 }
 }

+ 2 - 0
src/main/java/com/sooka/sponest/data/digitalforest/service/IForestViewNewService.java

@@ -38,4 +38,6 @@ public interface IForestViewNewService extends IBaseService {
     Map<String, Object> selectWildAnimal(CenterdataTForestAnimal centerdataTForestAnimal);
     Map<String, Object> selectWildAnimal(CenterdataTForestAnimal centerdataTForestAnimal);
 
 
     List<Map<String, Object>> selectWildPlant(CenterdataTForestPlant centerdataTForestPlant);
     List<Map<String, Object>> selectWildPlant(CenterdataTForestPlant centerdataTForestPlant);
+
+    List<CenterdataTForestPlant> remotePlantList(CenterdataTForestPlant centerdataTForestPlant);
 }
 }

+ 11 - 0
src/main/java/com/sooka/sponest/data/digitalforest/service/impl/ForestViewNewServiceImpl.java

@@ -6,6 +6,7 @@ import com.ruoyi.common.datascope.annotation.DataScopeMutiDept;
 import com.ruoyi.common.security.utils.DictUtils;
 import com.ruoyi.common.security.utils.DictUtils;
 import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.data.digitalforest.domain.*;
 import com.sooka.sponest.data.digitalforest.domain.*;
+import com.sooka.sponest.data.digitalforest.mapper.CenterdataTForestPlantMapper;
 import com.sooka.sponest.data.digitalforest.mapper.ForestViewNewMapper;
 import com.sooka.sponest.data.digitalforest.mapper.ForestViewNewMapper;
 import com.sooka.sponest.data.digitalforest.service.IForestViewNewService;
 import com.sooka.sponest.data.digitalforest.service.IForestViewNewService;
 import com.sooka.sponest.data.digitalwater.domain.CenterdataTHydraulicPatrolTask;
 import com.sooka.sponest.data.digitalwater.domain.CenterdataTHydraulicPatrolTask;
@@ -21,6 +22,9 @@ public class ForestViewNewServiceImpl extends BaseServiceImpl implements IForest
     @Autowired
     @Autowired
     private ForestViewNewMapper forestViewNewMapper;
     private ForestViewNewMapper forestViewNewMapper;
 
 
+    @Autowired
+    private CenterdataTForestPlantMapper centerdataTForestPlantMapper;
+
     @DataScopeMutiDept(deptAlias = "d")
     @DataScopeMutiDept(deptAlias = "d")
     @Override
     @Override
     public List<Map<String, Object>> selectYlscsjjList(CenterdataTForestYlscsjj centerdataTForestYlscsjj) {
     public List<Map<String, Object>> selectYlscsjjList(CenterdataTForestYlscsjj centerdataTForestYlscsjj) {
@@ -175,4 +179,11 @@ public class ForestViewNewServiceImpl extends BaseServiceImpl implements IForest
         setSookaDataBase(centerdataTForestPlant);
         setSookaDataBase(centerdataTForestPlant);
         return forestViewNewMapper.selectWildPlant(centerdataTForestPlant);
         return forestViewNewMapper.selectWildPlant(centerdataTForestPlant);
     }
     }
+
+    @DataScopeMutiDept(deptAlias = "d")
+    @Override
+    public List<CenterdataTForestPlant> remotePlantList(CenterdataTForestPlant centerdataTForestPlant) {
+        setSookaDataBase(centerdataTForestPlant);
+        return centerdataTForestPlantMapper.selectCenterdataTForestPlantList(centerdataTForestPlant);
+    }
 }
 }

+ 3 - 3
src/main/resources/mapper/digitalforest/CenterdataTForestAnimalMapper.xml

@@ -192,7 +192,7 @@
         a.update_by,
         a.update_by,
         a.update_time,
         a.update_time,
         a.data_status,
         a.data_status,
-        b.dict_label AS type,
+        b.name AS type,
         a.longitude,
         a.longitude,
         a.latitude,
         a.latitude,
         a.attach_id,
         a.attach_id,
@@ -201,9 +201,9 @@
         a.appear_time
         a.appear_time
         FROM
         FROM
         centerdata_t_forest_animal a
         centerdata_t_forest_animal a
-        LEFT JOIN ${database_system}.sys_dict_data b ON a.type = b.dict_value
+        LEFT JOIN centerdata_t_forest_dict b ON a.type = b.id
         LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
         LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
-        where 1=1
+        where b.type = 'ybdw_lv'
         <if test="type != null  and type != ''">
         <if test="type != null  and type != ''">
             and a.type = #{type}
             and a.type = #{type}
         </if>
         </if>