Commit 2b601680 by shiwenbo

修改查询部门接口

parent 33ec78df
...@@ -58,11 +58,16 @@ public class DinasCommonController { ...@@ -58,11 +58,16 @@ public class DinasCommonController {
} else { } else {
String departmentId = param.getString("id"); String departmentId = param.getString("id");
Boolean enable = param.getBoolean("enable"); Boolean enable = param.getBoolean("enable");
KObject rootLevel = departmentService.getByCode("quangongsi"); String type = param.optString("type", "REGIONAL_COMPANY");
KObject regionalLevel = departmentService.getById(UUID.fromString(departmentId)); if(type.equals("REGIONAL_COMPANY")) {
list.addAll(departmentService.getChildren(UUID.fromString(departmentId), enable)); KObject rootLevel = departmentService.getByCode("quangongsi");
list.add(rootLevel); KObject regionalLevel = departmentService.getById(UUID.fromString(departmentId));
list.add(regionalLevel); list.addAll(departmentService.getChildren(UUID.fromString(departmentId), enable));
list.add(rootLevel);
list.add(regionalLevel);
} else if(type.equals("GROUP_COMPANY")) {
list.addAll(departmentService.getAllEnable());
}
} }
Map<UUID, String> deptTitlePath = departmentService.getTitlePath(list); Map<UUID, String> deptTitlePath = departmentService.getTitlePath(list);
List<Map<String, Object>> result = deptAddTitlePathProperty(list, deptTitlePath); List<Map<String, Object>> result = deptAddTitlePathProperty(list, deptTitlePath);
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-privilege"> <metadata xmlns="http://www.beecode.cn/schema/amino-metadata" xmlns:m="http://www.beecode.cn/schema/bcp-privilege">
<specification>1.0</specification> <specification>1.0</specification>
<id>b9e8c287-d87e-4ab2-b23f-43e9c47abf48</id> <id>b9e8c287-d87e-4ab2-b23f-43e9c47abf48</id>
<name>com.xyst.dinas.biz.auth.SensitiveInfoLook</name> <name>com.xyst.dinas.biz.auth.SensitiveInfoLook</name>
<title>查看</title> <title>查看</title>
<define>bcp.authz.privilege</define> <define>bcp.authz.privilege</define>
<define-version>1.0.0</define-version> <define-version>1.0.0</define-version>
<content> <content>
<m:privilege> <m:privilege>
<m:type>TOKEN</m:type> <m:type>TOKEN</m:type>
<m:category>其他/敏感信息</m:category> <m:category>其他/敏感信息</m:category>
<m:seq>0</m:seq> <m:seq>0</m:seq>
</m:privilege> </m:privilege>
</content> </content>
</metadata> </metadata>
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