jianghaiqing 4 months ago
commit 05fecc14bf

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

@ -25,7 +25,8 @@ namespace DS.WMS.Core.Op.Dtos.TaskInteraction
/// 任务类型 /// 任务类型
/// </summary> /// </summary>
[IgnoreDataMember] [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> /// <summary>
/// 任务类型名称 /// 任务类型名称

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

@ -53,7 +53,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// <returns></returns> /// <returns></returns>
internal static TaskBaseTypeEnum? GetNextType(BusinessTask current) 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; return null;
int currentTypeVal = (int)current.TaskType; int currentTypeVal = (int)current.TaskType;

Loading…
Cancel
Save