Commit 2b601680 by shiwenbo

修改查询部门接口

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