提交代码
This commit is contained in:
@@ -170,6 +170,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
GridTestRun.DataBind();
|
||||
JObject summary = new JObject();
|
||||
summary.Add("WorkPackNum", result.Sum(x => x.WorkPackNum));
|
||||
summary.Add("WorkPackNotStartedNum", result.Sum(x => x.WorkPackNotStartedNum));
|
||||
summary.Add("WorkPackNoCloseNum", result.Sum(x => x.WorkPackNoCloseNum));
|
||||
summary.Add("WorkPackCloseNum", result.Sum(x => x.WorkPackCloseNum));
|
||||
summary.Add("InspectNum", result.Sum(x => x.InspectNum));
|
||||
@@ -211,6 +212,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
ws.SetColumnWidth(7, (20 * 256));
|
||||
ws.SetColumnWidth(8, (20 * 256));
|
||||
ws.SetColumnWidth(9, (20 * 256));
|
||||
ws.SetColumnWidth(10, (20 * 256));
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -224,7 +226,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
#region 头部
|
||||
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, 0, 0, 0, 9);
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, 0, 0, 0, 10);
|
||||
//行1
|
||||
ws.GetRow(0).GetCell(0).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(0).SetCellValue("工作包名称");
|
||||
@@ -237,15 +239,17 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
ws.GetRow(0).GetCell(4).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(4).SetCellValue("工作包数量");
|
||||
ws.GetRow(0).GetCell(5).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(5).SetCellValue("工作包未关闭数量");
|
||||
ws.GetRow(0).GetCell(5).SetCellValue("工作包未开始数量");
|
||||
ws.GetRow(0).GetCell(6).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(6).SetCellValue("工作包已关闭数量");
|
||||
ws.GetRow(0).GetCell(6).SetCellValue("工作包未关闭数量");
|
||||
ws.GetRow(0).GetCell(7).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(7).SetCellValue("检查表数量");
|
||||
ws.GetRow(0).GetCell(7).SetCellValue("工作包已关闭数量");
|
||||
ws.GetRow(0).GetCell(8).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(8).SetCellValue("检查表未关闭数量");
|
||||
ws.GetRow(0).GetCell(8).SetCellValue("检查表数量");
|
||||
ws.GetRow(0).GetCell(9).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(9).SetCellValue("检查表已关闭数量");
|
||||
ws.GetRow(0).GetCell(9).SetCellValue("检查表未关闭数量");
|
||||
ws.GetRow(0).GetCell(10).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(10).SetCellValue("检查表已关闭数量");
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -253,7 +257,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
var start = 1;
|
||||
var end = result.Count;
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, start, end, 0, 9);
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, start, end, 0, 10);
|
||||
|
||||
//数据
|
||||
var dataIndex = 1;
|
||||
@@ -264,11 +268,12 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
ws.GetRow(dataIndex).GetCell(2).SetCellValue(item.ProcessesName);
|
||||
ws.GetRow(dataIndex).GetCell(3).SetCellValue(item.SystemName);
|
||||
ws.GetRow(dataIndex).GetCell(4).SetCellValue(item.WorkPackNum);
|
||||
ws.GetRow(dataIndex).GetCell(5).SetCellValue(item.WorkPackNoCloseNum);
|
||||
ws.GetRow(dataIndex).GetCell(6).SetCellValue(item.WorkPackCloseNum);
|
||||
ws.GetRow(dataIndex).GetCell(7).SetCellValue(item.InspectNum);
|
||||
ws.GetRow(dataIndex).GetCell(8).SetCellValue(item.InspectNoCloseNum);
|
||||
ws.GetRow(dataIndex).GetCell(9).SetCellValue(item.InspectCloseNum);
|
||||
ws.GetRow(dataIndex).GetCell(5).SetCellValue(item.WorkPackNotStartedNum);
|
||||
ws.GetRow(dataIndex).GetCell(6).SetCellValue(item.WorkPackNoCloseNum);
|
||||
ws.GetRow(dataIndex).GetCell(7).SetCellValue(item.WorkPackCloseNum);
|
||||
ws.GetRow(dataIndex).GetCell(8).SetCellValue(item.InspectNum);
|
||||
ws.GetRow(dataIndex).GetCell(9).SetCellValue(item.InspectNoCloseNum);
|
||||
ws.GetRow(dataIndex).GetCell(10).SetCellValue(item.InspectCloseNum);
|
||||
dataIndex++;
|
||||
}
|
||||
|
||||
@@ -276,16 +281,17 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
#region 尾部
|
||||
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, end + 1, end + 1, 0, 9);
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, end + 1, end + 1, 0, 10);
|
||||
var region = new CellRangeAddress(end + 1, end + 1, 0, 3);
|
||||
ws.AddMergedRegion(region);
|
||||
ws.GetRow(end + 1).GetCell(0).SetCellValue("合计");
|
||||
ws.GetRow(end + 1).GetCell(4).SetCellValue(result.Count > 0 ? result.Sum(x => x.WorkPackNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(5).SetCellValue(result.Count > 0 ? result.Sum(x => x.WorkPackNoCloseNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(6).SetCellValue(result.Count > 0 ? result.Sum(x => x.WorkPackCloseNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(7).SetCellValue(result.Count > 0 ? result.Sum(x => x.InspectNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(8).SetCellValue(result.Count > 0 ? result.Sum(x => x.InspectNoCloseNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(9).SetCellValue(result.Count > 0 ? result.Sum(x => x.InspectCloseNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(5).SetCellValue(result.Count > 0 ? result.Sum(x => x.WorkPackNotStartedNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(6).SetCellValue(result.Count > 0 ? result.Sum(x => x.WorkPackNoCloseNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(7).SetCellValue(result.Count > 0 ? result.Sum(x => x.WorkPackCloseNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(8).SetCellValue(result.Count > 0 ? result.Sum(x => x.InspectNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(9).SetCellValue(result.Count > 0 ? result.Sum(x => x.InspectNoCloseNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(10).SetCellValue(result.Count > 0 ? result.Sum(x => x.InspectCloseNum).ToString() : "0");
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -358,49 +364,6 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
return style;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 试车统计实体(老)
|
||||
/// </summary>
|
||||
public class ScheduleBridDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 工作包主键
|
||||
/// </summary>
|
||||
public string WorkPackId { get; set; }
|
||||
/// <summary>
|
||||
/// 工作包名称
|
||||
/// </summary>
|
||||
public string WorkName { get; set; }
|
||||
/// <summary>
|
||||
/// 装置名称
|
||||
/// </summary>
|
||||
public string InstallationName { get; set; }
|
||||
/// <summary>
|
||||
/// 工序名称
|
||||
/// </summary>
|
||||
public string ProcessesName { get; set; }
|
||||
/// <summary>
|
||||
/// 系统名称
|
||||
/// </summary>
|
||||
public string SystemName { get; set; }
|
||||
/// <summary>
|
||||
/// 子系统名称
|
||||
/// </summary>
|
||||
public string SubsystemName { get; set; }
|
||||
/// <summary>
|
||||
/// 工作包数量
|
||||
/// </summary>
|
||||
public string AllNum { get; set; }
|
||||
/// <summary>
|
||||
/// 未关闭任务单数量
|
||||
/// </summary>
|
||||
public string NoCloseNum { get; set; }
|
||||
/// <summary>
|
||||
/// 已关闭任务单数量
|
||||
/// </summary>
|
||||
public string CloseNum { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取试车统计
|
||||
/// </summary>
|
||||
@@ -432,14 +395,17 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
item.InspectNoCloseNum = itemInspect.NoCloseNum;
|
||||
item.WorkPackCloseNum = itemInspect.CloseNum;
|
||||
item.WorkPackNoCloseNum = itemInspect.NoCloseNum;
|
||||
item.WorkPackNum = itemInspect.CloseNum + itemInspect.NoCloseNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.InspectNum = 0;
|
||||
item.InspectCloseNum = 0;
|
||||
item.InspectNoCloseNum = 0;
|
||||
item.WorkPackNotStartedNum = 1;
|
||||
item.WorkPackNoCloseNum = 0;
|
||||
item.WorkPackCloseNum = 0;
|
||||
item.WorkPackNum = 1;
|
||||
}
|
||||
if (driveDt.Rows.Count > 0)
|
||||
{
|
||||
@@ -487,6 +453,10 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
/// </summary>
|
||||
public int WorkPackNoCloseNum { get; set; }
|
||||
/// <summary>
|
||||
/// 工作包未开始数量
|
||||
/// </summary>
|
||||
public int WorkPackNotStartedNum { get; set; }
|
||||
/// <summary>
|
||||
/// 工作包已关闭数量
|
||||
/// </summary>
|
||||
public int WorkPackCloseNum { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user