diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/InterfaceDocking/HttpResponse.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/InterfaceDocking/HttpResponse.cs index 4aaf694..ed342bd 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/InterfaceDocking/HttpResponse.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/InterfaceDocking/HttpResponse.cs @@ -31,6 +31,7 @@ namespace Mesnac.Action.ChemicalWeighing.InterfaceDocking { HttpItem item = new HttpItem() { + Timeout = 5, URL = url, //URL 必需项 Method = "post",//URL 可选项 默认为Get ContentType = "application/json",//返回类型 可选项有默认值 diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs index f4d7f19..f0749ae 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs @@ -102,6 +102,22 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl SwitchLight WScale_2_LowLevel; SwitchLight WScale_3_LowLevel; SwitchLight WScale_4_LowLevel; + SwitchLight DMWETER1; + SwitchLight DMWETER11; + SwitchLight DMWETER2; + SwitchLight DMWETER22; + SwitchLight DMWETER3; + SwitchLight DMWETER33; + SwitchLight DMWETER4; + SwitchLight DMWETER44; + SwitchLight DMWETER5; + SwitchLight DMWETER55; + SwitchLight DMWETER6; + SwitchLight DMWETER66; + SwitchLight DMWETER7; + SwitchLight DMWETER77; + SwitchLight DMWETER8; + SwitchLight DMWETER88; MCLabel topPressure_V1; MCLabel topPressure_V2; @@ -437,6 +453,22 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl bool WScale_2_LowLevel_Set; bool WScale_3_LowLevel_Set; bool WScale_4_LowLevel_Set; + bool DMWETER1_Set; + bool DMWETER2_Set; + bool DMWETER3_Set; + bool DMWETER4_Set; + bool DMWETER5_Set; + bool DMWETER6_Set; + bool DMWETER7_Set; + bool DMWETER8_Set; + bool DMWETER1_Alarm; + bool DMWETER2_Alarm; + bool DMWETER3_Alarm; + bool DMWETER4_Alarm; + bool DMWETER5_Alarm; + bool DMWETER6_Alarm; + bool DMWETER7_Alarm; + bool DMWETER8_Alarm; float topPressure_V1_Set; float topPressure_V2_Set; @@ -485,6 +517,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl float DM2CSF01_Set; float DM2DSF01_Set; + bool DM1ASF01_Set; bool DM1BSF01_Set; bool DM1CSF01_Set; @@ -851,6 +884,8 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl bool DV2PCP13_AlarmR; #endregion + + private MCLabel MCWatchDog; public void Run(RuntimeParameter runtime) { @@ -1067,6 +1102,9 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl #endregion Controls = GetAllControls(); + + MCWatchDog =Controls.FirstOrDefault(x=>x.Name=="MCWatchDog") as MCLabel; + SetControl(); @@ -1598,6 +1636,23 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl DM1DRY3_Running_Set = DB2103.DM1DRY3.Running; DM1DRY4_Running_Set = DB2103.DM1DRY4.Running; + DMWETER1_Set = DB2103.DMWETER1.Running; + DMWETER2_Set = DB2103.DMWETER2.Running; + DMWETER3_Set = DB2103.DMWETER3.Running; + DMWETER4_Set = DB2103.DMWETER4.Running; + DMWETER5_Set = DB2103.DMWETER5.Running; + DMWETER6_Set = DB2103.DMWETER6.Running; + DMWETER7_Set = DB2103.DMWETER7.Running; + DMWETER8_Set = DB2103.DMWETER8.Running; + + DMWETER1_Alarm = DB2103.DMWETER1.Alarm; + DMWETER2_Alarm = DB2103.DMWETER2.Alarm; + DMWETER3_Alarm = DB2103.DMWETER3.Alarm; + DMWETER4_Alarm = DB2103.DMWETER4.Alarm; + DMWETER5_Alarm = DB2103.DMWETER5.Alarm; + DMWETER6_Alarm = DB2103.DMWETER6.Alarm; + DMWETER7_Alarm = DB2103.DMWETER7.Alarm; + DMWETER8_Alarm = DB2103.DMWETER8.Alarm; SetMCLabel(DM1DRY1_ACT_Speed, (float)Math.Round(DM1DRY1_ACT_Speed_Set, 2)); SetMCLabel(DM1DRY2_ACT_Speed, (float)Math.Round(DM1DRY2_ACT_Speed_Set, 2)); @@ -1673,6 +1728,23 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl SetFan(DM1DRY3_Running, DM1DRY3_Running_Set); SetFan(DM1DRY4_Running, DM1DRY4_Running_Set); SetFan(PM3ADF01, PM3ADF01_Set); + + SetSwitchLight(DMWETER1, DMWETER1_Set, DMWETER1_Alarm); + SetSwitchLight(DMWETER11, DMWETER1_Set, DMWETER1_Alarm); + SetSwitchLight(DMWETER2, DMWETER2_Set, DMWETER2_Alarm); + SetSwitchLight(DMWETER22, DMWETER2_Set, DMWETER2_Alarm); + SetSwitchLight(DMWETER3, DMWETER3_Set, DMWETER3_Alarm); + SetSwitchLight(DMWETER33, DMWETER3_Set, DMWETER3_Alarm); + SetSwitchLight(DMWETER4, DMWETER4_Set, DMWETER4_Alarm); + SetSwitchLight(DMWETER44, DMWETER4_Set, DMWETER4_Alarm); + SetSwitchLight(DMWETER5, DMWETER5_Set, DMWETER5_Alarm); + SetSwitchLight(DMWETER55, DMWETER5_Set, DMWETER5_Alarm); + SetSwitchLight(DMWETER6, DMWETER6_Set, DMWETER6_Alarm); + SetSwitchLight(DMWETER66, DMWETER6_Set, DMWETER6_Alarm); + SetSwitchLight(DMWETER7, DMWETER7_Set, DMWETER7_Alarm); + SetSwitchLight(DMWETER77, DMWETER7_Set, DMWETER7_Alarm); + SetSwitchLight(DMWETER8, DMWETER8_Set, DMWETER8_Alarm); + SetSwitchLight(DMWETER88, DMWETER8_Set, DMWETER8_Alarm); } /// @@ -1680,7 +1752,12 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl /// private void NewThreadDb2107() { - WatchDog_Set = DB2107.NormalStatus.WatchDog >= 1 ? true : false; + + var normalStatusWatchDog = DB2107.NormalStatus.WatchDog; + WatchDog_Set = normalStatusWatchDog >= 1 ? true : false; + + MCWatchDog.MCValue = normalStatusWatchDog.ToString(); + EMStop_Set = DB2107.NormalStatus.EMStop; Vessel_1_HighLevel_Set = DB2107.Weight.Vessel_1.HighLevel; @@ -2104,6 +2181,22 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl WScale_2_LowLevel = GetSwitchLight("WScale_2_LowLevel"); WScale_3_LowLevel = GetSwitchLight("WScale_3_LowLevel"); WScale_4_LowLevel = GetSwitchLight("WScale_4_LowLevel"); + DMWETER1 = GetSwitchLight("DMWETER1"); + DMWETER11 = GetSwitchLight("DMWETER11"); + DMWETER2 = GetSwitchLight("DMWETER2"); + DMWETER22 = GetSwitchLight("DMWETER22"); + DMWETER3 = GetSwitchLight("DMWETER3"); + DMWETER33 = GetSwitchLight("DMWETER33"); + DMWETER4 = GetSwitchLight("DMWETER4"); + DMWETER44 = GetSwitchLight("DMWETER44"); + DMWETER5 = GetSwitchLight("DMWETER5"); + DMWETER55 = GetSwitchLight("DMWETER55"); + DMWETER6 = GetSwitchLight("DMWETER6"); + DMWETER66 = GetSwitchLight("DMWETER66"); + DMWETER7 = GetSwitchLight("DMWETER7"); + DMWETER77 = GetSwitchLight("DMWETER77"); + DMWETER8 = GetSwitchLight("DMWETER8"); + DMWETER88 = GetSwitchLight("DMWETER88"); topPressure_V1 = GetMCLabel("topPressure_V1"); topPressure_V2 = GetMCLabel("topPressure_V2"); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs index 6d5886b..ac1fd3e 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/InitAction.cs @@ -18,7 +18,9 @@ using System.Data; using System.IO; using System.Linq; using System.Text; +using System.Threading; using System.Windows.Forms; +using Timer = System.Windows.Forms.Timer; namespace Mesnac.Action.ChemicalWeighing.ManualControl { @@ -196,11 +198,18 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl deviceNo = deviceNo.ToString(), state = statu.ToString(), }; - HttpResponse httpResponse = new HttpResponse(); - // MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - // ManualLogControl($"湿混机{deviceNo}返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}返回数据" + returnTest); + + //即使网络不同 也不会影响上位机的使用 + ThreadPool.QueueUserWorkItem(delegate + { + HttpResponse httpResponse = new HttpResponse(); + // MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}下发请求"); + string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); + // ManualLogControl($"湿混机{deviceNo}返回数据 " + returnTest); + MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}返回数据" + returnTest); + }); + + } @@ -217,7 +226,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl if (flag > 10) { flag = 0; - LogInsertToDatabase(); + //LogInsertToDatabase(); } no += 1; @@ -470,7 +479,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl private void LogInsertToDatabase() { - DataTable table = DBHelp.GetTable(@"select top 100 id, logtext, logtime from Manual_Log order by id desc"); + DataTable table = DBHelp.GetTable(@"select top 200 id, logtext, logtime from Manual_Log order by id desc"); if (this.materialGridControl != null && this.materialGridControl.BaseControl != null) { @@ -479,7 +488,7 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl } else { - ICSharpCode.Core.LoggingService.Warn("手动操作日志信息控件为Null..."); + ICSharpCode.Core.LoggingService.Warn("操作日志信息控件为Null..."); } } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs index c5da7cb..b92b592 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/ManualControl/ManualControlAction.cs @@ -14,12 +14,14 @@ using Mesnac.Controls.Default; using Mesnac.Core.Service; using System; using System.Collections.Generic; +using System.Data; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using Mesnac.Action.ChemicalWeighing.LjMaterial; namespace Mesnac.Action.ChemicalWeighing.ManualControl @@ -111,35 +113,60 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl IBaseControl PointSpeedSpiralValue3; IBaseControl PointSpeedSpiralValue4; - MCButton WetRequest1; - MCButton WetRequest2; - MCButton WetRequest3; - MCButton WetRequest4; - MCButton WetRequest5; - MCButton WetRequest6; - MCButton WetRequest7; - MCButton WetRequest8; + MCButton WetRequest1; + // MCButton WetRequest2; + // MCButton WetRequest3; + // MCButton WetRequest4; + // MCButton WetRequest5; + // MCButton WetRequest6; + // MCButton WetRequest7; + // MCButton WetRequest8; MCButton Focus; MCButton SaveSetting; MCButton LoadSetting; #endregion + DbMCControl materialGridControl; + + //keywords - + IBaseControl keywords; + public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须要调用 - - + + materialGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "ManualLogGridView").FirstOrDefault(); + LogInsertToDatabase(""); + ControlImport(); - - SingleSelect(); + BottomSelect(runtime); + + } + + private void LogInsertToDatabase(string txt) + { + string sql = "select top 500 id, logtext, logtime from Manual_Log "; + if (!string.IsNullOrEmpty(txt)) + { + sql += $" where logtext like '%{txt}%'"; + } - BottomSelect(runtime); + sql += " order by id desc"; + DataTable table = DBHelp.GetTable(sql); + if (this.materialGridControl != null && this.materialGridControl.BaseControl != null) + { + this.materialGridControl.BaseControl.BindDataSource = null; + this.materialGridControl.BaseControl.BindDataSource = table; + } + else + { + ICSharpCode.Core.LoggingService.Warn("ManualContrlolAction 手动操作日志信息控件为Null..."); + } } /// @@ -221,14 +248,15 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl PointSpeedSpiralValue3 = GetBaseControl("PointSpeedSpiralValue3"); PointSpeedSpiralValue4 = GetBaseControl("PointSpeedSpiralValue4"); - WetRequest1 = GetButtonControl("WetRequest1"); - WetRequest2 = GetButtonControl("WetRequest2"); - WetRequest3 = GetButtonControl("WetRequest3"); - WetRequest4 = GetButtonControl("WetRequest4"); - WetRequest5 = GetButtonControl("WetRequest5"); - WetRequest6 = GetButtonControl("WetRequest6"); - WetRequest7 = GetButtonControl("WetRequest7"); - WetRequest8 = GetButtonControl("WetRequest8"); + WetRequest1 = GetButtonControl("WetRequest1"); + keywords = GetBaseControl("keywords"); + // WetRequest2 = GetButtonControl("WetRequest2"); + // WetRequest3 = GetButtonControl("WetRequest3"); + // WetRequest4 = GetButtonControl("WetRequest4"); + // WetRequest5 = GetButtonControl("WetRequest5"); + // WetRequest6 = GetButtonControl("WetRequest6"); + // WetRequest7 = GetButtonControl("WetRequest7"); + // WetRequest8 = GetButtonControl("WetRequest8"); Focus = GetButtonControl("Focus"); @@ -1021,6 +1049,14 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl // default: return; //} } + + //点击日志查询 + if (WetRequest1 == runtime.Sender) + { + string key = keywords.MCValue.ToString(); + LogInsertToDatabase(key); + } + if (SpiralOff1 == runtime.Sender) { @@ -1055,181 +1091,18 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl } - if (WetRequest1 == runtime.Sender) - { - if (MessageBox.Show("湿混机1确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "1", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机1下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机1下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机1返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机1返回数据" + returnTest); - } + - if (WetRequest2 == runtime.Sender) - { - if (MessageBox.Show("湿混机2确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "2", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机2下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机2下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机2返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机2返回数据" + returnTest); - } - - if (WetRequest3 == runtime.Sender) - { - if (MessageBox.Show("湿混机3确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "3", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机3下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机3下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机3返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机3返回数据" + returnTest); - } + - if (WetRequest4 == runtime.Sender) - { - if (MessageBox.Show("湿混机4确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "4", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机4下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机4下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机4返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机4返回数据" + returnTest); - } + - if (WetRequest5 == runtime.Sender) - { - if (MessageBox.Show("湿混机5确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "5", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机5下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机5下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机5返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机5返回数据" + returnTest); - } + - if (WetRequest6 == runtime.Sender) - { - if (MessageBox.Show("湿混机6确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "6", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机6下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机6下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机6返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机6返回数据" + returnTest); - } + - if (WetRequest7 == runtime.Sender) - { - if (MessageBox.Show("湿混机7确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "7", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机7下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机7下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机7返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机7返回数据" + returnTest); - } - if (WetRequest8 == runtime.Sender) - { - if (MessageBox.Show("湿混机8确认下发请求?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return; - } - string id = System.Guid.NewGuid().ToString(); - TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() - { - reqCode = id, - reqTime = DateTime.Now, - deviceNo = "8", - state = "1" - }; - HttpResponse httpResponse = new HttpResponse(); - ManualLogControl("湿混机8下发请求"); - MesnacServiceManager.Instance.LoggingService.Info("湿混机8下发请求"); - string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); - ManualLogControl("湿混机8返回数据 " + returnTest); - MesnacServiceManager.Instance.LoggingService.Info("湿混机8返回数据" + returnTest); - } + if(SaveSetting == runtime.Sender) { @@ -1312,7 +1185,9 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl userid = string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName }; - FreeSqlUnit.Instance.Insert(Log).ExecuteIdentity(); + FreeSqlUnit.Instance.Insert(Log).ExecuteIdentity(); + + LogInsertToDatabase(""); } } } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs index a8f43db..6aefdc6 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/PlcAddressUtil.cs @@ -8,5 +8,6 @@ //测试的Plc //public static string IpAddress = "192.168.0.100"; //public static int Port = 7788; + } } \ No newline at end of file diff --git a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml index 97bf0e7..79621a7 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml @@ -1,7 +1,7 @@ - + Control @@ -16,12 +16,14 @@ True True 8 - DarkGray - 1803, 505 - MCLabel150 - 11, 12 + Transparent + 宋体, 14pt + White + 1810, 443 + MCLabel142 + 19, 19 - + Control @@ -36,12 +38,14 @@ True True 7 - DarkGray - 1725, 505 - MCLabel151 - 11, 12 + Transparent + 宋体, 14pt + White + 1717, 443 + MCLabel143 + 19, 19 - + Control @@ -56,12 +60,36 @@ True True 6 - DarkGray - 1487, 505 - MCLabel152 - 11, 12 + Transparent + 宋体, 14pt + White + 1498, 443 + MCLabel144 + 19, 19 + + + + + Control + Control + + + False + + + + None + True + True + 5 + Transparent + 宋体, 14pt + White + 1405, 443 + MCLabel145 + 19, 19 - + Control @@ -76,12 +104,14 @@ True True 4 - DarkGray - 1248, 505 - MCLabel153 - 11, 12 + Transparent + 宋体, 14pt + White + 1253, 444 + MCLabel146 + 19, 19 - + Control @@ -96,12 +126,77 @@ True True 3 - DarkGray - 1172, 505 - MCLabel154 + Transparent + 宋体, 14pt + White + 1158, 445 + MCLabel147 + 19, 19 + + + + + Control + Control + + + False + + + + None + True + True + 2 + Transparent + 宋体, 14pt + White + 947, 444 + MCLabel148 + 19, 19 + + + + + + Red + DarkGray + + + False + + + + None + True + True + WatchDog + Red + 33, 71 + MCLabel149 + 53, 12 + + + + + Red + DarkGray + + + False + + + + Modify + True + True + 0 + Red + 53, 89 + MCWatchDog 11, 12 - + Control @@ -115,13 +210,13 @@ None True True - 5 + 8 DarkGray - 1410, 505 - MCLabel155 + 1803, 505 + MCLabel150 11, 12 - + Control @@ -135,10 +230,10 @@ None True True - 2 + 7 DarkGray - 941, 505 - MCLabel156 + 1725, 505 + MCLabel151 11, 12 @@ -156,10 +251,12 @@ True True 1 - DarkGray - 865, 505 + Transparent + 宋体, 14pt + White + 856, 445 MCLabel157 - 11, 12 + 19, 19 @@ -168,100 +265,100 @@ BU4BLT07 14, 13 - + 1792, 470 - SwitchLight65 + DMWETER8 12, 12 - + 1818, 470 - SwitchLight66 + DMWETER88 12, 12 - + 1709, 470 - SwitchLight63 + DMWETER7 12, 12 - + 1735, 470 - SwitchLight64 + DMWETER77 12, 12 - + 1479, 470 - SwitchLight61 + DMWETER6 12, 12 - + 1505, 470 - SwitchLight62 + DMWETER66 12, 12 - + 1396, 470 - SwitchLight59 + DMWETER5 12, 12 - + 1422, 470 - SwitchLight60 + DMWETER55 12, 12 - + 1238, 472 - SwitchLight57 + DMWETER4 12, 12 - + 1264, 472 - SwitchLight58 + DMWETER44 12, 12 - + 1154, 472 - SwitchLight55 + DMWETER3 12, 12 - + 1180, 472 - SwitchLight56 + DMWETER33 12, 12 - + 932, 472 - SwitchLight53 + DMWETER2 12, 12 - + 958, 472 - SwitchLight54 + DMWETER22 12, 12 - + 848, 472 - SwitchLight52 + DMWETER1 12, 12 - + 874, 472 - SwitchLight51 + DMWETER11 12, 12 diff --git a/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml b/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml index 97d11a8..da0d9d3 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/ManualWaterControl.xml @@ -19,7 +19,7 @@ Red DarkGray 加载配置 - 732, 601 + 731, 432 MCButton23 85, 47 29 @@ -43,178 +43,33 @@ Red DarkGray 保存配置 - 732, 508 + 731, 339 MCButton22 85, 47 8 - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== - - WetRequest8 - - False - - - - Query - True - True - False - - - Red - DarkGray - 湿混机8发送下料请求 - 6, 339 - MCButton21 - 148, 40 - 7 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== - - WetRequest7 - - False - - - - Query - True - True - False - - - Red - DarkGray - 湿混机7发送下料请求 - 6, 293 - MCButton20 - 148, 40 - 6 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== - - WetRequest6 - - False - - - - Query - True - True - False - - - Red - DarkGray - 湿混机6发送下料请求 - 6, 247 - MCButton19 - 148, 40 - 5 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== - - WetRequest5 - - False - - - - Query - True - True - False - - - Red - DarkGray - 湿混机5发送下料请求 - 6, 201 - MCButton18 - 148, 40 - 4 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== - - WetRequest4 - - False - - - - Query - True - True - False - - - Red - DarkGray - 湿混机4发送下料请求 - 6, 155 - MCButton17 - 148, 40 - 3 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== - - WetRequest3 - - False - - - - Query - True - True - False - - - Red - DarkGray - 湿混机3发送下料请求 - 6, 109 - MCButton16 - 148, 40 - 2 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAACAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDhBNkE3NzM4OTg2NDRFQjlBQ0FGQkRDOEZENjZERjNDBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL - WetRequest2 + + 0 + 0 + True + keywords False - Query + Modify True True - False - - Red - DarkGray - 湿混机2发送下料请求 - 6, 63 - MCButton15 - 148, 40 + 6, 20 + MCTextBox2147483626 + 148, 21 1 @@ -235,17 +90,17 @@ Red DarkGray - 湿混机1发送下料请求 - 6, 17 + 日志查询 + 6, 47 MCButton14 148, 40 0 False - 下料请求发送 + 日志查询 696, 12 GroupBox10 - 160, 387 + 160, 94 28