diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java
index 49d732c..9a2e0e3 100644
--- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java
+++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java
@@ -482,10 +482,11 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe
             if (!success) {
                 throw new JeecgBootException("调整库存,托盘:" + containerCode + "调整库存失败");
             }
+            if (!taskHeaderService.combineInventoryDetail(containerCode, warehouseCode)) {
+                throw new JeecgBootException("调整库存,合并数量托盘:" + containerCode + "调整库存失败");
+            }
         }
-        if (!taskHeaderService.combineInventoryDetail(containerCode, warehouseCode)) {
-            throw new JeecgBootException("调整库存,合并数量托盘:" + containerCode + "调整库存失败");
-        }
+
         return Result.OK("调整库存,托盘:" + containerCode + "调整库存成功");
     }
 }