提交代码
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
<f:RenderField Width="100px" ColumnID="CompileDate" DataField="CompileDate"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="编制日期" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:LinkButtonField ID="lk" ColumnID="export" Hidden="true" HeaderText="导出" Width="60px" Icon="ArrowUp" TextAlign="Center" HeaderTextAlign="Center" CommandName="export" EnableAjax="false" />
|
||||
<f:LinkButtonField ID="lk" ColumnID="export" HeaderText="导出" Width="60px" Icon="ArrowUp" TextAlign="Center" HeaderTextAlign="Center" CommandName="export" EnableAjax="false" />
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
||||
@@ -883,7 +883,7 @@ namespace FineUIPro.Web.ZHGL.TestRunPerformance
|
||||
cell = row.CreateCell(34);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
sheet.AddMergedRegion(new CellRangeAddress(i-1, i, 34, 34));
|
||||
sheet.AddMergedRegion(new CellRangeAddress(i - 1, i, 34, 34));
|
||||
cell = row.CreateCell(35);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
@@ -900,17 +900,365 @@ namespace FineUIPro.Web.ZHGL.TestRunPerformance
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
sheet.AddMergedRegion(new CellRangeAddress(i - 1, i, 38, 38));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
i++;
|
||||
string projectName = string.Empty;
|
||||
string lastProjectName = string.Empty;
|
||||
int b = 1;
|
||||
foreach (var item in monthList)
|
||||
{
|
||||
bool isForeign = false;
|
||||
string isForeignStr = "否";
|
||||
row = sheet.CreateRow(i);
|
||||
cell = row.CreateCell(0);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(b.ToString());
|
||||
cell = row.CreateCell(1);
|
||||
cell.CellStyle = cellStyle;
|
||||
var project = projects.FirstOrDefault(x => x.ProjectId == item.ProjectId);
|
||||
if (project != null)
|
||||
{
|
||||
projectName = project.ProjectName;
|
||||
if (lastProjectName != projectName)
|
||||
{
|
||||
lastProjectName = projectName;
|
||||
}
|
||||
else
|
||||
{
|
||||
projectName = string.Empty;
|
||||
}
|
||||
if (project.IsForeign == true)
|
||||
{
|
||||
isForeign = true;
|
||||
isForeignStr = "是";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastProjectName != projectName)
|
||||
{
|
||||
lastProjectName = projectName;
|
||||
}
|
||||
else
|
||||
{
|
||||
projectName = string.Empty;
|
||||
}
|
||||
projectName = "本部";
|
||||
}
|
||||
|
||||
cell.SetCellValue(projectName);
|
||||
cell = row.CreateCell(2);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JobContent);
|
||||
cell = row.CreateCell(3);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(isForeignStr);
|
||||
if (item.Type == "部门基础工作")
|
||||
{
|
||||
cell = row.CreateCell(4);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Item);
|
||||
cell = row.CreateCell(5);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Unit);
|
||||
cell = row.CreateCell(6);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue((item.Days ?? 0).ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
cell = row.CreateCell(4);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(5);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(6);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
}
|
||||
if (item.Type == "公司培训")
|
||||
{
|
||||
cell = row.CreateCell(7);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Item);
|
||||
cell = row.CreateCell(8);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Unit);
|
||||
}
|
||||
else
|
||||
{
|
||||
cell = row.CreateCell(7);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(8);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
}
|
||||
if (item.Type == "项目投标")
|
||||
{
|
||||
cell = row.CreateCell(9);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Item);
|
||||
cell = row.CreateCell(10);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Unit);
|
||||
}
|
||||
else
|
||||
{
|
||||
cell = row.CreateCell(9);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(10);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
}
|
||||
if (item.Type == "开车策划")
|
||||
{
|
||||
cell = row.CreateCell(11);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Item);
|
||||
cell = row.CreateCell(12);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Unit);
|
||||
}
|
||||
else
|
||||
{
|
||||
cell = row.CreateCell(11);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(12);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
}
|
||||
if (item.Type == "开车培训")
|
||||
{
|
||||
cell = row.CreateCell(13);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Item);
|
||||
cell = row.CreateCell(14);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Unit);
|
||||
cell = row.CreateCell(15);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue((item.Days ?? 0).ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
cell = row.CreateCell(13);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(14);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(15);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
}
|
||||
if (item.Type == "合同管理")
|
||||
{
|
||||
cell = row.CreateCell(16);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Item);
|
||||
cell = row.CreateCell(17);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Unit);
|
||||
}
|
||||
else
|
||||
{
|
||||
cell = row.CreateCell(16);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(17);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
}
|
||||
if (item.Type == "预试车")
|
||||
{
|
||||
cell = row.CreateCell(18);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Item);
|
||||
cell = row.CreateCell(19);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Unit);
|
||||
cell = row.CreateCell(20);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue((item.Days ?? 0).ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
cell = row.CreateCell(18);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(19);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(20);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
}
|
||||
if (item.Type == "试车")
|
||||
{
|
||||
cell = row.CreateCell(21);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Item);
|
||||
cell = row.CreateCell(22);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Unit);
|
||||
}
|
||||
else
|
||||
{
|
||||
cell = row.CreateCell(21);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(22);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
}
|
||||
if (item.Type == "试运行及考核")
|
||||
{
|
||||
cell = row.CreateCell(23);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Item);
|
||||
cell = row.CreateCell(24);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Unit);
|
||||
cell = row.CreateCell(25);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue((item.Days ?? 0).ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
cell = row.CreateCell(23);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(24);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(25);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
}
|
||||
if (item.Type == "开车收尾")
|
||||
{
|
||||
cell = row.CreateCell(26);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Item);
|
||||
cell = row.CreateCell(27);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Unit);
|
||||
cell = row.CreateCell(28);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue((item.Days ?? 0).ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
cell = row.CreateCell(26);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(27);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(28);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
}
|
||||
if (item.Type == "项目协调")
|
||||
{
|
||||
cell = row.CreateCell(29);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Item);
|
||||
cell = row.CreateCell(30);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Unit);
|
||||
}
|
||||
else
|
||||
{
|
||||
cell = row.CreateCell(29);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(30);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
}
|
||||
if (item.Type == "其他")
|
||||
{
|
||||
cell = row.CreateCell(31);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Item);
|
||||
cell = row.CreateCell(32);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Unit);
|
||||
cell = row.CreateCell(33);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue((item.Days ?? 0).ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
cell = row.CreateCell(31);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(32);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(33);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
}
|
||||
double sDays = 0, sDays1 = 0, sDays3 = 0;
|
||||
if (isForeign) //境外项目
|
||||
{
|
||||
if (item.Code1 != 1 && item.Code1 != 2 && item.Code1 != 12)
|
||||
{
|
||||
sDays = (item.Days ?? 0) * 1.2;
|
||||
}
|
||||
else
|
||||
{
|
||||
sDays = item.Days ?? 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sDays = item.Days ?? 0;
|
||||
}
|
||||
if (item.Code1 == 1)
|
||||
{
|
||||
sDays1 = item.Days ?? 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sDays1 = 0;
|
||||
}
|
||||
if (item.Code1 == 3)
|
||||
{
|
||||
sDays3 = item.Days ?? 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sDays3 = 0;
|
||||
}
|
||||
cell = row.CreateCell(34);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(sDays.ToString());
|
||||
cell = row.CreateCell(35);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(36);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Empty);
|
||||
cell = row.CreateCell(37);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(sDays1);
|
||||
cell = row.CreateCell(38);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(sDays3);
|
||||
b++;
|
||||
i++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user