|  |  | 
 |  |  |         company.setCompanyNamePath(company.getName());//名称路径 | 
 |  |  |         company.setHkParentId(rootOrgId); | 
 |  |  |         String idPath = ""; | 
 |  |  |         if(StringUtils.isNotBlank(company.getErpParentId()) && !StringUtils.equals(company.getErpParentId(),Constants.ONE+"")){ | 
 |  |  |         if(StringUtils.isNotBlank(company.getErpParentId())){ | 
 |  |  |             Company parent = companyMapper.selectOne(new QueryWrapper<Company>().lambda().eq(Company::getErpId,company.getErpParentId()) | 
 |  |  |                     .eq(Company::getIsdeleted,Constants.ZERO).last(" limit 1 ")); | 
 |  |  |             if(parent == null || Constants.equalsInteger(parent.getIsdeleted(),Constants.ONE)){ | 
 |  |  | 
 |  |  |             company.setHkParentId(parent.getHkId()); | 
 |  |  |             company.setCompanyPath(parent.getCompanyPath()+company.getId()+"/"); | 
 |  |  |             company.setCompanyNamePath(parent.getCompanyNamePath()+"/"+company.getName()); | 
 |  |  |             company.setParentId(parent.getId()); | 
 |  |  |         } | 
 |  |  |         company.setHkCompanyPath(company.getCompanyNamePath()); | 
 |  |  |         company.setCreateDate(new Date()); | 
 |  |  | 
 |  |  |     public Company syncDDEditCompanyModel(OapiV2DepartmentGetResponse.DeptGetResponse deptGetResponse,Company company){ | 
 |  |  |         company.setErpParentId(deptGetResponse.getParentId().toString()); | 
 |  |  |         String idPath = ""; | 
 |  |  |         if(StringUtils.isNotBlank(company.getErpParentId()) && !StringUtils.equals(company.getErpParentId(),Constants.ONE+"")){ | 
 |  |  |         if(StringUtils.isNotBlank(company.getErpParentId())){ | 
 |  |  |             Company parent = companyMapper.selectOne(new QueryWrapper<Company>().lambda().eq(Company::getErpId,company.getErpParentId()) | 
 |  |  |                     .eq(Company::getIsdeleted,Constants.ZERO).last("limit 1 ")); | 
 |  |  |             if(parent == null || Constants.equalsInteger(parent.getIsdeleted(),Constants.ONE)){ | 
 |  |  | 
 |  |  |             company.setHkParentId(parent.getHkId()); | 
 |  |  |             company.setCompanyPath(parent.getCompanyPath()+company.getId()+"/"); | 
 |  |  |             company.setCompanyNamePath(parent.getCompanyNamePath()+"/"+company.getName()); | 
 |  |  |             company.setParentId(parent.getId()); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         company.setName(deptGetResponse.getName()); |