diff --git a/HJGL/.vs/HJGL/config/applicationhost.config b/HJGL/.vs/HJGL/config/applicationhost.config index 1963de0..e47cfd0 100644 --- a/HJGL/.vs/HJGL/config/applicationhost.config +++ b/HJGL/.vs/HJGL/config/applicationhost.config @@ -162,7 +162,7 @@ - + @@ -250,7 +250,7 @@ - + diff --git a/HJGL/.vs/HJGL/v17/.suo b/HJGL/.vs/HJGL/v17/.suo index 774a2e0..c49afb2 100644 Binary files a/HJGL/.vs/HJGL/v17/.suo and b/HJGL/.vs/HJGL/v17/.suo differ diff --git a/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs index 353ca19..3536e54 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/TestPackageManage/TestPackageManageAudit.aspx.cs @@ -4292,25 +4292,32 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage ws.GetRow(dataIndex).GetCell(2).SetCellValue(dr["MaterialCode"].ToString()); - var MaterialCodeNum = pagelist.Count(x => x.MaterialCode == dr["MaterialCode"].ToString()); + var MaterialCodeNum = pagelist.Count(x => x.PipelineCode == dr["PipelineCode"].ToString() && x.MaterialCode == dr["MaterialCode"].ToString()); if (MaterialCodeNum > 1) { if (twoNum == 1) { twoNum += MaterialCodeNum; - ws.AddMergedRegion(new CellRangeAddress(dataIndex, dataIndex + MaterialCodeNum - 1, 2, 2)); + ws.AddMergedRegion(new CellRangeAddress(dataIndex, dataIndex + PipelineCodeNum - 1, 2, 2)); } twoNum -= 1; } - + int SpecificationNum = 0; ws.GetRow(dataIndex).GetCell(3).SetCellValue(dr["Specification"].ToString()); - var SpecificationNum = pagelist.Count(x => x.Specification == dr["Specification"].ToString()); + if (string.IsNullOrEmpty(dr["Specification"].ToString())) + { + SpecificationNum = pagelist.Count(x => x.PipelineCode == dr["PipelineCode"].ToString()); + } + else + { + SpecificationNum = pagelist.Count(x => x.PipelineCode == dr["PipelineCode"].ToString() && x.Specification == dr["Specification"].ToString()); + } if (SpecificationNum > 1) { if (threeNum == 1) { threeNum += SpecificationNum; - ws.AddMergedRegion(new CellRangeAddress(dataIndex, dataIndex + SpecificationNum - 1, 3, 4)); + ws.AddMergedRegion(new CellRangeAddress(dataIndex, dataIndex + PipelineCodeNum - 1, 3, 4)); } threeNum -= 1; } @@ -4320,13 +4327,13 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage } ws.GetRow(dataIndex).GetCell(5).SetCellValue(dr["jointCount"].ToString()); - var jointCountNum = pagelist.Count(x => x.jointCount == dr["jointCount"].ToString()); + var jointCountNum = pagelist.Count(x => x.PipelineCode == dr["PipelineCode"].ToString() && x.jointCount == dr["jointCount"].ToString()); if (jointCountNum > 1) { if (fourNum == 1) { fourNum += jointCountNum; - ws.AddMergedRegion(new CellRangeAddress(dataIndex, dataIndex + jointCountNum - 1, 5, 6)); + ws.AddMergedRegion(new CellRangeAddress(dataIndex, dataIndex + PipelineCodeNum - 1, 5, 6)); } fourNum -= 1; } @@ -4336,13 +4343,13 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage } ws.GetRow(dataIndex).GetCell(7).SetCellValue(dr["FjointCount"].ToString()); - var FjointCountNum = pagelist.Count(x => x.FjointCount == dr["FjointCount"].ToString()); + var FjointCountNum = pagelist.Count(x => x.PipelineCode == dr["PipelineCode"].ToString() && x.FjointCount == dr["FjointCount"].ToString()); if (FjointCountNum > 1) { if (fiveNum == 1) { fiveNum += FjointCountNum; - ws.AddMergedRegion(new CellRangeAddress(dataIndex, dataIndex + FjointCountNum - 1, 7, 8)); + ws.AddMergedRegion(new CellRangeAddress(dataIndex, dataIndex + PipelineCodeNum - 1, 7, 8)); } fiveNum -= 1; } @@ -4381,7 +4388,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage } ws.GetRow(rowIndex + 15).GetCell(0).SetCellValue("小计\r\nTotal"); - ws.GetRow(rowIndex + 15).Height = 30 * 20; + ws.GetRow(rowIndex + 15).Height = 25 * 20; #endregion @@ -4391,7 +4398,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage 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 = 28 * 20; + ws.GetRow(rowIndex + 16).Height = 25 * 20; style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 10.5, true, false); @@ -4449,9 +4456,16 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage 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; - - + ws.GetRow(rowIndex + 19).Height = 14 * 20; + ws.GetRow(rowIndex + 20).Height = 14 * 20; + ws.GetRow(rowIndex + 21).Height = 14 * 20; + ws.GetRow(rowIndex + 22).Height = 25 * 20; + RegionUtil.SetBorderLeft(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 0, 0), ws); + RegionUtil.SetBorderBottom(1, new CellRangeAddress(rowIndex + 17, rowIndex + 17, 0, 20), ws); + RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 18, rowIndex + 22, 3, 3), ws); + RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 18, rowIndex + 22, 9, 9), ws); + RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 18, rowIndex + 22, 16, 16), ws); + RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 18, rowIndex + 22, 20, 20), ws); RegionUtil.SetBorderTop(1, new CellRangeAddress(rowIndex + 23, rowIndex + 23, 0, 20), ws); RegionUtil.SetBorderLeft(1, new CellRangeAddress(rowIndex + 23, rowIndex + 23, 0, 0), ws); RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 23, rowIndex + 23, 20, 20), ws);