From 3867399b7ec58a23b1605c7d192a7d7a7f5c7183 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Sat, 24 May 2025 14:49:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BLL/Common/BaseInfo/Base_UnitService.cs | 16 +++ HJGL_DS/BLL/WeldMat/Stock/StockInService.cs | 2 +- .../HJGL/WeldingReport/WelderPerformance.aspx | 3 +- .../WeldingReport/WelderPerformance.aspx.cs | 106 ++++++++++++++++-- .../WelderPerformance.aspx.designer.cs | 9 ++ .../WeldMat/Stock/StockInEdit.aspx | 4 +- .../WeldMat/Stock/StockInEdit.aspx.cs | 5 + .../Stock/StockInEdit.aspx.designer.cs | 9 ++ .../WeldMat/UsingPlan/UsingPlan2.aspx.cs | 26 ++--- .../WeldMat/UsingPlan/UsingPlanEdit.aspx.cs | 10 +- 10 files changed, 165 insertions(+), 25 deletions(-) diff --git a/HJGL_DS/BLL/Common/BaseInfo/Base_UnitService.cs b/HJGL_DS/BLL/Common/BaseInfo/Base_UnitService.cs index 01208af..ea172ad 100644 --- a/HJGL_DS/BLL/Common/BaseInfo/Base_UnitService.cs +++ b/HJGL_DS/BLL/Common/BaseInfo/Base_UnitService.cs @@ -205,6 +205,22 @@ select x).ToList(); return q; } + + /// + /// 根据单位id获取单位信息 + /// + /// + /// 一个单位有可能多种类型 + /// + public static List GetAllUnits() + { + var q = (from x in Funs.DB.Base_Unit + join y in Funs.DB.Project_Unit on x.UnitId equals y.UnitId + orderby x.UnitCode + select x).Distinct().ToList(); + return q; + } + /// /// 根据分包本单位类型ID获取单位项 /// diff --git a/HJGL_DS/BLL/WeldMat/Stock/StockInService.cs b/HJGL_DS/BLL/WeldMat/Stock/StockInService.cs index 1d43042..53b86c6 100644 --- a/HJGL_DS/BLL/WeldMat/Stock/StockInService.cs +++ b/HJGL_DS/BLL/WeldMat/Stock/StockInService.cs @@ -115,7 +115,7 @@ namespace BLL newStockIn.WeldId = stockIn.WeldId; newStockIn.Amount = stockIn.Amount; newStockIn.Weight = stockIn.Weight; - //newStockIn.RecycleAmount = stockIn.RecycleAmount; + newStockIn.RecycleAmount = stockIn.RecycleAmount; //newStockIn.RecycleWeight = stockIn.RecycleWeight; //newStockIn.Materialman = stockIn.Materialman; //newStockIn.InStockDate = stockIn.InStockDate; diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx index 0245af5..edbc1bc 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx @@ -28,7 +28,7 @@ - @@ -45,6 +45,7 @@ + + /// 绑定数据 + /// + private void BindGrid3() + { + string projectIds = String.Join(",", drpProject.SelectedValueArray); + List listStr = new List(); + + if (this.drpIns.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@installationId", this.drpIns.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@installationId", null)); + } + + if (this.drpUnit.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@unitcode", this.drpUnit.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@unitcode", null)); + } + + if (this.drpSteel.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@steel", this.drpSteel.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@steel", null)); + } + if (this.drpWloName.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@WED_ID", this.drpWloName.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@WED_ID", null)); + } + + if (!string.IsNullOrEmpty(this.txtStarTime.Text)) + { + listStr.Add(new SqlParameter("@date1", Convert.ToDateTime(this.txtStarTime.Text))); + } + else + { + listStr.Add(new SqlParameter("@date1", null)); + } + + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + listStr.Add(new SqlParameter("@date2", Convert.ToDateTime(this.txtEndTime.Text).AddDays(1))); + } + else + { + listStr.Add(new SqlParameter("@date2", null)); + } + + if (this.drpProject.SelectedValueArray.Length > 0 && this.drpProject.SelectedValueArray[0] != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@projectId", projectIds)); + } + else + { + listStr.Add(new SqlParameter("@projectId", null)); + } + + SqlParameter[] parameter = listStr.ToArray(); + tb = SQLHelper.GetDataTableRunProc("HJGL_sp_rpt_welderPerformance3", parameter); + this.Grid1.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } #endregion #region 分页 @@ -415,6 +494,19 @@ this.Grid1.SummaryData = null; //OutputSummaryData(); } + + /// + /// 统计 + /// + /// + /// + protected void BtnAnalyse3_Click(object sender, EventArgs e) + { + this.Grid1.Columns[1].Hidden = true; + BindGrid3(); + this.Grid1.SummaryData = null; + //OutputSummaryData(); + } #endregion #region 导出按钮 @@ -482,7 +574,7 @@ protected void drpProject_OnSelectedIndexChanged(object sender, EventArgs e) { drpIns.Items.Clear(); - this.drpUnit.Items.Clear(); ///单位 + //this.drpUnit.Items.Clear(); ///单位 this.drpWloName.Items.Clear(); ///焊工 if (drpProject.SelectedValueArray.Length > 1) { @@ -494,9 +586,9 @@ } if (drpProject.SelectedValueArray.Length == 1 && this.drpProject.SelectedValueArray[0] != BLL.Const._Null) { - var pUnit = BLL.Base_UnitService.GetUnitsByProjectUnitType(drpProject.SelectedValueArray[0], BLL.Const.UnitType_4); - this.drpUnit.DataSource = pUnit; - this.drpUnit.DataBind(); + //var pUnit = BLL.Base_UnitService.GetUnitsByProjectUnitType(drpProject.SelectedValueArray[0], BLL.Const.UnitType_4); + //this.drpUnit.DataSource = pUnit; + //this.drpUnit.DataBind(); this.drpIns.Items.Clear(); this.drpIns.DataTextField = "Text"; @@ -507,8 +599,8 @@ } Funs.FineUIPleaseSelect(this.drpIns); this.drpIns.SelectedValue = BLL.Const._Null; - Funs.FineUIPleaseSelect(this.drpUnit); - this.drpUnit.SelectedValue = BLL.Const._Null; + //Funs.FineUIPleaseSelect(this.drpUnit); + //this.drpUnit.SelectedValue = BLL.Const._Null; this.drpWloName.DataTextField = "Text"; this.drpWloName.DataValueField = "Value"; if (drpProject.SelectedValueArray.Length == 1 && this.drpProject.SelectedValueArray[0] == BLL.Const._Null) diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx.designer.cs index e1cd877..07d01f4 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx.designer.cs @@ -147,6 +147,15 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// protected global::FineUIPro.ToolbarFill ToolbarFill1; + /// + /// BtnAnalyse3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnAnalyse3; + /// /// BtnAnalyse2 控件。 /// diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx index c98b077..cfc85fc 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx +++ b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx @@ -59,10 +59,12 @@ -