| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- package com.ydtech.modules.ins.controller;
- import com.fasterxml.jackson.core.JsonProcessingException;
- import com.ydtech.aop.request.MethodLogAnnotation;
- import com.ydtech.aop.request.RequestSingleParam;
- import com.ydtech.components.ZhongmeiRequestComponents;
- import com.ydtech.core.page.HttpResult;
- import com.ydtech.exception.SystemException;
- import com.ydtech.modules.admin.dao.SysMethodLogDao;
- import com.ydtech.modules.esm.model.InsTaskImage;
- import com.ydtech.modules.ins.model.InsOrder;
- import com.ydtech.modules.ins.model.ya.CarModel_Req;
- import com.ydtech.modules.ins.model.ya.YaQuoteInfoVo;
- import com.ydtech.modules.ins.service.InsZhongmeiService;
- import com.ydtech.modules.ins.service.YongAnService;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.util.StringUtils;
- import org.springframework.web.bind.annotation.*;
- import org.springframework.web.client.RestClientException;
- import java.io.IOException;
- @Api(tags = "中煤财险")
- @RestController
- @RequestMapping("/insZhongmei")
- public class InsZhongmeiController {
- @Autowired
- private SysMethodLogDao sysMethodLogDao;
- @Autowired
- private ZhongmeiRequestComponents zhongmeiRequestComponents;
- private final InsZhongmeiService insZhongmeiService;
- @Autowired
- private YongAnService yongAnService;
-
- public InsZhongmeiController(InsZhongmeiService insZhongmeiService) {
- this.insZhongmeiService = insZhongmeiService;
- }
- @PostMapping("/modelQuery")
- @ApiOperation("车型查询")
- public HttpResult modelQuery(@RequestSingleParam(value = "modelName") String modelName) {
- if (StringUtils.isEmpty(modelName)) {
- throw new SystemException("车型不能为空");
- }
- CarModel_Req carModelReq = new CarModel_Req();
- carModelReq.setModelName(modelName);
- return yongAnService.modelsQuery(carModelReq);
- // return insZhongmeiService.modelQuery(modelName);
- }
- @GetMapping("/vinSearch")
- @ApiOperation("vin码查询")
- public HttpResult vinSearch(@RequestParam String frameNo) {
- return insZhongmeiService.vinSearch(frameNo);
- }
- // @GetMapping("/hi")
- // @ApiOperation("测试一下")
- // @MethodLogAnnotation(title = "中煤-报价")
- // public HttpResult test(String a,String b) {
- // try {
- // // 这个方法需要调用500毫秒
- // Thread.sleep(500);
- // } catch (InterruptedException e) {
- // e.printStackTrace();
- // }
- // return HttpResult.ok();
- // }
- // @PostMapping("/quote")
- // @ApiOperation(value = "报价")
- // @MethodLogAnnotation(title = "中煤-报价")
- // public HttpResult quote(@RequestBody YaQuoteInfoVo yaQuoteInfoVo) throws JsonProcessingException {
- // try {
- // return insZhongmeiService.quote(yaQuoteInfoVo);
- // } catch (RestClientException e) {
- // throw new SystemException("中煤接口调用失败");
- // }
- // }
- // @PostMapping("/audit")
- // @ApiOperation(value = "核保")
- // @MethodLogAnnotation(title = "中煤-核保")
- // public HttpResult audit(@RequestSingleParam(value = "orderno") String orderno) throws IOException {
- // try {
- // return insZhongmeiService.audit(orderno);
- // } catch (RestClientException e) {
- // throw new SystemException("中煤接口调用失败");
- // }
- // }
- //
- // @PostMapping(value = "/uploadImage")
- // @ApiOperation(value = "上传影像")
- // public HttpResult UploadImage(@RequestBody InsTaskImage record) {
- // return insZhongmeiService.UploadImage(record);
- // }
- //
- // @PostMapping(value = "/submitImage")
- // @ApiOperation(value = "提交影像信息")
- // public HttpResult submitImage(@RequestSingleParam(value = "orderno") String orderno) throws IOException {
- // try {
- // return insZhongmeiService.submitImage(orderno);
- // } catch (RestClientException e) {
- // e.printStackTrace();
- // throw new SystemException("提交影像失败");
- // }
- // }
- //
- // @PostMapping(value = "/verifyPayment")
- // @ApiOperation(value = "验证是否支付")
- // public HttpResult VerifyPayment(@RequestSingleParam(value = "orderno") String orderno) throws IOException {
- // return insZhongmeiService.VerifyPayment(orderno);
- // }
- //
- // @ApiOperation(value = "电子保单")
- // @PostMapping("/getPolicyPrint")
- // public HttpResult getPolicyPrint(@RequestSingleParam(value = "orderno") String orderno) throws IOException {
- // return insZhongmeiService.getPolicyPrint(orderno);
- // }
- //
- //// @PostMapping("/quoteMq")
- //// @ApiOperation(value = "消息队列报价")
- //// public HttpResult quoteMq(@RequestBody YaQuoteInfoVo yaQuoteInfoVo) {
- //// return insZhongmeiService.quoteMq(yaQuoteInfoVo);
- //// }
- //
- // @PostMapping("/getQuoteResult")
- // @ApiOperation(value = "获取报价结果")
- // public HttpResult getQuoteResult(@RequestSingleParam(value = "orderno") String orderNo) {
- // if(StringUtils.isEmpty(orderNo)){
- // throw new SystemException("订单号不能为空");
- // }
- // return insZhongmeiService.getQuoteResult(orderNo);
- // }
- }
|