添加项目文件。
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
using JinYuan.Models.HelperAttribute;
|
||||
using PLCCommunication;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 电芯进站
|
||||
/// </summary>
|
||||
public class AGearEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "InTestTime")]
|
||||
public DateTime Time { get; set; }
|
||||
/// <summary>
|
||||
/// 电池码
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
[DataGridViewColumn(Name = "InBarCode")]
|
||||
public string BarCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电芯在托盘位置号
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "Location")]
|
||||
public string Location { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 托盘码
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "InVassoioID")]
|
||||
public string TrayID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电池型号
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "InModelName")]
|
||||
public string Model { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 一级电芯档位
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "InGrade")]
|
||||
public string Grade { get; set; }
|
||||
/// <summary>
|
||||
/// 二级电芯档位
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "InMoreGrade")]
|
||||
public string MoreGrade { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工位号
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
[DataGridViewColumn(Name = "GongWei")]
|
||||
public string GongWei { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "InResult")]
|
||||
public string Result { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "InRemark")]
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using CsvHelper.Configuration.Attributes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 工位报警数据
|
||||
/// </summary>
|
||||
public class AlarmData
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警唯一标识符
|
||||
/// </summary>
|
||||
public string AlarmGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警地址
|
||||
/// </summary>
|
||||
public string PLCAdress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警内容
|
||||
/// </summary>
|
||||
public string AlarmContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警代码
|
||||
/// </summary>
|
||||
public string AlarmCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警类型 停机报警/非停机报警
|
||||
/// </summary>
|
||||
public string AlarmType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警开始时间
|
||||
/// </summary>
|
||||
public System.String StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警消除时间
|
||||
/// </summary>
|
||||
public System.String EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警描述
|
||||
/// </summary>
|
||||
public string AlarmDesc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警状态 传1或0,1是开始报警,0结束报警
|
||||
/// </summary>
|
||||
public string AlarmState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新状态
|
||||
/// </summary>
|
||||
public int Flag { get; set; }
|
||||
}
|
||||
|
||||
public class AlarmCSVData
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 报警开始时间
|
||||
/// </summary>
|
||||
[Name("报警时间")]
|
||||
public string StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警内容
|
||||
/// </summary>
|
||||
///
|
||||
[Name("报警内容")]
|
||||
public string AlarmContent { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class AlarmStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警地址
|
||||
/// </summary>
|
||||
public string PLCAdress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警状态
|
||||
/// </summary>
|
||||
public bool Status { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class AlarmCountEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// PLC地址
|
||||
/// </summary>
|
||||
public string PLCAdress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警内容
|
||||
/// </summary>
|
||||
public string AlarmContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警次数
|
||||
/// </summary>
|
||||
public int AlarmCount { get; set; }
|
||||
/// <summary>
|
||||
/// 班次
|
||||
/// </summary>
|
||||
public string Class { get; set; }
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
public DateTime AlarmTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using CsvHelper.Configuration.Attributes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警表单数据
|
||||
/// </summary>
|
||||
public class AlarmForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警地址
|
||||
/// </summary>
|
||||
[Name("寄存器地址")]
|
||||
public string PLCAdress { get; set; }
|
||||
/// <summary>
|
||||
/// 中语报警内容
|
||||
/// </summary>
|
||||
[Name("中语报警信息")]
|
||||
public string AlarmContent { get; set; }
|
||||
/// <summary>
|
||||
/// 报警代码
|
||||
/// </summary>
|
||||
[Name("故障代码")]
|
||||
public string AlarmCode { get; set; }
|
||||
/// <summary>
|
||||
/// 英语报警内容
|
||||
/// </summary>
|
||||
[Name("英语报警信息")]
|
||||
public string EnAlarmContent { get; set; }
|
||||
/// <summary>
|
||||
/// 匈牙利语报警内容
|
||||
/// </summary>
|
||||
[Name("匈牙利语报警信息")]
|
||||
public string HuAlarmContent { get; set; }
|
||||
/// <summary>
|
||||
/// 马来语报警内容
|
||||
/// </summary>
|
||||
[Name("马来语报警信息")]
|
||||
public string MsAlarmContent { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 电机位置记录
|
||||
/// </summary>
|
||||
public class AxleLog
|
||||
{
|
||||
private string _m_AxleDscribe;//轴描述
|
||||
private string _m_AxleLocation;//位置描述
|
||||
private string _m_AxleAddress;//PLC地址
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
public string m_AxleDscribe
|
||||
{
|
||||
get { return _m_AxleDscribe; }
|
||||
set { _m_AxleDscribe = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 位置描述
|
||||
/// </summary>
|
||||
public string m_AxleLocation
|
||||
{
|
||||
get { return _m_AxleLocation; }
|
||||
set { _m_AxleLocation = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
public string m_AxleAddress
|
||||
{
|
||||
get { return _m_AxleAddress; }
|
||||
set { _m_AxleAddress = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using JinYuan.Models.HelperAttribute;
|
||||
using SqlSugar;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Linq;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 组盘出站工位
|
||||
/// </summary>
|
||||
public class BGearEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 测试时间
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutTestTime")]
|
||||
public string TestTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 托盘码
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutVassoioID")]
|
||||
public string VassoioID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 叠盘工位号
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutGongWei")]
|
||||
public string GongWei { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 叠盘层数
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutStackingLayer")]
|
||||
public int StackingLayer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电芯等级
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutQty")]
|
||||
public string Qty { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 电芯数量
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutTotal")]
|
||||
public int Total { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电芯成功绑定数量
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutSuccTotal")]
|
||||
public int OutSuccTotal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 装箱结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutResult")]
|
||||
public string Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutRemark")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,306 @@
|
||||
using JinYuan.Models.HelperAttribute;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class BGearEntity2
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
//public BGearEntity()
|
||||
//{
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 通道号
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutChannelNo")]
|
||||
[DataGridColumnAttribute("ChannelNo")]
|
||||
|
||||
public string ChannelNo { get; set; }
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutTestTime")]
|
||||
[DataGridColumnAttribute("TestTime")]
|
||||
|
||||
public string TestTime { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
[DataGridColumnAttribute("FrmHistory_dgv_Main_MaterialCode")]
|
||||
|
||||
public string MaterialCode { get; set; }
|
||||
/// <summary>
|
||||
/// RFID托杯码
|
||||
/// </summary>
|
||||
//[DataGridViewColumn(Name = "OutRFID")]
|
||||
|
||||
public string RFID { get; set; }
|
||||
/// <summary>
|
||||
/// 电芯码
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutBarCode")]
|
||||
[DataGridColumnAttribute("BarCode")]
|
||||
|
||||
public string BarCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 离子风速
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutWindSpeed")]
|
||||
[DataGridColumnAttribute("WindSpeed")]
|
||||
|
||||
public string WindSpeed { get; set; }
|
||||
/// <summary>
|
||||
/// 离子风清洁设备号
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutWindDeviceNum")]
|
||||
[DataGridColumnAttribute("WindDeviceNum")]
|
||||
public string WindDeviceNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 端面检测设备号1
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDFaceTestDeviceNum1")]
|
||||
public string CCDFaceTestDeviceNum1 { get; set; }
|
||||
/// <summary>
|
||||
/// 端面检测设备号2
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDFaceTestDeviceNum2")]
|
||||
public string CCDFaceTestDeviceNum2 { get; set; }
|
||||
/// <summary>
|
||||
/// 端面检测设备号3
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDFaceTestDeviceNum3")]
|
||||
public string CCDFaceTestDeviceNum3 { get; set; }
|
||||
/// <summary>
|
||||
/// 端面检测设备号4
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDFaceTestDeviceNum4")]
|
||||
public string CCDFaceTestDeviceNum4 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 柱面检测设备号1
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDCylinderTestDeviceNum1")]
|
||||
public string CCDCylinderTestDeviceNum1 { get; set; }
|
||||
/// <summary>
|
||||
/// 柱面检测设备号2
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDCylinderTestDeviceNum2")]
|
||||
public string CCDCylinderTestDeviceNum2 { get; set; }
|
||||
/// <summary>
|
||||
/// 柱面检测设备号3
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDCylinderTestDeviceNum3")]
|
||||
public string CCDCylinderTestDeviceNum3 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 负极焊接区2D检测结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDNegativeTerminalWeldingZone2DInspectionResult")]
|
||||
public string CCDNegativeTerminalWeldingZone2DInspectionResult { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 负极焊接区2D检测NG原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDNegativeTerminalWeldingZone2DInspectionNGReasons")]
|
||||
public string CCDNegativeTerminalWeldingZone2DInspectionNGReasons { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 盖板2D检测结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDCoverPlate2DInspectionResult")]
|
||||
public string CCDCoverPlate2DInspectionResult { get; set; }
|
||||
///// <summary>
|
||||
///// 正极柱检测结果
|
||||
///// </summary>
|
||||
//[DataGridViewColumn(Name = "OutCCDPosCylinderTestResult")]
|
||||
//public string CCDPosCylinderTestResult { get; set; }
|
||||
///// <summary>
|
||||
///// 负极柱检测结果
|
||||
///// </summary>
|
||||
//[DataGridViewColumn(Name = "OutCCDNegCylinderTestResult")]
|
||||
//public string CCDNegCylinderTestResult { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 盖板2D检测NG原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDCoverPlate2DInspectionNGReasons")]
|
||||
public string CCDCoverPlate2DInspectionNGReasons { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 负极焊接区2.5D检测结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDNegativeTerminalWeldingZone25DInspectionResult")]
|
||||
public string CCDNegativeTerminalWeldingZone25DInspectionResult { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 负极焊接区2.5D检测NG原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDNegativeTerminalWeldingZone25DInspectionNGReasons")]
|
||||
public string CCDNegativeTerminalWeldingZone25DInspectionNGReasons { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 盖板2.5D检测结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDCoverPlate25DInspectionResult")]
|
||||
public string CCDCoverPlate25DInspectionResult { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 盖板2.5D检测NG原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDCoverPlate25DInspectionNGReasons")]
|
||||
public string CCDCoverPlate25DInspectionNGReasons { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 极柱2D检测结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDTerminalPost2DInspectionResult")]
|
||||
public string CCDTerminalPost2DInspectionResult { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 极柱2D检测NG原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDTerminalPost2DInspectionNGReasons")]
|
||||
public string CCDTerminalPost2DInspectionNGReasons { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 极柱3D检测结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDTerminalPost3DInspectionResult")]
|
||||
public string CCDTerminalPost3DInspectionResult { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 极柱3D检测NG原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDTerminalPost3DInspectionNGReasons")]
|
||||
public string CCDTerminalPost3DInspectionNGReasons { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 密封钉2D检测结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDSealingNail2DInspectionResult")]
|
||||
public string CCDSealingNail2DInspectionResult { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 密封钉2D检测NG原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDSealingNail2DInspectionNGReasons")]
|
||||
public string CCDSealingNail2DInspectionNGReasons { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 密封钉3D检测结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDSealingNail3DInspectionResult")]
|
||||
public string CCDSealingNail3DInspectionResult { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 密封钉3D检测NG原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDSealingNail3DInspectionNGReasons")]
|
||||
public string CCDSealingNail3DInspectionNGReasons { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上部R角2.5D检测结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDTopFillet25DInspectionResult")]
|
||||
public string CCDTopFillet25DInspectionResult { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上部R角2.5D检测NG原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDTopFillet25DInspectionNGReasons")]
|
||||
public string CCDTopFillet25DInspectionNGReasons { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 底部R角2.5D检测结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDBottomFillet25DInspectionResult")]
|
||||
public string CCDBottomFillet25DInspectionResult { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 底部R角2.5D检测NG原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDBottomFillet25DInspectionNGReasons")]
|
||||
public string CCDBottomFillet25DInspectionNGReasons { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 柱面2.5D检测结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDCylindricalSurface25DInspectionResult")]
|
||||
public string CCDCylindricalSurface25DInspectionResult { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 柱面2.5D检测NG原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDCylindricalSurface25DInspectionNGReasons")]
|
||||
public string CCDCylindricalSurface25DInspectionNGReasons { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 柱面3D检测结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDCylindricalSurface3DInspectionResult")]
|
||||
public string CCDCylindricalSurface3DInspectionResult { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 柱面3D检测NG原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutCCDCylindricalSurface3DInspectionNGReasons")]
|
||||
public string CCDCylindricalSurface3DInspectionNGReasons { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 综合结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutResult")]
|
||||
public string Result { get; set; }
|
||||
/// <summary>
|
||||
/// NG详情
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutInfo")]
|
||||
public string Info { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutRemark")]
|
||||
public string Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 出站是否上传MES
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "OutFlag")]
|
||||
public string Flag { get; set; }
|
||||
/// <summary>
|
||||
/// 结果数据是否上传MES
|
||||
/// </summary>
|
||||
public string Flag1 { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using JinYuan.Models.HelperAttribute;
|
||||
using SqlSugar;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 电芯满箱出站
|
||||
/// </summary>
|
||||
public class BatteryEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 电芯条码
|
||||
/// </summary>
|
||||
//[SugarColumn(IsIgnore = true)] //不存储到数据库
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
[DataGridViewColumn(Name = "identification")]
|
||||
public string identification { get; set; }
|
||||
/// <summary>
|
||||
/// 电芯条码位置
|
||||
/// </summary>
|
||||
//[SugarColumn(IsPrimaryKey = true)]
|
||||
[DataGridViewColumn(Name = "location")]
|
||||
public string location { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电芯等级
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "grade")]
|
||||
public string grade { get; set; }
|
||||
/// <summary>
|
||||
/// 卡板码(箱唛号)
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "containerCode")]
|
||||
public string containerCode { get; set; }
|
||||
/// <summary>
|
||||
/// 条码是否已成功绑定该卡板
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "packResult")]
|
||||
public bool packResult { get; set; }
|
||||
/// <summary>
|
||||
/// 条码绑定失败原因
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "packFalseReason")]
|
||||
public string packFalseReason { get; set; }
|
||||
/// <summary>
|
||||
/// 条码绑定时间
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "packTime")]
|
||||
public string packTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 出站类型
|
||||
/// </summary>
|
||||
//[DataGridViewColumn(Name = "outStationType")]
|
||||
public int outStationType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using JinYuan.Models.HelperAttribute;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 电芯替换
|
||||
/// </summary>
|
||||
public class BatteryReplace
|
||||
{
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "TestTime")]
|
||||
public DateTime ReplaceTime { get; set; }
|
||||
/// <summary>
|
||||
/// 替换后的电池码
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
[DataGridViewColumn(Name = "NewBarCode")]
|
||||
public string NewBarCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 替换前的电池码
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
[DataGridViewColumn(Name = "OldBarCode")]
|
||||
public string OldBarCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电芯在托盘位置号
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "Location")]
|
||||
public string Location { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 托盘码
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "VassoioID")]
|
||||
public string VassoioID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 托盘工位号
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "GongWei")]
|
||||
public string GongWei { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电芯档位
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "Grade")]
|
||||
public string Grade { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "Remark")]
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class BatteryStatus
|
||||
{
|
||||
public string batteryId { get; set; }
|
||||
|
||||
public int status { get; set; }
|
||||
|
||||
public string location { get; set; }
|
||||
|
||||
public string Container { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using JinYuan.Models.HelperAttribute;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 抽检工位
|
||||
/// </summary>
|
||||
public class CGearEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
[DataGridViewColumn(Name = "ReTestTime")]
|
||||
public string TestTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电池条码
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "ReBarCode")]
|
||||
public string BarCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 托盘码
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "ReVassoioID")]
|
||||
public string VassoioID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 托盘位置号
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "ReLocationNum")]
|
||||
public string LocationNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "ReResult")]
|
||||
public string Result { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "ReRemark")]
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
//子组大小:这个与计算内的CPK值又非常打的关系,即是分组的样本个数,数据的分组在此处需要说明的是,必须
|
||||
//是根据实际情况来填写,比如每次抽样为5个,那么子组大小为5个,我们不能随心所欲的任意填写这个值,否则
|
||||
//将没有实际意义。
|
||||
//上规格:用户录入的上规格值
|
||||
//目标值:用户输入的目标值,即期望达到的中心值
|
||||
//下规格:用户输入的下规格值
|
||||
|
||||
|
||||
public class CPKModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 总样本数 。参与分析的数据的个数
|
||||
/// </summary>
|
||||
public int TotalNumber { get; set; }
|
||||
/// <summary>
|
||||
/// 图表类型 .说明进行分析的控制图的类型,此处为XR控制图
|
||||
/// </summary>
|
||||
public string ChartType { get; set; }
|
||||
/// <summary>
|
||||
/// 平均值 所有样本数据的平均值
|
||||
/// </summary>
|
||||
public double MeanVlaue { get; set; }
|
||||
/// <summary>
|
||||
/// 最大值 所有样本的最大值
|
||||
/// </summary>
|
||||
public double MaxValue { get; set; }
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// </summary>
|
||||
public double MinValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 正的3倍标准差线
|
||||
/// </summary>
|
||||
public double Pos3Sigma { get; set; }
|
||||
/// <summary>
|
||||
/// 负的3倍标准差线
|
||||
/// </summary>
|
||||
public double Neg3Sigma { get; set; }
|
||||
/// <summary>
|
||||
/// 组内标准差值
|
||||
/// </summary>
|
||||
public double GroupSTDEV { get; set; }
|
||||
/// <summary>
|
||||
/// 整体标准差值
|
||||
/// </summary>
|
||||
public double WholeSTDEV { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组内CPK值 工序能力指数,与规格值及上述标准差值相关联
|
||||
/// </summary>
|
||||
public double GroupCPK { get; set; }
|
||||
/// <summary>
|
||||
/// 整体CPK值 工序能力指数,与规格值及上述标准差值相关联
|
||||
/// </summary>
|
||||
public double WholeCPK { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组内CP值 Cp值是衡量过程满足产品品质标准的成都,也叫制程精密度,Cp值越大,表示过程变异越小,过程能力越差
|
||||
/// </summary>
|
||||
public double GroupCP { get; set; }
|
||||
/// <summary>
|
||||
/// 整体CP值 Cp值是衡量过程满足产品品质标准的成都,也叫制程精密度,Cp值越大,表示过程变异越小,过程能力越差
|
||||
/// </summary>
|
||||
public double WholeCP { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组内CPL值 相对应于下规格的工序能力值;
|
||||
/// </summary>
|
||||
public double GroupCPL { get; set; }
|
||||
/// <summary>
|
||||
/// 整体CPL值 相对应于下规格的工序能力值;
|
||||
/// </summary>
|
||||
public double WholeCPL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组内CPU值 相对应于上规格的工序能力值;
|
||||
/// </summary>
|
||||
public double GroupCPU { get; set; }
|
||||
/// <summary>
|
||||
/// 整体CPU值 相对应于上规格的工序能力值;
|
||||
/// </summary>
|
||||
public double WholeCPU { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组内PPM<LSL值,预测的低于下规格值的不合格品数(PPM -百万分之比)
|
||||
/// </summary>
|
||||
public double GroupPPM_LSL { get; set; }
|
||||
/// <summary>
|
||||
/// 整体PPM<LSL值,预测的低于下规格值的不合格品数(PPM -百万分之比);
|
||||
/// </summary>
|
||||
public double WholePPM_LSL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实际检测PPM<LSL值,预测的低于下规格值的不合格品数(PPM -百万分之比);
|
||||
/// </summary>
|
||||
public double MeasuredPPM_LSL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组内PPM<USL值,预测的低于上规格值的不合格品数(PPM -百万分之比)
|
||||
/// </summary>
|
||||
public double GroupPPM_USL { get; set; }
|
||||
/// <summary>
|
||||
/// 整体PPM<USL值,预测的低于上规格值的不合格品数(PPM -百万分之比);
|
||||
/// </summary>
|
||||
public double WholePPM_USL { get; set; }
|
||||
/// <summary>
|
||||
/// 实际检测PPM<USL值,预测的低于上规格值的不合格品数(PPM -百万分之比)
|
||||
/// </summary>
|
||||
public double MeasuredPPM_USL { get; set; }
|
||||
/// <summary>
|
||||
/// 组内PPM Total值,预测的总的不合格品数
|
||||
/// </summary>
|
||||
public double GroupPPM_Total { get; set; }
|
||||
/// <summary>
|
||||
/// 整体PPM<USL值,预测的总的不合格品数
|
||||
/// </summary>
|
||||
public double WholePPM_Total { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实际检测PPM<USL值,预测的总的不合格品数
|
||||
/// </summary>
|
||||
public double MeasuredPPM_Total { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 制程准确度,值越小越好
|
||||
/// </summary>
|
||||
public double CA { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 进出站上传数据
|
||||
/// </summary>
|
||||
public class EnterandExit
|
||||
{
|
||||
/// <summary>
|
||||
/// BU编码
|
||||
/// </summary>
|
||||
public string bu_id;
|
||||
/// <summary>
|
||||
/// 区域简称
|
||||
/// </summary>
|
||||
public string district_id;
|
||||
/// <summary>
|
||||
/// 工厂编码
|
||||
/// </summary>
|
||||
public string factory_id;
|
||||
/// <summary>
|
||||
/// 产线编码
|
||||
/// </summary>
|
||||
public string production_line_id;
|
||||
/// <summary>
|
||||
/// 工序编码
|
||||
/// </summary>
|
||||
public string production_processes_id;
|
||||
/// <summary>
|
||||
/// 工作中心编码
|
||||
/// </summary>
|
||||
public string work_center_id;
|
||||
/// <summary>
|
||||
/// 工站
|
||||
/// </summary>
|
||||
public string station_id;
|
||||
/// <summary>
|
||||
/// 设备编码
|
||||
/// </summary>
|
||||
public string device_name;
|
||||
/// <summary>
|
||||
/// 进出站标识
|
||||
/// </summary>
|
||||
public string action;
|
||||
/// <summary>
|
||||
/// 动作时间(进出站)
|
||||
/// </summary>
|
||||
public string action_time;
|
||||
}
|
||||
|
||||
public class CollectionUpload
|
||||
{
|
||||
/// <summary>
|
||||
/// BU编码
|
||||
/// </summary>
|
||||
public string bu_id;
|
||||
/// <summary>
|
||||
/// 区域简称
|
||||
/// </summary>
|
||||
public string district_id;
|
||||
/// <summary>
|
||||
/// 工厂编码
|
||||
/// </summary>
|
||||
public string factory_id;
|
||||
/// <summary>
|
||||
/// 产线编码
|
||||
/// </summary>
|
||||
public string production_line_id;
|
||||
/// <summary>
|
||||
/// 工序编码
|
||||
/// </summary>
|
||||
public string production_processes_id;
|
||||
/// <summary>
|
||||
/// 工作中心编码
|
||||
/// </summary>
|
||||
public string work_center_id;
|
||||
/// <summary>
|
||||
/// 工站
|
||||
/// </summary>
|
||||
public string station_id;
|
||||
/// <summary>
|
||||
/// 设备编码
|
||||
/// </summary>
|
||||
public string device_name;
|
||||
/// <summary>
|
||||
/// 采集项数据列表
|
||||
/// </summary>
|
||||
public List<Collection> taglist { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class Collection
|
||||
{
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
public string device_time { get; set; }
|
||||
/// <summary>
|
||||
/// 采集项键值对
|
||||
/// </summary>
|
||||
public Dictionary<string, string> collection_items { get; set; }
|
||||
}
|
||||
|
||||
#region 预测性数据采集项对象
|
||||
public class Predictability_BM
|
||||
{
|
||||
//------------------------------------------------------------------------扭矩 扭矩 扭矩 扭矩
|
||||
public string Coating1_Torque1 { get; set; }
|
||||
public string Coating1_Torque2 { get; set; }
|
||||
public string Coating1_Torque3 { get; set; }
|
||||
public string Coating1_Torque4 { get; set; }
|
||||
public string Coating1_Torque5 { get; set; }
|
||||
public string Coating1_Torque6 { get; set; }
|
||||
public string Coating1_Torque7 { get; set; }
|
||||
public string Coating1_Torque8 { get; set; }
|
||||
public string Coating2_Torque1 { get; set; }
|
||||
public string Coating2_Torque2 { get; set; }
|
||||
public string Coating2_Torque3 { get; set; }
|
||||
public string Coating2_Torque4 { get; set; }
|
||||
public string Coating2_Torque5 { get; set; }
|
||||
public string Coating2_Torque6 { get; set; }
|
||||
public string Coating2_Torque7 { get; set; }
|
||||
public string Coating2_Torque8 { get; set; }
|
||||
public string Folding1_Torque1 { get; set; }
|
||||
public string Folding1_Torque2 { get; set; }
|
||||
public string Folding1_Torque3 { get; set; }
|
||||
public string Folding2_Torque1 { get; set; }
|
||||
public string Folding2_Torque2 { get; set; }
|
||||
public string Folding2_Torque3 { get; set; }
|
||||
//------------------------------------------------------------------------轴速度 轴速度 轴速度 轴速度
|
||||
public string Coating1_AxisSpeed1 { get; set; }
|
||||
public string Coating1_AxisSpeed2 { get; set; }
|
||||
public string Coating1_AxisSpeed3 { get; set; }
|
||||
public string Coating1_AxisSpeed4 { get; set; }
|
||||
public string Coating1_AxisSpeed5 { get; set; }
|
||||
public string Coating1_AxisSpeed6 { get; set; }
|
||||
public string Coating1_AxisSpeed7 { get; set; }
|
||||
public string Coating1_AxisSpeed8 { get; set; }
|
||||
public string Coating2_AxisSpeed1 { get; set; }
|
||||
public string Coating2_AxisSpeed2 { get; set; }
|
||||
public string Coating2_AxisSpeed3 { get; set; }
|
||||
public string Coating2_AxisSpeed4 { get; set; }
|
||||
public string Coating2_AxisSpeed5 { get; set; }
|
||||
public string Coating2_AxisSpeed6 { get; set; }
|
||||
public string Coating2_AxisSpeed7 { get; set; }
|
||||
public string Coating2_AxisSpeed8 { get; set; }
|
||||
public string Folding1_AxisSpeed1 { get; set; }
|
||||
public string Folding1_AxisSpeed2 { get; set; }
|
||||
public string Folding1_AxisSpeed3 { get; set; }
|
||||
public string Folding2_AxisSpeed1 { get; set; }
|
||||
public string Folding2_AxisSpeed2 { get; set; }
|
||||
public string Folding2_AxisSpeed3 { get; set; }
|
||||
|
||||
//------------------------------------------------------------------------轴位置 轴位置 轴位置 轴位置
|
||||
public string Coating1_AxisPosition1 { get; set; }
|
||||
public string Coating1_AxisPosition2 { get; set; }
|
||||
public string Coating1_AxisPosition3 { get; set; }
|
||||
public string Coating1_AxisPosition4 { get; set; }
|
||||
public string Coating1_AxisPosition5 { get; set; }
|
||||
public string Coating1_AxisPosition6 { get; set; }
|
||||
public string Coating1_AxisPosition7 { get; set; }
|
||||
public string Coating1_AxisPosition8 { get; set; }
|
||||
public string Coating2_AxisPosition1 { get; set; }
|
||||
public string Coating2_AxisPosition2 { get; set; }
|
||||
public string Coating2_AxisPosition3 { get; set; }
|
||||
public string Coating2_AxisPosition4 { get; set; }
|
||||
public string Coating2_AxisPosition5 { get; set; }
|
||||
public string Coating2_AxisPosition6 { get; set; }
|
||||
public string Coating2_AxisPosition7 { get; set; }
|
||||
public string Coating2_AxisPosition8 { get; set; }
|
||||
public string Folding1_AxisPosition1 { get; set; }
|
||||
public string Folding1_AxisPosition2 { get; set; }
|
||||
public string Folding1_AxisPosition3 { get; set; }
|
||||
public string Folding2_AxisPosition1 { get; set; }
|
||||
public string Folding2_AxisPosition2 { get; set; }
|
||||
public string Folding2_AxisPosition3 { get; set; }
|
||||
//------------------------------------------------------------------------行程时间 行程时间 行程时间 行程时间
|
||||
public string Coating1_Cylinder_TravelTime1 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime2 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime3 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime4 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime5 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime6 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime7 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime8 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime9 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime10 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime11 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime12 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime13 { get; set; }
|
||||
public string Coating1_Cylinder_TravelTime14 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime1 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime2 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime3 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime4 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime5 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime6 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime7 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime8 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime9 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime10 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime11 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime12 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime13 { get; set; }
|
||||
public string Coating2_Cylinder_TravelTime14 { get; set; }
|
||||
public string CornerCutting1_Cylinder_TravelTime1 { get; set; }
|
||||
public string CornerCutting1_Cylinder_TravelTime2 { get; set; }
|
||||
public string CornerCutting1_Cylinder_TravelTime3 { get; set; }
|
||||
public string CornerCutting1_Cylinder_TravelTime4 { get; set; }
|
||||
public string CornerCutting1_Cylinder_TravelTime5 { get; set; }
|
||||
public string CornerCutting1_Cylinder_TravelTime6 { get; set; }
|
||||
public string CornerCutting1_Cylinder_TravelTime7 { get; set; }
|
||||
public string CornerCutting1_Cylinder_TravelTime8 { get; set; }
|
||||
public string CornerCutting2_Cylinder_TravelTime1 { get; set; }
|
||||
public string CornerCutting2_Cylinder_TravelTime2 { get; set; }
|
||||
public string CornerCutting2_Cylinder_TravelTime3 { get; set; }
|
||||
public string CornerCutting2_Cylinder_TravelTime4 { get; set; }
|
||||
public string CornerCutting2_Cylinder_TravelTime5 { get; set; }
|
||||
public string CornerCutting2_Cylinder_TravelTime6 { get; set; }
|
||||
public string CornerCutting2_Cylinder_TravelTime7 { get; set; }
|
||||
public string CornerCutting2_Cylinder_TravelTime8 { get; set; }
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class BoxSize
|
||||
{
|
||||
public int layers { get; set; }
|
||||
public int rowsPerLayer { get; set; }
|
||||
public int colsPerLayer { get; set; }
|
||||
|
||||
public BoxSize() { }
|
||||
|
||||
public BoxSize(int layers, int rowsPerLayer, int colsPerLayer)
|
||||
{
|
||||
this.layers = layers;
|
||||
this.rowsPerLayer = rowsPerLayer;
|
||||
this.colsPerLayer = colsPerLayer;
|
||||
}
|
||||
|
||||
public int getBoxSize()
|
||||
{
|
||||
return layers * rowsPerLayer * colsPerLayer;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 24小时统计表数据
|
||||
/// </summary>
|
||||
public class Chart12HourData
|
||||
{
|
||||
/// <summary>
|
||||
/// 优率
|
||||
/// </summary>
|
||||
public string DisplayTime { get; set; }
|
||||
/// <summary>
|
||||
/// 产出数
|
||||
/// </summary>
|
||||
public int ProdIn { set; get; }
|
||||
/// <summary>
|
||||
/// 投入数
|
||||
/// </summary>
|
||||
public int ProdOut { set; get; }
|
||||
/// <summary>
|
||||
/// 不良数量
|
||||
/// </summary>
|
||||
public int ProdNg { set; get; }
|
||||
/// <summary>
|
||||
/// 优率
|
||||
/// </summary>
|
||||
public string OKRatio { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 不良統計
|
||||
/// </summary>
|
||||
public class ChartDataType
|
||||
{
|
||||
/// <summary>
|
||||
/// 數據類型
|
||||
/// </summary>
|
||||
public string DataType { get; set; }
|
||||
/// <summary>
|
||||
/// 數量
|
||||
/// </summary>
|
||||
public int DataCount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using JinYuan.Models.HelperAttribute;
|
||||
using SqlSugar;
|
||||
using System.Collections.Generic;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 底托卡板绑定工位(上传WMS)
|
||||
/// </summary>
|
||||
public class DGearEntity
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 层数
|
||||
/// </summary>
|
||||
//[SugarColumn(IsIgnore = true)] //不存储到数据库
|
||||
[DataGridViewColumn(Name = "DtChannelNo")]
|
||||
public string ChannelNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 托盘位置号
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "DtLocationNum")]
|
||||
public string LocationNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 托盘码
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "DtVassoioID")]
|
||||
public string VassoioID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
[DataGridViewColumn(Name = "DtTestTime")]
|
||||
public string TestTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电池码
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "DtBarCode")]
|
||||
public string BarCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 底托卡板码
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "DtCardBarcode")]
|
||||
public string CardBarcode { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "DtResult")]
|
||||
public string Result { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "DtRemark")]
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using JinYuan.Models.HelperAttribute;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 组盘临时表
|
||||
/// </summary>
|
||||
public class DataTurnover
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
//[SugarColumn(IsPrimaryKey = true)]
|
||||
public System.DateTime? Time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电池码
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public string identification { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 托盘码
|
||||
/// </summary>
|
||||
public string containerCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备编码
|
||||
/// </summary>
|
||||
public string equipNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电芯位置号
|
||||
/// </summary>
|
||||
//public string Location { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 托盘位置号
|
||||
/// </summary>
|
||||
//public string Grade { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 装箱次数
|
||||
/// </summary>
|
||||
//public string PackNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 装箱时间
|
||||
/// </summary>
|
||||
//public string PackTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 信息
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 设备综合效率
|
||||
/// </summary>
|
||||
public class DeviceOEE
|
||||
{
|
||||
/// <summary>
|
||||
/// 生产总数
|
||||
/// </summary>
|
||||
public int TotalQty { set; get; }
|
||||
/// <summary>
|
||||
/// 良品数
|
||||
/// </summary>
|
||||
public int ProOKQty { set; get; }
|
||||
/// <summary>
|
||||
/// 良率
|
||||
/// </summary>
|
||||
public double YieldRate { set; get; }
|
||||
/// <summary>
|
||||
/// 稼动率
|
||||
/// </summary>
|
||||
public double UtilizationRate { set; get; }
|
||||
/// <summary>
|
||||
/// PPM
|
||||
/// </summary>
|
||||
public int PPM { set; get; }
|
||||
/// <summary>
|
||||
/// 风速仪器
|
||||
/// </summary>
|
||||
public List<double> listWindSpeed { set; get; }
|
||||
/// <summary>
|
||||
/// 报警
|
||||
/// </summary>
|
||||
public List<ChartDataType> ListAlarmData { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 不良统计
|
||||
/// </summary>
|
||||
public List<ChartDataType> ListNGData { set; get; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class Hour12Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 12小时产能
|
||||
/// </summary>
|
||||
public List<List12HourData> chart12HourDatas { set; get; }
|
||||
}
|
||||
|
||||
public class List12HourData
|
||||
{
|
||||
public List<string> dataTime { set; get; }
|
||||
public List<int> dataTotal { set; get; }
|
||||
public List<int> dataOk { set; get; }
|
||||
public List<double> dataLV { set; get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using JinYuan.Models.HelperAttribute;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 卡板码打印工位
|
||||
/// </summary>
|
||||
public class EGearEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 测试时间
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "TestTime")]
|
||||
public string TestTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 托盘码
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "CardBarcode")]
|
||||
public string CardBarcode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 综合结果
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "Result")]
|
||||
public string Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[DataGridViewColumn(Name = "Remark")]
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 智能电表
|
||||
/// </summary>
|
||||
public class ElectricEnergy
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 有功电能(累计电能)KWH
|
||||
/// </summary>
|
||||
public System.Decimal? AccumulatedElectricity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A相电压 V
|
||||
/// </summary>
|
||||
public System.Decimal? PhaseVoltageA { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// B相电压
|
||||
/// </summary>
|
||||
public System.Decimal? PhaseVoltageB { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// C相电压
|
||||
/// </summary>
|
||||
public System.Decimal? PhaseVoltageC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A相电流
|
||||
/// </summary>
|
||||
public System.Decimal? PhaseCurrentA { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// B相电流
|
||||
/// </summary>
|
||||
public System.Decimal? PhaseCurrentB { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// C相电流
|
||||
/// </summary>
|
||||
public System.Decimal? PhaseCurrentC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A相功率
|
||||
/// </summary>
|
||||
public System.Decimal? PhasePowerA { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// B相功率
|
||||
/// </summary>
|
||||
public System.Decimal? PhasePowerB { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// C相功率
|
||||
/// </summary>
|
||||
public System.Decimal? PhasePowerC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总有功功率
|
||||
/// </summary>
|
||||
public System.Decimal? ActivePower { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总功率因数
|
||||
/// </summary>
|
||||
public System.Decimal? PowerFactor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电压变比
|
||||
/// </summary>
|
||||
public System.Decimal? pt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电流变比
|
||||
/// </summary>
|
||||
public System.Decimal? ct { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models.HelperAttribute
|
||||
{
|
||||
public static class AnnotationUtils
|
||||
{
|
||||
public static List<PropertyInfo> GetPropertiesWithAnnotation<T>(Type type) where T : Attribute
|
||||
{
|
||||
var properties = type.GetProperties().Where(p => p.GetCustomAttributes(typeof(T), true).Length > 0).ToList();
|
||||
return properties;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前类的DataGridViewColumn
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
public static List<DataGridViewColumn> GetDataGridViewColumns(this object obj)
|
||||
{
|
||||
Type typeObj = obj.GetType();
|
||||
var properties = AnnotationUtils.GetPropertiesWithAnnotation<DataGridViewColumn>(typeObj);
|
||||
|
||||
List<DataGridViewColumn> list = new List<DataGridViewColumn>();
|
||||
foreach (var property in properties)
|
||||
{
|
||||
DataGridViewColumn attribute = property.GetCustomAttribute<DataGridViewColumn>();
|
||||
//数据源名称
|
||||
attribute.DataPropertyName = property.Name;
|
||||
list.Add(attribute);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models.HelperAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表格列映射特性(支持字段/属性)
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
|
||||
public sealed class DataGridColumnAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 目标列名(默认使用成员名)
|
||||
/// </summary>
|
||||
public string ColumnName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 列数据类型(默认使用成员类型)
|
||||
/// </summary>
|
||||
public Type ColumnType { get; set; }
|
||||
|
||||
public DataGridColumnAttribute() { }
|
||||
|
||||
public DataGridColumnAttribute(string columnName) => ColumnName = columnName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models.HelperAttribute
|
||||
{
|
||||
public class DataGridViewColumn : Attribute
|
||||
{
|
||||
public string HeaderText { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string DataPropertyName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
using JinYuan.Models.HelperAttribute;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Reflection;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// DataTable 映射工具
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// DataTable 映射工具
|
||||
/// </summary>
|
||||
public static class DataTableMapper
|
||||
{
|
||||
/// <summary>
|
||||
/// 实体类型转换为 DataTable 结构(含注解解析)
|
||||
/// </summary>
|
||||
public static DataTable ToSchema(Type type)
|
||||
{
|
||||
var dt = new DataTable(type.Name);
|
||||
var members = type.GetMembers(BindingFlags.Public | BindingFlags.Instance);
|
||||
|
||||
foreach (var member in members)
|
||||
{
|
||||
var prop = member as PropertyInfo;
|
||||
var field = member as FieldInfo;
|
||||
if ((prop != null && !prop.CanRead) || (field == null && prop == null)) continue;
|
||||
|
||||
var attr = member.GetCustomAttribute<DataGridColumnAttribute>();
|
||||
var colName = attr != null ? attr.ColumnName : member.Name;
|
||||
var colType = attr != null && attr.ColumnType != null ? attr.ColumnType :
|
||||
(prop != null ? prop.PropertyType : field.FieldType);
|
||||
|
||||
var column = dt.Columns.Add(colName, colType);
|
||||
column.AllowDBNull = !(colType.GetTypeInfo().IsValueType &&
|
||||
!colType.GetTypeInfo().IsGenericType);
|
||||
}
|
||||
return dt;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 实体集合转换为 DataTable(含注解映射)
|
||||
/// 使用: var dt = DataTableMapper.ToDataTable (employees, typeof (Employee));
|
||||
/// </summary>
|
||||
public static DataTable ToDataTable(this IEnumerable<object> entities, Type type)
|
||||
{
|
||||
var dt = ToSchema(type);
|
||||
if (entities == null) return dt;
|
||||
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
var row = dt.NewRow();
|
||||
FillDataRow(entity, row, type);
|
||||
dt.Rows.Add(row);
|
||||
}
|
||||
return dt;
|
||||
}
|
||||
|
||||
private static void FillDataRow(object entity, DataRow row, Type type)
|
||||
{
|
||||
foreach (DataColumn column in row.Table.Columns)
|
||||
{
|
||||
MemberInfo member = null;
|
||||
foreach (var m in type.GetMembers(BindingFlags.Public | BindingFlags.Instance))
|
||||
{
|
||||
var attr = m.GetCustomAttribute<DataGridColumnAttribute>();
|
||||
var mName = attr != null ? attr.ColumnName : m.Name;
|
||||
if (string.Equals(mName, column.ColumnName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
member = m;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (member == null) continue;
|
||||
|
||||
object value;
|
||||
if (member is PropertyInfo prop)
|
||||
{
|
||||
value = prop.GetValue(entity);
|
||||
}
|
||||
else if (member is FieldInfo field)
|
||||
{
|
||||
value = field.GetValue(entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
row[column] = value ?? DBNull.Value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DataTable 转换为 List<T>
|
||||
/// 使用案例: var employeeList = dt.ToList<Employee>();
|
||||
/// </summary>
|
||||
public static List<T> ToList<T>(this DataTable dt) where T : new()
|
||||
{
|
||||
var list = new List<T>();
|
||||
var type = typeof(T);
|
||||
var members = type.GetMembers(BindingFlags.Public | BindingFlags.Instance);
|
||||
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
var item = new T();
|
||||
foreach (var member in members)
|
||||
{
|
||||
var prop = member as PropertyInfo;
|
||||
var field = member as FieldInfo;
|
||||
if ((prop != null && !prop.CanWrite) || (field == null && prop == null)) continue;
|
||||
|
||||
var attr = member.GetCustomAttribute<DataGridColumnAttribute>();
|
||||
var colName = attr != null ? attr.ColumnName : member.Name;
|
||||
if (dt.Columns.Contains(colName))
|
||||
{
|
||||
var value = row[colName];
|
||||
if (value != DBNull.Value)
|
||||
{
|
||||
if (prop != null)
|
||||
{
|
||||
prop.SetValue(item, Convert.ChangeType(value, prop.PropertyType));
|
||||
}
|
||||
else if (field != null)
|
||||
{
|
||||
field.SetValue(item, Convert.ChangeType(value, field.FieldType));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
list.Add(item);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 循环获取当前 DataTable 的列名称,通过自定义的获取名称方法获取新的列名并替换
|
||||
/// </summary>
|
||||
/// <param name="dt">要处理的 DataTable</param>
|
||||
/// <param name="getNewColumnName">自定义的获取新列名的方法</param>
|
||||
/// <returns>列名替换后的 DataTable</returns>
|
||||
public static DataTable ReplaceColumnNamesWithCustomMethod(this DataTable dt, Func<string, string> GetNewColumnName)
|
||||
{
|
||||
for (int i = 0; i < dt.Columns.Count; i++)
|
||||
{
|
||||
string originalColumnName = dt.Columns[i].ColumnName;
|
||||
string newColumnName = GetNewColumnName(originalColumnName);
|
||||
dt.Columns[i].ColumnName = newColumnName;
|
||||
}
|
||||
return dt;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 24小时产能
|
||||
/// </summary>
|
||||
public class Hourprod
|
||||
{
|
||||
/// <summary>
|
||||
/// 日期
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public System.String FDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 小时
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public System.Int32 FHour { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 投入数
|
||||
/// </summary>
|
||||
public System.Int32 ProdIn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产出数
|
||||
/// </summary>
|
||||
public System.Int32 ProdOut { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
public System.DateTime? TestTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// PPM
|
||||
/// </summary>
|
||||
public System.Int32 Ppm { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 稼动率
|
||||
/// </summary>
|
||||
public System.Decimal JiaDL { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{4C0BCB84-5CD7-4846-8363-C4C10D46E391}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>JinYuan.Models</RootNamespace>
|
||||
<AssemblyName>JinYuan.Models</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CsvHelper, Version=33.0.0.0, Culture=neutral, PublicKeyToken=8c4959082be5c823, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CsvHelper.33.0.1\lib\net48\CsvHelper.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.HashCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.HashCode.1.1.1\lib\net461\Microsoft.Bcl.HashCode.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MiniExcel, Version=1.36.1.0, Culture=neutral, PublicKeyToken=e7310002a53eac39, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MiniExcel.1.36.1\lib\net45\MiniExcel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PLCCommunication">
|
||||
<HintPath>..\LargeSquareOne\Lib\PLCCommunication.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SqlSugar, Version=5.1.4.199, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SqlSugar.5.1.4.199\lib\SqlSugar.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.0\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BatteryEntity.cs" />
|
||||
<Compile Include="BatteryReplace.cs" />
|
||||
<Compile Include="BatteryStatus.cs" />
|
||||
<Compile Include="CapSize.cs" />
|
||||
<Compile Include="SysConfig\CartainerConfig.cs" />
|
||||
<Compile Include="NgCodeEntity.cs" />
|
||||
<Compile Include="AlarmCountEntry.cs" />
|
||||
<Compile Include="AlarmForm.cs" />
|
||||
<Compile Include="Alarm\AlarmStatus.cs" />
|
||||
<Compile Include="Alarm\AlarmData.cs" />
|
||||
<Compile Include="AxleLog.cs" />
|
||||
<Compile Include="BGearEntity.cs" />
|
||||
<Compile Include="CGearEntity.cs" />
|
||||
<Compile Include="Chart12HourData.cs" />
|
||||
<Compile Include="ChartDataType.cs" />
|
||||
<Compile Include="AGearEntity.cs" />
|
||||
<Compile Include="CTPCTQDate.cs" />
|
||||
<Compile Include="DGearEntity.cs" />
|
||||
<Compile Include="EGearEntity.cs" />
|
||||
<Compile Include="ElectricEnergy.cs" />
|
||||
<Compile Include="HelperAttribute\AnnotationUtils.cs" />
|
||||
<Compile Include="HelperAttribute\DataGridColumnAttribute.cs" />
|
||||
<Compile Include="HelperAttribute\DataGridViewColumn.cs" />
|
||||
<Compile Include="HelperAttribute\DataTableMapper.cs" />
|
||||
<Compile Include="Hourprod.cs" />
|
||||
<Compile Include="BGearEntity2.cs" />
|
||||
<Compile Include="MotorLog.cs" />
|
||||
<Compile Include="PlcDevice.cs" />
|
||||
<Compile Include="SysConfig\BTWConfig.cs" />
|
||||
<Compile Include="SysConfig\Device.cs" />
|
||||
<Compile Include="CPKModel.cs" />
|
||||
<Compile Include="DeviceOEE.cs" />
|
||||
<Compile Include="SysConfig\Enum.cs" />
|
||||
<Compile Include="SysConfig\FDConfigMapping.cs" />
|
||||
<Compile Include="SysConfig\FDConfig.cs" />
|
||||
<Compile Include="SysConfig\Group.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SysConfig\ParamBase.cs" />
|
||||
<Compile Include="SysConfig\ParamList.cs" />
|
||||
<Compile Include="SysConfig\PLCConfig.cs" />
|
||||
<Compile Include="SysConfig\PlcGroupConfig.cs" />
|
||||
<Compile Include="SysConfig\PLCGroupVariable.cs" />
|
||||
<Compile Include="SysConfig\ProductModel.cs" />
|
||||
<Compile Include="SysConfig\ProductModelParam.cs" />
|
||||
<Compile Include="SysConfig\Variable.cs" />
|
||||
<Compile Include="SysConfig\SysAdmin.cs" />
|
||||
<Compile Include="SysConfig\SysConfig.cs" />
|
||||
<Compile Include="SysConfig\SysLog.cs" />
|
||||
<Compile Include="DataTurnover.cs" />
|
||||
<Compile Include="SysConfig\VariableConfig.cs" />
|
||||
<Compile Include="TrayEntity.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,39 @@
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 轴位置记录
|
||||
/// </summary>
|
||||
public class MotorLog
|
||||
{
|
||||
private string _m_MotorDscribe;//轴描述
|
||||
private string _m_MotorLocation;//位置描述
|
||||
private string _m_MotorAddress;//PLC地址
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
public string m_MotorDscribe
|
||||
{
|
||||
get { return _m_MotorDscribe; }
|
||||
set { _m_MotorDscribe = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 位置描述
|
||||
/// </summary>
|
||||
public string m_MotorLocation
|
||||
{
|
||||
get { return _m_MotorLocation; }
|
||||
set { _m_MotorLocation = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
public string m_MotorAddress
|
||||
{
|
||||
get { return _m_MotorAddress; }
|
||||
set { _m_MotorAddress = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using JinYuan.Models.HelperAttribute;
|
||||
using SqlSugar;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// ngCode实体类
|
||||
/// </summary>
|
||||
public class NgCodeEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 编码
|
||||
/// </summary>
|
||||
public string ngCode { get; set; }
|
||||
/// <summary>
|
||||
/// 不良信息
|
||||
/// </summary>
|
||||
public string ngMessage { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
using MiniExcelLibs.Attributes;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 通信设备实体类
|
||||
/// </summary>
|
||||
public class PlcDevice
|
||||
{
|
||||
/// <summary>
|
||||
/// PLC编号
|
||||
/// </summary>
|
||||
public int PlcNum { get; set; }
|
||||
/// <summary>
|
||||
/// IP地址
|
||||
/// </summary>
|
||||
public string IPAddress { get; set; }
|
||||
/// <summary>
|
||||
/// 端口
|
||||
/// </summary>
|
||||
public int Port { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// PLC类型
|
||||
/// </summary>
|
||||
public string PLCType { get; set; }
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsActive { get; set; }
|
||||
/// <summary>
|
||||
/// 心跳地址
|
||||
/// </summary>
|
||||
public string HeartBeat { get; set; }
|
||||
/// <summary>
|
||||
/// 是否启用心跳消息
|
||||
/// </summary>
|
||||
public bool IsHeartBeat { get; set; }
|
||||
/// <summary>
|
||||
/// 链接成功标志
|
||||
/// </summary>
|
||||
public bool IsConnected { get; set; }
|
||||
/// <summary>
|
||||
/// 是否是首次连接
|
||||
/// </summary>
|
||||
public bool IsFirstConnect { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 重连周期
|
||||
/// </summary>
|
||||
|
||||
public int ReConnectTime { get; set; } = 2000;
|
||||
|
||||
/// <summary>
|
||||
/// 休眠时间
|
||||
/// </summary>
|
||||
|
||||
public int SleepTime { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// 大小端
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public int DataFormat { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 出错次数
|
||||
/// </summary>
|
||||
public int ErrorTimes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 容错次数
|
||||
/// </summary>
|
||||
public int AllowErrorTimes { get; set; } = 3;
|
||||
|
||||
/// <summary>
|
||||
/// 多线程取消源标志位
|
||||
/// </summary>
|
||||
public CancellationTokenSource Cts { get; set; }
|
||||
/// <summary>
|
||||
/// 通信组集合
|
||||
/// </summary>
|
||||
public List<PlcGroup> GroupList { get; set; } = new List<PlcGroup>();
|
||||
}
|
||||
|
||||
|
||||
public class PlcGroup
|
||||
{
|
||||
/// <summary>
|
||||
/// PLC编号
|
||||
/// </summary>
|
||||
public int PlcNum { get; set; }
|
||||
/// <summary>
|
||||
///通信组名称
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
/// <summary>
|
||||
/// 起始地址
|
||||
/// </summary>
|
||||
public string Start { get; set; }
|
||||
/// <summary>
|
||||
/// 长度
|
||||
/// </summary>
|
||||
public ushort Length { get; set; }
|
||||
/// <summary>
|
||||
/// 是否为触发读取
|
||||
/// </summary>
|
||||
public bool IsTiggerRead { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否需要反馈结果到PLC
|
||||
/// </summary>
|
||||
public bool IsFeedbackPlc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsActive { get; set; }
|
||||
/// <summary>
|
||||
/// 备注说明
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 机架号,对于物流线需要带线号,对于组盘机只要子架号
|
||||
/// </summary>
|
||||
public string StationName { get; set; }
|
||||
/// <summary>
|
||||
/// 变量集合
|
||||
/// </summary>
|
||||
[ExcelIgnore]
|
||||
public List<PlcVariable> VarList { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 变量属性类
|
||||
/// </summary>
|
||||
public class PlcVariable
|
||||
{
|
||||
/// <summary>
|
||||
/// PLC编号
|
||||
/// </summary>
|
||||
public int PlcNum { get; set; }
|
||||
/// <summary>
|
||||
/// 变量名称
|
||||
/// </summary>
|
||||
public string VarName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 变量地址
|
||||
/// </summary>
|
||||
public string VarAddress { get; set; }
|
||||
/// <summary>
|
||||
/// 起始索引
|
||||
/// </summary>
|
||||
public string Start { get; set; }
|
||||
/// <summary>
|
||||
/// 数据类型
|
||||
/// </summary>
|
||||
public string DataType { get; set; }
|
||||
/// <summary>
|
||||
/// 偏移或长度
|
||||
/// </summary>
|
||||
public int OffsetOrLength { get; set; }
|
||||
/// <summary>
|
||||
/// 所属通信组名称
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
/// <summary>
|
||||
/// 机架号,对于物流线需要带线号,对于组盘机只要子架号
|
||||
/// </summary>
|
||||
public string StationName { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class PlcStates
|
||||
{
|
||||
// ... 现有的属性 ...
|
||||
public short OldStatus { get; set; }
|
||||
public int StatusCount { get; set; }
|
||||
public string GuidAlarm { get; set; }
|
||||
public List<bool> Status { get; set; }
|
||||
}
|
||||
|
||||
// 串口配置类
|
||||
public class SerialPortConfig
|
||||
{
|
||||
public bool IsActive { get; set; }
|
||||
public string PortName { get; set; }
|
||||
public int BaudRate { get; set; }
|
||||
public string DeviceName { get; set; }
|
||||
public SerialPort serialPort { get; set; }
|
||||
public bool IsConnected { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("JinYuan.Models")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("JinYuan.Models")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("4c0bcb84-5cd7-4846-8363-c4c10d46e391")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class BTWConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否连接打印机服务器
|
||||
/// </summary>
|
||||
public bool IsConnectPrinter;
|
||||
/// <summary>
|
||||
/// 箱唛码模板路径
|
||||
/// </summary>
|
||||
public string containerBTWPath;
|
||||
|
||||
/// <summary>
|
||||
/// 栈板码模板路径
|
||||
/// </summary>
|
||||
public string palletBTWPath;
|
||||
|
||||
/// <summary>
|
||||
/// printerName
|
||||
/// </summary>
|
||||
public string printerName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
//using Newtonsoft.Json;
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Diagnostics;
|
||||
//using System.Threading;
|
||||
|
||||
//namespace JinYuan.Models
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 卡板ID及档位类
|
||||
// /// </summary>
|
||||
// public class CartainerConfig
|
||||
// {
|
||||
|
||||
// /// <summary>
|
||||
// /// 卡板ID及档位映射字典
|
||||
// /// </summary>
|
||||
// public Dictionary<string, string> CartainerGrade { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
// /// <summary>
|
||||
// /// 默认卡板ID
|
||||
// /// </summary>
|
||||
// public string DefaultCartainerId { get; set; } = "";
|
||||
|
||||
// /// <summary>
|
||||
// /// 是否启用卡板验证
|
||||
// /// </summary>
|
||||
// public bool EnableCartainerValidation { get; set; } = true;
|
||||
// /// <summary>
|
||||
// /// 根据卡板ID获取档位
|
||||
// /// </summary>
|
||||
// /// <param name="cartainerId">卡板ID</param>
|
||||
// /// <returns>档位信息</returns>
|
||||
// public string GetGrade(string cartainerId)
|
||||
// {
|
||||
// if (CartainerGrade.ContainsKey(cartainerId))
|
||||
// {
|
||||
// return CartainerGrade[cartainerId];
|
||||
// }
|
||||
// return string.Empty;
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 添加或更新卡板档位
|
||||
// /// </summary>
|
||||
// /// <param name="cartainerId">卡板ID</param>
|
||||
// /// <param name="grade">档位</param>
|
||||
// public void AddOrUpdateCartainer(string cartainerId, string grade)
|
||||
// {
|
||||
// if (CartainerGrade.ContainsKey(cartainerId))
|
||||
// {
|
||||
// CartainerGrade[cartainerId] = grade;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// CartainerGrade.Add(cartainerId, grade);
|
||||
// }
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 移除卡板
|
||||
// /// </summary>
|
||||
// /// <param name="cartainerId">卡板ID</param>
|
||||
// /// <returns>是否成功移除</returns>
|
||||
// public bool RemoveCartainer(string cartainerId)
|
||||
// {
|
||||
// return CartainerGrade.Remove(cartainerId);
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 清空所有卡板数据
|
||||
// /// </summary>
|
||||
// public void ClearAll()
|
||||
// {
|
||||
// CartainerGrade.Clear();
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 验证卡板ID是否存在
|
||||
// /// </summary>
|
||||
// /// <param name="cartainerId">卡板ID</param>
|
||||
// /// <returns>是否存在</returns>
|
||||
// public bool ContainsCartainer(string cartainerId)
|
||||
// {
|
||||
// return CartainerGrade.ContainsKey(cartainerId);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@@ -0,0 +1,317 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 通信设备实体类
|
||||
/// </summary>
|
||||
public class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// IP地址
|
||||
/// </summary>
|
||||
public string IPAddress { get; set; }
|
||||
/// <summary>
|
||||
/// 端口
|
||||
/// </summary>
|
||||
public int Port { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// PLC类型
|
||||
/// </summary>
|
||||
public string PLCType { get; set; }
|
||||
/// <summary>
|
||||
/// 当前设备的连接状态
|
||||
/// </summary>
|
||||
|
||||
public bool IsConnected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是首次连接
|
||||
/// </summary>
|
||||
|
||||
public bool IsFirstConnect { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 重连周期
|
||||
/// </summary>
|
||||
|
||||
public int ReConnectTime { get; set; } = 2000;
|
||||
|
||||
/// <summary>
|
||||
/// 休眠时间
|
||||
/// </summary>
|
||||
|
||||
public int SleepTime { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// 大小端
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public int DataFormat { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 出错次数
|
||||
/// </summary>
|
||||
public int ErrorTimes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 容错次数
|
||||
/// </summary>
|
||||
public int AllowErrorTimes { get; set; } = 3;
|
||||
|
||||
/// <summary>
|
||||
/// 多线程取消源标志位
|
||||
/// </summary>
|
||||
public CancellationTokenSource Cts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 计时器
|
||||
/// </summary>
|
||||
|
||||
public Stopwatch Stopwatch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所有归档变量的集合
|
||||
/// </summary>
|
||||
|
||||
public List<Variable> StoreVarList { get; set; } = new List<Variable>();
|
||||
|
||||
/// <summary>
|
||||
/// 按工位读取
|
||||
/// </summary>
|
||||
|
||||
public List<Group> WorkVarList { get; set; } = new List<Group>();
|
||||
/// <summary>
|
||||
/// 通信组集合
|
||||
/// </summary>
|
||||
public List<Group> GroupList { get; set; } = new List<Group>();
|
||||
/// <summary>
|
||||
/// 所有变量的集合
|
||||
/// </summary>
|
||||
public List<Variable> VarList { get; set; } = new List<Variable>();
|
||||
|
||||
/// <summary>
|
||||
/// 所有变量名称与值的集合
|
||||
/// </summary>
|
||||
public Dictionary<string, object> CurrentValue { get; set; } = new Dictionary<string, object>();
|
||||
|
||||
/// <summary>
|
||||
/// 定义报警触发和消除事件
|
||||
/// </summary>
|
||||
//public event Action<bool, Variable> AlarmTrigEvent;
|
||||
|
||||
/// <summary>
|
||||
/// 变量初始化
|
||||
/// </summary>
|
||||
public void Init()
|
||||
{
|
||||
foreach (var gp in GroupList)
|
||||
{
|
||||
|
||||
if (gp.IsTiggerRead)
|
||||
{
|
||||
WorkVarList.Add(gp);
|
||||
}
|
||||
foreach (var variable in gp.VarList)
|
||||
{
|
||||
if (!gp.IsTiggerRead)
|
||||
{
|
||||
VarList.Add(variable);
|
||||
|
||||
|
||||
if (CurrentValue.ContainsKey(variable.VarName))
|
||||
{
|
||||
CurrentValue[variable.VarName] = "NA";
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentValue.Add(variable.VarName, "NA");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 索引器,通过键名获取到数据
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
[JsonIgnore]
|
||||
public object this[string key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CurrentValue.ContainsKey(key))
|
||||
{
|
||||
return CurrentValue[key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 实时更新
|
||||
/// </summary>
|
||||
/// <param name="variable"></param>
|
||||
public void Update(Variable variable)
|
||||
{
|
||||
//更新处理
|
||||
if (CurrentValue.ContainsKey(variable.VarName))
|
||||
{
|
||||
CurrentValue[variable.VarName] = variable.VarValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentValue.Add(variable.VarName, variable.VarValue);
|
||||
}
|
||||
|
||||
//报警处理
|
||||
if (variable.HighAlarmEnable || variable.LowAlarmEnable)
|
||||
{
|
||||
float compareValue = 0.0f;
|
||||
|
||||
if (variable.DataType.ToLower() == "bool")
|
||||
{
|
||||
compareValue = Convert.ToBoolean(variable.VarValue) ? 1.0f : 0.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
compareValue = Convert.ToSingle(variable.VarValue);
|
||||
}
|
||||
|
||||
int compareResult = 0;
|
||||
//高报警时,触发事件
|
||||
if (variable.HighAlarmEnable)
|
||||
{
|
||||
compareResult = Compare(compareValue, variable.HighAlarmValue, variable.HighAlarmCacheValue, true);
|
||||
|
||||
if (compareResult != 0)
|
||||
{
|
||||
//通过事件做通知
|
||||
|
||||
OnAlarmAckEvent(variable, new AlarmEventArgs()
|
||||
{
|
||||
Name = variable.VarName,
|
||||
CurrentValue = variable.VarValue.ToString(),
|
||||
SetValue = variable.HighAlarmValue.ToString(),
|
||||
AlarmNote = variable.HighAlarmNote,
|
||||
IsTrigger = compareResult == 1
|
||||
});
|
||||
}
|
||||
|
||||
variable.HighAlarmCacheValue = compareValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
compareResult = Compare(compareValue, variable.LowAlarmValue, variable.LowAlarmCacheValue, false);
|
||||
|
||||
if (compareResult != 0)
|
||||
{
|
||||
//通过事件做通知
|
||||
|
||||
OnAlarmAckEvent(variable, new AlarmEventArgs()
|
||||
{
|
||||
Name = variable.VarName,
|
||||
CurrentValue = variable.VarValue.ToString(),
|
||||
SetValue = variable.LowAlarmValue.ToString(),
|
||||
AlarmNote = variable.LowAlarmNote,
|
||||
IsTrigger = compareResult == 1
|
||||
});
|
||||
|
||||
}
|
||||
variable.LowAlarmCacheValue = compareValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 报警触发的事件
|
||||
/// </summary>
|
||||
//public event AlarmTriggerEventDelegate AlarmTriggerEvent;
|
||||
|
||||
/// <summary>
|
||||
/// 触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnAlarmAckEvent(object sender, AlarmEventArgs e)
|
||||
{
|
||||
//AlarmTriggerEvent?.Invoke(sender, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 报警比较
|
||||
/// </summary>
|
||||
/// <param name="current">当前值</param>
|
||||
/// <param name="set">设置值</param>
|
||||
/// <param name="last">缓存值</param>
|
||||
/// <param name="isPositive">上升沿还是下降沿</param>
|
||||
/// <returns>比较结果,1表示触发,-1表示消除,0表示无变化</returns>
|
||||
private int Compare(float current, float set, float last, bool isPositive)
|
||||
{
|
||||
if (isPositive)
|
||||
{
|
||||
if (current >= set && last < set)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (current < set && last >= set)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (current <= set && last > set)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (current > set && last <= set)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class AlarmEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// 变量名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前值
|
||||
/// </summary>
|
||||
public string CurrentValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警说明
|
||||
/// </summary>
|
||||
public string AlarmNote { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警设定值
|
||||
/// </summary>
|
||||
public string SetValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否为触发
|
||||
/// </summary>
|
||||
public bool IsTrigger { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 所有窗体枚举,小于临界窗体的为固定窗体,不执行关闭
|
||||
/// </summary>
|
||||
public enum FormNames
|
||||
{
|
||||
集中监控,
|
||||
数据监控,
|
||||
日志报警,
|
||||
临界窗体,
|
||||
电池状况,
|
||||
数据追溯,
|
||||
参数设置,
|
||||
系统设置,
|
||||
用户管理
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class FDConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 编号
|
||||
/// </summary>
|
||||
|
||||
public int FdNum { get; set; }
|
||||
/// <summary>
|
||||
/// OK拉带类型1
|
||||
/// </summary>
|
||||
public string Grade1 { get; set; }
|
||||
/// <summary>
|
||||
/// OK拉带类型2
|
||||
/// </summary>
|
||||
public string Grade2 { get; set; }
|
||||
/// <summary>
|
||||
/// OK拉带类型3
|
||||
/// </summary>
|
||||
public string Grade3 { get; set; }
|
||||
/// <summary>
|
||||
/// 是否开启分档
|
||||
/// </summary>
|
||||
public bool IsFDActive { get; set; }
|
||||
/// <summary>
|
||||
///是否激活NG电池不分类排出
|
||||
/// </summary>
|
||||
|
||||
//public bool IsNGActive { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class FDConfigMapping
|
||||
{
|
||||
/// <summary>
|
||||
/// 编号
|
||||
/// </summary>
|
||||
public int FDNum { get; set; }
|
||||
/// <summary>
|
||||
/// 分档类型
|
||||
/// </summary>
|
||||
public string FDName { get; set; }
|
||||
|
||||
public string ModelType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using MiniExcelLibs.Attributes;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 通信组实体类
|
||||
/// </summary>
|
||||
public class Group
|
||||
{
|
||||
/// <summary>
|
||||
///通信组名称
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
/// <summary>
|
||||
/// 起始地址
|
||||
/// </summary>
|
||||
public string Start { get; set; }
|
||||
/// <summary>
|
||||
/// 长度
|
||||
/// </summary>
|
||||
public ushort Length { get; set; }
|
||||
/// <summary>
|
||||
/// 是否为触发读取
|
||||
/// </summary>
|
||||
public bool IsTiggerRead { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否需要反馈结果到PLC
|
||||
/// </summary>
|
||||
public bool IsFeedbackPlc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsActive { get; set; }
|
||||
/// <summary>
|
||||
/// 备注说明
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 变量集合
|
||||
/// </summary>
|
||||
[ExcelIgnore]
|
||||
public List<Variable> VarList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class PLCConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// PLC编号
|
||||
/// </summary>
|
||||
|
||||
public int PlcNum { get; set; }
|
||||
/// <summary>
|
||||
/// PLC类型
|
||||
/// </summary>
|
||||
public string PLCType { get; set; }
|
||||
/// <summary>
|
||||
/// IP地址
|
||||
/// </summary>
|
||||
public string IPAddress { get; set; }
|
||||
/// <summary>
|
||||
/// 端口号
|
||||
/// </summary>
|
||||
public string Port { get; set; }
|
||||
/// <summary>
|
||||
/// 心跳地址
|
||||
/// </summary>
|
||||
|
||||
public string HeartBeat { get; set; }
|
||||
/// <summary>
|
||||
/// 是否启用心跳
|
||||
/// </summary>
|
||||
|
||||
public bool IsHeartBeat { get; set; }
|
||||
/// <summary>
|
||||
///PLC是否激活
|
||||
/// </summary>
|
||||
|
||||
public bool IsActive { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class PLCGroupVariable : Variable
|
||||
{
|
||||
/// <summary>
|
||||
/// 变量名称
|
||||
/// </summary>
|
||||
public int ArrayStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电池数量
|
||||
/// </summary>
|
||||
public int CellSum { get; set; }
|
||||
/// <summary>
|
||||
/// 电池名称
|
||||
/// </summary>
|
||||
public string BTName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ParamBase
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public ParamBase()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 序号
|
||||
/// </summary>
|
||||
public System.Int32? fNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 参数名称
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public System.String ParaName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public System.String Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class ParamList
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public System.String ModelName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public System.String ParaName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public System.String ParaValueMin { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public System.String ParaValueMax { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public System.String Uint { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public System.String Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public System.DateTime? UpdateTime { get; set; } = System.DateTime.Now;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class PlcGroupConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// PLC编号
|
||||
/// </summary>
|
||||
private int _plcNum;
|
||||
public int PlcNum
|
||||
{
|
||||
get => _plcNum;
|
||||
set
|
||||
{
|
||||
if (_plcNum == value) return;
|
||||
_plcNum = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通信组
|
||||
/// </summary>
|
||||
private string _groupName;
|
||||
public string GroupName
|
||||
{
|
||||
get => _groupName;
|
||||
set
|
||||
{
|
||||
if (_groupName == value) return;
|
||||
_groupName = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通信组起始地址
|
||||
/// </summary>
|
||||
private string _start;
|
||||
public string Start
|
||||
{
|
||||
get => _start;
|
||||
set
|
||||
{
|
||||
if (_start == value) return;
|
||||
_start = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private int _length;
|
||||
|
||||
public int Length
|
||||
{
|
||||
get => _length;
|
||||
set
|
||||
{
|
||||
if (_length == value) return;
|
||||
_length = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private bool _isTiggerRead;
|
||||
/// <summary>
|
||||
/// 是否触发读取
|
||||
/// </summary>
|
||||
public bool IsTiggerRead
|
||||
{
|
||||
get => _isTiggerRead;
|
||||
set
|
||||
{
|
||||
if (_isTiggerRead == value) return;
|
||||
_isTiggerRead = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private bool _isFeedbackPlc;
|
||||
/// <summary>
|
||||
///是否有返回PLC
|
||||
/// </summary>
|
||||
public bool IsFeedbackPlc
|
||||
{
|
||||
get => _isFeedbackPlc;
|
||||
set
|
||||
{
|
||||
if (_isFeedbackPlc == value) return;
|
||||
_isFeedbackPlc = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isActive;
|
||||
/// <summary>
|
||||
/// 是否激活
|
||||
/// </summary>
|
||||
public bool IsActive
|
||||
{
|
||||
get => _isActive;
|
||||
set
|
||||
{
|
||||
if (_isActive == value) return;
|
||||
_isActive = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private string _remark;
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark
|
||||
{
|
||||
get => _remark;
|
||||
set
|
||||
{
|
||||
if (_remark == value) return;
|
||||
_remark = value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class ProductModel
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public System.String ModelName { get; set; }
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public System.String MaterialCode { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public System.String Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 产品型号参数范围
|
||||
/// </summary>
|
||||
public class ProductModelParam
|
||||
{
|
||||
/// <summary>
|
||||
/// OCV内阻最大值
|
||||
/// </summary>
|
||||
public decimal OcvIrMax { set; get; }
|
||||
/// <summary>
|
||||
/// OCV内阻最小值
|
||||
/// </summary>
|
||||
public decimal OcvIrMin { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// OCV电压最大值
|
||||
/// </summary>
|
||||
public decimal OcvVoltageMax { set; get; }
|
||||
/// <summary>
|
||||
/// OCV电压最小值
|
||||
/// </summary>
|
||||
public decimal OcvVoltageMin { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// OCV静置时间最大值
|
||||
/// </summary>
|
||||
public decimal OcvTimeMax { set; get; }
|
||||
/// <summary>
|
||||
/// OCV静置时间最小值
|
||||
/// </summary>
|
||||
public decimal OcvTimeMin { set; get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 常数A
|
||||
/// </summary>
|
||||
public decimal CoefficientA { get; set; }
|
||||
/// <summary>
|
||||
///常数B
|
||||
/// </summary>
|
||||
public decimal ExponentB { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 登录实体类型
|
||||
/// </summary>
|
||||
public class SysAdmin
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, IsIgnore = true)]
|
||||
public int LoginId { get; set; }
|
||||
public string LoginName { get; set; }
|
||||
public string LoginPwd { get; set; }
|
||||
public string LoginUid { get; set; }
|
||||
public string LoginLevel { get; set; }
|
||||
public bool SystemLog { get; set; }
|
||||
public bool CpkData { get; set; }
|
||||
public bool HistoryData { get; set; }
|
||||
public bool ParamSet { get; set; }
|
||||
public bool SystemSet { get; set; }
|
||||
public bool UserManage { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class SysConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 开机自动启动
|
||||
/// </summary>
|
||||
public bool AutoStart { get; set; }
|
||||
/// <summary>
|
||||
///启动自动登录
|
||||
/// </summary>
|
||||
public bool AutoLogin { get; set; }
|
||||
/// <summary>
|
||||
///无操作自动锁屏
|
||||
/// </summary>
|
||||
public bool AutoLock { get; set; }
|
||||
/// <summary>
|
||||
///锁屏间隙时间,单位是分钟
|
||||
/// </summary>
|
||||
public int LockPeriod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///无操作自动锁屏
|
||||
/// </summary>
|
||||
public bool AutoQieHuanM { get; set; }
|
||||
/// <summary>
|
||||
///锁屏间隙时间,单位是分钟
|
||||
/// </summary>
|
||||
public int QieHuanMPeriod { get; set; }
|
||||
/// <summary>
|
||||
/// 调试模式
|
||||
/// </summary>
|
||||
public bool IsDebugMode { get; set; }
|
||||
/// <summary>
|
||||
///曲线显示数量
|
||||
/// </summary>
|
||||
public int ShowSeriesCount { get; set; }
|
||||
/// <summary>
|
||||
/// 开启刷卡模式
|
||||
/// </summary>
|
||||
public bool SwipeCardMode { get; set; }
|
||||
/// <summary>
|
||||
/// MES/非MES模式切换
|
||||
/// </summary>
|
||||
public bool MesModeSwitching { get; set; }
|
||||
/// <summary>
|
||||
/// 成品电池/半成品电池绑盘
|
||||
/// </summary>
|
||||
public bool FinishSwitching { get; set; }
|
||||
/// <summary>
|
||||
/// 切屏
|
||||
/// </summary>
|
||||
public bool ScreenCutting { get; set; }
|
||||
/// <summary>
|
||||
/// 获取MES参数
|
||||
/// </summary>
|
||||
public bool GetMesParam { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 线程耗时日志保存
|
||||
/// </summary>
|
||||
public bool SaveThreadTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开启无卷芯码进出站一体模式
|
||||
/// </summary>
|
||||
public bool NoRollCodeMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开启物流线分拣模式
|
||||
/// </summary>
|
||||
public bool WuLiu { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工位号
|
||||
/// </summary>
|
||||
public string GongWei { get; set; }
|
||||
/// <summary>
|
||||
/// 生产线号
|
||||
/// </summary>
|
||||
public string LineNo { get; set; }
|
||||
/// <summary>
|
||||
/// 机架号
|
||||
/// </summary>
|
||||
public string StationNo { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class SysLog
|
||||
{
|
||||
/// <summary>
|
||||
/// 插入时间
|
||||
/// </summary>
|
||||
public string InsertTime { get; set; }
|
||||
/// <summary>
|
||||
/// 报警类型
|
||||
/// </summary>
|
||||
public string LogType { get; set; }
|
||||
/// <summary>
|
||||
/// 日志信息
|
||||
/// </summary>
|
||||
public string Note { get; set; }
|
||||
/// <summary>
|
||||
/// 操作人员
|
||||
/// </summary>
|
||||
public string Operater { get; set; }
|
||||
/// <summary>
|
||||
/// 变量名称
|
||||
/// </summary>
|
||||
public string VarName { get; set; }
|
||||
/// <summary>
|
||||
/// 报警设置值
|
||||
/// </summary>
|
||||
public string AlarmSet { get; set; }
|
||||
/// <summary>
|
||||
/// 报警值
|
||||
/// </summary>
|
||||
public string AlarmValue { get; set; }
|
||||
/// <summary>
|
||||
/// 报警类型
|
||||
/// </summary>
|
||||
public string AlarmType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
using MiniExcelLibs.Attributes;
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 变量属性类
|
||||
/// </summary>
|
||||
public class Variable
|
||||
{
|
||||
/// <summary>
|
||||
/// 变量名称
|
||||
/// </summary>
|
||||
public string VarName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 变量地址
|
||||
/// </summary>
|
||||
public string VarAddress { get; set; }
|
||||
/// <summary>
|
||||
/// 起始索引
|
||||
/// </summary>
|
||||
public string Start { get; set; }
|
||||
/// <summary>
|
||||
/// 数据类型
|
||||
/// </summary>
|
||||
public string DataType { get; set; }
|
||||
/// <summary>
|
||||
/// 偏移或长度
|
||||
/// </summary>
|
||||
public int OffsetOrLenght { get; set; }
|
||||
/// <summary>
|
||||
/// 所属通信组名称
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
/// <summary>
|
||||
/// 备注说明
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 是否上升沿报警
|
||||
/// </summary>
|
||||
public bool PosAlarm { get; set; }
|
||||
/// <summary>
|
||||
/// 是否下降沿报警
|
||||
/// </summary>
|
||||
public bool NegAlarm { get; set; }
|
||||
/// <summary>
|
||||
/// 转换系数
|
||||
/// </summary>
|
||||
public float Scale { get; set; } = 1.0f;
|
||||
/// <summary>
|
||||
/// 偏移值
|
||||
/// </summary>
|
||||
public float Offset { get; set; } = 0.0f;
|
||||
|
||||
/// <summary>
|
||||
/// 变量的值
|
||||
/// </summary>
|
||||
[ExcelIgnore]
|
||||
public object VarValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 高报警启用
|
||||
/// </summary>
|
||||
public bool HighAlarmEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 高报警设定值
|
||||
/// </summary>
|
||||
public float HighAlarmValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 高报警说明
|
||||
/// </summary>
|
||||
public string HighAlarmNote { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 高报警缓存值
|
||||
/// </summary>
|
||||
[ExcelIgnore]
|
||||
public float HighAlarmCacheValue { get; set; }
|
||||
/// <summary>
|
||||
/// 低报警启用
|
||||
/// </summary>
|
||||
public bool LowAlarmEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 低报警设定值
|
||||
/// </summary>
|
||||
public float LowAlarmValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 低报警说明
|
||||
/// </summary>
|
||||
public string LowAlarmNote { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 低报警缓存值
|
||||
/// </summary>
|
||||
[ExcelIgnore]
|
||||
public float LowAlarmCacheValue { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
// 变量配置模型
|
||||
public class VariableConfig
|
||||
{
|
||||
|
||||
public string _varName;
|
||||
|
||||
public string VarName
|
||||
{
|
||||
get => _varName;
|
||||
set
|
||||
{
|
||||
if (_varName == value) return;
|
||||
_varName = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public string _varAddress;
|
||||
public string VarAddress
|
||||
{
|
||||
get => _varAddress;
|
||||
set
|
||||
{
|
||||
if (_varAddress == value) return;
|
||||
_varAddress = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public string _start;
|
||||
public string Start
|
||||
{
|
||||
get => _start;
|
||||
set
|
||||
{
|
||||
if (_start == value) return;
|
||||
_start = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string _dataType;
|
||||
public string DataType
|
||||
{
|
||||
get => _dataType;
|
||||
set
|
||||
{
|
||||
if (_dataType == value) return;
|
||||
_dataType = value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int _offsetOrLength;
|
||||
public int OffsetOrLength
|
||||
{
|
||||
get => _offsetOrLength;
|
||||
set
|
||||
{
|
||||
if (_offsetOrLength == value) return;
|
||||
_offsetOrLength = value;
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// PLC编号
|
||||
/// </summary>
|
||||
private int _plcNum;
|
||||
public int PlcNum
|
||||
{
|
||||
get => _plcNum;
|
||||
set
|
||||
{
|
||||
if (_plcNum == value) return;
|
||||
_plcNum = value;
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 通信组
|
||||
/// </summary>
|
||||
private string _groupName;
|
||||
public string GroupName
|
||||
{
|
||||
get => _groupName;
|
||||
set
|
||||
{
|
||||
if (_groupName == value) return;
|
||||
_groupName = value;
|
||||
|
||||
}
|
||||
}
|
||||
private string _remark;
|
||||
public string Remark
|
||||
{
|
||||
get => _remark;
|
||||
set
|
||||
{
|
||||
if (_remark == value) return;
|
||||
_remark = value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
private string _stationName;
|
||||
public string StationName
|
||||
{
|
||||
get => _stationName;
|
||||
set
|
||||
{
|
||||
if (_stationName == value) return;
|
||||
_stationName = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using JinYuan.Models.HelperAttribute;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Linq;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
|
||||
namespace JinYuan.Models
|
||||
{
|
||||
public class TrayEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 料框码(对应数据库TrayID字段)
|
||||
/// </summary>
|
||||
//[SugarColumn(ColumnName = "TrayID")]
|
||||
[DataGridViewColumn(Name = "trayID")]
|
||||
public string trayID { get; set; }
|
||||
/// <summary>
|
||||
/// 电池型号(对应数据库Model字段)
|
||||
/// </summary>
|
||||
//[SugarColumn(ColumnName = "Model")]
|
||||
[DataGridViewColumn(Name = "model")]
|
||||
public string model { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电池一级档位(对应数据库Grade字段)
|
||||
/// </summary>
|
||||
//[SugarColumn(ColumnName = "Grade")]
|
||||
[DataGridViewColumn(Name = "grade")]
|
||||
public string grade { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电池二级档位(对应数据库MoreGrade字段)
|
||||
/// </summary>
|
||||
//[SugarColumn(ColumnName = "MoreGrade")]
|
||||
[DataGridViewColumn(Name = "moreGrade")]
|
||||
public string moreGrade { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 线体号(对应数据库LineNo字段)
|
||||
/// </summary>
|
||||
//[SugarColumn(ColumnName = "LineNo")]
|
||||
[DataGridViewColumn(Name = "lineNo")]
|
||||
public string lineNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注(对应数据库Remark字段)
|
||||
/// </summary>
|
||||
//[SugarColumn(ColumnName = "Remark")]
|
||||
[DataGridViewColumn(Name = "Remark")]
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 进站时间(对应数据库Time字段)
|
||||
/// </summary>
|
||||
//[SugarColumn(ColumnName = "Time")]
|
||||
[DataGridViewColumn(Name = "Time")]
|
||||
public DateTime Time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电池个数(对应数据库Count字段)
|
||||
/// </summary>
|
||||
//[SugarColumn(ColumnName = "Count")]
|
||||
[DataGridViewColumn(Name = "Count")]
|
||||
public int Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 机架号(对应数据库GongWei字段)
|
||||
/// </summary>
|
||||
//[SugarColumn(ColumnName = "GongWei")]
|
||||
[DataGridViewColumn(Name = "GongWei")]
|
||||
public string GongWei { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结果(对应数据库Result字段)
|
||||
/// </summary>
|
||||
//[SugarColumn(ColumnName = "Result")]
|
||||
[DataGridViewColumn(Name = "Result")]
|
||||
public string Result { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="CsvHelper" version="33.0.1" targetFramework="net48" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net472" />
|
||||
<package id="Microsoft.Bcl.HashCode" version="1.1.1" targetFramework="net472" />
|
||||
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net472" />
|
||||
<package id="MiniExcel" version="1.36.1" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
|
||||
<package id="SqlSugar" version="5.1.4.175" targetFramework="net48" />
|
||||
<package id="System.Buffers" version="4.4.0" targetFramework="net472" />
|
||||
<package id="System.Memory" version="4.5.0" targetFramework="net472" />
|
||||
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user