diff --git a/DataBase/版本日志/HJGLDB_DS_2026-09-09_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-09-09_bwj.sql new file mode 100644 index 0000000..655abe3 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-09-09_bwj.sql @@ -0,0 +1,7 @@ + +alter table JGZL_IndustrialPipelineInstallationSummary add FromType char(1) +go + +update JGZL_IndustrialPipelineInstallationSummary set FromType='1' +go + diff --git a/DataBase/版本日志/HJGLDB_DS_2026-09-10_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-09-10_bwj.sql new file mode 100644 index 0000000..88c9a65 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-09-10_bwj.sql @@ -0,0 +1,5 @@ + +update Sys_Menu set MenuName='ҵܵװ֤飨װ' where MenuId='F5833B38-65DF-4236-A676-EE75F9487061' +update Sys_Menu set MenuName='ҵܵװ֤飨2020棩' where MenuId='F5833B38-65DF-4236-A676-EE75F9487061' +update Sys_Menu set MenuName='ҵܵװܱװ' where MenuId='F5833B38-65DF-4236-A676-EE75F9487061' +update Sys_Menu set MenuName='ҵܵװܱ2020棩' where MenuId='F5833B38-65DF-4236-A676-EE75F9487061' diff --git a/HJGL_DS/BLL/JGZL/IndustrialPipelineInstallationQualityCertificateService.cs b/HJGL_DS/BLL/JGZL/IndustrialPipelineInstallationQualityCertificateService.cs index 9646761..7ef42e6 100644 --- a/HJGL_DS/BLL/JGZL/IndustrialPipelineInstallationQualityCertificateService.cs +++ b/HJGL_DS/BLL/JGZL/IndustrialPipelineInstallationQualityCertificateService.cs @@ -117,11 +117,11 @@ namespace BLL /// /// /// - public static void InitIndustrialPipelineInstallationQualityCertificateDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease) + public static void InitIndustrialPipelineInstallationQualityCertificateDownList(FineUIPro.DropDownList dropName, string projectId,string fromType, bool isShowPlease) { dropName.DataValueField = "CertificateId"; dropName.DataTextField = "CertificateCode"; - dropName.DataSource = GetIndustrialPipelineInstallationQualityCertificateList(projectId); + dropName.DataSource = GetIndustrialPipelineInstallationQualityCertificateList(projectId,fromType); dropName.DataBind(); if (isShowPlease) { @@ -134,11 +134,11 @@ namespace BLL /// /// 项目Id /// - public static List GetIndustrialPipelineInstallationQualityCertificateList(string projectId) + public static List GetIndustrialPipelineInstallationQualityCertificateList(string projectId, string fromType) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var q = (from x in db.JGZL_IndustrialPipelineInstallationQualityCertificate orderby x.CertificateCode descending select x).ToList(); + var q = (from x in db.JGZL_IndustrialPipelineInstallationQualityCertificate where x.FromType == fromType orderby x.CertificateCode descending select x).ToList(); if (!string.IsNullOrWhiteSpace(projectId)) { q = q.Where(x => x.ProjectId == projectId).ToList(); diff --git a/HJGL_DS/BLL/JGZL/IndustrialPipelineInstallationSummaryService.cs b/HJGL_DS/BLL/JGZL/IndustrialPipelineInstallationSummaryService.cs index 8d28e39..3728ce6 100644 --- a/HJGL_DS/BLL/JGZL/IndustrialPipelineInstallationSummaryService.cs +++ b/HJGL_DS/BLL/JGZL/IndustrialPipelineInstallationSummaryService.cs @@ -19,9 +19,9 @@ namespace BLL return Funs.DB.JGZL_IndustrialPipelineInstallationSummary.FirstOrDefault(e => e.SummaryId == Id); } - public static Model.JGZL_IndustrialPipelineInstallationSummary GetIndustrialPipelineInstallationSummaryByPipelineCode(string pipelineCode) + public static Model.JGZL_IndustrialPipelineInstallationSummary GetIndustrialPipelineInstallationSummaryByPipelineCode(string pipelineCode,string fromType) { - return Funs.DB.JGZL_IndustrialPipelineInstallationSummary.FirstOrDefault(e => e.PipelineCode == pipelineCode); + return Funs.DB.JGZL_IndustrialPipelineInstallationSummary.FirstOrDefault(e => e.PipelineCode == pipelineCode && e.FromType == fromType); } public static List GetIndustrialPipelineInstallationSummaryByProjectId(string projectId) @@ -69,6 +69,7 @@ namespace BLL newModel.OperatingTemperature = model.OperatingTemperature; newModel.VoltageResistantTestDate = model.VoltageResistantTestDate; newModel.LeakageTestDate = model.LeakageTestDate; + newModel.FromType = model.FromType; db.JGZL_IndustrialPipelineInstallationSummary.InsertOnSubmit(newModel); db.SubmitChanges(); } @@ -117,11 +118,11 @@ namespace BLL /// 根据项目Id删除工业管道安装汇总表 /// /// - public static void DeleteIndustrialPipelineInstallationSummaryByProjectId(string projectId) + public static void DeleteIndustrialPipelineInstallationSummaryByProjectId(string projectId,string fromType) { SGGLDB db = Funs.DB; - var q = (from x in db.JGZL_IndustrialPipelineInstallationSummary where x.ProjectId == projectId select x).ToList(); - if (q.Count>0) + var q = (from x in db.JGZL_IndustrialPipelineInstallationSummary where x.ProjectId == projectId && x.FromType==fromType select x).ToList(); + if (q.Count > 0) { db.JGZL_IndustrialPipelineInstallationSummary.DeleteAllOnSubmit(q); db.SubmitChanges(); diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装汇总表.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装汇总表.frx index 4d34b0a..a4c9844 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 } - + @@ -66,9 +66,9 @@ namespace FastReport - - + + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装汇总表2020.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装汇总表2020.frx index 21ff3e2..f013eab 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装汇总表2020.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装汇总表2020.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + @@ -75,19 +75,19 @@ namespace FastReport - - + + - + - - + + @@ -98,10 +98,10 @@ namespace FastReport - + - + @@ -110,7 +110,7 @@ namespace FastReport - + @@ -183,13 +183,13 @@ namespace FastReport - + - - + + @@ -200,49 +200,49 @@ namespace FastReport - + - + - + - - + + - - - - - - - - - + + + + + + + + + - + - - + + @@ -253,10 +253,10 @@ namespace FastReport - + - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx index 467c6d2..9ba0aea 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/压力管道安装质量证明.frx @@ -1,7 +1,7 @@  - + - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道无损检测数量统计表.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道无损检测数量统计表.frx index 1fa2b21..799518e 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 3c9be98..eac753f 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/File/Word/JGZL/工业管道安装汇总表2020导出模板.docx b/HJGL_DS/FineUIPro.Web/File/Word/JGZL/工业管道安装汇总表2020导出模板.docx new file mode 100644 index 0000000..e06cd84 Binary files /dev/null and b/HJGL_DS/FineUIPro.Web/File/Word/JGZL/工业管道安装汇总表2020导出模板.docx differ diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/CheckQuantityStatistics.aspx b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/CheckQuantityStatistics.aspx index 68c5d5c..a67ec5c 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/CheckQuantityStatistics.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/CheckQuantityStatistics.aspx @@ -34,8 +34,7 @@ + AutoLeafIdentification="true" EnableTextSelection="true" Expanded="true"> diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/CheckQuantityStatistics.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/CheckQuantityStatistics.aspx.cs index ebec5dc..7265389 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/CheckQuantityStatistics.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/CheckQuantityStatistics.aspx.cs @@ -45,7 +45,7 @@ namespace FineUIPro.Web.HJGL.CheckManage { this.tvControlItem.Nodes.Clear(); TreeNode rootNode = new TreeNode(); - rootNode.Text = "施工号-装置"; + rootNode.Text = "施工号"; rootNode.ToolTip = "项目"; rootNode.NodeID = "0"; rootNode.Expanded = true; @@ -63,15 +63,16 @@ namespace FineUIPro.Web.HJGL.CheckManage rootProjectNode.Text = item.ProjectCode; rootProjectNode.NodeID = item.ProjectId; rootProjectNode.EnableExpandEvent = true; + rootProjectNode.EnableClickEvent = true; rootProjectNode.ToolTip = item.ProjectName; rootProjectNode.CommandName = "施工号"; rootNode.Nodes.Add(rootProjectNode); - TreeNode tn = new TreeNode(); - tn.NodeID = "temp"; - tn.Text = "正在加载..."; + //TreeNode tn = new TreeNode(); + //tn.NodeID = "temp"; + //tn.Text = "正在加载..."; - rootProjectNode.Nodes.Add(tn); + //rootProjectNode.Nodes.Add(tn); } } @@ -80,38 +81,38 @@ namespace FineUIPro.Web.HJGL.CheckManage /// /// /// - protected void tvControlItem_NodeExpand(object sender, TreeNodeEventArgs e) - { - if (e.Node.Nodes != null) - { - e.Node.Nodes.Clear(); - } - List list = (from x in Funs.DB.Project_Installation where x.ProjectId == e.NodeID select x).ToList(); + //protected void tvControlItem_NodeExpand(object sender, TreeNodeEventArgs e) + //{ + // if (e.Node.Nodes != null) + // { + // e.Node.Nodes.Clear(); + // } + // List list = (from x in Funs.DB.Project_Installation where x.ProjectId == e.NodeID select x).ToList(); - this.BindNodes(e.Node, list); - } + // this.BindNodes(e.Node, list); + //} /// /// 绑定树节点 /// /// - private void BindNodes(TreeNode node, List treeLists) - { - if (node.CommandName == "施工号") - { - var lists = (from x in treeLists orderby x.InstallationCode descending select x).Distinct(); - foreach (var item in lists) - { - TreeNode newNode = new TreeNode(); - newNode.Text = item.InstallationCode; - newNode.NodeID = item.InstallationId; - newNode.ToolTip = item.InstallationName; - newNode.CommandName = "装置"; - newNode.EnableClickEvent = true; - node.Nodes.Add(newNode); - } - } - } + //private void BindNodes(TreeNode node, List treeLists) + //{ + // if (node.CommandName == "施工号") + // { + // var lists = (from x in treeLists orderby x.InstallationCode descending select x).Distinct(); + // foreach (var item in lists) + // { + // TreeNode newNode = new TreeNode(); + // newNode.Text = item.InstallationCode; + // newNode.NodeID = item.InstallationId; + // newNode.ToolTip = item.InstallationName; + // newNode.CommandName = "装置"; + // newNode.EnableClickEvent = true; + // node.Nodes.Add(newNode); + // } + // } + //} #endregion #region 点击TreeView @@ -133,43 +134,43 @@ namespace FineUIPro.Web.HJGL.CheckManage /// private void BindGrid() { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) && !string.IsNullOrEmpty(this.tvControlItem.SelectedNode.ParentNode.NodeID)) + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) && this.tvControlItem.SelectedNodeID != "0") { string strSql = @"SELECT * FROM HJGL_View_TrustNumSummary WHERE ProjectId = @ProjectId ";//AND InstallationId = @InstallationId"; List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNode.ParentNode.NodeID)); + listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNode.NodeID)); //listStr.Add(new SqlParameter("@InstallationId", this.tvControlItem.SelectedNodeID)); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - DataRow[] rows = tb.Select("InstallationId='" + this.tvControlItem.SelectedNodeID + "'"); + //DataRow[] rows = tb.Select("InstallationId='" + this.tvControlItem.SelectedNodeID + "'"); // 2.获取当前分页数据 //var table = this.GetPagedDataTable(Grid1, tb1); - Grid1.RecordCount = rows.Count(); + Grid1.RecordCount = tb.Rows.Count; //tb = GetFilteredTable(Grid1.FilteredData, tb); - //var table = this.GetPagedDataTable(Grid1, tb); + var table = this.GetPagedDataTable(Grid1, tb); - Grid1.DataSource = rows; + Grid1.DataSource = table; Grid1.DataBind(); } } private void BindPage() { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) && !string.IsNullOrEmpty(this.tvControlItem.SelectedNode.ParentNode.NodeID)) - { - var ins = BLL.Project_InstallationService.GetInstallationByInstallationId(this.tvControlItem.SelectedNodeID); - if (ins != null) - { - this.txtWorkAreaCode.Text = ins.InstallationCode; - } + //if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) && !string.IsNullOrEmpty(this.tvControlItem.SelectedNode.ParentNode.NodeID)) + //{ + // var ins = BLL.Project_InstallationService.GetInstallationByInstallationId(this.tvControlItem.SelectedNodeID); + // if (ins != null) + // { + // this.txtWorkAreaCode.Text = ins.InstallationCode; + // } this.txtTestingStandard.Text = "NB/T47013-2015"; - } - else - { - this.txtWorkAreaCode.Text = string.Empty; - } + //} + //else + //{ + // this.txtWorkAreaCode.Text = string.Empty; + //} } #endregion @@ -440,16 +441,16 @@ namespace FineUIPro.Web.HJGL.CheckManage string rootPath = Server.MapPath("~/"); BLL.Common.FastReportService.ResetData(); - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) && !string.IsNullOrEmpty(this.tvControlItem.SelectedNode.ParentNode.NodeID)) + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) && this.tvControlItem.SelectedNode.NodeID!="0") { string strSql = @"SELECT * FROM HJGL_View_TrustNumSummary WHERE ProjectId = @ProjectId "; List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNode.ParentNode.NodeID)); + listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNode.NodeID)); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - DataRow[] rows = tb.Select("InstallationId='" + this.tvControlItem.SelectedNodeID + "'"); + //DataRow[] rows = tb.Select("InstallationId='" + this.tvControlItem.SelectedNodeID + "'"); DataTable dt = new DataTable(); dt.TableName = "Data"; @@ -469,10 +470,10 @@ namespace FineUIPro.Web.HJGL.CheckManage dt.Columns.Add("Mt3Num"); dt.Columns.Add("Pt3Num"); - //DataView dv = tb.DefaultView;//获取表视图 - //dv.Sort = "ISO_IsoNo ASC";//按照ID倒序排序 - //tb = dv.ToTable();//转为表 - //DataRow[] rows = tb.DefaultView.ToTable().Select(); + DataView dv = tb.DefaultView;//获取表视图 + dv.Sort = "IsoNo ASC";//按照ID倒序排序 + tb = dv.ToTable();//转为表 + DataRow[] rows = tb.DefaultView.ToTable().Select(); foreach (var row in rows) { var newRows = dt.NewRow(); @@ -498,7 +499,7 @@ namespace FineUIPro.Web.HJGL.CheckManage //传参 Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("projectName", BLL.Base_ProjectService.GetProjectByProjectId(this.tvControlItem.SelectedNode.ParentNode.NodeID).ProjectName); + keyValuePairs.Add("projectName", BLL.Base_ProjectService.GetProjectByProjectId(this.tvControlItem.SelectedNode.NodeID).ProjectName); keyValuePairs.Add("workAreaCode", txtWorkAreaCode.Text.Trim()); keyValuePairs.Add("testCategoryNumber", txtTestCategoryNumber.Text.Trim()); keyValuePairs.Add("acceptanceCriteria", txtAcceptanceCriteria.Text.Trim()); diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx index f16fbe0..2a90b91 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx @@ -5,7 +5,7 @@ - 工业管道安装质量证明书 + 工业管道安装质量证明书(安装)
@@ -13,7 +13,7 @@ @@ -25,15 +25,15 @@ - + Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="工业管道安装质量证明书(安装)" + TitleToolTip="工业管道安装质量证明书(安装)" AutoScroll="true"> @@ -43,7 +43,7 @@ OnClick="btnSave_Click"> <%----%> - + @@ -198,7 +198,7 @@ Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true" Width="900px" Height="600px"> --%> - diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs index f2d5f63..dba223d 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationQualityCertificate.aspx.cs @@ -596,6 +596,7 @@ namespace FineUIPro.Web.JGZL //newReport.QualificationCertificateCode = this.txtQualificationCertificateCode.Text.Trim(); //newReport.InstitutionalApprovalCertificate = this.txtInstitutionalApprovalCertificate.Text.Trim(); newReport.InstallationInspection = this.txtInstallationInspection.Text.Trim(); + newReport.FromType = "1"; if (!string.IsNullOrEmpty(this.CertificateId)) { @@ -653,7 +654,7 @@ namespace FineUIPro.Web.JGZL initTemplatePath = Const.JGZL_IndustrialPipelineInstallationQualityCertificateUrl; uploadfilepath = rootPath + initTemplatePath; - newUrl = uploadfilepath.Replace("工业管道安装质量证明书导出模板", "工业管道安装质量证明书"); + newUrl = uploadfilepath.Replace("工业管道安装质量证明书导出模板", "工业管道安装质量证明书(安装)"); if (File.Exists(newUrl)) { File.Delete(newUrl); diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx index 34df08e..a26e8ce 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx @@ -5,7 +5,7 @@ - 工业管道安装汇总表 + 工业管道安装汇总表(安装) @@ -13,7 +13,7 @@ @@ -25,15 +25,15 @@ - + Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="工业管道安装汇总表(安装)" + TitleToolTip="工业管道安装汇总表(安装)" AutoScroll="true"> @@ -42,7 +42,7 @@ - + @@ -51,7 +51,7 @@ - - diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs index 7ec5b71..941e2f3 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary.aspx.cs @@ -91,7 +91,7 @@ namespace FineUIPro.Web.JGZL this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; //获取下拉选择项本项目下所有工业管道安装质量证明书信息 - IndustrialPipelineInstallationQualityCertificateService.InitIndustrialPipelineInstallationQualityCertificateDownList(this.drpCertificateCode, this.tvControlItem.SelectedNodeID, false); + IndustrialPipelineInstallationQualityCertificateService.InitIndustrialPipelineInstallationQualityCertificateDownList(this.drpCertificateCode, this.tvControlItem.SelectedNodeID, "1", false); if (!string.IsNullOrEmpty(this.drpCertificateCode.SelectedValue) && this.drpCertificateCode.SelectedValue != BLL.Const._Null) { this.CertificateId = this.drpCertificateCode.SelectedValue; @@ -118,7 +118,7 @@ namespace FineUIPro.Web.JGZL { foreach (var item in isoInfo) { - var summary = BLL.IndustrialPipelineInstallationSummaryService.GetIndustrialPipelineInstallationSummaryByPipelineCode(item.ISO_IsoNo); + var summary = BLL.IndustrialPipelineInstallationSummaryService.GetIndustrialPipelineInstallationSummaryByPipelineCode(item.ISO_IsoNo, "1"); if (summary == null) { Model.JGZL_IndustrialPipelineInstallationSummary newSummary = new JGZL_IndustrialPipelineInstallationSummary(); @@ -162,6 +162,7 @@ namespace FineUIPro.Web.JGZL newSummary.LeakageTestPressure = item.LeakageTest + "MPa";//泄漏试验压力 newSummary.CorrosionControlMethod = item.ISO_Paint;//腐蚀控制方式 newSummary.VoltageResistantTestMethod = "水压试验";//耐压试验方法 + newSummary.FromType = "1"; BLL.IndustrialPipelineInstallationSummaryService.AddIndustrialPipelineInstallationSummary(newSummary); } } @@ -244,8 +245,8 @@ CASE WHEN ISNUMERIC(DesignPressure)=1 THEN FORMAT(CAST(DesignPressure AS DECIMAL VoltageResistantTestMethod, VoltageResistantTestMedium, VoltageResistantTestPressure, LeakageTestMedium, LeakageTestPressure, CleaningMethod, CorrosionControlMethod, InsulationMethod, Remark, CompileMan, CompileDate, Reviewer, RevieweDate, OperatingTemperature, VoltageResistantTestDate, - LeakageTestDate from JGZL_IndustrialPipelineInstallationSummary - WHERE 1=1 "; + LeakageTestDate,FromType from JGZL_IndustrialPipelineInstallationSummary + WHERE FromType='1' "; List listStr = new List(); if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) { @@ -347,7 +348,7 @@ CASE WHEN ISNUMERIC(DesignPressure)=1 THEN FORMAT(CAST(DesignPressure AS DECIMAL string rootPath = Server.MapPath("~/"); BLL.Common.FastReportService.ResetData(); - string strSql = @"SELECT * from JGZL_IndustrialPipelineInstallationSummary where ProjectId = @ProjectId "; + string strSql = @"SELECT * from JGZL_IndustrialPipelineInstallationSummary where ProjectId = @ProjectId and FromType='1'"; List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", projectId)); if (!string.IsNullOrEmpty(this.txtIsoNoS.Text)) @@ -508,6 +509,7 @@ CASE WHEN ISNUMERIC(DesignPressure)=1 THEN FORMAT(CAST(DesignPressure AS DECIMAL { "VoltageResistantTestDate", "" }, { "LeakageTestDate", "" }, { "Remark", "" }, + { "FromType", "1" }, { "Delete3", String.Format("", @@ -599,7 +601,7 @@ CASE WHEN ISNUMERIC(DesignPressure)=1 THEN FORMAT(CAST(DesignPressure AS DECIMAL void saveItem() { - BLL.IndustrialPipelineInstallationSummaryService.DeleteIndustrialPipelineInstallationSummaryByProjectId(this.tvControlItem.SelectedNodeID); + BLL.IndustrialPipelineInstallationSummaryService.DeleteIndustrialPipelineInstallationSummaryByProjectId(this.tvControlItem.SelectedNodeID, "1"); List detailLists = new List(); JArray teamGroupData = Grid1.GetMergedData(); foreach (JObject teamGroupRow in teamGroupData) @@ -632,6 +634,7 @@ CASE WHEN ISNUMERIC(DesignPressure)=1 THEN FORMAT(CAST(DesignPressure AS DECIMAL CleaningMethod = values.Value("CleaningMethod"), CorrosionControlMethod = values.Value("CorrosionControlMethod"), InsulationMethod = values.Value("InsulationMethod"), + FromType = "1" }; detailLists.Add(newDetail); } @@ -669,7 +672,7 @@ CASE WHEN ISNUMERIC(DesignPressure)=1 THEN FORMAT(CAST(DesignPressure AS DECIMAL string projectId = this.tvControlItem.SelectedNodeID; if (!string.IsNullOrEmpty(projectId)) { - string strSql = @"SELECT * from JGZL_IndustrialPipelineInstallationSummary where ProjectId = @ProjectId "; + string strSql = @"SELECT * from JGZL_IndustrialPipelineInstallationSummary where ProjectId = @ProjectId and FromType='1'"; List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", projectId)); if (!string.IsNullOrEmpty(this.txtIsoNoS.Text)) @@ -684,7 +687,7 @@ CASE WHEN ISNUMERIC(DesignPressure)=1 THEN FORMAT(CAST(DesignPressure AS DECIMAL initTemplatePath = Const.JGZL_IndustrialPipelineInstallationSummaryUrl; uploadfilepath = rootPath + initTemplatePath; - newUrl = uploadfilepath.Replace("工业管道安装汇总表导出模板", "工业管道安装汇总表"); + newUrl = uploadfilepath.Replace("工业管道安装汇总表导出模板", "工业管道安装汇总表(安装)"); if (File.Exists(newUrl)) { File.Delete(newUrl); diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary2020.aspx b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary2020.aspx index 35e5606..213be87 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary2020.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary2020.aspx @@ -4,13 +4,281 @@ - - 压力管道安装汇总表2020 + + 工业管道安装汇总表(2020版) -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + + + + + + + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary2020.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary2020.aspx.cs index b6a7899..cbd3e68 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary2020.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary2020.aspx.cs @@ -1,17 +1,891 @@ -using System; +using Aspose.Words; +using Aspose.Words.Tables; +using BLL; +using Model; +using Newtonsoft.Json.Linq; +using NPOI.SS.Formula.Functions; +using Org.BouncyCastle.Asn1.IsisMtt; +using System; using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; using System.Linq; using System.Web; +using System.Web.Services; using System.Web.UI; using System.Web.UI.WebControls; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; namespace FineUIPro.Web.JGZL { - public partial class IndustrialPipelineInstallationSummary2020 : System.Web.UI.Page + public partial class IndustrialPipelineInstallationSummary2020 : PageBase { + #region 定义项 + /// + /// 主键 + /// + private string SummaryId + { + get + { + return (string)ViewState["SummaryId"]; + } + set + { + ViewState["SummaryId"] = value; + } + } + + /// + /// 项目Id + /// + private string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + + /// + /// 外键—CertificateId + /// + public string CertificateId + { + get + { + return (string)ViewState["CertificateId"]; + } + set + { + ViewState["CertificateId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// protected void Page_Load(object sender, EventArgs e) { + if (!IsPostBack) + { + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + this.drpProjectId.DataTextField = "ProjectCode"; + this.drpProjectId.DataValueField = "ProjectId"; + this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); + this.drpProjectId.DataBind(); + Funs.FineUIPleaseSelect(this.drpProjectId); + + this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; + this.InitTreeMenu();//加载树 + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; + + //获取下拉选择项本项目下所有工业管道安装质量证明书信息 + IndustrialPipelineInstallationQualityCertificateService.InitIndustrialPipelineInstallationQualityCertificateDownList(this.drpCertificateCode, this.tvControlItem.SelectedNodeID, "2", false); + if (!string.IsNullOrEmpty(this.drpCertificateCode.SelectedValue) && this.drpCertificateCode.SelectedValue != BLL.Const._Null) + { + this.CertificateId = this.drpCertificateCode.SelectedValue; + var certificate = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateById(this.CertificateId); + if (certificate != null) + { + this.txtDeliveryUnit.Text = certificate.DeliveryUnit; + this.txtDeliveryUnitCode.Text = certificate.DeliveryUnitCode; + } + } + DataIsoInfo(); + BindGrid(); + } } + #endregion + + private void DataIsoInfo() + { + var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.tvControlItem.SelectedNodeID); + if (isoInfo.Count > 0) + { + if (!string.IsNullOrEmpty(this.drpCertificateCode.SelectedValue)) + { + foreach (var item in isoInfo) + { + var summary = BLL.IndustrialPipelineInstallationSummaryService.GetIndustrialPipelineInstallationSummaryByPipelineCode(item.ISO_IsoNo, "2"); + if (summary == null) + { + Model.JGZL_IndustrialPipelineInstallationSummary newSummary = new JGZL_IndustrialPipelineInstallationSummary(); + newSummary.SummaryId = SQLHelper.GetNewID(typeof(Model.JGZL_IndustrialPipelineInstallationSummary)); + newSummary.ProjectId = this.tvControlItem.SelectedNodeID; + if (!string.IsNullOrEmpty(this.drpCertificateCode.SelectedValue)) + { + newSummary.CertificateId = this.drpCertificateCode.SelectedValue; + } + newSummary.PipelineCode = item.ISO_IsoNo; + if (!string.IsNullOrEmpty(item.ISC_ID)) + { + newSummary.PipelineLevel = BLL.HJGL_PipingClassService.GetPipingClassByPipingClassId(item.ISC_ID).ISC_IsoName; + } + newSummary.DesignPressure = item.ISO_DesignPress.HasValue ? item.ISO_DesignPress.Value.ToString("#.00") : ""; + newSummary.DesignTemperature = item.ISO_DesignTemperature.HasValue ? item.ISO_DesignTemperature.Value.ToString("#.00") : ""; + newSummary.OperatingTemperature = item.OperatingTemperature; + if (!string.IsNullOrEmpty(item.SER_ID)) + { + newSummary.Medium = BLL.HJGL_MediumService.GetServiceBySERID(item.SER_ID).SER_Name; + } + if (!string.IsNullOrEmpty(item.STE_ID)) + { + newSummary.Material = BLL.HJGL_MaterialService.GetSteelBySteID(item.STE_ID).STE_Code; + } + var jointInfo = (from x in Funs.DB.HJGL_PW_JointInfo where x.ISO_ID == item.ISO_ID select x).FirstOrDefault(); + if (jointInfo != null) + { + newSummary.Specifications = jointInfo.JOT_JointDesc; + } + newSummary.Length = item.PipeLineLength.HasValue ? item.PipeLineLength.Value.ToString("#.00") : ""; + newSummary.WeldsNum = BLL.HJGL_PW_JointInfoService.GetJointCountByIsoId(item.ISO_ID).ToString(); + if (!string.IsNullOrEmpty(item.Joty_B_Rate)) + { + newSummary.LosslessRatio = HJGL_DetectionService.GetNDTRateByNDTRID(item.Joty_B_Rate).NDTR_Name;//无损检测比例 + } + newSummary.VoltageResistantTestMedium = "水";//耐压试验介质 + newSummary.LeakageTestMedium = "空气";//泄漏试验介质 + newSummary.CleaningMethod = "压缩空气吹扫";//吹扫、清洗方法 + newSummary.VoltageResistantTestPressure = item.ISO_TestPress.HasValue ? item.ISO_TestPress.Value.ToString(("0.##")) + "MPa" : "";//耐压试验压力 + newSummary.LeakageTestPressure = item.LeakageTest + "MPa";//泄漏试验压力 + newSummary.CorrosionControlMethod = item.ISO_Paint;//腐蚀控制方式 + newSummary.VoltageResistantTestMethod = "水压试验";//耐压试验方法 + newSummary.FromType = "2"; + BLL.IndustrialPipelineInstallationSummaryService.AddIndustrialPipelineInstallationSummary(newSummary); + } + } + } + else + { + Alert.ShowInTop("请先编辑工业管道安装质量证明书(2020版)!", MessageBoxIcon.Warning); + return; + } + } + } + + #region 加载树项目 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.tvControlItem.Nodes.Clear(); + TreeNode rootNode = new TreeNode(); + rootNode.Text = "项目"; + rootNode.ToolTip = "项目"; + rootNode.NodeID = "0"; + rootNode.Expanded = true; + this.tvControlItem.Nodes.Add(rootNode); + + List projects = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); + if (this.drpProjectId.SelectedValue != BLL.Const._Null) + { + projects = projects.Where(e => e.ProjectId == this.drpProjectId.SelectedValue).ToList(); + } + foreach (var item in projects) + { + TreeNode rootProjectNode = new TreeNode();//定义根节点 + rootProjectNode.Text = item.ProjectCode; + rootProjectNode.NodeID = item.ProjectId; + rootProjectNode.EnableClickEvent = true; + rootProjectNode.Expanded = true; + rootProjectNode.ToolTip = item.ProjectName; + rootProjectNode.CommandName = "项目名称"; + rootNode.Nodes.Add(rootProjectNode); + } + } + #endregion + + #region 点击TreeView + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + if (this.tvControlItem.SelectedNodeID != "0") + { + DataIsoInfo(); + this.BindGrid(); + } + } + #endregion + + #region 数据绑定 + /// + /// 数据绑定 + /// + private void BindGrid() + { + string strSql = @"select SummaryId, CertificateId, ProjectId, PipelineCode, PipelineLevel, PipelineStartPoint, PipelineEndPoint, +CASE WHEN ISNUMERIC(DesignPressure)=1 THEN FORMAT(CAST(DesignPressure AS DECIMAL(18,6)), 'G29') + ELSE DesignPressure + END AS DesignPressure, + CASE WHEN ISNUMERIC(DesignTemperature)=1 THEN FORMAT(CAST(DesignTemperature AS DECIMAL(18,6)), 'G29') + ELSE DesignTemperature + END AS DesignTemperature, + Medium, Material, Specifications, + CASE WHEN ISNUMERIC(Length)=1 THEN FORMAT(CAST(Length AS DECIMAL(18,6)), 'G29') + ELSE Length + END AS Length, + LayingMethod, WeldsNum, LosslessRatio, + VoltageResistantTestMethod, VoltageResistantTestMedium, VoltageResistantTestPressure, + LeakageTestMedium, LeakageTestPressure, CleaningMethod, CorrosionControlMethod, InsulationMethod, + Remark, CompileMan, CompileDate, Reviewer, RevieweDate, OperatingTemperature, VoltageResistantTestDate, + LeakageTestDate,FromType from JGZL_IndustrialPipelineInstallationSummary + WHERE FromType='2' "; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + strSql += " AND ProjectId = @ProjectId"; + listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID)); + } + if (!string.IsNullOrEmpty(this.txtIsoNoS.Text)) + { + strSql += " AND PipelineCode like @PipelineCode"; + listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtIsoNoS.Text + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + // 2.获取当前分页数据 + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页排序 + #region 页索引改变事件 + /// + /// 页索引改变事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + #endregion + + #region 排序 + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + #endregion + + #region 分页选择下拉改变事件 + /// + /// 分页选择下拉改变事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + #endregion + + #region 查询 + /// + ///查询 + /// + /// + /// + protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) + { + this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; + this.InitTreeMenu(); + DataIsoInfo(); + BindGrid(); + } + + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + string projectId = this.tvControlItem.SelectedNodeID; + + if (projectId != null) + { + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); + + string strSql = @"SELECT * from JGZL_IndustrialPipelineInstallationSummary where FromType='2' and ProjectId = @ProjectId "; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", projectId)); + if (!string.IsNullOrEmpty(this.txtIsoNoS.Text)) + { + strSql += " And PipelineCode like @pipeLineCode"; + listStr.Add(new SqlParameter("@pipeLineCode", "%" + this.txtIsoNoS.Text + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + if (tb.Rows.Count > 0) + { + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("Num"); + dt.Columns.Add("PipelineCode"); + dt.Columns.Add("PipelineLevel"); + dt.Columns.Add("DesignPressure"); + dt.Columns.Add("DesignTemperature"); + dt.Columns.Add("OperatingTemperature"); + dt.Columns.Add("Medium"); + dt.Columns.Add("Material"); + dt.Columns.Add("Specifications"); + dt.Columns.Add("Length"); + dt.Columns.Add("LayingMethod"); + dt.Columns.Add("WeldsNum"); + dt.Columns.Add("LosslessRatio"); + dt.Columns.Add("VoltageResistantTestMedium"); + dt.Columns.Add("VoltageResistantTestPressure"); + dt.Columns.Add("VoltageResistantTestDate"); + dt.Columns.Add("LeakageTestMedium"); + dt.Columns.Add("LeakageTestPressure"); + dt.Columns.Add("LeakageTestDate"); + dt.Columns.Add("CleaningMethod"); + dt.Columns.Add("CorrosionControlMethod"); + dt.Columns.Add("InsulationMethod"); + dt.Columns.Add("PipelineStartPoint"); + dt.Columns.Add("PipelineEndPoint"); + dt.Columns.Add("Remark"); + + DataRow[] rows = tb.DefaultView.ToTable().Select(); + int i = 0; + foreach (var row in rows) + { + var newRow = dt.NewRow(); + newRow["Num"] = (i + 1).ToString(); + newRow["PipelineCode"] = row["PipelineCode"].ToString(); + newRow["PipelineLevel"] = row["PipelineLevel"].ToString(); + newRow["DesignPressure"] = row["DesignPressure"].ToString(); + newRow["DesignTemperature"] = row["DesignTemperature"].ToString(); + newRow["OperatingTemperature"] = row["OperatingTemperature"].ToString(); + newRow["Medium"] = row["Medium"].ToString(); + newRow["Material"] = row["Material"].ToString(); + newRow["Specifications"] = row["Specifications"].ToString(); + newRow["Length"] = row["Length"].ToString(); + newRow["LayingMethod"] = row["LayingMethod"].ToString(); + newRow["WeldsNum"] = row["WeldsNum"].ToString(); + newRow["LosslessRatio"] = row["LosslessRatio"].ToString(); + newRow["VoltageResistantTestMedium"] = row["VoltageResistantTestMedium"].ToString(); + newRow["VoltageResistantTestPressure"] = row["VoltageResistantTestPressure"].ToString(); + string VoltageResistantTestDate = string.Format("{0:yyyy.MM.dd}", row["VoltageResistantTestDate"]); + newRow["VoltageResistantTestDate"] = VoltageResistantTestDate; + newRow["LeakageTestMedium"] = row["LeakageTestMedium"].ToString(); + newRow["LeakageTestPressure"] = row["LeakageTestPressure"].ToString(); + string LeakageTestDate = string.Format("{0:yyyy.MM.dd}", row["LeakageTestDate"]); + newRow["LeakageTestDate"] = LeakageTestDate; + newRow["CleaningMethod"] = row["CleaningMethod"].ToString(); + newRow["CorrosionControlMethod"] = row["CorrosionControlMethod"].ToString(); + newRow["InsulationMethod"] = row["InsulationMethod"].ToString(); + newRow["PipelineStartPoint"] = row["PipelineStartPoint"].ToString(); + newRow["PipelineEndPoint"] = row["PipelineEndPoint"].ToString(); + newRow["Remark"] = row["Remark"].ToString(); + dt.Rows.Add(newRow); + i++; + } + BLL.Common.FastReportService.AddFastreportTable(dt); + + string certificateCode = string.Empty; + string deliveryUnit = string.Empty; + string deliveryUnitCode = string.Empty; + string certificateId = rows[0]["CertificateId"].ToString(); + var certificate = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateById(certificateId); + if (certificate != null) + { + certificateCode = certificate.CertificateCode; + deliveryUnit = certificate.DeliveryUnit; + deliveryUnitCode = certificate.DeliveryUnitCode; + } + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("CertificateCode", certificateCode); + keyValuePairs.Add("DeliveryUnit", deliveryUnit); + keyValuePairs.Add("DeliveryUnitCode", deliveryUnitCode); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\JGZL\\压力管道安装汇总表2020.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 + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + #endregion + + #region 维护 + /// + /// 增加 + /// + /// + /// + protected void btnAdd_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + JArray teamGroupData = Grid1.GetMergedData(); + List list = new List(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + list.Add(values); + } + + JObject defaultObj = new JObject + { + { "SummaryId", Guid.NewGuid() }, + { "CertificateId", this.drpCertificateCode.SelectedValue }, + { "ProjectId", this.tvControlItem.SelectedNodeID }, + { "PipelineCode", "" }, + { "PipelineLevel", "" }, + //{ "PipelineStartPoint", "" }, + //{ "PipelineEndPoint", "" }, + { "DesignPressure", "" }, + { "DesignTemperature", "" }, + { "Medium", "" }, + { "Material", "" }, + { "Specifications", "" }, + { "Length", "" }, + { "LayingMethod", "" }, + { "WeldsNum", "" }, + { "LosslessRatio", "" }, + { "VoltageResistantTestMedium", "" }, + { "VoltageResistantTestPressure", "" }, + { "LeakageTestMedium", "" }, + { "LeakageTestPressure", "" }, + { "CleaningMethod", "" }, + { "CorrosionControlMethod", "" }, + { "InsulationMethod", "" }, + { "OperatingTemperature", "" }, + { "VoltageResistantTestDate", "" }, + { "LeakageTestDate", "" }, + { "Remark", "" }, + { "FromType", "2" }, + { + "Delete3", + String.Format("", + GetDeleteScriptGrid1(), IconHelper.GetResolvedIconUrl(Icon.Delete)) + } + }; + list.Add(defaultObj); + Grid1.DataSource = list; + Grid1.DataBind(); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("IndustrialPipelineInstallationSummaryEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + + protected void Grid1_PreDataBound(object sender, EventArgs e) + { + // 设置LinkButtonField的点击客户端事件 + LinkButtonField deleteField = Grid1.FindColumn("Delete3") as LinkButtonField; + deleteField.OnClientClick = GetDeleteScriptGrid1(); + } + + /// + /// 删除提示 + /// + /// + private string GetDeleteScriptGrid1() + { + return Confirm.GetShowReference("删除选中行?", String.Empty, MessageBoxIcon.Question, + Grid1.GetDeleteSelectedRowsReference(), String.Empty); + } + #endregion + + #region 选择质量证明书编号 + /// + /// 选择质量证明书编号 + /// + /// + /// + protected void drpCertificateCode_SelectedIndexChanged(object sender, EventArgs e) + { + this.txtDeliveryUnit.Text = string.Empty; + this.txtDeliveryUnitCode.Text = string.Empty; + if (!string.IsNullOrWhiteSpace(this.drpCertificateCode.SelectedValue)) + { + //this.CertificateId = this.drpCertificateCode.SelectedValue; + + #region 质量证明书 + var certificate = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateById(this.drpCertificateCode.SelectedValue); + if (certificate != null) + { + this.txtDeliveryUnit.Text = certificate.DeliveryUnit; + this.txtDeliveryUnitCode.Text = certificate.DeliveryUnitCode; + } + #endregion + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, + Const.JGZL_IndustrialPipelineQualityCertificate2020MenuId, Const.BtnSave)) + { + if (string.IsNullOrEmpty(this.drpCertificateCode.SelectedValue)) + { + Alert.ShowInTop("请选择质量证明书编号!", MessageBoxIcon.Warning); + return; + } + saveItem(); + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + } + + void saveItem() + { + BLL.IndustrialPipelineInstallationSummaryService.DeleteIndustrialPipelineInstallationSummaryByProjectId(this.tvControlItem.SelectedNodeID, "2"); + List detailLists = new List(); + JArray teamGroupData = Grid1.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.JGZL_IndustrialPipelineInstallationSummary newDetail = new Model.JGZL_IndustrialPipelineInstallationSummary + { + SummaryId = values.Value("SummaryId"), + ProjectId = this.tvControlItem.SelectedNodeID, + CertificateId = this.drpCertificateCode.SelectedValue, + PipelineCode = values.Value("PipelineCode"), + PipelineLevel = values.Value("PipelineLevel"), + //PipelineStartPoint = values.Value("PipelineStartPoint"), + //PipelineEndPoint = values.Value("PipelineEndPoint"), + DesignPressure = values.Value("DesignPressure"), + DesignTemperature = values.Value("DesignTemperature"), + OperatingTemperature = values.Value("OperatingTemperature"), + Medium = values.Value("Medium"), + Material = values.Value("Material"), + Specifications = values.Value("Specifications"), + Length = values.Value("Length"), + LayingMethod = values.Value("LayingMethod"), + WeldsNum = values.Value("WeldsNum"), + LosslessRatio = values.Value("LosslessRatio"), + //VoltageResistantTestMethod = values.Value("VoltageResistantTestMethod"), + VoltageResistantTestMedium = values.Value("VoltageResistantTestMedium"), + VoltageResistantTestPressure = values.Value("VoltageResistantTestPressure"), + VoltageResistantTestDate = Funs.GetNewDateTime(values.Value("VoltageResistantTestDate")), + LeakageTestMedium = values.Value("LeakageTestMedium"), + LeakageTestPressure = values.Value("LeakageTestPressure"), + LeakageTestDate = Funs.GetNewDateTime(values.Value("LeakageTestDate")), + CleaningMethod = values.Value("CleaningMethod"), + CorrosionControlMethod = values.Value("CorrosionControlMethod"), + InsulationMethod = values.Value("InsulationMethod"), + FromType = "2" + }; + detailLists.Add(newDetail); + } + try + { + if (detailLists.Count > 0) + { + Funs.DB.JGZL_IndustrialPipelineInstallationSummary.InsertAllOnSubmit(detailLists); + } + Funs.DB.SubmitChanges(); + } + catch (Exception) + { + return; + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string initTemplatePath = string.Empty; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + string filePath = string.Empty; + + //每页显示的固定数据行数 + int rowsPerPage = 4; + + string projectId = this.tvControlItem.SelectedNodeID; + if (!string.IsNullOrEmpty(projectId)) + { + string strSql = @"SELECT * from JGZL_IndustrialPipelineInstallationSummary where ProjectId = @ProjectId and FromType='2'"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", projectId)); + if (!string.IsNullOrEmpty(this.txtIsoNoS.Text)) + { + strSql += " And PipelineCode like @pipeLineCode"; + listStr.Add(new SqlParameter("@pipeLineCode", "%" + this.txtIsoNoS.Text + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + if (tb.Rows.Count > 0) + { + initTemplatePath = Const.JGZL_IndustrialPipelineInstallationSummary2020Url; + uploadfilepath = rootPath + initTemplatePath; + + newUrl = uploadfilepath.Replace("工业管道安装汇总表2020导出模板", "压力管道安装汇总表(2020版)"); + if (File.Exists(newUrl)) + { + File.Delete(newUrl); + } + File.Copy(uploadfilepath, newUrl); + //更新书签内容 + Document doc = new Aspose.Words.Document(newUrl); + DocumentBuilder builder = new DocumentBuilder(doc); + + Aspose.Words.Tables.Table table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, 0, true); + + string certificateCode = string.Empty; + string deliveryUnit = string.Empty; + string deliveryUnitCode = string.Empty; + string certificateId = tb.Rows[0]["CertificateId"].ToString(); + var certificate = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateById(certificateId); + if (certificate != null) + { + certificateCode = certificate.CertificateCode; + deliveryUnit = certificate.DeliveryUnit; + deliveryUnitCode = certificate.DeliveryUnitCode; + } + + Bookmark bookmark1 = doc.Range.Bookmarks["certificateCode"]; + if (bookmark1 != null) + { + bookmark1.Text = certificateCode; + } + Bookmark bookmark2 = doc.Range.Bookmarks["deliveryUnit"]; + if (bookmark2 != null) + { + bookmark2.Text = deliveryUnit; + } + Bookmark bookmark3 = doc.Range.Bookmarks["deliveryUnitCode"]; + if (bookmark3 != null) + { + bookmark3.Text = deliveryUnitCode; + } + + // 设置表头行重复显示 + table.Rows[0].RowFormat.HeadingFormat = true; + table.Rows[1].RowFormat.HeadingFormat = true; + table.Rows[2].RowFormat.HeadingFormat = true; + + // 先记录页尾行,并从表格中移除 + //Row footerRow = table.Rows[table.Rows.Count - 1]; + //table.Rows.RemoveAt(table.Rows.Count - 1); + + for (int i = 0; i < tb.Rows.Count; i++) + { + //创建行 + Aspose.Words.Tables.Row row = new Aspose.Words.Tables.Row(doc); + row.Cells.Add(CreateCell((i + 1).ToString(), doc, 22.68, "", ""));//序号 + row.Cells.Add(CreateCell(tb.Rows[i]["PipelineCode"].ToString(), doc, 65.49, "", ""));//单线号 + row.Cells.Add(CreateCell(tb.Rows[i]["PipelineLevel"].ToString(), doc, 37.14, "", ""));//管道级别 + row.Cells.Add(CreateCell(tb.Rows[i]["DesignPressure"].ToString(), doc, 27.78, "", ""));//设计压力 + row.Cells.Add(CreateCell(tb.Rows[i]["DesignTemperature"].ToString(), doc, 28.07, "", ""));//设计温度 + row.Cells.Add(CreateCell(tb.Rows[i]["OperatingTemperature"].ToString(), doc, 28, "", ""));//操作温度 + row.Cells.Add(CreateCell(tb.Rows[i]["Medium"].ToString(), doc, 34.86, "", ""));//输送介质 + row.Cells.Add(CreateCell(tb.Rows[i]["Material"].ToString(), doc, 43.66, "", ""));//管道材质牌号及标准 + row.Cells.Add(CreateCell(tb.Rows[i]["Specifications"].ToString(), doc, 59.82, "", ""));//管道规格(外径×壁厚mm) + row.Cells.Add(CreateCell(tb.Rows[i]["Length"].ToString(), doc, 34.587, "", ""));//管道长度(m) + row.Cells.Add(CreateCell(tb.Rows[i]["LayingMethod"].ToString(), doc, 33.74, "", ""));//铺设方式 + row.Cells.Add(CreateCell(tb.Rows[i]["WeldsNum"].ToString(), doc, 27, "", ""));//焊口数量 + row.Cells.Add(CreateCell(tb.Rows[i]["LosslessRatio"].ToString(), doc, 45.93, "", ""));//检测方法/比例(%) + row.Cells.Add(CreateCell(tb.Rows[i]["VoltageResistantTestMedium"].ToString(), doc, 37.14, "", ""));//压力试验-介质 + row.Cells.Add(CreateCell(tb.Rows[i]["VoltageResistantTestPressure"].ToString(), doc, 30.62, "", ""));//压力试验-压力 + row.Cells.Add(CreateCell(string.Format("{0:yyyy.MM.dd}", tb.Rows[i]["VoltageResistantTestDate"]), doc, 48.76, "", ""));//压力试验-日期 + row.Cells.Add(CreateCell(tb.Rows[i]["LeakageTestMedium"].ToString(), doc, 25.23, "", ""));//泄漏性试验-介质 + row.Cells.Add(CreateCell(tb.Rows[i]["LeakageTestPressure"].ToString(), doc, 28.92, "", ""));//泄漏性试验-压力 + row.Cells.Add(CreateCell(string.Format("{0:yyyy.MM.dd}", tb.Rows[i]["LeakageTestDate"]), doc, 48.76, "", ""));//泄漏性试验-日期 + row.Cells.Add(CreateCell(tb.Rows[i]["CleaningMethod"].ToString(), doc, 26.08, "", ""));//吹洗方法 + row.Cells.Add(CreateCell(tb.Rows[i]["CorrosionControlMethod"].ToString(), doc, 56.7, "", ""));//防腐方式 + row.Cells.Add(CreateCell(tb.Rows[i]["InsulationMethod"].ToString(), doc, 22, "", ""));//保温(绝热)方式 + + table.Rows.Insert(i + 3, row); + } + // 计算并插入空白行,填满整页 + // 计算总数据行数 + int totalDataRows = tb.Rows.Count; + // 计算需要补充的空白行数量 + int remainder = totalDataRows % rowsPerPage; + int needBlankRows = remainder == 0 ? 0 : rowsPerPage - remainder; + + //// 插入空白行(和数据行格式保持一致,仅内容为空) + //for (int i = 0; i < needBlankRows - 1; i++) + //{ + // Aspose.Words.Tables.Row blankRow = new Aspose.Words.Tables.Row(doc); + // // 空白行的单元格宽度和数据行保持一致 + // blankRow.Cells.Add(CreateCell("", doc, 22.68, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 65.49, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 37.14, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 27.78, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 28.07, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 28.06, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 34.86, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 43.66, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 59.82, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 34.587, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 33.74, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 27.78, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 45.93, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 37.14, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 30.62, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 48.76, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 25.23, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 28.92, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 48.76, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 26.08, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 56.7, "", "")); + // blankRow.Cells.Add(CreateCell("", doc, 22, "", "")); + + // // 插入到表格最后一行 + // table.Rows.Add(blankRow); + //} + //把页尾行重新加回表格最后 + //table.Rows.Add(footerRow); + + //自动设置表格样式 + table.AutoFit(AutoFitBehavior.FixedColumnWidths); + table.Alignment = TableAlignment.Center; + + doc.Save(newUrl); + + string fileName = Path.GetFileName(newUrl); + FileInfo info = new FileInfo(newUrl); + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(newUrl, 0, fileSize); + Response.Flush(); + Response.Close(); + File.Delete(newUrl); + } + else + { + Alert.ShowInTop("没有要导出的数据!", MessageBoxIcon.Warning); + return; + } + } + else + { + Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); + return; + } + } + + public static Cell CreateCell(String value, Document doc, double cellWidth, string cellMerge = "", string CenterPage = "", string cellUnitLeft = "") + { + Cell cell = new Cell(doc); + Paragraph p = new Paragraph(doc); + if (!string.IsNullOrEmpty(cellMerge)) + { + if (cellMerge == "0") + { + cell.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.First;//竖直方向合并的第一个单元格 + } + else + { + cell.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;//竖直方向合并的第一个单元格 + } + + } + else + { + cell.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + } + if (!string.IsNullOrEmpty(CenterPage)) + { + //序号 + value = " " + value; + } + if (!string.IsNullOrEmpty(cellUnitLeft)) + { + p.ParagraphFormat.Alignment = ParagraphAlignment.Left;//表格中字体居左 + } + else + { + p.ParagraphFormat.Alignment = ParagraphAlignment.Center;//表格中字体居中 + } + + + p.AppendChild(new Run(doc, value)); + + cell.CellFormat.Width = cellWidth; + + cell.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center; + + cell.CellFormat.Borders.LineWidth = 0.75; + + cell.AppendChild(p); + return cell; + } + + #endregion } } \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary2020.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary2020.aspx.designer.cs index 8bca8c4..e9b8775 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary2020.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummary2020.aspx.designer.cs @@ -22,5 +22,410 @@ namespace FineUIPro.Web.JGZL /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpProjectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProjectId; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtIsoNoS 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIsoNoS; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnAdd 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAdd; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// drpCertificateCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCertificateCode; + + /// + /// txtDeliveryUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDeliveryUnit; + + /// + /// txtDeliveryUnitCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDeliveryUnitCode; + + /// + /// ToolbarFill2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill2; + + /// + /// txtIsoNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIsoNo; + + /// + /// txtPipelineLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipelineLevel; + + /// + /// txtDesignPressure 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDesignPressure; + + /// + /// txtDesignTemperature 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDesignTemperature; + + /// + /// txtOperatingTemperature 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtOperatingTemperature; + + /// + /// txtMedium 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMedium; + + /// + /// txtMaterial 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMaterial; + + /// + /// txtSpecifications 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSpecifications; + + /// + /// txtLength 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLength; + + /// + /// txtLayingMethod 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLayingMethod; + + /// + /// txtWeldsNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWeldsNum; + + /// + /// txtLosslessRatio 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLosslessRatio; + + /// + /// txtVoltageResistantTestMedium 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtVoltageResistantTestMedium; + + /// + /// txtVoltageResistantTestPressure 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtVoltageResistantTestPressure; + + /// + /// txtVoltageResistantTestDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtVoltageResistantTestDate; + + /// + /// txtLeakageTestMedium 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLeakageTestMedium; + + /// + /// txtLeakageTestPressure 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLeakageTestPressure; + + /// + /// txtLeakageTestDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtLeakageTestDate; + + /// + /// txtCleaningMethod 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCleaningMethod; + + /// + /// txtCorrosionControlMethod 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCorrosionControlMethod; + + /// + /// txtInsulationMethod 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtInsulationMethod; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// WindowPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowPrint; } } diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummaryEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummaryEdit.aspx.cs index bfc166b..63448da 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummaryEdit.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineInstallationSummaryEdit.aspx.cs @@ -71,7 +71,7 @@ namespace FineUIPro.Web.JGZL if (!string.IsNullOrWhiteSpace(this.ProjectId)) { //获取下拉选择项本项目下所有工业管道安装质量证明书信息 - IndustrialPipelineInstallationQualityCertificateService.InitIndustrialPipelineInstallationQualityCertificateDownList(this.drpCertificateCode, this.ProjectId, false); + IndustrialPipelineInstallationQualityCertificateService.InitIndustrialPipelineInstallationQualityCertificateDownList(this.drpCertificateCode, this.ProjectId,"1", false); this.drpPipelineCode.DataTextField = "ISO_IsoNo"; this.drpPipelineCode.DataValueField = "ISO_ID"; this.drpPipelineCode.DataSource = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId); @@ -84,7 +84,7 @@ namespace FineUIPro.Web.JGZL if (report != null) { this.ProjectId = report.ProjectId; - IndustrialPipelineInstallationQualityCertificateService.InitIndustrialPipelineInstallationQualityCertificateDownList(this.drpCertificateCode, this.ProjectId, false); + IndustrialPipelineInstallationQualityCertificateService.InitIndustrialPipelineInstallationQualityCertificateDownList(this.drpCertificateCode, this.ProjectId,"1", false); this.drpPipelineCode.DataTextField = "ISO_IsoNo"; this.drpPipelineCode.DataValueField = "ISO_ID"; this.drpPipelineCode.DataSource = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId); diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineQualityCertificate2020.aspx b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineQualityCertificate2020.aspx index 622e557..c1a4aa6 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineQualityCertificate2020.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineQualityCertificate2020.aspx @@ -5,7 +5,7 @@ - 压力管道安装质量证明书2020 + 工业管道安装质量证明书(2020版)
@@ -13,7 +13,7 @@ @@ -25,15 +25,15 @@ - + Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="工业管道安装质量证明书(2020版)" + TitleToolTip="工业管道安装质量证明书(2020版)" AutoScroll="true"> @@ -42,7 +42,7 @@ - + @@ -124,7 +124,7 @@ - diff --git a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineQualityCertificate2020.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineQualityCertificate2020.aspx.cs index dad4865..0687081 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineQualityCertificate2020.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/IndustrialPipelineQualityCertificate2020.aspx.cs @@ -393,7 +393,7 @@ namespace FineUIPro.Web.JGZL initTemplatePath = Const.JGZL_IndustrialPipelineQualityCertificate2020Url; uploadfilepath = rootPath + initTemplatePath; - newUrl = uploadfilepath.Replace("压力管道安装质量证明2020导出模板", "压力管道安装质量证明2020"); + newUrl = uploadfilepath.Replace("压力管道安装质量证明2020导出模板", "工业管道安装质量证明书(2020版)"); if (File.Exists(newUrl)) { File.Delete(newUrl); diff --git a/HJGL_DS/FineUIPro.Web/JGZL/TestQuantityStatistics.aspx b/HJGL_DS/FineUIPro.Web/JGZL/TestQuantityStatistics.aspx index d991596..014abcf 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/TestQuantityStatistics.aspx +++ b/HJGL_DS/FineUIPro.Web/JGZL/TestQuantityStatistics.aspx @@ -27,8 +27,7 @@ + AutoLeafIdentification="true" EnableTextSelection="true" Expanded="true"> diff --git a/HJGL_DS/FineUIPro.Web/JGZL/TestQuantityStatistics.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/TestQuantityStatistics.aspx.cs index 95a8e38..cbbea74 100644 --- a/HJGL_DS/FineUIPro.Web/JGZL/TestQuantityStatistics.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/JGZL/TestQuantityStatistics.aspx.cs @@ -36,6 +36,7 @@ namespace FineUIPro.Web.JGZL this.InitTreeMenu();//加载树 this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.BindGrid(); + this.txtTestingStandard.Text = "NB/T47013-2015"; } } #endregion @@ -48,7 +49,7 @@ namespace FineUIPro.Web.JGZL { this.tvControlItem.Nodes.Clear(); TreeNode rootNode = new TreeNode(); - rootNode.Text = "施工号-装置"; + rootNode.Text = "施工号"; rootNode.ToolTip = "项目"; rootNode.NodeID = "0"; rootNode.Expanded = true; @@ -66,15 +67,16 @@ namespace FineUIPro.Web.JGZL rootProjectNode.Text = item.ProjectCode; rootProjectNode.NodeID = item.ProjectId; rootProjectNode.EnableExpandEvent = true; + rootProjectNode.EnableClickEvent = true; rootProjectNode.ToolTip = item.ProjectName; rootProjectNode.CommandName = "施工号"; rootNode.Nodes.Add(rootProjectNode); - TreeNode tn = new TreeNode(); - tn.NodeID = "temp"; - tn.Text = "正在加载..."; + //TreeNode tn = new TreeNode(); + //tn.NodeID = "temp"; + //tn.Text = "正在加载..."; - rootProjectNode.Nodes.Add(tn); + //rootProjectNode.Nodes.Add(tn); } } @@ -83,38 +85,38 @@ namespace FineUIPro.Web.JGZL /// /// /// - protected void tvControlItem_NodeExpand(object sender, TreeNodeEventArgs e) - { - if (e.Node.Nodes != null) - { - e.Node.Nodes.Clear(); - } - List list = (from x in Funs.DB.Project_Installation where x.ProjectId == e.NodeID select x).ToList(); + //protected void tvControlItem_NodeExpand(object sender, TreeNodeEventArgs e) + //{ + //if (e.Node.Nodes != null) + //{ + // e.Node.Nodes.Clear(); + //} + //List list = (from x in Funs.DB.Project_Installation where x.ProjectId == e.NodeID select x).ToList(); - this.BindNodes(e.Node, list); - } + //this.BindNodes(e.Node, list); + //} /// /// 绑定树节点 /// /// - private void BindNodes(TreeNode node, List treeLists) - { - if (node.CommandName == "施工号") - { - var lists = (from x in treeLists orderby x.InstallationCode descending select x).Distinct(); - foreach (var item in lists) - { - TreeNode newNode = new TreeNode(); - newNode.Text = item.InstallationCode; - newNode.NodeID = item.InstallationId; - newNode.ToolTip = item.InstallationName; - newNode.CommandName = "装置"; - newNode.EnableClickEvent = true; - node.Nodes.Add(newNode); - } - } - } + //private void BindNodes(TreeNode node, List treeLists) + //{ + // if (node.CommandName == "施工号") + // { + // var lists = (from x in treeLists orderby x.InstallationCode descending select x).Distinct(); + // foreach (var item in lists) + // { + // TreeNode newNode = new TreeNode(); + // newNode.Text = item.InstallationCode; + // newNode.NodeID = item.InstallationId; + // newNode.ToolTip = item.InstallationName; + // newNode.CommandName = "装置"; + // newNode.EnableClickEvent = true; + // node.Nodes.Add(newNode); + // } + // } + //} #endregion #region 点击TreeView @@ -125,7 +127,7 @@ namespace FineUIPro.Web.JGZL /// protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) { - BindPage(); + //BindPage(); BindGrid(); } #endregion @@ -136,44 +138,44 @@ namespace FineUIPro.Web.JGZL /// private void BindGrid() { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) && !string.IsNullOrEmpty(this.tvControlItem.SelectedNode.ParentNode.NodeID)) + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) && this.tvControlItem.SelectedNodeID != "0") { string strSql = @"SELECT * FROM HJGL_View_TrustNumSummary WHERE ProjectId = @ProjectId ";//AND InstallationId = @InstallationId"; List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNode.ParentNode.NodeID)); + listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNode.NodeID)); //listStr.Add(new SqlParameter("@InstallationId", this.tvControlItem.SelectedNodeID)); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - DataRow[] rows = tb.Select("InstallationId='" + this.tvControlItem.SelectedNodeID + "'"); + //DataRow[] rows = tb.Select("InstallationId='" + this.tvControlItem.SelectedNodeID + "'"); // 2.获取当前分页数据 //var table = this.GetPagedDataTable(Grid1, tb1); - Grid1.RecordCount = rows.Count(); + Grid1.RecordCount = tb.Rows.Count; //tb = GetFilteredTable(Grid1.FilteredData, tb); - //var table = this.GetPagedDataTable(Grid1, tb); + var table = this.GetPagedDataTable(Grid1, tb); - Grid1.DataSource = rows; + Grid1.DataSource = table; Grid1.DataBind(); } } - private void BindPage() - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) && !string.IsNullOrEmpty(this.tvControlItem.SelectedNode.ParentNode.NodeID)) - { - var ins = BLL.Project_InstallationService.GetInstallationByInstallationId(this.tvControlItem.SelectedNodeID); - if (ins != null) - { - this.txtWorkAreaCode.Text = ins.InstallationCode; - } - this.txtTestingStandard.Text = "NB/T47013-2015"; - } - else - { - this.txtWorkAreaCode.Text = string.Empty; - } - } + //private void BindPage() + //{ + //if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) && !string.IsNullOrEmpty(this.tvControlItem.SelectedNode.ParentNode.NodeID)) + //{ + //var ins = BLL.Project_InstallationService.GetInstallationByInstallationId(this.tvControlItem.SelectedNodeID); + //if (ins != null) + //{ + // this.txtWorkAreaCode.Text = ins.InstallationCode; + //} + //this.txtTestingStandard.Text = "NB/T47013-2015"; + //} + //else + //{ + // this.txtWorkAreaCode.Text = string.Empty; + //} + //} #endregion #region 排序 @@ -444,16 +446,16 @@ namespace FineUIPro.Web.JGZL string rootPath = Server.MapPath("~/"); BLL.Common.FastReportService.ResetData(); - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) && !string.IsNullOrEmpty(this.tvControlItem.SelectedNode.ParentNode.NodeID)) + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID) && this.tvControlItem.SelectedNodeID!="0") { string strSql = @"SELECT * FROM HJGL_View_TrustNumSummary WHERE ProjectId = @ProjectId "; List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNode.ParentNode.NodeID)); + listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNode.NodeID)); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - DataRow[] rows = tb.Select("InstallationId='" + this.tvControlItem.SelectedNodeID + "'"); + //DataRow[] rows = tb.Select("InstallationId='" + this.tvControlItem.SelectedNodeID + "'"); DataTable dt = new DataTable(); dt.TableName = "Data"; @@ -473,10 +475,10 @@ namespace FineUIPro.Web.JGZL dt.Columns.Add("Mt3Num"); dt.Columns.Add("Pt3Num"); - //DataView dv = tb.DefaultView;//获取表视图 - //dv.Sort = "ISO_IsoNo ASC";//按照ID倒序排序 - //tb = dv.ToTable();//转为表 - //DataRow[] rows = tb.DefaultView.ToTable().Select(); + DataView dv = tb.DefaultView;//获取表视图 + dv.Sort = "IsoNo ASC";//按照ID倒序排序 + tb = dv.ToTable();//转为表 + DataRow[] rows = tb.DefaultView.ToTable().Select(); foreach (var row in rows) { var newRows = dt.NewRow(); @@ -502,7 +504,7 @@ namespace FineUIPro.Web.JGZL //传参 Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("projectName", BLL.Base_ProjectService.GetProjectByProjectId(this.tvControlItem.SelectedNode.ParentNode.NodeID).ProjectName); + keyValuePairs.Add("projectName", BLL.Base_ProjectService.GetProjectByProjectId(this.tvControlItem.SelectedNode.NodeID).ProjectName); keyValuePairs.Add("workAreaCode", txtWorkAreaCode.Text.Trim()); keyValuePairs.Add("testCategoryNumber", txtTestCategoryNumber.Text.Trim()); keyValuePairs.Add("acceptanceCriteria", txtAcceptanceCriteria.Text.Trim()); diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs index 0b195eb..fe85845 100644 --- a/HJGL_DS/Model/Model.cs +++ b/HJGL_DS/Model/Model.cs @@ -89513,6 +89513,8 @@ namespace Model private System.Nullable _LeakageTestDate; + private string _FromType; + private EntityRef _Base_Project; private EntityRef _Sys_User; @@ -89585,6 +89587,8 @@ namespace Model partial void OnVoltageResistantTestDateChanged(); partial void OnLeakageTestDateChanging(System.Nullable value); partial void OnLeakageTestDateChanged(); + partial void OnFromTypeChanging(string value); + partial void OnFromTypeChanged(); #endregion public JGZL_IndustrialPipelineInstallationSummary() @@ -90242,6 +90246,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FromType", DbType="Char(1)")] + public string FromType + { + get + { + return this._FromType; + } + set + { + if ((this._FromType != value)) + { + this.OnFromTypeChanging(value); + this.SendPropertyChanging(); + this._FromType = value; + this.SendPropertyChanged("FromType"); + this.OnFromTypeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JGZL_IndustrialPipelineInstallationSummary_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project {