| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- using System;
- using System.ComponentModel;
- using System.IO;
- using System.Runtime.Serialization;
- using System.Runtime.Serialization.Formatters.Binary;
- using Newtonsoft.Json;
- namespace Core.StlMes.Client.Mcp.Control.Entity
- {
- [Serializable]
- /// <summary>
- /// 数据库表HTT_CONTROL_LOG_DETAIL所对应的实体类(生成工具:代码生成工具4.0 访问地址:http://172.16.2.128/tool/)
- /// 作者:tgcx-test 时间:2018-07-23
- /// </summary>
- public class HttControlLogDetailEntity
- {
- /// <summary>
- /// GUID主键
- /// </summary>
- private string controlId = "";
- /// <summary>
- /// 日志开始时间(‘YYYYMMDDhhmm’)
- /// </summary>
- private string logsBeg = "";
- /// <summary>
- /// 日志结束时间(‘YYYYMMDDhhmm’)
- /// </summary>
- private string logsEnd = "";
- /// <summary>
- /// 停机分类
- /// </summary>
- private string stopType = "";
- /// <summary>
- /// 停机原因
- /// </summary>
- private string stopReason = "";
- /// <summary>
- /// 停机小类
- /// </summary>
- private string stopSmall = "";
- /// <summary>
- /// 序号
- /// </summary>
- private decimal? controlSeq = null;
- /// <summary>
- /// GUID主键
- /// </summary>
- [Description("GUID主键")]
- [JsonProperty("controlId")]
- public string ControlId
- {
- get { return controlId; }
- set { controlId = value; }
- }
- /// <summary>
- /// 日志开始时间(‘YYYYMMDDhhmm’)
- /// </summary>
- [Description("开始时间")]
- [JsonProperty("logsBeg")]
- public string LogsBeg
- {
- get { return logsBeg; }
- set { logsBeg = value; }
- }
- /// <summary>
- /// 日志结束时间(‘YYYYMMDDhhmm’)
- /// </summary>
- [Description("结束时间")]
- [JsonProperty("logsEnd")]
- public string LogsEnd
- {
- get { return logsEnd; }
- set { logsEnd = value; }
- }
- /// <summary>
- /// 停机分类
- /// </summary>
- [Description("停机分类")]
- [JsonProperty("stopType")]
- public string StopType
- {
- get { return stopType; }
- set { stopType = value; }
- }
- /// <summary>
- /// 停机原因
- /// </summary>
- [Description("停机原因")]
- [JsonProperty("stopReason")]
- public string StopReason
- {
- get { return stopReason; }
- set { stopReason = value; }
- }
- /// <summary>
- /// 停机小类
- /// </summary>
- [Description("停机小类")]
- [JsonProperty("stopSmall")]
- public string StopSmall
- {
- get { return stopSmall; }
- set { stopSmall = value; }
- }
- /// <summary>
- /// 序号
- /// </summary>
- [Description("序号")]
- [JsonProperty("controlSeq")]
- public decimal? ControlSeq
- {
- get { return controlSeq; }
- set { controlSeq = value; }
- }
- /// <summary>
- /// 选择
- /// </summary>
- [Description("选择")]
- [JsonProperty("Chk")]
- public bool Chk { get; set; }
- /// <summary>
- /// 工序点代码
- /// </summary>
- private string stationCode = "";
- /// <summary>
- /// 工序点代码
- /// </summary>
- [Description("工序点 ")]
- [JsonProperty("stationCode")]
- public string StationCode
- {
- get { return stationCode; }
- set { stationCode = value; }
- }
- /// <summary>
- /// 工序点代码
- /// </summary>
- private string memo = "";
- /// <summary>
- /// 工序点代码
- /// </summary>
- [Description("备注 ")]
- [JsonProperty("MEMO")]
- public string Memo
- {
- get { return memo; }
- set { memo = value; }
- }
- /// <summary>
- /// 生产用时
- /// </summary>
- [Description("总时间(m)")]
- [JsonProperty("ProductTime")]
- public string ProductTime
- {
- get
- {
- DateTime dt1, dt2;
- if (DateTime.TryParse(logsBeg, out dt1) && DateTime.TryParse(logsEnd, out dt2))
- {
- TimeSpan ts1 = new TimeSpan(dt1.Ticks);
- TimeSpan ts2 = new
- TimeSpan(dt2.Ticks);
- TimeSpan ts = ts1.Subtract(ts2).Duration();
- return ts.TotalMinutes.ToString2();
- }
- return "";
- }
- }
- public HttControlLogDetailEntity Clone()
- {
- using (var memStream = new MemoryStream())
- {
- var binaryFormatter = new BinaryFormatter(null,
- new StreamingContext(StreamingContextStates.Clone));
- binaryFormatter.Serialize(memStream, this);
- memStream.Seek(0, SeekOrigin.Begin);
- return binaryFormatter.Deserialize(memStream) as HttControlLogDetailEntity;
- }
- }
-
- }
- }
|