| | |
| | | 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(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)){ |