部门树的用户查询增加 userIdPrefix 参数
This commit is contained in:
@@ -283,7 +283,7 @@ public class OfficeController extends BaseController {
|
||||
@ResponseBody
|
||||
public List<Map<String, Object>> treeData(String excludeCode, String parentCode, Boolean isAll,
|
||||
String officeTypes, String companyCode, String isShowCode, String isShowFullName,
|
||||
String isLoadUser, String postCode, String roleCode, String ctrlPermi) {
|
||||
String isLoadUser, String userIdPrefix, String postCode, String roleCode, String ctrlPermi) {
|
||||
List<Map<String, Object>> mapList = ListUtils.newArrayList();
|
||||
Office where = new Office();
|
||||
where.setStatus(Office.STATUS_NORMAL);
|
||||
@@ -331,8 +331,8 @@ public class OfficeController extends BaseController {
|
||||
// 一次性后台加载用户,若数据量比较大,建议使用懒加载
|
||||
if (StringUtils.equals(isLoadUser, "true")) {
|
||||
List<Map<String, Object>> userList =
|
||||
empUserController.treeData("u_", e.getOfficeCode(), e.getOfficeCode(),
|
||||
companyCode, postCode, roleCode, isAll, isShowCode, ctrlPermi);
|
||||
empUserController.treeData(userIdPrefix, e.getOfficeCode(), e.getOfficeCode(),
|
||||
companyCode, postCode, roleCode, isAll, isShowCode, ctrlPermi);
|
||||
mapList.addAll(userList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.jeesite.common.collect.MapUtils;
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.lang.DateUtils;
|
||||
import com.jeesite.common.lang.ObjectUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.mapper.JsonMapper;
|
||||
import com.jeesite.common.shiro.realm.AuthorizingRealm;
|
||||
@@ -425,7 +426,7 @@ public class EmpUserController extends BaseController {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
EmpUser e = list.get(i);
|
||||
Map<String, Object> map = MapUtils.newHashMap();
|
||||
map.put("id", StringUtils.defaultIfBlank(idPrefix, "u_") + e.getId());
|
||||
map.put("id", ObjectUtils.defaultIfNull(idPrefix, "u_") + e.getId());
|
||||
map.put("pId", StringUtils.defaultIfBlank(pId, "0"));
|
||||
map.put("name", StringUtils.getTreeNodeName(isShowCode, e.getLoginCode(), e.getUserName()));
|
||||
mapList.add(map);
|
||||
|
||||
Reference in New Issue
Block a user