| | |
| | | private UnionApplyJoinMapper unionApplyJoinMapper; |
| | | @Autowired |
| | | private UnionChangeJoinMapper unionChangeJoinMapper; |
| | | @Autowired |
| | | private CompanySolutionMapper companySolutionMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | |
| | | update.setStatus(Constants.InsuranceApplyStatus.FAIL_RETURN.getKey()); |
| | | }else{ |
| | | if( !(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_COMPANY_MEMBER_LIST_SIGNATURE.getKey()) |
| | | || Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey()))){ |
| | | || Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey()) |
| | | || Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_UPLOAD.getKey()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | update.setStatus(Constants.InsuranceApplyStatus.WTB_RETURN.getKey()); |
| | |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) |
| | | .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) |
| | | .eq(Notices::getObjId,model.getId())); |
| | | //平台待办 |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,model.getId(),model.getSolutionsName(),model.getCompanyId(),Constants.NoticeType.TWO); |
| | | noticesMapper.insert(notices); |
| | | Solutions solutions = solutionsMapper.selectById(model.getSolutionId()); |
| | | if(Objects.nonNull(solutions)&&Objects.nonNull(solutions.getShopId())){ |
| | | Notices shopNotices = new Notices(noticeObjectType,Constants.TWO,model.getId(),model.getSolutionsName(),solutions.getShopId(),Constants.NoticeType.TWO); |
| | | |
| | | CompanySolution companySolution = companySolutionMapper.selectOne(new QueryWrapper<CompanySolution>().lambda() |
| | | .eq(CompanySolution::getIsdeleted,Constants.ZERO) |
| | | .eq(CompanySolution::getSolutionId,model.getSolutionId()) |
| | | .eq(CompanySolution::getCompanyId,model.getCompanyId()) |
| | | .last("limit 1") |
| | | ); |
| | | //商户待办 |
| | | if(Objects.nonNull(companySolution)&&Objects.nonNull(companySolution.getShopId())){ |
| | | Notices shopNotices = new Notices(noticeObjectType,Constants.TWO, |
| | | model.getId(),model.getSolutionsName(),companySolution.getShopId(),Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(shopNotices); |
| | | } |
| | | |
| | | |
| | | |
| | | Multifile f = new Multifile(); |
| | | f.setIsdeleted(Constants.ZERO); |
| | |
| | | applyLogType = Constants.ApplyLogType.PLATFORM_CHECK_PASS; |
| | | if(Constants.equalsObject(solutions.getType(),Constants.ONE)){ |
| | | update.setStatus(Constants.InsuranceApplyStatus.WTB_BUSINESS_CHECK_PASS.getKey()); |
| | | }else{ |
| | | update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()); |
| | | } |
| | | } |
| | | insuranceApplyMapper.updateById(update); |
| | |
| | | //存储平台待办 |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,insuranceApply.getId(),solutions.getName(),insuranceApply.getCompanyId(),Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | CompanySolution companySolution = companySolutionMapper.selectOne(new QueryWrapper<CompanySolution>().lambda() |
| | | .eq(CompanySolution::getIsdeleted,Constants.ZERO) |
| | | .eq(CompanySolution::getSolutionId,solutions.getId()) |
| | | .eq(CompanySolution::getCompanyId,insuranceApply.getCompanyId()) |
| | | .last("limit 1") |
| | | ); |
| | | //商户待办 |
| | | if(Objects.nonNull(solutions.getShopId())){ |
| | | if(Objects.nonNull(companySolution)&&Objects.nonNull(companySolution.getShopId())){ |
| | | Notices shopNotices = new Notices(noticeObjectType,Constants.TWO, |
| | | insuranceApply.getId(),solutions.getName(),solutions.getShopId(),Constants.NoticeType.ZERO); |
| | | insuranceApply.getId(),solutions.getName(),companySolution.getShopId(),Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(shopNotices); |
| | | } |
| | | } |
| | |
| | | if(!(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD.getKey()) |
| | | ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey()) |
| | | ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()) |
| | | ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.SIGNATURE.getKey()))){ |
| | | ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.SIGNATURE.getKey())) |
| | | ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WTB_UPLOAD.getKey()) |
| | | || insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey()) |
| | | || insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WTB_COMPANY_MEMBER_LIST_SIGNATURE.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"数据状态非可申请退回!"); |
| | | } |
| | | if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD.getKey())){ |
| | |
| | | insuranceApplyStatus = Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS; |
| | | } |
| | | |
| | | else if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WTB_UPLOAD.getKey()) |
| | | || insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey()) |
| | | || insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WTB_COMPANY_MEMBER_LIST_SIGNATURE.getKey())){ |
| | | insuranceApplyStatus = Constants.InsuranceApplyStatus.WTB_RETURN; |
| | | } |
| | | |
| | | //存储待办信息 |
| | | //删除其他待办 |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) |
| | | .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) |
| | | .eq(Notices::getObjId,insuranceApply.getId())); |
| | | if(!loginUserInfo.getCompanyId().equals(insuranceApply.getCompanyId())){ |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,insuranceApply.getId(),solutions.getName(), |
| | | insuranceApply.getCompanyId(), Constants.NoticeType.THREE); |
| | | noticesMapper.insert(notices); |
| | | //商户待办 |
| | | if(Objects.nonNull(solutions.getShopId())){ |
| | | Notices shopNotices = new Notices(noticeObjectType,Constants.TWO, |
| | | insuranceApply.getId(),solutions.getName(),solutions.getShopId(),Constants.NoticeType.THREE); |
| | | noticesMapper.insert(shopNotices); |
| | | } |
| | | |
| | | |
| | | // CompanySolution companySolution = companySolutionMapper.selectOne(new QueryWrapper<CompanySolution>().lambda() |
| | | // .eq(CompanySolution::getIsdeleted,Constants.ZERO) |
| | | // .eq(CompanySolution::getSolutionId,solutions.getId()) |
| | | // .eq(CompanySolution::getCompanyId,insuranceApply.getCompanyId()) |
| | | // .last("limit 1") |
| | | // ); |
| | | // //商户待办 |
| | | // if(Objects.nonNull(companySolution)&&Objects.nonNull(companySolution.getShopId())){ |
| | | // Notices shopNotices = new Notices(noticeObjectType,Constants.TWO, |
| | | // insuranceApply.getId(),solutions.getName(),companySolution.getShopId(),Constants.NoticeType.THREE); |
| | | // noticesMapper.insert(shopNotices); |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }else if(insuranceApplyOptDTO.getOptType().equals(Constants.TWO)){ |
| | | insuranceApplyStatus = Constants.InsuranceApplyStatus.CLOSE; |
| | | if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.CLOSE.getKey())){ |