|
|
|
@ -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();
|
|
|
|
|