| | |
| | | import com.doumee.dao.business.dto.CountCyclePriceDTO; |
| | | import com.doumee.dao.business.dto.InsuranceApplyOptDTO; |
| | | import com.doumee.dao.business.dto.InsuranceApplyQueryDTO; |
| | | import com.doumee.dao.business.dto.SmsCheckDTO; |
| | | import com.doumee.dao.business.join.*; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.CountCyclePriceVO; |
| | |
| | | } |
| | | |
| | | /** |
| | | * å§æä¿ ä¼ä¸ç¾ç½²æä¿ç³è¯·ä¹¦ |
| | | * @param model |
| | | * @param fileurl |
| | | * @param fullUrl |
| | | * @return |
| | | */ |
| | | public Multifile uploadTBSQSSignedFileDo(InsuranceApply model,String fileurl,String fullUrl) { |
| | | InsuranceApply update = new InsuranceApply(); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(model.getCreator()); |
| | | update.setUnionApplyTbdStatus(Constants.TWO); |
| | | update.setCheckDate(update.getEditDate()); |
| | | update.setCheckInfo("å§æä¿ä¼ä¸å®æç¾ç½²æä¿ç³è¯·ä¹¦"); |
| | | update.setCheckUserId(model.getCreator()); |
| | | update.setId(model.getId()); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | Multifile f = new Multifile(); |
| | | f.setIsdeleted(Constants.ZERO); |
| | | f.setCreator(model.getCreator()); |
| | | f.setObjId(update.getId()); |
| | | f.setCreateDate(update.getEditDate()); |
| | | f.setObjType(Constants.MultiFile.COMPANY_TBD_SIGNED_PDF.getKey()); |
| | | f.setType(Constants.TWO); |
| | | f.setFileurl(fileurl); |
| | | f.setFileurlFull(fullUrl); |
| | | f.setInfo("å§æä¿ä¼ä¸å®æç¾ç½²æä¿ç³è¯·ä¹¦"); |
| | | f.setName("æä¿ç³è¯·ä¹¦.pdf"); |
| | | multifileMapper.insert(f); |
| | | return f; |
| | | } |
| | | |
| | | /** |
| | | * å§æä¿ ä¼ä¸ç¾ç½² 人ååå |
| | | * @param model |
| | | * @param fileurl |
| | |
| | | return; |
| | | } |
| | | } |
| | | |
| | | //å§æä¿ä¼ä¸ç¾ç½²æä¿ç³è¯·å |
| | | applyList = insuranceApplyJoinMapper.selectJoinList(InsuranceApply.class, |
| | | new MPJLambdaWrapper<InsuranceApply>() |
| | | .selectAll(InsuranceApply.class) |
| | | .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) |
| | | .selectAs(Solutions::getEmail,InsuranceApply::getSolutionEmail) |
| | | .selectAs(Company::getName,InsuranceApply::getCompanyName) |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) |
| | | .eq(InsuranceApply::getUnionApplyTbdStatus,Constants.ONE) |
| | | .eq(Solutions::getType,Constants.ONE) |
| | | .isNotNull(InsuranceApply::getApplyTbdNo)); |
| | | |
| | | if(applyList !=null && applyList.size()>0 ){ |
| | | for(InsuranceApply model : applyList){ |
| | | String status = signService.linkFileStatus(model.getApplyTbdNo()); |
| | | if(!StringUtils.equals(status,"3")){ |
| | | continue; |
| | | } |
| | | String link = signService.linkFile(model.getApplyTbdNo()); |
| | | String fileUrl = uploadSignFile(link); |
| | | if(StringUtils.isBlank(fileUrl)){ |
| | | //妿ä¸è½½å¤±è´¥ï¼æ¸
é¤ååï¼ä¸æ¬¡ç¾ç« éæ°çææ°åå |
| | | return; |
| | | } |
| | | uploadTBSQSSignedFileDo(model,fileUrl,path+fileUrl); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | List<ApplyChange> chagneList = applyChangeMapper.selectJoinList(ApplyChange.class, |
| | | new MPJLambdaWrapper<ApplyChange>() |
| | |
| | | .eq(Solutions::getType,Constants.ONE) |
| | | .eq(InsuranceApply::getSignQrsNo,data.getApplyNo()) |
| | | .last("limit 1" )); |
| | | if(modelTBQRS != null && Constants.equalsInteger(modelTBQRS.getStatus(),Constants.InsuranceApplyStatus.UPLOAD.getKey())){ |
| | | if(modelTBQRS != null && Constants.equalsInteger(modelTBQRS.getStatus(),Constants.InsuranceApplyStatus.WTB_UPLOAD.getKey())){ |
| | | //宿ç¾ç½²å·²å®ææä½ |
| | | String link = signService.linkFile(data.getApplyNo()); |
| | | String fileUrl = uploadSignFile(link); |
| | |
| | | uploadFAQRSSignedFileDo(modelTBQRS,fileUrl,path+fileUrl); |
| | | return; |
| | | } |
| | | |
| | | |
| | | |
| | | //å§æä¿ ä¼ä¸ç¾ç½²äººååå |
| | | InsuranceApply modelMemberList = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class, |
| | | new MPJLambdaWrapper<InsuranceApply>() |
| | |
| | | return; |
| | | } |
| | | uploadApplyMemberListSignedFileDo(modelMemberList,fileUrl,path+fileUrl); |
| | | return; |
| | | } |
| | | |
| | | |
| | | //å§æä¿ æä¿ç³è¯·ä¹¦ç¾ç½² |
| | | InsuranceApply modelTBQSQ = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class, |
| | | new MPJLambdaWrapper<InsuranceApply>() |
| | | .selectAll(InsuranceApply.class) |
| | | .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) |
| | | .selectAs(Solutions::getEmail,InsuranceApply::getSolutionEmail) |
| | | .selectAs(Company::getName,InsuranceApply::getCompanyName) |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) |
| | | .eq(Solutions::getType,Constants.ONE) |
| | | .eq(InsuranceApply::getApplyTbdNo,data.getApplyNo()) |
| | | .last("limit 1" )); |
| | | if(modelTBQRS != null && Constants.equalsInteger(modelTBQSQ.getUnionApplyTbdStatus(),Constants.ONE)){ |
| | | //宿ç¾ç½²å·²å®ææä½ |
| | | String link = signService.linkFile(data.getApplyNo()); |
| | | String fileUrl = uploadSignFile(link); |
| | | if(StringUtils.isBlank(fileUrl)){ |
| | | //妿ä¸è½½å¤±è´¥ï¼æ¸
é¤ååï¼ä¸æ¬¡ç¾ç« éæ°çææ°åå |
| | | return; |
| | | } |
| | | uploadTBSQSSignedFileDo(modelTBQSQ,fileUrl,path+fileUrl); |
| | | return; |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * å§æå® æä¿ç¡®è®¤ä¹¦ |
| | | * @param id |
| | | * @param smsCheckDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public String getSignTBQRSLink(Integer id) { |
| | | if(id == null ){ |
| | | public String getSignTBQRSLink(SmsCheckDTO smsCheckDTO) { |
| | | if(Objects.isNull(smsCheckDTO) |
| | | || Objects.isNull(smsCheckDTO.getBusinessId()) |
| | | || StringUtils.isBlank(smsCheckDTO.getCode()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | 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,id) |
| | | .eq(InsuranceApply::getId,smsCheckDTO.getCode()) |
| | | .last("limit 1"); |
| | | |
| | | InsuranceApply model = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class,wrapper); |
| | |
| | | * 人åååç¾ç« |
| | | */ |
| | | @Override |
| | | public String getMemberListOnlineSignLink(Integer applyId) { |
| | | InsuranceApply model = this.queryApplyDetail(applyId); |
| | | public String getMemberListOnlineSignLink(SmsCheckDTO smsCheckDTO) { |
| | | if(Objects.isNull(smsCheckDTO) |
| | | || Objects.isNull(smsCheckDTO.getBusinessId()) |
| | | || StringUtils.isBlank(smsCheckDTO.getCode()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | //éªè¯ éªè¯ç |
| | | smsEmailService.validateCode(smsCheckDTO.getCode()); |
| | | InsuranceApply model = this.queryApplyDetail(smsCheckDTO.getBusinessId()); |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢ä¿åä¿¡æ¯"); |
| | | } |
| | |
| | | |
| | | /** |
| | | * å§æä¿ æä¿ç³è¯·ç¾ç½² |
| | | * @param id |
| | | * @param smsCheckDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public String getSignWTBTBDLink(Integer id) { |
| | | if(id == null ){ |
| | | public String getSignWTBTBDLink(SmsCheckDTO smsCheckDTO) { |
| | | if(Objects.isNull(smsCheckDTO) |
| | | || Objects.isNull(smsCheckDTO.getBusinessId()) |
| | | || StringUtils.isBlank(smsCheckDTO.getCode()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | //éªè¯ éªè¯ç |
| | | 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,id) |
| | | .eq(InsuranceApply::getId,smsCheckDTO.getBusinessId()) |
| | | .last("limit 1"); |
| | | |
| | | InsuranceApply model = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class,wrapper); |
| | |
| | | } |
| | | Multifile f = multifileMapper.selectOne(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId,model.getId()) |
| | | .eq(Multifile::getObjType,Constants.MultiFile.COMPANY_TBD_SIGNED_PDF.getKey()) |
| | | .eq(Multifile::getObjType,Constants.MultiFile.COMPANY_TBD_SIGNED.getKey()) |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO).last("limit 1")); |
| | | if(f == null || StringUtils.isBlank(f.getFileurl())){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼è·å确认书æä»¶å¤±è´¥ï¼è¯·èç³»åæ·ç¡®è®¤æä¿ç³è¯·ä¹¦æ¯å¦æ£ç¡®ï¼"); |