Commit 0a36fde5 by qwmqiuwenmin

Merge branch 'developer' of http://115.159.76.241/haoban3.0/haoban-manage3.0.git into developer

parents fa7b5480 d01f8d3c
......@@ -330,12 +330,14 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
int level = 1;
String chainId = "0";
String chainName = "0";
String pId = "0";
if(parentId != 0){
TabHaobanDepartment parent = this.departmentService.getByWxId(parentId + "", wxEnterpriseId);
if(parent != null){
level = parent.getLevel() + 1;
chainId = parent.getChainId() + Constant.ID_SEPARATOR + parent.getDepartmentId();
chainName = parent.getChainName() + Constant.NAME_SEPARATOR + parent.getChainName();
pId = parent.getDepartmentId();
}
}
for(com.gic.wechat.api.dto.qywx.DepartmentDTO departmentDTO : list){
......@@ -348,7 +350,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
dto.setLevel(level);
dto.setWxEnterpriseId(wxEnterpriseId);
dto.setWxDepartmentId(departmentDTO.getId()+"");
dto.setParentDepartmentId(parentId+"");
dto.setParentDepartmentId(pId);
dto.setChainId(chainId);
dto.setChainName(chainName);
this.departmentService.add(dto);
......
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