|
|
@@ -17,6 +17,8 @@ import com.ydtech.modules.order.service.InsCrawlerOrderService;
|
|
|
import com.ydtech.modules.order.service.InsDrivingIntentionInsuranceService;
|
|
|
import com.ydtech.modules.order.service.PtlAgreementNonCarProductRuleService;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreement;
|
|
|
+import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
|
|
|
+import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
|
|
|
import com.ydtech.modules.protocol.service.PtlAgreementService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -36,6 +38,9 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
|
|
|
@Autowired
|
|
|
private PtlAgreementService ptlAgreementService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PtlAgreementAttributionService ptlAgreementAttributionService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private InsDrivingIntentionInsuranceSonMapper sonMapper;
|
|
|
|
|
|
@@ -48,8 +53,8 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<InsDrivingIntentionInsuranceVo> getInsDrivingIntentionInsuranceVo(NoCarInsuranceQueryVo insuranceVo) {
|
|
|
- LambdaQueryWrapper<InsDrivingIntentionInsurance> query = new LambdaQueryWrapper<InsDrivingIntentionInsurance>();
|
|
|
+ public List<InsDrivingIntentionInsuranceVo> getInsDrivingIntentionInsuranceVo(NoCarInsuranceQueryVo insuranceVo, Integer apiType) {
|
|
|
+ LambdaQueryWrapper<InsDrivingIntentionInsurance> query = new LambdaQueryWrapper<>();
|
|
|
String companyId = "";
|
|
|
if(insuranceVo.getAgreementId() != null){
|
|
|
PtlAgreement byAgreementIdNew = ptlAgreementService.getByAgreementIdNew(insuranceVo.getAgreementId());
|
|
|
@@ -61,9 +66,10 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
|
|
|
if(insuranceVo.getSeatNum() != null) {
|
|
|
query.eq(InsDrivingIntentionInsurance::getSeatNum, insuranceVo.getSeatNum());
|
|
|
}
|
|
|
+ query.eq(InsDrivingIntentionInsurance::getApiType, apiType);
|
|
|
List<InsDrivingIntentionInsurance> insDrivingIntentionInsurances = baseMapper.selectList(query);
|
|
|
List<String> collect = insDrivingIntentionInsurances.stream().map(InsDrivingIntentionInsurance::getProjectCode).collect(Collectors.toList());
|
|
|
- if(collect.size() == 0){
|
|
|
+ if(collect.isEmpty()){
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
List<InsDrivingIntentionInsuranceSon> insDrivingIntentionInsuranceSons = sonMapper.selectList(new LambdaQueryWrapper<InsDrivingIntentionInsuranceSon>()
|
|
|
@@ -121,7 +127,11 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
|
|
|
}
|
|
|
query.orderBy(true, true, PtlAgreementNonCarProductRule::getSort);
|
|
|
List<PtlAgreementNonCarProductRule> list = ptlAgreementNonCarProductRuleService.list(query);
|
|
|
- List<InsDrivingIntentionInsuranceVo> insDrivingIntentionInsuranceVo = getInsDrivingIntentionInsuranceVo(insuranceVo);
|
|
|
+
|
|
|
+ PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insuranceVo.getAgreementId());
|
|
|
+ Integer apiType = ptlAgreementAttribution.getApiType();
|
|
|
+
|
|
|
+ List<InsDrivingIntentionInsuranceVo> insDrivingIntentionInsuranceVo = getInsDrivingIntentionInsuranceVo(insuranceVo, apiType);
|
|
|
if(!list.isEmpty()){
|
|
|
//遍历顶级
|
|
|
insDrivingIntentionInsuranceVo.stream()
|