|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
|
|
|
namespace DS.WMS.Core.Fee.Dtos
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 审批请求基类
|
|
|
/// </summary>
|
|
|
public class AuditRequestBase
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 审核结果:1=通过,2=驳回
|
|
|
/// </summary>
|
|
|
public int Result { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 审批备注
|
|
|
/// </summary>
|
|
|
public string? Remark { get; set; }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 按业务类型一致的审批请求
|
|
|
/// </summary>
|
|
|
public class AuditRequest : AuditRequestBase
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 审批的ID
|
|
|
/// </summary>
|
|
|
public long[] Ids { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 业务类型
|
|
|
/// </summary>
|
|
|
public BusinessType? BusinessType { get; set; }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 不同业务类型的审批请求
|
|
|
/// </summary>
|
|
|
public class BizAuditRequest : AuditRequestBase
|
|
|
{
|
|
|
public string? QueryCondition { get; set; }
|
|
|
|
|
|
public List<BizItem> Items { get; set; }
|
|
|
}
|
|
|
|
|
|
public class BizItem
|
|
|
{
|
|
|
public static readonly BizItemComparer DefaultComparer = new BizItemComparer();
|
|
|
|
|
|
/// <summary>
|
|
|
/// 业务ID
|
|
|
/// </summary>
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 业务类型
|
|
|
/// </summary>
|
|
|
public BusinessType BusinessType { get; set; }
|
|
|
|
|
|
|
|
|
public class BizItemComparer : IEqualityComparer<BizItem>
|
|
|
{
|
|
|
public bool Equals(BizItem? x, BizItem? y)
|
|
|
{
|
|
|
if (x == null || y == null)
|
|
|
return false;
|
|
|
|
|
|
return x.Id == y.Id && x.BusinessType == y.BusinessType;
|
|
|
}
|
|
|
|
|
|
public int GetHashCode([DisallowNull] BizItem obj)
|
|
|
{
|
|
|
return obj.Id.GetHashCode() ^ (int)obj.BusinessType;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public class BizOperation
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 请求值(object类型,根据业务按需传值)
|
|
|
/// </summary>
|
|
|
public object Value { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 业务ID与类型
|
|
|
/// </summary>
|
|
|
public List<BizItem> Items { get; set; }
|
|
|
}
|
|
|
|
|
|
public class AuditDetailRequest : BizItem
|
|
|
{
|
|
|
public string? QueryCondition { get; set; }
|
|
|
|
|
|
public bool AuditOnly { get; set; }
|
|
|
}
|
|
|
}
|