using System.Runtime.Serialization;
using DS.Module.Core;
using DS.WMS.Core.Op.Entity;
using Masuit.Tools.Systems;
using SqlSugar;
namespace DS.WMS.Core.TaskInteraction.Dtos
{
///
/// 任务组
///
public class TaskGroup
{
///
/// 主业务ID
///
public long BusinessId { get; set; }
///
/// 主业务类型
///
public BusinessType BusinessType { get; set; }
///
/// 任务列表
///
public List? Tasks { get; set; }
}
///
/// 任务信息
///
public class BLTask
{
///
/// 任务ID
///
public long Id { get; set; }
///
/// 上级任务ID
///
public long? ParentId { get; set; }
///
/// 业务ID
///
public long BusinessId { get; set; }
///
/// 业务类型
///
public BusinessType? BusinessType { get; set; }
///
/// 上级业务ID
///
public long? ParentBusinessId { get; set; }
///
/// 任务类型
///
public TaskBaseTypeEnum TaskType { get; set; }
///
/// 任务类型名称
///
public string TaskTypeName => TaskType.ToString();
///
/// 任务类型描述
///
public string TaskTypeDesc => TaskType.GetDescription();
///
/// 任务状态
///
public TaskStatusEnum TaskStatus { get; set; }
///
/// 任务状态名称
///
public string TaskStatusName => TaskStatus.GetDescription();
///
/// 接收人
///
[IgnoreDataMember]
public string? RecvUsers { get; set; }
///
/// 接收人ID列表
///
[IgnoreDataMember]
public long[] RecvUserIds => string.IsNullOrEmpty(RecvUsers) ? [] :
RecvUsers.Split(',', StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray();
///
/// 接收人用户列表
///
[SugarColumn(IsIgnore = true)]
public string[]? RecvUserList { get; set; }
///
/// 提单号
///
public string? BLNumber { get; set; }
///
/// 是否为主单
///
public bool IsMainBL { get; set; }
///
/// 任务步骤
///
public List Steps { get; set; } = [];
}
}