| | |
| | | return 1; |
| | | |
| | | } |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer closeWtbForShop(InsuranceApply insuranceApply) { |
| | | if(insuranceApply.getId() == null ||StringUtils.isBlank(insuranceApply.getCheckInfo())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | InsuranceApply model = insuranceApplyMapper.selectById(insuranceApply.getId()); |
| | | |
| | | if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | //只有审核通过的状态可关闭 |
| | | if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_BUSINESS_CHECK_PASS.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | InsuranceApply update = new InsuranceApply(); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(user.getId()); |
| | | update.setStatus(Constants.InsuranceApplyStatus.WTB_CLOSED.getKey()); |
| | | update.setCheckDate(update.getEditDate()); |
| | | update.setCheckInfo(insuranceApply.getCheckInfo()); |
| | | update.setCheckUserId(user.getId()); |
| | | update.setId(model.getId()); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.SHOP_CLOSE_WTB_APPLY; |
| | | String info =applyLogType.getInfo(); |
| | | info = info.replace("${param}", update.getCheckInfo()); |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(),info,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | | applyLogMapper.insert(log); |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | |
| | | InsuranceApply update = new InsuranceApply(); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(model.getCreator()); |
| | | update.setStatus(Constants.InsuranceApplyStatus.WTB_UPLOAD.getKey()); |
| | | update.setStatus(Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey()); |
| | | update.setCheckDate(update.getEditDate()); |
| | | update.setCheckInfo("企业完成签署方案确认书"); |
| | | update.setCheckUserId(model.getCreator()); |
| | |
| | | f.setCreator(model.getCreator()); |
| | | f.setObjId(update.getId()); |
| | | f.setCreateDate(update.getEditDate()); |
| | | f.setObjType(Constants.MultiFile.SOLUTIONS_CONFIRMATION_LATTER.getKey()); |
| | | f.setObjType(Constants.MultiFile.WTB_CONFIRMATION_LATTER.getKey()); |
| | | f.setType(Constants.TWO); |
| | | f.setFileurl(fileurl); |
| | | f.setFileurlFull(fullUrl); |
| | | f.setInfo("企业完成签署方案确认书"); |
| | | f.setName("方案确认书.pdf"); |
| | | multifileMapper.insert(f); |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.WTB_FINISH_FAQRS; |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(), null |
| | | ,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | | applyLogMapper.insert(log); |
| | | return f; |
| | | } |
| | | |
| | |
| | | f.setInfo("委托保企业完成签署投保申请书"); |
| | | f.setName("投保申请书.pdf"); |
| | | multifileMapper.insert(f); |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.SIGNATURE; |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(), null |
| | | ,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | | applyLogMapper.insert(log); |
| | | return f; |
| | | } |
| | | |
| | |
| | | f.setInfo("企业完成签署人员名单"); |
| | | f.setName("人员名单.pdf"); |
| | | multifileMapper.insert(f); |
| | | |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.WTB_FINISH_MEMBER_LIST; |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(), null |
| | | ,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | | applyLogMapper.insert(log); |
| | | return f; |
| | | } |
| | | |
| | |
| | | f.setInfo("企业申请表签署文件"); |
| | | f.setName("签章申请表.pdf"); |
| | | multifileMapper.insert(f); |
| | | |
| | | Constants.ApplyLogType applyLogType =Constants.equalsInteger(Constants.ZERO,model.getType())? Constants.ApplyLogType.CA_JIAJIAN_APPLY_SIGN: Constants.ApplyLogType.CA_CHANGUNIT_APPLY_SIGN; |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(), null,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | | applyLogMapper.insert(log); |
| | |
| | | f.setInfo("企业完成签署人员名单"); |
| | | f.setName("签章人员名单.pdf"); |
| | | multifileMapper.insert(f); |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_WTB_FINISH_MEMBER_LIST; |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(), null,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | | applyLogMapper.insert(log); |
| | | |
| | | return f; |
| | | } |
| | |
| | | String fileUrl = uploadSignFile(link); |
| | | if(StringUtils.isBlank(fileUrl)){ |
| | | //如果下载失败,清除合同,下次签章重新生成新合同 |
| | | return; |
| | | continue; |
| | | } |
| | | uploadSignedFileDo(model,fileUrl,path+fileUrl); |
| | | return; |
| | | // return; |
| | | } |
| | | } |
| | | //委托保 企业签署投保确认书 |
| | |
| | | String fileUrl = uploadSignFile(link); |
| | | if(StringUtils.isBlank(fileUrl)){ |
| | | //如果下载失败,清除合同,下次签章重新生成新合同 |
| | | return; |
| | | continue; |
| | | } |
| | | uploadFAQRSSignedFileDo(model,fileUrl,path+fileUrl); |
| | | return; |
| | | // return; |
| | | } |
| | | } |
| | | |
| | |
| | | String fileUrl = uploadSignFile(link); |
| | | if(StringUtils.isBlank(fileUrl)){ |
| | | //如果下载失败,清除合同,下次签章重新生成新合同 |
| | | return; |
| | | continue; |
| | | } |
| | | uploadApplyMemberListSignedFileDo(model,fileUrl,path+fileUrl); |
| | | return; |
| | | // return; |
| | | } |
| | | } |
| | | |
| | |
| | | String fileUrl = uploadSignFile(link); |
| | | if(StringUtils.isBlank(fileUrl)){ |
| | | //如果下载失败,清除合同,下次签章重新生成新合同 |
| | | return; |
| | | continue; |
| | | } |
| | | uploadTBSQSSignedFileDo(model,fileUrl,path+fileUrl); |
| | | return; |
| | | // return; |
| | | } |
| | | } |
| | | |
| | |
| | | String fileUrl = uploadSignFile(link); |
| | | if(StringUtils.isBlank(fileUrl)){ |
| | | //如果下载失败,清除合同,下次签章重新生成新合同 |
| | | return; |
| | | continue; |
| | | } |
| | | uploadChangeSignedFileDo(model,fileUrl,path+fileUrl); |
| | | return; |
| | | // return; |
| | | } |
| | | } |
| | | |
| | |
| | | String fileUrl = uploadSignFile(link); |
| | | if(StringUtils.isBlank(fileUrl)){ |
| | | //如果下载失败,清除合同,下次签章重新生成新合同 |
| | | return; |
| | | continue; |
| | | } |
| | | uploadChangeMemberListSignedFileDo(model,fileUrl,path+fileUrl); |
| | | return; |
| | | // return; |
| | | } |
| | | } |
| | | |
| | |
| | | String fileUrl = uploadSignFile(link); |
| | | if(StringUtils.isBlank(fileUrl)){ |
| | | //如果下载失败,清除合同,下次签章重新生成新合同 |
| | | return; |
| | | continue; |
| | | } |
| | | uploadUnionApplySignedFileDo(model,fileUrl,path+fileUrl); |
| | | return; |
| | | // return; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | @Override |
| | |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询方案信息"); |
| | | } |
| | | if(solutions.getType().equals(Constants.ZERO)){ |
| | | if(Constants.equalsObject(solutions.getType(),Constants.ZERO)){ |
| | | if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | }else{ |
| | | if(!user.getType().equals(Constants.TWO)){ |
| | | if(!Constants.equalsObject(user.getType(),Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户端无法进行该操作"); |
| | | } |
| | | if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_RETURN.getKey())){ |
| | | //委托保待签署、待审核可进行退回操作 |
| | | if(!(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_UPLOAD.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_COMPANY_MEMBER_LIST_SIGNATURE.getKey()) |
| | | )){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | } |
| | |
| | | //如果是不通过 |
| | | applyLogType = Constants.ApplyLogType.PLATFORM_RETURN ; |
| | | update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey()); |
| | | if(Constants.equalsObject(solutions.getType(),Constants.ONE)){ |
| | | update.setStatus(Constants.InsuranceApplyStatus.WTB_RETURN.getKey()); |
| | | } |
| | | }else{ |
| | | applyLogType = Constants.ApplyLogType.PLATFORM_CHECK_PASS; |
| | | update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()); |
| | | if(Constants.equalsObject(solutions.getType(),Constants.ONE)){ |
| | | update.setStatus(Constants.InsuranceApplyStatus.WTB_BUSINESS_CHECK_PASS.getKey()); |
| | | } |
| | | } |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | |
| | | QueryWrapper<InsuranceApply> wrapper = new QueryWrapper<>(insuranceApply); |
| | | return insuranceApplyMapper.selectList(wrapper); |
| | | } |
| | | |
| | | public List<Integer> getCollectStatus(Integer collectStatus){ |
| | | if(collectStatus ==null){ |
| | | return new ArrayList<>(); |
| | | } |
| | | List<Integer> statusList = Constants.InsuranceApplyStatus.getKesByStatus(collectStatus); |
| | | if(collectStatus.equals(Constants.ApplyCollectStatus.DCD)){ |
| | | statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBDCD.getKey())); |
| | | }else if(collectStatus.equals(Constants.ApplyCollectStatus.DSP)){ |
| | | statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBDSH.getKey())); |
| | | }else if(collectStatus.equals(Constants.ApplyCollectStatus.BZZ)){ |
| | | statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBBZZ.getKey())); |
| | | }else if(collectStatus.equals(Constants.ApplyCollectStatus.YTH)){ |
| | | statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBYTH.getKey())); |
| | | }else if(collectStatus.equals(Constants.ApplyCollectStatus.YGB)){ |
| | | statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBYGB.getKey())); |
| | | }else if(collectStatus.equals(Constants.ApplyCollectStatus.DQYQZ)){ |
| | | statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBDQS.getKey())); |
| | | } |
| | | |
| | | return statusList; |
| | | } |
| | | |
| | | @Override |
| | | public PageData<InsuranceApply> findPage(PageWrap<InsuranceApplyQueryDTO> pageWrap) { |
| | | IPage<InsuranceApply> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<InsuranceApply> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | List<Integer> statusList = Constants.InsuranceApplyStatus.getKesByStatus(pageWrap.getModel().getStatusCollect()); |
| | | |
| | | List<Integer> statusList = this.getCollectStatus(pageWrap.getModel().getStatusCollect()); |
| | | |
| | | queryWrapper.selectAll(InsuranceApply.class); |
| | | queryWrapper.selectAs(Company::getName,InsuranceApply::getCompanyName); |
| | | queryWrapper.selectAs(Solutions::getName,InsuranceApply::getSolutionsName); |
| | |
| | | |
| | | private void initImgData(InsuranceApply model) { |
| | | List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId,Constants.equalsInteger(model.getSolutionType(),Constants.ZERO)? model.getId():model.getUnionApplyId()) |
| | | .eq(Multifile::getObjId, model.getId()) |
| | | .in(Multifile::getObjType,Arrays.asList(new Integer[]{Constants.MultiFile.BD_APPLY_PDF.getKey() |
| | | ,Constants.MultiFile.BD_SIGNED_PDF.getKey() |
| | | ,Constants.MultiFile.WTB_CONFIRMATION_LATTER.getKey() |
| | | ,Constants.MultiFile.MEMBER_LIST_LATTER.getKey() |
| | | ,Constants.MultiFile.BD_DONE_PDF.getKey()})) |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO)); |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO) |
| | | .orderByAsc(Multifile::getId)); |
| | | if(multifiles!=null){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.OSS,Constants.APPLY_FILE).getCode(); |
| | |
| | | }else if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.BD_DONE_PDF.getKey())){ |
| | | //最終保险单 |
| | | model.setBaoxiandanFile(f); |
| | | }else if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.MEMBER_LIST_LATTER.getKey())){ |
| | | //申请单 |
| | | model.setShenqingdanFile(f); |
| | | }else if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.WTB_CONFIRMATION_LATTER.getKey())){ |
| | | //签署后确认书 |
| | | model.setFanganFile(f); |
| | | } |
| | | |
| | | // if(model.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){ |
| | |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | smsEmailService.validateCode(smsCheckDTO.getCode()); |
| | | |
| | | if(!debugModel){ |
| | | smsEmailService.validateCode(smsCheckDTO.getCode()); |
| | | } |
| | | MPJLambdaWrapper wrapper= new MPJLambdaWrapper<InsuranceApply>() |
| | | .selectAll(InsuranceApply.class) |
| | | .selectAs(Solutions::getSignKeyword,InsuranceApply::getSignKeyword) |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .eq(InsuranceApply::getId,smsCheckDTO.getCode()) |
| | | .eq(InsuranceApply::getId,smsCheckDTO.getBusinessId()) |
| | | .last("limit 1"); |
| | | |
| | | InsuranceApply model = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class,wrapper); |
| | | if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询方案信息"); |
| | | } |
| | | if(solutions.getType().equals(Constants.ZERO)){ |
| | | if(Constants.equalsInteger(solutions.getType(),(Constants.ZERO))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,非委托保方案保单!"); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | //验证 验证码 |
| | | smsEmailService.validateCode(smsCheckDTO.getCode()); |
| | | if(!debugModel){ |
| | | smsEmailService.validateCode(smsCheckDTO.getCode()); |
| | | } |
| | | InsuranceApply model = this.queryApplyDetail(smsCheckDTO.getBusinessId()); |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询保单信息"); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | //验证 验证码 |
| | | smsEmailService.validateCode(smsCheckDTO.getCode()); |
| | | if(!debugModel){ |
| | | smsEmailService.validateCode(smsCheckDTO.getCode()); |
| | | } |
| | | MPJLambdaWrapper wrapper= new MPJLambdaWrapper<InsuranceApply>() |
| | | .selectAll(InsuranceApply.class) |
| | | .selectAs(Solutions::getSignKeyword,InsuranceApply::getSignKeyword) |