From eecbbfca320d91a80612f7ef52286cc35f42472d Mon Sep 17 00:00:00 2001 From: ldw <11622064+ldw888@user.noreply.gitee.com> Date: Fri, 5 Sep 2025 15:06:12 +0800 Subject: [PATCH] =?UTF-8?q?mes=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JinYuan.ControlCenter/ControlCenter_Plc.cs | 74 +++++----- JinYuan.MES/IMes.cs | 2 +- JinYuan.MES/MesDataProcess.cs | 53 ++------ JinYuan.MES/Models/ManyCellOutStation.cs | 2 +- JinYuan.Models/BGearEntity.cs | 8 +- JinYuan.Models/JinYuan.Models.csproj | 1 + JinYuan.Models/NgCodeEntity.cs | 21 +++ JinYuan.VirtualDataLibrary/CommonMethods.cs | 5 +- LargeSquareOne/FrmDataMonitor.Designer.cs | 136 +++++++++---------- LargeSquareOne/FrmDataMonitor.resx | 5 +- LargeSquareOne/FrmLogin.cs | 2 + LargeSquareOne/FrmVariableConfig.Designer.cs | 2 +- 12 files changed, 158 insertions(+), 153 deletions(-) create mode 100644 JinYuan.Models/NgCodeEntity.cs diff --git a/JinYuan.ControlCenter/ControlCenter_Plc.cs b/JinYuan.ControlCenter/ControlCenter_Plc.cs index 3be8c15..94301b2 100644 --- a/JinYuan.ControlCenter/ControlCenter_Plc.cs +++ b/JinYuan.ControlCenter/ControlCenter_Plc.cs @@ -9,6 +9,7 @@ using PLCCommunication; using System; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -1775,23 +1776,27 @@ namespace JinYuan.ControlCenters { m.Thickness_Data[i, j] = FloatLib.GetFloatFromByteArray(bArrays.Content, 400 + i * 30 * 2 + j * 4, DataFormat.CDAB); } + for (int j = 0; j < 27; j++) + { + m.CCD_NgNo[i, j] = ShortLib.GetShortFromByteArray(bArrays.Content, 2200 + i * 30 * 2 + j * 2, DataFormat.CDAB); + } //芯包扫码时间 //m.ScanTime[i] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - m.CSBYHCODEA = listBarCode[i]; + m.BarCode = listBarCode[i]; //m.CSBYHCODEA = "TEST"; - var EX = CommonMethods.db.QuerySqlList(CommonMethods.dBSQL.GetChallengeCode(m.CSBYHCODEA)); + var EX = CommonMethods.db.QuerySqlList(CommonMethods.dBSQL.GetChallengeCode(m.BarCode)); for (int j = 0; j < EX.Count; j++) { - if (string.Compare(EX[j].ChallengeBarCode, m.CSBYHCODEA) == 0) + if (string.Compare(EX[j].ChallengeBarCode, m.BarCode) == 0) { m.Remark += "(极限件," + EX[j].CodeMessage + "," + EX[j].WeldingCCD + ")"; ChallengeFlag = 1; } } //查询进站时间数据 - var w = CommonMethods.db.QuerySqlList(CommonMethods.dBSQL.GetInTime(m.CSBYHCODEA)); + var w = CommonMethods.db.QuerySqlList(CommonMethods.dBSQL.GetInTime(m.BarCode)); //获取新一行数据 if (w.Count > 0) TT = w[w.Count - 1]; @@ -1815,7 +1820,7 @@ namespace JinYuan.ControlCenters int Code_NG = 0;//条码有无标志 1为有,2为无 //判断有无条码 - if (m.CSBYHCODEA != null && m.CSBYHCODEA != "" && m.CSBYHCODEA != "ERROR") + if (m.BarCode != null && m.BarCode != "" && m.BarCode != "ERROR") Code_NG = 1; else Code_NG = 2; @@ -1824,10 +1829,10 @@ namespace JinYuan.ControlCenters //m.TestTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); //不良代码判定 - List NGcodeList = new List(); + //List NGcodeList = new List(); //NGcodeList = NGcode(m.list_Data1[i, 10], m.list_Data1[i, 11], m.list_Data1[i, 12], m.list_Data1[i, 15], m.list_Data1[i, 26], m.list_Data1[i, 16] // , m.list_Data1[i, 17], m.list_Data1[i, 18], m.list_Data1[i, 19], m.list_Data1[i, 23], m.list_Data1[i, 24], m.list_Data1[i, 25], m.list_Data1[i, 27]); - NGcodeList = NGWGJcode(m.CCD_Data, i); + // var (NGcodeList, NGmessage) = NGWGJcode(m.CCD_Data, i); //电芯CCD判定结果 #region //电芯CCD判定结果 1 0K 0NG 2缺图 @@ -1894,7 +1899,7 @@ namespace JinYuan.ControlCenters m.CSBYHOUTSTATIONJUDGMENTRESULT = m.judgment_result[i] = OK_NG; m.Remark += NG_Type; - + m.MaterialCode = CommonMethods.mesConfig.MaterialCode; NG_Type = "";//清除上一次不良字符串 OK_NG = ""; //清除上一次结果 @@ -1924,8 +1929,8 @@ namespace JinYuan.ControlCenters int type = 1; //int type = 1; //string materialLotCodeLocator = ""; - - bool Res = CommonMethods.hbgMes.OutboundInformations(url, siteCode, lineCode, equipNum, materialCode, userName, m, ref MesMessage, ref mesResType, NGcodeList); + var (NGcodeList, NGmessage) = NGWGJcode(m.CCD_NgNo, i); + bool Res = CommonMethods.hbgMes.OutboundInformations(url, siteCode, lineCode, equipNum, materialCode, userName, m, ref MesMessage, ref mesResType, NGcodeList, NGmessage); //bool Res = CommonMethods.hbgMes.SingleCellOutStation(url, siteCode, lineCode, equipNum, materialCode, userName, m,) if (MesMessage.Contains("发生一个或多个错误")) { @@ -2125,29 +2130,9 @@ namespace JinYuan.ControlCenters string strRes = ""; foreach (BGearEntity m in list) { - if (true) - { - bool b = CommonMethods.db.AddReturnBool(m); - //strRes = b ? ",本存Yes" : ",本存No"; - - #region 存储到服务器 - try - { - //int b1 = CommonMethods.dbServer.Delete(it => it.containerCode == m.RFID); - //bool res = CommonMethods.dbServer.AddReturnBool(server); - //strRes += res == true ? ",远存Yes" : ",远存No"; - } - catch (Exception ex) - { - //JYResult result = CommonMethods.PlcLink.WriteValue("D80", 1, Data_Type.Short);//反馈PLC结果 - //CommonMethods.AddDataMonitorLog(1, $"服务器连接失败!解决办法:1、请检查MES网络,2、查看服务器是否正常!"); - //LogHelper.Instance.WriteError($"服务器连接失败:{ex}", "系统报错"); - } - - #endregion - - } - else + bool b = CommonMethods.db.AddReturnBool(m); + + if(!b) { strRes = ",不存储"; } @@ -2250,19 +2235,32 @@ namespace JinYuan.ControlCenters return NGcodelist; } //下料不良代码 外观检 - public List NGWGJcode(int[ ,] lstResult,int index) + public (List, List) NGWGJcode(int[,] lstResult, int index) { + List NGcodelist = new List(); + List NGmessagelist = new List(); for (int i = 0; i < 27; i++) { - if(lstResult[index,i] !=1) + if (lstResult[index, i] != 0) { - NGcodelist.Add("WGJA00"+(i+1)); + var strCode = lstResult[index, i].ToString().PadLeft(3, '0'); + NGcodelist.Add($"PFVA{strCode}"); + var codeEntity = CommonMethods.listNgCodeEntity.FirstOrDefault(x => strCode == x.ngCode); + if (codeEntity != null) + { + NGmessagelist.Add(codeEntity.ngMessage); + } + else + { + NGmessagelist.Add("未知错误"); + } } } - - return NGcodelist; + + return (NGcodelist, NGmessagelist); } + #endregion #region NG下料不良代码 diff --git a/JinYuan.MES/IMes.cs b/JinYuan.MES/IMes.cs index 6ad1c8f..d210218 100644 --- a/JinYuan.MES/IMes.cs +++ b/JinYuan.MES/IMes.cs @@ -105,7 +105,7 @@ namespace JinYuan.MES /// /// /// - bool OutboundInformations(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, BGearEntity listBar, ref string MesMessage, ref MesResType mesResType, List NGcodeList); + bool OutboundInformations(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, BGearEntity listBar, ref string MesMessage, ref MesResType mesResType, List NGcodeList,List ngMessage); /// diff --git a/JinYuan.MES/MesDataProcess.cs b/JinYuan.MES/MesDataProcess.cs index a8898f9..fea9647 100644 --- a/JinYuan.MES/MesDataProcess.cs +++ b/JinYuan.MES/MesDataProcess.cs @@ -515,7 +515,7 @@ namespace JinYuan.MES JArray jaIdentiftyList = new JArray();//identiftyList JObject jo3 = new JObject(); - jo3.Add("identification", m.CSBYHCODEA); //卷心码 + jo3.Add("identification", m.BarCode); //卷心码 jo3.Add("qualityStatus", m.Result); jo3.Add("qrCode", ""); // jo3.Add("ngMessage", m.Remark); @@ -554,7 +554,7 @@ namespace JinYuan.MES long outTime = sw.ElapsedMilliseconds; if (outTime > 1000) { - LoggerHelp.WriteLog($"钢壳进出站PC<=>MES上传耗时:{outTime}ms,钢壳码:{m.CSBYHCODEA}", "MESTime"); + LoggerHelp.WriteLog($"钢壳进出站PC<=>MES上传耗时:{outTime}ms,钢壳码:{m.BarCode}", "MESTime"); } if (string.IsNullOrEmpty(result)) @@ -569,7 +569,7 @@ namespace JinYuan.MES if (res1.success) { res = true; - GetOutMesResType(res1, m.CSBYHCODEA, ref mesage, ref mesResType); + GetOutMesResType(res1, m.BarCode, ref mesage, ref mesResType); resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息\{nowDate.ToString("HH")}.txt", resJson); } @@ -625,7 +625,7 @@ namespace JinYuan.MES JArray jaIdentiftyList = new JArray();//identiftyList JObject jo3 = new JObject(); - jo3.Add("identification", m.CSBYHCODEA); //卷心码 + jo3.Add("identification", m.BarCode); //卷心码 jo3.Add("qualityStatus", m.Result); jo3.Add("qrCode", ""); // jo3.Add("ngMessage", m.Remark); @@ -664,7 +664,7 @@ namespace JinYuan.MES long outTime = sw.ElapsedMilliseconds; if (outTime > 1000) { - LoggerHelp.WriteLog($"钢壳进出站PC<=>MES上传耗时:{outTime}ms,钢壳码:{m.CSBYHCODEA}", "MESTime"); + LoggerHelp.WriteLog($"钢壳进出站PC<=>MES上传耗时:{outTime}ms,钢壳码:{m.BarCode}", "MESTime"); } if (string.IsNullOrEmpty(result)) @@ -679,7 +679,7 @@ namespace JinYuan.MES if (res1.success) { res = true; - GetOutMesResType(res1, m.CSBYHCODEA, ref mesage, ref mesResType); + GetOutMesResType(res1, m.BarCode, ref mesage, ref mesResType); resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用进出站一体信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进出站一体信息(组装)\{nowDate.ToString("HH")}.txt", resJson); } @@ -705,7 +705,7 @@ namespace JinYuan.MES /// /// /// - public bool OutboundInformations(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, BGearEntity listBar, ref string MesMessage, ref MesResType mesResType, List NGcodeList) + public bool OutboundInformations(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, BGearEntity listBar, ref string MesMessage, ref MesResType mesResType, List NGcodeList, List ngMessage) { @@ -725,7 +725,7 @@ namespace JinYuan.MES userName = userName, containerCode = "", materialCode = materialCode, - productType = "OK", + productType = "MB56", //completeQty = listBar.Count.ToString(), type = 1 }; @@ -737,39 +737,16 @@ namespace JinYuan.MES { new assembleLineList() { - identification=listBar.CSBYHCODEA, + identification=listBar.BarCode, qualityStatus = listBar.CSBYHOUTSTATIONJUDGMENTRESULT, qrCode = "", ngCode = NGcodeList, - ngMessage = listBar.Remark, + ngMessage = string.Join(",",ngMessage), materialLotList=new List{}, materialLotCode= "", } }; - //cc.identification = listBar[i].BarCode; - //cc.materialLotList = GetListString(1, ""); - //cc.materialLotCode = ""; - //cc.materialLotCodeLocator = ""; - //cc.qualityStatus = listBar[i].Result.ToString(); - //cc.qrCode = ""; - //cc.ngCode = GetListString(1, ""); - //cc. - //model.containerCodeAndIdentificationList[i].identiftyList.Add(new IdentiftyListItems - //{ - // identification = listBar[i].BarCode, - // qualityStatus ="OK" , - // qrCode = "", - // ngMessage = listBar[i].Remark, - - //}); - //model.containerCodeAndIdentificationList[i].identiftyList[i].materialLotList = new List(); - //model.containerCodeAndIdentificationList[i].identiftyList[i].materialLotList.Add(new MaterialLotListItems - //{ - // materialLotCode = "", - // materialLotCodeLocator = "", - //}); - //model.containerCodeAndIdentificationList.Add(cc); } @@ -784,7 +761,7 @@ namespace JinYuan.MES long outTime = sw.ElapsedMilliseconds; if (outTime > 1000) { - LoggerHelp.WriteLog($"外观检出站PC<=>MES上传耗时:{outTime}ms,电芯码:{listBar.CSBYHCODEA}", "MESTime"); + LoggerHelp.WriteLog($"外观检出站PC<=>MES上传耗时:{outTime}ms,电芯码:{listBar.BarCode}", "MESTime"); } if (string.IsNullOrEmpty(result)) @@ -799,13 +776,13 @@ namespace JinYuan.MES if (res1.success) { res = true; - GetOutMesResType(res1, listBar.CSBYHCODEA, ref MesMessage, ref mesResType); + GetOutMesResType(res1, listBar.BarCode, ref MesMessage, ref mesResType); resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(包装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(包装)\{nowDate.ToString("HH")}.txt", resJson); } else { - GetOutMesResType(res1, listBar.CSBYHCODEA, ref MesMessage, ref mesResType); + GetOutMesResType(res1, listBar.BarCode, ref MesMessage, ref mesResType); var resData = res1 == null ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(包装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(包装)\{nowDate.ToString("HH")}.txt", resJson); @@ -1142,7 +1119,7 @@ namespace JinYuan.MES }; payload1.identification = new IdentificationListItem { - identification = m.CSBYHCODEA, + identification = m.BarCode, qualityStatus = m.CSBYHOUTSTATIONJUDGMENTRESULT, }; @@ -1721,7 +1698,7 @@ namespace JinYuan.MES { for (int j = 0; j < res1.total; j++) { - if (res1.rows[j].identification == list[i].CSBYHCODEA) + if (res1.rows[j].identification == list[i].BarCode) { if (res1.rows[j].success) { diff --git a/JinYuan.MES/Models/ManyCellOutStation.cs b/JinYuan.MES/Models/ManyCellOutStation.cs index f6b8a98..a36efd3 100644 --- a/JinYuan.MES/Models/ManyCellOutStation.cs +++ b/JinYuan.MES/Models/ManyCellOutStation.cs @@ -44,7 +44,7 @@ namespace JinYuan.MES.Models /// 1:通用出站;2:合芯出站;3:虚拟码替换出站;4:追溯标识替换出站;5:合芯有顶盖出站 /// public int type { get; set; } - + // public List identiftyList { get; set; } public List assembleLineList { get; set; } } diff --git a/JinYuan.Models/BGearEntity.cs b/JinYuan.Models/BGearEntity.cs index 6af674d..3f9a027 100644 --- a/JinYuan.Models/BGearEntity.cs +++ b/JinYuan.Models/BGearEntity.cs @@ -21,6 +21,7 @@ namespace JinYuan.Models public short[,] list_pan = new short[3, 1];//物流线托盘码 // public int[,] CCD_Data = new int[3, 27];//芯包CCD信息1,2,3 + public int[,] CCD_NgNo = new int[3, 27];//芯包不良编码信息1,2,3 public float[,] Thickness_Data = new float[3, 3];//电芯3_厚度数据信息1,2,3 /// /// 时间 @@ -115,7 +116,12 @@ namespace JinYuan.Models /// /// 芯包条码 /// - public string CSBYHCODEA { get; set; } + public string BarCode { get; set; } + /// + /// 物料编码 + /// + public string MaterialCode { get; set; } + /// /// 电芯A/B出站判定结果 /// diff --git a/JinYuan.Models/JinYuan.Models.csproj b/JinYuan.Models/JinYuan.Models.csproj index 89adaba..2fc0010 100644 --- a/JinYuan.Models/JinYuan.Models.csproj +++ b/JinYuan.Models/JinYuan.Models.csproj @@ -80,6 +80,7 @@ + diff --git a/JinYuan.Models/NgCodeEntity.cs b/JinYuan.Models/NgCodeEntity.cs new file mode 100644 index 0000000..ae73695 --- /dev/null +++ b/JinYuan.Models/NgCodeEntity.cs @@ -0,0 +1,21 @@ +using SqlSugar; + +namespace JinYuan.Models +{ + /// + /// NGCode + /// + public class NgCodeEntity + { + /// + /// 编码 + /// + public string ngCode { get; set; } + /// + /// 不良信息 + /// + public string ngMessage { get; set; } + + + } +} diff --git a/JinYuan.VirtualDataLibrary/CommonMethods.cs b/JinYuan.VirtualDataLibrary/CommonMethods.cs index ea17426..bd95cc2 100644 --- a/JinYuan.VirtualDataLibrary/CommonMethods.cs +++ b/JinYuan.VirtualDataLibrary/CommonMethods.cs @@ -66,7 +66,10 @@ namespace JinYuan.VirtualDataLibrary //创建一个全局的配置对象 public static SysConfig sysConfig = new SysConfig(); - + /// + /// 创建全局的登录对象 + /// + public static List listNgCodeEntity = new List(); diff --git a/LargeSquareOne/FrmDataMonitor.Designer.cs b/LargeSquareOne/FrmDataMonitor.Designer.cs index 8ebb1fc..fb47d16 100644 --- a/LargeSquareOne/FrmDataMonitor.Designer.cs +++ b/LargeSquareOne/FrmDataMonitor.Designer.cs @@ -29,21 +29,21 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDataMonitor)); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.groupBoxEX3 = new JinYuan.ControlLib.GroupBoxEX(); + this.btSatrt = new HML.ButtonPlus(); this.txtMaterialCode = new System.Windows.Forms.TextBox(); this.cmbModelType = new HML.DropDownListPlus(); this.angleLabel2 = new HML.AngleLabel(); this.angleLabel1 = new HML.AngleLabel(); this.btStop = new HML.ButtonPlus(); - this.btSatrt = new HML.ButtonPlus(); this.groupBoxEX2 = new JinYuan.ControlLib.GroupBoxEX(); this.lVConfigRange = new System.Windows.Forms.ListView(); this.clParaName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); @@ -159,6 +159,19 @@ this.groupBoxEX3.TabStop = false; this.groupBoxEX3.Text = "操作设置"; // + // btSatrt + // + this.btSatrt.BackNormalColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); + this.btSatrt.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btSatrt.Location = new System.Drawing.Point(42, 25); + this.btSatrt.Margin = new System.Windows.Forms.Padding(2); + this.btSatrt.Name = "btSatrt"; + this.btSatrt.Padding = new System.Windows.Forms.Padding(2); + this.btSatrt.Size = new System.Drawing.Size(67, 28); + this.btSatrt.TabIndex = 12; + this.btSatrt.Text = "开始监控"; + this.btSatrt.Click += new System.EventHandler(this.btSatrt_Click); + // // txtMaterialCode // this.txtMaterialCode.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(14)))), ((int)(((byte)(23)))), ((int)(((byte)(38))))); @@ -220,19 +233,6 @@ this.btStop.Text = "停止监控"; this.btStop.Click += new System.EventHandler(this.btStop_Click); // - // btSatrt - // - this.btSatrt.BackNormalColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0))))); - this.btSatrt.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btSatrt.Location = new System.Drawing.Point(42, 105); - this.btSatrt.Margin = new System.Windows.Forms.Padding(2); - this.btSatrt.Name = "btSatrt"; - this.btSatrt.Padding = new System.Windows.Forms.Padding(2); - this.btSatrt.Size = new System.Drawing.Size(67, 28); - this.btSatrt.TabIndex = 12; - this.btSatrt.Text = "开始监控"; - this.btSatrt.Click += new System.EventHandler(this.btSatrt_Click); - // // groupBoxEX2 // this.groupBoxEX2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(14)))), ((int)(((byte)(23)))), ((int)(((byte)(38))))); @@ -324,14 +324,14 @@ this.dgvFeedingData.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(14)))), ((int)(((byte)(23)))), ((int)(((byte)(38))))); this.dgvFeedingData.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dgvFeedingData.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(14)))), ((int)(((byte)(23)))), ((int)(((byte)(38))))); - dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 10.5F); - dataGridViewCellStyle7.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255))))); - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvFeedingData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(14)))), ((int)(((byte)(23)))), ((int)(((byte)(38))))); + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255))))); + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvFeedingData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dgvFeedingData.ColumnHeadersHeight = 34; this.dgvFeedingData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.dgvFeedingData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -341,14 +341,14 @@ this.InResult, this.Column5, this.Column139}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); - dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 10.5F); - dataGridViewCellStyle8.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(20)))), ((int)(((byte)(80))))); - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.White; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvFeedingData.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 10.5F); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(20)))), ((int)(((byte)(80))))); + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvFeedingData.DefaultCellStyle = dataGridViewCellStyle2; this.dgvFeedingData.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvFeedingData.EnableHeadersVisualStyles = false; this.dgvFeedingData.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(77)))), ((int)(((byte)(147))))); @@ -358,14 +358,14 @@ this.dgvFeedingData.Name = "dgvFeedingData"; this.dgvFeedingData.ReadOnly = true; this.dgvFeedingData.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(6)))), ((int)(((byte)(40)))), ((int)(((byte)(86))))); - dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 10.5F); - dataGridViewCellStyle9.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(20)))), ((int)(((byte)(80))))); - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.White; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvFeedingData.RowHeadersDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(6)))), ((int)(((byte)(40)))), ((int)(((byte)(86))))); + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 10.5F); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(20)))), ((int)(((byte)(80))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.White; + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvFeedingData.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; this.dgvFeedingData.RowHeadersVisible = false; this.dgvFeedingData.RowHeadersWidth = 60; this.dgvFeedingData.RowTemplate.Height = 23; @@ -486,14 +486,14 @@ this.dgvBlankingData.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(14)))), ((int)(((byte)(23)))), ((int)(((byte)(38))))); this.dgvBlankingData.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dgvBlankingData.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(14)))), ((int)(((byte)(23)))), ((int)(((byte)(38))))); - dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 10.5F); - dataGridViewCellStyle10.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255))))); - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvBlankingData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(14)))), ((int)(((byte)(23)))), ((int)(((byte)(38))))); + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 10.5F); + dataGridViewCellStyle4.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255))))); + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvBlankingData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; this.dgvBlankingData.ColumnHeadersHeight = 34; this.dgvBlankingData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.dgvBlankingData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -538,14 +538,14 @@ this.Column35, this.Column102, this.Column22}); - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); - dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 10.5F); - dataGridViewCellStyle11.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(20)))), ((int)(((byte)(80))))); - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.Color.White; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvBlankingData.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 10.5F); + dataGridViewCellStyle5.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(20)))), ((int)(((byte)(80))))); + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.White; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvBlankingData.DefaultCellStyle = dataGridViewCellStyle5; this.dgvBlankingData.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvBlankingData.EnableHeadersVisualStyles = false; this.dgvBlankingData.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(77)))), ((int)(((byte)(147))))); @@ -555,14 +555,14 @@ this.dgvBlankingData.Name = "dgvBlankingData"; this.dgvBlankingData.ReadOnly = true; this.dgvBlankingData.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; - dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(6)))), ((int)(((byte)(40)))), ((int)(((byte)(86))))); - dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 10.5F); - dataGridViewCellStyle12.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(20)))), ((int)(((byte)(80))))); - dataGridViewCellStyle12.SelectionForeColor = System.Drawing.Color.White; - dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvBlankingData.RowHeadersDefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(6)))), ((int)(((byte)(40)))), ((int)(((byte)(86))))); + dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 10.5F); + dataGridViewCellStyle6.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(20)))), ((int)(((byte)(80))))); + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.White; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvBlankingData.RowHeadersDefaultCellStyle = dataGridViewCellStyle6; this.dgvBlankingData.RowHeadersVisible = false; this.dgvBlankingData.RowHeadersWidth = 60; this.dgvBlankingData.RowTemplate.Height = 23; diff --git a/LargeSquareOne/FrmDataMonitor.resx b/LargeSquareOne/FrmDataMonitor.resx index fc7ebed..eb9bfb5 100644 --- a/LargeSquareOne/FrmDataMonitor.resx +++ b/LargeSquareOne/FrmDataMonitor.resx @@ -120,9 +120,6 @@ True - - True - True @@ -197,7 +194,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABE - DQAAAk1TRnQBSQFMAgEBAwEAAVgBAgFYAQIBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA + DQAAAk1TRnQBSQFMAgEBAwEAAWABAgFgAQIBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA AwABEAMAAQEBAAEgBgABEC4AAxUBHQMkATQDBQEGKAADHQEpAl4BZwHwATUBNgHPAf8BNQE2Ac8B/wE1 ATYBzwH/ATUBNgHPAf8BNQE2Ac8B/wNOAZagAAMTARkDZQHlA+YB/wPmAf8D5gH/A+YB/wPmAf8DRwGA HAACUwFUAaoBNQE2Ac8B/wE1ATYBzwH/ATUBNgHPAf8BNQE2Ac8B/wE1ATYBzwH/ATUBNgHPAf8BNQE2 diff --git a/LargeSquareOne/FrmLogin.cs b/LargeSquareOne/FrmLogin.cs index c7bbd9c..eba2590 100644 --- a/LargeSquareOne/FrmLogin.cs +++ b/LargeSquareOne/FrmLogin.cs @@ -71,6 +71,8 @@ namespace LargeSquareOne CommonMethods.currentAdmin = sysAdmin; CommonMethods.IsLoginOk = true; } + //ngcode + CommonMethods.listNgCodeEntity = CommonMethods.db.QueryAll(); } /// diff --git a/LargeSquareOne/FrmVariableConfig.Designer.cs b/LargeSquareOne/FrmVariableConfig.Designer.cs index 6a6a30f..c1da91b 100644 --- a/LargeSquareOne/FrmVariableConfig.Designer.cs +++ b/LargeSquareOne/FrmVariableConfig.Designer.cs @@ -481,7 +481,7 @@ // this.num_OffsetOrLenght.Location = new System.Drawing.Point(931, 55); this.num_OffsetOrLenght.Maximum = new decimal(new int[] { - 1000, + 3000, 0, 0, 0});