| | |
| | | IPage<UnionApply> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<UnionApply> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(user.getType().equals(Constants.TWO)){ |
| | | queryWrapper.lambda().eq(UnionApply::getCompanyId, pageWrap.getModel().getCompanyId()); |
| | | } |
| | | |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(UnionApply::getId, pageWrap.getModel().getId()); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public UnionApply detail(Integer applyId){ |
| | | UnionApply unionApply = unionApplyJoinMapper.selectJoinOne(UnionApply.class, |
| | | new MPJLambdaWrapper<UnionApply>() |
| | | .selectAll(UnionApply.class) |
| | | .selectAs(Solutions::getName,UnionApply::getSolutionName) |
| | | .select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad where ad.UNION_APPLY_ID = t.id ) as insureNum") |
| | | .leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId) |
| | | .eq(UnionApply::getId,applyId) |
| | | .last(" limit 1 ") |
| | | ); |
| | | return unionApply; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Integer merge(SaveUnionApplyDTO saveUnionApplyDTO){ |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(user.getType().equals(Constants.TWO)){ |
| | | if(!user.getType().equals(Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作"); |
| | | } |
| | | if(Objects.isNull(saveUnionApplyDTO) |
| | |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void cancelMerge(Integer id){ |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(user.getType().equals(Constants.TWO)){ |
| | | if(!user.getType().equals(Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作!"); |
| | | } |
| | | UnionApply unionApply = unionApplyMapper.selectById(id); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(!user.getType().equals(Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作!"); |
| | | } |
| | | UnionApply unionApply = unionApplyMapper.selectById(uploadMultifileDTO.getBusinessId()); |
| | | if(Objects.isNull(unionApply)||!Constants.equalsInteger(unionApply.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(!user.getType().equals(Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作!"); |
| | | } |
| | | UnionApply unionApply = unionApplyJoinMapper.selectById(id); |
| | | if(unionApply == null ||!Constants.equalsInteger(unionApply.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(!user.getType().equals(Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作!"); |
| | | } |
| | | UnionApply unionApply = unionApplyJoinMapper.selectById(unionApplyBXDDTO.getId()); |
| | | if(unionApply == null ||!Constants.equalsInteger(unionApply.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |