任务删除

dev
嵇文龙 4 weeks ago
parent 0917785bb9
commit 0f76b0b86a

@ -1372,7 +1372,13 @@ namespace DS.WMS.Core.TaskInteraction.Method
.WhereIF(typeNames != null && typeNames.Length > 0, x => typeNames.Contains(x.TASK_TYPE))
.ExecuteCommandAsync();
rows += await TenantDb.Deleteable<BusinessTask>().Where(x => x.BusinessId == id)
rows += await TenantDb.Deleteable<TaskStep>().Where(x => SqlFunc.Subqueryable<BusinessTask>()
.Where(y => x.TaskId == y.BusinessId || x.TaskId == y.ParentBusinessId)
.WhereIF(businessType.HasValue, y => y.BusinessType == businessType)
.WhereIF(typeNames != null && typeNames.Length > 0, y => taskTypes.Contains(y.TaskType))
.Any()).ExecuteCommandAsync();
rows += await TenantDb.Deleteable<BusinessTask>().Where(x => x.BusinessId == id || x.ParentBusinessId == id)
.WhereIF(businessType.HasValue, x => x.BusinessType == businessType)
.WhereIF(typeNames != null && typeNames.Length > 0, x => taskTypes.Contains(x.TaskType))
.ExecuteCommandAsync();

Loading…
Cancel
Save