| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dto.ApplyChangeCyclePriceDTO; |
| | | import com.doumee.dao.business.dto.ApplyChangeOptDTO; |
| | | import com.doumee.dao.business.dto.CountCyclePriceDTO; |
| | | import com.doumee.dao.business.dto.InsuranceApplyOptDTO; |
| | | import com.doumee.dao.business.dto.*; |
| | | import com.doumee.dao.business.join.*; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.CountCyclePriceVO; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.service.business.SmsEmailService; |
| | | import com.doumee.service.business.third.SignService; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | |
| | | @Autowired |
| | | private SolutionsMapper solutionsMapper; |
| | | |
| | | @Autowired |
| | | private SmsEmailService smsEmailService; |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | /** |
| | |
| | | * 人员名单签章 |
| | | */ |
| | | @Override |
| | | public String getChangeMemberListOnlineSignLink(Integer applyChangeId) { |
| | | ApplyChange model = this.queryApplyChangeData(applyChangeId); |
| | | public String getChangeMemberListOnlineSignLink(SmsCheckDTO smsCheckDTO) { |
| | | if(Objects.isNull(smsCheckDTO) |
| | | || Objects.isNull(smsCheckDTO.getBusinessId()) |
| | | || StringUtils.isBlank(smsCheckDTO.getCode()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | //验证 验证码 |
| | | if(!debugModel){ |
| | | smsEmailService.validateCode(smsCheckDTO.getCode()); |
| | | } |
| | | ApplyChange model = this.queryApplyChangeData(smsCheckDTO.getBusinessId()); |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询加减保信息"); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer check(ApplyChange applyChange) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(!user.getType().equals(Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户端无法进行该操作"); |
| | | } |
| | | if(applyChange.getId() == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | ApplyChange model = applyChangeJoinMapper.selectJoinOne(ApplyChange.class, |
| | | new MPJLambdaWrapper<ApplyChange>() |
| | | .selectAll(ApplyChange.class) |
| | | .selectAs(InsuranceApply::getSolutionId,ApplyChange::getSolutionsId) |
| | | .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId) |
| | | .eq(ApplyChange::getId,applyChange.getId()) |
| | | .last(" limit 1") |
| | | ); |
| | | |
| | | if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(model.getSolutionsId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询方案信息"); |
| | | } |
| | | if(solutions.getType().equals(Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"直保单据无法进行该操作"); |
| | | }else{ |
| | | if(!Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.COMPANY_SIGN.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | } |
| | | |
| | | ApplyChange update = new ApplyChange(); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(user.getId()); |
| | | update.setCheckDate(update.getEditDate()); |
| | | update.setCheckInfo(applyChange.getCheckInfo()); |
| | | update.setCheckUserId(user.getId()); |
| | | update.setId(model.getId()); |
| | | if(applyChange.getDealBackApply() ==1){ |
| | | //如果是不通过 |
| | | update.setStatus(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS_NO.getKey()); |
| | | }else{ |
| | | update.setStatus(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS.getKey()); |
| | | } |
| | | applyChangeJoinMapper.updateById(update); |
| | | |
| | | return 1; |
| | | |
| | | } |
| | | |
| | | } |