Commit 2b601680 by shiwenbo

修改查询部门接口

parent 33ec78df
......@@ -58,11 +58,16 @@ public class DinasCommonController {
} else {
String departmentId = param.getString("id");
Boolean enable = param.getBoolean("enable");
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);
......
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