|
@@ -343,6 +343,8 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
|
|
|
, BigDecimal carActualValue, ChengTaiConfigureParameters parameters, CarModelQueryResponse.vehicle vehicle, BaseQuoteVo<InsDrivingIntentionInsurance> quoteVo) throws Exception {
|
|
, BigDecimal carActualValue, ChengTaiConfigureParameters parameters, CarModelQueryResponse.vehicle vehicle, BaseQuoteVo<InsDrivingIntentionInsurance> quoteVo) throws Exception {
|
|
|
int index = 0;
|
|
int index = 0;
|
|
|
PremiumCalculationResponse premiumCalculationResponse = new PremiumCalculationResponse();
|
|
PremiumCalculationResponse premiumCalculationResponse = new PremiumCalculationResponse();
|
|
|
|
|
+ // 交强,商业转保码
|
|
|
|
|
+ String ciQuestion = null,biQuestion = null;
|
|
|
while(true) {
|
|
while(true) {
|
|
|
if(index >=5){
|
|
if(index >=5){
|
|
|
break;
|
|
break;
|
|
@@ -350,6 +352,35 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
|
|
|
premiumCalculationResponse = chengTaiRequestApiComponent.premiumCalculation(premiumCalculationRequest);
|
|
premiumCalculationResponse = chengTaiRequestApiComponent.premiumCalculation(premiumCalculationRequest);
|
|
|
index++;
|
|
index++;
|
|
|
maxQuoteNum--;
|
|
maxQuoteNum--;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // 如果返回出现问题
|
|
|
|
|
+ if (!premiumCalculationResponse.getHead().getResponseCode().equals("0000")){
|
|
|
|
|
+ // 是否是校验码有误
|
|
|
|
|
+ if(premiumCalculationResponse.getHead().getErrorMessage().contains("校验码有误")){
|
|
|
|
|
+ if(Objects.nonNull(ciQuestion)){
|
|
|
|
|
+ if(Objects.isNull(premiumCalculationResponse.getCompRisk())){
|
|
|
|
|
+ premiumCalculationResponse.setCompRisk(new PremiumCalculationResponse.compRisk());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(Objects.isNull(premiumCalculationResponse.getCompRisk().getBasePart())){
|
|
|
|
|
+ premiumCalculationResponse.getCompRisk().setBasePart(new PremiumCalculationResponse.compRisk.basePart());
|
|
|
|
|
+ }
|
|
|
|
|
+ premiumCalculationResponse.getCompRisk().getBasePart().setQuestion(ciQuestion);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(Objects.nonNull(biQuestion)){
|
|
|
|
|
+ if(Objects.isNull(premiumCalculationResponse.getCommRisk())){
|
|
|
|
|
+ premiumCalculationResponse.setCommRisk(new PremiumCalculationResponse.commRisk());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(Objects.isNull(premiumCalculationResponse.getCommRisk().getBasePart())){
|
|
|
|
|
+ premiumCalculationResponse.getCommRisk().setBasePart(new PremiumCalculationResponse.commRisk.basePart());
|
|
|
|
|
+ }
|
|
|
|
|
+ premiumCalculationResponse.getCommRisk().getBasePart().setQuestion(biQuestion);
|
|
|
|
|
+ }
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (!premiumCalculationResponse.getHead().getErrorMessage().equals("成功")) {
|
|
if (!premiumCalculationResponse.getHead().getErrorMessage().equals("成功")) {
|
|
|
/**
|
|
/**
|
|
|
* 重复投保
|
|
* 重复投保
|
|
@@ -444,10 +475,10 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
|
|
|
}else{
|
|
}else{
|
|
|
|
|
|
|
|
// 转保车处理
|
|
// 转保车处理
|
|
|
- String ciQuestion = premiumCalculationResponse.getCompRisk() != null
|
|
|
|
|
|
|
+ ciQuestion = premiumCalculationResponse.getCompRisk() != null
|
|
|
? premiumCalculationResponse.getCompRisk().getBasePart().getQuestion()
|
|
? premiumCalculationResponse.getCompRisk().getBasePart().getQuestion()
|
|
|
: null;
|
|
: null;
|
|
|
- String biQuestion = premiumCalculationResponse.getCommRisk() != null
|
|
|
|
|
|
|
+ biQuestion = premiumCalculationResponse.getCommRisk() != null
|
|
|
? premiumCalculationResponse.getCommRisk().getBasePart().getQuestion()
|
|
? premiumCalculationResponse.getCommRisk().getBasePart().getQuestion()
|
|
|
: null;
|
|
: null;
|
|
|
// 订单号
|
|
// 订单号
|
|
@@ -479,26 +510,7 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
|
|
|
quoteVo.setRenewalCodeSy(resp.getSyImageCode().replace("0", "O"));
|
|
quoteVo.setRenewalCodeSy(resp.getSyImageCode().replace("0", "O"));
|
|
|
}
|
|
}
|
|
|
premiumCalculationRequest = new PremiumCalculationRequest(quoteInfoVo, carActualValue, parameters, vehicle, quoteVo, quoteInfoVo.getRiskList(), orderNumber);
|
|
premiumCalculationRequest = new PremiumCalculationRequest(quoteInfoVo, carActualValue, parameters, vehicle, quoteVo, quoteInfoVo.getRiskList(), orderNumber);
|
|
|
- premiumCalculationResponse = chengTaiRequestApiComponent.premiumCalculation(premiumCalculationRequest);
|
|
|
|
|
- if(Objects.nonNull(ciQuestion)){
|
|
|
|
|
- if(Objects.isNull(premiumCalculationResponse.getCompRisk())){
|
|
|
|
|
- premiumCalculationResponse.setCompRisk(new PremiumCalculationResponse.compRisk());
|
|
|
|
|
- }
|
|
|
|
|
- if(Objects.isNull(premiumCalculationResponse.getCompRisk().getBasePart())){
|
|
|
|
|
- premiumCalculationResponse.getCompRisk().setBasePart(new PremiumCalculationResponse.compRisk.basePart());
|
|
|
|
|
- }
|
|
|
|
|
- premiumCalculationResponse.getCompRisk().getBasePart().setQuestion(ciQuestion);
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- if(Objects.nonNull(biQuestion)){
|
|
|
|
|
- if(Objects.isNull(premiumCalculationResponse.getCommRisk())){
|
|
|
|
|
- premiumCalculationResponse.setCommRisk(new PremiumCalculationResponse.commRisk());
|
|
|
|
|
- }
|
|
|
|
|
- if(Objects.isNull(premiumCalculationResponse.getCommRisk().getBasePart())){
|
|
|
|
|
- premiumCalculationResponse.getCommRisk().setBasePart(new PremiumCalculationResponse.commRisk.basePart());
|
|
|
|
|
- }
|
|
|
|
|
- premiumCalculationResponse.getCommRisk().getBasePart().setQuestion(biQuestion);
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
break;
|
|
break;
|