Files
ww-jst/wmsjst/JSMachine.WMS.RPC/PmsRPC/Dto/In/MachinePaperNeedDto.cs
T
2026-09-02 16:31:50 +08:00

74 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using JSMachine.WMS.RPC.PmsRPC.Enum;
using System.Diagnostics.CodeAnalysis;
namespace JSMachine.WMS.RPC.PmsRPC.Dto.In
{
/// <summary>
/// 机台备纸信息
/// </summary>
public class MachinePaperNeedDto
{
/// <summary>
/// 机台
/// </summary>
public PlateType PlateType { get; set; }
/// <summary>
/// 纸卷需求
/// </summary>
public List<PaperNeed> PaperNeeds { get; set; }
}
/// <summary>
/// 纸卷需求
/// </summary>
public class PaperNeed
{
/// <summary>
/// AcsId
/// </summary>
public Guid AcsId { get; set; }
/// <summary>
/// 材质
/// </summary>
public string PaperMassCode { get; set; }
/// <summary>
/// 幅宽
/// </summary>
public int Web { get; set; }
/// <summary>
/// 已分配次数
/// </summary>
public int DistributedCount { get; set; }
public string DisPlaySelected
{
get
{
return PaperMassCode + "*" + Web;
}
}
/// <summary>
/// 卷 (1:A卷 2:B卷)
/// </summary>
public int RollNum { get; set; }
}
/// <summary>
/// 值比较器(先看两个对象GetHashCode的值是否相等,是则继续执行Equals)
/// </summary>
public class PaperNeedEquality : IEqualityComparer<PaperNeed>
{
public bool Equals(PaperNeed? x, PaperNeed? y)
{
return x.PaperMassCode == y.PaperMassCode && x.Web == y.Web;
}
public int GetHashCode([DisallowNull] PaperNeed obj)
{
return obj.PaperMassCode.GetHashCode() + obj.Web.GetHashCode();
}
}
}