From 6c42bba8577e09de0ce1c4f5825fe50d8150e3f9 Mon Sep 17 00:00:00 2001 From: liyh Date: Sat, 11 May 2024 10:07:46 +0800 Subject: [PATCH 1/4] 1111 --- .../WeldingProcess/WeldingManage/JointInfo.aspx.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/JointInfo.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/JointInfo.aspx.cs index 4d86810..afcdbdd 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/JointInfo.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/WeldingManage/JointInfo.aspx.cs @@ -1230,18 +1230,20 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage #endregion - ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 8, rowIndex + 8, style, 0, 14, false, false, true); - rowIndex += 9; + ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 8, rowIndex + 9, style, 0, 14, false, false, true); + rowIndex += 10; ws.SetRowBreak(rowIndex - 1); } + ws.FitToPage = true; ws.PrintSetup.FitWidth = 1; - ws.PrintSetup.FitHeight = 0; + ws.PrintSetup.FitHeight = short.MaxValue; + ws.SetMargin(MarginType.LeftMargin, 0.3); ws.SetMargin(MarginType.RightMargin, 0.2); ws.PrintSetup.Landscape = true; - ws.PrintSetup.Scale = 70; + //ws.PrintSetup.Scale = 70; ws.ForceFormulaRecalculation = true; ws.PrintSetup.PaperSize = (int)PaperSize.A4_Small; From 4c04e72cbf5c7ead73d8e06cc50c3d139951ade3 Mon Sep 17 00:00:00 2001 From: liyh Date: Sat, 11 May 2024 10:07:46 +0800 Subject: [PATCH 2/4] 1111 --- HJGL/.vs/HJGL/config/applicationhost.config | 2 +- HJGL/.vs/HJGL/v17/.suo | Bin 1040896 -> 1040896 bytes .../WeldingManage/JointInfo.aspx.cs | 10 ++++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/HJGL/.vs/HJGL/config/applicationhost.config b/HJGL/.vs/HJGL/config/applicationhost.config index 1963de0..b8c8efa 100644 --- a/HJGL/.vs/HJGL/config/applicationhost.config +++ b/HJGL/.vs/HJGL/config/applicationhost.config @@ -250,7 +250,7 @@ - + diff --git a/HJGL/.vs/HJGL/v17/.suo b/HJGL/.vs/HJGL/v17/.suo index 1594d9ac213381115e1906f4984e1731b3e78513..6d6b55e792c4adb36c1ff3aa87691ece3f9d6fbc 100644 GIT binary patch delta 1547 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 Date: Sat, 11 May 2024 15:10:55 +0800 Subject: [PATCH 3/4] 123 --- .../TestPackageManageAudit.aspx.cs | 281 +++++++++--------- 1 file changed, 145 insertions(+), 136 deletions(-) diff --git a/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs index e1894e6..f4de55b 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs @@ -3346,41 +3346,61 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage private void template22(XSSFWorkbook hssfworkbook, XSSFSheet ws) { #region 头部 - var style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 11, true, false, "宋体"); + var style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 10.5, true, false, "宋体"); int rowIndex = 0; ws = ExcelCreateRow(ws, hssfworkbook, rowIndex, rowIndex + 4, style, 0, 20, true); //设置列宽 - ws.SetColumnWidth(0, 11 * 256); - ws.SetColumnWidth(1, 5 * 256); - ws.SetColumnWidth(2, 8 * 256); + ws.SetColumnWidth(0, 13 * 256); + ws.SetColumnWidth(1, 6 * 256); + ws.SetColumnWidth(2, 10 * 256); ws.SetColumnWidth(3, 5 * 256); ws.SetColumnWidth(4, 5 * 256); - ws.SetColumnWidth(5, 6 * 256); - ws.SetColumnWidth(6, 6 * 256); - ws.SetColumnWidth(7, 6 * 256); - ws.SetColumnWidth(8, 6 * 256); - ws.SetColumnWidth(9, 6 * 256); - ws.SetColumnWidth(10, 6 * 256); - ws.SetColumnWidth(11, 6 * 256); - ws.SetColumnWidth(12, 21 * 256); - ws.SetColumnWidth(20, 21 * 256); + ws.SetColumnWidth(5, 7 * 256); + ws.SetColumnWidth(6, 7 * 256); + ws.SetColumnWidth(7, 7 * 256); + ws.SetColumnWidth(8, 7 * 256); + ws.SetColumnWidth(9, 7 * 256); + ws.SetColumnWidth(10, 7 * 256); + ws.SetColumnWidth(11, 7 * 256); + ws.SetColumnWidth(12, 7 * 256); + ws.SetColumnWidth(13, 7 * 256); + ws.SetColumnWidth(14, 7 * 256); + ws.SetColumnWidth(15, 7 * 256); + ws.SetColumnWidth(16, 7 * 256); + ws.SetColumnWidth(17, 5 * 256); + ws.SetColumnWidth(18, 7 * 256); + ws.SetColumnWidth(19, 7 * 256); + ws.SetColumnWidth(20, 25 * 256); - ws.AddMergedRegion(new CellRangeAddress(0, 3, 0, 2)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex, rowIndex + 3, 0, 2)); ws.GetRow(rowIndex).GetCell(0).SetCellValue("SH/T 3503-J412-1-2007"); - ws.AddMergedRegion(new CellRangeAddress(0, 0, 3, 17)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 3, 17)); ws.GetRow(rowIndex).GetCell(3).SetCellValue("管道焊接接头射线检测比例确认表(一)"); ws.GetRow(rowIndex).GetCell(3).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 16, true, true); - ws.AddMergedRegion(new CellRangeAddress(1, 2, 3, 17)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 2, 3, 17)); ws.GetRow(rowIndex + 1).GetCell(3).SetCellValue("Pipeline Welding Joints Radiographic Examination Rate Confirmation Form(I)"); - ws.GetRow(rowIndex + 1).GetCell(3).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 16, true, true); + ws.GetRow(rowIndex + 1).GetCell(3).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 14, true, true); - ws.AddMergedRegion(new CellRangeAddress(0, 3, 18, 20)); - ws.AddMergedRegion(new CellRangeAddress(3, 3, 3, 17)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 18, 20)); + ws.GetRow(rowIndex).GetCell(18).SetCellValue("工程名称:巴斯夫(广东)一体化项目专用化学品二区"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex+1, rowIndex+1, 18, 20)); + ws.GetRow(rowIndex+1).GetCell(18).SetCellValue("Project Name:BASF (Guangdong) Integrated Project"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 2, rowIndex + 2, 18, 20)); + ws.GetRow(rowIndex + 2).GetCell(18).SetCellValue("单元名称:Citral"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 3, 18, 20)); + ws.GetRow(rowIndex + 3).GetCell(18).SetCellValue("Unit Name:Citral"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 3, 3, 17)); + + ws.GetRow(rowIndex).GetCell(18).CellStyle = ws.GetRow(rowIndex + 1).GetCell(18).CellStyle = ws.GetRow(rowIndex + 2).GetCell(18).CellStyle = ws.GetRow(rowIndex + 3).GetCell(18).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 10.5, true, false); + RegionUtil.SetBorderBottom(0, new CellRangeAddress(rowIndex , rowIndex, 18, 20), ws); + RegionUtil.SetBorderTop(0, new CellRangeAddress(rowIndex + 1, rowIndex + 1, 18, 20), ws); + RegionUtil.SetBorderBottom(0, new CellRangeAddress(rowIndex + 1, rowIndex + 1, 18, 20), ws); + RegionUtil.SetBorderTop(0, new CellRangeAddress(rowIndex + 2, rowIndex + 2, 18, 20), ws); + RegionUtil.SetBorderBottom(0, new CellRangeAddress(rowIndex + 2, rowIndex + 2, 18, 20), ws); + RegionUtil.SetBorderTop(0, new CellRangeAddress(rowIndex + 3, rowIndex + 3, 18, 20), ws); - ws.GetRow(rowIndex).GetCell(18).SetCellValue("工程名称:巴斯夫(广东)一体化项目专用化学品二区\nProject Name:BASF (Guangdong) Integrated Project\n单元名称:Citral\nUnit Name:Citral"); - ws.GetRow(rowIndex).GetCell(18).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Top, NPOI.SS.UserModel.HorizontalAlignment.Left, 11, true, false); ws.GetRow(rowIndex + 3).GetCell(3).SetCellValue("共 1 页 第 1 页"); @@ -3397,13 +3417,19 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage ws.GetRow(rowIndex + 4).GetCell(16).SetCellValue("检测比例\r\nExam. Rate"); ws.GetRow(rowIndex + 4).GetCell(18).SetCellValue("5%"); + ws.GetRow(rowIndex).Height = 27 * 20; + ws.GetRow(rowIndex + 1).Height = 27 * 20; + ws.GetRow(rowIndex + 2).Height = 15 * 20; + ws.GetRow(rowIndex + 3).Height = 20 * 20; + ws.GetRow(rowIndex + 4).Height = 40 * 20; + #endregion #region 表格部分 ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 5, rowIndex + 6, style, 0, 20, true); - ws.GetRow(rowIndex + 5).Height = 28 * 20; - ws.GetRow(rowIndex + 6).Height = 42 * 20; + ws.GetRow(rowIndex + 5).Height = 29 * 20; + ws.GetRow(rowIndex + 6).Height = 43 * 20; //设置表头部分 ws.AddMergedRegion(new CellRangeAddress(rowIndex + 5, rowIndex + 6, 0, 1)); @@ -3412,7 +3438,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage ws.GetRow(rowIndex + 5).GetCell(2).SetCellValue("材质\r\nMaterial"); ws.AddMergedRegion(new CellRangeAddress(rowIndex + 5, rowIndex + 5, 3, 4)); - ws.GetRow(rowIndex + 5).GetCell(3).SetCellValue("规 格/Size"); + ws.GetRow(rowIndex + 5).GetCell(3).SetCellValue("规 格/Size"); ws.AddMergedRegion(new CellRangeAddress(rowIndex + 6, rowIndex + 6, 3, 4)); ws.GetRow(rowIndex + 6).GetCell(3).SetCellValue("mm"); @@ -3452,21 +3478,24 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage ws.GetRow(rowIndex + 6).GetCell(17).SetCellValue("Actual exam. Rate"); ws.GetRow(rowIndex + 6).GetCell(20).SetCellValue("Examination Report No."); + RegionUtil.SetBorderBottom(0, new CellRangeAddress(rowIndex+5, rowIndex+5, 17, 20), ws); + RegionUtil.SetBorderTop(0, new CellRangeAddress(rowIndex + 6, rowIndex + 6, 17, 20), ws); - //这里创建行数据 - ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 7, rowIndex + 17, style, 0, 20, true); - for (int i = 7; i < 17; i++) + //这里创建行数据 17-16 + ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 7, rowIndex + 16, style, 0, 20, true); + for (int i = 7; i < 16; i++) { - ws.GetRow(rowIndex + i).Height = 25 * 20; - if (i == 7) { - ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 13, 0, 1)); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 13, 2, 2)); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 13, 3, 4)); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 13, 5, 6)); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 13, 7, 8)); + ws.GetRow(rowIndex + i).Height = 28 * 20; + if (i == 7) + { + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 10, 0, 1)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 10, 2, 2)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 10, 3, 4)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 10, 5, 6)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 10, 7, 8)); } - - if (i > 13) { + if (i > 10) + { ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 0, 1)); ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 3, 4)); ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 5, 6)); @@ -3479,143 +3508,123 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 17, 19)); } - - ws.GetRow(rowIndex + 16).Height = 42 * 20; //这里循环数据 - ws.GetRow(rowIndex + 16).GetCell(0).SetCellValue("小计\r\nTotal"); - ws.GetRow(rowIndex + 16).GetCell(5).SetCellValue("42"); - ws.GetRow(rowIndex + 16).GetCell(7).SetCellValue("19"); - ws.GetRow(rowIndex + 16).GetCell(11).SetCellValue("42"); - ws.GetRow(rowIndex + 16).GetCell(13).SetCellValue("14"); - ws.GetRow(rowIndex + 16).GetCell(15).SetCellValue("6"); - ws.GetRow(rowIndex + 16).GetCell(17).SetCellValue("33.33%"); - + ws.GetRow(rowIndex + 15).GetCell(0).SetCellValue("小计\r\nTotal"); //模拟数据 - ws.GetRow(rowIndex + 7).GetCell(0).SetCellValue("130-9064.024"); + ws.GetRow(rowIndex + 7).GetCell(0).SetCellValue("1701-130-9062.058-0000"); ws.GetRow(rowIndex + 7).GetCell(2).SetCellValue("A53-B"); - ws.GetRow(rowIndex + 7).GetCell(3).SetCellValue("Φ168.28*7.11/Φ114.3*6.02"); - ws.GetRow(rowIndex + 7).GetCell(5).SetCellValue("42"); - ws.GetRow(rowIndex + 7).GetCell(7).SetCellValue("19"); - ws.GetRow(rowIndex + 7).GetCell(9).SetCellValue("W7006"); - ws.GetRow(rowIndex + 8).GetCell(9).SetCellValue("W7007"); - ws.GetRow(rowIndex + 9).GetCell(9).SetCellValue("W7010"); - ws.GetRow(rowIndex + 10).GetCell(9).SetCellValue("W7012"); - ws.GetRow(rowIndex + 11).GetCell(9).SetCellValue("W7014"); - ws.GetRow(rowIndex + 12).GetCell(9).SetCellValue("W7017"); - ws.GetRow(rowIndex + 13).GetCell(9).SetCellValue("W7018"); - ws.GetRow(rowIndex + 14).GetCell(0).SetCellValue("以下空白"); + ws.GetRow(rowIndex + 7).GetCell(3).SetCellValue("114"); + ws.GetRow(rowIndex + 7).GetCell(5).SetCellValue("18"); + ws.GetRow(rowIndex + 7).GetCell(7).SetCellValue("1"); + ws.GetRow(rowIndex + 7).GetCell(9).SetCellValue("W7004"); + ws.GetRow(rowIndex + 8).GetCell(9).SetCellValue("W7010"); + ws.GetRow(rowIndex + 9).GetCell(9).SetCellValue("W7011"); + ws.GetRow(rowIndex + 10).GetCell(9).SetCellValue("W7013"); - ws.GetRow(rowIndex + 7).GetCell(11).SetCellValue("5"); - ws.GetRow(rowIndex + 8).GetCell(11).SetCellValue("2"); - ws.GetRow(rowIndex + 9).GetCell(11).SetCellValue("19"); - ws.GetRow(rowIndex + 10).GetCell(11).SetCellValue("5"); - ws.GetRow(rowIndex + 11).GetCell(11).SetCellValue("2"); - ws.GetRow(rowIndex + 12).GetCell(11).SetCellValue("2"); - ws.GetRow(rowIndex + 13).GetCell(11).SetCellValue("7"); + ws.GetRow(rowIndex + 7).GetCell(11).SetCellValue("6"); + ws.GetRow(rowIndex + 8).GetCell(11).SetCellValue("3"); + ws.GetRow(rowIndex + 9).GetCell(11).SetCellValue("6"); + ws.GetRow(rowIndex + 10).GetCell(11).SetCellValue("1"); ws.GetRow(rowIndex + 7).GetCell(13).SetCellValue("1"); - ws.GetRow(rowIndex + 8).GetCell(13).SetCellValue("1"); + ws.GetRow(rowIndex + 8).GetCell(13).SetCellValue("3"); ws.GetRow(rowIndex + 9).GetCell(13).SetCellValue("6"); - ws.GetRow(rowIndex + 10).GetCell(13).SetCellValue("3"); - ws.GetRow(rowIndex + 11).GetCell(13).SetCellValue("1"); - ws.GetRow(rowIndex + 12).GetCell(13).SetCellValue("1"); - ws.GetRow(rowIndex + 13).GetCell(13).SetCellValue("1"); + ws.GetRow(rowIndex + 10).GetCell(13).SetCellValue("1"); ws.GetRow(rowIndex + 7).GetCell(15).SetCellValue("0"); ws.GetRow(rowIndex + 8).GetCell(15).SetCellValue("0"); - ws.GetRow(rowIndex + 9).GetCell(15).SetCellValue("5"); - ws.GetRow(rowIndex + 10).GetCell(15).SetCellValue("0"); - ws.GetRow(rowIndex + 11).GetCell(15).SetCellValue("1"); - ws.GetRow(rowIndex + 12).GetCell(15).SetCellValue("0"); - ws.GetRow(rowIndex + 13).GetCell(15).SetCellValue("0"); + ws.GetRow(rowIndex + 9).GetCell(15).SetCellValue("0"); + ws.GetRow(rowIndex + 10).GetCell(15).SetCellValue("1"); - ws.GetRow(rowIndex + 7).GetCell(17).SetCellValue("20.00%"); - ws.GetRow(rowIndex + 8).GetCell(17).SetCellValue("50.00%"); - ws.GetRow(rowIndex + 9).GetCell(17).SetCellValue("31.58%"); - ws.GetRow(rowIndex + 10).GetCell(17).SetCellValue("60.00%"); - ws.GetRow(rowIndex + 11).GetCell(17).SetCellValue("50.00%"); - ws.GetRow(rowIndex + 12).GetCell(17).SetCellValue("50.00%"); - ws.GetRow(rowIndex + 13).GetCell(17).SetCellValue("14.29%"); + ws.GetRow(rowIndex + 7).GetCell(17).SetCellValue("16.87%"); + ws.GetRow(rowIndex + 8).GetCell(17).SetCellValue("100.00%"); + ws.GetRow(rowIndex + 9).GetCell(17).SetCellValue("100.00%"); + ws.GetRow(rowIndex + 10).GetCell(17).SetCellValue("50.00%"); - ws.GetRow(rowIndex + 7).GetCell(20).SetCellValue("RT-028"); - ws.GetRow(rowIndex + 8).GetCell(20).SetCellValue("RT-028"); - ws.GetRow(rowIndex + 9).GetCell(20).SetCellValue("RT-171/RT-184/RT-235"); - ws.GetRow(rowIndex + 10).GetCell(20).SetCellValue("RT-027"); - ws.GetRow(rowIndex + 11).GetCell(20).SetCellValue("RT-182"); - ws.GetRow(rowIndex + 12).GetCell(20).SetCellValue("RT-99"); - ws.GetRow(rowIndex + 13).GetCell(20).SetCellValue("RT-95"); + ws.GetRow(rowIndex + 7).GetCell(20).SetCellValue("RT-0010"); + ws.GetRow(rowIndex + 8).GetCell(20).SetCellValue("RT-009\r\nRT-0010"); + ws.GetRow(rowIndex + 9).GetCell(20).SetCellValue("RT-0010"); + ws.GetRow(rowIndex + 10).GetCell(20).SetCellValue("RT-037"); #endregion #region 尾部 - ws.GetRow(rowIndex + 17).GetCell(0).SetCellValue("备注\r\nRemark"); - ws.GetRow(rowIndex + 17).GetCell(1).SetCellValue("焊口位置与检测焊口见管道单线图与无损检测报告。\r\nPlease refer to Pipeline Iso-drawing and NDE Report for joints position and examined joints."); - ws.GetRow(rowIndex + 17).GetCell(1).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 10, true, false); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 17, rowIndex + 17, 1, 20)); + ws.GetRow(rowIndex + 16).GetCell(0).SetCellValue("备注\r\nRemark"); + ws.GetRow(rowIndex + 16).GetCell(1).SetCellValue("焊口位置与检测焊口见管道单线图与无损检测报告。\r\nPlease refer to Pipeline Iso-drawing and NDE Report for joints position and examined joints."); + ws.GetRow(rowIndex + 16).GetCell(1).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 10.5, true, false); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 16, rowIndex + 16, 1, 20)); + ws.GetRow(rowIndex + 16).Height = 29 * 20; - style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 11, true, false); - var style1 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 11, true, false); + style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 10.5, true, false); + var style1 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 10.5, true, false); + var style2 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Bottom, NPOI.SS.UserModel.HorizontalAlignment.Left, 10.5, true, false); - ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 18, rowIndex + 26, style, 0, 20, true); + ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 17, rowIndex + 23, style, 0, 20, true); + + ws.GetRow(rowIndex + 17).GetCell(20).CellStyle = style1; + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 17, rowIndex + 17, 0, 3)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 17, rowIndex + 17, 4, 9)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 17, rowIndex + 17, 10, 16)); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 17, rowIndex + 17, 17, 20)); + + ws.GetRow(rowIndex + 17).GetCell(0).SetCellValue("建设/监理单位\r\nOwner/Supervision Contractor"); + ws.GetRow(rowIndex + 17).GetCell(4).SetCellValue("总承包单位\r\nGeneral Contractor"); + ws.GetRow(rowIndex + 17).GetCell(10).SetCellValue("检 测 单 位\r\nExamination Contractor"); + ws.GetRow(rowIndex + 17).GetCell(17).SetCellValue("施 工 单 位\r\nConstruction Company"); + ws.GetRow(rowIndex + 17).GetCell(0).CellStyle = ws.GetRow(rowIndex + 17).GetCell(4).CellStyle = ws.GetRow(rowIndex + 17).GetCell(10).CellStyle = ws.GetRow(rowIndex + 17).GetCell(17).CellStyle = style1; + ws.GetRow(rowIndex + 17).Height = 33 * 20; - ws.GetRow(rowIndex + 18).GetCell(20).CellStyle = style1; ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 0, 3)); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 4, 9)); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 10, 16)); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 17, 20)); - - ws.GetRow(rowIndex + 18).GetCell(0).SetCellValue("建设/监理单位\r\nOwner/Supervision Contractor"); - ws.GetRow(rowIndex + 18).GetCell(4).SetCellValue("总承包单位\r\nGeneral Contractor"); - ws.GetRow(rowIndex + 18).GetCell(10).SetCellValue("检 测 单 位\r\nExamination Contractor"); - ws.GetRow(rowIndex + 18).GetCell(17).SetCellValue("施 工 单 位\r\nConstruction Company"); - ws.GetRow(rowIndex + 18).GetCell(0).CellStyle = ws.GetRow(rowIndex + 18).GetCell(4).CellStyle = ws.GetRow(rowIndex + 18).GetCell(10).CellStyle = ws.GetRow(rowIndex + 18).GetCell(17).CellStyle = style1; + ws.GetRow(rowIndex + 18).GetCell(0).SetCellValue("专业工程师\r\nDiscipline Engineer:"); ws.GetRow(rowIndex + 18).Height = 31 * 20; - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 19, rowIndex + 19, 0, 3)); - ws.GetRow(rowIndex + 19).GetCell(0).SetCellValue("专业工程师\r\nDiscipline Engineer:"); - ws.GetRow(rowIndex + 19).Height = 31 * 20; + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 4, 9)); + ws.GetRow(rowIndex + 18).GetCell(4).SetCellValue("专业工程师\r\nDiscipline Engineer:"); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 19, rowIndex + 19, 4, 9)); - ws.GetRow(rowIndex + 19).GetCell(4).SetCellValue("专业工程师\r\nDiscipline Engineer:"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 10, 16)); + ws.GetRow(rowIndex + 18).GetCell(10).SetCellValue("专业工程师\r\nDiscipline Engineer:"); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 19, rowIndex + 19, 10, 16)); - ws.GetRow(rowIndex + 19).GetCell(10).SetCellValue("专业工程师\r\nDiscipline Engineer:"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 17, 20)); + ws.GetRow(rowIndex + 18).GetCell(17).SetCellValue("专业工程师\r\nDiscipline Engineer:"); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 19, rowIndex + 19, 17, 20)); - ws.GetRow(rowIndex + 19).GetCell(17).SetCellValue("专业工程师\r\nDiscipline Engineer:"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 20, rowIndex + 20, 17, 20)); + ws.GetRow(rowIndex + 20).GetCell(17).SetCellValue("质量检查员:\r\nQuality Inspector:"); + ws.GetRow(rowIndex + 20).Height = 31 * 20; - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 21, rowIndex + 21, 17, 20)); - ws.GetRow(rowIndex + 21).GetCell(17).SetCellValue("质量检查员:\r\nQuality Inspector:"); - - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 24, rowIndex + 24, 17, 20)); - ws.GetRow(rowIndex + 24).GetCell(17).SetCellValue("制表:\r\nPrepared:"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 22, rowIndex + 22, 17, 20)); + ws.GetRow(rowIndex + 22).GetCell(17).SetCellValue("制表:\r\nPrepared:"); + ws.GetRow(rowIndex + 22).Height = 31 * 20; - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 25, rowIndex + 25, 0, 3)); - ws.GetRow(rowIndex + 25).GetCell(0).SetCellValue("日期Date: 年 月 日"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 23, rowIndex + 23, 0, 3)); + ws.GetRow(rowIndex + 23).GetCell(0).SetCellValue("日期Date: 年 月 日"); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 25, rowIndex + 25, 4, 9)); - ws.GetRow(rowIndex + 25).GetCell(4).SetCellValue("日期Date: 年 月 日"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 23, rowIndex + 23, 4, 9)); + ws.GetRow(rowIndex + 23).GetCell(4).SetCellValue("日期Date: 年 月 日"); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 25, rowIndex + 25, 10, 16)); - ws.GetRow(rowIndex + 25).GetCell(10).SetCellValue("日期Date: 年 月 日"); + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 23, rowIndex + 23, 10, 16)); + ws.GetRow(rowIndex + 23).GetCell(10).SetCellValue("日期Date: 年 月 日"); - ws.AddMergedRegion(new CellRangeAddress(rowIndex + 25, rowIndex + 25, 17, 20)); - ws.GetRow(rowIndex + 25).GetCell(17).SetCellValue("日期Date: 年 月 日"); - ws.GetRow(rowIndex + 20).Height = ws.GetRow(rowIndex + 22).Height = ws.GetRow(rowIndex + 23).Height = 2 * 20; + ws.AddMergedRegion(new CellRangeAddress(rowIndex + 23, rowIndex + 23, 17, 20)); + ws.GetRow(rowIndex + 23).GetCell(17).SetCellValue("日期Date: 年 月 日"); + ws.GetRow(rowIndex + 23).Height = 29 * 20; + + ws.GetRow(rowIndex + 23).GetCell(0).CellStyle = ws.GetRow(rowIndex + 23).GetCell(4).CellStyle = ws.GetRow(rowIndex + 23).GetCell(10).CellStyle = ws.GetRow(rowIndex + 23).GetCell(17).CellStyle = style2; + + ws.GetRow(rowIndex + 19).Height = ws.GetRow(rowIndex + 21).Height = 14 * 20; - RegionUtil.SetBorderTop(1, new CellRangeAddress(rowIndex + 19, rowIndex + 19, 0, 20), ws); - RegionUtil.SetBorderLeft(1, new CellRangeAddress(rowIndex + 19, rowIndex + 25, 0, 0), ws); - RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 19, rowIndex + 25, 20, 20), ws); - RegionUtil.SetBorderBottom(1, new CellRangeAddress(rowIndex + 19, rowIndex + 25, 0, 20), ws); + RegionUtil.SetBorderTop(1, new CellRangeAddress(rowIndex + 18, rowIndex + 18, 0, 20), ws); + RegionUtil.SetBorderLeft(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 0, 0), ws); + RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 20, 20), ws); + RegionUtil.SetBorderBottom(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 0, 20), ws); - RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 19, rowIndex + 25, 3, 3), ws); - RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 19, rowIndex + 25, 9, 9), ws); - RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 19, rowIndex + 25, 16, 16), ws); + RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 3, 3), ws); + RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 9, 9), ws); + RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 16, 16), ws); #endregion From 5bcbd8a2f0c951b6a279088aa3a31fc5046a2c4f Mon Sep 17 00:00:00 2001 From: liyh Date: Sat, 11 May 2024 15:25:15 +0800 Subject: [PATCH 4/4] iiui --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0623f6c..e82d945 100644 --- a/.gitignore +++ b/.gitignore @@ -5731,3 +5731,4 @@ HJGLPackFile/版本日志/HJGLDB_2024.05.02.sql /HJGL/FineUIPro.Web/File/Excel /HJGLPackFile/PackFile /HJGL/.vs/HJGL/v17/.suo +/CreateModel2017.bat