package com.ydtech.modules.order.controller; import com.ydtech.aop.request.RequestSingleParam; import com.ydtech.core.page.HttpResult; import com.ydtech.exception.SystemException; import com.ydtech.modules.ins.model.vo.QuoteRespVo; import com.ydtech.modules.order.aop.QuoteVerification; import com.ydtech.modules.order.components.InsOrdersComponents; import com.ydtech.modules.order.entity.api.pingan.request.*; import com.ydtech.modules.order.entity.api.pingan.response.UnAutoProductDetailResponse; import com.ydtech.modules.order.entity.api.zijin.request.SubmitVerifyRequest; import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo; import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo; import com.ydtech.modules.order.entity.vo.InsDrivingIntentionInsuranceVo; import com.ydtech.modules.order.entity.vo.SpecialAuditVo; import com.ydtech.modules.order.entity.vo.bohai.ProductDetailsQueryVo; import com.ydtech.modules.order.entity.vo.pingan.*; import com.ydtech.modules.order.service.PingAnOrderApiService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; @Api(tags = "平安财险 API ") @Slf4j @RestController @RequestMapping("/order/pingAnApi") @RequiredArgsConstructor public class PingAnOrderApiController { private final PingAnOrderApiService pingAnOrderApiService; private final InsOrdersComponents insOrdersComponents; /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 测试通过 */ @QuoteVerification("报价授权") @PostMapping("/quote") @ApiOperation("1报价-标的查询-车型查询-车辆确认-报价") public HttpResult quote(@RequestBody PingAnQuoteVo quoteVo) throws Exception { BaseQuoteInfoVo quoteInfo = this.insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo(), quoteVo.getAgreementId()); return this.pingAnOrderApiService.quote(quoteInfo, quoteVo); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 测试通过 */ @PostMapping("/productQuery") @ApiOperation("1报价-获取财意险险种套餐列表") public HttpResult> productQuery(@RequestBody ProductDetailsRequest productDetailsRequest) throws Exception { return this.pingAnOrderApiService.productQuery(productDetailsRequest); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 测试通过 */ @PostMapping("/productDetailsQuery") @ApiOperation("1报价-获取财意险险种套餐责任信息") public HttpResult> productDetailsQuery(@RequestBody ProductDetailsQueryVo productDetailsQueryVo) throws Exception { return this.pingAnOrderApiService.productDetailsQuery(productDetailsQueryVo); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 可以上传文件 */ @PostMapping(value = "/submitImage") @ApiOperation(value = "2核保-提交影像信息") public HttpResult submitImage(@RequestSingleParam(value = "companyId") String companyId) throws Exception { return this.pingAnOrderApiService.submitImage(companyId); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 测试通过 */ //@AuditVerification("核保") @PostMapping(value = "/audit") @ApiOperation(value = "2核保-提交核保") public HttpResult audit(@RequestBody SpecialAuditVo specialAudit) throws Exception { return this.pingAnOrderApiService.audit(specialAudit); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 2核保-核保状态查询 */ @PostMapping("/auditStatusQuery") @ApiOperation(value = "2核保-核保状态查询") public HttpResult auditStatusQuery(String companyId) throws Exception { return this.pingAnOrderApiService.auditStatusQuery(companyId); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 测试通过 */ @GetMapping("/signEleApply") @ApiOperation(value = "3投保单签署署(缴费前必须调用移动端电子投保单签署)") public HttpResult signEleApply(String companyId) throws Exception { return this.pingAnOrderApiService.signEleApply(companyId); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 测试通过 */ @GetMapping("/getApplyVerifyCodeAndRecoverApplyVerifyCode") @ApiOperation(value = "4短信发送") public HttpResult getApplyVerifyCodeAnd(String companyId) throws Exception { return this.pingAnOrderApiService.getApplyVerifyCode(companyId); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 测试通过 */ @PostMapping("/recoverApplyVerifyCode") @ApiOperation(value = "5短信回收阅读状态") public HttpResult recoverApplyVerifyCode(@RequestBody RecoverApplyVerifyCodeVo recoverApplyVerifyCodeVo) throws Exception { String companyId = recoverApplyVerifyCodeVo.getCompanyId(); String msgCode = recoverApplyVerifyCodeVo.getMsgCode(); if(StringUtils.isBlank(companyId)){ throw new SystemException("子订单id不能为空!!"); } if(StringUtils.isBlank(msgCode)){ throw new SystemException("短信验证码不能为空!!"); } return this.pingAnOrderApiService.recoverApplyVerifyCode(companyId,msgCode); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 测试通过 */ @PostMapping("/createNotice") @ApiOperation(value = "6获取支付通知单号-生成支付链接") public HttpResult createNotice(String companyId) throws Exception { return this.pingAnOrderApiService.createNotice(companyId); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 无法测试 */ @PostMapping("/payReturn") @ApiOperation(value = "7支付回调-更新承保状态") public HttpResult payReturn(@RequestBody PayReturnRequest payReturnRequest) throws Exception { return this.pingAnOrderApiService.payReturn(payReturnRequest); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 查看电子保单 */ @PostMapping("/getPolicyPrint") @ApiOperation(value = "8电子保单查看") public HttpResult getPolicyPrint(String companyId) throws Exception { return this.pingAnOrderApiService.getPolicyPrint(companyId); } @PostMapping("/getOrderDetail") @ApiOperation(value = "9订单状态查询") public HttpResult getOrderDetail(String companyId) throws Exception { return this.pingAnOrderApiService.getDocumentStatusList(companyId); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 未跑通 * @ todo */ @PostMapping("/renewalConfirm") @ApiOperation("10续保") public HttpResult renewalConfirm(@RequestBody RenewalConfirmVo renewalConfirmVo) throws Exception { return this.pingAnOrderApiService.renewalConfirm(renewalConfirmVo); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 测试通过 */ @PostMapping("/repealDocument") @ApiOperation("11撤销单证") public HttpResult repealDocument(String companyId,String documentType) throws Exception { return this.pingAnOrderApiService.repealDocument(companyId,documentType); } //========================================以下接口暂未使用后期可能使用======================================= /** /** * @version * @author: hxl * @Date: 2024/7/23 9:33 * @Description: 查询事后未上传资料清单 * todo */ @PostMapping("/querySupplementMaterial") @ApiOperation(value = "查询事后未上传资料清单") public HttpResult querySupplementMaterial(String companyId) throws Exception { return this.pingAnOrderApiService.querySupplementMaterial(companyId); } /** * @version * @author: hxl * @Date: 2024/7/23 9:33 * @Description: 获取核保时门店自取信息 未测试 * @ todo */ @PostMapping("/getStorefrontList") @ApiOperation(value = "获取核保时门店自取信息 2 ") public HttpResult getStorefrontList(StorefrontQueryVo storefrontQueryVo) throws Exception { return this.pingAnOrderApiService.getStorefrontList(storefrontQueryVo); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 测试通过 */ @PostMapping("/queryServiceContract") @ApiOperation("服务类特约检索") public HttpResult queryServiceContract(@RequestSingleParam(value = "companyId") String companyId) throws Exception { return this.pingAnOrderApiService.queryServiceContract(companyId); } /** * @version * @author: hxl * @Date: 2024/7/22 18:51 * @Description: 好车主支付 和二微码支付一样 暂不使用 */ @PostMapping("/viewToPay") @ApiOperation(value = "获取支付通知单号") public HttpResult viewToPay(String companyId) throws Exception { return this.pingAnOrderApiService.viewToPay(companyId); } /** * @version * @author: hxl * @Date: 2024/7/23 9:33 * @Description: 全国短信验证 暂时没用 */ @PostMapping("/sendApplyPolicy") @ApiOperation(value = "全国短信验证") public HttpResult sendApplyPolicy(String companyId,String moblePhone) throws Exception { return this.pingAnOrderApiService.sendApplyPolicy(companyId,moblePhone); } /** * @version * @author: hxl * @Date: 2024/7/23 14:03 * @Description: 平安新CPC收银台 7.10 暂时没用 */ @PostMapping("/chexianStandardPrePayment") @ApiOperation(value = "平安新CPC收银台 7.10") public HttpResult chexianStandardPrePayment(ChexianStandardPrePaymentRequest chexianStandardPrePaymentRequest) throws Exception { return this.pingAnOrderApiService.chexianStandardPrePayment(chexianStandardPrePaymentRequest); } /** * @version * @author: hxl * @Date: 2024/7/23 14:03 * @Description: 身份验证 暂时没用 */ @PostMapping("/beiJingIdAcquisition") @ApiOperation(value = "身份验证") public HttpResult beiJingIdAcquisition(String companyId) throws Exception { return this.pingAnOrderApiService.beiJingIdAcquisition(companyId); } /** * @version * @author: hxl * @Date: 2024/7/23 14:03 * @Description: 支付实名认证建议在noticeDo接口进行 暂时没用 */ @PostMapping("/noticeAuth") @ApiOperation(value = "支付实名认证建议在noticeDo接口进行 73") public HttpResult noticeAuth(NoticeAuthRequest noticeAuthRequest) throws Exception { return this.pingAnOrderApiService.noticeAuth(noticeAuthRequest); } /** * @version * @author: hxl * @Date: 2024/7/23 14:03 * @Description: 支付之前查询通知单内容 74 暂时没用 */ @PostMapping("/getNoticeInfo") @ApiOperation(value = "支付之前查询通知单内容 74") public HttpResult getNoticeInfo(GetNoticeInfoRequest getNoticeInfoRequest) throws Exception { return this.pingAnOrderApiService.getNoticeInfo(getNoticeInfoRequest); } /** * @version * @author: hxl * @Date: 2024/7/23 14:03 * @Description: 支付到账通知平安 75 暂时没用 */ @PostMapping("/noticeDone") @ApiOperation(value = "支付到账通知平安 75") public HttpResult noticeDone(NoticeDoneRequest noticeDoneRequest) throws Exception { return this.pingAnOrderApiService.noticeDone(noticeDoneRequest); } /** * @version * @author: hxl * @Date: 2024/7/23 14:03 * @Description: 身份验证 暂时没用 */ @PostMapping("/getWechatAuthInfo") @ApiOperation(value = "获取微信缴费实名认证结果 79") public HttpResult getWechatAuthInfo(GetWechatAuthInfoRequest getWechatAuthInfoRequest) throws Exception { return this.pingAnOrderApiService.getWechatAuthInfo(getWechatAuthInfoRequest); } /** * @version * @author: hxl * @Date: 2024/7/23 18:46 * @Description: 上海车辆使用 */ @PostMapping("/getDmvehicleInfo") @ApiOperation("获取交管车辆验证码") public HttpResult getDmvehicleInfo(@RequestBody PingAnQuoteVo> quoteVo, BaseQuoteInfoVo quoteInfo) throws Exception { return this.pingAnOrderApiService.getDmvehicleInfo(quoteVo,quoteInfo); } }