| | |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.ApplyPowerVO; |
| | | import com.doumee.dao.business.vo.CountCyclePriceVO; |
| | | import com.doumee.dao.business.vo.dataBoard.InsuranceDataVO; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.InsuranceApplyService; |
| | |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private SmsEmailService smsEmailService; |
| | | @Autowired |
| | | private ApplyChangeJoinMapper applyChangeMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | |
| | | private CompanyMapper companyMapper; |
| | | @Autowired |
| | | private MemberInsuranceJoinMapper memberInsuranceJoinMapper; |
| | | |
| | | @Autowired |
| | | private ApplyDetailMapper applyDetailMapper; |
| | | @Autowired |
| | | private ApplyDetailJoinMapper applyDetailJoinMapper; |
| | | |
| | | @Autowired |
| | | private ApplyLogMapper applyLogMapper; |
| | | @Autowired |
| | | private SignService signService; |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | |
| | | @Autowired |
| | | private ApplyLogJoinMapper applyLogJoinMapper; |
| | | |
| | | @Autowired |
| | | private SolutionsMapper solutionsMapper; |
| | | |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | |
| | | private DuWorkTypeJoinMapper duWorkTypeJoinMapper; |
| | | @Autowired |
| | | private SolutionWorktypeJoinMapper solutionWorktypeJoinMapper; |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | @Autowired |
| | |
| | | private SystemUserMapper systemUserMapper; |
| | | @Autowired |
| | | private CompanyDepartmentMapper companyDepartmentMapper; |
| | | |
| | | @Autowired |
| | | private InsuranceMapper insuranceMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | |
| | | } |
| | | update.setStatus(Constants.InsuranceApplyStatus.WTB_RETURN.getKey()); |
| | | } |
| | | |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(user.getId()); |
| | | update.setCheckDate(update.getEditDate()); |
| | |
| | | update.setCheckUserId(user.getId()); |
| | | update.setId(model.getId()); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | //存储待办信息 |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //删除其他待办 |
| | |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,insuranceApply.getId(),solutions.getName(), |
| | | model.getCompanyId(), Constants.NoticeType.FOUR); |
| | | noticesMapper.insert(notices); |
| | | |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.PLATFORM_RETURN; |
| | | String info =applyLogType.getInfo(); |
| | | info = info.replace("${param}", update.getCheckInfo()); |
| | |
| | | ||StringUtils.isBlank( insuranceApply.getBaoxiandanFile() .getName())){ |
| | | 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(CollectionUtils.isNotEmpty(applyDetailList)){ |
| | | List<MemberInsurance> memberInsuranceList = new ArrayList<>(); |
| | | List<String> idCodeList = new ArrayList<>(); |
| | | for (ApplyDetail applyDetail:applyDetailList) { |
| | | idCodeList.add(applyDetail.getIdcardNo()); |
| | | } |
| | | List<ApplyDetail> allDetailList = this.getMemberSolutionList(solutions.getParentId(),idCodeList, update.getStartTime() |
| | | ,update.getEndTime(),insuranceApply.getId()); |
| | | |
| | | for (ApplyDetail applyDetail:applyDetailList) { |
| | | //查询人员信息是否存在相同的方案下是否存在 冲突数据 |
| | | this.checkMemberSolution(solutions.getParentId(),applyDetail.getIdcardNo(),applyDetail.getMemberName(),update.getStartTime() |
| | | ,update.getEndTime(),insuranceApply.getId()); |
| | | |
| | | this.checkMemberSolution( applyDetail.getIdcardNo(),allDetailList,applyDetail.getMemberName()); |
| | | MemberInsurance memberInsurance = new MemberInsurance(applyDetail,user.getId()); |
| | | memberInsurance.setRelationType(Constants.ZERO); |
| | | memberInsuranceList.add(memberInsurance); |
| | | |
| | | memberMapper.update(null,new UpdateWrapper<Member>() |
| | | .lambda() |
| | | .set(Member::getStartTime,memberInsurance.getStartTime()) |
| | |
| | | ); |
| | | |
| | | } |
| | | memberInsuranceJoinMapper.insertBatchSomeColumn(memberInsuranceList); |
| | | memberInsuranceJoinMapper.insert(memberInsuranceList); |
| | | } |
| | | |
| | | this.updateApplyCurrentFee(insuranceApply.getId(),null); |
| | |
| | | if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | Company company = user.getCompany(); |
| | | Company company = user.getShowCompany(); |
| | | if(debugModel){ |
| | | company = companyMapper.selectById(model.getCompanyId()); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | |
| | | private void startSendEmail(Multifile f, String companyName, String solutionsName, String solutionEmail) { |
| | | if(StringUtils.isBlank(solutionEmail) || f==null|| StringUtils.isBlank(f.getFileurl())){ |
| | | return; |
| | |
| | | if(file!=null && file.isFile()){ |
| | | Map<String,Object> files = new HashMap<>(); |
| | | files.put("name",f.getName()); |
| | | files.put("file",file); |
| | | email.setFileList(new ArrayList<>()); |
| | | email.getFileList().add(files); |
| | | smsEmailService.sendEmail(email); |
| | | file.delete();//发送后删除临时文件 |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void testSendEmail(){ |
| | | SmsEmail email = new SmsEmail(); |
| | | email.setTitle("测试邮件"); |
| | | email.setEmail("94314517@qq.com"); |
| | | email.setContent("来自企业【测试企业】关于保险方案【测试方案】的测试邮件"); |
| | | File file = Constants.getFileByNetFile("https://yybred.oss-cn-hangzhou.aliyuncs.com/apply/20250116/600faf2f-5ba2-44e2-9a96-c99052dc013d.pdf","1111.pdf"); |
| | | if(file!=null && file.isFile()){ |
| | | Map<String,Object> files = new HashMap<>(); |
| | | files.put("name","测试文件"); |
| | | files.put("file",file); |
| | | email.setFileList(new ArrayList<>()); |
| | | email.getFileList().add(files); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer updateData(InsuranceApply insuranceApply) { |
| | |
| | | |
| | | |
| | | |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(InsuranceApplyServiceImpl.class); |
| | | |
| | | public void dealApplyDetailData(InsuranceApply insuranceApply,Solutions solutions,List<ApplyDetail> applyDetailList, |
| | | LoginUserInfo loginUserInfo,CountCyclePriceVO countCyclePriceVO,Boolean checkNewData){ |
| | | Long start = System.currentTimeMillis(); |
| | | logger.error("处理保单数据开始时间:=========================>"+start); |
| | | //2024年11月6日15:01:34 加入 方案配置了有派遣单位 才会去验证派遣单位数据 |
| | | List<DuSolution> duSolutionList = new ArrayList<>(); |
| | | List<DuWorktype> duWorktypeList = new ArrayList<>(); |
| | |
| | | List<Member> memberList = memberMapper.selectList(new QueryWrapper<Member>().lambda() |
| | | .eq(Member::getCompanyId,insuranceApply.getCompanyId()) |
| | | .eq(Member::getIsdeleted,Constants.ZERO)); |
| | | |
| | | List<String> idCodeList = new ArrayList<>(); |
| | | for (ApplyDetail applyDetail:applyDetailList) { |
| | | idCodeList.add(applyDetail.getIdcardNo()); |
| | | } |
| | | List<ApplyDetail> allDetailList = this.getMemberSolutionList(solutions.getParentId(),idCodeList, insuranceApply.getStartTime() |
| | | ,insuranceApply.getEndTime(),insuranceApply.getId()); |
| | | List<Member> addMemberList = new ArrayList<>(); |
| | | for (int i = 0; i < applyDetailList.size(); i++) { |
| | | ApplyDetail applyDetail = applyDetailList.get(i); |
| | |
| | | addMemberList.add(member); |
| | | } |
| | | //查询人员信息是否存在相同的方案下是否存在 冲突数据 |
| | | this.checkMemberSolution(solutions.getParentId(),member.getIdcardNo(),member.getName(),insuranceApply.getStartTime(),insuranceApply.getEndTime(),insuranceApply.getId()); |
| | | this.checkMemberSolution( applyDetail.getIdcardNo(),allDetailList,applyDetail.getMemberName()); |
| | | // this.checkMemberSolutionOld(solutions.getParentId(),member.getIdcardNo(),member.getName(),insuranceApply.getStartTime(),insuranceApply.getEndTime(),insuranceApply.getId()); |
| | | } |
| | | if(CollectionUtils.isNotEmpty(addMemberList)){ |
| | | memberJoinMapper.insertBatchSomeColumn(addMemberList); |
| | | memberJoinMapper.insert(addMemberList); |
| | | } |
| | | memberList.addAll(addMemberList); |
| | | for (int i = 0; i < applyDetailList.size(); i++) { |
| | | Long singlStart = System.currentTimeMillis(); |
| | | logger.error("处理保单单条数据开始时间:=========================>"+singlStart); |
| | | ApplyDetail applyDetail = applyDetailList.get(i); |
| | | if(Objects.isNull(applyDetail) |
| | | ||StringUtils.isBlank(applyDetail.getIdcardNo()) |
| | |
| | | member.setDuId(applyDetail.getDuId()); |
| | | member.setWorktypeId(applyDetail.getWorktypeId()); |
| | | memberMapper.updateById(member); |
| | | applyDetail.setMemberName(member.getName()); |
| | | } |
| | | }else{ |
| | | member = memberMapper.selectById(applyDetail.getMemberId()); |
| | |
| | | member.setDuId(applyDetail.getDuId()); |
| | | member.setWorktypeId(applyDetail.getWorktypeId()); |
| | | memberMapper.updateById(member); |
| | | applyDetail.setMemberName(member.getName()); |
| | | } |
| | | applyDetail.setMemberId(member.getId()); |
| | | applyDetail.setIdcardNo(member.getIdcardNo()); |
| | |
| | | .collect(Collectors.toList()).size()<=Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"【"+applyDetail.getMemberName()+applyDetail.getIdcardNo()+"】员工工种信息未查询到!"); |
| | | } |
| | | // if(duWorktypeList.stream().filter(d->d.getWorkTypeId().equals(applyDetail.getWorktypeId())) |
| | | // .collect(Collectors.toList()).size()<=Constants.ZERO){ |
| | | // throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"【"+applyDetail.getMemberName()+applyDetail.getIdcardNo()+"】员工工种信息未查询到!"); |
| | | // } |
| | | Long singlEnd = System.currentTimeMillis(); |
| | | logger.error("处理保单单条数据结束时间:=========================>"+singlEnd+";耗时:====》"+(singlStart-singlEnd)); |
| | | } |
| | | applyDetailJoinMapper.insertBatchSomeColumn(applyDetailList); |
| | | Long end = System.currentTimeMillis(); |
| | | logger.error("处理单数据结束时间:=========================>"+end +";耗时:====》"+(end-start)); |
| | | applyDetailJoinMapper.insert(applyDetailList); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询 会员信息在方案下是否存在冲突数据 |
| | | * @param startTime |
| | | * @param endTime |
| | | */ |
| | | public void checkMemberSolution(String idCode,List<ApplyDetail> allDetailList,String memberName){ |
| | | List<ApplyDetail> applyDetailList = getMemberSolutionListByIdcode(idCode,allDetailList); |
| | | if(applyDetailList.size() >Constants.ZERO){ |
| | | String companyName = applyDetailList.get(Constants.ZERO).getCompanyName(); |
| | | if(StringUtils.isNotBlank(companyName)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"该员工【"+memberName+" "+idCode+"】已在【"+companyName+"】存在保险,请联系客服确认"); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"该员工【"+memberName+" "+idCode+"】在该保险方案下已存在投保记录,无法进行该操作"); |
| | | } |
| | | |
| | | }; |
| | | } |
| | | @Override |
| | | public void checkMemberSolution(Integer solutionParentId,String idCode,String memberName,Date startTime,Date endTime,Integer applyId){ |
| | | List<ApplyDetail> applyDetailList = new ArrayList<ApplyDetail>(); |
| | | public void checkMemberSolutionOld(Integer solutionParentId,String idCode, String memberName, Date startTime,Date endTime,Integer applyId){ |
| | | List<ApplyDetail> applyDetailList = new ArrayList<>(); |
| | | try { |
| | | applyDetailList = applyDetailJoinMapper.selectJoinList(ApplyDetail.class, |
| | | new MPJLambdaWrapper<ApplyDetail>() |
| | |
| | | |
| | | }; |
| | | } |
| | | private List<ApplyDetail> getMemberSolutionListByIdcode(String idCode, List<ApplyDetail> allDetailList) { |
| | | if(allDetailList == null || allDetailList.size()==0){ |
| | | return new ArrayList<>(); |
| | | } |
| | | List<ApplyDetail> list = new ArrayList<>(); |
| | | for(ApplyDetail d : allDetailList){ |
| | | if(StringUtils.equals(d.getIdcardNo(),idCode)){ |
| | | list.add(d); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | public static void checkStaticMemberSolution(Integer solutionId,String idCode,String memberName,Date startTime, |
| | | public List<ApplyDetail> getMemberSolutionList(Integer solutionParentId,List<String> idCodeList, Date startTime,Date endTime,Integer applyId){ |
| | | List<ApplyDetail> applyDetailList = new ArrayList<ApplyDetail>(); |
| | | try { |
| | | applyDetailList = applyDetailJoinMapper.selectJoinList(ApplyDetail.class, |
| | | new MPJLambdaWrapper<ApplyDetail>() |
| | | .selectAll(ApplyDetail.class) |
| | | .selectAs(InsuranceApply::getCode,ApplyDetail::getApplyCode) |
| | | .selectAs(Company::getName,ApplyDetail::getCompanyName) |
| | | .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId) |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) |
| | | .in(ApplyDetail::getIdcardNo,idCodeList) |
| | | .eq(ApplyDetail::getIsdeleted,Constants.ZERO) |
| | | .eq(Solutions::getParentId,solutionParentId) |
| | | .ne(Objects.nonNull(applyId),InsuranceApply::getId,applyId) |
| | | .notIn(InsuranceApply::getStatus |
| | | ,Constants.InsuranceApplyStatus.FAIL_RETURN.getKey() |
| | | ,Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey() |
| | | ,Constants.InsuranceApplyStatus.CLOSE.getKey() |
| | | ,Constants.InsuranceApplyStatus.WTB_RETURN.getKey() |
| | | ,Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() ) |
| | | .apply(" ( " + |
| | | " '"+DateUtil.getPlusTime(startTime)+"' <= t.start_time AND t.start_time < '"+DateUtil.getPlusTime(endTime)+"' " + |
| | | " or " + |
| | | " ( '"+DateUtil.getPlusTime(startTime)+"' < t.end_time AND t.end_time < '"+DateUtil.getPlusTime(endTime)+"' ) " + |
| | | " or " + |
| | | " ( '"+DateUtil.getPlusTime(startTime)+"' > t.start_time AND '"+DateUtil.getPlusTime(endTime)+"' < t.end_time )" + |
| | | " ) " )); |
| | | }catch (Exception e){ |
| | | } |
| | | return applyDetailList; |
| | | } |
| | | |
| | | public static void checkStaticMemberSolution(Integer solutionId,Integer memberId,String memberIdCard,String memberName,Date startTime, |
| | | Date endTime,ApplyDetailJoinMapper applyDetailJoinMapper){ |
| | | List<ApplyDetail> applyDetailList = new ArrayList<ApplyDetail>(); |
| | | try { |
| | |
| | | .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId) |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) |
| | | .eq(ApplyDetail::getIdcardNo,idCode) |
| | | .eq(ApplyDetail::getIdcardNo,memberIdCard) |
| | | .eq(Solutions::getBaseId,solutionId) |
| | | .eq(ApplyDetail::getIsdeleted,Constants.ZERO) |
| | | .notIn(InsuranceApply::getStatus |
| | |
| | | } |
| | | if(applyDetailList.size() >Constants.ZERO){ |
| | | String companyName = applyDetailList.get(Constants.ZERO).getCompanyName(); |
| | | String idCode = applyDetailList.get(Constants.ZERO).getIdcardNo(); |
| | | if(StringUtils.isNotBlank(companyName)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"该员工【"+memberName+" "+idCode+"】已在【"+companyName+"】存在保险,请联系客服确认"); |
| | | }else{ |
| | |
| | | .selectAs(Solutions::getType,InsuranceApply::getSolutionType) |
| | | .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) |
| | | .selectAs(Solutions::getHasDispatchUnit,InsuranceApply::getHasDispatchUnit) |
| | | .selectAs(Solutions::getSignType,InsuranceApply::getSignType) |
| | | .selectAs(Company::getName,InsuranceApply::getCompanyName) |
| | | .selectAs(Solutions::getCorrectWarnTime,InsuranceApply::getCorrectWarnTime) |
| | | .select("( select ifnull(sum(ad.FEE),0) from apply_chagne_detail ad left join apply_change a on a.id = ad.APPLY_CHANGE_ID where t.id = a.APPLY_ID and a.status = 2 )",InsuranceApply::getChangeMoney) |
| | | .select(" ( select max(ac.APPLY_START_TIME) from apply_change ac where ac.apply_id = t.id and ac.status = 2 ) as lastChangeDate") |
| | | .select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad where ad.apply_id = t.id ) as insureNum") |
| | |
| | | .leftJoin(Company.class,Company::getId,Solutions::getShopId) |
| | | .eq(InsuranceApply::getId,id) |
| | | .last("limit 1"); |
| | | |
| | | InsuranceApply insuranceApply = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class,wrapper); |
| | | if(Objects.isNull(insuranceApply)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | this.dealDataDetail(insuranceApply); |
| | | return insuranceApply; |
| | | } |
| | | |
| | | public void dealDataDetail(InsuranceApply insuranceApply){ |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未查询到方案信息"); |
| | | } |
| | | insuranceApply.setCorrectWarnTime(solutions.getCorrectWarnTime()); |
| | | if(solutions.getDataType().equals(Constants.ONE)){ |
| | | Solutions newVersionSolution = solutionsMapper.selectOne(new QueryWrapper<Solutions>().lambda().eq(Solutions::getBaseId,solutions.getBaseId()).eq(Solutions::getDataType,Constants.TWO).last("limit 1")); |
| | | if(Objects.isNull(newVersionSolution)){ |
| | |
| | | initApplyStatus(insuranceApply); |
| | | //查询附件数据 |
| | | initImgData(insuranceApply); |
| | | |
| | | insuranceApply.setChangeMoney(Constants.getTwoPoint(insuranceApply.getChangeMoney())); |
| | | insuranceApply.setFee(Constants.getTwoPoint(insuranceApply.getFee())); |
| | | |
| | | //查询操作记录 |
| | | List<ApplyLog> applyLogList = applyLogJoinMapper.selectJoinList(ApplyLog.class, |
| | | new MPJLambdaWrapper<ApplyLog>() |
| | |
| | | .orderByAsc(ApplyLog::getCreateDate) |
| | | ); |
| | | insuranceApply.setApplyLogList(applyLogList); |
| | | return insuranceApply; |
| | | } |
| | | |
| | | private void setServiceDays(InsuranceApply insuranceApply) { |
| | |
| | | if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_UPLOAD.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | Company company = user.getCompany(); |
| | | Company company = user.getShowCompany(); |
| | | if(debugModel){ |
| | | company = companyMapper.selectById(model.getCompanyId()); |
| | | } |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,该申请状态已流转,当前不支持签章操作!"); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | Company company = user.getCompany(); |
| | | Company company = user.getShowCompany(); |
| | | if(debugModel){ |
| | | company = companyMapper.selectById(model.getCompanyId()); |
| | | } |
| | |
| | | if(solutions.getType().equals(Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,非委托保方案保单,无法进行该操作!"); |
| | | } |
| | | String fileUrl = "https://yybred.oss-cn-hangzhou.aliyuncs.com/apply/20241230/a0d128f2-ba6c-4ad4-b86b-b2610a513d41.pdf";//ExcelExporter.build(InsuranceApply.class).exportApplyExcelToPdf(model,"人员名单"); |
| | | String fileUrl = ExcelExporter.build(InsuranceApply.class).exportApplyExcelToPdf(model,"人员名单"); |
| | | String notifyUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SIGN_DONE_NOTIFY_URL).getCode(); |
| | | notifyUrl = notifyUrl.replace("${type}","0").replace("${id}",model.getId().toString()); |
| | | //String applyNo = signService.applySignLocalFile(company.getName(),company.getName(),fileUrl,company.getCode(),company.getEmail(),"投保名单签章",company.getSignId(),notifyUrl); |
| | | String applyNo = signService.applySign(company.getName(),fileUrl,company.getName(),company.getCode(),company.getEmail(),model.getSignKeyword(),company.getSignId(),notifyUrl); |
| | | String applyNo = signService.applySignLocalFileByParam(company.getName(),company.getName(),fileUrl,company.getCode(),company.getEmail(),"投保名单签章",company.getSignId(),notifyUrl,new Float(0.7)); |
| | | // String applyNo = signService.applySign(company.getName(),fileUrl,company.getName(),company.getCode(),company.getEmail(),model.getSignKeyword(),company.getSignId(),notifyUrl); |
| | | if(StringUtils.isBlank(applyNo) ){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,获取在线签章地址失败,请稍后重试!"); |
| | | } |
| | |
| | | if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_TOUBAOING.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~"); |
| | | } |
| | | Company company = user.getCompany(); |
| | | Company company = user.getShowCompany(); |
| | | if(debugModel){ |
| | | company = companyMapper.selectById(model.getCompanyId()); |
| | | } |
| | |
| | | return applyPowerVO; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |