PingAnOrderApiController.java 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  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<InsDrivingIntentionInsuranceSonVo> 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. @GetMapping("/signEleApply")
  110. @ApiOperation(value = "3投保单签署署(缴费前必须调用移动端电子投保单签署)")
  111. public HttpResult<Object> signEleApply(String companyId) throws Exception {
  112. return this.pingAnOrderApiService.signEleApply(companyId);
  113. }
  114. /**
  115. * @version
  116. * @author: hxl
  117. * @Date: 2024/7/23 18:46
  118. * @Description: 测试通过
  119. */
  120. @GetMapping("/getApplyVerifyCodeAndRecoverApplyVerifyCode")
  121. @ApiOperation(value = "4短信发送")
  122. public HttpResult<Object> getApplyVerifyCodeAnd(String companyId) throws Exception {
  123. return this.pingAnOrderApiService.getApplyVerifyCode(companyId);
  124. }
  125. /**
  126. * @version
  127. * @author: hxl
  128. * @Date: 2024/7/23 18:46
  129. * @Description: 测试通过
  130. */
  131. @PostMapping("/recoverApplyVerifyCode")
  132. @ApiOperation(value = "5短信回收阅读状态")
  133. public HttpResult<Object> recoverApplyVerifyCode(@RequestBody RecoverApplyVerifyCodeVo recoverApplyVerifyCodeVo) throws Exception {
  134. String companyId = recoverApplyVerifyCodeVo.getCompanyId();
  135. String msgCode = recoverApplyVerifyCodeVo.getMsgCode();
  136. if(StringUtils.isBlank(companyId)){
  137. throw new SystemException("子订单id不能为空!!");
  138. }
  139. if(StringUtils.isBlank(msgCode)){
  140. throw new SystemException("短信验证码不能为空!!");
  141. }
  142. return this.pingAnOrderApiService.recoverApplyVerifyCode(companyId,msgCode);
  143. }
  144. /**
  145. * @version
  146. * @author: hxl
  147. * @Date: 2024/7/23 18:46
  148. * @Description: 测试通过
  149. */
  150. @PostMapping("/createNotice")
  151. @ApiOperation(value = "6获取支付通知单号-生成支付链接")
  152. public HttpResult<Object> createNotice(String companyId) throws Exception {
  153. return this.pingAnOrderApiService.createNotice(companyId);
  154. }
  155. /**
  156. * @version
  157. * @author: hxl
  158. * @Date: 2024/7/23 18:46
  159. * @Description: 无法测试
  160. */
  161. @PostMapping("/payReturn")
  162. @ApiOperation(value = "7支付回调-更新承保状态")
  163. public HttpResult<Object> payReturn(@RequestBody PayReturnRequest payReturnRequest) throws Exception {
  164. return this.pingAnOrderApiService.payReturn(payReturnRequest);
  165. }
  166. /**
  167. * @version
  168. * @author: hxl
  169. * @Date: 2024/7/23 18:46
  170. * @Description: 查看电子保单
  171. */
  172. @PostMapping("/getPolicyPrint")
  173. @ApiOperation(value = "8电子保单查看")
  174. public HttpResult<CrawlerPolicyPrintVo> getPolicyPrint(String companyId) throws Exception {
  175. return this.pingAnOrderApiService.getPolicyPrint(companyId);
  176. }
  177. @PostMapping("/getOrderDetail")
  178. @ApiOperation(value = "9订单状态查询")
  179. public HttpResult<Object> getOrderDetail(String companyId) throws Exception {
  180. return this.pingAnOrderApiService.getDocumentStatusList(companyId);
  181. }
  182. /**
  183. * @version
  184. * @author: hxl
  185. * @Date: 2024/7/23 18:46
  186. * @Description: 未跑通
  187. * @ todo
  188. */
  189. @PostMapping("/renewalConfirm")
  190. @ApiOperation("10续保")
  191. public HttpResult<Object> renewalConfirm(@RequestBody RenewalConfirmVo renewalConfirmVo) throws Exception {
  192. return this.pingAnOrderApiService.renewalConfirm(renewalConfirmVo);
  193. }
  194. /**
  195. * @version
  196. * @author: hxl
  197. * @Date: 2024/7/23 18:46
  198. * @Description: 测试通过
  199. */
  200. @PostMapping("/repealDocument")
  201. @ApiOperation("11撤销单证")
  202. public HttpResult<Object> repealDocument(String companyId,String documentType) throws Exception {
  203. return this.pingAnOrderApiService.repealDocument(companyId,documentType);
  204. }
  205. //========================================以下接口暂未使用后期可能使用=======================================
  206. /**
  207. /**
  208. * @version
  209. * @author: hxl
  210. * @Date: 2024/7/23 9:33
  211. * @Description: 查询事后未上传资料清单
  212. * todo
  213. */
  214. @PostMapping("/querySupplementMaterial")
  215. @ApiOperation(value = "查询事后未上传资料清单")
  216. public HttpResult<Object> querySupplementMaterial(String companyId) throws Exception {
  217. return this.pingAnOrderApiService.querySupplementMaterial(companyId);
  218. }
  219. /**
  220. * @version
  221. * @author: hxl
  222. * @Date: 2024/7/23 9:33
  223. * @Description: 获取核保时门店自取信息 未测试
  224. * @ todo
  225. */
  226. @PostMapping("/getStorefrontList")
  227. @ApiOperation(value = "获取核保时门店自取信息 2 ")
  228. public HttpResult<Object> getStorefrontList(StorefrontQueryVo storefrontQueryVo) throws Exception {
  229. return this.pingAnOrderApiService.getStorefrontList(storefrontQueryVo);
  230. }
  231. /**
  232. * @version
  233. * @author: hxl
  234. * @Date: 2024/7/23 18:46
  235. * @Description: 测试通过
  236. */
  237. @PostMapping("/queryServiceContract")
  238. @ApiOperation("服务类特约检索")
  239. public HttpResult<Object> queryServiceContract(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
  240. return this.pingAnOrderApiService.queryServiceContract(companyId);
  241. }
  242. /**
  243. * @version
  244. * @author: hxl
  245. * @Date: 2024/7/22 18:51
  246. * @Description: 好车主支付 和二微码支付一样 暂不使用
  247. */
  248. @PostMapping("/viewToPay")
  249. @ApiOperation(value = "获取支付通知单号")
  250. public HttpResult<Object> viewToPay(String companyId) throws Exception {
  251. return this.pingAnOrderApiService.viewToPay(companyId);
  252. }
  253. /**
  254. * @version
  255. * @author: hxl
  256. * @Date: 2024/7/23 9:33
  257. * @Description: 全国短信验证 暂时没用
  258. */
  259. @PostMapping("/sendApplyPolicy")
  260. @ApiOperation(value = "全国短信验证")
  261. public HttpResult<Object> sendApplyPolicy(String companyId,String moblePhone) throws Exception {
  262. return this.pingAnOrderApiService.sendApplyPolicy(companyId,moblePhone);
  263. }
  264. /**
  265. * @version
  266. * @author: hxl
  267. * @Date: 2024/7/23 14:03
  268. * @Description: 平安新CPC收银台 7.10 暂时没用
  269. */
  270. @PostMapping("/chexianStandardPrePayment")
  271. @ApiOperation(value = "平安新CPC收银台 7.10")
  272. public HttpResult<Object> chexianStandardPrePayment(ChexianStandardPrePaymentRequest chexianStandardPrePaymentRequest) throws Exception {
  273. return this.pingAnOrderApiService.chexianStandardPrePayment(chexianStandardPrePaymentRequest);
  274. }
  275. /**
  276. * @version
  277. * @author: hxl
  278. * @Date: 2024/7/23 14:03
  279. * @Description: 身份验证 暂时没用
  280. */
  281. @PostMapping("/beiJingIdAcquisition")
  282. @ApiOperation(value = "身份验证")
  283. public HttpResult<Object> beiJingIdAcquisition(String companyId) throws Exception {
  284. return this.pingAnOrderApiService.beiJingIdAcquisition(companyId);
  285. }
  286. /**
  287. * @version
  288. * @author: hxl
  289. * @Date: 2024/7/23 14:03
  290. * @Description: 支付实名认证建议在noticeDo接口进行 暂时没用
  291. */
  292. @PostMapping("/noticeAuth")
  293. @ApiOperation(value = "支付实名认证建议在noticeDo接口进行 73")
  294. public HttpResult<Object> noticeAuth(NoticeAuthRequest noticeAuthRequest) throws Exception {
  295. return this.pingAnOrderApiService.noticeAuth(noticeAuthRequest);
  296. }
  297. /**
  298. * @version
  299. * @author: hxl
  300. * @Date: 2024/7/23 14:03
  301. * @Description: 支付之前查询通知单内容 74 暂时没用
  302. */
  303. @PostMapping("/getNoticeInfo")
  304. @ApiOperation(value = "支付之前查询通知单内容 74")
  305. public HttpResult<Object> getNoticeInfo(GetNoticeInfoRequest getNoticeInfoRequest) throws Exception {
  306. return this.pingAnOrderApiService.getNoticeInfo(getNoticeInfoRequest);
  307. }
  308. /**
  309. * @version
  310. * @author: hxl
  311. * @Date: 2024/7/23 14:03
  312. * @Description: 支付到账通知平安 75 暂时没用
  313. */
  314. @PostMapping("/noticeDone")
  315. @ApiOperation(value = "支付到账通知平安 75")
  316. public HttpResult<Object> noticeDone(NoticeDoneRequest noticeDoneRequest) throws Exception {
  317. return this.pingAnOrderApiService.noticeDone(noticeDoneRequest);
  318. }
  319. /**
  320. * @version
  321. * @author: hxl
  322. * @Date: 2024/7/23 14:03
  323. * @Description: 身份验证 暂时没用
  324. */
  325. @PostMapping("/getWechatAuthInfo")
  326. @ApiOperation(value = "获取微信缴费实名认证结果 79")
  327. public HttpResult<Object> getWechatAuthInfo(GetWechatAuthInfoRequest getWechatAuthInfoRequest) throws Exception {
  328. return this.pingAnOrderApiService.getWechatAuthInfo(getWechatAuthInfoRequest);
  329. }
  330. /**
  331. * @version
  332. * @author: hxl
  333. * @Date: 2024/7/23 18:46
  334. * @Description: 上海车辆使用
  335. */
  336. @PostMapping("/getDmvehicleInfo")
  337. @ApiOperation("获取交管车辆验证码")
  338. public HttpResult<Object> getDmvehicleInfo(@RequestBody PingAnQuoteVo<List<InsDrivingIntentionInsuranceVo>> quoteVo, BaseQuoteInfoVo quoteInfo) throws Exception {
  339. return this.pingAnOrderApiService.getDmvehicleInfo(quoteVo,quoteInfo);
  340. }
  341. }