20260301 交工资料
This commit is contained in:
parent
e769295d8f
commit
3444b526b6
|
|
@ -2456,6 +2456,16 @@ namespace BLL
|
|||
/// 特种设备安装改造维修告知书导出模板
|
||||
/// </summary>
|
||||
public const string JGZL_SpecialEquipmentMaintenanceUrl = "File\\Word\\JGZL\\特种设备安装改造维修告知书导出模板.docx";
|
||||
|
||||
/// <summary>
|
||||
/// 工业管道安装质量证明书导出模板
|
||||
/// </summary>
|
||||
public const string JGZL_IndustrialPipelineInstallationQualityCertificateUrl = "File\\Word\\JGZL\\工业管道安装质量证明书导出模板.docx";
|
||||
|
||||
/// <summary>
|
||||
/// 工业管道安装汇总表导出模板
|
||||
/// </summary>
|
||||
public const string JGZL_IndustrialPipelineInstallationSummaryUrl = "File\\Word\\JGZL\\工业管道安装汇总表导出模板.docx";
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,103 @@
|
|||
|
||||
工业管道安装汇总表
|
||||
质量证明书编号:
|
||||
交工单元名称:
|
||||
交工单元编号:
|
||||
管
|
||||
道
|
||||
编
|
||||
号
|
||||
管
|
||||
道
|
||||
级
|
||||
别
|
||||
起止点
|
||||
设计
|
||||
压力
|
||||
(MPa)
|
||||
设计
|
||||
温度
|
||||
(℃)
|
||||
介
|
||||
质
|
||||
材
|
||||
质
|
||||
规格
|
||||
(mm)
|
||||
长
|
||||
度
|
||||
(m)
|
||||
铺
|
||||
设
|
||||
方
|
||||
式
|
||||
焊
|
||||
口
|
||||
数
|
||||
量
|
||||
无损
|
||||
检测
|
||||
方法/
|
||||
比例
|
||||
(%)
|
||||
耐
|
||||
压
|
||||
试
|
||||
验
|
||||
方
|
||||
法
|
||||
耐
|
||||
压
|
||||
试
|
||||
验
|
||||
介
|
||||
质
|
||||
耐压
|
||||
试验
|
||||
压力
|
||||
(MPa)
|
||||
泄漏
|
||||
试验
|
||||
介质
|
||||
泄漏
|
||||
试验
|
||||
压力
|
||||
(MPa)
|
||||
吹扫
|
||||
、
|
||||
清洗
|
||||
方法
|
||||
腐
|
||||
蚀
|
||||
控
|
||||
制
|
||||
方
|
||||
式
|
||||
保温
|
||||
(绝热)
|
||||
方式
|
||||
|
||||
|
||||
起
|
||||
点
|
||||
终
|
||||
点
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
填表: 日期: 审核: 日期:
|
||||
共 页 第 页
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
工业管道安装质量证明书
|
||||
|
||||
编号:
|
||||
工程名称
|
||||
|
||||
工程编号
|
||||
|
||||
交工单元名称
|
||||
|
||||
交工单元编号
|
||||
|
||||
安装开工日期
|
||||
|
||||
安装竣工日期
|
||||
|
||||
管道级别
|
||||
|
||||
管道长度
|
||||
|
||||
设计单位
|
||||
|
||||
无损检测机构
|
||||
|
||||
监检机构
|
||||
|
||||
建设单位
|
||||
(使用单位)
|
||||
|
||||
|
||||
本工业管道的安装经质量检验,符合《工业管道安全技术规程》(TSG 31-2025)、设计文件和 的要求。
|
||||
|
||||
附:《工业管道安装汇总表》共 页
|
||||
|
||||
|
||||
检验员: 日期:
|
||||
|
||||
|
||||
|
||||
质量保证工程师: 日期:
|
||||
|
||||
|
||||
|
||||
安装单位 (盖章)
|
||||
|
||||
年 月 日
|
||||
|
||||
|
||||
特种设备生产许可证编号:
|
||||
|
||||
|
||||
|
||||
|
|
@ -164,6 +164,7 @@
|
|||
drpJoty_B_Rate.Enabled = true;
|
||||
drpJoty_C_Rate.Enabled = true;
|
||||
drpJoty_D_Rate.Enabled = true;
|
||||
drpIDName.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,11 +40,14 @@
|
|||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>--%>
|
||||
<f:Button ID="btnPrint" Text="工业管道安装质量证明书打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出Word" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
|
@ -110,8 +113,8 @@
|
|||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="47% 15% 38%">
|
||||
<Items>
|
||||
<f:Label ID="lblRemark" runat="server" Text="本工业管道的安装经质量检验,符合《工业管道安全技术规程》(TSG 31-2025)、设计文件和"></f:Label>
|
||||
<f:TextBox ID="txtRemark" runat="server" ></f:TextBox>
|
||||
<f:Label ID="lblRemark" runat="server" Text="本工业管道的安装经质量检验,符合《工业管道安全技术规程》(TSG 31-2025)、设计文件和"></f:Label>
|
||||
<f:TextBox ID="txtRemark" runat="server"></f:TextBox>
|
||||
<f:Label ID="lbld" runat="server" Text="的要求。"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using System.Web;
|
|||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.IO;
|
||||
using Aspose.Words;
|
||||
|
||||
namespace FineUIPro.Web.JGZL
|
||||
{
|
||||
|
|
@ -627,5 +628,141 @@ namespace FineUIPro.Web.JGZL
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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))
|
||||
{
|
||||
var report = BLL.IndustrialPipelineInstallationQualityCertificateService.GetIndustrialPipelineInstallationQualityCertificateByProjectId(projectId);
|
||||
if (report != null)
|
||||
{
|
||||
initTemplatePath = Const.JGZL_IndustrialPipelineInstallationQualityCertificateUrl;
|
||||
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 certificateCode = doc.Range.Bookmarks["CertificateCode"];
|
||||
if (certificateCode != null)
|
||||
{
|
||||
certificateCode.Text = report.CertificateCode;
|
||||
}
|
||||
Bookmark engineeringName = doc.Range.Bookmarks["EngineeringName"];
|
||||
if (engineeringName != null)
|
||||
{
|
||||
engineeringName.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName;
|
||||
}
|
||||
Bookmark engineeringCode = doc.Range.Bookmarks["EngineeringCode"];
|
||||
if (engineeringCode != null)
|
||||
{
|
||||
engineeringCode.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectCode;
|
||||
}
|
||||
Bookmark deliveryUnit = doc.Range.Bookmarks["DeliveryUnit"];
|
||||
if (deliveryUnit != null)
|
||||
{
|
||||
deliveryUnit.Text = report.DeliveryUnit;
|
||||
}
|
||||
Bookmark deliveryUnitCode = doc.Range.Bookmarks["DeliveryUnitCode"];
|
||||
if (deliveryUnitCode != null)
|
||||
{
|
||||
deliveryUnitCode.Text = report.DeliveryUnitCode;
|
||||
}
|
||||
Bookmark installStartDate = doc.Range.Bookmarks["InstallStartDate"];
|
||||
if (installStartDate != null)
|
||||
{
|
||||
installStartDate.Text = report.InstallStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.InstallStartDate) : "";
|
||||
}
|
||||
Bookmark installEndDate = doc.Range.Bookmarks["InstallEndDate"];
|
||||
if (installEndDate != null)
|
||||
{
|
||||
installEndDate.Text = report.InstallEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.InstallEndDate) : "";
|
||||
}
|
||||
Bookmark pipelineLevel = doc.Range.Bookmarks["PipelineLevel"];
|
||||
if (pipelineLevel != null)
|
||||
{
|
||||
pipelineLevel.Text = report.PipelineLevel;
|
||||
}
|
||||
Bookmark pipelineLength = doc.Range.Bookmarks["PipelineLength"];
|
||||
if (pipelineLength != null)
|
||||
{
|
||||
pipelineLength.Text = report.PipelineLength;
|
||||
}
|
||||
Bookmark designUnit = doc.Range.Bookmarks["DesignUnit"];
|
||||
if (designUnit != null)
|
||||
{
|
||||
designUnit.Text = report.DesignUnit;
|
||||
}
|
||||
Bookmark losslessTestingAgency = doc.Range.Bookmarks["LosslessTestingAgency"];
|
||||
if (losslessTestingAgency != null)
|
||||
{
|
||||
losslessTestingAgency.Text = report.LosslessTestingAgency;
|
||||
}
|
||||
Bookmark supervisoryAndInspectionAgency = doc.Range.Bookmarks["SupervisoryAndInspectionAgency"];
|
||||
if (supervisoryAndInspectionAgency != null)
|
||||
{
|
||||
if (report.SupervisoryAndInspectionAgency != null)
|
||||
{
|
||||
supervisoryAndInspectionAgency.Text = report.SupervisoryAndInspectionAgency;
|
||||
}
|
||||
}
|
||||
Bookmark constructionUnit = doc.Range.Bookmarks["ConstructionUnit"];
|
||||
if (constructionUnit != null)
|
||||
{
|
||||
constructionUnit.Text = report.ConstructionUnit;
|
||||
}
|
||||
Bookmark remark = doc.Range.Bookmarks["Remark"];
|
||||
if (remark != null)
|
||||
{
|
||||
remark.Text = report.Remark;
|
||||
}
|
||||
Bookmark specialEquipmentProductionLicenseCode = doc.Range.Bookmarks["SpecialEquipmentProductionLicenseCode"];
|
||||
if (specialEquipmentProductionLicenseCode != null)
|
||||
{
|
||||
specialEquipmentProductionLicenseCode.Text = report.SpecialEquipmentProductionLicenseCode;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -122,6 +122,15 @@ namespace FineUIPro.Web.JGZL
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPrint;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@
|
|||
<f:Button ID="btnSave" Text="保存" ToolTip="保存" Icon="SystemSave" runat="server" OnClick="btnSave_Click"></f:Button>
|
||||
<f:Button ID="btnPrint" Text="工业管道安装汇总表打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出Word" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
using BLL;
|
||||
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.SqlClient;
|
||||
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 System.IO;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Web.Services;
|
||||
using Org.BouncyCastle.Asn1.IsisMtt;
|
||||
using Model;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
|
||||
namespace FineUIPro.Web.JGZL
|
||||
|
|
@ -147,7 +150,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newSummary.VoltageResistantTestMedium = "水";//耐压试验介质
|
||||
newSummary.LeakageTestMedium = "空气";//泄漏试验介质
|
||||
newSummary.CleaningMethod = "压缩空气吹扫";//吹扫、清洗方法
|
||||
newSummary.VoltageResistantTestPressure = item.ISO_TestPress.Value.ToString(("0.##")) + "MPa";//耐压试验压力
|
||||
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 = "水压试验";//耐压试验方法
|
||||
|
|
@ -612,5 +615,236 @@ namespace FineUIPro.Web.JGZL
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
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_IndustrialPipelineInstallationSummaryUrl;
|
||||
uploadfilepath = rootPath + initTemplatePath;
|
||||
|
||||
newUrl = uploadfilepath.Replace("工业管道安装汇总表导出模板", "工业管道安装汇总表");
|
||||
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(tb.Rows[i]["PipelineCode"].ToString(), doc, 32.3, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["PipelineLevel"].ToString(), doc, 33.7, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["PipelineStartPoint"].ToString(), doc, 31.75, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["PipelineEndPoint"].ToString(), doc, 32, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["DesignPressure"].ToString(), doc, 40, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["DesignTemperature"].ToString(), doc, 36, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["Medium"].ToString(), doc, 30.6, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["Material"].ToString(), doc, 31.47, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["Specifications"].ToString(), doc, 32.3, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["Length"].ToString(), doc, 30, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["LayingMethod"].ToString(), doc, 31.49, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["WeldsNum"].ToString(), doc, 30, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["LosslessRatio"].ToString(), doc, 39, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["VoltageResistantTestMethod"].ToString(), doc, 32.3, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["VoltageResistantTestMedium"].ToString(), doc, 28.6, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["VoltageResistantTestPressure"].ToString(), doc, 38, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["LeakageTestMedium"].ToString(), doc, 37.4, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["LeakageTestPressure"].ToString(), doc, 41.67, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["CleaningMethod"].ToString(), doc, 34.3, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["CorrosionControlMethod"].ToString(), doc, 31.2, "", ""));
|
||||
row.Cells.Add(CreateCell(tb.Rows[i]["InsulationMethod"].ToString(), doc, 43.9, "", ""));
|
||||
|
||||
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, 32.3, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 33.7, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 31.75, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 32, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 40, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 36, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 30.6, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 31.47, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 32.3, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 30, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 31.49, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 30, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 39, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 32.3, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 28.6, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 38, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 37.4, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 41.67, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 34.3, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 31.2, "", ""));
|
||||
blankRow.Cells.Add(CreateCell("", doc, 43.9, "", ""));
|
||||
|
||||
// 插入到表格最后一行
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
@ -140,6 +140,15 @@ namespace FineUIPro.Web.JGZL
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPrint;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -81,7 +81,11 @@
|
|||
<f:RenderField HeaderText="检查结果" ColumnID="CheckItem3" DataField="CheckItem3" SortField="CheckItem3"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="300px">
|
||||
<Editor>
|
||||
<f:TextBox ID="txtCheckItem3" runat="server"></f:TextBox>
|
||||
<f:DropDownList ID="drpCheckItem3" runat="server">
|
||||
<f:ListItem Value="合格" Text="合格" Selected="true" />
|
||||
<f:ListItem Value="不合格" Text="不合格" />
|
||||
<f:ListItem Value="/" Text="/" />
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="主键" ColumnID="RecordId" DataField="RecordId" SortField="RecordId"
|
||||
|
|
|
|||
|
|
@ -75,9 +75,23 @@ namespace FineUIPro.Web.JGZL
|
|||
var record = BLL.PressureTestOfPipelineSystemConfirmationRecordService.GetPressureTestOfPipelineSystemConfirmationRecordByProjectId(this.drpProjectId.SelectedValue);
|
||||
if (record != null)
|
||||
{
|
||||
this.txtSystemCode.Text = record.SystemCode;
|
||||
this.txtSystemName.Text = record.SystemName;
|
||||
this.txtRemark.Text = record.Remark;
|
||||
if (!string.IsNullOrEmpty(record.SystemCode))
|
||||
{
|
||||
this.txtSystemCode.Text = record.SystemCode;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtSystemCode.Text = "01";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(record.SystemName))
|
||||
{
|
||||
this.txtSystemName.Text = record.SystemName;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtSystemName.Text = "材质";
|
||||
}
|
||||
this.txtRemark.Text = record.Remark;
|
||||
BindGrid();
|
||||
}
|
||||
else
|
||||
|
|
@ -89,8 +103,8 @@ namespace FineUIPro.Web.JGZL
|
|||
|
||||
private void InitData()
|
||||
{
|
||||
this.txtSystemCode.Text = string.Empty;
|
||||
this.txtSystemName.Text = string.Empty;
|
||||
this.txtSystemCode.Text = "01";
|
||||
this.txtSystemName.Text = "材质";
|
||||
this.txtRemark.Text = string.Empty;
|
||||
itemLists.Clear();
|
||||
this.ProjectId = this.tvControlItem.SelectedNodeID;
|
||||
|
|
@ -99,6 +113,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newItem.ProjectId = this.ProjectId;
|
||||
newItem.CheckItem1 = "01";
|
||||
newItem.CheckItem2 = "管道安装符合设计文件和规范要求";
|
||||
newItem.CheckItem3 = "合格";
|
||||
itemLists.Add(newItem);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord newItem2 = new Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord();
|
||||
|
|
@ -106,6 +121,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newItem2.ProjectId = this.ProjectId;
|
||||
newItem2.CheckItem1 = "02";
|
||||
newItem2.CheckItem2 = "管道组成件复验合格";
|
||||
newItem2.CheckItem3 = "合格";
|
||||
itemLists.Add(newItem2);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord newItem3 = new Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord();
|
||||
|
|
@ -113,6 +129,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newItem3.ProjectId = this.ProjectId;
|
||||
newItem3.CheckItem1 = "03";
|
||||
newItem3.CheckItem2 = "焊接工作记录齐全";
|
||||
newItem3.CheckItem3 = "合格";
|
||||
itemLists.Add(newItem3);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord newItem4 = new Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord();
|
||||
|
|
@ -120,6 +137,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newItem4.ProjectId = this.ProjectId;
|
||||
newItem4.CheckItem1 = "04";
|
||||
newItem4.CheckItem2 = "无损检测结果符合设计文件和规范要求";
|
||||
newItem4.CheckItem3 = "合格";
|
||||
itemLists.Add(newItem4);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord newItem5 = new Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord();
|
||||
|
|
@ -127,6 +145,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newItem5.ProjectId = this.ProjectId;
|
||||
newItem5.CheckItem1 = "05";
|
||||
newItem5.CheckItem2 = "热处理结果符合设计文件和规范要求";
|
||||
newItem5.CheckItem3 = "合格";
|
||||
itemLists.Add(newItem5);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord newItem6 = new Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord();
|
||||
|
|
@ -134,6 +153,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newItem6.ProjectId = this.ProjectId;
|
||||
newItem6.CheckItem1 = "06";
|
||||
newItem6.CheckItem2 = "支、吊架安装正确";
|
||||
newItem6.CheckItem3 = "合格";
|
||||
itemLists.Add(newItem6);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord newItem7 = new Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord();
|
||||
|
|
@ -141,6 +161,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newItem7.ProjectId = this.ProjectId;
|
||||
newItem7.CheckItem1 = "07";
|
||||
newItem7.CheckItem2 = "合金钢管道材质标记清楚";
|
||||
newItem7.CheckItem3 = "合格";
|
||||
itemLists.Add(newItem7);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord newItem8 = new Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord();
|
||||
|
|
@ -148,6 +169,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newItem8.ProjectId = this.ProjectId;
|
||||
newItem8.CheckItem1 = "08";
|
||||
newItem8.CheckItem2 = "不参与管道系统试验的安全附件、仪表已按规定拆除或隔离,参与试压的系统内的阀门全部开启";
|
||||
newItem8.CheckItem3 = "合格";
|
||||
itemLists.Add(newItem8);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord newItem9 = new Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord();
|
||||
|
|
@ -155,6 +177,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newItem9.ProjectId = this.ProjectId;
|
||||
newItem9.CheckItem1 = "09";
|
||||
newItem9.CheckItem2 = "临时加固措施、盲板位置与标识符合施工方案要求";
|
||||
newItem9.CheckItem3 = "合格";
|
||||
itemLists.Add(newItem9);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord newItem10 = new Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord();
|
||||
|
|
@ -162,6 +185,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newItem10.ProjectId = this.ProjectId;
|
||||
newItem10.CheckItem1 = "10";
|
||||
newItem10.CheckItem2 = "焊接接头及需要检验的部位未被覆盖";
|
||||
newItem10.CheckItem3 = "合格";
|
||||
itemLists.Add(newItem10);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord newItem11 = new Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord();
|
||||
|
|
@ -169,6 +193,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newItem11.ProjectId = this.ProjectId;
|
||||
newItem11.CheckItem1 = "11";
|
||||
newItem11.CheckItem2 = "试压用压力表量程、精度等级、检定状态符合规范要求";
|
||||
newItem11.CheckItem3 = "合格";
|
||||
itemLists.Add(newItem11);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord newItem12 = new Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord();
|
||||
|
|
@ -176,6 +201,7 @@ namespace FineUIPro.Web.JGZL
|
|||
newItem12.ProjectId = this.ProjectId;
|
||||
newItem12.CheckItem1 = "12";
|
||||
newItem12.CheckItem2 = "不锈钢管道试验用水符合规范要求、附水质分析报告";
|
||||
newItem12.CheckItem3 = "合格";
|
||||
itemLists.Add(newItem12);
|
||||
|
||||
this.Grid1.DataSource = itemLists;
|
||||
|
|
|
|||
|
|
@ -195,13 +195,13 @@ namespace FineUIPro.Web.JGZL
|
|||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckItem3 控件。
|
||||
/// drpCheckItem3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckItem3;
|
||||
protected global::FineUIPro.DropDownList drpCheckItem3;
|
||||
|
||||
/// <summary>
|
||||
/// WindowPrint 控件。
|
||||
|
|
|
|||
Loading…
Reference in New Issue