|
|
/////////////////////////////////////////////////////////////////
|
|
|
//
|
|
|
// (C) Copyright 2013, Kenneth, Inc.
|
|
|
// All rights reserved. Confidential. Except as pursuant
|
|
|
// to a written agreement with Kenneth, this software may
|
|
|
// not be used or distributed. This software may be covered
|
|
|
// by one or more patents.
|
|
|
//
|
|
|
// 本软件为Kenneth开发,版权所有,违者必究,320325198102218110,23810511@qq.com
|
|
|
//
|
|
|
/////////////////////////////////////////////////////////////////
|
|
|
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Data;
|
|
|
using System.Reflection;
|
|
|
using GummingCommon;
|
|
|
|
|
|
namespace GummingEntity
|
|
|
{
|
|
|
public enum LogType
|
|
|
{
|
|
|
System = 1, //开关机记录
|
|
|
Prepared = 2, //初始化
|
|
|
//SlotDone = 2,
|
|
|
//SlotFailed = 3,
|
|
|
|
|
|
FlowStart = 7,
|
|
|
FlowDone = 8,
|
|
|
FlowFailed = 9,
|
|
|
|
|
|
}
|
|
|
|
|
|
public enum LogStatus
|
|
|
{
|
|
|
Error = 1,
|
|
|
Start = 2,
|
|
|
Finished = 3
|
|
|
}
|
|
|
public partial class SysLogEntity
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 日志类型
|
|
|
/// </summary>
|
|
|
private string _LogTypeText;
|
|
|
public string LogTypeText
|
|
|
{
|
|
|
get { return _LogTypeText; }
|
|
|
set
|
|
|
{
|
|
|
_LogTypeText = value;
|
|
|
OnPropertyChanged("LogTypeText");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 完成状态
|
|
|
/// </summary>
|
|
|
private string _LogStatusText;
|
|
|
public string LogStatusText
|
|
|
{
|
|
|
get { return _LogStatusText; }
|
|
|
set
|
|
|
{
|
|
|
_LogStatusText = value;
|
|
|
OnPropertyChanged("LogStatusText");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 结束时间
|
|
|
/// </summary>
|
|
|
private string _EndTimeStr;
|
|
|
public string EndTimeStr
|
|
|
{
|
|
|
get { return _EndTimeStr; }
|
|
|
set
|
|
|
{
|
|
|
_EndTimeStr = value;
|
|
|
OnPropertyChanged("EndTimeStr");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// SysLog
|
|
|
/// </summary>
|
|
|
[Serializable]
|
|
|
public partial class SysLogEntity : ViewModelBase, ICloneable
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private int _AutoId;
|
|
|
public int AutoId
|
|
|
{
|
|
|
get { return _AutoId; }
|
|
|
set
|
|
|
{
|
|
|
_AutoId = value;
|
|
|
OnPropertyChanged("AutoId");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private string _RecId;
|
|
|
public string RecId
|
|
|
{
|
|
|
get { return _RecId; }
|
|
|
set
|
|
|
{
|
|
|
_RecId = value;
|
|
|
OnPropertyChanged("RecId");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 日志类型
|
|
|
/// </summary>
|
|
|
private int _LogType;
|
|
|
public int LogType
|
|
|
{
|
|
|
get { return _LogType; }
|
|
|
set
|
|
|
{
|
|
|
_LogType = value;
|
|
|
OnPropertyChanged("LogType");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 槽数
|
|
|
/// </summary>
|
|
|
private int? _Slot;
|
|
|
public int? Slot
|
|
|
{
|
|
|
get { return _Slot; }
|
|
|
set
|
|
|
{
|
|
|
_Slot = value;
|
|
|
OnPropertyChanged("Slot");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 片数
|
|
|
/// </summary>
|
|
|
private int? _Pieces;
|
|
|
public int? Pieces
|
|
|
{
|
|
|
get { return _Pieces; }
|
|
|
set
|
|
|
{
|
|
|
_Pieces = value;
|
|
|
OnPropertyChanged("Pieces");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 完成状态
|
|
|
/// </summary>
|
|
|
private int _LogStatus;
|
|
|
public int LogStatus
|
|
|
{
|
|
|
get { return _LogStatus; }
|
|
|
set
|
|
|
{
|
|
|
_LogStatus = value;
|
|
|
OnPropertyChanged("LogStatus");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 日志详情
|
|
|
/// </summary>
|
|
|
private string _LogDetail;
|
|
|
public string LogDetail
|
|
|
{
|
|
|
get { return _LogDetail; }
|
|
|
set
|
|
|
{
|
|
|
_LogDetail = value;
|
|
|
OnPropertyChanged("LogDetail");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 开始时间
|
|
|
/// </summary>
|
|
|
private DateTime _StartTime;
|
|
|
public DateTime StartTime
|
|
|
{
|
|
|
get { return _StartTime; }
|
|
|
set
|
|
|
{
|
|
|
_StartTime = value;
|
|
|
OnPropertyChanged("StartTime");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 结束时间
|
|
|
/// </summary>
|
|
|
private DateTime _EndTime;
|
|
|
public DateTime EndTime
|
|
|
{
|
|
|
get { return _EndTime; }
|
|
|
set
|
|
|
{
|
|
|
_EndTime = value;
|
|
|
OnPropertyChanged("EndTime");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 日志编号
|
|
|
/// </summary>
|
|
|
private string _LogCode;
|
|
|
public string LogCode
|
|
|
{
|
|
|
get { return _LogCode; }
|
|
|
set
|
|
|
{
|
|
|
_LogCode = value;
|
|
|
OnPropertyChanged("LogCode");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 作业配方
|
|
|
/// </summary>
|
|
|
private string _LogName;
|
|
|
public string LogName
|
|
|
{
|
|
|
get { return _LogName; }
|
|
|
set
|
|
|
{
|
|
|
_LogName = value;
|
|
|
OnPropertyChanged("LogName");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 花篮
|
|
|
/// </summary>
|
|
|
private string _Basket;
|
|
|
public string Basket
|
|
|
{
|
|
|
get { return _Basket; }
|
|
|
set
|
|
|
{
|
|
|
_Basket = value;
|
|
|
OnPropertyChanged("Basket");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 批配方
|
|
|
/// </summary>
|
|
|
private string _FlowId;
|
|
|
public string FlowId
|
|
|
{
|
|
|
get { return _FlowId; }
|
|
|
set
|
|
|
{
|
|
|
_FlowId = value;
|
|
|
OnPropertyChanged("FlowId");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 工作流标记
|
|
|
/// </summary>
|
|
|
private string _WorkflowId;
|
|
|
public string WorkflowId
|
|
|
{
|
|
|
get { return _WorkflowId; }
|
|
|
set
|
|
|
{
|
|
|
_WorkflowId = value;
|
|
|
OnPropertyChanged("WorkflowId");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private int? _OrderBy;
|
|
|
public int? OrderBy
|
|
|
{
|
|
|
get { return _OrderBy; }
|
|
|
set
|
|
|
{
|
|
|
_OrderBy = value;
|
|
|
OnPropertyChanged("OrderBy");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private string _CreateBy;
|
|
|
public string CreateBy
|
|
|
{
|
|
|
get { return _CreateBy; }
|
|
|
set
|
|
|
{
|
|
|
_CreateBy = value;
|
|
|
OnPropertyChanged("CreateBy");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private DateTime? _CreateTime;
|
|
|
public DateTime? CreateTime
|
|
|
{
|
|
|
get { return _CreateTime; }
|
|
|
set
|
|
|
{
|
|
|
_CreateTime = value;
|
|
|
OnPropertyChanged("CreateTime");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private string _ModifyBy;
|
|
|
public string ModifyBy
|
|
|
{
|
|
|
get { return _ModifyBy; }
|
|
|
set
|
|
|
{
|
|
|
_ModifyBy = value;
|
|
|
OnPropertyChanged("ModifyBy");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private DateTime? _ModifyTime;
|
|
|
public DateTime? ModifyTime
|
|
|
{
|
|
|
get { return _ModifyTime; }
|
|
|
set
|
|
|
{
|
|
|
_ModifyTime = value;
|
|
|
OnPropertyChanged("ModifyTime");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private int? _IsActive;
|
|
|
public int? IsActive
|
|
|
{
|
|
|
get { return _IsActive; }
|
|
|
set
|
|
|
{
|
|
|
_IsActive = value;
|
|
|
OnPropertyChanged("IsActive");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public object Clone()
|
|
|
{
|
|
|
SysLogEntity obj = new SysLogEntity();
|
|
|
Type t = this.GetType();
|
|
|
PropertyInfo[] properties = t.GetProperties();
|
|
|
foreach (PropertyInfo pi in properties)
|
|
|
{
|
|
|
if (pi.CanWrite)
|
|
|
{
|
|
|
object value = pi.GetValue(this, null);
|
|
|
if (obj.GetType().GetProperty(pi.Name) != null)
|
|
|
{
|
|
|
pi.SetValue(obj, value, null);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return obj;
|
|
|
}
|
|
|
}
|
|
|
} |