mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-14 06:50:09 +08:00
update
This commit is contained in:
@@ -153,22 +153,18 @@ public class AMapServiceImpl implements AMapService {
|
|||||||
|
|
||||||
stopWatch.start("拼装高德需要的格式数据-查询数据");
|
stopWatch.start("拼装高德需要的格式数据-查询数据");
|
||||||
// 根据站点id查询计费模板
|
// 根据站点id查询计费模板
|
||||||
// List<AMapPriceChargingInfo> priceList = getPriceInfoByStationId(String.valueOf(stationInfoId));
|
|
||||||
CompletableFuture<List<AMapPriceChargingInfo>> future1 = CompletableFuture.supplyAsync(() -> getPriceInfoByStationId(String.valueOf(stationInfoId)));
|
CompletableFuture<List<AMapPriceChargingInfo>> future1 = CompletableFuture.supplyAsync(() -> getPriceInfoByStationId(String.valueOf(stationInfoId)));
|
||||||
|
|
||||||
// 根据站点id查询快、慢充设备数量
|
// 根据站点id查询快、慢充设备数量
|
||||||
// Map<String, Integer> pileNumMap = pileConnectorInfoService.getPileTypeNum(stationInfoId);
|
|
||||||
CompletableFuture<Map<String, Integer>> future2 = CompletableFuture.supplyAsync(() -> pileConnectorInfoService.getPileTypeNum(stationInfoId));
|
CompletableFuture<Map<String, Integer>> future2 = CompletableFuture.supplyAsync(() -> pileConnectorInfoService.getPileTypeNum(stationInfoId));
|
||||||
|
|
||||||
// 根据站点查询站点下所有桩
|
// 根据站点查询站点下所有桩
|
||||||
// List<AMapEquipmentInfo> aMapEquipmentInfos = getPileListByStationId(String.valueOf(stationInfoId));
|
|
||||||
CompletableFuture<List<AMapEquipmentInfo>> future3 = CompletableFuture.supplyAsync(() -> getPileListByStationId(String.valueOf(stationInfoId)));
|
CompletableFuture<List<AMapEquipmentInfo>> future3 = CompletableFuture.supplyAsync(() -> getPileListByStationId(String.valueOf(stationInfoId)));
|
||||||
|
|
||||||
CompletableFuture<Void> all = CompletableFuture.allOf(future1, future2, future3);
|
CompletableFuture<Void> all = CompletableFuture.allOf(future1, future2, future3);
|
||||||
// .join()和.get()都会阻塞并获取线程的执行情况
|
// .join()和.get()都会阻塞并获取线程的执行情况
|
||||||
// .join()会抛出未经检查的异常,不会强制开发者处理异常 .get()会抛出检查异常,需要开发者处理
|
// .join()会抛出未经检查的异常,不会强制开发者处理异常 .get()会抛出检查异常,需要开发者处理
|
||||||
all.join();
|
all.join();
|
||||||
// all.get();
|
|
||||||
|
|
||||||
aMapInfo.setPriceChargingInfo(future1.get());
|
aMapInfo.setPriceChargingInfo(future1.get());
|
||||||
Map<String, Integer> pileNumMap = future2.get();
|
Map<String, Integer> pileNumMap = future2.get();
|
||||||
|
|||||||
Reference in New Issue
Block a user