|
@@ -764,15 +764,24 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
ordersCosts = new InsOrdersCosts();
|
|
ordersCosts = new InsOrdersCosts();
|
|
|
ordersCosts.setOrderNo(ordersNo);
|
|
ordersCosts.setOrderNo(ordersNo);
|
|
|
}
|
|
}
|
|
|
- BigDecimal ciPremium = quoteResponse.getCosts().getCiPremium() == null ? new BigDecimal("0.00") : new BigDecimal(quoteResponse.getCosts().getCiPremium());
|
|
|
|
|
- BigDecimal biPremium = quoteResponse.getCosts().getBiPremium() == null ? new BigDecimal("0.00") : new BigDecimal(quoteResponse.getCosts().getBiPremium());
|
|
|
|
|
- BigDecimal niPremium = quoteResponse.getCosts().getNiPremium() == null ? new BigDecimal("0.00") : new BigDecimal(quoteResponse.getCosts().getNiPremium());
|
|
|
|
|
- BigDecimal vvTax = new BigDecimal(quoteResponse.getCosts().getVvTax());
|
|
|
|
|
- ordersCosts.setJqPremium(ciPremium);
|
|
|
|
|
- ordersCosts.setSyPremium(biPremium);
|
|
|
|
|
- ordersCosts.setJyPremium(niPremium);
|
|
|
|
|
- ordersCosts.setTaxPremium(vvTax);
|
|
|
|
|
- ordersCosts.setSumPremium(ciPremium.add(biPremium).add(niPremium).add(vvTax));
|
|
|
|
|
|
|
+ if (BeanUtil.isNotEmpty(quoteResponse) && BeanUtil.isNotEmpty(quoteResponse.getCosts())){
|
|
|
|
|
+ BigDecimal ciPremium = quoteResponse.getCosts().getCiPremium() == null ? new BigDecimal("0.00") : new BigDecimal(quoteResponse.getCosts().getCiPremium());
|
|
|
|
|
+ BigDecimal biPremium = quoteResponse.getCosts().getBiPremium() == null ? new BigDecimal("0.00") : new BigDecimal(quoteResponse.getCosts().getBiPremium());
|
|
|
|
|
+ BigDecimal niPremium = quoteResponse.getCosts().getNiPremium() == null ? new BigDecimal("0.00") : new BigDecimal(quoteResponse.getCosts().getNiPremium());
|
|
|
|
|
+ BigDecimal vvTax = new BigDecimal(quoteResponse.getCosts().getVvTax());
|
|
|
|
|
+ ordersCosts.setJqPremium(ciPremium);
|
|
|
|
|
+ ordersCosts.setSyPremium(biPremium);
|
|
|
|
|
+ ordersCosts.setJyPremium(niPremium);
|
|
|
|
|
+ ordersCosts.setTaxPremium(vvTax);
|
|
|
|
|
+ ordersCosts.setSumPremium(ciPremium.add(biPremium).add(niPremium).add(vvTax));
|
|
|
|
|
+ }else{
|
|
|
|
|
+ BigDecimal bigDecimal = new BigDecimal("0.00");
|
|
|
|
|
+ ordersCosts.setJqPremium(bigDecimal);
|
|
|
|
|
+ ordersCosts.setSyPremium(bigDecimal);
|
|
|
|
|
+ ordersCosts.setJyPremium(bigDecimal);
|
|
|
|
|
+ ordersCosts.setTaxPremium(bigDecimal);
|
|
|
|
|
+ ordersCosts.setSumPremium(bigDecimal);
|
|
|
|
|
+ }
|
|
|
insOrdersCostsService.saveOrUpdate(ordersCosts);
|
|
insOrdersCostsService.saveOrUpdate(ordersCosts);
|
|
|
|
|
|
|
|
//更新评分
|
|
//更新评分
|