Преглед изворни кода

泰康:核保返回需要验车情况,状态为人工审核

wangrq пре 2 месеци
родитељ
комит
e6ab9ef36d

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

@@ -171,7 +171,7 @@ public class TKEntranceFor000038Result extends UnknownFieldEntity {
     private String proxyFlag;
 
     /**
-     * 验车标志
+     * 验车标志 0表示此单无需验车,1表示需要验车
      */
     private String checkCarFlag;
 

+ 1 - 1
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/model/entity/TKOrderData.java

@@ -29,7 +29,7 @@ public class TKOrderData extends UnknownFieldEntity {
     private List<TKOrderGwNonAutoCheckInfo> gwNonAutoCheckInfoList;
 
     /**
-     * 核保标志
+     * 核保标志 3表示自核通过,9表示人工审核
      */
     private String underWriteFlag;
 

+ 33 - 29
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/impl/TKQuotationBaseServiceImpl.java

@@ -21,6 +21,7 @@ import com.jzg.quotation.taikang.crawler.model.TKLoginSession;
 import com.jzg.quotation.taikang.crawler.model.api.*;
 import com.jzg.quotation.taikang.crawler.model.entity.TKAreaInfoVo;
 import com.jzg.quotation.taikang.crawler.model.entity.TKInsureInfo;
+import com.jzg.quotation.taikang.crawler.model.entity.TKOrderCheckCarSpecification;
 import com.jzg.quotation.taikang.crawler.model.entity.TKOrderData;
 import com.jzg.quotation.taikang.crawler.model.entity.po.TKCrawlerOrder;
 import com.jzg.quotation.taikang.crawler.repository.TKLoginSessionRepository;
@@ -188,33 +189,6 @@ public class TKQuotationBaseServiceImpl implements TKQuotationBaseService {
             TKOrderData tkOrderData = tkEntranceFor000038Result.getData();
             // 核保成功,保单编号缓存
             redisCacheUtil.setCache(tkOrderData.getProposalNo(), underwritingVo.getOrder().getOrdersNo(), "HB");
-
-            // 验车标志
-            // String checkCarFlag = tkEntranceFor000038Result.getCheckCarFlag();
-            // String resultType = tkOrderData.getResultType();
-            // if (checkCarFlag != null && checkCarFlag.equals("1") || !resultType.equals("自核通过")) {
-            //     // 需要验车,需要上传影像
-            //
-            //     // 验车照片详情列表
-            //     List<TKOrderCheckCarSpecification> checkCarSpecification = tkEntranceFor000038Result.getCheckCarSpecification();
-            //
-            //     // 验车原因
-            //     Object checkReason = tkEntranceFor000038Result.getCheckReason();
-            //     // 不知道是啥原因
-            //     List<String> underwriteReason = tkEntranceFor000038Result.getUnderwriteReason();
-            //
-            //     // 验车码
-            //     String checkCarCode = httpService.entranceFor000133(session.getToken(), preciseInitResult.getMainOrderId());
-            //
-            //     // 上传视频图像的二维码数据示例:https://car.tk.cn/carTKInsure/#/schema?type=checkcar&fullProposalNo=00671070808142500000004429&orderType=1
-            //     // 其中 00671070808142500000004429 的商业保险单号
-            //
-            //
-            // } else {
-            //     // 不需要验车
-            //
-            // }
-
             // 保司订单号
             underwritingResultsVo.setCompanyOrderNo(tkOrderData.getProposalNo());
             // 交强险投保单号
@@ -227,6 +201,10 @@ public class TKQuotationBaseServiceImpl implements TKQuotationBaseService {
             underwritingResultsVo.setUnderwritingResult("核保成功");
             // 核保状态
             underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.PAY_PENDING);
+            // 验车标志,需要验车,需要上传影像
+            if ("1".equals(tkEntranceFor000038Result.getCheckCarFlag()) || "9".equals(tkEntranceFor000038Result.getData().getUnderWriteFlag())) {
+                buildCheckCar(tkEntranceFor000038Result, underwritingVo, preciseInitResult, underwritingResultsVo);
+            }
             tkCrawlerOrderService.save(underwritingVo, underwritingResultsVo, preciseInitResult.getMainOrderId(), true);
         } else {
             // 核保失败
@@ -238,6 +216,32 @@ public class TKQuotationBaseServiceImpl implements TKQuotationBaseService {
         return underwritingResultsVo;
     }
 
+    private void buildCheckCar(TKEntranceFor000038Result tkEntranceFor000038Result, UnderwritingVo underwritingVo, PreciseInitResult preciseInitResult, UnderwritingResultsVo underwritingResultsVo) {
+        // 需要验车,需要上传影像
+
+        // 验车照片详情列表
+        // List<TKOrderCheckCarSpecification> checkCarSpecification = tkEntranceFor000038Result.getCheckCarSpecification();
+        // // 验车原因
+        // Object checkReason = tkEntranceFor000038Result.getCheckReason();
+        // // 人工审核
+        // List<String> underwriteReason = tkEntranceFor000038Result.getUnderwriteReason();
+        // 验车码
+        // String checkCarCode = httpService.entranceFor000133(session.getToken(), preciseInitResult.getMainOrderId());
+        // 上传视频图像的二维码数据示例:https://car.tk.cn/carTKInsure/#/schema?type=checkcar&fullProposalNo=00671070808142500000004429&orderType=1
+        // 其中 00671070808142500000004429 的商业保险单号
+
+        // todo: 需要找个有验车码的车辆进行测试
+        // InsuranceUploadImageVo insuranceUploadImageVo = new InsuranceUploadImageVo();
+        // insuranceUploadImageVo.setOrder(underwritingVo.getOrder());
+        // insuranceUploadImageVo.setImageVoList();
+        // uploadImage(insuranceUploadImageVo);
+
+        // 核保结果
+        underwritingResultsVo.setUnderwritingResult(tkEntranceFor000038Result.getData().getSpResMsg()+",原因:"+tkEntranceFor000038Result.getCheckReason());
+        // 核保状态
+        underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.STAFF_PROCESS);
+    }
+
     @Override
     public PaymentLinkResultsVo getPaymentLink(PaymentLinkVo paymentLinkVo) {
         AttributionInformationVo attributionInformationVo = paymentLinkVo.getOrder().getAttributionInformationVo();
@@ -263,8 +267,8 @@ public class TKQuotationBaseServiceImpl implements TKQuotationBaseService {
         param.setTplatformId(session.getTplatformId());
         param.setOnlyId(orderID);
         param.setOrderID(orderID);
-        param.setFullProposalNo(insuranceUploadImageVo.getOrder().getQuoteNo());
-        param.setLastFullProposalNo("");
+        param.setFullProposalNo(insuranceUploadImageVo.getOrder().getCompanyOrderNo() == null ? insuranceUploadImageVo.getOrder().getQuoteNo() : insuranceUploadImageVo.getOrder().getCompanyOrderNo());
+        param.setLastFullProposalNo(insuranceUploadImageVo.getOrder().getCompanyOrderNo());
         SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Date date = new Date();
         param.setInputDate(dateFormat.format(date));