Selaa lähdekoodia

Merge remote-tracking branch 'origin/master'

master
yangfuda 1 viikko sitten
vanhempi
commit
0976c1560d
2 muutettua tiedostoa jossa 33 lisäystä ja 9 poistoa
  1. +32
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/bigscreen/ResourceBigController.java
  2. +1
    -9
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java

+ 32
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/bigscreen/ResourceBigController.java Näytä tiedosto

@@ -1,14 +1,25 @@
package com.ruoyi.web.controller.bigscreen; package com.ruoyi.web.controller.bigscreen;


import com.ruoyi.common.core.controller.BaseController; 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.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.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 com.ruoyi.system.service.ISysDeptService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;


import java.util.List;

/** /**
* @description: * @description:
* @author: zzl * @author: zzl
@@ -23,6 +34,9 @@ public class ResourceBigController extends BaseController {
@Autowired @Autowired
private ISysDeptService sysDeptService; private ISysDeptService sysDeptService;


@Autowired
private ITResourceLandService tResourceLandService;

@Autowired @Autowired
private TokenService tokenService; private TokenService tokenService;


@@ -34,5 +48,23 @@ public class ResourceBigController extends BaseController {
private int expireTime; 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<TResourceLandMap> list = tResourceLandService.selectTResourceLandQuery(tResourceLand);
return getDataTable(list);
}


} }

+ 1
- 9
ruoyi-admin/src/main/java/com/ruoyi/web/controller/resource/TResourceLandController.java Näytä tiedosto

@@ -82,15 +82,7 @@ public class TResourceLandController extends BaseController
@GetMapping("/query") @GetMapping("/query")
public TableDataInfo query(TResourceLand tResourceLand) 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<TResourceLandMap> list = tResourceLandService.selectTResourceLandQuery(tResourceLand); List<TResourceLandMap> list = tResourceLandService.selectTResourceLandQuery(tResourceLand);
return getDataTable(list); return getDataTable(list);
} }


Ladataan…
Peruuta
Tallenna