using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMAPP.Entity;
using QMFrameWork.Data.Attributes;
using System.Data;
namespace QMAPP.FJC.Entity.ProcessParameter
{
///
/// 作 用:冲切加工参数数据模型
/// 作 者:王丹丹
/// 编写日期:2015年06月8日
///
[DBTable(TableName = "T_AW_PUNCHPARAMETER")]
public class PunchParameter : BaseEntity
{
public PunchParameter()
{
}
///
/// 构造函数
///
public PunchParameter(string barcode)
{
//冲切设备的参数固定不变
decimal i = new Random().Next(10);
decimal decadeValue = new Random().Next(39, 45);
WORKTIME = decadeValue + i / 10;
PRESSURECIRCUIT1 = 140;
PRESSURECIRCUIT2 = 150;
PRESSURECIRCUIT3 = 180;
PRESSUREMAINZYL = 100;
if (barcode.Substring(12, 1) == "H")
{
PRESSURECIRCUIT4 = 140;
}
else
{
PRESSURECIRCUIT4 = 0;
}
RESULT = "OK";
}
///
///冲切加工参数主键
///
[DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)]
public string PID { get; set; }
///
///本体记录主键
///
[DBColumn(ColumnName = "MID", DataType = DbType.String)]
public string MID { get; set; }
///
///本体条码
///
[DBColumn(ColumnName = "MAINCODE", DataType = DbType.String)]
public string MAINCODE { get; set; }
///
///零件信息主键
///
[DBColumn(ColumnName = "PDID", DataType = DbType.String)]
public string PDID { get; set; }
///
///零件条码
///
[DBColumn(ColumnName = "PRODUCTCODE", DataType = DbType.String)]
public string PRODUCTCODE { get; set; }
///
///加工记录主键
///
[DBColumn(ColumnName = "MOID", DataType = DbType.String)]
public string MOID { get; set; }
///
/// 零件类别
///
[DBColumn(ColumnName = "PRODUCTTYPE", DataType = DbType.String)]
public string PRODUCTTYPE { get; set; }
///
///设备名称
///
[DBColumn(ColumnName = "MACHINENAME", DataType = DbType.String)]
public string MACHINENAME { get; set; }
///
///设备编码
///
[DBColumn(ColumnName = "MACHINECODDE", DataType = DbType.String)]
public string MACHINECODDE { get; set; }
///
///机油压力1
///
[DBColumn(ColumnName = "PRESSURECIRCUIT1", DataType = DbType.Int32)]
public int PRESSURECIRCUIT1 { get; set; }
///
///机油压力2
///
[DBColumn(ColumnName = "PRESSURECIRCUIT2", DataType = DbType.Int32)]
public int PRESSURECIRCUIT2 { get; set; }
///
///机油压力3
///
[DBColumn(ColumnName = "PRESSURECIRCUIT3", DataType = DbType.Int32)]
public int PRESSURECIRCUIT3 { get; set; }
///
///机油压力4
///
[DBColumn(ColumnName = "PRESSURECIRCUIT4", DataType = DbType.Int32)]
public int PRESSURECIRCUIT4 { get; set; }
///
///机油压力
///
[DBColumn(ColumnName = "PRESSUREMAINZYL", DataType = DbType.Int32)]
public int PRESSUREMAINZYL { get; set; }
///
///加工结果
///
[DBColumn(ColumnName = "RESULT", DataType = DbType.String)]
public string RESULT { get; set; }
///
///加工结果
///
[DBColumn(ColumnName = "WORKTIME", DataType = DbType.Decimal)]
public Decimal WORKTIME { get; set; }
///
///操作时间
///
[DBColumn(ColumnName = "CREATEDATE", DataType = DbType.DateTime)]
public DateTime CREATEDATE { get; set; }
///
/// 错误信息
///
public string InfoError { get; set; }
///
/// 导入时判断添加修改
///
public bool IsNewInfo { get; set; }
}
}