diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java index 7aa61e4fc..816ba896a 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/amap/service/impl/AMapServiceImpl.java @@ -153,22 +153,18 @@ public class AMapServiceImpl implements AMapService { stopWatch.start("拼装高德需要的格式数据-查询数据"); // 根据站点id查询计费模板 - // List priceList = getPriceInfoByStationId(String.valueOf(stationInfoId)); CompletableFuture> future1 = CompletableFuture.supplyAsync(() -> getPriceInfoByStationId(String.valueOf(stationInfoId))); // 根据站点id查询快、慢充设备数量 - // Map pileNumMap = pileConnectorInfoService.getPileTypeNum(stationInfoId); CompletableFuture> future2 = CompletableFuture.supplyAsync(() -> pileConnectorInfoService.getPileTypeNum(stationInfoId)); // 根据站点查询站点下所有桩 - // List aMapEquipmentInfos = getPileListByStationId(String.valueOf(stationInfoId)); CompletableFuture> future3 = CompletableFuture.supplyAsync(() -> getPileListByStationId(String.valueOf(stationInfoId))); CompletableFuture all = CompletableFuture.allOf(future1, future2, future3); // .join()和.get()都会阻塞并获取线程的执行情况 // .join()会抛出未经检查的异常,不会强制开发者处理异常 .get()会抛出检查异常,需要开发者处理 all.join(); - // all.get(); aMapInfo.setPriceChargingInfo(future1.get()); Map pileNumMap = future2.get();