EquipmentStatusRequestEntity.cs 6.24 KB
using System.Collections.Generic;

namespace Hh.Mes.POJO.ApiEntity
{
    /// <summary>
    /// 设备信息
    /// </summary>
    public class EquipmentStatusRequestEntity
    {
        /// <summary>
        /// 当天设备
        /// </summary>
        public EqInfo eqInfoDay { get; set; }

        /// <summary>
        /// 当月设备
        /// </summary>
        public EqInfo eqInfoMonth { get; set; }

        /// <summary>
        /// 当天生产量
        /// </summary>
        public EqCount eqCountDay { get; set; }

        /// <summary>
        /// 当月生产量
        /// </summary>
        public EqCount eqCountMonth { get; set; }

        /// <summary>
        /// 设备状态
        /// </summary>
        public List<EqStatusInfoList> eqStatusInfoList { get; set; } = new List<EqStatusInfoList>();

        /// <summary>
        /// 设备报警信息
        /// </summary>
        public List<EqAlarmInfoList> eqAlarmInfoList { get; set; } = new List<EqAlarmInfoList>();

        /// <summary>
        /// 生产信息
        /// </summary>
        public List<EquipmentOrderlist> orderList { get; set; } = new List<EquipmentOrderlist>();

        /// <summary>
        /// 设备参数
        /// </summary>
        public Eqparametercount eqParameterCount { get; set; }
    }

    public class EqInfo
    {
        /// <summary>
        /// 停机
        /// </summary>
        public int stop { get; set; }

        /// <summary>
        /// 故障
        /// </summary>
        public int fault { get; set; }

        /// <summary>
        /// 待机
        /// </summary>
        public int standby { get; set; }

        /// <summary>
        /// 运行/加工
        /// </summary>
        public int run { get; set; }

        /// <summary>
        /// 在线/自动
        /// </summary>
        public int Online { get; set; }

        /// <summary>
        /// 手动
        /// </summary>
        public int manual { get; set; }

        /// <summary>
        /// 总数
        /// </summary>
        public int eqCount => stop + fault + standby + run + Online + manual;
    }

    /// <summary>
    /// 生产量
    /// </summary>
    public class EqCount
    {
        /// <summary>
        /// 计划
        /// </summary>
        public int plan { get; set; }

        /// <summary>
        /// 实际
        /// </summary>
        public int actual { get; set; }

        /// <summary>
        /// 百分比
        /// </summary>
        public string rate => $"{actual * 100 / plan * 0.01}";
    }

    public class Eqparametercount
    {
        /// <summary>
        /// 设备名称
        /// </summary>
        public List<string> equipmentName { get; set; }

        /// <summary>
        /// 焊接电压
        /// </summary>
        public List<int> weldingVoltage { get; set; }

        /// <summary>
        /// 焊接电流
        /// </summary>
        public List<int> weldingCurrent { get; set; }

        /// <summary>
        /// 送丝速度
        /// </summary>
        public List<int> wireFeedingSpeed { get; set; }
        public List<string> legenData { get; set; }
        public object xAxisData { get; set; }
        public object seriesDataDianYa { get; set; }
        public object seriesDataDianLiu { get; set; }
        public object seriesDataSudu { get; set; }
    }

    /// <summary>
    /// 设备状态信息
    /// </summary>
    public class EqStatusInfoList
    {
        /// <summary>
        /// 设备名称
        /// </summary>
        public string equipmentName { get; set; }

        /// <summary>
        /// 开机时间
        /// </summary>
        public string startupTime { get; set; }

        /// <summary>
        /// 停机时间
        /// </summary>
        public string downtime { get; set; }

        /// <summary>
        /// 故障时间
        /// </summary>
        public string failureTime { get; set; }

        /// <summary>
        /// 待机时间
        /// </summary>
        public string standbyTime { get; set; }

        /// <summary>
        /// 运行时间
        /// </summary>
        public string runTime { get; set; }
        /// <summary>
        /// 启停状态
        /// </summary>
        public string startAndStopStatus { get; set; }
        /// <summary>
        /// 急停状态
        /// </summary>
        public string emergencyStopStatus { get; set; }
        /// <summary>
        /// 操作模式
        /// </summary>
        public string operationMode { get; set; }
    }

    /// <summary>
    /// 报警信息
    /// </summary>
    public class EqAlarmInfoList
    {
        /// <summary>
        /// 工位
        /// </summary>
        public string station { get; set; }

        /// <summary>
        /// 设备
        /// </summary>
        public string equipment { get; set; }

        /// <summary>
        /// 故障时间
        /// </summary>
        public string failureTime { get; set; }
        /// <summary>
        /// 故障描述
        /// </summary>
        public string faultDescription { get; set; }
        /// <summary>
        /// 故障编码
        /// </summary>
        public string faultCode { get; set; }
        /// <summary>
        /// 故障类型
        /// </summary>
        public string faultType { get; set; }
    }

    /// <summary>
    /// 生产信息
    /// </summary>
    public class EquipmentOrderlist
    {
        /// <summary>
        /// 设备名称
        /// </summary>
        public string equipmentName { get; set; }
        /// <summary>
        /// 产量
        /// </summary>
        public int orderCount { get; set; }
        /// <summary>
        /// 工件
        /// </summary>
        public string productName { get; set; }
        /// <summary>
        /// 工位
        /// </summary>
        public string stationName { get; set; }

        /// <summary>
        /// 工位运行速度
        /// </summary>
        public string stationRunSpeed { get; set; }

        /// <summary>
        /// 电压
        /// </summary>
        public string voltage { get; set; }

        /// <summary>
        /// 电流
        /// </summary>
        public string current { get; set; }

        /// <summary>
        /// 送丝速度
        /// </summary>
        public string wireFeedingSpeed { get; set; }
    }
}