| | |
| | | CompletableFuture<ShippingAddressDto> shippingFuture = CompletableFuture.supplyAsync(() -> shippingAddressHandleService.getByInfoId(id)); |
| | | CompletableFuture<List<SalesLedgerProduct>> listCompletableFuture = CompletableFuture.supplyAsync(() -> salesLedgerService.getSalesLedgerProductListByRelateId(id,SaleEnum.MANAGEMENT)); |
| | | |
| | | // 下级项目信息 |
| | | CompletableFuture<List<SaveInfoDto>> subordinateInfoListFuture = CompletableFuture.supplyAsync(() -> infoHandleService.getSubordinateInfo(id)); |
| | | |
| | | // 商品 |
| | | |
| | | // 等待所有异步完成 |
| | |
| | | ContractInfoDto contract = contractFuture.get(); |
| | | ShippingAddressDto shippingAddress = shippingFuture.get(); |
| | | List<SalesLedgerProduct> salesLedgerProductList = listCompletableFuture.get(); |
| | | |
| | | List<SaveInfoDto> saveInfoDtos = subordinateInfoListFuture.get(); |
| | | InfoVo vo = new InfoVo(); |
| | | vo.setInfo(info); |
| | | vo.setContractInfo(contract); |
| | | vo.setShippingAddress(shippingAddress); |
| | | vo.setSalesLedgerProductList(salesLedgerProductList); |
| | | |
| | | vo.setSubordinateInfoList(saveInfoDtos); |
| | | return vo; |
| | | } |
| | | |