611 lines
13 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DoAn.Core
{
/// <summary>
/// 定义存储的数据库类型
/// </summary>
public enum DBaseType
{
SQLServer=0,
Access,
SQLite,
MySQL
}
/// <summary>
/// 物料表定义
/// </summary>
public class Meterial
{
private string id;
/// <summary>
/// id
/// </summary>
public string Id
{
get { return id; }
set { id = value; }
}
private string f_StationName;
/// <summary>
/// 站别
/// </summary>
public string F_StationName
{
get { return f_StationName; }
set { f_StationName = value; }
}
private string f_Model;
/// <summary>
/// 型号
/// </summary>
public string F_Model
{
get { return f_Model; }
set { f_Model = value; }
}
private string f_MaterialName;
/// <summary>
/// 物料名称
/// </summary>
public string F_MaterialName
{
get { return f_MaterialName; }
set { f_MaterialName = value; }
}
private string f_MaterialCode;
/// <summary>
/// 物料编码
/// </summary>
public string F_MaterialCode
{
get { return f_MaterialCode; }
set { f_MaterialCode = value; }
}
private int f_Qty;
/// <summary>
/// 物料数量
/// </summary>
public int F_Qty
{
get { return f_Qty; }
set { f_Qty = value; }
}
private int f_UserQty;
/// <summary>
/// 当前使用数量
/// </summary>
public int F_UserQty
{
get { return f_UserQty; }
set { f_UserQty = value; }
}
private bool f_Status;
/// <summary>
/// 状态
/// </summary>
public bool F_Status
{
get { return f_Status; }
set { f_Status = value; }
}
private string f_CreateTM;
/// <summary>
/// 保存时间
/// </summary>
public string F_CreateTM
{
get { return f_CreateTM; }
set { f_CreateTM = value; }
}
private void InitialField()
{
this.Id = DateTime.Now.Year.ToString().Substring(2, 2) + DateTime.Now.Month.ToString("00") + DateTime.Now.Day.ToString("00") + "-" + DateTime.Now.Hour.ToString("00") + DateTime.Now.Minute.ToString("00") + DateTime.Now.Second.ToString("00"); ;
this.F_StationName = "";
this.F_Model = "";
this.F_MaterialName = "";
this.F_MaterialCode = "";
this.F_Qty = 0;
this.F_UserQty = 0;
this.F_Status = false;
this.F_CreateTM = DateTime.Now.ToString();
}
}
/// <summary>
/// 报警表定义
/// </summary>
public class Alarm
{
private string id;
/// <summary>
/// id
/// </summary>
public string Id
{
get { return id; }
set { id = value; }
}
private string f_LineNumber;
/// <summary>
/// 线别
/// </summary>
public string F_LineNumber
{
get { return f_LineNumber; }
set { f_LineNumber = value; }
}
private string f_ProductName;
/// <summary>
/// 产品
/// </summary>
public string F_ProductName
{
get { return f_ProductName; }
set { f_ProductName = value; }
}
private string f_LineStation;
/// <summary>
/// 站别
/// </summary>
public string F_LineStation
{
get { return f_LineStation; }
set { f_LineStation = value; }
}
private string f_AlarmInfor;
/// <summary>
/// 报警信息
/// </summary>
public string F_AlarmInfor
{
get { return f_AlarmInfor; }
set { f_AlarmInfor = value; }
}
private DateTime f_AlarmTime;
/// <summary>
/// 报警时间
/// </summary>
public DateTime F_AlarmTime
{
get { return f_AlarmTime; }
set { f_AlarmTime = value; }
}
private DateTime createTime;
/// <summary>
/// 保存时间
/// </summary>
public DateTime CreateTime
{
get { return createTime; }
set { createTime = value; }
}
public void InitialField()
{
this.Id = DateTime.Now.ToString("yyyyMMddHHmmssfff"); //带上毫秒值
this.F_LineNumber = "";
this.F_ProductName = "";
this.F_LineStation = "";
this.F_AlarmInfor = "";
this.F_AlarmTime = DateTime.Now;
this.CreateTime = DateTime.Now;
}
}
/// <summary>
/// 测试数据表定义
/// </summary>
public class testData
{
private string id;
/// <summary>
/// id
/// </summary>
public string Id
{
get { return id; }
set { id = value; }
}
private string model;
/// <summary>
/// 型号
/// </summary>
public string Model
{
get { return model; }
set { model = value; }
}
private string code;
/// <summary>
/// 产品码
/// </summary>
public string Code
{
get { return code; }
set { code = value; }
}
private string timeStart;
/// <summary>
/// 开始时间
/// </summary>
public string TimeStart
{
get { return timeStart; }
set { timeStart = value; }
}
private string timeEnd;
/// <summary>
/// 结束时间
/// </summary>
public string TimeEnd
{
get { return timeEnd; }
set { timeEnd = value; }
}
private string reworkTime;
/// <summary>
/// 返工时间
/// </summary>
public string ReworkTime
{
get { return reworkTime; }
set { reworkTime = value; }
}
private int reworkCount;
/// <summary>
/// 返工时长
/// </summary>
public int ReworkCount
{
get { return reworkCount; }
set { reworkCount = value; }
}
private int result;
/// <summary>
/// 结果
/// </summary>
public int Result
{
get { return result; }
set { result = value; }
}
private float cycle;
/// <summary>
/// cycle
/// </summary>
public float Cycle
{
get { return cycle; }
set { cycle = value; }
}
private string value101;
/// <summary>
/// 物料名称
/// </summary>
public string Value101
{
get { return value101; }
set { value101 = value; }
}
private string value102;
/// <summary>
/// 物料编码
/// </summary>
public string Value102
{
get { return value102; }
set { value102 = value; }
}
private string value103;
/// <summary>
///
/// </summary>
public string Value103
{
get { return value103; }
set { value103 = value; }
}
private string value104;
/// <summary>
///
/// </summary>
public string Value104
{
get { return value104; }
set { value104 = value; }
}
private string value105;
/// <summary>
///
/// </summary>
public string Value105
{
get { return value105; }
set { value105 = value; }
}
private string value106;
/// <summary>
///
/// </summary>
public string Value106
{
get { return value106; }
set { value106 = value; }
}
private string value107;
/// <summary>
///
/// </summary>
public string Value107
{
get { return value107; }
set { value107 = value; }
}
private string value108;
/// <summary>
///
/// </summary>
public string Value108
{
get { return value108; }
set { value108 = value; }
}
private float value201;
/// <summary>
///
/// </summary>
public float Value201
{
get { return value201; }
set { value201 = value; }
}
private float value202;
/// <summary>
///
/// </summary>
public float Value202
{
get { return value202; }
set { value202 = value; }
}
private float value203;
/// <summary>
///
/// </summary>
public float Value203
{
get { return value203; }
set { value203 = value; }
}
private float value204;
/// <summary>
///
/// </summary>
public float Value204
{
get { return value204; }
set { value204 = value; }
}
private float value205;
/// <summary>
///
/// </summary>
public float Value205
{
get { return value205; }
set { value205 = value; }
}
private float value206;
/// <summary>
///
/// </summary>
public float Value206
{
get { return value206; }
set { value206 = value; }
}
private float value207;
/// <summary>
///
/// </summary>
public float Value207
{
get { return value207; }
set { value207 = value; }
}
private float value208;
/// <summary>
///
/// </summary>
public float Value208
{
get { return value208; }
set { value208 = value; }
}
private float value209;
/// <summary>
///
/// </summary>
public float Value209
{
get { return value209; }
set { value209 = value; }
}
private float value210;
/// <summary>
///
/// </summary>
public float Value210
{
get { return value210; }
set { value210 = value; }
}
private float value211;
/// <summary>
///
/// </summary>
public float Value211
{
get { return value211; }
set { value211 = value; }
}
private float value212;
/// <summary>
///
/// </summary>
public float Value212
{
get { return value212; }
set { value212 = value; }
}
private float value213;
/// <summary>
///
/// </summary>
public float Value213
{
get { return value213; }
set { value213 = value; }
}
private float value214;
/// <summary>
///
/// </summary>
public float Value214
{
get { return value214; }
set { value214 = value; }
}
/// <summary>
/// 清空初始化
/// </summary>
public void InitialField()
{
this.Id = DateTime.Now.ToString("yyyyMMddHHmmssfff"); //带上毫秒值
this.Model = "-";
this.Code = "-";
this.TimeStart = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
this.TimeEnd = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
this.ReworkTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
this.ReworkCount = 0;
this.Result = 0;
this.Cycle = 0;
this.Value101 = "-";
this.Value102 = "-";
this.Value103 = "-";
this.Value104 = "-";
this.Value105 = "-";
this.Value106 = "-";
this.Value107 = "-";
this.Value108 = "-";
this.Value201 = 0;
this.Value202 = 0;
this.Value203 = 0;
this.Value204 = 0;
this.Value205 = 0;
this.Value206 = 0;
this.Value207 = 0;
this.Value208 = 0;
this.Value209 = 0;
this.Value210 = 0;
this.Value211 = 0;
this.Value212 = 0;
this.Value213 = 0;
this.Value214 = 0;
}
}
}