Commit 873217ae by qwmqiuwenmin

fix

parent b4702859
......@@ -405,16 +405,19 @@ public class DepartmentContoller extends WebBaseController{
if(department == null){
return resultResponse(HaoBanErrCode.ERR_10003);
}
String chainId = department.getChainId() + Constant.ID_SEPARATOR + departmentId;
String chainId = departmentId;
while(department != null){
department = departmentApiService.selectById(department.getParentDepartmentId());
chainId = Constant.ID_SEPARATOR + department.getDepartmentId();
}
String[] chainIdArr = chainId.split(Constant.ID_SEPARATOR);
List<DepartmentChainVO> list = new ArrayList<>();
for (String string : chainIdArr) {
if("0".equals(string)){
continue;
}
DepartmentDTO son = departmentApiService.selectById(string);
DepartmentChainVO chain = EntityUtil.changeEntityByJSON(DepartmentChainVO.class, son);
list.add(chain);
if(son != null){
list.add(chain);
}
}
return resultResponse(HaoBanErrCode.ERR_1,list);
}
......
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