# 任务 - [x] 项目:周报。 - [x] 开发:自动化统计展示各类客户数据,CDN累计客户总数。 # 日志 ```java // 获取所有企业的ecId List ecIds = enterpriseInfos.stream().map(EnterpriseInfoDTO::getEcId).collect(Collectors.toList()); // 使用已有的线程池创建异步任务 CompletableFuture> ordersFuture = CompletableFuture.supplyAsync( () -> orderDao.findSpecializedOrders(ecIds), threadPoolExecutor); CompletableFuture> changeRecordFuture = CompletableFuture.supplyAsync( testOrderChangeRecordDao::findAllProjected, threadPoolExecutor); CompletableFuture> orderDetailsFuture = CompletableFuture.supplyAsync( bBossOrderDao::findOrderDetailsByOrderNum, threadPoolExecutor); CompletableFuture> preOrderNumFuture = CompletableFuture.supplyAsync( epProductInfoDao::findPreOrderNumByProductState, threadPoolExecutor); // 等待所有异步任务完成并获取结果 List allOrders; List allChangeRecord; List allOrderDetails; List preOrderNumByProductState; try { allOrders = ordersFuture.join(); allChangeRecord = changeRecordFuture.join(); allOrderDetails = orderDetailsFuture.join(); preOrderNumByProductState = preOrderNumFuture.join(); } catch (Exception e) { log.error("异步获取数据失败", e); throw new RuntimeException("获取数据失败", e); } ``` # 总结 写了新的需求开发。最近状态就好像回到了从石油离职的日子。 下班和田宝玩儿了飞盘。 公司开了关于需求拆分的会。