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

BUG修改-1费用时间失效了,但实际使用还在生效中2报的燃油客车单交,套餐险种出现新能源车和货车 这个在获取方案的时候过滤下 能源类型 使用性质 车辆种类。

lixiaolong 3 месяцев назад
Родитель
Сommit
cd48141f75

+ 1 - 1
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/entity/po/HtCrawlerOrder.java

@@ -30,7 +30,7 @@ public class HtCrawlerOrder {
     private String ciCategory;
 
     /**
-     * 核保额外需要的参数  交强评分
+     * 核保额外需要的参数  商业评分
      */
     private String biCategory;
 }

+ 2 - 2
tenant/organization/src/main/java/com/jzg/organization/controller/SchemeController.java

@@ -107,8 +107,8 @@ public class SchemeController {
 
     @Operation(summary = "获取方案结果")
     @GetMapping("/getSchemeResult")
-    public HttpResult getSchemeResult(String companyId,String productId,String seatCount){
-         SchemeResultVo schemeResultVo = ptlSchemeService.getSchemeResult(companyId,productId,seatCount);
+    public HttpResult getSchemeResult(String companyId,String productId,String seatCount,String energyType,String vehicleType,String carnature){
+         SchemeResultVo schemeResultVo = ptlSchemeService.getSchemeResult(companyId,productId,seatCount,energyType,vehicleType,carnature);
         return HttpResult.ok(schemeResultVo);
     }
 

+ 1 - 1
tenant/organization/src/main/java/com/jzg/organization/service/PtlSchemeService.java

@@ -80,7 +80,7 @@ public interface PtlSchemeService extends IService<PtlScheme> {
      * @param productId
      * @return
      */
-    public SchemeResultVo getSchemeResult(String companyId,String productId,String seatCount);
+    public SchemeResultVo getSchemeResult(String companyId,String productId,String seatCount,String energyType,String vehicleType,String carnature);
 
     List<InsBusinessInsuranceVo> getBusinessInsuranceListByKindType(String kindCode);
 

+ 10 - 1
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlSchemeServiceImpl.java

@@ -49,6 +49,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 
@@ -493,7 +494,7 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
     }
 
     @Override
-    public SchemeResultVo getSchemeResult(String companyId, String productId, String seatCount) {
+    public SchemeResultVo getSchemeResult(String companyId, String productId, String seatCount,String energyType,String vehicleType,String carnature) {
         log.info("根据保司Id和产品id查询协议信息。 companyId=[{}],productId=[{}]", companyId, productId);
         List<SchemeResultVo.SchemeVo> schemeInsuranceInfo = ptlSchemeMapper.getSchemeInsuranceInfo(companyId, productId);
         List<SchemeResultVo.SchemeVo> schemeDrivingInfo = ptlSchemeMapper.getSchemeDrivingInfo(companyId, productId);
@@ -584,6 +585,14 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
             optionalScheme.getKinds().removeIf(kind -> "J1".equals(kind.getKindCode()));
         }
 
+        //过滤 能源类型 使用性质 车辆种类
+        List<PtlScheme> ptlSchemes = ptlSchemeMapper.selectList(new LambdaQueryWrapper<PtlScheme>().
+                eq(PtlScheme::getCompanyId, companyId).eq(PtlScheme::getEnergyType, energyType).
+                like(PtlScheme::getCarnature, carnature).like(PtlScheme::getVehicleType, vehicleType).
+                eq(PtlScheme::getProductId, productId).eq(PtlScheme::getIsDelete, 0));
+        Map<String, PtlScheme> collectPtlSchemes = ptlSchemes.stream().collect(Collectors.toMap(PtlScheme::getId, Function.identity()));
+        AssertionUtils.isFail(collectPtlSchemes.isEmpty(), "没有可报价的保险公司");
+        schemeResultVo.getSchemes().stream().filter(s -> !collectPtlSchemes.containsKey(s.getId()));
         return schemeResultVo;
     }
 

+ 2 - 0
tenant/organization/src/main/resources/mapper/PtlAgreementCostMapper.xml

@@ -177,6 +177,8 @@
             <if test="productId != null">
                 AND c.product_id = #{productId}
             </if>
+            AND
+            NOW() BETWEEN c.effective_time AND c.failure_time
         </where>
     </select>