|  |  | 
 |  |  |                 throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "对不起,父级组织信息尚未同步下发成功~"); | 
 |  |  |             } | 
 |  |  |             if(Objects.nonNull(parent.getType())&&!Constants.equalsInteger(parent.getType(),-1)){ | 
 |  |  |                 if(Constants.equalsInteger(company.getType(),parent.getType())){ | 
 |  |  |                 if(!Constants.equalsInteger(company.getType(),parent.getType())){ | 
 |  |  |                     throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,组织信息错误"); | 
 |  |  |                 } | 
 |  |  |             }else if(Objects.isNull(parent.getType())){ | 
 |  |  | 
 |  |  |                 throw  new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,组织同步下发失败,请稍后重试"); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  | 
 |  |  |         queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getStatus()),Company::getStatus,Constants.ZERO); | 
 |  |  |         queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getName()),Company::getName,pageWrap.getModel().getName()); | 
 |  |  |         queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getParentName()),"c.name",pageWrap.getModel().getParentName()); | 
 |  |  |         queryWrapper.orderByAsc(Company::getPinyin); | 
 |  |  |         queryWrapper.orderByAsc(Company::getSortnum); | 
 |  |  |         IPage<Company> companyIPage = companyJoinMapper.selectJoinPage(page, Company.class, queryWrapper); | 
 |  |  |         return PageData.from(companyIPage); | 
 |  |  |     } | 
 |  |  | 
 |  |  |  | 
 |  |  |         wrapper.eq(Company::getIsdeleted,Constants.ZERO) | 
 |  |  |                 .eq(Constants.equalsInteger(type,Constants.ONE),Company::getType,type) | 
 |  |  |                 .orderByAsc(Company::getPinyin); | 
 |  |  |                 .orderByAsc(Company::getSortnum); | 
 |  |  |         List<Company> companies = companyMapper.selectList(wrapper); | 
 |  |  |         return getCompanyTree( companies, null); | 
 |  |  |     } | 
 |  |  | 
 |  |  |         queryWrapper.eq(Company::getIsdeleted,Constants.ZERO); | 
 |  |  |         if(Objects.nonNull(type) && ( Constants.equalsInteger(type,Constants.ONE) || Constants.equalsInteger(type,Constants.ZERO))){ | 
 |  |  | //            queryWrapper.eq(type!=null,Company::getType,type); | 
 |  |  |             queryWrapper.apply("( type = "+type+" or type  = -1  )"); | 
 |  |  |             queryWrapper.apply("( t.type = "+type+" or t.type  = -1  )"); | 
 |  |  |         }else if(Objects.nonNull(type) &&  Constants.equalsInteger(type,Constants.TWO)){ | 
 |  |  |             String companySpecialId = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SPECIAL_COMPANY_ID).getCode(); | 
 |  |  |             if(StringUtils.isNotBlank(companySpecialId)){ |