Răsfoiți Sursa

渤海驾意险处理

785834757 1 an în urmă
părinte
comite
8c05917689

+ 9 - 7
src/main/java/com/ydtech/modules/order/service/impl/BoHaiOrderApiServiceImpl.java

@@ -13,10 +13,7 @@ import com.ydtech.modules.order.components.ConfigureParametersComponents;
 import com.ydtech.modules.order.components.FileComponents;
 import com.ydtech.modules.order.components.bohai.BoHaiRequestApiComponent;
 import com.ydtech.modules.order.constants.UnderwritingStatus;
-import com.ydtech.modules.order.entity.InsAreaCompany;
-import com.ydtech.modules.order.entity.InsAreaCompanyAccidentalDriving;
-import com.ydtech.modules.order.entity.InsOrders;
-import com.ydtech.modules.order.entity.TaxArrears;
+import com.ydtech.modules.order.entity.*;
 import com.ydtech.modules.order.entity.api.bohai.constants.*;
 import com.ydtech.modules.order.entity.api.bohai.request.*;
 import com.ydtech.modules.order.entity.api.bohai.response.*;
@@ -67,6 +64,8 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
 
     private final InsOrdersUnderwritingReasonService insOrdersUnderwritingReasonService;
 
+    private final InsDrivingIntentionInsuranceService insDrivingIntentionInsuranceService;
+
     @Override
     public HttpResult<List<NonAutomotiveProductsResponse.DataDTO.ProductsDTO>> productQuery(ProductQueryVo productQueryVo) throws Exception {
         // 账号信息
@@ -654,10 +653,13 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
 
         List<InsAreaCompanyAccidentalDriving> insAreaCompanyAccidentalDrivings = new ArrayList<>();
         accidentalDrivingVo.forEach(accidentalDriving -> {
+            List<InsDrivingIntentionInsurance> bpic1000000 = insDrivingIntentionInsuranceService.getInsDrivingIntentionInsurance("BPIC1000000", accidentalDriving.getPackageCode());
             InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = new InsAreaCompanyAccidentalDriving();
-            insAreaCompanyAccidentalDriving.setQuantity(insAreaCompanyAccidentalDriving.getQuantity());
-            insAreaCompanyAccidentalDriving.setRideRiskCode(insAreaCompanyAccidentalDriving.getRideRiskCode());
-            insAreaCompanyAccidentalDriving.setRideRiskName(insAreaCompanyAccidentalDriving.getRideRiskName());
+            insAreaCompanyAccidentalDriving.setQuantity(Integer.parseInt(accidentalDriving.getCopies()));
+            insAreaCompanyAccidentalDriving.setRideRiskCode(accidentalDriving.getPackageCode());
+            if(!bpic1000000.isEmpty()) {
+                insAreaCompanyAccidentalDriving.setRideRiskName(bpic1000000.get(0).getProjectName());
+            }
             insAreaCompanyAccidentalDrivings.add(insAreaCompanyAccidentalDriving);
         });