diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/FrmMixA.Designer.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/FrmMixA.Designer.cs index 4315a09..551f531 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/FrmMixA.Designer.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/FrmMixA.Designer.cs @@ -46,10 +46,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjMixManager // btnCancel // this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(290, 421); - this.btnCancel.Margin = new System.Windows.Forms.Padding(5); + this.btnCancel.Location = new System.Drawing.Point(414, 434); + this.btnCancel.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8); this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(98, 45); + this.btnCancel.Size = new System.Drawing.Size(147, 68); this.btnCancel.TabIndex = 68; this.btnCancel.Text = "取消"; this.btnCancel.UseVisualStyleBackColor = true; @@ -57,10 +57,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjMixManager // // btnOK // - this.btnOK.Location = new System.Drawing.Point(118, 421); - this.btnOK.Margin = new System.Windows.Forms.Padding(5); + this.btnOK.Location = new System.Drawing.Point(156, 434); + this.btnOK.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8); this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(98, 45); + this.btnOK.Size = new System.Drawing.Size(147, 68); this.btnOK.TabIndex = 67; this.btnOK.Text = "确认"; this.btnOK.UseVisualStyleBackColor = true; @@ -72,11 +72,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjMixManager this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.DrpMetageA); this.groupBox1.Controls.Add(this.label4); - this.groupBox1.Location = new System.Drawing.Point(60, 182); - this.groupBox1.Margin = new System.Windows.Forms.Padding(2); + this.groupBox1.Location = new System.Drawing.Point(93, 122); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(2); - this.groupBox1.Size = new System.Drawing.Size(426, 127); + this.groupBox1.Size = new System.Drawing.Size(639, 190); this.groupBox1.TabIndex = 64; this.groupBox1.TabStop = false; this.groupBox1.Text = "干混机"; @@ -84,47 +82,50 @@ namespace Mesnac.Action.ChemicalWeighing.LjMixManager // DrpMixA // this.DrpMixA.FormattingEnabled = true; - this.DrpMixA.Location = new System.Drawing.Point(121, 73); + this.DrpMixA.Location = new System.Drawing.Point(182, 110); + this.DrpMixA.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.DrpMixA.Name = "DrpMixA"; - this.DrpMixA.Size = new System.Drawing.Size(126, 20); + this.DrpMixA.Size = new System.Drawing.Size(187, 26); this.DrpMixA.TabIndex = 52; // // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(27, 75); - this.label5.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label5.Location = new System.Drawing.Point(40, 112); + this.label5.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(59, 12); + this.label5.Size = new System.Drawing.Size(89, 18); this.label5.TabIndex = 49; this.label5.Text = "混合步骤:"; // // DrpMetageA // this.DrpMetageA.FormattingEnabled = true; - this.DrpMetageA.Location = new System.Drawing.Point(121, 39); + this.DrpMetageA.Location = new System.Drawing.Point(182, 58); + this.DrpMetageA.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.DrpMetageA.Name = "DrpMetageA"; - this.DrpMetageA.Size = new System.Drawing.Size(126, 20); + this.DrpMetageA.Size = new System.Drawing.Size(187, 26); this.DrpMetageA.TabIndex = 52; // // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(27, 41); - this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.label4.Location = new System.Drawing.Point(40, 62); + this.label4.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(59, 12); + this.label4.Size = new System.Drawing.Size(89, 18); this.label4.TabIndex = 49; this.label4.Text = "粉料称量:"; // // FrmMixA // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(546, 699); + this.ClientSize = new System.Drawing.Size(819, 1048); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnOK); this.Controls.Add(this.groupBox1); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.Name = "FrmMixA"; this.Text = "干混机配方管理"; this.groupBox1.ResumeLayout(false); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/FrmMixA.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/FrmMixA.cs index a91de95..f9655e9 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/FrmMixA.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/FrmMixA.cs @@ -14,6 +14,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjMixManager public FrmMixA() { InitializeComponent(); + } private int _id = 0; @@ -79,6 +80,20 @@ namespace Mesnac.Action.ChemicalWeighing.LjMixManager LjMixManagerDb.UpdateMixA(view); view.Id = _id; + + + //List recipePlcViews= + + // 第一台干混机 + + switch (_id) + { + case 1 : + // LjMixManagerPlc.DownD1Recipe() + break; + } + + this.DialogResult = DialogResult.OK; } } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/LjMixManagerDb.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/LjMixManagerDb.cs index b06ab98..8cf90b4 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/LjMixManagerDb.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/LjMixManagerDb.cs @@ -1,5 +1,7 @@ using System; +using System.Collections.Generic; using System.Data; +using System.Runtime.CompilerServices; using System.Text; using Mesnac.Action.ChemicalWeighing.LjMaterial; using Mesnac.Action.ChemicalWeighing.LjPlanning; @@ -227,5 +229,32 @@ namespace Mesnac.Action.ChemicalWeighing.LjMixManager ExecuteNonQuery(sb.ToString()); } + + + public static List GetListRecipePlcView(string metageAId) + { + //MtypeId + List ls = new List(); + string sql = + $"select Id, MetageId, MTypeId, MId, MName, Weight, Difference, DeviceId, DeviceName from lj_metage_detail where MetageId='{metageAId}'"; + var dataTable = GetTable(sql); + + foreach (DataRow dr in dataTable.Rows) + { + var meId = Convert.ToInt32(dr["MTypeId"]); + //大仓物料 + + if (meId == 1) + { + + } + + var view = new RecipePlcView(); + // view.TolErance= + } + + return ls; + + } } } \ No newline at end of file diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjTanNum/InItDbAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjTanNum/InItDbAction.cs index 7e6f66e..2d439fc 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjTanNum/InItDbAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjTanNum/InItDbAction.cs @@ -21,7 +21,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjTanNum UpdateAction.OnUpdateMaterial += Process_Event; DbMCControl materialGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, - "TankNumCoding").FirstOrDefault(); //获取物料数据控件 + "lj_day_material").FirstOrDefault(); //获取物料数据控件 this._materialGridControl = materialGridControl; FileControl(); } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjTanNum/UpdateAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjTanNum/UpdateAction.cs index cb1284b..6ef2ba1 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjTanNum/UpdateAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjTanNum/UpdateAction.cs @@ -17,7 +17,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjTanNum this._runtime = runtime; DbMCControl materialGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, - "lj_stock_material").FirstOrDefault(); //获取物料数据控件 + "lj_day_material").FirstOrDefault(); //获取物料数据控件 this._materialGridControl = materialGridControl; DataGridView clientGridView = this._materialGridControl.BaseControl as DataGridView; diff --git a/Main/MCEdit/Data/MCProject/SCWSProject2.mprj b/Main/MCEdit/Data/MCProject/SCWSProject2.mprj index 689a16b..80474c3 100644 --- a/Main/MCEdit/Data/MCProject/SCWSProject2.mprj +++ b/Main/MCEdit/Data/MCProject/SCWSProject2.mprj @@ -21,7 +21,6 @@ - diff --git a/Main/MCEdit/Data/MCProject/nodeForm/FormTankNum.xml b/Main/MCEdit/Data/MCProject/nodeForm/FormTankNum.xml index 059dfc9..0d5d172 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/FormTankNum.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/FormTankNum.xml @@ -14,7 +14,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL - [DataSource1].[TankNumCoding] + [DataSource1].[lj_day_material] True