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