ソースを参照

添加泰康 完善核保

wlq 1 年間 前
親
コミット
1a3a7a698a

+ 35 - 32
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/client/HttpService.java

@@ -33,7 +33,8 @@ public class HttpService {
     private String token() {
         if (token != null) {
             return token;
-        } if (tokenTest != null) {
+        }
+        if (tokenTest != null) {
             return tokenTest;
         }
 
@@ -137,12 +138,12 @@ public class HttpService {
 
     /**
      * 02 各种证件类型
-     *
+     * <p>
      * 1 组织机构代码证
      * 4 统一社会信用代码
      * 99 其他
-     *
-     *
+     * <p>
+     * <p>
      * 01 居民身份证
      * 03 军人证
      * 07 护照
@@ -300,7 +301,7 @@ public class HttpService {
      * @param tplatformId
      * @param orderId
      * @param tkAgentFuzzy 渠道
-     * @param agentCode     代理人代码
+     * @param agentCode    代理人代码
      * @return
      */
     public TKAgentQueryResult agentQuery(String tplatformId, String orderId, TKAgentFuzzy tkAgentFuzzy, String agentCode) {
@@ -642,13 +643,14 @@ public class HttpService {
 
     /**
      * 此接口的含义大概是对上一步提交的投保的险种和计算好的保价进行保存。
-     *
+     * <p>
      * 选择了投保险种计算了保费后,点击下一步操作的接口,进入下一个页面“录入保费信息”。
+     * <p>
+     * 虽然响应 SaveQuoteResult 中有几十个字段,但只有 orderID 有值,与参数的 orderID 一样。
      *
-     *  虽然响应 SaveQuoteResult 中有几十个字段,但只有 orderID 有值,与参数的 orderID 一样。
      * @return
      */
-    public SaveQuoteResult saveQuote(String tplatformId, String fromId,  String orderId) {
+    public SaveQuoteResult saveQuote(String tplatformId, String fromId, String orderId) {
         SaveQuoteParam param = new SaveQuoteParam();
         param.setChannelCode("OffWeb");
         param.setTplatformId(tplatformId);
@@ -665,8 +667,6 @@ public class HttpService {
     }
 
     /**
-     *
-     *
      * @return
      */
     public FloatNoticeGetResult floatNoticeGet(String tplatformId, String orderId) {
@@ -719,11 +719,9 @@ public class HttpService {
 
     /**
      * 特别约定
-     *
+     * <p>
      * 好像是个查询可用的特别约定。
      *
-     *
-     *
      * @return
      */
     public List<EngageEngageQueryResult> engageEngageQuery(String tplatformId, String fromId, String orderId, EngageEngageQueryParam.Privy privy) {
@@ -743,8 +741,6 @@ public class HttpService {
     }
 
     /**
-     *
-     *
      * @return
      */
     public Map<String, String> initFindRiskConfig(String tplatformId) {
@@ -763,8 +759,6 @@ public class HttpService {
     }
 
     /**
-     *
-     *
      * @return
      */
     public GroupOrderGetNewNoticeStatusResult groupOrderGetNewNoticeStatus(String tplatformId) {
@@ -782,7 +776,6 @@ public class HttpService {
     }
 
     /**
-     *
      * entrance 返回的数据是加密数据的情况
      *
      * @return
@@ -819,22 +812,13 @@ public class HttpService {
     }
 
     /**
-     *
      * entrance 返回的数据是字符串的情况
      *
      * @return
      */
-    public String entranceForString(String tplatformId, String fromId, String orderId) {
-        EntranceParam param = new EntranceParam();
-        param.setChannelCode("OffWeb");
-        param.setFromID(fromId);
-        param.setOrderID(orderId);
-        param.setLeadsid("");
-        param.setReadTime("");
-        param.setIdcardOcrFlag("");
-        param.setCollectFlag("");
-
+    public String entranceForString(Object param, String actionType) {
         HttpHeaders httpHeaders = new HttpHeaders();
+        httpHeaders.add("Actiontype", actionType);
         httpHeaders.add("tkCarRequestToken", token());
 
         StringResponse response = client.request(HttpURL.entrance, param, httpHeaders, StringResponse.class);
@@ -844,6 +828,7 @@ public class HttpService {
 
     /**
      * 通用接口,且返回的数据是未加密的 json 数据的情况
+     *
      * @return
      */
     public <B> B entranceForJson(Object param, String actionType, Class<B> responseType) {
@@ -857,8 +842,8 @@ public class HttpService {
     }
 
     /**
-     *
      * entrance 返回的数据是 json 的情况
+     *
      * @return
      */
     public EntranceResult entranceFor000012(String tplatformId, String fromId, String orderId, TKInsureInfo insureInfo) {
@@ -875,8 +860,8 @@ public class HttpService {
     }
 
     /**
-     *
      * entrance 返回的数据是 json 的情况
+     *
      * @return
      */
     public TKEntranceFor000038Result entranceFor000038(String tplatformId, String fromId, String orderId) {
@@ -893,8 +878,26 @@ public class HttpService {
     }
 
     /**
+     * 获取验车码
+     * entrance
      *
-     *
+     * @return
+     */
+    public String entranceFor000133(String orderId) {
+        EntranceParam param = new EntranceParam();
+        param.setChannelCode("OffWeb");
+        param.setOrderID(orderId);
+
+        String response = entranceForString(param, "000133");
+
+        if (response != null) {
+            response = response.replace("验车码:", "");
+        }
+
+        return response;
+    }
+
+    /**
      * @return
      */
     public String carCheckAttorneyList(String tplatformId, String proposalNo) {

+ 41 - 1
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/model/api/TKEntranceFor000038Result.java

@@ -23,15 +23,55 @@ public class TKEntranceFor000038Result extends UnknownFieldEntity {
         private String authenticationFlag;
     }
 
+    /**
+     * 来源ID:标识该保险业务信息的来源系统或渠道的唯一标识符。
+     */
     private String fromId;
+
+    /**
+     * 座位数:表示被保险车辆或相关资产的座位数量,通常为整数,但在此以字符串形式存储,可能涉及数据转换。
+     */
     private String seatCount;
+
+    /**
+     * 用户性质代码:标识用户或投保人的性质的代码,如个人、企业等,通常用于分类和统计。
+     */
     private String userNatureCode;
+
+    /**
+     * 是否获取发行代码:标识是否成功获取了与保险业务相关的某种发行代码,通常以"Y"(是)或"N"(否)表示。
+     */
     private String isGetIssueCode;
+
+    /**
+     * 支付费用:表示用户需要支付的保险费用金额,通常为数值,但在此以字符串形式存储,可能涉及数据转换和格式化。
+     */
     private String payFee;
-    private List underwriteReason;
+
+    /**
+     * 承保理由列表:包含多个承保理由的字符串列表,每个理由解释了为什么保险公司愿意承保该业务。
+     * 注意:此字段应为List<String>类型,但缺少泛型声明,应修正为List<String>。
+     */
+    private List<String> underwriteReason; // 修正了泛型声明
+
+    /**
+     * 被保险人性质:标识被保险人的性质的代码或描述,如个人、团体、企业等。
+     */
     private String insuredNature;
+
+    /**
+     * 公司代码:标识保险公司或相关机构的代码,通常用于内部管理和系统间交互。
+     */
     private String comCode;
+
+    /**
+     * 业务类型:标识保险业务的具体类型,如车险、寿险、健康险等。
+     */
     private String businessType;
+
+    /**
+     * 非车险提案号:对于非车险业务,表示该业务提案的唯一标识符。
+     */
     private String nonCarProposalNo;
 
     /**

+ 23 - 0
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/service/TKQuotationBaseServiceImpl.java

@@ -172,6 +172,29 @@ public class TKQuotationBaseServiceImpl implements QuotationBaseService {
         // # 车险投保单报价
         TKEntranceFor000038Result tkEntranceFor000038Result = tkSimpleService.orderSubmit(loginInfo, preciseInitResult.getMainOrderId(), insureInfo);
 
+        // 验车标志
+        String checkCarFlag = tkEntranceFor000038Result.getCheckCarFlag();
+
+        if (checkCarFlag != null && checkCarFlag.equals("1")) {
+            // 需要验车,需要上传影像
+
+            // 验车照片详情列表
+            List<TKOrderCheckCarSpecification> checkCarSpecification = tkEntranceFor000038Result.getCheckCarSpecification();
+
+            // 验车原因
+            Object checkReason = tkEntranceFor000038Result.getCheckReason();
+            // 不知道是啥原因
+            List<String> underwriteReason = tkEntranceFor000038Result.getUnderwriteReason();
+
+            // 验车码
+            String checkCarCode = httpService.entranceFor000133(preciseInitResult.getMainOrderId());
+
+        } else {
+            // 不需要验车
+
+        }
+
+
         // 交强险投保单号
         String proposalNoCI = tkEntranceFor000038Result.getProposalNoCI();
         // 商业险投保单号

+ 2 - 2
tenant/insurance/quotation-taikang/src/test/data/A.json

@@ -1,6 +1,8 @@
 {
   "data": {
     "licenseNo": "晋K7059T",
+    "proxyFlag": "0",
+    "checkCarFlag": "1",
     "data": {
       "pastDate": "2025-03-17 14:24",
       "gwNoValidateCarinfoList": [
@@ -90,8 +92,6 @@
     "comCode": "0114",
     "proposalNoBI": "K38JjtkUWPLfnCUJSrh6DP8hVI2d+FRUb6Jx3o5PRWI5D4rHWpkZK6fnQ2Rq88W7rBd8RiFCTe43\nVXvorAWBc1nZBibLXPAvV1y22mxcQSQ=",
     "checkCarCodeName": "",
-    "proxyFlag": "0",
-    "checkCarFlag": "1",
     "isElectronInsure": "K38JjtkUWPJmVVxGdOSWi4590l6whmnUkAV8rHz/PClliOfhWEUrJP+LI5DgAiuEB4JFDN9/C24=",
     "authenticationFlag": "",
     "checkReason": [