From d1e220d2f19986454c08280cc206989e8f0b347b Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Thu, 12 Feb 2026 14:49:30 +0800 Subject: [PATCH] =?UTF-8?q?20260212=20=E7=AE=A1=E9=81=93=E7=84=8A=E6=8E=A5?= =?UTF-8?q?=E6=8E=A5=E5=A4=B4=E6=8A=A5=E9=AA=8C=E6=A3=80=E6=9F=A5=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...连接焊接接头、角焊接头组对焊接检查记录.frx | 4 +- .../JGZL/管道焊接接头报检检查记录.frx | 4 +- .../Fastreport/管道焊接接头报检检查记录.frx | 4 +- .../JGZL/WeldInspectionCheckRecord.aspx | 77 ++++- .../JGZL/WeldInspectionCheckRecord.aspx.cs | 287 ++++++++++-------- ...WeldInspectionCheckRecord.aspx.designer.cs | 63 +--- 6 files changed, 246 insertions(+), 193 deletions(-) diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/支管连接焊接接头、角焊接头组对焊接检查记录.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/支管连接焊接接头、角焊接头组对焊接检查记录.frx index e9d3c82..7fb1a51 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/支管连接焊接接头、角焊接头组对焊接检查记录.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/支管连接焊接接头、角焊接头组对焊接检查记录.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接接头报检检查记录.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接接头报检检查记录.frx index 8a1d3e6..a1f826d 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接接头报检检查记录.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接接头报检检查记录.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/管道焊接接头报检检查记录.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/管道焊接接头报检检查记录.frx index ce68404..c1835aa 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/管道焊接接头报检检查记录.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/管道焊接接头报检检查记录.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx b/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx index 98a955a..d76101e 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx @@ -38,6 +38,12 @@ + + + + + + @@ -47,7 +53,7 @@ - @@ -92,6 +98,75 @@ + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx.cs index d118634..02cc96d 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx.cs @@ -36,7 +36,7 @@ namespace FineUIPro.Web.JGZL this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; this.InitTreeMenu();//加载树 this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; - this.BindGrid(); + //this.BindGrid(); this.drpIsoId.Items.Clear(); this.drpIsoId.DataTextField = "ISO_IsoNo"; @@ -112,45 +112,45 @@ namespace FineUIPro.Web.JGZL /// private void BindGrid() { + List listStr = new List(); if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) { - string strSql = @" select distinct batch.ProjectId, - Project.ProjectCode, - Project.ProjectName, - weldReport.JOT_WeldDate, - (CASE WHEN jointType.JOTY_Group='1' THEN '对接焊缝' - WHEN jointType.JOTY_Group='2' THEN '角焊缝' - WHEN jointType.JOTY_Group='3' THEN '支管连接焊缝' END) AS JointType, - jointType.JOTY_Group, - rate.NDTR_ID, - rate.NDTR_Name, - isoInfo.ISO_ID, - isoInfo.ISO_IsoNo, - batch.BatchCode - from HJGL_BO_BatchDetail batchDetail - JOIN dbo.HJGL_BO_Batch batch ON batch.BatchId=batchDetail.BatchId - LEFT JOIN dbo.HJGL_PW_JointInfo joint ON joint.JOT_ID=batchDetail.JOT_ID - left join HJGL_PW_IsoInfo isoInfo on isoInfo.ISO_ID=joint.ISO_ID - LEFT JOIN dbo.Base_Project AS Project ON Project.ProjectId = joint.ProjectId - left join HJGL_BO_WeldReportMain weldReport on weldReport.DReportID = joint.DReportID - LEFT JOIN dbo.HJGL_BS_JointType jointType ON jointType.JOTY_ID = batch.JOTY_ID - LEFT JOIN dbo.HJGL_BS_NDTRate rate ON rate.NDTR_ID = batch.NDTR_ID where batch.ProjectId=@ProjectId "; - List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); - if (this.drpIsoId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpIsoId.SelectedValue)) - { - strSql += " AND isoInfo.ISO_ID=@isoId"; - listStr.Add(new SqlParameter("@isoId", this.drpIsoId.SelectedValue)); - } - if (!string.IsNullOrEmpty(this.txtWeldingDate.Text.Trim())) - { - strSql += " AND weldReport.JOT_WeldDate=@weldingDate"; - listStr.Add(new SqlParameter("@weldingDate", this.txtWeldingDate.Text.Trim())); - } - SqlParameter[] parameter = listStr.ToArray(); - Grid1.DataSource = SQLHelper.GetDataTableRunText(strSql, parameter); - Grid1.DataBind(); } + if (!string.IsNullOrEmpty(this.drpIsoId.SelectedValue) && this.drpIsoId.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@ISO_ID", this.drpIsoId.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@ISO_ID", null)); + } + listStr.Add(new SqlParameter("@VICheckDate", null)); + listStr.Add(new SqlParameter("@NDTR_ID", null)); + if (!string.IsNullOrEmpty(this.drpJointType.SelectedValue) && this.drpJointType.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@JOTY_Group", this.drpJointType.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@JOTY_Group", null)); + } + if (!string.IsNullOrEmpty(this.txtWeldingDate.Text)) + { + listStr.Add(new SqlParameter("@WeldingDate", this.txtWeldingDate.Text)); + } + else + { + listStr.Add(new SqlParameter("@WeldingDate", null)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunProc("HJGL_sp_WeldInspectionCheckRecord", parameter); + this.Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); } #endregion @@ -227,110 +227,133 @@ namespace FineUIPro.Web.JGZL string projectId = this.tvControlItem.SelectedNodeID; if (projectId != null && !string.IsNullOrEmpty(projectId)) { - if (Grid1.SelectedRowIndexArray.Length <= 0) + if (this.drpIsoId.SelectedValue==BLL.Const._Null&&string.IsNullOrEmpty(this.drpIsoId.SelectedValue)) { - Alert.ShowInTop("最少选中一行!", MessageBoxIcon.Warning); + Alert.ShowInTop("请选择管线", MessageBoxIcon.Warning); return; } - if (Grid1.Rows.Count > 0) + if (string.IsNullOrEmpty(this.drpJointType.SelectedValue)) { - for (int gi = 0; gi < Grid1.Rows.Count; gi++) + Alert.ShowInTop("请选择焊缝类型", MessageBoxIcon.Warning); + return; + } + List listStr = new List(); + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); + } + if (!string.IsNullOrEmpty(this.drpIsoId.SelectedValue) && this.drpIsoId.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@ISO_ID", this.drpIsoId.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@ISO_ID", null)); + } + listStr.Add(new SqlParameter("@VICheckDate", null)); + listStr.Add(new SqlParameter("@NDTR_ID", null)); + if (!string.IsNullOrEmpty(this.drpJointType.SelectedValue) && this.drpJointType.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@JOTY_Group", this.drpJointType.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@JOTY_Group", null)); + } + if (!string.IsNullOrEmpty(this.txtWeldingDate.Text)) + { + listStr.Add(new SqlParameter("@WeldingDate", this.txtWeldingDate.Text)); + } + else + { + listStr.Add(new SqlParameter("@WeldingDate", null)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunProc("HJGL_sp_WeldInspectionCheckRecord", parameter); + + if (tb.Rows.Count > 0) + { + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); + + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("Number"); + dt.Columns.Add("ISO_IsoNo"); + dt.Columns.Add("JOT_JointNo"); + dt.Columns.Add("WED_Code"); + dt.Columns.Add("JOT_JointDesc"); + dt.Columns.Add("STE_Code"); + dt.Columns.Add("JOT_Location"); + dt.Columns.Add("WME_Name"); + dt.Columns.Add("WMT_MatName"); + dt.Columns.Add("JOT_PrepareTemp"); + dt.Columns.Add("PassVI"); + dt.Columns.Add("NoPassVI"); + dt.Columns.Add("Remark"); + + DataView dv = tb.DefaultView;//获取表视图 + dv.Sort = "ISO_IsoNo,JOT_JointNo ASC";//按照ID倒序排序 + tb = dv.ToTable();//转为表 + DataRow[] rows = tb.DefaultView.ToTable().Select(); + int i = 0; + foreach (var row in rows) { - if (Grid1.SelectedRowIndex == gi) + var newRows = dt.NewRow(); + newRows["Number"] = (i + 1).ToString(); + newRows["ISO_IsoNo"] = row["ISO_IsoNo"].ToString(); + newRows["JOT_JointNo"] = row["JOT_JointNo"].ToString(); + newRows["WED_Code"] = row["WED_Code"].ToString(); + newRows["JOT_JointDesc"] = row["JOT_JointDesc"].ToString(); + newRows["STE_Code"] = row["STE_Code"].ToString(); + newRows["JOT_Location"] = row["JOT_Location"].ToString(); + newRows["WME_Name"] = row["WME_Name"].ToString(); + newRows["WMT_MatName"] = row["WMT_MatName"].ToString(); + newRows["JOT_PrepareTemp"] = row["JOT_PrepareTemp"].ToString(); + newRows["PassVI"] = row["PassVI"].ToString(); + newRows["NoPassVI"] = row["NoPassVI"].ToString(); + newRows["Remark"] = row["Remark"].ToString(); + dt.Rows.Add(newRows); + i++; + } + BLL.Common.FastReportService.AddFastreportTable(dt); + + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); + keyValuePairs.Add("InspectionCount", tb.Rows.Count.ToString()); + string nderName = string.Empty; + string ndtrId = tb.Rows[0]["NDTR_ID"].ToString(); + if (!string.IsNullOrEmpty(ndtrId)) + { + var rate = BLL.HJGL_DetectionService.GetNDTRateByNDTRID(ndtrId); + if (rate != null) { - string initTemplatePath = ""; - string rootPath = Server.MapPath("~/"); - BLL.Common.FastReportService.ResetData(); - - System.Web.UI.WebControls.HiddenField hidProjectId = Grid1.Rows[gi].FindControl("hidProjectId") as System.Web.UI.WebControls.HiddenField; - System.Web.UI.WebControls.HiddenField hidNDTR_ID = Grid1.Rows[gi].FindControl("hidNDTR_ID") as System.Web.UI.WebControls.HiddenField; - System.Web.UI.WebControls.HiddenField hidJOTY_Group = Grid1.Rows[gi].FindControl("hidJOTY_Group") as System.Web.UI.WebControls.HiddenField; - System.Web.UI.WebControls.HiddenField hidJOT_WeldDate = Grid1.Rows[gi].FindControl("hidJOT_WeldDate") as System.Web.UI.WebControls.HiddenField; - System.Web.UI.WebControls.HiddenField hidProjectName = Grid1.Rows[gi].FindControl("hidProjectName") as System.Web.UI.WebControls.HiddenField; - System.Web.UI.WebControls.HiddenField hidISO_ID = Grid1.Rows[gi].FindControl("hidISO_ID") as System.Web.UI.WebControls.HiddenField; - - var listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", hidProjectId.Value)); - listStr.Add(new SqlParameter("@NDTR_ID", hidNDTR_ID.Value)); - listStr.Add(new SqlParameter("@JOTY_Group", hidJOTY_Group.Value)); - listStr.Add(new SqlParameter("@WeldingDate", hidJOT_WeldDate.Value)); - listStr.Add(new SqlParameter("@ISO_ID", hidISO_ID.Value)); - - SqlParameter[] parameter = listStr.ToArray(); - var tb = SQLHelper.GetDataTableRunProc("HJGL_sp_WeldInspectionCheckRecordNew", parameter); - - DataTable dt = new DataTable(); - dt.TableName = "Data"; - dt.Columns.Add("Number"); - dt.Columns.Add("ISO_IsoNo"); - dt.Columns.Add("JOT_JointNo"); - dt.Columns.Add("WED_Code"); - dt.Columns.Add("JOT_JointDesc"); - dt.Columns.Add("STE_Code"); - dt.Columns.Add("JOT_Location"); - dt.Columns.Add("WME_Name"); - dt.Columns.Add("WMT_MatName"); - dt.Columns.Add("JOT_PrepareTemp"); - dt.Columns.Add("PassVI"); - dt.Columns.Add("NoPassVI"); - dt.Columns.Add("Remark"); - - DataView dv = tb.DefaultView;//获取表视图 - dv.Sort = "ISO_IsoNo,JOT_JointNo ASC";//按照ID倒序排序 - tb = dv.ToTable();//转为表 - DataRow[] rows = tb.DefaultView.ToTable().Select(); - int i = 0; - foreach (var row in rows) - { - var newRows = dt.NewRow(); - newRows["Number"] = (i + 1).ToString(); - newRows["ISO_IsoNo"] = row["ISO_IsoNo"].ToString(); - newRows["JOT_JointNo"] = row["JOT_JointNo"].ToString(); - newRows["WED_Code"] = row["WED_Code"].ToString(); - newRows["JOT_JointDesc"] = row["JOT_JointDesc"].ToString(); - newRows["STE_Code"] = row["STE_Code"].ToString(); - newRows["JOT_Location"] = row["JOT_Location"].ToString(); - newRows["WME_Name"] = row["WME_Name"].ToString(); - newRows["WMT_MatName"] = row["WMT_MatName"].ToString(); - newRows["JOT_PrepareTemp"] = row["JOT_PrepareTemp"].ToString(); - newRows["PassVI"] = row["PassVI"].ToString(); - newRows["NoPassVI"] = row["NoPassVI"].ToString(); - newRows["Remark"] = row["Remark"].ToString(); - dt.Rows.Add(newRows); - i++; - } - BLL.Common.FastReportService.AddFastreportTable(dt); - - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); - keyValuePairs.Add("InspectionCount", tb.Rows.Count.ToString()); - string nderName = string.Empty; - if (!string.IsNullOrEmpty(hidNDTR_ID.Value)) - { - var rate = BLL.HJGL_DetectionService.GetNDTRateByNDTRID(hidNDTR_ID.Value); - if (rate != null) - { - nderName = rate.NDTR_Name; - } - } - keyValuePairs.Add("NDTRName", nderName); - if (hidJOTY_Group.Value == "1") - { - keyValuePairs.Add("NDTType", "RT"); - } - else - { - keyValuePairs.Add("NDTType", "PT"); - } - BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); - - initTemplatePath = "File\\Fastreport\\JGZL\\管道焊接接头报检检查记录.frx"; - if (File.Exists(rootPath + initTemplatePath)) - { - PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); - } + nderName = rate.NDTR_Name; } } + keyValuePairs.Add("NDTRName", nderName); + if (this.drpJointType.SelectedValue == "1") + { + keyValuePairs.Add("NDTType", "RT"); + } + else + { + keyValuePairs.Add("NDTType", "PT"); + } + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\JGZL\\管道焊接接头报检检查记录.frx"; + if (File.Exists(rootPath + initTemplatePath)) + { + PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + } + } + else + { + Alert.ShowInTop("没有可打印的数据!", MessageBoxIcon.Warning); + return; } } else diff --git a/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx.designer.cs index 19be546..58320be 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/WeldInspectionCheckRecord.aspx.designer.cs @@ -104,6 +104,15 @@ namespace FineUIPro.Web.JGZL /// protected global::FineUIPro.DropDownList drpIsoId; + /// + /// drpJointType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpJointType; + /// /// txtWeldingDate 控件。 /// @@ -149,60 +158,6 @@ namespace FineUIPro.Web.JGZL /// protected global::System.Web.UI.WebControls.Label labNumber; - /// - /// hidProjectId 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.HiddenField hidProjectId; - - /// - /// hidNDTR_ID 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.HiddenField hidNDTR_ID; - - /// - /// hidJOTY_Group 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.HiddenField hidJOTY_Group; - - /// - /// hidJOT_WeldDate 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.HiddenField hidJOT_WeldDate; - - /// - /// hidProjectName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.HiddenField hidProjectName; - - /// - /// hidISO_ID 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.HiddenField hidISO_ID; - /// /// ToolbarSeparator1 控件。 ///