Board1VM.cs 8.93 KB
namespace DataAcquisition.ViewModels.Board
{
    /// <summary>
    /// 看板1
    /// </summary>
    public class Board1VM
    {
        #region Head

        /// <summary>
        /// 当日汇总
        /// </summary>
        public NowDayCountLeft NowDayCountLeft { get; set; } = null!;

        /// <summary>
        /// 设备状态
        /// </summary>
        public EquipmentStatusVM EqCenter { get; set; } = null!;

        /// <summary>
        /// 当月汇总
        /// </summary>
        public MonthCountRight MonthCountRight { get; set; } = null!;

        #endregion

        #region Center

        /// <summary>
        /// 设备实况
        /// </summary>
        public EquipmentInfoLeftVM EqInfoLeft { get; set; } = null!;

        /// <summary>
        /// 工件实况
        /// </summary>
        public EquipmentInfoRight EqInfoRight { get; set; } = null!;

        #endregion

        #region Footer

        /// <summary>
        /// 当前电流
        /// </summary>
        public List<double> CurrentList { get; set; } = new List<double>();

        /// <summary>
        /// 效率统计
        /// </summary>
        public EquipmentEfficiency EqEfficiencyCenter { get; set; } = null!;

        /// <summary>
        /// 当前电压
        /// </summary>
        public List<double> VoltagetList { get; set; } = new List<double>();

        #endregion
    }

    public class NowDayCountLeft
    {
        /// <summary>
        /// 开机时长(H)
        /// </summary>
        public double PowerTime { get; set; }

        /// <summary>
        /// 工作时长(H)
        /// </summary>
        public double WorkTime { get; set; }

        /// <summary>
        /// 燃弧时长(H)
        /// </summary>
        public double ArcingTime { get; set; }

        /// <summary>
        /// 已完工(件)
        /// </summary>
        public int FinishCount { get; set; }
    }

    /// <summary>
    /// 设备状态
    /// </summary>
    public class EquipmentStatusVM
    {
        /// <summary>
        /// 设备编码
        /// </summary>
        public string EqCode { get; set; } = null!;

        /// <summary>
        /// 设备名称
        /// </summary>
        [Obsolete]
        public string EqName { get; set; } = null!;

        /// <summary>
        /// 当前焊接工位
        /// </summary>
        public string Station { get; set; } = null!;

        /// <summary>
        /// 焊接方式
        /// </summary>
        public string WeldType { get; set; } = null!;

        /// <summary>
        /// 弧压跟踪
        /// </summary>
        public string ArcVoltageTracking { get; set; } = null!;

        /// <summary>
        /// 设备状态
        /// </summary>
        public string EqState { get; set; } = null!;

        /// <summary>
        /// 设备模式
        /// </summary>
        public string Eqmode { get; set; } = null!;

        /// <summary>
        /// 本月焊丝消耗
        /// </summary>
        public double MonthWeld { get; set; }

        /// <summary>
        /// 本月 导电嘴
        /// </summary>
        /// <remarks>无导电嘴数据,改成本月加工数量</remarks>
        public int MonthDaoDian { get; set; }

        /// <summary>
        /// 气体/m³
        /// </summary>
        public string MonthGas { get; set; } = null!;

        /// <summary>
        /// 当天燃弧电量
        /// </summary>
        public double TodayWeldVoltage { get; set; }

        /// <summary>
        /// 当月燃弧电量
        /// </summary>
        public double MonthWeldVoltage { get; set; }
    }

    public class MonthCountRight
    {
        /// <summary>
        /// 开机时长(H)
        /// </summary>
        public double PowerTime { get; set; }

        /// <summary>
        /// 工作时长(H)
        /// </summary>
        public double WorkTime { get; set; }

        /// <summary>
        /// 燃弧时长(H)
        /// </summary>
        public double ArcingTime { get; set; }

        /// <summary>
        /// 报警时长(H)
        /// </summary>
        public double AlarmTime { get; set; }
    }

    /// <summary>
    /// 设备实况
    /// </summary>
    public class EquipmentInfoLeftVM
    {
        /// <summary>
        /// 当前程序
        /// </summary>
        [Obsolete]
        public string NowProject { get; set; } = null!;

        /// <summary>
        /// 程序号
        /// </summary>
        [Obsolete]
        public int ProjectRow { get; set; }

        /// <summary>
        /// 电压
        /// </summary>
        public double Voltage { get; set; }

        /// <summary>
        /// 电流
        /// </summary>
        public double Current { get; set; }

        /// <summary>
        /// 送丝速度
        /// </summary>
        public double SsSpeed { get; set; }

        /// <summary>
        /// 起弧状态
        /// </summary>
        public bool ArcingState { get; set; }

        ///// <summary>
        ///// 清枪状态
        ///// </summary>
        //public bool ClearSpearState { get; set; }

        /// <summary>
        /// 送丝机选择
        /// </summary>
        public string ClearSpearState { get; set; } = null!;

        /// <summary>
        /// X轴
        /// </summary>
        public double X { get; set; }

        /// <summary>
        /// Y轴
        /// </summary>
        public double Y { get; set; }

        /// <summary>
        /// Z轴
        /// </summary>
        public double Z { get; set; }

        /// <summary>
        /// A轴
        /// </summary>
        public double A { get; set; }

        /// <summary>
        /// B轴
        /// </summary>
        public double B { get; set; }

        /// <summary>
        /// C轴
        /// </summary>
        public double C { get; set; }

        public double E1 { get; set; }
        public double E2 { get; set; }
        public double E3 { get; set; }
        public double E4 { get; set; }

    }

    /// <summary>
    /// 工件实况
    /// </summary>
    public class EquipmentInfoRight
    {
        /// <summary>
        /// 工件型号
        /// </summary>
        public string ProductInfo { get; set; } = null!;

        /// <summary>
        /// 耗时(min)
        /// </summary>
        public double TimeSum { get; set; }

        /// <summary>
        /// 完工状态
        /// </summary>
        public string ProductState { get; set; } = null!;

        /// <summary>
        /// 近期效率
        /// </summary>
        public Efficiency EfficiencyList { get; set; } = null!;

        /// <summary>
        /// 近期产能
        /// </summary>
        public YieldListVM YieldList { get; set; } = null!;

        /// <summary>
        /// 燃弧率
        /// </summary>
        /// <remarks>燃弧时间/运行时间</remarks>
        public List<BoardChart> WeldFlagData { get; set; } = new List<BoardChart>();
    }

    /// <summary>
    /// 设备效率
    /// </summary>
    public class EquipmentEfficiency
    {
        /// <summary>
        /// 在线率
        /// </summary>
        public double OnLineRate { get; set; }

        /// <summary>
        /// 利用率
        /// </summary>
        public double UtilizeRate { get; set; }

        /// <summary>
        /// 自动化率/燃弧率
        /// </summary>
        public double AutoRate { get; set; }

        /// <summary>
        /// 报警率
        /// </summary>
        public double AlarmRate { get; set; }
    }

    /// <summary>
    /// 近期效率
    /// </summary>
    public class Efficiency
    {
        /// <summary>
        /// X轴日期(Min)
        /// </summary>
        public List<string> XAxisData { get; set; } = new List<string>();

        /// <summary>
        /// 开机时间(Min)
        /// </summary>
        public List<int> PowerOn { get; set; } = new List<int>();

        /// <summary>
        /// 工作时间(Min)
        /// </summary>
        public List<int> Work { get; set; } = new List<int>();

        /// <summary>
        /// 燃弧时间(Min)
        /// </summary>
        public List<int> Arcing { get; set; } = new List<int>();
    }

    /// <summary>
    /// 近期产量
    /// </summary>
    public class YieldListVM
    {
        /// <summary>
        /// X轴时间
        /// </summary>
        public List<string> XAxisData { get; set; } = new List<string>();

        /// <summary>
        /// 产量
        /// </summary>
        public List<int> Yield { get; set; } = new List<int>();
    }

    public class BoardChart
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; } = null!;

        /// <summary>
        /// 值
        /// </summary>
        public int Value { get; set; }

        /// <summary>
        /// 工作时长
        /// </summary>
        public double WorkTime { get; set; }

        /// <summary>
        /// 燃弧时长
        /// </summary>
        public double ArcingTime { get; set; }
    }
}