Przeglądaj źródła

处理晋A93U07华泰加的36元非车不显示的问题

lixiaolong 2 tygodni temu
rodzic
commit
faf75bc64f

+ 8 - 4
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/service/Impl/HuaTaiCrawlerRequestImpl.java

@@ -158,7 +158,7 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
     // ====================== 续保查询(仅获取车型编码) ======================
     // ====================== 续保查询(仅获取车型编码) ======================
     public Map<String, Object> xbQuery(String username, String cookie, CarInfoVo car) throws Exception {
     public Map<String, Object> xbQuery(String username, String cookie, CarInfoVo car) throws Exception {
         log.info("开始续保查询");
         log.info("开始续保查询");
-        boolean special = SPECIAL_USERS.contains(username) || SPECIAL_ACCOUNT_XN.equals(username);
+        boolean special = SPECIAL_USERS.contains(username); // || SPECIAL_ACCOUNT_XN.equals(username)
         CarInfoVo carCopy = JSONObject.parseObject(JSONObject.toJSONString(car), CarInfoVo.class);
         CarInfoVo carCopy = JSONObject.parseObject(JSONObject.toJSONString(car), CarInfoVo.class);
         HttpHeaders headers = special ? buildSpecialHeaders(cookie, true) : buildHtmlHeaders(cookie);
         HttpHeaders headers = special ? buildSpecialHeaders(cookie, true) : buildHtmlHeaders(cookie);
         if (special) {
         if (special) {
@@ -485,7 +485,7 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
         data = step.data();
         data = step.data();
         if (data.getApplicationdto() != null) {
         if (data.getApplicationdto() != null) {
             if (StringUtils.isNotBlank(step.personalInsuredJSON())) {
             if (StringUtils.isNotBlank(step.personalInsuredJSON())) {
-                fcPrice = fetchNoCarPremium(cookie, quotationNo, attr, step.personalInsuredJSON());
+                fcPrice = fetchNoCarPremium(cookie, StringUtils.isBlank(quotationNo)?data.getQuotationRelaNo():quotationNo, attr, step.personalInsuredJSON());
             }
             }
             return new CoreResult(fcPrice, data, true);
             return new CoreResult(fcPrice, data, true);
         }
         }
@@ -669,14 +669,18 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
                 "postalCode", "bulidTypeCode", "bulidTypeQiTaMes", "provinceName", "cityName", "regionName")) {
                 "postalCode", "bulidTypeCode", "bulidTypeQiTaMes", "provinceName", "cityName", "regionName")) {
             m.put(k, "");
             m.put(k, "");
         }
         }
-        m.put("amount", set != null && set.getCoverage() != null ? set.getCoverage().toString().replace(".00", "") : cfg.getCoverage());
+        m.put("amount", set != null && set.getCoverage() != null ? set.getCoverage().toString().replace(".00", "") : cfg.getCoverage().replace(".00", ".0"));
         m.put("car_limitloadperson", q.getCarInfoVo().getSeatCount());
         m.put("car_limitloadperson", q.getCarInfoVo().getSeatCount());
         m.put("productcode", cfg != null ? cfg.getParentProductCode() : "");
         m.put("productcode", cfg != null ? cfg.getParentProductCode() : "");
         m.put("mealcode", cfg != null ? cfg.getProductCode() : "");
         m.put("mealcode", cfg != null ? cfg.getProductCode() : "");
+        if (cfg != null && "E007G".equals(cfg.getProductCode())) {//"“百万驾乘”意外伤害保险 36元款"
+            //是否同时投保乘客保障 0否 保费36 1是 保费180
+            m.put("isInsuredPassenger", "0");
+        }
         m.put("startdate", q.getCiRiskInfoVo().getStartDate());
         m.put("startdate", q.getCiRiskInfoVo().getStartDate());
         m.put("enddate", q.getCiRiskInfoVo().getEndDate());
         m.put("enddate", q.getCiRiskInfoVo().getEndDate());
         m.put("num", "1");
         m.put("num", "1");
-        m.put("premium", set != null && set.getPremium() != null ? set.getPremium().toString().replace(".00", ".0") : cfg.getPremium());
+        m.put("premium", set != null && set.getPremium() != null ? set.getPremium().toString().replace(".00", ".0") : cfg.getPremium().replace(".00", ".0"));
         m.put("isInsuredSizesFlag", "0");
         m.put("isInsuredSizesFlag", "0");
         m.put("perinsuredList", perinsuredList);
         m.put("perinsuredList", perinsuredList);
         return m;
         return m;