Commit 62a4f0c0 authored by wzp's avatar wzp

修改bug

parent 96cef4db
......@@ -77,7 +77,9 @@ public class TBoxOperationController extends BaseController {
// String areaId1 = getAreaId(user1.getAreaId());
// user.setAreaName(areaId1);
// }
user.setOrgCode(user1.getOrgCode());
if (!user1.getRoleList().contains("1")) {
user.setOrgCode(user1.getOrgCode());
}
try {
Page<TBoxOperation> page = tBoxOperationService.selectBoxPage(getPage(), user);
return getResult(page);
......@@ -197,10 +199,16 @@ public class TBoxOperationController extends BaseController {
public Map<String, Object> getTBoxOperationList(String status) {
List<TBoxOperation> tBoxOperationList = null;
TUser user = getcurUser();
//设置数据权限
String areaId = user.getAreaId();
try {
tBoxOperationList = tBoxOperationService.getList(status, getAreaId(areaId));
if (!user.getRoleList().contains("1")) {
//设置数据权限
String areaId = user.getAreaId();
tBoxOperationList = tBoxOperationService.getList(status, getAreaId(areaId));
}else {
tBoxOperationList = tBoxOperationService.getList(status, null);
}
return getResult(tBoxOperationList);
} catch (Exception e) {
e.printStackTrace();
......@@ -232,8 +240,10 @@ public class TBoxOperationController extends BaseController {
tBoxOperation.setAreaId(areaId);
}
if (StringUtils.isNotBlank(user.getAreaId())) {
//设置数据权限
tBoxOperation.setAreaName(getAreaId(user.getAreaId()));
if (!user.getRoleList().contains("1")) {
//设置数据权限
tBoxOperation.setAreaName(getAreaId(user.getAreaId()));
}
}
Page<TBoxOperation> page = null;
try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment