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/Global.asax.cs b/HJGL_DS/FineUIPro.Web/Global.asax.cs index aca0746..1efbfab 100644 --- a/HJGL_DS/FineUIPro.Web/Global.asax.cs +++ b/HJGL_DS/FineUIPro.Web/Global.asax.cs @@ -262,6 +262,16 @@ materialType = "Zr5"; materialTypeName = "其它"; } + else if (queProject[1].Trim().Contains("TiⅡ")) + { + materialType = "TiⅡ,TiⅠ"; + materialTypeName = "钛合金"; + } + else if (queProject[1].Trim().Contains("TiⅠ")) + { + materialType = "TiⅠ"; + materialTypeName = "钛合金"; + } else { materialType = "FeⅣ,FeⅢ,FeⅡ,FeⅠ"; @@ -306,6 +316,16 @@ materialType = "Zr5"; materialTypeName = "其它"; } + else if (queProject[1].Trim().Contains("TiⅡ")) + { + materialType = "TiⅡ,TiⅠ"; + materialTypeName = "钛合金"; + } + else if (queProject[1].Trim().Contains("TiⅠ")) + { + materialType = "TiⅠ"; + materialTypeName = "钛合金"; + } else { materialType = queProject[1].Trim(); @@ -329,6 +349,16 @@ materialType = "Zr5"; materialTypeName = "其它"; } + else if (queProject[1].Trim().Contains("TiⅡ")) + { + materialType = "TiⅡ,TiⅠ"; + materialTypeName = "钛合金"; + } + else if (queProject[1].Trim().Contains("TiⅠ")) + { + materialType = "TiⅠ"; + materialTypeName = "钛合金"; + } else { materialType = queProject[1].Trim(); 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/BaseInfo/StoremanInfo.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/StoremanInfo.aspx.cs index 15b92e2..4bbbb33 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/StoremanInfo.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/StoremanInfo.aspx.cs @@ -20,14 +20,6 @@ namespace FineUIPro.Web.WeldMat.BaseInfo { ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.UnitStoreService.InitUnitStoreDropDownList(drpUnitStore, string.Empty, true); - if (this.CurrUser.UserId == BLL.Const.GlyId || this.CurrUser.UserId == "32da7c11-0869-4b9a-8db4-4e51a4a91f31") - { - this.drpUnitStore.Enabled = true; - } - else - { - this.drpUnitStore.Enabled = false; - } // 绑定表格 BindGrid(); } @@ -225,6 +217,14 @@ namespace FineUIPro.Web.WeldMat.BaseInfo { this.drpUnitStore.SelectedValue = storemanInfo.UnitStoreId; } + if (this.CurrUser.UserId == BLL.Const.GlyId || this.CurrUser.UserId == "32da7c11-0869-4b9a-8db4-4e51a4a91f31" || this.CurrUser.UserId == storemanInfo.UserId) + { + this.drpUnitStore.Enabled = true; + } + else + { + this.drpUnitStore.Enabled = false; + } hfFormID.Text = Id; this.btnDelete.Enabled = true; } 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 @@ -