using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using Core.Mes.Client.Comm.Attribute;
using Newtonsoft.Json;
namespace Core.StlMes.Client.Mcp.Control.Entity
{
[Serializable]
///
/// 数据库表MCH_BUG_D所对应的实体类(生成工具:代码生成工具4.0 访问地址:http://172.16.2.128/tool/)
/// 作者:tgcx-test 时间:2018-09-03
///
public class MchBugDEntity
{
///
/// 废品缺陷编号(实绩编号+3位流水)
///
private string failBill = "";
///
/// 废品缺陷序号
///
private string failBillSqe = "";
///
/// 实绩编号(机组+工序点代码+年月日+6位流水)
///
private string resultNo = "";
///
/// 炉计划ID
///
private string heatPlanNo = "";
///
/// 缺陷代码
///
private string failTypeCode = "";
///
/// 缺陷名称
///
private string failTypeName = "";
///
/// 废品支数
///
private decimal? failNum = null;
///
/// 废品重量
///
private decimal? failWt = null;
///
/// 产线代码
///
private string plineCode = "";
///
/// 产线描述
///
private string plineName = "";
///
/// 废品分类(00可疑、10废品、20绝废)
///
private string failSort = "";
///
/// 废品去向
///
private string failDirect = "";
///
/// 批号
///
private string batchNo = "";
///
///
///
[Description("选择")]
[Nullable(false)]
[DataLength(30)]
public bool Chk { get; set; }
///
/// 废品缺陷编号(实绩编号+3位流水)
///
[Description("废品缺陷编号(实绩编号+3位流水)")]
[JsonProperty("failBill")]
public string FailBill
{
get { return failBill; }
set { failBill = value; }
}
///
/// 废品缺陷序号
///
[Description("废品缺陷序号")]
[JsonProperty("failBillSqe")]
public string FailBillSqe
{
get { return failBillSqe; }
set { failBillSqe = value; }
}
///
/// 实绩编号(机组+工序点代码+年月日+6位流水)
///
[Description("实绩编号(机组+工序点代码+年月日+6位流水)")]
[JsonProperty("resultNo")]
public string ResultNo
{
get { return resultNo; }
set { resultNo = value; }
}
///
/// 炉计划ID
///
[Description("炉计划ID")]
[JsonProperty("heatPlanNo")]
public string HeatPlanNo
{
get { return heatPlanNo; }
set { heatPlanNo = value; }
}
///
/// 缺陷代码
///
[Description("原因")]
[JsonProperty("failTypeCode")]
public string FailTypeCode
{
get { return failTypeCode; }
set { failTypeCode = value; }
}
///
/// 缺陷名称
///
[Description("缺陷名称")]
[JsonProperty("failTypeName")]
public string FailTypeName
{
get { return failTypeName; }
set { failTypeName = value; }
}
///
/// 支数
///
[Description("支数")]
[JsonProperty("failNum")]
public decimal? FailNum
{
get { return failNum; }
set { failNum = value; }
}
///
/// 废品重量
///
[Description("重量")]
[JsonProperty("failWt")]
public decimal? FailWt
{
get { return failWt; }
set { failWt = value; }
}
///
/// 产线代码
///
[Description("产线代码")]
[JsonProperty("plineCode")]
public string PlineCode
{
get { return plineCode; }
set { plineCode = value; }
}
///
/// 产线描述
///
[Description("产线描述")]
[JsonProperty("plineName")]
public string PlineName
{
get { return plineName; }
set { plineName = value; }
}
///
/// 废品分类(00可疑、10废品、20绝废)
///
[Description("废品分类(00可疑、10废品、20绝废)")]
[JsonProperty("failSort")]
public string FailSort
{
get { return failSort; }
set { failSort = value; }
}
///
/// 废品去向
///
[Description("废品去向")]
[JsonProperty("failDirect")]
public string FailDirect
{
get { return failDirect; }
set { failDirect = value; }
}
///
/// 批号
///
[Description("批号")]
[JsonProperty("batchNo")]
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 List ListData { get; set; }
public MchBugDEntity 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 MchBugDEntity;
}
}
}
}