eg1:
List<CarVo> carVoList = carService.getList(carVo);

List<String> listVins = carVoList.stream().map(CarVo::getVinNo).collect(Collectors.toList());

eg2:
List<WhVehicleModel> whVehicleModelList = ***;

Map<String, WhVehicleModel> whVehicleModelMap = whVehicleModelList.stream().
collect(Collectors.toConcurrentMap(i -> i.getPlateNum() + i.getVin() + i.getEin(),
Function.identity()));

List<DeptModel> deptModels = commonBaseService.queryAllRepairFromOrgain();
if (deptModels != null) {
Map<Integer, List<DeptModel>> deptModelMap = deptModels.stream().
collect(Collectors.groupingBy(DeptModel::getDeptAttribute));
}

相关文章:

  • 2022-12-23
  • 2022-01-11
  • 2022-01-09
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-22
  • 2021-09-03
  • 2022-12-23
  • 2021-12-01
  • 2022-01-07
相关资源
相似解决方案