|
|
@@ -529,17 +529,18 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
insOrdersCostsService.saveOrUpdate(ordersCosts);
|
|
|
|
|
|
//更新评分
|
|
|
- InsOrdersOther ordersOther = insOrdersOtherService.getOne(new LambdaQueryWrapper<InsOrdersOther>().eq(InsOrdersOther::getOrderNo, ordersNo));
|
|
|
- if (Objects.isNull(ordersOther)) {
|
|
|
+ InsOrdersOther ordersOther = insOrdersOtherService.getOne(new LambdaQueryWrapper<InsOrdersOther>()
|
|
|
+ .eq(InsOrdersOther::getOrderNo, ordersNo));
|
|
|
+ if (Objects.nonNull(ordersOther)) {
|
|
|
ordersOther = new InsOrdersOther();
|
|
|
ordersOther.setOrderNo(ordersNo);
|
|
|
ordersOther.setScore(quoteResponse.getScoreVo().getScore());
|
|
|
ordersOther.setJqScore(quoteResponse.getScoreVo().getJqScore());
|
|
|
ordersOther.setSyScore(quoteResponse.getScoreVo().getSyScore());
|
|
|
ordersOther.setLossRation(new BigDecimal(quoteResponse.getScoreVo().getLossRation()));
|
|
|
- ordersOther.setJqLossRation(new BigDecimal(quoteResponse.getScoreVo().getJqLossRation()));
|
|
|
- ordersOther.setSyLossRation(new BigDecimal(quoteResponse.getScoreVo().getSyLossRation()));
|
|
|
- ordersOther.setTpColorScore(quoteResponse.getScoreVo().getTpColorScore());
|
|
|
+ ordersOther.setJqLossRation(new BigDecimal(quoteResponse.getScoreVo().getJqLossRation() != null ? quoteResponse.getScoreVo().getJqLossRation() : "0"));
|
|
|
+ ordersOther.setSyLossRation(new BigDecimal(quoteResponse.getScoreVo().getSyLossRation() != null ? quoteResponse.getScoreVo().getSyLossRation() : "0"));
|
|
|
+ ordersOther.setTpColorScore(quoteResponse.getScoreVo().getTpColorScore() != null ? quoteResponse.getScoreVo().getTpColorScore() : "");
|
|
|
}
|
|
|
insOrdersOtherService.saveOrUpdate(ordersOther);
|
|
|
|
|
|
@@ -775,7 +776,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
List<InsOrders> insOrders = insOrdersMapper.selectList(new LambdaQueryWrapper<InsOrders>()
|
|
|
.select(InsOrders::getCompanyId)
|
|
|
.groupBy(InsOrders::getCompanyId));
|
|
|
- List<String> companyIds = insOrders.stream().map(x -> x.getCompanyId()).collect(Collectors.toList());
|
|
|
+ List<String> companyIds = insOrders.stream().map(InsOrders::getCompanyId).collect(Collectors.toList());
|
|
|
String joined = String.join(",", companyIds);
|
|
|
HttpResult<List<EsmInsCompany>> companyByIds = platformClient.getCompanyByIds(joined,baseController.getToken());
|
|
|
return companyByIds.getData();
|