diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
index 00fce92..20ce1df 100644
--- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
+++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -1455,16 +1455,21 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea
                 throw new JeecgBootException("完成整盘出库任务,更新容器失败");
             }
         } else if (taskType == QuantityConstant.TASK_TYPE_SORTINGSHIPMENT) {
-            success =
-                locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
-            if (!success) {
-                throw new JeecgBootException("完成分拣出库任务,更新源库位失败");
-            }
-            if (StringUtils.isNotEmpty(fromLocationCode) && !fromLocationCode.equals(toLocationCode)) {
+            if (!fromLocationCode.equals(toLocationCode)) {
+                success = locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY,
+                    warehouseCode);
+                if (!success) {
+                    throw new JeecgBootException("完成分拣出库任务,更新源库位失败");
+                }
                 success = locationService.updateContainerCodeAndStatus(toLocationCode, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
                 if (!success) {
                     throw new JeecgBootException("完成分拣出库任务,更新目标库位失败");
                 }
+            } else {
+                success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
+                if (!success) {
+                    throw new JeecgBootException("完成分拣出库任务,更新源库位失败");
+                }
             }
             success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY,
                 inventoryDetailList.size() == 0 ? QuantityConstant.STATUS_CONTAINER_FILL_EMPTY : QuantityConstant.STATUS_CONTAINER_FILL_SOME, warehouseCode);
@@ -1486,7 +1491,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea
                 throw new JeecgBootException("合并入库库存失败");
             }
         }
-        success = shipmentDetailService.updateBatchById(shipmentDetailList);
+        success = shipmentDetailService.updateBatchById(shipmentDetailList1);
         if (!success) {
             throw new JeecgBootException("完成出库任务,更新出库详情失败");
         }
@@ -2096,14 +2101,24 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea
                 throw new JeecgBootException("完成出库查看任务时,更新容器状态失败");
             }
         }
-        success =
-            locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
-        if (!success) {
-            throw new JeecgBootException("完成出库查看任务时,更新起始库位状态失败");
+
+        if (!fromLocationCode.equals(toLocationCode)) {
+            success =
+                locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
+            if (!success) {
+                throw new JeecgBootException("完成出库查看任务时,更新源库位失败");
+            }
+        } else {
+            success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
+            if (!success) {
+                throw new JeecgBootException("完成出库查看任务时,更新源库位失败");
+            }
         }
-        success = locationService.updateContainerCodeAndStatus(toLocationCode, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
-        if (!success) {
-            throw new JeecgBootException("完成出库查看任务时,更新目标库位状态失败");
+        if (StringUtils.isNotEmpty(fromLocationCode) && !fromLocationCode.equals(toLocationCode)) {
+            success = locationService.updateContainerCodeAndStatus(toLocationCode, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
+            if (!success) {
+                throw new JeecgBootException("完成出库查看任务时,更新目标库位失败");
+            }
         }
         taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED);
         success = taskHeaderService.updateStatusById(QuantityConstant.TASK_STATUS_COMPLETED, taskHeader.getId());