|
@@ -31,6 +31,7 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
import org.springframework.util.ObjectUtils;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -40,10 +41,7 @@ import java.io.IOException;
|
|
|
import java.nio.file.Files;
|
|
import java.nio.file.Files;
|
|
|
import java.nio.file.Path;
|
|
import java.nio.file.Path;
|
|
|
import java.nio.file.Paths;
|
|
import java.nio.file.Paths;
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
-import java.util.Objects;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
@Api(tags = "订单")
|
|
@Api(tags = "订单")
|
|
@@ -177,36 +175,37 @@ public class InsOrdersController extends BaseController {
|
|
|
.list();
|
|
.list();
|
|
|
|
|
|
|
|
List<String> insAreaCompanyIdList = insAreaCompanies.stream().map(InsAreaCompany::getId).collect(Collectors.toList());
|
|
List<String> insAreaCompanyIdList = insAreaCompanies.stream().map(InsAreaCompany::getId).collect(Collectors.toList());
|
|
|
-
|
|
|
|
|
- List<InsFeeOrderNew> list = insFeeOrderNewService.lambdaQuery().in(InsFeeOrderNew::getInsOrderNo, insAreaCompanyIdList).list();
|
|
|
|
|
- Map<String, InsFeeOrderNew> insFeeOrderNewMap = list.stream().collect(Collectors.toMap(InsFeeOrderNew::getInsOrderNo, x -> x));
|
|
|
|
|
-
|
|
|
|
|
- List<InsAreaCompanyHistoryVo> collect = insAreaCompanies.stream().map(a -> {
|
|
|
|
|
- InsAreaCompanyHistoryVo insAreaCompanyHistoryVo = new InsAreaCompanyHistoryVo();
|
|
|
|
|
- BeanUtils.copyProperties(a, insAreaCompanyHistoryVo);
|
|
|
|
|
- insAreaCompanyHistoryVo.setLicenseno(insOrders.getLicenseno());
|
|
|
|
|
- insAreaCompanyHistoryVo.setUserName(insOrders.getUsername());
|
|
|
|
|
- insAreaCompanyHistoryVo.setUserId(insOrders.getUserid());
|
|
|
|
|
- insAreaCompanyHistoryVo.setQuoteno(insOrders.getQuoteno());
|
|
|
|
|
- InsFeeOrderNew insFeeOrderNew = insFeeOrderNewMap.get(a.getId());
|
|
|
|
|
- if (!ObjectUtils.isEmpty(insFeeOrderNew)){
|
|
|
|
|
- SubOrderExportFeeVo subOrderExportFeeVo = costsCalcService.getExportFee(insFeeOrderNew);
|
|
|
|
|
- insAreaCompanyHistoryVo.setJqExportFee(subOrderExportFeeVo.getJqExportCosts());
|
|
|
|
|
- insAreaCompanyHistoryVo.setSyExportFee(subOrderExportFeeVo.getSyExportCosts());
|
|
|
|
|
- insAreaCompanyHistoryVo.setNoExportFee(subOrderExportFeeVo.getNoExportCosts());
|
|
|
|
|
- insAreaCompanyHistoryVo.setJqExportRadio(subOrderExportFeeVo.getJqExportRadio());
|
|
|
|
|
- insAreaCompanyHistoryVo.setSyExportRadio(subOrderExportFeeVo.getSyExportRadio());
|
|
|
|
|
- insAreaCompanyHistoryVo.setNoExportRadio(subOrderExportFeeVo.getNoExportRadio());
|
|
|
|
|
- insAreaCompanyHistoryVo.setSumExportFee(subOrderExportFeeVo.getJqExportCosts()
|
|
|
|
|
- .add(subOrderExportFeeVo.getSyExportCosts())
|
|
|
|
|
- .add(subOrderExportFeeVo.getNoExportCosts()));
|
|
|
|
|
- }
|
|
|
|
|
- // 设置评分信息
|
|
|
|
|
- insAreaCompanyHistoryVo.setRatingInformation();
|
|
|
|
|
- return insAreaCompanyHistoryVo;
|
|
|
|
|
- }).collect(Collectors.toList());
|
|
|
|
|
-
|
|
|
|
|
- return HttpResult.ok("success", collect);
|
|
|
|
|
|
|
+ if (!insAreaCompanyIdList.isEmpty()) {
|
|
|
|
|
+ List<InsFeeOrderNew> list = insFeeOrderNewService.lambdaQuery().in(InsFeeOrderNew::getInsOrderNo, insAreaCompanyIdList).list();
|
|
|
|
|
+ Map<String, InsFeeOrderNew> insFeeOrderNewMap = list.stream().collect(Collectors.toMap(InsFeeOrderNew::getInsOrderNo, x -> x));
|
|
|
|
|
+ List<InsAreaCompanyHistoryVo> collect = insAreaCompanies.stream().map(a -> {
|
|
|
|
|
+ InsAreaCompanyHistoryVo insAreaCompanyHistoryVo = new InsAreaCompanyHistoryVo();
|
|
|
|
|
+ BeanUtils.copyProperties(a, insAreaCompanyHistoryVo);
|
|
|
|
|
+ insAreaCompanyHistoryVo.setLicenseno(insOrders.getLicenseno());
|
|
|
|
|
+ insAreaCompanyHistoryVo.setUserName(insOrders.getUsername());
|
|
|
|
|
+ insAreaCompanyHistoryVo.setUserId(insOrders.getUserid());
|
|
|
|
|
+ insAreaCompanyHistoryVo.setQuoteno(insOrders.getQuoteno());
|
|
|
|
|
+ InsFeeOrderNew insFeeOrderNew = insFeeOrderNewMap.get(a.getId());
|
|
|
|
|
+ if (!ObjectUtils.isEmpty(insFeeOrderNew)) {
|
|
|
|
|
+ SubOrderExportFeeVo subOrderExportFeeVo = costsCalcService.getExportFee(insFeeOrderNew);
|
|
|
|
|
+ insAreaCompanyHistoryVo.setJqExportFee(subOrderExportFeeVo.getJqExportCosts());
|
|
|
|
|
+ insAreaCompanyHistoryVo.setSyExportFee(subOrderExportFeeVo.getSyExportCosts());
|
|
|
|
|
+ insAreaCompanyHistoryVo.setNoExportFee(subOrderExportFeeVo.getNoExportCosts());
|
|
|
|
|
+ insAreaCompanyHistoryVo.setJqExportRadio(subOrderExportFeeVo.getJqExportRadio());
|
|
|
|
|
+ insAreaCompanyHistoryVo.setSyExportRadio(subOrderExportFeeVo.getSyExportRadio());
|
|
|
|
|
+ insAreaCompanyHistoryVo.setNoExportRadio(subOrderExportFeeVo.getNoExportRadio());
|
|
|
|
|
+ insAreaCompanyHistoryVo.setSumExportFee(subOrderExportFeeVo.getJqExportCosts()
|
|
|
|
|
+ .add(subOrderExportFeeVo.getSyExportCosts())
|
|
|
|
|
+ .add(subOrderExportFeeVo.getNoExportCosts()));
|
|
|
|
|
+ }
|
|
|
|
|
+ // 设置评分信息
|
|
|
|
|
+ insAreaCompanyHistoryVo.setRatingInformation();
|
|
|
|
|
+ return insAreaCompanyHistoryVo;
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
|
+
|
|
|
|
|
+ return HttpResult.ok("success", collect);
|
|
|
|
|
+ }
|
|
|
|
|
+ return HttpResult.ok("", Collections.emptyList());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/getByCompanyId")
|
|
@PostMapping("/getByCompanyId")
|
|
@@ -521,15 +520,15 @@ public class InsOrdersController extends BaseController {
|
|
|
|
|
|
|
|
@PostMapping("/queryLicenseInOrder")
|
|
@PostMapping("/queryLicenseInOrder")
|
|
|
@ApiOperation(value = "查询订单中的车牌")
|
|
@ApiOperation(value = "查询订单中的车牌")
|
|
|
- public HttpResult<List<String>> queryLicenseInOrder(@RequestBody QueryLicenseInOrderVo queryLicenseInOrderVo){
|
|
|
|
|
- List<String> licenseList = insOrdersService.queryLicenseInOrder(queryLicenseInOrderVo);
|
|
|
|
|
|
|
+ public HttpResult<List<String>> queryLicenseInOrder(@RequestBody QueryLicenseInOrderVo queryLicenseInOrderVo) {
|
|
|
|
|
+ List<String> licenseList = insOrdersService.queryLicenseInOrder(queryLicenseInOrderVo);
|
|
|
return HttpResult.ok(licenseList);
|
|
return HttpResult.ok(licenseList);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/queryInsuredInOrder")
|
|
@PostMapping("/queryInsuredInOrder")
|
|
|
@ApiOperation(value = "查询订单中的被保人")
|
|
@ApiOperation(value = "查询订单中的被保人")
|
|
|
- public HttpResult<List<String>> queryInsuredInOrder(@RequestBody QueryLicenseInOrderVo queryInsuredInOrderVo){
|
|
|
|
|
- List<String> insured = insOrdersService.queryInsuredInOrder(queryInsuredInOrderVo);
|
|
|
|
|
|
|
+ public HttpResult<List<String>> queryInsuredInOrder(@RequestBody QueryLicenseInOrderVo queryInsuredInOrderVo) {
|
|
|
|
|
+ List<String> insured = insOrdersService.queryInsuredInOrder(queryInsuredInOrderVo);
|
|
|
return HttpResult.ok(insured);
|
|
return HttpResult.ok(insured);
|
|
|
}
|
|
}
|
|
|
|
|
|