785834757 пре 1 година
родитељ
комит
193ecc3983

+ 1 - 0
src/main/java/com/ydtech/modules/order/controller/QuoteController.java

@@ -175,6 +175,7 @@ public class QuoteController extends BaseController {
             QuoteAccidentalDrivingVo javaObject = jsonObject.toJavaObject(QuoteAccidentalDrivingVo.class);
             BeanUtils.copyProperties(quoteVo, quoteVo1);
             quoteVo1.setAccidentalDrivingVo(javaObject);
+            quoteVo1.setSeatNum(quoteInfo.getCarInfo().getSeatCount());
             BaseQuoteVo baseQuoteVo = insOrdersService.convertDriving(quoteVo1);
             respVo = insCrawlerOrderService.quote(quoteInfo, baseQuoteVo);
         }

+ 3 - 0
src/main/java/com/ydtech/modules/order/entity/vo/BaseQuoteVo.java

@@ -163,6 +163,9 @@ public class BaseQuoteVo<T> {
     private Boolean isInspect;
 
 
+    @ApiModelProperty("座位数")
+    private String seatNum;
+
 
     @ApiModelProperty("特别约定")
     private List<GuoRenSpecialAgreementVo> guoRenSpecialAgreementVo;

+ 1 - 0
src/main/java/com/ydtech/modules/order/service/InsDrivingIntentionInsuranceService.java

@@ -42,6 +42,7 @@ public interface InsDrivingIntentionInsuranceService extends IService<InsDriving
      * @return
      */
     InsDrivingIntentionInsurance getByProjectCode(String companyId,String projectCode);
+    InsDrivingIntentionInsurance getByProjectCode(String companyId,String projectCode,String seatNum);
 
     /**
      * 根据 保险公司id 和 驾意险id 获取驾意险险种

+ 14 - 1
src/main/java/com/ydtech/modules/order/service/impl/InsDrivingIntentionInsuranceServiceImpl.java

@@ -193,7 +193,20 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
     public InsDrivingIntentionInsurance getByProjectCode(String companyId, String projectCode) {
         return baseMapper.selectOne(new LambdaQueryWrapper<InsDrivingIntentionInsurance>()
                 .eq(InsDrivingIntentionInsurance::getCompanyId, companyId)
-                .eq(InsDrivingIntentionInsurance::getProjectCode, projectCode));
+                .eq(InsDrivingIntentionInsurance::getProjectCode, projectCode)
+                );
+    }
+
+    @Override
+    public InsDrivingIntentionInsurance getByProjectCode(String companyId, String projectCode,String seatNum) {
+        return baseMapper.selectOne(new LambdaQueryWrapper<InsDrivingIntentionInsurance>()
+                .eq(InsDrivingIntentionInsurance::getCompanyId, companyId)
+                .eq(InsDrivingIntentionInsurance::getProjectCode, projectCode)
+                .and(wrapper ->
+                        wrapper.isNull(InsDrivingIntentionInsurance::getSeatNum)
+                                .or()
+                                .eq(InsDrivingIntentionInsurance::getSeatNum, seatNum)
+                ));
     }
 
     @Override

+ 1 - 1
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -1805,7 +1805,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             // 诚泰财险
             BaseQuoteVo<Object> chengtaiBaseQuoteVo = new BaseQuoteVo<>();
             BeanUtils.copyProperties(baseQuoteVo, chengtaiBaseQuoteVo);
-            InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(), baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
+            InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(), baseQuoteVo.getAccidentalDrivingVo().getProjectCode(), baseQuoteVo.getSeatNum());
             chengtaiBaseQuoteVo.setAccidentalDrivingVo(JSONObject.parseObject(byProjectCode.getRequestData()));
             return chengtaiBaseQuoteVo;
         }