提交代码
This commit is contained in:
@@ -67,6 +67,8 @@
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="工作包数量" ColumnID="WorkPackNum" DataField="WorkPackNum" FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="工作包未开始数量" ColumnID="WorkPackNotStartedNum" DataField="WorkPackNotStartedNum" FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="工作包未关闭数量" ColumnID="WorkPackNoCloseNum" DataField="WorkPackNoCloseNum" FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="工作包已关闭数量" ColumnID="WorkPackCloseNum" DataField="WorkPackCloseNum" FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="150px">
|
||||
|
||||
@@ -180,6 +180,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
GridPreRun.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));
|
||||
@@ -222,6 +223,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
ws.SetColumnWidth(8, (20 * 256));
|
||||
ws.SetColumnWidth(9, (20 * 256));
|
||||
ws.SetColumnWidth(10, (20 * 256));
|
||||
ws.SetColumnWidth(11, (20 * 256));
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -235,7 +237,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
#region 头部
|
||||
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, 0, 0, 0, 10);
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, 0, 0, 0, 11);
|
||||
//行1
|
||||
ws.GetRow(0).GetCell(0).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(0).SetCellValue("工作包名称");
|
||||
@@ -250,15 +252,17 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
ws.GetRow(0).GetCell(5).CellStyle = styleBold;
|
||||
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("检查表已关闭数量");
|
||||
ws.GetRow(0).GetCell(10).SetCellValue("检查表未关闭数量");
|
||||
ws.GetRow(0).GetCell(11).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(11).SetCellValue("检查表已关闭数量");
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -266,7 +270,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
var start = 1;
|
||||
var end = result.Count;
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, start, end, 0, 10);
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, start, end, 0, 11);
|
||||
|
||||
//数据
|
||||
var dataIndex = 1;
|
||||
@@ -278,11 +282,12 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
ws.GetRow(dataIndex).GetCell(3).SetCellValue(item.SystemName);
|
||||
ws.GetRow(dataIndex).GetCell(4).SetCellValue(item.SubsystemName);
|
||||
ws.GetRow(dataIndex).GetCell(5).SetCellValue(item.WorkPackNum);
|
||||
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);
|
||||
ws.GetRow(dataIndex).GetCell(6).SetCellValue(item.WorkPackNotStartedNum);
|
||||
ws.GetRow(dataIndex).GetCell(7).SetCellValue(item.WorkPackNoCloseNum);
|
||||
ws.GetRow(dataIndex).GetCell(8).SetCellValue(item.WorkPackCloseNum);
|
||||
ws.GetRow(dataIndex).GetCell(9).SetCellValue(item.InspectNum);
|
||||
ws.GetRow(dataIndex).GetCell(10).SetCellValue(item.InspectNoCloseNum);
|
||||
ws.GetRow(dataIndex).GetCell(11).SetCellValue(item.InspectCloseNum);
|
||||
dataIndex++;
|
||||
}
|
||||
|
||||
@@ -290,16 +295,17 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
#region 尾部
|
||||
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, end + 1, end + 1, 0, 10);
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, end + 1, end + 1, 0, 11);
|
||||
var region = new CellRangeAddress(end + 1, end + 1, 0, 4);
|
||||
ws.AddMergedRegion(region);
|
||||
ws.GetRow(end + 1).GetCell(0).SetCellValue("合计");
|
||||
ws.GetRow(end + 1).GetCell(5).SetCellValue(result.Count > 0 ? result.Sum(x => x.WorkPackNum).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");
|
||||
ws.GetRow(end + 1).GetCell(6).SetCellValue(result.Count > 0 ? result.Sum(x => x.WorkPackNotStartedNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(7).SetCellValue(result.Count > 0 ? result.Sum(x => x.WorkPackNoCloseNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(8).SetCellValue(result.Count > 0 ? result.Sum(x => x.WorkPackCloseNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(9).SetCellValue(result.Count > 0 ? result.Sum(x => x.InspectNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(10).SetCellValue(result.Count > 0 ? result.Sum(x => x.InspectNoCloseNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(11).SetCellValue(result.Count > 0 ? result.Sum(x => x.InspectCloseNum).ToString() : "0");
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -438,6 +444,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
}
|
||||
model.WorkPackCloseNum = 0;
|
||||
model.WorkPackNoCloseNum = 0;
|
||||
model.WorkPackNotStartedNum = 0;
|
||||
var subsystemids = itemQueryList.ConvertAll(a => a.SubSystemId).Distinct();
|
||||
foreach (var itemsubid in subsystemids)
|
||||
{
|
||||
@@ -465,7 +472,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
}
|
||||
else
|
||||
{
|
||||
model.WorkPackNoCloseNum += 1;
|
||||
model.WorkPackNotStartedNum += 1;
|
||||
}
|
||||
}
|
||||
list.Add(model);
|
||||
@@ -512,11 +519,11 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
/// </summary>
|
||||
public string AllNum { get; set; }
|
||||
/// <summary>
|
||||
/// 未关闭任务单数量
|
||||
/// 未关闭数量
|
||||
/// </summary>
|
||||
public string NoCloseNum { get; set; }
|
||||
/// <summary>
|
||||
/// 已关闭任务单数量
|
||||
/// 已关闭数量
|
||||
/// </summary>
|
||||
public string CloseNum { get; set; }
|
||||
}
|
||||
@@ -579,6 +586,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; }
|
||||
|
||||
@@ -58,6 +58,11 @@
|
||||
<f:NumberBox NoNegative="true" runat="server" ID="txtAllNum" Required="true"></f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="未开始数量" ColumnID="NotStartedNum" DataField="NotStartedNum" FieldType="Int" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<Editor>
|
||||
<f:NumberBox NoNegative="true" runat="server" ID="txtNotStartedNum" Required="true"></f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="进行中数量" ColumnID="ProgressNum" DataField="ProgressNum" FieldType="Int" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<Editor>
|
||||
<f:NumberBox NoNegative="true" runat="server" ID="txtProgressNum" Required="true"></f:NumberBox>
|
||||
@@ -99,6 +104,11 @@
|
||||
<f:NumberBox NoNegative="true" runat="server" ID="txtAllNum1"></f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="未开始数量" ColumnID="NotStartedNum" DataField="NotStartedNum" FieldType="Int" HeaderTextAlign="Center" TextAlign="Center" Width="100px">
|
||||
<Editor>
|
||||
<f:NumberBox NoNegative="true" runat="server" ID="txtNotStartedNum1"></f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="进行中数量" ColumnID="ProgressNum" DataField="ProgressNum" FieldType="Int" HeaderTextAlign="Center" TextAlign="Center" Width="100px">
|
||||
<Editor>
|
||||
<f:NumberBox NoNegative="true" runat="server" ID="txtProgressNum1"></f:NumberBox>
|
||||
@@ -188,12 +198,13 @@
|
||||
|
||||
$.each(modifiedData, function (index, rowData) {
|
||||
var allNum = parseInt(rowData.values['AllNum']);
|
||||
var notStartedNum = parseInt(rowData.values['NotStartedNum']);
|
||||
var progressNum = parseInt(rowData.values['ProgressNum']);
|
||||
var completeNum = parseInt(rowData.values['CompleteNum']);
|
||||
var workPackName = rowData.values['WorkPackName'];
|
||||
if (allNum != (progressNum + completeNum)) {
|
||||
if (allNum != (notStartedNum + progressNum + completeNum)) {
|
||||
F.alert({
|
||||
message: '工作包(' + workPackName + ')全部数量不等于进行中数量加已完成数量!',
|
||||
message: '工作包(' + workPackName + ')全部数量不等于未开始数量+进行中数量+已完成数量!',
|
||||
ok: function () {
|
||||
grid1.startEdit(rowData.id, 'AllNum');
|
||||
}
|
||||
@@ -210,16 +221,19 @@
|
||||
function onGridYscAfterEdit(event, value, params) {
|
||||
var me = F('<%= GridYsc.ClientID %>');
|
||||
var allNumTotal = 0;
|
||||
var notStartedNumTotal = 0;
|
||||
var progressNumTotal = 0;
|
||||
var completeNumTotal = 0;
|
||||
me.getRowEls().each(function (index, tr) {
|
||||
debugger;
|
||||
allNumTotal += me.getCellValue(tr, 'AllNum');
|
||||
notStartedNumTotal += me.getCellValue(tr, 'NotStartedNum');
|
||||
progressNumTotal += me.getCellValue(tr, 'ProgressNum');
|
||||
completeNumTotal += me.getCellValue(tr, 'CompleteNum');
|
||||
});
|
||||
// 第三个参数 true,强制更新,不显示左上角的更改标识
|
||||
me.updateSummaryCellValue('AllNum', allNumTotal, true);
|
||||
me.updateSummaryCellValue('NotStartedNum', notStartedNum, true);
|
||||
me.updateSummaryCellValue('ProgressNum', progressNumTotal, true);
|
||||
me.updateSummaryCellValue('CompleteNum', completeNumTotal, true);
|
||||
}
|
||||
@@ -231,12 +245,13 @@
|
||||
|
||||
$.each(modifiedData, function (index, rowData) {
|
||||
var allNum = parseInt(rowData.values['AllNum']);
|
||||
var notStartedNum = parseInt(rowData.values['NotStartedNum']);
|
||||
var progressNum = parseInt(rowData.values['ProgressNum']);
|
||||
var completeNum = parseInt(rowData.values['CompleteNum']);
|
||||
var workPackName = rowData.values['WorkPackName'];
|
||||
if (allNum != (progressNum + completeNum)) {
|
||||
if (allNum != (notStartedNum + progressNum + completeNum)) {
|
||||
F.alert({
|
||||
message: '工作包(' + workPackName + ')全部数量不等于进行中数量加已完成数量!',
|
||||
message: '工作包(' + workPackName + ')全部数量不等于未开始数量+进行中数量+已完成数量!',
|
||||
ok: function () {
|
||||
grid1.startEdit(rowData.id, 'AllNum');
|
||||
}
|
||||
@@ -257,13 +272,14 @@
|
||||
var progressNumTotal = 0;
|
||||
var completeNumTotal = 0;
|
||||
me.getRowEls().each(function (index, tr) {
|
||||
debugger;
|
||||
allNumTotal += me.getCellValue(tr, 'AllNum');
|
||||
notStartedNumTotal += me.getCellValue(tr, 'NotStartedNum');
|
||||
progressNumTotal += me.getCellValue(tr, 'ProgressNum');
|
||||
completeNumTotal += me.getCellValue(tr, 'CompleteNum');
|
||||
});
|
||||
// 第三个参数 true,强制更新,不显示左上角的更改标识
|
||||
me.updateSummaryCellValue('AllNum', allNumTotal, true);
|
||||
me.updateSummaryCellValue('NotStartedNum', notStartedNumTotal, true);
|
||||
me.updateSummaryCellValue('ProgressNum', progressNumTotal, true);
|
||||
me.updateSummaryCellValue('CompleteNum', completeNumTotal, true);
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
GridYsc.DataBind();
|
||||
JObject summary = new JObject();
|
||||
summary.Add("AllNum", result.Sum(x => x.AllNum));
|
||||
summary.Add("NotStartedNum", result.Sum(x => x.NotStartedNum));
|
||||
summary.Add("ProgressNum", result.Sum(x => x.ProgressNum));
|
||||
summary.Add("CompleteNum", result.Sum(x => x.CompleteNum));
|
||||
GridYsc.SummaryData = summary;
|
||||
@@ -75,6 +76,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
ProjectId = a.ProjectId,
|
||||
States = a.States,
|
||||
AllNum = a.AllNum,
|
||||
NotStartedNum = a.NotStartedNum,
|
||||
ProgressNum = a.ProgressNum,
|
||||
CompleteNum = a.CompleteNum,
|
||||
CompleteRate = a.CompleteRate,
|
||||
@@ -121,6 +123,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
model.AllNum = itemQueryList.Count(x => x.WorkPackId == itemPack.WorkPackId);
|
||||
model.ProgressNum = 0;
|
||||
model.CompleteNum = 0;
|
||||
model.NotStartedNum = 0;
|
||||
var subsystemids = itemQueryList.ConvertAll(a => a.SubSystemId).Distinct();
|
||||
foreach (var itemsubid in subsystemids)
|
||||
{
|
||||
@@ -148,7 +151,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
}
|
||||
else
|
||||
{
|
||||
model.ProgressNum += 1;
|
||||
model.NotStartedNum += 1;
|
||||
}
|
||||
}
|
||||
var rate = model.CompleteNum > 0 ? (decimal)Math.Round((float)model.CompleteNum / (float)model.AllNum * 100, 2, MidpointRounding.AwayFromZero) : 0;
|
||||
@@ -204,6 +207,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
model.States = 1;
|
||||
model.AllNum = !string.IsNullOrWhiteSpace(values.Value<string>("AllNum")) ? int.Parse(values.Value<string>("AllNum")) : 0;
|
||||
model.NotStartedNum = !string.IsNullOrWhiteSpace(values.Value<string>("NotStartedNum")) ? int.Parse(values.Value<string>("NotStartedNum")) : 0;
|
||||
model.ProgressNum = !string.IsNullOrWhiteSpace(values.Value<string>("ProgressNum")) ? int.Parse(values.Value<string>("ProgressNum")) : 0;
|
||||
model.CompleteNum = !string.IsNullOrWhiteSpace(values.Value<string>("CompleteNum")) ? int.Parse(values.Value<string>("CompleteNum")) : 0;
|
||||
var rate = model.CompleteNum > 0 ? (decimal)Math.Round((float)model.CompleteNum / (float)model.AllNum * 100, 2, MidpointRounding.AwayFromZero) : 0;
|
||||
@@ -255,6 +259,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
ws.SetColumnWidth(1, (20 * 256));
|
||||
ws.SetColumnWidth(2, (20 * 256));
|
||||
ws.SetColumnWidth(3, (20 * 256));
|
||||
ws.SetColumnWidth(4, (20 * 256));
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -268,16 +273,18 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
#region 头部
|
||||
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, 0, 0, 0, 3);
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, 0, 0, 0, 4);
|
||||
//行1
|
||||
ws.GetRow(0).GetCell(0).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(0).SetCellValue("工作包名称");
|
||||
ws.GetRow(0).GetCell(1).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(1).SetCellValue("全部数量");
|
||||
ws.GetRow(0).GetCell(2).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(2).SetCellValue("进行中数量");
|
||||
ws.GetRow(0).GetCell(2).SetCellValue("未开始数量");
|
||||
ws.GetRow(0).GetCell(3).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(3).SetCellValue("已完成数量");
|
||||
ws.GetRow(0).GetCell(3).SetCellValue("进行中数量");
|
||||
ws.GetRow(0).GetCell(4).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(4).SetCellValue("已完成数量");
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -285,7 +292,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
var start = 1;
|
||||
var end = result.Count;
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, start, end, 0, 3);
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, start, end, 0, 4);
|
||||
|
||||
//数据
|
||||
var dataIndex = 1;
|
||||
@@ -293,8 +300,9 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
{
|
||||
ws.GetRow(dataIndex).GetCell(0).SetCellValue(item.WorkPackName);
|
||||
ws.GetRow(dataIndex).GetCell(1).SetCellValue(item.AllNum.ToString());
|
||||
ws.GetRow(dataIndex).GetCell(2).SetCellValue(item.ProgressNum.ToString());
|
||||
ws.GetRow(dataIndex).GetCell(3).SetCellValue(item.CompleteNum.ToString());
|
||||
ws.GetRow(dataIndex).GetCell(2).SetCellValue(item.NotStartedNum.ToString());
|
||||
ws.GetRow(dataIndex).GetCell(3).SetCellValue(item.ProgressNum.ToString());
|
||||
ws.GetRow(dataIndex).GetCell(4).SetCellValue(item.CompleteNum.ToString());
|
||||
dataIndex++;
|
||||
}
|
||||
|
||||
@@ -302,11 +310,12 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
#region 尾部
|
||||
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, end + 1, end + 1, 0, 3);
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, end + 1, end + 1, 0, 4);
|
||||
ws.GetRow(end + 1).GetCell(0).SetCellValue("合计");
|
||||
ws.GetRow(end + 1).GetCell(1).SetCellValue(result.Count > 0 ? result.Sum(x => x.AllNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(2).SetCellValue(result.Count > 0 ? result.Sum(x => x.ProgressNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(3).SetCellValue(result.Count > 0 ? result.Sum(x => x.CompleteNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(2).SetCellValue(result.Count > 0 ? result.Sum(x => x.NotStartedNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(3).SetCellValue(result.Count > 0 ? result.Sum(x => x.ProgressNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(4).SetCellValue(result.Count > 0 ? result.Sum(x => x.CompleteNum).ToString() : "0");
|
||||
|
||||
|
||||
#endregion
|
||||
@@ -351,6 +360,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
JObject summary = new JObject();
|
||||
summary.Add("AllNum", result.Sum(x => x.AllNum));
|
||||
summary.Add("NotStartedNum", result.Sum(x => x.NotStartedNum));
|
||||
summary.Add("ProgressNum", result.Sum(x => x.ProgressNum));
|
||||
summary.Add("CompleteNum", result.Sum(x => x.CompleteNum));
|
||||
GridSc.SummaryData = summary;
|
||||
@@ -378,6 +388,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
ProjectId = a.ProjectId,
|
||||
States = a.States,
|
||||
AllNum = a.AllNum,
|
||||
NotStartedNum = a.NotStartedNum,
|
||||
ProgressNum = a.ProgressNum,
|
||||
CompleteNum = a.CompleteNum,
|
||||
CompleteRate = a.CompleteRate,
|
||||
@@ -419,13 +430,15 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
var itemInspect = inspectlist.FirstOrDefault(x => x.WorkPackId == item.WorkPackId);
|
||||
model.AllNum = itemInspect.AllNum;
|
||||
model.ProgressNum = itemInspect.NoCloseNum;
|
||||
model.NotStartedNum = 0;
|
||||
model.CompleteNum = itemInspect.CloseNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
model.AllNum = 0;
|
||||
model.AllNum = 1;
|
||||
model.ProgressNum = 0;
|
||||
model.CompleteNum = 0;
|
||||
model.NotStartedNum = 1;
|
||||
}
|
||||
model.CompleteRate = model.CompleteNum > 0 ? (decimal)Math.Round((float)model.CompleteNum / (float)model.AllNum, 2, MidpointRounding.AwayFromZero) : 0;
|
||||
model.AddUser = this.CurrUser.UserId;
|
||||
@@ -478,6 +491,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
model.States = 2;
|
||||
model.AllNum = !string.IsNullOrWhiteSpace(values.Value<string>("AllNum")) ? int.Parse(values.Value<string>("AllNum")) : 0;
|
||||
model.NotStartedNum = !string.IsNullOrWhiteSpace(values.Value<string>("NotStartedNum")) ? int.Parse(values.Value<string>("NotStartedNum")) : 0;
|
||||
model.ProgressNum = !string.IsNullOrWhiteSpace(values.Value<string>("ProgressNum")) ? int.Parse(values.Value<string>("ProgressNum")) : 0;
|
||||
model.CompleteNum = !string.IsNullOrWhiteSpace(values.Value<string>("CompleteNum")) ? int.Parse(values.Value<string>("CompleteNum")) : 0;
|
||||
model.CompleteRate = model.CompleteNum > 0 ? (decimal)Math.Round((float)model.CompleteNum / (float)model.AllNum, 2, MidpointRounding.AwayFromZero) : 0;
|
||||
@@ -525,6 +539,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
ws.SetColumnWidth(1, (20 * 256));
|
||||
ws.SetColumnWidth(2, (20 * 256));
|
||||
ws.SetColumnWidth(3, (20 * 256));
|
||||
ws.SetColumnWidth(4, (20 * 256));
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -538,16 +553,18 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
#region 头部
|
||||
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, 0, 0, 0, 3);
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, 0, 0, 0, 4);
|
||||
//行1
|
||||
ws.GetRow(0).GetCell(0).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(0).SetCellValue("工作包名称");
|
||||
ws.GetRow(0).GetCell(1).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(1).SetCellValue("全部数量");
|
||||
ws.GetRow(0).GetCell(2).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(2).SetCellValue("进行中数量");
|
||||
ws.GetRow(0).GetCell(2).SetCellValue("未开始数量");
|
||||
ws.GetRow(0).GetCell(3).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(3).SetCellValue("已完成数量");
|
||||
ws.GetRow(0).GetCell(3).SetCellValue("进行中数量");
|
||||
ws.GetRow(0).GetCell(4).CellStyle = styleBold;
|
||||
ws.GetRow(0).GetCell(4).SetCellValue("已完成数量");
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -555,7 +572,7 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
var start = 1;
|
||||
var end = result.Count;
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, start, end, 0, 3);
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, start, end, 0, 4);
|
||||
|
||||
//数据
|
||||
var dataIndex = 1;
|
||||
@@ -563,8 +580,9 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
{
|
||||
ws.GetRow(dataIndex).GetCell(0).SetCellValue(item.WorkPackName);
|
||||
ws.GetRow(dataIndex).GetCell(1).SetCellValue(item.AllNum.ToString());
|
||||
ws.GetRow(dataIndex).GetCell(2).SetCellValue(item.ProgressNum.ToString());
|
||||
ws.GetRow(dataIndex).GetCell(3).SetCellValue(item.CompleteNum.ToString());
|
||||
ws.GetRow(dataIndex).GetCell(2).SetCellValue(item.NotStartedNum.ToString());
|
||||
ws.GetRow(dataIndex).GetCell(3).SetCellValue(item.ProgressNum.ToString());
|
||||
ws.GetRow(dataIndex).GetCell(4).SetCellValue(item.CompleteNum.ToString());
|
||||
dataIndex++;
|
||||
}
|
||||
|
||||
@@ -572,12 +590,12 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
|
||||
#region 尾部
|
||||
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, end + 1, end + 1, 0, 3);
|
||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, end + 1, end + 1, 0, 4);
|
||||
ws.GetRow(end + 1).GetCell(0).SetCellValue("合计");
|
||||
ws.GetRow(end + 1).GetCell(1).SetCellValue(result.Count > 0 ? result.Sum(x => x.AllNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(2).SetCellValue(result.Count > 0 ? result.Sum(x => x.ProgressNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(3).SetCellValue(result.Count > 0 ? result.Sum(x => x.CompleteNum).ToString() : "0");
|
||||
|
||||
ws.GetRow(end + 1).GetCell(2).SetCellValue(result.Count > 0 ? result.Sum(x => x.NotStartedNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(3).SetCellValue(result.Count > 0 ? result.Sum(x => x.ProgressNum).ToString() : "0");
|
||||
ws.GetRow(end + 1).GetCell(4).SetCellValue(result.Count > 0 ? result.Sum(x => x.CompleteNum).ToString() : "0");
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -149,6 +149,15 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtAllNum;
|
||||
|
||||
/// <summary>
|
||||
/// txtNotStartedNum 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtNotStartedNum;
|
||||
|
||||
/// <summary>
|
||||
/// txtProgressNum 控件。
|
||||
/// </summary>
|
||||
@@ -230,6 +239,15 @@ namespace FineUIPro.Web.TestRun.Report
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtAllNum1;
|
||||
|
||||
/// <summary>
|
||||
/// txtNotStartedNum1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtNotStartedNum1;
|
||||
|
||||
/// <summary>
|
||||
/// txtProgressNum1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="工作包数量" ColumnID="WorkPackNum" DataField="WorkPackNum" FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="工作包未开始数量" ColumnID="WorkPackNotStartedNum" DataField="WorkPackNotStartedNum" FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="工作包未关闭数量" ColumnID="WorkPackNoCloseNum" DataField="WorkPackNoCloseNum" FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="工作包已关闭数量" ColumnID="WorkPackCloseNum" DataField="WorkPackCloseNum" FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="150px">
|
||||
|
||||
@@ -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