From c45e3622afc12843fd7db622982da28f98a3ca0b Mon Sep 17 00:00:00 2001 From: a88359121 <34059079@qq.com> Date: Mon, 28 Jul 2025 11:12:06 +0800 Subject: [PATCH] =?UTF-8?q?MES=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JinYuan.ControlCenter/ControlCenter.cs | 7 +++--- JinYuan.ControlCenter/ControlCenter_Plc.cs | 22 +++++++++---------- .../JinYuan.ControlCenters.csproj | 1 - JinYuan.MES/MESApiHelper.cs | 3 ++- JinYuan.MES/MesDataProcess.cs | 2 +- JinYuan.VirtualDataLibrary/DBSQL.cs | 4 ++-- JinYuan.VirtualDataLibrary/MesConfig.cs | 2 +- LargeSquareOne/App.config | 4 ++-- LargeSquareOne/Config/Configure.ini | 22 +++++++++---------- LargeSquareOne/FrmDataMonitor.cs | 2 +- LargeSquareOne/FrmHistory.cs | 8 +++---- LargeSquareOne/FrmLogin.cs | 3 +-- LargeSquareOne/FrmMain.cs | 2 +- 13 files changed, 41 insertions(+), 41 deletions(-) diff --git a/JinYuan.ControlCenter/ControlCenter.cs b/JinYuan.ControlCenter/ControlCenter.cs index 126f7f3..d52b930 100644 --- a/JinYuan.ControlCenter/ControlCenter.cs +++ b/JinYuan.ControlCenter/ControlCenter.cs @@ -138,9 +138,9 @@ namespace JinYuan.ControlCenters { DicStationFunction = new Dictionary(); - DicStationFunction.Add("卷芯进站", FeedingStation); + DicStationFunction.Add("外观检测进站", FeedingStation); DicStationFunction.Add("NG出站", NGStation); - DicStationFunction.Add("卷芯出站", BlankingStation); + DicStationFunction.Add("外观检测出站", BlankingStation); for (int i = 0; i < CommonMethods.ChatLineCount; i++) { @@ -1002,7 +1002,8 @@ namespace JinYuan.ControlCenters CommonMethods.ProOKQty = CommonMethods.PlcLink.ReadInt32("D17");//良品总数 CommonMethods.Ppm = CommonMethods.PlcLink.ReadInt32("D13"); - CommonMethods.JiaDL = Convert.ToDouble(CommonMethods.PlcLink.ReadFloat("D11").ToString("F2")); + //CommonMethods.JiaDL = Convert.ToDouble(CommonMethods.PlcLink.ReadFloat("D11").ToString("F2"))/100; + CommonMethods.JiaDL = Convert.ToDouble(CommonMethods.PlcLink.ReadInt32("D11").ToString("F2"))/100; #region 开机时间/运行时间 CommonMethods.PlcOpenAndRunTime = GetList(6, 0); diff --git a/JinYuan.ControlCenter/ControlCenter_Plc.cs b/JinYuan.ControlCenter/ControlCenter_Plc.cs index 2c2faee..be6e2ea 100644 --- a/JinYuan.ControlCenter/ControlCenter_Plc.cs +++ b/JinYuan.ControlCenter/ControlCenter_Plc.cs @@ -356,7 +356,7 @@ namespace JinYuan.ControlCenters } catch (Exception ex) { - LogHelper.Instance.WriteError($"卷芯进站线程数据解析:{ex}", "SysErrorLog"); + LogHelper.Instance.WriteError($"外观检测进站线程数据解析:{ex}", "SysErrorLog"); } @@ -380,7 +380,7 @@ namespace JinYuan.ControlCenters //CommonMethods.PlcLink.WriteInt16("D2100", listRes[0]);//调试结果OK写入PLC if (result != null) { - string strres = $"卷心工位发送给PLC: D2100={listRes[0]},D2101={listRes[1]},D2102={listRes[2]},"; + string strres = $"外观检工位发送给PLC: D2100={listRes[0]},D2101={listRes[1]},D2102={listRes[2]},"; CommonMethods.AddDataMonitorLog(0, strres); } @@ -396,7 +396,7 @@ namespace JinYuan.ControlCenters sw2.Stop(); ////输出上料数据处理耗时: - CommonMethods.AddDataMonitorLog(0, $"卷芯进站共耗时:{sw2.Elapsed.TotalMilliseconds}ms"); + CommonMethods.AddDataMonitorLog(0, $"外观检测进站共耗时:{sw2.Elapsed.TotalMilliseconds}ms"); } } @@ -474,7 +474,7 @@ namespace JinYuan.ControlCenters } catch (Exception ex) { - LogHelper.Instance.WriteError($"卷芯上料保存处理异常:{ex}", "SysErrorLog"); + LogHelper.Instance.WriteError($"外观检测上料保存处理异常:{ex}", "SysErrorLog"); } } #endregion @@ -922,7 +922,7 @@ namespace JinYuan.ControlCenters // } // catch (Exception ex) // { - // LogHelper.Instance.WriteError($"卷芯出站线程数据解析:{ex}", "SysErrorLog"); + // LogHelper.Instance.WriteError($"外观检测出站线程数据解析:{ex}", "SysErrorLog"); // } // } @@ -972,7 +972,7 @@ namespace JinYuan.ControlCenters // #region 数据变量定义 // List list = new List();//实体 // //int[] MyRes = new int[2];//AB反馈结果 - // int[] MyRes = new int[3];//三个卷芯反馈结果 + // int[] MyRes = new int[3];//三个外观检测反馈结果 // #endregion // //高低位转换 // byte[] bytes = bArrays.Content.ByteReverse(); @@ -1551,7 +1551,7 @@ namespace JinYuan.ControlCenters // } // catch (Exception ex) // { - // LogHelper.Instance.WriteError($"卷芯出站线程数据解析:{ex}", "SysErrorLog"); + // LogHelper.Instance.WriteError($"外观检测出站线程数据解析:{ex}", "SysErrorLog"); // } // } @@ -1592,7 +1592,7 @@ namespace JinYuan.ControlCenters // sw2.Stop(); // ////输出下料数据处理耗时: - // CommonMethods.AddDataMonitorLog(0, $"卷芯出站共耗时:{sw2.Elapsed.TotalMilliseconds}ms"); + // CommonMethods.AddDataMonitorLog(0, $"外观检测出站共耗时:{sw2.Elapsed.TotalMilliseconds}ms"); // } //} #endregion @@ -1614,7 +1614,7 @@ namespace JinYuan.ControlCenters #region 数据变量定义 List list = new List();//实体 //int[] MyRes = new int[2];//AB反馈结果 - int[] MyRes = new int[3];//三个卷芯反馈结果 + int[] MyRes = new int[3];//三个外观检测反馈结果 #endregion //高低位转换 byte[] bytes = bArrays.Content.ByteReverse(); @@ -1889,7 +1889,7 @@ namespace JinYuan.ControlCenters } catch (Exception ex) { - LogHelper.Instance.WriteError($"卷芯出站线程数据解析:{ex}", "SysErrorLog"); + LogHelper.Instance.WriteError($"外观检测出站线程数据解析:{ex}", "SysErrorLog"); } } @@ -1931,7 +1931,7 @@ namespace JinYuan.ControlCenters sw2.Stop(); ////输出下料数据处理耗时: - CommonMethods.AddDataMonitorLog(0, $"卷芯出站共耗时:{sw2.Elapsed.TotalMilliseconds}ms"); + CommonMethods.AddDataMonitorLog(0, $"外观检测出站共耗时:{sw2.Elapsed.TotalMilliseconds}ms"); } } /// diff --git a/JinYuan.ControlCenter/JinYuan.ControlCenters.csproj b/JinYuan.ControlCenter/JinYuan.ControlCenters.csproj index 5a57672..7e59cb0 100644 --- a/JinYuan.ControlCenter/JinYuan.ControlCenters.csproj +++ b/JinYuan.ControlCenter/JinYuan.ControlCenters.csproj @@ -101,7 +101,6 @@ - diff --git a/JinYuan.MES/MESApiHelper.cs b/JinYuan.MES/MESApiHelper.cs index a610040..40d541a 100644 --- a/JinYuan.MES/MESApiHelper.cs +++ b/JinYuan.MES/MESApiHelper.cs @@ -32,10 +32,11 @@ namespace JinYuan.MES try { StringContent stringContent = new StringContent(strJosnData, Encoding.UTF8, "application/json"); - return new HttpClient() + string ResponseMessage= new HttpClient() { Timeout = TimeSpan.FromSeconds(6.0) }.PostAsync(url, (HttpContent)stringContent).Result.Content.ReadAsStringAsync().Result; + return ResponseMessage; } catch (Exception ex) { diff --git a/JinYuan.MES/MesDataProcess.cs b/JinYuan.MES/MesDataProcess.cs index 40ff192..df838d9 100644 --- a/JinYuan.MES/MesDataProcess.cs +++ b/JinYuan.MES/MesDataProcess.cs @@ -43,7 +43,7 @@ namespace JinYuan.MES equipNum = equipNum, userName = userName, passWord = passWord, - userCardID = UserCardID + userCardID =null// UserCardID }; var nowDate = DateTime.Now; diff --git a/JinYuan.VirtualDataLibrary/DBSQL.cs b/JinYuan.VirtualDataLibrary/DBSQL.cs index 64d6629..b23e8f4 100644 --- a/JinYuan.VirtualDataLibrary/DBSQL.cs +++ b/JinYuan.VirtualDataLibrary/DBSQL.cs @@ -107,7 +107,7 @@ namespace JinYuan.VirtualDataLibrary if (type == 0) { strSql = @"SELECT CONVERT(varchar,[TestTime], 120) 时间 - ,[BarCode] 卷芯码 + ,[BarCode] 电芯码 ,[Result] 结果 ,[Remark] 备注 ,case when [Flag]=1 then '已上传' else '未上传' end 上传状态 @@ -122,7 +122,7 @@ namespace JinYuan.VirtualDataLibrary strSql = @"SELECT CONVERT(varchar,[CSBYHASCANNINGTIME], 120) 时间 ,[CSBYHPROCESSNAME] 工序名 ,[CSBYHSCHEDULE] 班次 - ,[CSBYHCODEA] 卷芯码 + ,[CSBYHCODEA] 电芯码 ,[CSBYHOUTSTATIONJUDGMENTRESULT] 出站判定结果 ,[Remark] 备注 ,[RethrowNum] 复投次数 diff --git a/JinYuan.VirtualDataLibrary/MesConfig.cs b/JinYuan.VirtualDataLibrary/MesConfig.cs index e24a1ef..9fc6f07 100644 --- a/JinYuan.VirtualDataLibrary/MesConfig.cs +++ b/JinYuan.VirtualDataLibrary/MesConfig.cs @@ -112,7 +112,7 @@ namespace JinYuan.VirtualDataLibrary /// -3A出站数据存储到-3C /// public bool IsGet_3C = true; - public int _卷芯条码计数 = 0; + public int _外观检测条码计数 = 0; /// /// Guid diff --git a/LargeSquareOne/App.config b/LargeSquareOne/App.config index 7030cc9..97ad05e 100644 --- a/LargeSquareOne/App.config +++ b/LargeSquareOne/App.config @@ -5,8 +5,8 @@ - - + + diff --git a/LargeSquareOne/Config/Configure.ini b/LargeSquareOne/Config/Configure.ini index 266e612..a8874ec 100644 --- a/LargeSquareOne/Config/Configure.ini +++ b/LargeSquareOne/Config/Configure.ini @@ -12,7 +12,7 @@ MES/ Ï̺߳ÄʱÈÕ־±£´æ=False ÊǷñ»ñȡ·þÎñÆ÷Êý¾Ý=1 ÊǷñ´洢Cģ¿éÊý¾Ý=1 -¾íоÌõÂë¼ÆÊý=1 +Íâ¹ۼì²âÌõÂë¼ÆÊý=1 ǿÖÆOK/Õý³£NGģʽÇл»=False [MESÅäÖÃ] @@ -23,16 +23,16 @@ MES/ °×ҹ°ཻÌæʱ¼ä=20:30:00 MESÈÕ־±£´æ·¾¶=D:\APILog ´洢·þÎñÆ÷IPµØַ=192.168.2.108 -Ա¹¤ȨÏÞУÑé=http://10.22.160.1/core/api/public/equipment/base/user/login/verify -É豸²ÎÊýÉ趨ֵÇëÇó=http://10.22.160.1/core/api/public/param/setting/request -É豸²ÎÊýÉ趨ֵ±ä¸ü=http://10.22.160.1/core/api/public/param/setting/change -²úƷ½øվ=http://10.22.160.1/core/api/public/in/station/process/currency -²úƷ¹ý³̼ӹ¤²ÎÊý=http://10.22.160.1/core/api/public/product/process/param/new/process -²úƷ½á¹û¼ӹ¤²ÎÊý=http://10.22.160.1/core/api/public/product/process/param/new/result -²úƷ³öվ=http://10.22.160.1/core/api/public/out/station/process/turn/equip -É豸±¨¾¯=http://10.22.160.1/core/api/public/equipment/alarm/currency -É豸״̬=http://10.22.160.1/core/api/public/eve/pm/eqm/run/status/operation -ÄܺÄ=http://10.22.160.1/core/api/public/eve/pm/energy/consumption/collection/submit +Ա¹¤ȨÏÞУÑé=http://10.22.160.141/core/api/public/equipment/base/user/login/verify +É豸²ÎÊýÉ趨ֵÇëÇó=http://10.22.160.141/core/api/public/param/setting/request +É豸²ÎÊýÉ趨ֵ±ä¸ü=http://10.22.160.141/core/api/public/param/setting/change +²úƷ½øվ=http://10.22.160.141/core/api/public/in/station/process/currency +²úƷ¹ý³̼ӹ¤²ÎÊý=http://10.22.160.141/core/api/public/product/process/param/new/process +²úƷ½á¹û¼ӹ¤²ÎÊý=http://10.22.160.141/core/api/public/product/process/param/new/result +²úƷ³öվ=http://10.22.160.141/core/api/public/out/station/process/turn/equip +É豸±¨¾¯=http://10.22.160.141/core/api/public/equipment/alarm/currency +É豸״̬=http://10.22.160.141/core/api/public/eve/pm/eqm/run/status/operation +ÄܺÄ=http://10.22.160.141/core/api/public/eve/pm/energy/consumption/collection/submit ·çËÙÒÇ=https://iot.eveportal.com:9470/eve_api/ems/iot/upload_device_collect_data guid=55e9ca41-814c-43a4-9e7e-34324548ade7 DeviceState=1 diff --git a/LargeSquareOne/FrmDataMonitor.cs b/LargeSquareOne/FrmDataMonitor.cs index e0a4f2d..3fd51f5 100644 --- a/LargeSquareOne/FrmDataMonitor.cs +++ b/LargeSquareOne/FrmDataMonitor.cs @@ -348,7 +348,7 @@ namespace LargeSquareOne } - #region 显示卷芯上料数据 + #region 显示外观检测上料数据 /// /// 显示上料 /// diff --git a/LargeSquareOne/FrmHistory.cs b/LargeSquareOne/FrmHistory.cs index 3d0800c..20ae51a 100644 --- a/LargeSquareOne/FrmHistory.cs +++ b/LargeSquareOne/FrmHistory.cs @@ -18,8 +18,8 @@ namespace LargeSquareOne { InitializeComponent(); - this.cmb_SelectType.Items.Add("卷芯进站"); - this.cmb_SelectType.Items.Add("卷芯出站"); + this.cmb_SelectType.Items.Add("外观检测进站"); + this.cmb_SelectType.Items.Add("外观检测出站"); this.cmb_SelectType.SelectedIndex = 0; this.dtp_Start.Value = DateTime.Now.AddHours(-2.0f); @@ -40,11 +40,11 @@ namespace LargeSquareOne private void btn_Query_Click(object sender, EventArgs e) { string str = this.cmb_SelectType.Text; - if (string.Compare(str, "卷芯进站") == 0) + if (string.Compare(str, "外观检测进站") == 0) { this.cmb_SelectType.SelectedIndex = 0; } - else if (string.Compare(str, "卷芯出站") == 0) + else if (string.Compare(str, "外观检测出站") == 0) { this.cmb_SelectType.SelectedIndex = 1; } diff --git a/LargeSquareOne/FrmLogin.cs b/LargeSquareOne/FrmLogin.cs index 775d45c..068a933 100644 --- a/LargeSquareOne/FrmLogin.cs +++ b/LargeSquareOne/FrmLogin.cs @@ -75,8 +75,7 @@ namespace LargeSquareOne CommonMethods.LoginOut = false; //存储用户对象 CommonMethods.currentAdmin = sysAdmin; - CommonMethods.IsLoginOk = true; - + CommonMethods.IsLoginOk = true; } } diff --git a/LargeSquareOne/FrmMain.cs b/LargeSquareOne/FrmMain.cs index 26b5dff..1e8f8ef 100644 --- a/LargeSquareOne/FrmMain.cs +++ b/LargeSquareOne/FrmMain.cs @@ -155,7 +155,7 @@ namespace LargeSquareOne CommonMethods.mesConfig.IsGet_Server = IniConfigHelper.ReadIniData("配置信息", "是否获取服务器数据", "1") == "1" ? true : false; CommonMethods.sysConfig.OKSwitching = Convert.ToBoolean(IniConfigHelper.ReadIniData("配置信息", "强制OK/正常NG模式切换", "False")); CommonMethods.mesConfig.IsGet_3C = IniConfigHelper.ReadIniData("配置信息", "是否存储C模块数据", "1") == "1" ? true : false; - CommonMethods.mesConfig._卷芯条码计数 = Convert.ToInt32(IniConfigHelper.ReadIniData("配置信息", "卷芯条码计数", "false")); + CommonMethods.mesConfig._外观检测条码计数 = Convert.ToInt32(IniConfigHelper.ReadIniData("配置信息", "外观检测条码计数", "false")); CommonMethods.mesConfig.siteCode = IniConfigHelper.ReadIniData("MES配置", "工厂代码", "false"); CommonMethods.mesConfig.lineCode = IniConfigHelper.ReadIniData("MES配置", "产线编号", "false");