| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- package com.ydtech.modules.order.controller;
- import com.ydtech.aop.request.RequestSingleParam;
- import com.ydtech.core.page.HttpResult;
- import com.ydtech.modules.base.controller.BaseController;
- import com.ydtech.modules.ins.model.vo.QuoteRespVo;
- import com.ydtech.modules.order.aop.AuditVerification;
- import com.ydtech.modules.order.aop.QuoteVerification;
- import com.ydtech.modules.order.components.InsOrdersComponents;
- import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
- import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
- import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
- import com.ydtech.modules.order.entity.vo.QuoteAccidentalDrivingVo;
- import com.ydtech.modules.order.service.InsCrawlerOrderService;
- import com.ydtech.modules.order.service.InsOrdersService;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import lombok.RequiredArgsConstructor;
- import org.apache.ibatis.annotations.Param;
- import org.springframework.web.bind.annotation.*;
- @Api(tags = "爬虫对接")
- @RequestMapping("/insurance/crawler")
- @RestController
- @RequiredArgsConstructor
- public class InsCrawlerOrderController extends BaseController {
- private final InsCrawlerOrderService insuranceCrawlerOrderService;
- private final InsOrdersComponents insOrdersComponents;
- private final InsOrdersService insOrdersService;
- @QuoteVerification("报价授权")
- @PostMapping("/quote")
- @ApiOperation("报价")
- public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<QuoteAccidentalDrivingVo> baseQuoteVo) {
- BaseQuoteVo baseQuoteVo1 = insOrdersService.convertDriving(baseQuoteVo);
- BaseQuoteInfoVo quoteInfo = this.insOrdersComponents.getQuoteInfo(baseQuoteVo.getOrderNo(), baseQuoteVo.getAgreementId(),baseQuoteVo.getKinds());
- return insuranceCrawlerOrderService.quote(quoteInfo, baseQuoteVo1);
- }
- @PostMapping(value = "/submitImage")
- @ApiOperation(value = "提交影像信息")
- public HttpResult<Object> submitImage(@RequestSingleParam(value = "subOrderNo") String subOrderNo) {
- return insuranceCrawlerOrderService.submitImage(subOrderNo);
- }
- @AuditVerification("核保")
- @PostMapping("/audit")
- @ApiOperation("核保")
- public HttpResult<Object> audit(@RequestSingleParam(value = "subOrderNo") String subOrderNo) {
- return insuranceCrawlerOrderService.audit(subOrderNo);
- }
- @PostMapping(value = "/verifyPayment")
- @ApiOperation(value = "缴费状态查询")
- public HttpResult<Object> verifyPayment(@RequestSingleParam(value = "subOrderNo") String subOrderNo) {
- return insuranceCrawlerOrderService.verifyPayment(subOrderNo);
- }
- @PostMapping("/getPolicyPrint")
- @ApiOperation(value = "电子保单")
- public HttpResult<CrawlerPolicyPrintVo> getPolicyPrint(@RequestSingleParam(value = "subOrderNo") String subOrderNo) {
- return insuranceCrawlerOrderService.getPolicyPrint(subOrderNo);
- }
- @PostMapping("/getDrivingInsurance")
- @ApiOperation(value = "驾意险")
- public HttpResult<Object> getDrivingInsurance(@RequestSingleParam(value = "agreementId") String agreementId) {
- return insuranceCrawlerOrderService.getDrivingInsurance(agreementId);
- }
- @PostMapping("/auditStatusQuery")
- @ApiOperation(value = "核保状态查询")
- public HttpResult<Object> auditStatusQuery(@RequestSingleParam(value = "companyId") String companyId) {
- return insuranceCrawlerOrderService.auditStatusQuery(companyId);
- }
- // 泰山获取验证码处理接口
- /**
- * 泰山发送验证码
- * @param agreementId
- * @return
- */
- @PostMapping(value = "/sendcode")
- @ApiOperation(value = "泰山发送验证码")
- public HttpResult sendcode(@RequestSingleParam(value = "agreementId") String agreementId) {
- insuranceCrawlerOrderService.sendcode(agreementId);
- return HttpResult.ok("发送成功!");
- }
- /**
- * 泰山登录
- * @param agreementId
- * @param smscode
- * @return
- */
- @PostMapping(value = "/login")
- @ApiOperation(value = "泰山登录")
- public HttpResult login(String agreementId, String smscode) {
- insuranceCrawlerOrderService.taishanLogin(agreementId,smscode);
- return HttpResult.ok("登录成功!");
- }
- }
|