using Microsoft.SqlServer.Server; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; namespace iWare_SCADA_Model { [NotMapped] public class WorkPieceLogMiddle : WorkPieceLog { /// /// OP80获取QC数据标记,0表示待获取,1表示获取成功,2表示获取失败 【Editby shaocx,2024-06-15】 /// public int? GetQcDataFlag { get; set; } #region SPC,NOOK 推出多件 OP20,OP50,OP60 public string WorkPieceIDA { get; set; } public string WorkPieceIDB { get; set; } public string WorkPieceIDC { get; set; } public string WorkPieceIDD { get; set; } #endregion #region 设备信息 /// /// 设备模式0.5 =true时自动, false时手动 /// public bool EquipmentMode { get; set; } /// /// 1.1=true 下料到=道满料 /// public bool FullMaterial { get; set; } /// /// 1.0=true 上料道缺料 /// public bool LackMaterial { get; set; } /// /// 是否正常生产 /// 运行中:0.4=true ps:加上不缺料 算运行中 ///空闲:0.4=true ps:加上缺料就是空闲 /// public bool IsNormalProduction { get; set; } public bool MachineOn { get; set; } public bool MachineOff { get; set; } /// /// 刀具是否告警 /// public bool IsToolChange { get; set; } #endregion #region 设备告警(一二类告警) /// /// 关机 /// public bool IsShutDown { get; set; } /// /// 开机 /// public bool IsPowerOn { get; set; } /// /// 告警是否关闭 /// public bool IsCloseAlert { get; set; } /// /// 告警状态是否变更过 /// public bool ischeckAlertStatus { get; set; } public long FailureType1 { get; set; } public long FailureType2 { get; set; } public long FailureType3 { get; set; } public long FailureType4 { get; set; } public long FailureType5 { get; set; } public long FailureType6 { get; set; } public long FailureType7 { get; set; } public long FailureType8 { get; set; } public long FailureType9 { get; set; } public long FailureType10 { get; set; } public long FailureType11 { get; set; } public long FailureType12 { get; set; } public long FailureType13 { get; set; } public long FailureType14 { get; set; } public long FailureType15 { get; set; } public long FailureType16 { get; set; } public long FailureType17 { get; set; } public long FailureType18 { get; set; } public long FailureType19 { get; set; } public long FailureType20 { get; set; } #endregion #region 设备message(一般是三类告警,但不影响设备运行) /// /// 是否存在message /// public bool IsMessage { get; set; } /// /// message是否变更过 /// public bool ischeckMessageStatus { get; set; } public long FailureMessage1 { get; set; } public long FailureMessage2 { get; set; } public long FailureMessage3 { get; set; } public long FailureMessage4 { get; set; } public long FailureMessage5 { get; set; } public long FailureMessage6 { get; set; } public long FailureMessage7 { get; set; } public long FailureMessage8 { get; set; } public long FailureMessage9 { get; set; } public long FailureMessage10 { get; set; } public long FailureMessage11 { get; set; } public long FailureMessage12 { get; set; } public long FailureMessage13 { get; set; } public long FailureMessage14 { get; set; } public long FailureMessage15 { get; set; } public long FailureMessage16 { get; set; } public long FailureMessage17 { get; set; } public long FailureMessage18 { get; set; } public long FailureMessage19 { get; set; } public long FailureMessage20 { get; set; } #endregion #region OP80 public string OP80NewCode { get; set; } /// /// 测量合格状态 /// public bool St3_Means_OK { get; set; } /// /// 称重状态 /// public bool St4_Weight_OK { get; set; } /// /// 打标合格状态 /// public bool St5_Mark_OK { get; set; } /// /// 打标识别合格状态 /// public bool ST6_Camera_OK { get; set; } public string OP80QualityFilePath { get; set; } public string OP60QualityFilePath { get; set; } public string OP20QualityFilePath { get; set; } #endregion #region OP30 public string OP30QualityStateCH3 { get; set; } public string OP30QualityStateCH4 { get; set; } public string OP30QualityStateCH5 { get; set; } public string OP30QualityStateCH6 { get; set; } public DateTime? OP30QualityReceiveTimeCH3 { get; set; } public DateTime? OP30QualityReceiveTimeCH4 { get; set; } public DateTime? OP30QualityReceiveTimeCH5 { get; set; } public DateTime? OP30QualityReceiveTimeCH6 { get; set; } public string OP30QualityFilePathCH3 { get; set; } public string OP30QualityFilePathCH4 { get; set; } public string OP30QualityFilePathCH5 { get; set; } public string OP30QualityFilePathCH6 { get; set; } #endregion #region op35 public bool OP35OK { get; set; } public bool OP35NOOK { get; set; } #endregion #region OP60哪个工位标记(A、B、C、D)【Editby shaocx,2024-06-07】 /// /// OP60哪个工位标记(A、B、C、D) /// public bool Op60_Place_Flag { get; set; } #endregion public bool IsConnect { get; set; } /// /// PLC传值是string型的 /// public string QualityStateStr { get; set; } public string QualityType { get; set; } public string QualityStateUpdateMode { get; set; } public string QualityStateUpdateUser { get; set; } public Dictionary GetWorkPieceInfoDict() { Dictionary dict = new Dictionary(); dict.Add("WorkPieceID", "WorkPieceID"); return dict; } /// /// OP10/OP40 推出原因(1:nok,2和3:spc,4:状态不明) /// public string OP10Flag { get; set; } public DateTime AlertTime { get; set; } public string QualityOP10To1 { get; set; } public string QualityOP40To1 { get; set; } public string QualityOP20To1 { get; set; } public string QualityOP30To1 { get; set; } public string QualityOP30To2 { get; set; } public string QualityOP30To3 { get; set; } public string QualityOP30To4 { get; set; } public string QualityOP30To5 { get; set; } public string QualityOP30To6 { get; set; } public string QualityOP30To7 { get; set; } public string QualityOP30To8 { get; set; } public string QualityOP30To9 { get; set; } public string QualityOP30To10 { get; set; } public string QualityOP30To11 { get; set; } public string QualityOP35To1 { get; set; } public string QualityOP35To2 { get; set; } /// /// 大头孔直径 /// public string QualityOP60To1 { get; set; } /// /// 小头孔直径 /// public string QualityOP60To2 { get; set; } /// /// 清洗温度 /// public string QualityOP70To1 { get; set; } /// /// 清洗压力 /// public string QualityOP70To2 { get; set; } /// /// 出口处工件温度 /// public string QualityOP70To3 { get; set; } /// /// 大头重量 /// public string QualityOP80To1 { get; set; } /// /// 小头重量 /// public string QualityOP80To2 { get; set; } /// /// 总重 /// public string QualityOP80To3 { get; set; } /// /// 弯曲 /// public string QualityOP80To4 { get; set; } /// /// 扭度 /// public string QualityOP80To5 { get; set; } /// /// 大头垂直度 /// public string QualityOP80To6 { get; set; } public string QualityOP80To7 { get; set; } public string QualityOP80To8 { get; set; } public string QualityOP80To9 { get; set; } /// /// 小头垂直度 /// public string QualityOP80To10 { get; set; } #region 新增OP80的一些质量数据 【Editby shaocx,2024-06-13】 /// /// OP80 质量数据-厚度 /// public string QualityOP80_Houdu { get; set; } /// /// OP80 质量数据-中心距 /// public string QualityOP80_ZXJ { get; set; } /// /// OP80 质量数据-大头孔圆柱度 /// public string QualityOP80_DTKYZD { get; set; } /// /// OP80 质量数据-小头上面圆度 /// public string QualityOP80_XTSMYD { get; set; } /// /// OP80 质量数据-小头下面圆度 /// public string QualityOP80_XTXMYD { get; set; } #region 大头孔直径 /// /// OP80 质量数据-大头孔直径,大头孔直径=(大头上面X方向直径+大头上面Y方向直径+大头下面X方向直径+大头下面Y方向直径)/4 /// public string QualityOP80_D_TKZJ { get; set; } /// /// OP80 质量数据-大头上面X方向直径 /// public string QualityOP80_D_S_X { get; set; } /// /// OP80 质量数据-大头上面Y方向直径 /// public string QualityOP80_D_S_Y { get; set; } /// /// OP80 质量数据-大头下面X方向直径 /// public string QualityOP80_D_X_X { get; set; } /// /// OP80 质量数据-大头下面Y方向直径 /// public string QualityOP80_D_X_Y { get; set; } #endregion #region 小头孔直径 /// /// OP80 质量数据-小头孔直径,小头孔直径=(小头上面X方向直径+小头上面Y方向直径+小头下面X方向直径+小头下面Y方向直径)/4 /// public string QualityOP80_X_TKZJ { get; set; } /// /// OP80 质量数据-小头上面X方向直径 /// public string QualityOP80_X_S_X { get; set; } /// /// OP80 质量数据-小头上面Y方向直径 /// public string QualityOP80_X_S_Y { get; set; } /// /// OP80 质量数据-小头下面X方向直径 /// public string QualityOP80_X_X_X { get; set; } /// /// OP80 质量数据-小头下面Y方向直径 /// public string QualityOP80_X_X_Y { get; set; } #endregion #endregion public string EquipmentCurrentState { get; set; } } //[NotMapped] //public class QualityDataInfoMiddle : WorkPieceLog //{ // public Dictionary GetWorkPieceInfoDict() // { // Dictionary dict = new Dictionary(); // dict.Add("WorkPieceID", "WorkPieceID"); // return dict; // } //} [NotMapped] public class OP80Info { //日期和时间 批号/标识号 嵌套号/主轴号 操作符 文本 测量机 过程参数 测量系统 过程参数值 序列号 零件识别号 1 public string 日期和时间 { get; set; } public string 批号 { get; set; } public string 嵌套号 { get; set; } public string 操作符 { get; set; } public string 文本 { get; set; } public string 测量机 { get; set; } public string 过程参数 { get; set; } public string 测量系统 { get; set; } public string 过程参数值 { get; set; } public string 序列号 { get; set; } public string 零件识别号 { get; set; } public List OP80ItemInfolist = new List(); public List OP80ItemStatusInfolist = new List(); } [NotMapped] public class OP80ItemInfo { //名称 相对值 相对值单位 绝对值 绝对值单位 名义值 上限 下限 状态/等级 分隔符 public string 名称 { get; set; } public string 相对值 { get; set; } public string 相对值单位 { get; set; } public string 绝对值 { get; set; } public string 绝对值单位 { get; set; } public string 名义值 { get; set; } /// /// USL值 /// public string 上限 { get; set; } /// /// LSL值 /// public string 下限 { get; set; } /// /// 状态/等级 /// public string 状态 { get; set; } public string 分隔符 { get; set; } } }