diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs index 537724e4..42c97cb6 100644 --- a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs +++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs @@ -167,7 +167,8 @@ namespace DS.WMS.Core.TaskPlat.Method await tenantDb.Ado.BeginTranAsync(); - await tenantDb.Deleteable().Where(x => x.TaskId == taskId).ExecuteCommandAsync(); + var ids = await tenantDb.Queryable().Where(x => x.TaskId == taskId).Select(x => x.Id).ToListAsync(); + await tenantDb.Deleteable().Where(x => ids.Contains(x.Id)).ExecuteCommandAsync(); var allocationList = userInfos.Select(x => new TaskBaseAllocation {