廖井涛
4 天以前 4955996ab044bc275ac78da3543b9d9f5ad7f8d9
north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
@@ -1171,7 +1171,6 @@
                materialInventoryMapper.insertMaterialOutbound(materialOutbound, oddNumber);
                log.setFunction("saveMaterialOutbound新增:"+oddNumber);
            }
            //获取对象集合循环进行新增修改
            if (!materialOutboundDetailList.isEmpty()) {
@@ -1230,10 +1229,6 @@
                        TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
                        return "false1";
                    }
                }
            }
@@ -1309,20 +1304,16 @@
    }
    public Object appGetStockList() {
        ExecutorService executor = Executors.newFixedThreadPool(2);
        AtomicReference<List<MaterialInventory>> materialInventoryList = new AtomicReference<>(new ArrayList<MaterialInventory>());
        executor.execute(() -> {
            materialInventoryList.set(materialInventoryMapper.selectGetStockList());
        });
        List<Object> list = new ArrayList<>();
        executor.shutdown();
        //ExecutorService executor = Executors.newFixedThreadPool(2);
        List<MaterialInventory> materialInventoryList = materialInventoryMapper.selectGetStockList();
        //executor.shutdown();
        Map<String, Object> totalSum  = new HashMap<>();
        Integer inventoryQuantity = 0;
        Integer availableQuantity = 0;
        Double totalArea = 0.00;
        for (MaterialInventory materialInventory : materialInventoryList.get()) {
        for (MaterialInventory materialInventory : materialInventoryList) {
            inventoryQuantity += materialInventory.getInventoryQuantity();
            availableQuantity += materialInventory.getAvailableQuantity();
            totalArea += materialInventory.getTotalArea();