소스 검색

Merge remote-tracking branch 'origin/test' into test

Qchen 1 년 전
부모
커밋
10e5120ffb

+ 7 - 0
src/main/java/com/ydtech/modules/order/entity/InsAreaCompanyAccidentalDriving.java

@@ -125,6 +125,13 @@ public class InsAreaCompanyAccidentalDriving implements Serializable {
             this.setRideRiskName(jsonObject.getString("goodsName"));
             this.setQuantity(jsonObject.getInteger("quantity"));
             this.setCompanyId(t.getCompanyId());
+        }else if(t.getCompanyId().equals("HTIC1000000")){
+            // 华泰
+            JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(t.getAccidentalDrivingVo()));
+            this.setRideRiskCode(jsonObject.getString("mealcode"));
+            this.setRideRiskCode(jsonObject.getString("productname"));
+            this.setQuantity(jsonObject.getInteger("num"));
+            this.setCompanyId(t.getCompanyId());
         }
     }
 }

+ 15 - 3
src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java

@@ -654,6 +654,8 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
             AccidentResponseVo o = quoteRespVo.getAccidentInfo().get(0);
             if (Objects.nonNull(o)) {
                 o.setQuantity(String.valueOf(insAreaCompanyAccidentalDriving.getQuantity()));
+                //  爬虫返回的驾意险名称有可能和系统内的不一致  重置下驾意险名称
+                o.setProjectName(insAreaCompanyAccidentalDriving.getRideRiskName());
             }
         }
 
@@ -730,10 +732,20 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
         }
 
         // 赔付率
-        quoteRespVo.setLossRation(Double.parseDouble(response.getOther().getLossRation()));
+        if(Objects.nonNull(response.getOther().getLossRation())) {
+            quoteRespVo.setLossRation(Double.parseDouble(response.getOther().getLossRation()));
+            insAreaCompany.setLossRation(Double.parseDouble(response.getOther().getLossRation()));
+        }
         // 交强赔付率
-        quoteRespVo.setJqLossRation(Double.parseDouble(response.getOther().getJqLossRation()));
-        quoteRespVo.setSyLossRation(Double.parseDouble(response.getOther().getSyLossRation()));
+        if(Objects.nonNull(response.getOther().getJqLossRation())) {
+            quoteRespVo.setJqLossRation(Double.parseDouble(response.getOther().getJqLossRation()));
+            insAreaCompany.setJqLossRation(Double.parseDouble(response.getOther().getJqLossRation()));
+        }
+        // 商业赔付率
+        if(Objects.nonNull(response.getOther().getSyLossRation())) {
+            quoteRespVo.setSyLossRation(Double.parseDouble(response.getOther().getSyLossRation()));
+            insAreaCompany.setSyLossRation(Double.parseDouble(response.getOther().getSyLossRation()));
+        }
 
 
         insAreaCompanyService.insertCompanyAndOrders(insAreaCompany, insAreaCompanyAccidentalDriving);

+ 4 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsOrderPdfUrlServiceImpl.java

@@ -277,6 +277,10 @@ public class InsOrderPdfUrlServiceImpl extends ServiceImpl<InsOrderPdfUrlMapper,
             jyPolicyNo = OrderUtils.getJyPolicyNo(subOrder.getCompanyId(), String.valueOf(subOrder.getApiType()==null?1:subOrder.getApiType()), subOrder.getCrossInsurance().toString(), insOrders.getIsExternal()==null?"0":String.valueOf(insOrders.getIsExternal()));
         }
         subOrder.setJyPolicyNo(jyPolicyNo);
+        if(subOrder.getApiType()!=null && subOrder.getApiType()==2){
+            return insCrawlerOrderService.getPolicyByCompanyIdPdfList(subOrder,insOrders,flag);
+        }
+
         if(insOrders.getIsExternal()!=null && insOrders.getIsExternal() ==1){
             //外部订单
             return insAreaCompanyExternalPolicyService.getPolicyByCompanyIdPdfList(subOrder,insOrders);