using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using Core.Mes.Client.Comm.Attribute;
using Core.Mes.Client.Comm.Tool;
using Newtonsoft.Json;
namespace Core.StlMes.Client.Mcp.Control.Entity
{
[Serializable]
///
/// 数据库表HTT_WASTE_RESULT所对应的实体类(生成工具:代码生成工具3.0)
/// 作者:lenovo-PC 时间:2018-06-04
///
public class HttWasteResultEntity
{
///
/// 缺陷项单号
///
private string defSerialItem = "";
///
/// 缺陷项序号
///
private string defSerialNo = "";
///
/// 炉批计划ID
///
private string heatPlanNo = "";
///
/// 无注释
///
private string defFillNo = "";
///
/// 缺陷项名称
///
private string defFillCode = "";
///
/// 缺陷项名称
///
private string defFillName = "";
///
/// 缺陷支数
///
private decimal? defFillNum = null;
///
/// 缺陷时间
///
private string creTime = "";
///
/// 实绩编号(机组+工序点代码+年月日+6位流水)
///
private string resultNo = "";
///
/// 产线代码
///
private string plineCode = "";
///
/// 产线描述
///
private string plineName = "";
///
/// 缺陷重量
///
private decimal? defFillWt = null;
///
/// 缺陷重量
///
private string batchNo = null;
///
///
///
[Description("选择")]
[Nullable(false)]
[DataLength(30)]
public bool Chk { get; set; }
///
/// 缺陷项单号
///
[Description("缺陷项单号")]
[Nullable(false)]
[DataLength(30)]
public string DefSerialItem
{
get { return defSerialItem; }
set { defSerialItem = value; }
}
///
/// 缺陷项序号
///
[Description("缺陷项序号")]
[Nullable(false)]
[DataLength(30)]
public string DefSerialNo
{
get { return defSerialNo; }
set { defSerialNo = value; }
}
///
/// 炉批计划ID
///
[Description("炉批计划ID")]
[Nullable(true)]
[DataLength(30)]
public string HeatPlanNo
{
get { return heatPlanNo; }
set { heatPlanNo = value; }
}
///
/// 无注释
///
[Description("")]
[Nullable(true)]
[DataLength(30)]
public string DefFillNo
{
get { return defFillNo; }
set { defFillNo = value; }
}
///
/// 缺陷项名称
///
[Description("原因")]
[Nullable(true)]
[DataLength(30)]
public string DefFillCode
{
get { return defFillCode; }
set { defFillCode = value; }
}
///
/// 缺陷项名称
///
[Description("缺陷项名称")]
[Nullable(true)]
[DataLength(30)]
public string DefFillName
{
get { return defFillName; }
set { defFillName = value; }
}
///
/// 缺陷支数
///
[Description("支数")]
[Nullable(true)]
[DataLength(6)]
public decimal? DefFillNum
{
get { return defFillNum; }
set { defFillNum = value; }
}
///
/// 缺陷时间
///
[Description("缺陷时间")]
[Nullable(true)]
public string CreTime
{
get { return creTime; }
set { creTime = value; }
}
///
/// 实绩编号(机组+工序点代码+年月日+6位流水)
///
[Description("实绩编号(机组+工序点代码+年月日+6位流水)")]
[Nullable(true)]
[DataLength(24)]
public string ResultNo
{
get { return resultNo; }
set { resultNo = value; }
}
///
/// 产线代码
///
[Description("产线代码")]
[Nullable(true)]
[DataLength(30)]
public string PlineCode
{
get { return plineCode; }
set { plineCode = value; }
}
///
/// 产线描述
///
[Description("产线描述")]
[Nullable(true)]
[DataLength(100)]
public string PlineName
{
get { return plineName; }
set { plineName = value; }
}
///
/// 缺陷重量
///
[Description("缺陷重量")]
[Nullable(true)]
[DataLength(8)]
public decimal? DefFillWt
{
get { return defFillWt; }
set { defFillWt = value; }
}
///
/// 废品总米长
///
private decimal? totalLen = null;
///
/// 废品总米长
///
[Description("废品总米长")]
[JsonProperty("totalLen")]
public decimal? TotalLen
{
get { return totalLen; }
set { totalLen = value; }
}
///
/// 批号
///
[Description("批号")]
[Nullable(true)]
[DataLength(8)]
public string BatchNo
{
get { return batchNo; }
set { batchNo = value; }
}
protected string matNo = "";
///
/// 批号
///
[Description("材料号")]
[Nullable(true)]
[DataLength(8)]
public string MatNo
{
get { return matNo; }
set { matNo = value; }
}
public HttWasteResultEntity 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 HttWasteResultEntity;
}
}
}
}