From c06bb2704e11ad4c10807ce1cb705fac6d18c7a6 Mon Sep 17 00:00:00 2001 From: Administrator Date: Mon, 17 Aug 2026 10:41:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9D=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 12 +++ JY.Inspection/HomeForm.cs | 24 +++-- JY.Inspection/HomeForm.designer.cs | 108 ++++++++++----------- JY.Inspection/HomeForm.resx | 2 +- JY.Inspection/JY.Inspection.csproj | 2 +- JY.Inspection/Mes/MESDataCombin.cs | 2 +- JY.Model/.vs/JY.Model.csproj.dtbcache.json | 1 - JY.Model/DB.Entity/BlankingData.cs | 6 +- PLCCommunication/OmronPLCUI.cs | 2 +- 9 files changed, 87 insertions(+), 72 deletions(-) delete mode 100644 JY.Model/.vs/JY.Model.csproj.dtbcache.json diff --git a/.gitignore b/.gitignore index 9fe4edf..7df4da0 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,15 @@ bld/ /JY.DAL/obj/Release/JY.DAL.csproj.AssemblyReference.cache /JY.Inspection/obj/Debug/JY.Inspection.csproj.AssemblyReference.cache /JY.Inspection/.vs/JY.Inspection.csproj.dtbcache.json +/1440MES采集项PLC地址.xlsx +/1440外观检测机上位机与PLC通讯协议2026-3-30.xlsx +/17J 数采对接文档.xlsx +/17J化成包装接口文档.xlsx +/JY.Control/.vs +/JY.DAL/.vs +/JY.MES/.vs +/JY.Utility/.vs +/PLCCommunication/.vs +/SimpleServer/.vs +/SocketHelper/.vs +/JY.Model/.vs/JY.Model.csproj.dtbcache.json diff --git a/JY.Inspection/HomeForm.cs b/JY.Inspection/HomeForm.cs index 332678f..d08d55d 100644 --- a/JY.Inspection/HomeForm.cs +++ b/JY.Inspection/HomeForm.cs @@ -2261,17 +2261,17 @@ namespace JY.Inspection { CollectionUtil.GetListUShort(ConstValue.CCD_SDict.Count), CollectionUtil.GetListUShort(ConstValue.CCD_SDict.Count), - CollectionUtil.GetListUShort(ConstValue.CCD_SDict.Count) + //CollectionUtil.GetListUShort(ConstValue.CCD_SDict.Count) }, ListCCDFResult = new List> { CollectionUtil.GetListFloat(ConstValue.CCD_FDict.Count), CollectionUtil.GetListFloat(ConstValue.CCD_FDict.Count), - CollectionUtil.GetListFloat(ConstValue.CCD_FDict.Count) + //CollectionUtil.GetListFloat(ConstValue.CCD_FDict.Count) }, ListCCDIResult = new List> { CollectionUtil.GetListInt(ConstValue.CCD_IDict.Count), CollectionUtil.GetListInt(ConstValue.CCD_IDict.Count), - CollectionUtil.GetListInt(ConstValue.CCD_IDict.Count) + //CollectionUtil.GetListInt(ConstValue.CCD_IDict.Count) }, ListResult = CollectionUtil.GetListUShort(2) }; @@ -2285,6 +2285,10 @@ namespace JY.Inspection var bytes = content.ByteReverse(); JY.Utility.LogHelper.LogPLCData("电池出站数据", bytes); + byte[] sByteArr = omronPLCCom.lstMcUI[0].Readbyte("W3400", 200)?.ByteReverse(); + byte[] fByteArr = omronPLCCom.lstMcUI[0].Readbyte("W3500", 400)?.ByteReverse(); + byte[] iByteArr = omronPLCCom.lstMcUI[0].Readbyte("W3600", 200)?.ByteReverse(); + for (int i = 0; i < 2; i++) { // 出站条码: 偏移0, 每通道40字节(20字符) @@ -2297,22 +2301,22 @@ namespace JY.Inspection // OK/NG结果: 3400-3415, 每通道偏移100字节/3450-3465 for (int j = 0; j < ConstValue.CCD_SDict.Count; j++) { - int index = 390 * 2 + (i * 50 * 2) + j * 2; - lstBarResult[j] = (short)TransformBase.TransInt16(content, index); + int index = (i * 50 * 2) + j * 2; + lstBarResult[j] = (short)TransformBase.TransInt16(sByteArr, index); } // 浮点型结果: 3500起/3550 for (int k = 0; k < ConstValue.CCD_FDict.Count; k++) { - int index = 490 * 2 + (i * 50 * 2) + k * 2 * 2; - containers.ListCCDFResult[i][k] = TransformBase.TransSingle(content, index); + int index = (i * 50 * 2) + k * 2 * 2; + containers.ListCCDFResult[i][k] = TransformBase.TransSingle(fByteArr, index); } // 整型结果: 3600起/3650 for (int k = 0; k < ConstValue.CCD_IDict.Count; k++) { - int index = 590 * 2 + (i * 50 * 2) + k * 2; - containers.ListCCDIResult[i][k] = TransformBase.TransInt16(content, index); + int index = (i * 50 * 2) + k * 2; + containers.ListCCDIResult[i][k] = TransformBase.TransInt16(iByteArr, index); } // 进站条码: 偏移280(140*2), 每通道40字节 @@ -2446,7 +2450,7 @@ namespace JY.Inspection } } - foreach (var propName in ConstValue.CCD_SDict.Keys) + foreach (var propName in ConstValue.CCD_IDict.Keys) { if (BlankingDataProps.TryGetValue(propName, out var prop)) { diff --git a/JY.Inspection/HomeForm.designer.cs b/JY.Inspection/HomeForm.designer.cs index c9305ca..db6aec0 100644 --- a/JY.Inspection/HomeForm.designer.cs +++ b/JY.Inspection/HomeForm.designer.cs @@ -31,12 +31,12 @@ namespace JY.Inspection { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HomeForm)); - 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.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(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.tsmiLogin = new System.Windows.Forms.ToolStripMenuItem(); this.mES测试ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -632,24 +632,24 @@ namespace JY.Inspection this.dgvDataShow_B.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dgvDataShow_B.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; this.dgvDataShow_B.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); - dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); - dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgvDataShow_B.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle7.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle7.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvDataShow_B.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; this.dgvDataShow_B.ColumnHeadersHeight = 29; this.dgvDataShow_B.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); - dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Silver; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvDataShow_B.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle8.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.Silver; + dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvDataShow_B.DefaultCellStyle = dataGridViewCellStyle8; this.dgvDataShow_B.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvDataShow_B.EnableHeadersVisualStyles = false; this.dgvDataShow_B.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); @@ -658,14 +658,14 @@ namespace JY.Inspection this.dgvDataShow_B.Name = "dgvDataShow_B"; this.dgvDataShow_B.ReadOnly = true; this.dgvDataShow_B.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Sunken; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); - dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgvDataShow_B.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle9.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvDataShow_B.RowHeadersDefaultCellStyle = dataGridViewCellStyle9; this.dgvDataShow_B.RowHeadersVisible = false; this.dgvDataShow_B.RowHeadersWidth = 51; this.dgvDataShow_B.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; @@ -696,14 +696,14 @@ namespace JY.Inspection this.dgvDataShow_A.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dgvDataShow_A.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; this.dgvDataShow_A.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); - dataGridViewCellStyle4.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); - dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgvDataShow_A.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle10.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle10.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvDataShow_A.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; this.dgvDataShow_A.ColumnHeadersHeight = 29; this.dgvDataShow_A.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.dgvDataShow_A.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -713,14 +713,14 @@ namespace JY.Inspection this.Column3, this.Column4, this.Column5}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); - dataGridViewCellStyle5.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.Silver; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvDataShow_A.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle11.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle11.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle11.SelectionBackColor = System.Drawing.Color.Silver; + dataGridViewCellStyle11.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvDataShow_A.DefaultCellStyle = dataGridViewCellStyle11; this.dgvDataShow_A.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvDataShow_A.EnableHeadersVisualStyles = false; this.dgvDataShow_A.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); @@ -729,14 +729,14 @@ namespace JY.Inspection this.dgvDataShow_A.Name = "dgvDataShow_A"; this.dgvDataShow_A.ReadOnly = true; this.dgvDataShow_A.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Sunken; - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); - dataGridViewCellStyle6.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); - dataGridViewCellStyle6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgvDataShow_A.RowHeadersDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219))))); + dataGridViewCellStyle12.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); + dataGridViewCellStyle12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(198)))), ((int)(((byte)(247))))); + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvDataShow_A.RowHeadersDefaultCellStyle = dataGridViewCellStyle12; this.dgvDataShow_A.RowHeadersVisible = false; this.dgvDataShow_A.RowHeadersWidth = 51; this.dgvDataShow_A.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; diff --git a/JY.Inspection/HomeForm.resx b/JY.Inspection/HomeForm.resx index 2304c0d..74875cd 100644 --- a/JY.Inspection/HomeForm.resx +++ b/JY.Inspection/HomeForm.resx @@ -331,7 +331,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAE - CgAAAk1TRnQBSQFMAgEBAwEAAeABCAHgAQgBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CgAAAk1TRnQBSQFMAgEBAwEAAfABCAHwAQgBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/JY.Inspection/JY.Inspection.csproj b/JY.Inspection/JY.Inspection.csproj index d79d98f..f2318e6 100644 --- a/JY.Inspection/JY.Inspection.csproj +++ b/JY.Inspection/JY.Inspection.csproj @@ -21,7 +21,7 @@ true full false - ..\..\..\..\JY.Inspection\ + bin\Debug\ DEBUG;TRACE prompt 4 diff --git a/JY.Inspection/Mes/MESDataCombin.cs b/JY.Inspection/Mes/MESDataCombin.cs index 79466ec..578f8bb 100644 --- a/JY.Inspection/Mes/MESDataCombin.cs +++ b/JY.Inspection/Mes/MESDataCombin.cs @@ -196,7 +196,7 @@ namespace JY.Inspection.Mes { tdvls.Add(new TagDataVOListItem() { tagCode = item.MesItemCode, - tagValue = prop.GetValue(m).ToString(), + tagValue = prop.GetValue(m)?.ToString(), tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = item.MesItemName diff --git a/JY.Model/.vs/JY.Model.csproj.dtbcache.json b/JY.Model/.vs/JY.Model.csproj.dtbcache.json deleted file mode 100644 index 0fe2ded..0000000 --- a/JY.Model/.vs/JY.Model.csproj.dtbcache.json +++ /dev/null @@ -1 +0,0 @@ -{"RootPath":"D:\\CodeProject\\1440\\JY.Model","ProjectFileName":"JY.Model.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"BL.Entity\\Chart24HourData.cs"},{"SourceFile":"BL.Entity\\RequestResult.cs"},{"SourceFile":"DB.Entity\\AbnormalVoice.cs"},{"SourceFile":"DB.Entity\\AlarmData.cs"},{"SourceFile":"DB.Entity\\CamInfor.cs"},{"SourceFile":"DB.Entity\\HourprodEntity.cs"},{"SourceFile":"DB.Entity\\ChartDataType.cs"},{"SourceFile":"DB.Entity\\BlankingData.cs"},{"SourceFile":"DB.Entity\\ParaRange.cs"},{"SourceFile":"DB.Entity\\PLCConfigBase.cs"},{"SourceFile":"DB.Entity\\PLCConfigPara.cs"},{"SourceFile":"DB.Entity\\ProductModel.cs"},{"SourceFile":"DB.Entity\\ProductParaBase.cs"},{"SourceFile":"DB.Entity\\ProductPara.cs"},{"SourceFile":"DB.Entity\\SystemConfig.cs"},{"SourceFile":"DB.Entity\\FeedingData.cs"},{"SourceFile":"DB.Entity\\TrayTestEntry.cs"},{"SourceFile":"Enums\\EnumAutority.cs"},{"SourceFile":"Enums\\EnumResultType.cs"},{"SourceFile":"Enums\\EnumSearchType.cs"},{"SourceFile":"Enums\\EnumUpMesStatus.cs"},{"SourceFile":"Excel\\CollectItemCfg.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.8.AssemblyAttributes.cs"}],"References":[{"Reference":"D:\\CodeProject\\1440\\packages\\CsvHelper.30.0.1\\lib\\net45\\CsvHelper.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\CodeProject\\1440\\packages\\SqlSugar.5.1.4.207\\lib\\SqlSugar.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\CodeProject\\1440\\packages\\System.Buffers.4.5.1\\lib\\net461\\System.Buffers.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.ComponentModel.DataAnnotations.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\CodeProject\\1440\\packages\\System.Memory.4.5.4\\lib\\net461\\System.Memory.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Numerics.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\CodeProject\\1440\\packages\\System.Numerics.Vectors.4.5.0\\lib\\net46\\System.Numerics.Vectors.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"D:\\CodeProject\\1440\\packages\\System.Runtime.CompilerServices.Unsafe.4.5.3\\lib\\net461\\System.Runtime.CompilerServices.Unsafe.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\Facades\\System.ValueTuple.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"D:\\JY.Inspection\\JY.Model.dll","OutputItemRelativePath":"JY.Model.dll"},{"OutputItemFullPath":"","OutputItemRelativePath":""}],"CopyToOutputEntries":[]} \ No newline at end of file diff --git a/JY.Model/DB.Entity/BlankingData.cs b/JY.Model/DB.Entity/BlankingData.cs index 7c8ee22..dbbbc21 100644 --- a/JY.Model/DB.Entity/BlankingData.cs +++ b/JY.Model/DB.Entity/BlankingData.cs @@ -188,11 +188,11 @@ namespace JY.Model public int CCDI3 { get; set; } - public string CCDI4 { get; set; } + public int CCDI4 { get; set; } - public string CCDI5 { get; set; } + public int CCDI5 { get; set; } - public string CCDI6 { get; set; } + public int CCDI6 { get; set; } #endregion /// diff --git a/PLCCommunication/OmronPLCUI.cs b/PLCCommunication/OmronPLCUI.cs index f2f526b..77c5993 100644 --- a/PLCCommunication/OmronPLCUI.cs +++ b/PLCCommunication/OmronPLCUI.cs @@ -928,7 +928,7 @@ namespace PLCCommunication if (IsConnected) { result = omronCipNet.Read(iAddr, lenght).Content; - AddLog(lstResWrite, 0, $"{iAddr} --> {result.ToString()}"); + AddLog(lstResWrite, 0, $"{iAddr} --> {result?.ToString()}"); } } catch (Exception ex)