Просмотр исходного кода

fix 恒邦交强及时起保的 驾意险不用即时起保

liub 2 месяцев назад
Родитель
Сommit
2aec961ef1

+ 2 - 1
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/request/GuoRenCrawlerQueryQuotationRequest.java

@@ -1,5 +1,6 @@
 package com.jzg.quotation.guoren.crawler.entity.request;
 
+import com.alibaba.excel.util.StringUtils;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.jzg.commons.entity.quote.vo.AccidentalDrivingVo;
 import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
@@ -50,7 +51,7 @@ public class GuoRenCrawlerQueryQuotationRequest implements Serializable {
         DataDTO dataDTO = new DataDTO();
         GoodsListDTO goodsListDTO = new GoodsListDTO();
         goodsListDTO.setClassifyCode("A");
-        goodsListDTO.setGoodsCode(accidentalDriving.getParentProductCode());
+        goodsListDTO.setGoodsCode(StringUtils.isBlank(accidentalDriving.getParentProductCode()) ? accidentalDriving.getProductCode() : accidentalDriving.getParentProductCode());
         goodsListDTO.setProdCode(accidentalDriving.getProductCode());
         goodsListDTO.setStartDate(quoteVo.getCiRiskInfoVo() != null
                 ? TimeProcessing.dateTimeToDate(quoteVo.getCiRiskInfoVo().getStartDate()) + " 00:00:00"

+ 4 - 1
tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/service/Impl/HengBangCrawlerRequestImpl.java

@@ -197,7 +197,10 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
                 // 不含交强险标识则为商业险重复投保
                 calculationRequest.setBegintimeBi(utcTime);
             }
-            calculationRequest.setBegintimeAccident(utcTime);
+            // 驾意险不支持即时起保:北京时间0点则直接复用,非0点则自动设为下一日0点
+            calculationRequest.setBegintimeAccident(DateUtil.isBeijingMidnight(utcTime)
+                    ? utcTime
+                    : DateUtil.getNextDayMidnightUtc(utcTime));
 
             resJsonObj = callCalculation(calculationRequest, headers);
             if (resJsonObj == null) {