| | |
| | | }else{ |
| | | if( ! (Constants.equalsInteger(memberRole.getTimeType(),Constants.ZERO) |
| | | ||Constants.equalsInteger(memberRole.getTimeType(),Constants.TWO) |
| | | || (Constants.equalsObject(memberRole.getTimeType(),Constants.ONE) |
| | | || (Constants.equalsInteger(memberRole.getTimeType(),Constants.ONE) |
| | | && memberRole.getStartTime() !=null && memberRole.getEndTime() != null ))){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"有效期截止日期不能小于开始时间!"); |
| | | } |
| | | } |
| | | if(Constants.equalsObject(memberRole.getTimeType(),Constants.ZERO) ){ |
| | | if(Constants.equalsInteger(memberRole.getTimeType(),Constants.ZERO) ){ |
| | | memberRole.setStartTime(null); |
| | | memberRole.setEndTime(null); |
| | | } |
| | |
| | | if(model ==null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,人员信息不存在!"); |
| | | } |
| | | if(!Constants.equalsObject(model.getIsdeleted(),Constants.ONE)){ |
| | | if(!Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,只有针对离职人员可进行该操作!"); |
| | | } |
| | | if(Constants.equalsObject(model.getHkStatus(),Constants.ONE)){ |
| | | if(Constants.equalsInteger(model.getHkStatus(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该人员已被删除!"); |
| | | } |
| | | if(StringUtils.isBlank(model.getHkId())){ |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,人员信息不存在!"); |
| | | } |
| | | if(model.getCompanyId()!=null) { |
| | | if(Constants.equalsObject(member.getHeadStatus(),Constants.ONE)){ |
| | | if(Constants.equalsInteger(member.getHeadStatus(),Constants.ONE)){ |
| | | //如果是取消主管 |
| | | companyMapper.update(null,new UpdateWrapper<Company>().lambda() |
| | | .eq(Company::getId,model.getCompanyId()) |
| | |
| | | // .eq(Member::getStatus,Constants.Status.ENABLE.getValue()) |
| | | // .eq(Member::getType,Constants.memberType.internal) |
| | | .eq(pageWrap.getModel().getHkStatus()!=null,Member::getHkStatus,pageWrap.getModel().getHkStatus()) |
| | | .orderByDesc(!Constants.equalsObject(pageWrap.getModel().getIsdeleted(),Constants.ONE),Member::getCreateDate) |
| | | .orderByDesc(!Constants.equalsInteger(pageWrap.getModel().getIsdeleted(),Constants.ONE),Member::getCreateDate) |
| | | .orderByDesc(Constants.equalsInteger(pageWrap.getModel().getIsdeleted(),Constants.ONE),Member::getEditDate); |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin())==DataSyncConfig.origin.erp){ |
| | | queryWrapper.eq( StringUtils.isNotBlank(pageWrap.getModel().getErpOrgId()),Member::getErpOrgId,pageWrap.getModel().getErpOrgId()); |
| | |
| | | if(company == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,第"+(index+3)+"行组织名称【"+model.getCompanyName()+"】不存在,请检查表格内容!"); |
| | | } |
| | | if(companyType != null && !Constants.equalsObject(companyType,company.getType())){ |
| | | if(companyType != null && !Constants.equalsInteger(companyType,company.getType())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,第"+(index+3)+"行组织名称【"+model.getCompanyName()+"】类型不正确,请检查表格内容!"); |
| | | } |
| | | String candNo = DESUtil.encrypt(Constants.EDS_PWD, model.getIdcardNo()); |