liyong
6 天以前 714ec3cc8e9c0ab12660c1371e832b7dc5532964
src/main/java/com/ruoyi/projectManagement/service/impl/InfoServiceImpl.java
@@ -56,7 +56,7 @@
            contractInfoHandleService.save(infoId, saveInfoVo.getContractInfo());
        }
        if(saveInfoVo.getSalesLedgerProductList() != null){
            salesLedgerService.handleSalesLedgerProducts(infoId, saveInfoVo.getSalesLedgerProductList(), SaleEnum.MANAGEMENT);
            salesLedgerService.handleSalesLedgerProducts(infoId, saveInfoVo.getSalesLedgerProductList(), SaleEnum.MANAGEMENT,"");
        }
    }
@@ -103,15 +103,15 @@
        CompletableFuture<SaveInfoDto> infoFuture = CompletableFuture.supplyAsync(() -> infoHandleService.getInfoById(id));
        CompletableFuture<ContractInfoDto> contractFuture = CompletableFuture.supplyAsync(() -> contractInfoHandleService.getByInfoId(id));
        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));
        // 商品
        // 等待所有异步完成
        CompletableFuture.allOf(infoFuture, contractFuture, shippingFuture).join();
        CompletableFuture.allOf(infoFuture, contractFuture, shippingFuture,listCompletableFuture,subordinateInfoListFuture).join();
        SaveInfoDto info = infoFuture.get();
        ContractInfoDto contract = contractFuture.get();