|
|
@@ -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;
|
|
|
}
|
|
|
|