This commit is contained in:
jackchenyang 2024-05-29 18:21:13 +08:00
parent 5871297f1f
commit 90c26818f4
3 changed files with 923 additions and 671 deletions

Binary file not shown.

View File

@ -1139,55 +1139,58 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
//获取当前页数据 //获取当前页数据
var pageTb = GetPageToTable(tb, dStart, dEnd); var pageTb = GetPageToTable(tb, dStart, dEnd);
for (int j = 0; j < pageTb.Rows.Count; j++) int j = 0;
foreach (DataRow dr in pageTb.Rows)
{ {
int dataIndex = dataTit + j; int dataIndex = dataTit + j;
//管道编号/单线号 //管道编号/单线号
ws.GetRow(dataIndex).GetCell(0).SetCellValue(titleModel.PipelineCode); ws.GetRow(dataIndex).GetCell(0).SetCellValue(titleModel.PipelineCode);
//焊口编号 //焊口编号
ws.GetRow(dataIndex).GetCell(1).SetCellValue(tb.Rows[i]["WeldJointCode"].ToString()); ws.GetRow(dataIndex).GetCell(1).SetCellValue(dr["WeldJointCode"].ToString());
//焊接形式 //焊接形式
ws.GetRow(dataIndex).GetCell(3).SetCellValue(tb.Rows[i]["WeldTypeCode"].ToString()); ws.GetRow(dataIndex).GetCell(3).SetCellValue(dr["WeldTypeCode"].ToString());
//焊工代号 //焊工代号
List<string> welderStr = new List<string>(); List<string> welderStr = new List<string>();
if (!string.IsNullOrWhiteSpace(tb.Rows[i]["BackingWelderCode"].ToString())) if (!string.IsNullOrWhiteSpace(dr["BackingWelderCode"].ToString()))
{ {
welderStr.Add(tb.Rows[i]["BackingWelderCode"].ToString()); welderStr.Add(dr["BackingWelderCode"].ToString());
} }
if (!string.IsNullOrWhiteSpace(tb.Rows[i]["CoverWelderCode"].ToString())) if (!string.IsNullOrWhiteSpace(dr["CoverWelderCode"].ToString()))
{ {
welderStr.Add(tb.Rows[i]["CoverWelderCode"].ToString()); welderStr.Add(dr["CoverWelderCode"].ToString());
} }
if (welderStr.Count > 0) welderStr = welderStr.GroupBy(x => x).Select(x => x.Key).ToList(); if (welderStr.Count > 0) welderStr = welderStr.GroupBy(x => x).Select(x => x.Key).ToList();
ws.GetRow(dataIndex).GetCell(4).SetCellValue(string.Join("/", welderStr)); ws.GetRow(dataIndex).GetCell(4).SetCellValue(string.Join("/", welderStr));
//规格mm //规格mm
ws.GetRow(dataIndex).GetCell(5).SetCellValue(tb.Rows[i]["Specification"].ToString()); ws.GetRow(dataIndex).GetCell(5).SetCellValue(dr["Specification"].ToString());
//材质 //材质
ws.GetRow(dataIndex).GetCell(6).SetCellValue(tb.Rows[i]["Material1Code"].ToString()); ws.GetRow(dataIndex).GetCell(6).SetCellValue(dr["Material1Code"].ToString());
//焊接位置 //焊接位置
ws.GetRow(dataIndex).GetCell(7).SetCellValue(tb.Rows[i]["WeldingLocationCode"].ToString()); ws.GetRow(dataIndex).GetCell(7).SetCellValue(dr["WeldingLocationCode"].ToString());
//焊接方法 //焊接方法
ws.GetRow(dataIndex).GetCell(8).SetCellValue(tb.Rows[i]["WeldingMethodCode"].ToString()); ws.GetRow(dataIndex).GetCell(8).SetCellValue(dr["WeldingMethodCode"].ToString());
//焊材牌号 //焊材牌号
List<string> silkMats = new List<string>(); List<string> silkMats = new List<string>();
if (!string.IsNullOrWhiteSpace(tb.Rows[i]["WeldSilkCode"].ToString())) if (!string.IsNullOrWhiteSpace(dr["WeldSilkCode"].ToString()))
{ {
silkMats.Add(tb.Rows[i]["WeldSilkCode"].ToString()); silkMats.Add(dr["WeldSilkCode"].ToString());
} }
if (!string.IsNullOrWhiteSpace(tb.Rows[i]["WeldMatCode"].ToString())) if (!string.IsNullOrWhiteSpace(dr["WeldMatCode"].ToString()))
{ {
silkMats.Add(tb.Rows[i]["WeldMatCode"].ToString()); silkMats.Add(dr["WeldMatCode"].ToString());
} }
if (silkMats.Count > 0) silkMats = silkMats.GroupBy(x => x).Select(x => x.Key).ToList(); if (silkMats.Count > 0) silkMats = silkMats.GroupBy(x => x).Select(x => x.Key).ToList();
ws.GetRow(dataIndex).GetCell(10).SetCellValue(string.Join("/", silkMats)); ws.GetRow(dataIndex).GetCell(10).SetCellValue(string.Join("/", silkMats));
//实际预热温度 //实际预热温度
ws.GetRow(dataIndex).GetCell(12).SetCellValue(tb.Rows[i]["PrepareTemp"].ToString()); ws.GetRow(dataIndex).GetCell(12).SetCellValue(dr["PrepareTemp"].ToString());
//焊接日期 //焊接日期
ws.GetRow(dataIndex).GetCell(13).SetCellValue(tb.Rows[i]["WeldingDate"].ToString()); ws.GetRow(dataIndex).GetCell(13).SetCellValue(dr["WeldingDate"].ToString());
//无损检查报告 //无损检查报告
ws.GetRow(dataIndex).GetCell(14).SetCellValue(tb.Rows[i]["NDEReportNo"].ToString()); ws.GetRow(dataIndex).GetCell(14).SetCellValue(dr["NDEReportNo"].ToString());
j++;
} }
rowIndex += tIndex; rowIndex += tIndex;
#endregion #endregion