jianghaiqing 4 months ago
commit 05fecc14bf

@ -7,6 +7,12 @@ namespace DS.Module.Core
/// </summary>
public enum TaskBaseTypeEnum
{
/// <summary>
/// 未指定
/// </summary>
[Description("未指定")]
NOT_SPECIFIED = -1,
/// <summary>
/// 重要提醒
/// </summary>
@ -283,6 +289,16 @@ namespace DS.Module.Core
/// </summary>
[Description("待出产地证")]
WAIT_CHANDIZHENG = 310,
/// <summary>
/// 待拖车
/// </summary>
[Description("待拖车")]
WAIT_TUOCHE = 311,
/// <summary>
/// 待办保险
/// </summary>
[Description("待办保险")]
WAIT_Insurance = 312,
#endregion
}
}

@ -25,7 +25,8 @@ namespace DS.WMS.Core.Op.Dtos.TaskInteraction
/// 任务类型
/// </summary>
[IgnoreDataMember]
public TaskBaseTypeEnum TaskType => _taskType == default ? Enum.Parse<TaskBaseTypeEnum>(TaskTypeName) : _taskType;
public TaskBaseTypeEnum TaskType => _taskType == default ?
string.IsNullOrEmpty(TaskTypeName) ? TaskBaseTypeEnum.NOT_SPECIFIED : Enum.Parse<TaskBaseTypeEnum>(TaskTypeName) : _taskType;
/// <summary>
/// 任务类型名称

@ -93,6 +93,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
BusinessType = item.BusinessType,
TaskType = item.TaskType,
TaskStatus = TaskStatusEnum.Create,
RecvUsers = info.Main.RecvUserInfoList == null ? string.Empty : string.Join(",", info.Main.RecvUserInfoList.Select(x => x.RecvUserId)),
CreateBy = userId,
CreateTime = dt
};
@ -116,7 +117,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
var task = await GetQuery(request.BusinessId, request.BusinessType, request.TaskType).FirstAsync();
if (task != null)
{
var list = await GetSubRequestAsync(request.BusinessId, request.BusinessType, task.RecvUserIdArray);
var list = Array.FindAll(await GetSubRequestAsync(request.BusinessId, request.BusinessType, task.RecvUserIdArray), x => !string.IsNullOrEmpty(x.TaskTypeName));
await CreateSubTaskAsync(list);
}
}
@ -151,6 +152,10 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
dto.TaskTypeName = TaskBaseTypeEnum.WAIT_COA.ToString();
else if (svcName == "产地证")
dto.TaskTypeName = TaskBaseTypeEnum.WAIT_CHANDIZHENG.ToString();
else if (svcName == "拖车")
dto.TaskTypeName = TaskBaseTypeEnum.WAIT_TUOCHE.ToString();
else if (svcName == "保险")
dto.TaskTypeName = TaskBaseTypeEnum.WAIT_Insurance.ToString();
list[i] = dto;
}

@ -53,7 +53,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// <returns></returns>
internal static TaskBaseTypeEnum? GetNextType(BusinessTask current)
{
if (current.TaskType == TaskBaseTypeEnum.WAIT_CHECKOUT_BILL) //流程的最后一步
if (current.TaskType == TaskBaseTypeEnum.NOT_SPECIFIED || current.TaskType == TaskBaseTypeEnum.WAIT_CHECKOUT_BILL) //流程的最后一步
return null;
int currentTypeVal = (int)current.TaskType;

Loading…
Cancel
Save