using System; using System.ComponentModel; using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using Newtonsoft.Json; using Core.Mes.Client.Comm.Attribute; namespace Core.StlMes.Client.Mcp.Control.Entity { [Serializable] /// /// 数据库表HTT_CONTROL_LOG所对应的实体类(生成工具:代码生成工具4.0 访问地址:http://172.16.2.128/tool/) /// 作者:tgcx-test 时间:2018-07-23 /// public class HttControlLogEntity { /// /// GUID主键 /// private string controlId = ""; /// /// 日志开始时间(‘YYYYMMDDhhmm’) /// private string logsBeg = ""; /// /// 日志结束时间(‘YYYYMMDDhhmm’) /// private string logsEnd = ""; /// /// 产线代码 /// private string plineCode = ""; /// /// 产线描述 /// private string plineName = ""; /// /// 实绩编号(机组+工序点代码+年月日+6位流水) /// private string resultNo = ""; /// /// 结炉状态(0.未结炉,1.结炉) /// private string nodeFlag = ""; /// /// 炉批计划ID /// private string heatPlanNo = ""; /// /// 生产批号 /// private string lotNo = ""; /// /// 判定炉号 /// private string judgeStoveNo = ""; /// /// 批号(炉批号) /// private string batchNo = ""; /// /// 组号 /// private string batchGroudNo = ""; /// /// 工序合同号 /// private string contractNo = ""; /// /// 工艺文件号 /// private string craftFileNo = ""; /// /// 监制编号 /// private string prdcrNo = ""; /// /// 品名代码 /// private string produccode = ""; /// /// 品名描述 /// private string producname = ""; /// /// 钢种代码 /// private string gradecode = ""; /// /// 钢种名称 /// private string gradename = ""; /// /// 钢级(牌号)代码 /// private string steelcode = ""; /// /// 钢级(牌号)名称 /// private string steelname = ""; /// /// 扣型代码 /// private string modelCode = ""; /// /// 扣型描述 /// private string modelDesc = ""; /// /// 标准代码 /// private string stdCode = ""; /// /// 标准名称 /// private string stdName = ""; /// /// 标准类别代码 /// private string stdStyle = ""; /// /// 标准类别描述(PSL1....) /// private string stdStyleDesc = ""; /// /// 外径 /// private decimal? actDimater = null; /// /// 壁厚 /// private decimal? actHeight = null; /// /// 长度 /// private decimal? actLen = null; /// /// 长度下限 /// private decimal? actLenMin = null; /// /// 长度上限 /// private decimal? actLenMax = null; /// /// 生产班次 /// private string proBc = ""; /// /// 生产班组 /// private string proBz = ""; /// /// 合格支数 /// protected decimal? qualifiedNum = null; /// /// 合格吨 /// private decimal? qualifiedWt = null; /// /// 废品支数 /// private decimal? scrapNum = null; /// /// 废品吨 /// private decimal? scrapWt = null; /// /// 生产分类(1正常、2停机) /// private string proType = ""; /// /// 停机分类 /// private string stopType = ""; /// /// 停机原因 /// private string stopReason = ""; /// /// 操作日期 /// private string userDate = ""; /// /// 操作人姓名 /// private string userName = ""; /// /// 操作人编号 /// private string userId = ""; /// /// 停机小类 /// private string stopSmall = ""; /// /// 确认时间 /// private string confirmTime = ""; /// /// 确认人 /// private string confirmName = ""; /// /// 确认状态(1.确认,0.未确认) /// private string confirmFlag = ""; /// /// 结算日期(年月) /// private string balYearMonth = ""; /// /// 生产年月日 /// private string procDate = ""; /// /// 备注 /// private string memo = ""; /// /// 规格代码 /// private string specCode = ""; /// /// 规格描述 /// private string specName = ""; /// /// 二级工序代码 /// private string processCodeC = ""; /// /// 二级工序名 /// private string processDescC = ""; /// /// 工序点:0:热处理点,1:探伤点 ,2:测量点,3:车丝,4:水压 /// private string station = ""; /// /// 审核时间 /// private string auditTime = ""; /// /// 审核人 /// private string auditName = ""; /// /// GUID主键 /// [Description("GUID主键")] [JsonProperty("controlId")] public string ControlId { get { return controlId; } set { controlId = value; } } /// /// 日志开始时间(‘YYYYMMDDhhmm’) /// [Description("开始时间")] [JsonProperty("logsBeg")] public string LogsBeg { get { return logsBeg; } set { logsBeg = value; } } /// /// 日志结束时间(‘YYYYMMDDhhmm’) /// [Description("结束时间")] [JsonProperty("logsEnd")] public string LogsEnd { get { return logsEnd; } set { logsEnd = 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; } } /// /// 实绩编号(机组+工序点代码+年月日+6位流水) /// [Description("实绩编号")] [JsonProperty("resultNo")] public string ResultNo { get { return resultNo; } set { resultNo = value; } } /// /// 结炉状态(0.未结炉,1.结炉) /// [Description("结炉状态")] [JsonProperty("nodeFlag")] public string NodeFlag { get { return nodeFlag; } set { nodeFlag = value; } } /// /// 炉批计划ID /// [Description("炉批计划ID")] [JsonProperty("heatPlanNo")] public string HeatPlanNo { get { return heatPlanNo; } set { heatPlanNo = value; } } /// /// 生产批号 /// [Description("生产批号")] [JsonProperty("lotNo")] public string LotNo { get { return lotNo; } set { lotNo = value; } } /// /// 判定炉号 /// [Description("判定炉号")] [JsonProperty("judgeStoveNo")] public string JudgeStoveNo { get { return judgeStoveNo; } set { judgeStoveNo = value; } } /// /// 批号(炉批号) /// [Description("批号")] [JsonProperty("batchNo")] public string BatchNo { get { return batchNo; } set { batchNo = value; } } /// /// 组号 /// [Description("组号")] [JsonProperty("batchGroudNo")] public string BatchGroudNo { get { return batchGroudNo; } set { batchGroudNo = value; } } /// /// 工序合同号 /// [Description("工序合同号")] [JsonProperty("contractNo")] public string ContractNo { get { return contractNo; } set { contractNo = value; } } /// /// 工艺文件号 /// [Description("工艺文件号")] [JsonProperty("craftFileNo")] public string CraftFileNo { get { return craftFileNo; } set { craftFileNo = value; } } /// /// 监制编号 /// [Description("监制编号")] [JsonProperty("prdcrNo")] public string PrdcrNo { get { return prdcrNo; } set { prdcrNo = value; } } /// /// 品名代码 /// [Description("品名代码")] [JsonProperty("produccode")] public string Produccode { get { return produccode; } set { produccode = value; } } /// /// 品名描述 /// [Description("品名")] [JsonProperty("producname")] public string Producname { get { return producname; } set { producname = value; } } /// /// 钢种代码 /// [Description("钢种代码")] [JsonProperty("gradecode")] public string Gradecode { get { return gradecode; } set { gradecode = value; } } /// /// 钢种名称 /// [Description("钢种")] [JsonProperty("gradename")] public string Gradename { get { return gradename; } set { gradename = value; } } /// /// 钢级(牌号)代码 /// [Description("钢级代码")] [JsonProperty("steelcode")] public string Steelcode { get { return steelcode; } set { steelcode = value; } } /// /// 钢级(牌号)名称 /// [Description("钢级")] [JsonProperty("steelname")] public string Steelname { get { return steelname; } set { steelname = value; } } /// /// 扣型代码 /// [Description("扣型代码")] [JsonProperty("modelCode")] public string ModelCode { get { return modelCode; } set { modelCode = value; } } /// /// 扣型描述 /// [Description("扣型")] [JsonProperty("modelDesc")] public string ModelDesc { get { return modelDesc; } set { modelDesc = value; } } /// /// 标准代码 /// [Description("标准代码")] [JsonProperty("stdCode")] public string StdCode { get { return stdCode; } set { stdCode = value; } } /// /// 标准名称 /// [Description("标准名称")] [JsonProperty("stdName")] public string StdName { get { return stdName; } set { stdName = value; } } /// /// 标准类别代码 /// [Description("标准类别代码")] [JsonProperty("stdStyle")] public string StdStyle { get { return stdStyle; } set { stdStyle = value; } } /// /// 标准类别描述(PSL1....) /// [Description("标准类别")] [JsonProperty("stdStyleDesc")] public string StdStyleDesc { get { return stdStyleDesc; } set { stdStyleDesc = value; } } /// /// 外径 /// [Description("外径")] [JsonProperty("actDimater")] public decimal? ActDimater { get { return actDimater; } set { actDimater = value; } } /// /// 壁厚 /// [Description("壁厚")] [JsonProperty("actHeight")] public decimal? ActHeight { get { return actHeight; } set { actHeight = value; } } /// /// 长度 /// [Description("长度")] [JsonProperty("actLen")] public decimal? ActLen { get { return actLen; } set { actLen = value; } } /// /// 长度下限 /// [Description("长度下限")] [JsonProperty("actLenMin")] public decimal? ActLenMin { get { return actLenMin; } set { actLenMin = value; } } /// /// 长度上限 /// [Description("长度上限")] [JsonProperty("actLenMax")] public decimal? ActLenMax { get { return actLenMax; } set { actLenMax = value; } } /// /// 生产班次 /// [Description("班次")] [JsonProperty("proBc")] public string ProBc { get { return proBc; } set { proBc = value; } } /// /// 生产班组 /// [Description("班组")] [JsonProperty("proBz")] public string ProBz { get { return proBz; } set { proBz = value; } } /// /// 合格支数 /// [Description("生产支数")] [JsonProperty("qualifiedNum")] public decimal? QualifiedNum { get { return qualifiedNum; } set { qualifiedNum = value; } } /// /// 合格吨 /// [Description("生产吨")] [JsonProperty("qualifiedWt")] public decimal? QualifiedWt { get { return qualifiedWt; } set { qualifiedWt = value; } } /// /// 废品支数 /// [Description("废品支数")] [JsonProperty("scrapNum")] public decimal? ScrapNum { get { return scrapNum; } set { scrapNum = value; } } /// /// 废品吨 /// [Description("废品吨")] [JsonProperty("scrapWt")] public decimal? ScrapWt { get { return scrapWt; } set { scrapWt = value; } } /// /// 生产分类(1正常、2停机) /// [Description("生产分类")] [JsonProperty("proType")] public string ProType { get { return proType; } set { proType = value; } } /// /// 停机分类 /// [Description("停机分类")] [JsonProperty("stopType")] public string StopType { get { return stopType; } set { stopType = value; } } /// /// 停机原因 /// [Description("停机原因")] [JsonProperty("stopReason")] public string StopReason { get { return stopReason; } set { stopReason = value; } } /// /// 操作日期 /// [Description("操作日期")] [JsonProperty("userDate")] public string UserDate { get { return userDate; } set { userDate = value; } } /// /// 操作人姓名 /// [Description("操作人姓名")] [JsonProperty("userName")] public string UserName { get { return userName; } set { userName = value; } } /// /// 操作人编号 /// [Description("操作人编号")] [JsonProperty("userId")] public string UserId { get { return userId; } set { userId = value; } } /// /// 停机小类 /// [Description("停机小类")] [JsonProperty("stopSmall")] public string StopSmall { get { return stopSmall; } set { stopSmall = value; } } /// /// 确认时间 /// [Description("确认时间")] [JsonProperty("confirmTime")] public string ConfirmTime { get { return confirmTime; } set { confirmTime = value; } } /// /// 确认人 /// [Description("确认人")] [JsonProperty("confirmName")] public string ConfirmName { get { return confirmName; } set { confirmName = value; } } /// /// 确认状态(1.确认,0.未确认) /// [Description("确认状态")] [JsonProperty("confirmFlag")] public string ConfirmFlag { get { return confirmFlag; } set { confirmFlag = value; } } /// /// 结算日期(年月) /// [Description("结算日期(年月)")] [JsonProperty("balYearMonth")] public string BalYearMonth { get { return balYearMonth; } set { balYearMonth = value; } } /// /// 生产年月日 /// [Description("生产年月日")] [JsonProperty("procDate")] public string ProcDate { get { return procDate; } set { procDate = value; } } /// /// 备注 /// [Description("备注")] [JsonProperty("memo")] public string Memo { get { return memo; } set { memo = value; } } /// /// 规格代码 /// [Description("规格代码")] [JsonProperty("specCode")] public string SpecCode { get { return specCode; } set { specCode = value; } } /// /// 规格描述 /// [Description("规格描述")] [JsonProperty("specName")] public string SpecName { get { return specName; } set { specName = value; } } /// /// 二级工序代码 /// [Description("二级工序代码")] [JsonProperty("processCodeC")] public string ProcessCodeC { get { return processCodeC; } set { processCodeC = value; } } /// /// 二级工序名 /// [Description("二级工序名")] [JsonProperty("processDescC")] public string ProcessDescC { get { return processDescC; } set { processDescC = value; } } /// /// 工序点:0:热处理点,1:探伤点 ,2:测量点,3:车丝,4:水压 /// [Description("工序点")] [Nullable(true)] [DataLength(8)] public string Station { get { return station; } set { station = value; } } /// /// 审核时间 /// [Description("审核时间")] [Nullable(true)] public string AuditTime { get { return auditTime; } set { auditTime = value; } } /// /// 审核人 /// [Description("审核人")] [Nullable(true)] [DataLength(20)] public string AuditName { get { return auditName; } set { auditName = value; } } /// /// 选择 /// [Description("选择")] [JsonProperty("Chk")] public bool Chk { get; set; } /// /// 时间差 /// [Description("时间差")] [JsonProperty("TimeDiff")] public string TimeDiff { get; set; } /// /// 序号 /// private decimal? controlSeq = null; /// /// 序号 /// [Description("序号")] [JsonProperty("controlSeq")] public decimal? ControlSeq { get { return controlSeq; } set { controlSeq = value; } } /// /// 生产用时 /// [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 HttControlLogEntity 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 HttControlLogEntity; } } } }