|
|
@@ -169,12 +169,21 @@ public class YongChengApiRequestImpl implements YongChengApiRequest {
|
|
|
|
|
|
//build参数
|
|
|
List<String> requestInfoList = new ArrayList<>();
|
|
|
-
|
|
|
+ BigDecimal finalNegotiatedPrice = negotiatedPrice;
|
|
|
+ quoteVo.getKindInfoVo().stream()
|
|
|
+ .filter(Objects::nonNull) // 防止集合内元素为null
|
|
|
+ .forEach(item -> {
|
|
|
+ if ("A".equals(item.getPlatformKindCode())) {
|
|
|
+ String priceStr = finalNegotiatedPrice.toString();
|
|
|
+ item.setAmount(priceStr);
|
|
|
+ item.setUnitAmount(priceStr);
|
|
|
+ }
|
|
|
+ });
|
|
|
QuoteRequest quoteRequest = this.builderParams(configurationProperties, quoteVo, vehicleInfo, negotiatedPrice.toString());
|
|
|
QuoteResponse quoteResponse = this.getResponse(quoteRequest,quoteVo, requestInfoList,url);
|
|
|
|
|
|
QuoteResultsVo quoteResultsVo = buildQuoteRespVo(order.getOrdersNo(), quoteResponse, quoteVo);
|
|
|
-
|
|
|
+ quoteResultsVo.setCarActualValue(depreciationPrice);
|
|
|
return quoteResultsVo;
|
|
|
}
|
|
|
|
|
|
@@ -483,11 +492,9 @@ public class YongChengApiRequestImpl implements YongChengApiRequest {
|
|
|
// 保险公司订单号
|
|
|
quoteRespVo.setCompanyOrderNo(rd.getBase().getCresvTxt6());
|
|
|
|
|
|
- List<KindInfoVo> kindList = buildQuoteKindList(rd);
|
|
|
-
|
|
|
- quoteRespVo.setKindInfoVo(kindList);
|
|
|
+// List<KindInfoVo> kindList = buildQuoteKindList(rd);
|
|
|
|
|
|
- buildQuoteKindList(rd,quoteVo.getKindInfoVo());
|
|
|
+ quoteRespVo.setKindInfoVo(buildQuoteKindList(rd,quoteVo.getKindInfoVo()));
|
|
|
|
|
|
//车船税
|
|
|
double sumTax = 0;
|
|
|
@@ -497,6 +504,8 @@ public class YongChengApiRequestImpl implements YongChengApiRequest {
|
|
|
//意外险
|
|
|
if (null != rd.getProposal()) {
|
|
|
jyPremium = Double.parseDouble(rd.getProposal().getPremium());
|
|
|
+ quoteVo.getAccidentalDrivings().get(0).setPremium(String.valueOf(jyPremium));
|
|
|
+// quoteRespVo.set
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -691,15 +700,17 @@ public class YongChengApiRequestImpl implements YongChengApiRequest {
|
|
|
if (null == rd.getCvrgListSY() || null == rd.getCvrgListSY().getCvrgSY()) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
-
|
|
|
List<KindInfoVo> kindList = new ArrayList<>();
|
|
|
|
|
|
-// rd.getCvrgListSY().getCvrgSY().forEach(a -> {
|
|
|
-//
|
|
|
-// String kindcode = a.getCCvrgNo();
|
|
|
+ rd.getCvrgListSY().getCvrgSY().forEach(a -> {
|
|
|
+
|
|
|
+ String kindcode = a.getCCvrgNo();
|
|
|
+ KindInfoVo kindInfoVo = new KindInfoVo();
|
|
|
+ kindInfoVo.setKindCode(kindcode);
|
|
|
+ kindInfoVo.setAmount(a.getNPrm());
|
|
|
// int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.getYongchengConnectInsuranceType(), kindcode);
|
|
|
-//// InsurKind insurKind = Enum.valueOf(InsurKind.class, InsuranceTypeCorrespondence.getJinZhangGuiType()[i]);
|
|
|
-//
|
|
|
+// InsurKind insurKind = Enum.valueOf(InsurKind.class, InsuranceTypeCorrespondence.getJinZhangGuiType()[i]);
|
|
|
+
|
|
|
// double premium = Double.parseDouble(a.getNPrm());
|
|
|
// double amount = Double.parseDouble(a.getNPerAmt());
|
|
|
// QuoteKindRespVo kind;
|
|
|
@@ -724,10 +735,10 @@ public class YongChengApiRequestImpl implements YongChengApiRequest {
|
|
|
// if (ArrayUtil.indexOf(InsuranceTypeCorrespondence.getSpecialContractClause(), insurKind.getCode()) >= 0) {
|
|
|
// kind.setServiceTimes(a.getNLiabDaysLmt());
|
|
|
// }
|
|
|
-//
|
|
|
-// kindList.add(kind);
|
|
|
-//
|
|
|
-// });
|
|
|
+
|
|
|
+ kindList.add(kindInfoVo);
|
|
|
+
|
|
|
+ });
|
|
|
|
|
|
return kindList;
|
|
|
}
|