diff --git a/HJGL_DS/BLL/Common/Const.cs b/HJGL_DS/BLL/Common/Const.cs
index 4476182..eca89e6 100644
--- a/HJGL_DS/BLL/Common/Const.cs
+++ b/HJGL_DS/BLL/Common/Const.cs
@@ -2544,6 +2544,11 @@ namespace BLL
///
public const string JGZL_QualifiedWelderUrl = "File\\Word\\JGZL\\合格焊工登记表导出模板.docx";
+ ///
+ /// 管道系统压力试验条件确认记录导出模板
+ ///
+ public const string JGZL_PressureTestOfPipelineSystemConfirmationRecordUrl = "File\\Word\\JGZL\\管道系统压力试验条件确认记录导出模板.docx";
+
///
/// 工序交接记录导出模板
///
@@ -2574,6 +2579,11 @@ namespace BLL
/// 隔热工程质量验收记录导出模板
///
public const string JGZL_InsulationAcceptanceRecordUrl = "File\\Word\\JGZL\\隔热工程质量验收记录导出模板.docx";
+
+ ///
+ /// 档案资料移交表导出模板
+ ///
+ public const string JGZL_ArchivalTransferUrl = "File\\Word\\JGZL\\档案资料移交表导出模板.docx";
#endregion
}
}
diff --git a/HJGL_DS/FineUIPro.Web/File/Word/JGZL/档案资料移交表导出模板.docx b/HJGL_DS/FineUIPro.Web/File/Word/JGZL/档案资料移交表导出模板.docx
new file mode 100644
index 0000000..da19bc0
--- /dev/null
+++ b/HJGL_DS/FineUIPro.Web/File/Word/JGZL/档案资料移交表导出模板.docx
@@ -0,0 +1,59 @@
+ 档案资料移交表
+ (施工号:)
+ ZDS-T6.38.027.A/0.2019
+移交部门:
+ 序号
+ 文 件 名 称
+ (合同号,施工号,文件编号)
+ 数量
+ 备 注
+ 1
+
+
+
+
+ 以下空白
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+移交人: 日期:
+
+审核人: 日期:
+
+接收人: 日期:
diff --git a/HJGL_DS/FineUIPro.Web/File/Word/JGZL/管道系统压力试验条件确认记录导出模板.docx b/HJGL_DS/FineUIPro.Web/File/Word/JGZL/管道系统压力试验条件确认记录导出模板.docx
new file mode 100644
index 0000000..7f5137d
--- /dev/null
+++ b/HJGL_DS/FineUIPro.Web/File/Word/JGZL/管道系统压力试验条件确认记录导出模板.docx
@@ -0,0 +1,69 @@
+ SH/T 3503 -- J406-1
+ 管道系统压力试验条件
+ 确认记录
+工程名称:
+单位工程名称:管道安装工程
+ 系统名称
+
+ 系统编号
+
+ 检查项目与要求
+ 检查结果
+管道安装符合设计文件和规范要求
+
+管道组成件复验合格
+
+焊接工作记录齐全
+
+无损检测结果符合设计文件和规范要求
+
+热处理结果符合设计文件和规范要求
+
+支、吊架安装正确
+
+合金钢管道材质标记清楚
+
+不参与管道系统试验的安全附件、仪表已按规定拆除或隔离,参与试压的系统内的阀门全部开启
+
+临时加固措施、盲板位置与标识符合施工方案要求
+
+焊接接头及需要检验的部位未被覆盖
+
+试压用压力表量程、精度等级、检定状态符合规范要求
+
+不锈钢管道试验用水符合规范要求、附水质分析报告
+
+备注:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 建设/监理单位
+ 总 承 包 单 位
+ 施 工 单 位
+专业工程师:
+
+
+
+日期: 年 月 日
+专业工程师:
+
+
+
+日期: 年 月 日
+施工班组长:
+质量检查员:
+专业工程师:
+
+日期: 年 月 日
+
diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ArchivalTransfer.aspx b/HJGL_DS/FineUIPro.Web/JGZL/ArchivalTransfer.aspx
index 35121d1..db2daf3 100644
--- a/HJGL_DS/FineUIPro.Web/JGZL/ArchivalTransfer.aspx
+++ b/HJGL_DS/FineUIPro.Web/JGZL/ArchivalTransfer.aspx
@@ -44,6 +44,9 @@
+
+
diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ArchivalTransfer.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/ArchivalTransfer.aspx.cs
index 3db840a..486b88f 100644
--- a/HJGL_DS/FineUIPro.Web/JGZL/ArchivalTransfer.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/JGZL/ArchivalTransfer.aspx.cs
@@ -1,4 +1,5 @@
-using BLL;
+using Aspose.Words;
+using BLL;
using System;
using System.Collections.Generic;
using System.IO;
@@ -261,5 +262,79 @@ namespace FineUIPro.Web.JGZL
}
}
#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;
+
+ string projectId = this.tvControlItem.SelectedNodeID;
+ if (!string.IsNullOrEmpty(projectId))
+ {
+ initTemplatePath = Const.JGZL_ArchivalTransferUrl;
+ uploadfilepath = rootPath + initTemplatePath;
+
+ newUrl = uploadfilepath.Replace("档案资料移交表导出模板", "档案资料移交表");
+ if (File.Exists(newUrl))
+ {
+ File.Delete(newUrl);
+ }
+ File.Copy(uploadfilepath, newUrl);
+ Document doc = new Aspose.Words.Document(uploadfilepath);
+
+ Bookmark projectName = doc.Range.Bookmarks["ProjectName"];
+ if (projectName != null)
+ {
+ projectName.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName;
+ }
+ Bookmark projectCode = doc.Range.Bookmarks["ProjectCode"];
+ if (projectCode != null)
+ {
+ projectCode.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectCode;
+ }
+ Bookmark transferringDepart = doc.Range.Bookmarks["TransferringDepart"];
+ if (transferringDepart != null)
+ {
+ transferringDepart.Text = this.txtTransferringDepart.Text.Trim();
+ }
+ Bookmark fileNames = doc.Range.Bookmarks["FileName"];
+ if (fileNames != null)
+ {
+ fileNames.Text = this.txtFileName.Text.Trim();
+ }
+ Bookmark quantity = doc.Range.Bookmarks["Quantity"];
+ if (quantity != null)
+ {
+ quantity.Text = this.txtQuantity.Text.Trim();
+ }
+ 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;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/HJGL_DS/FineUIPro.Web/JGZL/ArchivalTransfer.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/ArchivalTransfer.aspx.designer.cs
index 83f1f7e..cc613e7 100644
--- a/HJGL_DS/FineUIPro.Web/JGZL/ArchivalTransfer.aspx.designer.cs
+++ b/HJGL_DS/FineUIPro.Web/JGZL/ArchivalTransfer.aspx.designer.cs
@@ -122,6 +122,15 @@ namespace FineUIPro.Web.JGZL
///
protected global::FineUIPro.Button btnPrint;
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// SimpleForm1 控件。
///
diff --git a/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx b/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx
index c56bb9d..4bc1a85 100644
--- a/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx
+++ b/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx
@@ -44,6 +44,9 @@
<%----%>
+
+
diff --git a/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx.cs b/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx.cs
index 5476099..1e00913 100644
--- a/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx.cs
@@ -6,6 +6,7 @@ using System.Data;
using System.Linq;
using System.IO;
using Newtonsoft.Json.Linq;
+using Aspose.Words;
namespace FineUIPro.Web.JGZL
{
@@ -98,7 +99,7 @@ namespace FineUIPro.Web.JGZL
{
this.txtSystemName.Text = "材质";
}
- this.txtRemark.Text = record.Remark;
+ this.txtRemark.Text = record.Remark;
BindGrid();
}
else
@@ -280,7 +281,7 @@ namespace FineUIPro.Web.JGZL
{
var record = BLL.PressureTestOfPipelineSystemConfirmationRecordService.GetPressureTestOfPipelineSystemConfirmationRecordByProjectId(this.tvControlItem.SelectedNodeID);
if (record != null)
- {
+ {
this.BindGrid();
}
else
@@ -689,5 +690,133 @@ namespace FineUIPro.Web.JGZL
}
this.txtSystemName.Text = serName;
}
+
+ #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;
+
+ string projectId = this.tvControlItem.SelectedNodeID;
+ if (!string.IsNullOrEmpty(projectId))
+ {
+ initTemplatePath = Const.JGZL_PressureTestOfPipelineSystemConfirmationRecordUrl;
+ uploadfilepath = rootPath + initTemplatePath;
+
+ newUrl = uploadfilepath.Replace("管道系统压力试验条件确认记录导出模板", "管道系统压力试验条件确认记录");
+ if (File.Exists(newUrl))
+ {
+ File.Delete(newUrl);
+ }
+ File.Copy(uploadfilepath, newUrl);
+ Document doc = new Aspose.Words.Document(uploadfilepath);
+
+ var report = (from x in Funs.DB.JGZL_PressureTestOfPipelineSystemConfirmationRecord where x.ProjectId == projectId select x);
+ if (report != null)
+ {
+ Bookmark projectName = doc.Range.Bookmarks["ProjectName"];
+ if (projectName != null)
+ {
+ projectName.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName;
+ }
+ Bookmark systemName = doc.Range.Bookmarks["SystemName"];
+ if (systemName != null)
+ {
+ systemName.Text = report.FirstOrDefault().SystemName;
+ }
+ Bookmark systemCode = doc.Range.Bookmarks["SystemCode"];
+ if (systemCode != null)
+ {
+ systemCode.Text = report.FirstOrDefault().SystemCode;
+ }
+ Bookmark checkItem1 = doc.Range.Bookmarks["CheckItem1"];
+ if (checkItem1 != null)
+ {
+ checkItem1.Text = report.Where(x => x.CheckItem1 == "01").FirstOrDefault().CheckItem3;
+ }
+ Bookmark checkItem2 = doc.Range.Bookmarks["CheckItem2"];
+ if (checkItem2 != null)
+ {
+ checkItem2.Text = report.Where(x => x.CheckItem1 == "02").FirstOrDefault().CheckItem3;
+ }
+ Bookmark checkItem3 = doc.Range.Bookmarks["CheckItem3"];
+ if (checkItem3 != null)
+ {
+ checkItem3.Text = report.Where(x => x.CheckItem1 == "03").FirstOrDefault().CheckItem3;
+ }
+ Bookmark checkItem4 = doc.Range.Bookmarks["CheckItem4"];
+ if (checkItem4 != null)
+ {
+ checkItem4.Text = report.Where(x => x.CheckItem1 == "04").FirstOrDefault().CheckItem3;
+ }
+ Bookmark checkItem5 = doc.Range.Bookmarks["CheckItem5"];
+ if (checkItem5 != null)
+ {
+ checkItem5.Text = report.Where(x => x.CheckItem1 == "05").FirstOrDefault().CheckItem3;
+ }
+ Bookmark checkItem6 = doc.Range.Bookmarks["CheckItem6"];
+ if (checkItem6 != null)
+ {
+ checkItem6.Text = report.Where(x => x.CheckItem1 == "06").FirstOrDefault().CheckItem3;
+ }
+ Bookmark checkItem7 = doc.Range.Bookmarks["CheckItem7"];
+ if (checkItem7 != null)
+ {
+ checkItem7.Text = report.Where(x => x.CheckItem1 == "07").FirstOrDefault().CheckItem3;
+ }
+ Bookmark checkItem8 = doc.Range.Bookmarks["CheckItem8"];
+ if (checkItem8 != null)
+ {
+ checkItem8.Text = report.Where(x => x.CheckItem1 == "08").FirstOrDefault().CheckItem3;
+ }
+ Bookmark checkItem9 = doc.Range.Bookmarks["CheckItem9"];
+ if (checkItem9 != null)
+ {
+ checkItem9.Text = report.Where(x => x.CheckItem1 == "09").FirstOrDefault().CheckItem3;
+ }
+ Bookmark checkItem10 = doc.Range.Bookmarks["CheckItem10"];
+ if (checkItem10 != null)
+ {
+ checkItem10.Text = report.Where(x => x.CheckItem1 == "10").FirstOrDefault().CheckItem3;
+ }
+ Bookmark checkItem11 = doc.Range.Bookmarks["CheckItem11"];
+ if (checkItem11 != null)
+ {
+ checkItem11.Text = report.Where(x => x.CheckItem1 == "11").FirstOrDefault().CheckItem3;
+ }
+ Bookmark checkItem12 = doc.Range.Bookmarks["CheckItem12"];
+ if (checkItem12 != null)
+ {
+ checkItem12.Text = report.Where(x => x.CheckItem1 == "12").FirstOrDefault().CheckItem3;
+ }
+ }
+ 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;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx.designer.cs
index 067cae1..e4e150d 100644
--- a/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx.designer.cs
+++ b/HJGL_DS/FineUIPro.Web/JGZL/PressureTestOfPipelineSystemConfirmationRecord.aspx.designer.cs
@@ -131,6 +131,15 @@ namespace FineUIPro.Web.JGZL
///
protected global::FineUIPro.Button btnPrint;
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
///
/// Toolbar4 控件。
///