From dea7b53b5467ff98cecf1e74e6a0ce3c4825d062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE=E7=94=B7?= <446507344@qq.com> Date: Tue, 31 Oct 2023 10:16:22 +0800 Subject: [PATCH] =?UTF-8?q?BZD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APPQ5/QMAPP.FJC.BLL/BZD/BZDConfigBLL.cs | 8 +++ APPQ5/QMAPP.FJC.DAL/BZD/BZDConfigDAL.cs | 21 ++++++++ APPQ5/QMAPP.FJC.Entity/BZD/BZDConfig.cs | 10 ++-- .../Forms/Operation/BZDRePrintForm.cs | 53 +++++++++++++------ .../Operation/BZDRePrintForm.designer.cs | 10 ++-- AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs | 3 ++ 6 files changed, 81 insertions(+), 24 deletions(-) diff --git a/APPQ5/QMAPP.FJC.BLL/BZD/BZDConfigBLL.cs b/APPQ5/QMAPP.FJC.BLL/BZD/BZDConfigBLL.cs index bb0044f..70db449 100644 --- a/APPQ5/QMAPP.FJC.BLL/BZD/BZDConfigBLL.cs +++ b/APPQ5/QMAPP.FJC.BLL/BZD/BZDConfigBLL.cs @@ -106,6 +106,14 @@ namespace QMAPP.FJC.BLL.BZD { return new BZDConfigDAL().GetAllList(); } + /// + /// 获取全部条码格式规则 + /// + /// + public List GetGroupList(string str) + { + return new BZDConfigDAL().GetGroupList(); + } #endregion #region 信息是否重复 diff --git a/APPQ5/QMAPP.FJC.DAL/BZD/BZDConfigDAL.cs b/APPQ5/QMAPP.FJC.DAL/BZD/BZDConfigDAL.cs index 5cfbb05..6967849 100644 --- a/APPQ5/QMAPP.FJC.DAL/BZD/BZDConfigDAL.cs +++ b/APPQ5/QMAPP.FJC.DAL/BZD/BZDConfigDAL.cs @@ -119,6 +119,27 @@ namespace QMAPP.FJC.DAL.BZD throw ex; } } + + /// + /// 获取全部规则 + /// + /// + public List GetGroupList() + { + try + { + string sql = "SELECT Column2 FROM [dbo].[T_BD_BZDConfig] GROUP BY Column2"; + List parameters = new List(); + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + return session.GetList(sql, parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + throw ex; + } + } #endregion #region 获取查询语句 diff --git a/APPQ5/QMAPP.FJC.Entity/BZD/BZDConfig.cs b/APPQ5/QMAPP.FJC.Entity/BZD/BZDConfig.cs index f8c8df7..fad92f1 100644 --- a/APPQ5/QMAPP.FJC.Entity/BZD/BZDConfig.cs +++ b/APPQ5/QMAPP.FJC.Entity/BZD/BZDConfig.cs @@ -112,14 +112,18 @@ namespace QMAPP.FJC.Entity.BZD /// [DBColumn(ColumnName = "CREATEDATE", DataType = DbType.DateTime)] public DateTime CREATEDATE { get; set; } - - - + /// /// 有效标志 /// [DBColumn(ColumnName = "FLGDEL", DataType = DbType.String)] public string FLGDEL { get; set; } + + /// + /// 备用字段 + /// + [DBColumn(ColumnName = "Column2", DataType = DbType.String)] + public string Column2 { get; set; } } diff --git a/APPQ5/QMAPP.WinForm/Forms/Operation/BZDRePrintForm.cs b/APPQ5/QMAPP.WinForm/Forms/Operation/BZDRePrintForm.cs index 0c83deb..2430635 100644 --- a/APPQ5/QMAPP.WinForm/Forms/Operation/BZDRePrintForm.cs +++ b/APPQ5/QMAPP.WinForm/Forms/Operation/BZDRePrintForm.cs @@ -20,6 +20,7 @@ namespace QMAPP.WinForm.Forms.Operation Product _CurrentProduct = null; private OperationForm _parentForm; private OperationForm_316 operationForm_316; + public bool state = false; public BZDRePrintForm(OperationForm parentForm) { @@ -27,18 +28,30 @@ namespace QMAPP.WinForm.Forms.Operation infolabel.Text = ""; infolabel.ForeColor = Color.Red; - //产线 - var list_line = new List(); - list_line.Add(new Lines { Code = "VW371仪表板", Name = "VW371仪表板" }); - list_line.Add(new Lines { Code = "BC316仪表板", Name = "BC316仪表板" }); - list_line.Add(new Lines { Code = "BC316-MP2仪表板", Name = "BC316-MP2仪表板" }); - list_line.Add(new Lines { Code = "BC316-MP3仪表板", Name = "BC316-MP3仪表板" }); + Line(); + _parentForm = parentForm; + } + /// + /// 查询产线信息 + /// + public void Line() + { + _bzdConfig = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_GetGroupList.ToString(), ""); + + var list_line = new List(); + foreach (var t in _bzdConfig) + { + list_line.Add(new Lines { Code = t.Column2, Name = t.Column2 }); + state = true; + } + //产线 + this.cbLine.DataSource = list_line; this.cbLine.DisplayMember = "Name"; this.cbLine.ValueMember = "Code"; - _parentForm = parentForm; + } public BZDRePrintForm(OperationForm_316 operationForm_316) @@ -208,19 +221,27 @@ namespace QMAPP.WinForm.Forms.Operation /// private void PrintForm_Load(object sender, EventArgs e) { - _bzdConfig = - _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_GetAllList.ToString(),""); - var list =new List(); - foreach (var t in _bzdConfig) + if (state) { - if (!string.IsNullOrEmpty(cbLine.SelectedValue.ToString()) && t.configDetail.Contains(cbLine.SelectedValue.ToString())) + _bzdConfig = + _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_GetAllList.ToString(), ""); + var list = new List(); + foreach (var t in _bzdConfig) { - t.MATERIALCODDE = t.MATERIALCODDE + "|" + t.ColorDetail + "|" + t.configDetail; - list.Add(t); + if (!string.IsNullOrEmpty(cbLine.SelectedValue.ToString())) + { + if (t.Column2 == cbLine.SelectedValue.ToString()) + { + t.MATERIALCODDE = t.MATERIALCODDE + "|" + t.ColorDetail + "|" + t.configDetail; + list.Add(t); + } + + } } + _bzdConfig = list; + LoadAssyMaterial(); } - _bzdConfig = list; - LoadAssyMaterial(); + } #endregion diff --git a/APPQ5/QMAPP.WinForm/Forms/Operation/BZDRePrintForm.designer.cs b/APPQ5/QMAPP.WinForm/Forms/Operation/BZDRePrintForm.designer.cs index f9307d1..559714a 100644 --- a/APPQ5/QMAPP.WinForm/Forms/Operation/BZDRePrintForm.designer.cs +++ b/APPQ5/QMAPP.WinForm/Forms/Operation/BZDRePrintForm.designer.cs @@ -71,13 +71,13 @@ namespace QMAPP.WinForm.Forms.Operation this.txtMainCode.Location = new System.Drawing.Point(260, 372); this.txtMainCode.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txtMainCode.Name = "txtMainCode"; - this.txtMainCode.Size = new System.Drawing.Size(509, 49); + this.txtMainCode.Size = new System.Drawing.Size(650, 49); this.txtMainCode.TabIndex = 4; // // button1 // this.button1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(780, 372); + this.button1.Location = new System.Drawing.Point(944, 372); this.button1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(184, 53); @@ -116,7 +116,7 @@ namespace QMAPP.WinForm.Forms.Operation this.cbMaterial.Location = new System.Drawing.Point(261, 222); this.cbMaterial.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.cbMaterial.Name = "cbMaterial"; - this.cbMaterial.Size = new System.Drawing.Size(703, 49); + this.cbMaterial.Size = new System.Drawing.Size(934, 49); this.cbMaterial.TabIndex = 7; // // label2 @@ -150,7 +150,7 @@ namespace QMAPP.WinForm.Forms.Operation this.cbLine.Location = new System.Drawing.Point(261, 148); this.cbLine.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.cbLine.Name = "cbLine"; - this.cbLine.Size = new System.Drawing.Size(538, 49); + this.cbLine.Size = new System.Drawing.Size(572, 49); this.cbLine.TabIndex = 10; this.cbLine.SelectedIndexChanged += new System.EventHandler(this.cbLine_SelectedIndexChanged); // @@ -158,7 +158,7 @@ namespace QMAPP.WinForm.Forms.Operation // this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(998, 599); + this.ClientSize = new System.Drawing.Size(1306, 599); this.Controls.Add(this.cbLine); this.Controls.Add(this.label4); this.Controls.Add(this.label2); diff --git a/AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs b/AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs index 9220a4c..dc678d9 100644 --- a/AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs +++ b/AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs @@ -4181,6 +4181,9 @@ namespace QMAPP.ServicesAgent [Description("查找316总成信息")] BZDRecorderBLL_Get316Record, + + [Description("查询")] + BZDConfigBLL_GetGroupList, #endregion