12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Text;
- namespace ProductionLineMonitor.Core.Models
- {
- /// <summary>
- /// 机台小时产能表
- /// </summary>
- [Table("MachineOutPutPerHours")]
- public class MachineOutPutPerHour : Base
- {
- /// <summary>
- /// 机台Id
- /// </summary>
- public string MachineId { get; set; }
- /// <summary>
- /// 机种
- /// </summary>
- public string ModuleType { get; set; }
- /// <summary>
- /// 数据时间
- /// </summary>
- public DateTime? DataTime { get; set; }
- /// <summary>
- /// 运行时间
- /// </summary>
- public int? AutoRunTime { get; set; }
- /// <summary>
- /// 报警时间
- /// </summary>
- public int? AlarmTime { get; set; }
- /// <summary>
- /// 待料时间
- /// </summary>
- public int? IdleTime { get; set; }
- /// <summary>
- /// 上游待料时间
- /// </summary>
- public int? IdleTimeUpstream { get; set; }
- /// <summary>
- /// 下游待料时间
- /// </summary>
- public int? IdleTimeDownstream { get; set; }
- /// <summary>
- /// 自身待料时间
- /// </summary>
- public int? IdleTimeSelf { get; set; }
- /// <summary>
- /// 产能
- /// </summary>
- public int? OutPut { get; set; }
- /// <summary>
- /// 目标TT
- /// </summary>
- public int? TargetTT { get; set; }
- /// <summary>
- /// 实际TT
- /// </summary>
- public double? ActualTT { get; set; }
- /// <summary>
- /// 报警次数
- /// </summary>
- public int? AlarmSum { get; set; }
- /// <summary>
- /// 换料次数
- /// </summary>
- public int? LoadMATSum { get; set; }
- /// <summary>
- /// 换料时间
- /// </summary>
- public int? LoadMATTime { get; set; }
- public double TT
- {
- get
- {
- if (OutPut == 0)
- {
- return 0;
- }
- return (double)Math.Round((decimal)(AutoRunTime.Value * 1.0 / OutPut), 2);
- }
- }
- public string Period
- {
- get
- {
- int hour = DataTime.Value.Hour;
- return $"{hour}:00~{hour + 1}:00";
- }
- }
- }
- }
|