创建任务时如果接收人为空,则公共任务

usertest
zhangxiaofeng 3 months ago
parent 12412d4021
commit 55d80e23de

@ -223,8 +223,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
info.Main.RecvUserInfoList = await FillInUserInfoAsync(request.RecvUserIdList); info.Main.RecvUserInfoList = await FillInUserInfoAsync(request.RecvUserIdList);
} }
if (info.Main.RecvUserInfoList == null || info.Main.RecvUserInfoList.Count == 0) //if (info.Main.RecvUserInfoList == null || info.Main.RecvUserInfoList.Count == 0)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TaskReceiverNotFound)); // return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TaskReceiverNotFound));
//仅为业务订单任务自动填充任务标题/描述 //仅为业务订单任务自动填充任务标题/描述
if (info.Main.TaskTitle.IsNullOrEmpty() && IsOrderType(request.TaskType)) if (info.Main.TaskTitle.IsNullOrEmpty() && IsOrderType(request.TaskType))
@ -867,6 +867,9 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// <returns></returns> /// <returns></returns>
protected internal ISugarQueryable<BusinessTask> GetQuery(long id, BusinessType? businessType, params TaskBaseTypeEnum[] taskTypes) protected internal ISugarQueryable<BusinessTask> GetQuery(long id, BusinessType? businessType, params TaskBaseTypeEnum[] taskTypes)
{ {
var a = TenantDb.Queryable<BusinessTask>().Where(x => x.BusinessId == id)
.WhereIF(businessType.HasValue, x => x.BusinessType == businessType)
.WhereIF(taskTypes != null && taskTypes.Length > 0, x => taskTypes.Contains(x.TaskType)).ToSqlString();
return TenantDb.Queryable<BusinessTask>().Where(x => x.BusinessId == id) return TenantDb.Queryable<BusinessTask>().Where(x => x.BusinessId == id)
.WhereIF(businessType.HasValue, x => x.BusinessType == businessType) .WhereIF(businessType.HasValue, x => x.BusinessType == businessType)
.WhereIF(taskTypes != null && taskTypes.Length > 0, x => taskTypes.Contains(x.TaskType)); .WhereIF(taskTypes != null && taskTypes.Length > 0, x => taskTypes.Contains(x.TaskType));

Loading…
Cancel
Save