PingAnOrderApiController.java 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. package com.ydtech.modules.order.controller;
  2. import com.ydtech.aop.request.RequestSingleParam;
  3. import com.ydtech.core.page.HttpResult;
  4. import com.ydtech.exception.SystemException;
  5. import com.ydtech.modules.ins.model.vo.QuoteRespVo;
  6. import com.ydtech.modules.order.aop.QuoteVerification;
  7. import com.ydtech.modules.order.components.InsOrdersComponents;
  8. import com.ydtech.modules.order.entity.api.pingan.request.*;
  9. import com.ydtech.modules.order.entity.api.pingan.response.UnAutoProductDetailResponse;
  10. import com.ydtech.modules.order.entity.api.zijin.request.SubmitVerifyRequest;
  11. import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
  12. import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
  13. import com.ydtech.modules.order.entity.vo.InsDrivingIntentionInsuranceVo;
  14. import com.ydtech.modules.order.entity.vo.SpecialAuditVo;
  15. import com.ydtech.modules.order.entity.vo.bohai.ProductDetailsQueryVo;
  16. import com.ydtech.modules.order.entity.vo.pingan.*;
  17. import com.ydtech.modules.order.service.PingAnOrderApiService;
  18. import io.swagger.annotations.Api;
  19. import io.swagger.annotations.ApiOperation;
  20. import lombok.RequiredArgsConstructor;
  21. import lombok.extern.slf4j.Slf4j;
  22. import org.apache.commons.lang3.StringUtils;
  23. import org.springframework.web.bind.annotation.*;
  24. import java.util.List;
  25. import java.util.Map;
  26. @Api(tags = "平安财险 API ")
  27. @Slf4j
  28. @RestController
  29. @RequestMapping("/order/pingAnApi")
  30. @RequiredArgsConstructor
  31. public class PingAnOrderApiController {
  32. private final PingAnOrderApiService pingAnOrderApiService;
  33. private final InsOrdersComponents insOrdersComponents;
  34. /**
  35. * @version
  36. * @author: hxl
  37. * @Date: 2024/7/23 18:46
  38. * @Description: 测试通过
  39. */
  40. @QuoteVerification("报价授权")
  41. @PostMapping("/quote")
  42. @ApiOperation("1报价-标的查询-车型查询-车辆确认-报价")
  43. public HttpResult<QuoteRespVo> quote(@RequestBody PingAnQuoteVo<Map<String,Object>> quoteVo) throws Exception {
  44. BaseQuoteInfoVo quoteInfo = this.insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo(), quoteVo.getAgreementId());
  45. return this.pingAnOrderApiService.quote(quoteInfo, quoteVo);
  46. }
  47. /**
  48. * @version
  49. * @author: hxl
  50. * @Date: 2024/7/23 18:46
  51. * @Description: 测试通过
  52. */
  53. @PostMapping("/productQuery")
  54. @ApiOperation("1报价-获取财意险险种套餐列表")
  55. public HttpResult<Map<String,Object>> productQuery(@RequestBody ProductDetailsRequest productDetailsRequest) throws Exception {
  56. return this.pingAnOrderApiService.productQuery(productDetailsRequest);
  57. }
  58. /**
  59. * @version
  60. * @author: hxl
  61. * @Date: 2024/7/23 18:46
  62. * @Description: 测试通过
  63. */
  64. @PostMapping("/productDetailsQuery")
  65. @ApiOperation("1报价-获取财意险险种套餐责任信息")
  66. public HttpResult<List<UnAutoProductDetailResponse.UnAutoProductDetailsDTO>> productDetailsQuery(@RequestBody ProductDetailsQueryVo productDetailsQueryVo) throws Exception {
  67. return this.pingAnOrderApiService.productDetailsQuery(productDetailsQueryVo);
  68. }
  69. /**
  70. * @version
  71. * @author: hxl
  72. * @Date: 2024/7/23 18:46
  73. * @Description: 可以上传文件
  74. */
  75. @PostMapping(value = "/submitImage")
  76. @ApiOperation(value = "2核保-提交影像信息")
  77. public HttpResult<Object> submitImage(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
  78. return this.pingAnOrderApiService.submitImage(companyId);
  79. }
  80. /**
  81. * @version
  82. * @author: hxl
  83. * @Date: 2024/7/23 18:46
  84. * @Description: 测试通过
  85. */
  86. //@AuditVerification("核保")
  87. @PostMapping(value = "/audit")
  88. @ApiOperation(value = "2核保-提交核保")
  89. public HttpResult<Object> audit(@RequestBody SpecialAuditVo<SubmitVerifyRequest.EngageListDTO> specialAudit) throws Exception {
  90. return this.pingAnOrderApiService.audit(specialAudit);
  91. }
  92. /**
  93. * @version
  94. * @author: hxl
  95. * @Date: 2024/7/23 18:46
  96. * @Description: 2核保-核保状态查询
  97. */
  98. @PostMapping("/auditStatusQuery")
  99. @ApiOperation(value = "2核保-核保状态查询")
  100. public HttpResult<Object> auditStatusQuery(String companyId) throws Exception {
  101. return this.pingAnOrderApiService.auditStatusQuery(companyId);
  102. }
  103. /**
  104. * @version
  105. * @author: hxl
  106. * @Date: 2024/7/23 18:46
  107. * @Description: 事后资料补传
  108. */
  109. //@AuditVerification("核保")
  110. @PostMapping(value = "/additionalInformation")
  111. @ApiOperation(value = "事后资料补传")
  112. public HttpResult<Object> additionalInformation(@RequestBody AdditionalInformation additionalInformation) throws Exception {
  113. return this.pingAnOrderApiService.additionalInformation(additionalInformation);
  114. }
  115. @GetMapping(value = "/checkAdditional")
  116. @ApiOperation(value = "事后资料补传")
  117. public HttpResult<Object> checkAdditional(String companyId) throws Exception {
  118. if(StringUtils.isBlank(companyId)){
  119. throw new SystemException("子订单id不能为空!!");
  120. }
  121. return this.pingAnOrderApiService.checkAdditional(companyId);
  122. }
  123. /**
  124. * @version
  125. * @author: hxl
  126. * @Date: 2024/7/23 18:46
  127. * @Description: 测试通过
  128. */
  129. @GetMapping("/signEleApply")
  130. @ApiOperation(value = "3投保单签署署(缴费前必须调用移动端电子投保单签署)")
  131. public HttpResult<Object> signEleApply(String companyId) throws Exception {
  132. return this.pingAnOrderApiService.signEleApply(companyId);
  133. }
  134. /**
  135. * @version
  136. * @author: hxl
  137. * @Date: 2024/7/23 18:46
  138. * @Description: 测试通过
  139. */
  140. @GetMapping("/getApplyVerifyCodeAndRecoverApplyVerifyCode")
  141. @ApiOperation(value = "4短信发送")
  142. public HttpResult<Object> getApplyVerifyCodeAnd(String companyId) throws Exception {
  143. return this.pingAnOrderApiService.getApplyVerifyCode(companyId);
  144. }
  145. /**
  146. * @version
  147. * @author: hxl
  148. * @Date: 2024/7/23 18:46
  149. * @Description: 测试通过
  150. */
  151. @PostMapping("/recoverApplyVerifyCode")
  152. @ApiOperation(value = "5短信回收阅读状态")
  153. public HttpResult<Object> recoverApplyVerifyCode(@RequestBody RecoverApplyVerifyCodeVo recoverApplyVerifyCodeVo) throws Exception {
  154. String companyId = recoverApplyVerifyCodeVo.getCompanyId();
  155. String msgCode = recoverApplyVerifyCodeVo.getMsgCode();
  156. if(StringUtils.isBlank(companyId)){
  157. throw new SystemException("子订单id不能为空!!");
  158. }
  159. if(StringUtils.isBlank(msgCode)){
  160. throw new SystemException("短信验证码不能为空!!");
  161. }
  162. return this.pingAnOrderApiService.recoverApplyVerifyCode(companyId,msgCode);
  163. }
  164. /**
  165. * @version
  166. * @author: hxl
  167. * @Date: 2024/7/23 18:46
  168. * @Description: 测试通过
  169. */
  170. @PostMapping("/createNotice")
  171. @ApiOperation(value = "6获取支付通知单号-生成支付链接")
  172. public HttpResult<Object> createNotice(String companyId) throws Exception {
  173. return this.pingAnOrderApiService.createNotice(companyId);
  174. }
  175. /**
  176. * @version
  177. * @author: hxl
  178. * @Date: 2024/7/23 18:46
  179. * @Description: 无法测试
  180. */
  181. @PostMapping("/payReturn")
  182. @ApiOperation(value = "7支付回调-更新承保状态")
  183. public HttpResult<Object> payReturn(@RequestBody PayReturnRequest payReturnRequest) throws Exception {
  184. return this.pingAnOrderApiService.payReturn(payReturnRequest);
  185. }
  186. /**
  187. * @version
  188. * @author: hxl
  189. * @Date: 2024/7/23 18:46
  190. * @Description: 查看电子保单
  191. */
  192. @PostMapping("/getPolicyPrint")
  193. @ApiOperation(value = "8电子保单查看")
  194. public HttpResult<CrawlerPolicyPrintVo> getPolicyPrint(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
  195. return this.pingAnOrderApiService.getPolicyPrint(companyId);
  196. }
  197. @PostMapping("/getDocumentStatusList")
  198. @ApiOperation(value = "9订单状态查询")
  199. public HttpResult<Object> getOrderDetail(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
  200. return this.pingAnOrderApiService.getDocumentStatusList(companyId);
  201. }
  202. /**
  203. * @version
  204. * @author: hxl
  205. * @Date: 2024/7/23 18:46
  206. * @Description: 未跑通
  207. * @ todo
  208. */
  209. @PostMapping("/renewalConfirm")
  210. @ApiOperation("10续保")
  211. public HttpResult<Object> renewalConfirm(@RequestBody RenewalConfirmVo renewalConfirmVo) throws Exception {
  212. return this.pingAnOrderApiService.renewalConfirm(renewalConfirmVo);
  213. }
  214. /**
  215. * @version
  216. * @author: hxl
  217. * @Date: 2024/7/23 18:46
  218. * @Description: 测试通过
  219. */
  220. @PostMapping("/repealDocument")
  221. @ApiOperation("11撤销单证")
  222. public HttpResult<Object> repealDocument(String companyId,String documentType,String applyNO) throws Exception {
  223. return this.pingAnOrderApiService.repealDocument(companyId,documentType,applyNO);
  224. }
  225. //========================================以下接口暂未使用后期可能使用=======================================
  226. /**
  227. /**
  228. * @version
  229. * @author: hxl
  230. * @Date: 2024/7/23 9:33
  231. * @Description: 查询事后未上传资料清单
  232. * todo
  233. */
  234. @PostMapping("/querySupplementMaterial")
  235. @ApiOperation(value = "查询事后未上传资料清单")
  236. public HttpResult<Object> querySupplementMaterial(String companyId) throws Exception {
  237. return this.pingAnOrderApiService.querySupplementMaterial(companyId);
  238. }
  239. /**
  240. * @version
  241. * @author: hxl
  242. * @Date: 2024/7/23 9:33
  243. * @Description: 获取核保时门店自取信息 未测试
  244. * @ todo
  245. */
  246. @PostMapping("/getStorefrontList")
  247. @ApiOperation(value = "获取核保时门店自取信息 2 ")
  248. public HttpResult<Object> getStorefrontList(StorefrontQueryVo storefrontQueryVo) throws Exception {
  249. return this.pingAnOrderApiService.getStorefrontList(storefrontQueryVo);
  250. }
  251. /**
  252. * @version
  253. * @author: hxl
  254. * @Date: 2024/7/23 18:46
  255. * @Description: 测试通过
  256. */
  257. @PostMapping("/queryServiceContract")
  258. @ApiOperation("服务类特约检索")
  259. public HttpResult<Object> queryServiceContract(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
  260. return this.pingAnOrderApiService.queryServiceContract(companyId);
  261. }
  262. /**
  263. * @version
  264. * @author: hxl
  265. * @Date: 2024/7/22 18:51
  266. * @Description: 好车主支付 和二微码支付一样 暂不使用
  267. */
  268. @PostMapping("/viewToPay")
  269. @ApiOperation(value = "获取支付通知单号")
  270. public HttpResult<Object> viewToPay(String companyId) throws Exception {
  271. return this.pingAnOrderApiService.viewToPay(companyId);
  272. }
  273. /**
  274. * @version
  275. * @author: hxl
  276. * @Date: 2024/7/23 9:33
  277. * @Description: 全国短信验证 暂时没用
  278. */
  279. @PostMapping("/sendApplyPolicy")
  280. @ApiOperation(value = "全国短信验证")
  281. public HttpResult<Object> sendApplyPolicy(String companyId,String moblePhone) throws Exception {
  282. return this.pingAnOrderApiService.sendApplyPolicy(companyId,moblePhone);
  283. }
  284. /**
  285. * @version
  286. * @author: hxl
  287. * @Date: 2024/7/23 14:03
  288. * @Description: 平安新CPC收银台 7.10 暂时没用
  289. */
  290. @PostMapping("/chexianStandardPrePayment")
  291. @ApiOperation(value = "平安新CPC收银台 7.10")
  292. public HttpResult<Object> chexianStandardPrePayment(ChexianStandardPrePaymentRequest chexianStandardPrePaymentRequest) throws Exception {
  293. return this.pingAnOrderApiService.chexianStandardPrePayment(chexianStandardPrePaymentRequest);
  294. }
  295. /**
  296. * @version
  297. * @author: hxl
  298. * @Date: 2024/7/23 14:03
  299. * @Description: 身份验证 暂时没用
  300. */
  301. @PostMapping("/beiJingIdAcquisition")
  302. @ApiOperation(value = "身份验证")
  303. public HttpResult<Object> beiJingIdAcquisition(String companyId) throws Exception {
  304. return this.pingAnOrderApiService.beiJingIdAcquisition(companyId);
  305. }
  306. /**
  307. * @version
  308. * @author: hxl
  309. * @Date: 2024/7/23 14:03
  310. * @Description: 支付实名认证建议在noticeDo接口进行 暂时没用
  311. */
  312. @PostMapping("/noticeAuth")
  313. @ApiOperation(value = "支付实名认证建议在noticeDo接口进行 73")
  314. public HttpResult<Object> noticeAuth(NoticeAuthRequest noticeAuthRequest) throws Exception {
  315. return this.pingAnOrderApiService.noticeAuth(noticeAuthRequest);
  316. }
  317. /**
  318. * @version
  319. * @author: hxl
  320. * @Date: 2024/7/23 14:03
  321. * @Description: 支付之前查询通知单内容 74 暂时没用
  322. */
  323. @PostMapping("/getNoticeInfo")
  324. @ApiOperation(value = "支付之前查询通知单内容 74")
  325. public HttpResult<Object> getNoticeInfo(GetNoticeInfoRequest getNoticeInfoRequest) throws Exception {
  326. return this.pingAnOrderApiService.getNoticeInfo(getNoticeInfoRequest);
  327. }
  328. /**
  329. * @version
  330. * @author: hxl
  331. * @Date: 2024/7/23 14:03
  332. * @Description: 支付到账通知平安 75 暂时没用
  333. */
  334. @PostMapping("/noticeDone")
  335. @ApiOperation(value = "支付到账通知平安 75")
  336. public HttpResult<Object> noticeDone(NoticeDoneRequest noticeDoneRequest) throws Exception {
  337. return this.pingAnOrderApiService.noticeDone(noticeDoneRequest);
  338. }
  339. /**
  340. * @version
  341. * @author: hxl
  342. * @Date: 2024/7/23 14:03
  343. * @Description: 身份验证 暂时没用
  344. */
  345. @PostMapping("/getWechatAuthInfo")
  346. @ApiOperation(value = "获取微信缴费实名认证结果 79")
  347. public HttpResult<Object> getWechatAuthInfo(GetWechatAuthInfoRequest getWechatAuthInfoRequest) throws Exception {
  348. return this.pingAnOrderApiService.getWechatAuthInfo(getWechatAuthInfoRequest);
  349. }
  350. /**
  351. * @version
  352. * @author: hxl
  353. * @Date: 2024/7/23 18:46
  354. * @Description: 上海车辆使用
  355. */
  356. @PostMapping("/getDmvehicleInfo")
  357. @ApiOperation("获取交管车辆验证码")
  358. public HttpResult<Object> getDmvehicleInfo(@RequestBody PingAnQuoteVo<List<InsDrivingIntentionInsuranceVo>> quoteVo, BaseQuoteInfoVo quoteInfo) throws Exception {
  359. return this.pingAnOrderApiService.getDmvehicleInfo(quoteVo,quoteInfo);
  360. }
  361. }