using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using WMS.Info; namespace WMS.BZModels.Dto.CP.CPQuestDB { public class CPDevRunInfoDto { public string runmode { get; set; } public string runstatus { get; set; } public DateTime starttime { get; set; } public DateTime endtime { get; set; } public long duration { get; set; } public int type { get; set; } public DateTime frame { get; set; } public string code { get; set; } } public class CPDevRunInfoQueryDto { public DateTime? BeginTime { get; set; } public DateTime? EndTime { get; set; } public DevType? DevType { get; set; } public string Floor { get; set; } } public enum DevType { /// /// RGV小车 /// RGV = 1, /// /// 堆垛机 /// SRM = 2, /// /// 机械臂/机器人 /// Robot = 3, /// /// 桁架 /// Truss = 4, /// /// 扫码器 /// BCR = 5, /// /// 站台/输送线 /// Station = 6, /// /// 机械臂/机器人 任务执行数量 /// RobotTaskSum = 7, /// /// 桁架 任务执行数量 /// TrussTaskSum = 8, } public class RunTimeRates { public string code { get; set; } public string utilizationrate { get; set; } //出库 public int OutDepot { get; set; } //入库 public int EnterDepot { get; set; } //移库 public int TransferDepot { get; set; } public List rates { get; set; } = new List(); } public class RunTimeRate { public string name { get; set; } public string desc { get { if (value <= 0) { return "0"; } TimeSpan ts = TimeSpan.FromMilliseconds(value); return ts.Days > 0 ? $"{ts.Days}天{ts.Hours}小时{ts.Minutes}分钟{ts.Seconds}秒" : $"{ts.Hours}小时{ts.Minutes}分钟{ts.Seconds}秒"; } } public long value { get; set; } public decimal rate { get; set; } } public class RunListModel { public string Code { get; set; } //出库 public int OutDepot { get; set; } //入库 public int EnterDepot { get; set; } //移库 public int TransferDepot { get; set; } //空闲 public double Free { get; set; } //public decimal FreeRate { get; set; } //手动 public double Manual { get; set; } //public decimal ManualRate { get; set; } //自动 public double Automatic { get; set; } //public decimal AutomaticRate { get; set; } //报警 public double Alarm { get; set; } //public decimal AlarmRate { get; set; } //运行 public double Working { get; set; } //public decimal WorkingRate { get; set; } public decimal[] State { get; set; } = new decimal[5]; } public class RunInfo { public string Code { get; set; } /// /// 出库任务 /// public int OutDepot { get; set; } /// /// 入库任务 /// public int EnterDepot { get; set; } /// /// 移库任务 /// public int MoveDepot { get; set; } /// /// 空闲 /// public double Free { get; set; } /// /// 手动 /// public double Manual { get; set; } /// /// 自动 /// public double Automatic { get; set; } /// /// 报警 /// public double Alarm { get; set; } /// /// 运行 /// public double Working { get; set; } /// /// 总时间 /// public double TotalTime { get; set; } /// /// 设备执行分析 /// public List DevAction { get; set; } /// /// 任务执行工位使用数量 /// public List StationCount { get; set; } } /// /// 设备动作分析 /// public class DevActionViewMode { /// /// 动作次数 /// public double ActionAmount { get; set; } /// /// 动作平均耗时 /// public double ActionTime { get; set; } /// /// 动作类型 /// public string Type { get; set; } } /// /// 设备动作类型 /// public enum DevActionType { /// /// 入库 /// [Description("入库")] In = 0, /// /// 出库 /// [Description("出库")] Out = 1, /// /// 移库 /// [Description("移库")] Move = 2, } /// /// 任务执行工位数量 /// public class StationCount { /// /// 执行数量 /// public double StationNum { get; set; } /// /// 工位数 /// public double StationIndex { get; set; } /// /// 任务类型 /// public string Type { get; set; } } public class DeviceEffectiveQueryDto : Pagination { public int type { get; set; } public DateTime stateTime { get; set; } public DateTime endTime { get; set; } } }