From 31d0b92b8f49a55d94293b3adc5e88fd45bdff1f Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 24 Nov 2023 11:35:23 +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 --- DataBase/版本日志/SGGLDB_V2023-11-24.sql | 33 ++++ .../HJGL/WeldingManage/WeldReportEdit.aspx.cs | 2 + .../HJGL/WeldingReport/CheckResult.aspx | 173 +++++++++--------- .../HJGL/WeldingReport/CheckResult.aspx.cs | 19 +- .../CheckResult.aspx.designer.cs | 27 ++- SGGL/FineUIPro.Web/common/Menu_HJGL.xml | 1 + SGGL/FineUIPro.Web/common/Menu_HTGL.xml | 7 +- SGGL/FineUIPro.Web/common/Menu_PHTGL.xml | 21 ++- SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 7 +- 9 files changed, 179 insertions(+), 111 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-11-24.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-11-24.sql b/DataBase/版本日志/SGGLDB_V2023-11-24.sql new file mode 100644 index 00000000..fa8b1feb --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-11-24.sql @@ -0,0 +1,33 @@ + +CREATE PROC [dbo].[sp_rpt_CheckResult] + @unitId NVARCHAR(50) = NULL, --λId + @detectionTypeId NVARCHAR(50) = NULL, --̽ + @flowingSection NVARCHAR(50) = NULL, --̽ + @date1 DATETIME = NULL, + @date2 DATETIME = NULL, + @projectId NVARCHAR(50) = NULL + +AS +/**/ + +select unit.UnitName,jot.WeldJointCode,detectionType.DetectionTypeCode,ndeItem.TotalFilm,ndeItem.PassFilm, +case ndeItem.CheckResult when '1' then 'ϸ' else 'ϸ' end as CheckResult,pipeline.FlowingSection +from HJGL_Batch_NDEItem ndeItem +LEFT JOIN dbo.Base_DetectionType detectionType ON detectionType.DetectionTypeId = ndeItem.DetectionTypeId +LEFT JOIN dbo.HJGL_Batch_BatchTrustItem trustItem ON trustItem.TrustBatchItemId = ndeItem.TrustBatchItemId +LEFT JOIN dbo.HJGL_WeldJoint jot ON jot.WeldJointId = trustItem.WeldJointId +LEFT JOIN dbo.HJGL_Pipeline pipeline ON jot.PipelineId = pipeline.PipelineId +LEFT JOIN dbo.HJGL_WeldingDaily daily ON daily.WeldingDailyId = jot.WeldingDailyId +LEFT JOIN dbo.Base_Unit unit ON unit.UnitId = daily.UnitId +WHERE (ndeItem.DetectionTypeId=@detectionTypeId OR @detectionTypeId IS NULL) +AND (jot.ProjectId=@projectId OR @projectId IS NULL) +AND (daily.UnitId = @unitId OR @unitId IS NULL) +AND (daily.WeldingDate >= @date1 OR @date1 IS NULL) +AND (daily.WeldingDate <= @date2 OR @date2 IS NULL) +AND (pipeline.FlowingSection like '%'+@flowingSection+'%' OR @flowingSection IS NULL) +ORDER BY daily.UnitId,detectionType.DetectionTypeCode,jot.WeldJointCode + + +GO + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs index 1ed9495f..02111680 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs @@ -1015,6 +1015,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage #region 查找 protected void WeldingDateText_OnTextChanged(object sender, EventArgs e) { + string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-"; + this.txtWeldingDailyCode.Text = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", this.CurrUser.LoginProjectId, perfix); BindGrid(null); } /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx index bb42e7c0..ea731487 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx @@ -10,90 +10,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs index 27adf4a0..1dc4524b 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs @@ -31,12 +31,12 @@ namespace FineUIPro.Web.HJGL.WeldingReport listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); if (this.drpUnitId.SelectedValue != BLL.Const._Null) - { - listStr.Add(new SqlParameter("@unitcode", this.drpUnitId.SelectedValue)); + { + listStr.Add(new SqlParameter("@unitId", this.drpUnitId.SelectedValue)); } else { - listStr.Add(new SqlParameter("@unitcode", null)); + listStr.Add(new SqlParameter("@unitId", null)); } if (this.drpDetectionType.SelectedValue != BLL.Const._Null) { @@ -46,7 +46,14 @@ namespace FineUIPro.Web.HJGL.WeldingReport { listStr.Add(new SqlParameter("@detectionTypeId", null)); } - + if (!string.IsNullOrEmpty(this.txtFlowingSection.Text.Trim())) + { + listStr.Add(new SqlParameter("@flowingSection", this.txtFlowingSection.Text.Trim())); + } + else + { + listStr.Add(new SqlParameter("@flowingSection", null)); + } if (!string.IsNullOrEmpty(this.txtStarTime.Text)) { listStr.Add(new SqlParameter("@date1", this.txtStarTime.Text.Trim())); @@ -64,7 +71,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport listStr.Add(new SqlParameter("@date2", null)); } SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunProc("sp_rpt_WelderFirstPassRate", parameter); + DataTable tb = SQLHelper.GetDataTableRunProc("sp_rpt_CheckResult", parameter); this.Grid1.RecordCount = tb.Rows.Count; var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; @@ -124,7 +131,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { Response.ClearContent(); string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊工一次合格率" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("检测结果汇总" + filename, System.Text.Encoding.UTF8) + ".xls"); Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; Response.Write(GetGridTableHtml(Grid1)); diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs index 3729067c..aafcac37 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs @@ -75,6 +75,15 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// protected global::FineUIPro.DropDownList drpDetectionType; + /// + /// txtFlowingSection 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFlowingSection; + /// /// txtStarTime 控件。 /// @@ -102,15 +111,6 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// protected global::FineUIPro.DatePicker txtEndTime; - /// - /// Toolbar3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar3; - /// /// ToolbarFill1 控件。 /// @@ -138,6 +138,15 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// protected global::FineUIPro.Button btnOut; + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml index 65eed927..89357168 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml @@ -60,6 +60,7 @@ + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml index c0fc81f0..95eeab91 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml @@ -7,6 +7,8 @@ + + @@ -14,7 +16,10 @@ - + + + + diff --git a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml index eb672a76..31955789 100644 --- a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml @@ -17,19 +17,20 @@ - - - - - - - - - + + + + + + + + + + - + diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index 03eb9188..91287096 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -53,7 +53,12 @@ - + + + + + +