|
|
@@ -139,6 +139,8 @@ public class QuoteController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ HttpResult<QuoteRespVo> respVo = null;
|
|
|
+
|
|
|
PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(quoteVo.getAgreementId());
|
|
|
|
|
|
if (PtlApiType.PTL_API_2.getCode() == ptlAgreementAttribution.getApiType()) {
|
|
|
@@ -148,10 +150,10 @@ public class QuoteController extends BaseController {
|
|
|
BeanUtils.copyProperties(quoteVo, quoteVo1);
|
|
|
quoteVo1.setAccidentalDrivingVo(javaObject);
|
|
|
BaseQuoteVo baseQuoteVo = insOrdersService.convertDriving(quoteVo1);
|
|
|
- return insCrawlerOrderService.quote(quoteInfo, baseQuoteVo);
|
|
|
+ respVo = insCrawlerOrderService.quote(quoteInfo, baseQuoteVo);
|
|
|
}
|
|
|
|
|
|
- if("ZMBX1000000".equals(ptlAgreementAttribution.getInsCompanyId())){
|
|
|
+ if("ZMBX1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
|
|
|
BaseQuoteVo<AccidentalDrivingVo> quoteVo1 = new BaseQuoteVo<>();
|
|
|
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
|
|
|
BeanUtils.copyProperties(quoteVo, quoteVo1);
|
|
|
@@ -161,9 +163,9 @@ public class QuoteController extends BaseController {
|
|
|
}else{
|
|
|
quoteVo1.setAccidentalDrivingVo(null);
|
|
|
}
|
|
|
- return zhongMeiOrderApiService.quote(quoteInfo, quoteVo1);
|
|
|
+ respVo = zhongMeiOrderApiService.quote(quoteInfo, quoteVo1);
|
|
|
}
|
|
|
- if("AICS1000000".equals(ptlAgreementAttribution.getInsCompanyId())){
|
|
|
+ if("AICS1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
|
|
|
BaseQuoteVo<QuoteAccidentalDrivingVo> quoteVo1 = new BaseQuoteVo<>();
|
|
|
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
|
|
|
QuoteAccidentalDrivingVo javaObject = jsonObject.toJavaObject(QuoteAccidentalDrivingVo.class);
|
|
|
@@ -171,20 +173,20 @@ public class QuoteController extends BaseController {
|
|
|
quoteVo1.setAccidentalDrivingVo(javaObject);
|
|
|
//转换类型
|
|
|
BaseQuoteVo<AccidentalDrivingVo> baseQuoteVo = insOrdersService.convertDriving(quoteVo1);
|
|
|
- return yongchengOrderApiService.quoteApi(baseQuoteVo);
|
|
|
+ respVo = yongchengOrderApiService.quoteApi(baseQuoteVo);
|
|
|
}
|
|
|
- if("YAIC1000000".equals(ptlAgreementAttribution.getInsCompanyId())){
|
|
|
+ if("YAIC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
|
|
|
|
|
|
}
|
|
|
- if("ZKIC1000000".equals(ptlAgreementAttribution.getInsCompanyId())){
|
|
|
+ if("ZKIC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
|
|
|
BaseQuoteVo<List<ZjQuoteAccidentVo>> quoteVo1 = new BaseQuoteVo<>();
|
|
|
JSONArray jsonObject = JSONArray.parseArray(JSONArray.toJSONString(quoteVo.getAccidentalDrivingVo()));
|
|
|
List<ZjQuoteAccidentVo> javaObject = jsonObject.toJavaList(ZjQuoteAccidentVo.class);
|
|
|
BeanUtils.copyProperties(quoteVo, quoteVo1);
|
|
|
quoteVo1.setAccidentalDrivingVo(javaObject);
|
|
|
- return zijinOrderApiService.quote(quoteInfo, quoteVo1);
|
|
|
+ respVo = zijinOrderApiService.quote(quoteInfo, quoteVo1);
|
|
|
}
|
|
|
- if("XDCX1000000".equals(ptlAgreementAttribution.getInsCompanyId())){
|
|
|
+ if("XDCX1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
|
|
|
GuoRenQuoteVo<QuoteAccidentalDrivingVo> quoteVo1 = new GuoRenQuoteVo<>();
|
|
|
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
|
|
|
QuoteAccidentalDrivingVo javaObject = jsonObject.toJavaObject(QuoteAccidentalDrivingVo.class);
|
|
|
@@ -195,9 +197,9 @@ public class QuoteController extends BaseController {
|
|
|
GuoRenQuoteVo guoRenQuoteVo = new GuoRenQuoteVo();
|
|
|
BeanUtils.copyProperties(baseQuoteVo, guoRenQuoteVo);
|
|
|
guoRenQuoteVo.setGuoRenSpecialAgreementVo(baseQuoteVo.getGuoRenSpecialAgreementVo());
|
|
|
- return guorenOrderApiService.quoteApi(guoRenQuoteVo);
|
|
|
+ respVo = guorenOrderApiService.quoteApi(guoRenQuoteVo);
|
|
|
}
|
|
|
- if("HTIC1000000".equals(ptlAgreementAttribution.getInsCompanyId())){
|
|
|
+ if("HTIC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
|
|
|
|
|
|
BaseQuoteVo<AccidentalDrivingVo> quoteVo1 = new BaseQuoteVo<>();
|
|
|
AccidentalDrivingVo javaObject = new AccidentalDrivingVo();
|
|
|
@@ -207,12 +209,12 @@ public class QuoteController extends BaseController {
|
|
|
}
|
|
|
BeanUtils.copyProperties(quoteVo,quoteVo1);
|
|
|
quoteVo1.setAccidentalDrivingVo(javaObject);
|
|
|
- return huaTaiOrderApiService.quote(quoteInfo, quoteVo1);
|
|
|
+ respVo = huaTaiOrderApiService.quote(quoteInfo, quoteVo1);
|
|
|
}
|
|
|
- if("DJPC1000000".equals(ptlAgreementAttribution.getInsCompanyId())){
|
|
|
- return daJiaOrderService.quote(quoteInfo, quoteVo);
|
|
|
+ if("DJPC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
|
|
|
+ respVo = daJiaOrderService.quote(quoteInfo, quoteVo);
|
|
|
}
|
|
|
- if("BPIC1000000".equals(ptlAgreementAttribution.getInsCompanyId())){
|
|
|
+ if("BPIC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
|
|
|
BaseQuoteVo<List<BoHaiQuoteAccidentVo>> quoteVo1 = new BaseQuoteVo<>();
|
|
|
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
|
|
|
BeanUtils.copyProperties(quoteVo, quoteVo1);
|
|
|
@@ -228,9 +230,9 @@ public class QuoteController extends BaseController {
|
|
|
}else{
|
|
|
quoteVo1.setAccidentalDrivingVo(new ArrayList<>());
|
|
|
}
|
|
|
- return boHaiOrderApiService.quote(quoteInfo, quoteVo1);
|
|
|
+ respVo = boHaiOrderApiService.quote(quoteInfo, quoteVo1);
|
|
|
}
|
|
|
- if("PAIC1000000".equals(ptlAgreementAttribution.getInsCompanyId())){
|
|
|
+ if("PAIC1000000".equals(ptlAgreementAttribution.getInsCompanyId()) && Objects.isNull(respVo)){
|
|
|
// BaseQuoteVo<AccidentalDrivingVo> quoteVo1 = new BaseQuoteVo<>();
|
|
|
// JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(quoteVo.getAccidentalDrivingVo()));
|
|
|
// AccidentalDrivingVo javaObject = jsonObject.toJavaObject(AccidentalDrivingVo.class);
|
|
|
@@ -238,7 +240,8 @@ public class QuoteController extends BaseController {
|
|
|
// quoteVo1.setAccidentalDrivingVo(javaObject);
|
|
|
// return pingAnOrderApiService.quote(quoteInfo, quoteVo1);
|
|
|
}
|
|
|
-
|
|
|
- return null;
|
|
|
+ PtlAgreementAttribution byId = ptlAgreementAttributionService.getById(quoteVo.getAgreementId());
|
|
|
+ respVo.getData().setApiType(byId.getApiType());
|
|
|
+ return respVo;
|
|
|
}
|
|
|
}
|