2025-05-22 13:06:49 +08:00
|
|
|
|
namespace WcsMain.AppEntity.LED;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 需要展示在LED显示器上的内容
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class LEDData
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 展示的模式,用于区分各种样式
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public LEDShowModel? ShowModel { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 出入库模式
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string? TaskModel { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 载具号
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string? VehicleNo { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// plc任务号
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int? PlcId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 任务起点
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string? Origin { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 任务终点
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string? Destination { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static bool operator ==(LEDData? left, LEDData? right)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (left == default && right == default) { return true; };
|
|
|
|
|
|
if (left == default && right != default) { return false; };
|
|
|
|
|
|
if (left != default && right == default) { return false; };
|
|
|
|
|
|
return left!.Equals(right);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static bool operator !=(LEDData? left, LEDData? right)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (left == default && right == default) { return false; };
|
|
|
|
|
|
if (left == default && right != default) { return true; };
|
|
|
|
|
|
if (left != default && right == default) { return true; };
|
|
|
|
|
|
return !left!.Equals(right);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override bool Equals(object? obj)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (obj == default) { return false; }
|
|
|
|
|
|
if (obj is LEDData ledData)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (ShowModel == LEDShowModel.stackerTask)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (TaskModel == ledData.TaskModel
|
|
|
|
|
|
&& VehicleNo == ledData.VehicleNo
|
|
|
|
|
|
&& PlcId == ledData.PlcId
|
|
|
|
|
|
&& Origin == ledData.Origin
|
|
|
|
|
|
&& Destination == ledData.Destination)
|
|
|
|
|
|
{ return true; } // 上面这些值都相等旧返回 true
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
|
{
|
|
|
|
|
|
return GetType().GetHashCode();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public enum LEDShowModel
|
|
|
|
|
|
{
|
|
|
|
|
|
stackerTask = 1, // 显示堆垛机任务
|
2024-05-14 16:30:56 +08:00
|
|
|
|
}
|