diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/bigscreen/ResourceBigController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/bigscreen/ResourceBigController.java index 1f3819a..38a2bf3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/bigscreen/ResourceBigController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/bigscreen/ResourceBigController.java @@ -1,14 +1,25 @@ package com.ruoyi.web.controller.bigscreen; import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.entity.SysDept; +import com.ruoyi.common.core.domain.model.LoginUser; +import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.redis.RedisCache; +import com.ruoyi.common.utils.ServletUtils; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.web.service.TokenService; +import com.ruoyi.resource.domain.TResourceLand; +import com.ruoyi.resource.domain.TResourceLandMap; +import com.ruoyi.resource.service.ITResourceLandService; import com.ruoyi.system.service.ISysDeptService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * @description: * @author: zzl @@ -23,6 +34,9 @@ public class ResourceBigController extends BaseController { @Autowired private ISysDeptService sysDeptService; + @Autowired + private ITResourceLandService tResourceLandService; + @Autowired private TokenService tokenService; @@ -34,5 +48,23 @@ public class ResourceBigController extends BaseController { private int expireTime; + /** + * 查询地块属性列表 ,用于空间字段专属查询,避免敏感泄露 + */ + @GetMapping("/query") + public TableDataInfo query(TResourceLand tResourceLand) + { + if(StringUtils.isNull(tResourceLand.getDeptId())){ + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + SysDept dept = sysDeptService.selectDeptById(loginUser.getUser().getDeptId()); + tResourceLand.setImportCode(dept.getImportCode()); + }else{ + SysDept dept = sysDeptService.selectDeptById(tResourceLand.getDeptId()); + tResourceLand.setImportCode(dept.getImportCode()); + } + + List list = tResourceLandService.selectTResourceLandQuery(tResourceLand); + return getDataTable(list); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java index bbacbf7..80689be 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java @@ -82,15 +82,7 @@ public class TResourceLandController extends BaseController @GetMapping("/query") public TableDataInfo query(TResourceLand tResourceLand) { - if(StringUtils.isNull(tResourceLand.getDeptId())){ - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - SysDept dept = deptService.selectDeptById(loginUser.getUser().getDeptId()); - tResourceLand.setImportCode(dept.getImportCode()); - }else{ - SysDept dept = deptService.selectDeptById(tResourceLand.getDeptId()); - tResourceLand.setImportCode(dept.getImportCode()); - } - startPage(); + List list = tResourceLandService.selectTResourceLandQuery(tResourceLand); return getDataTable(list); }