This commit is contained in:
2024-04-22 00:36:04 +08:00
parent 0829c2c559
commit 1fe9772110
5 changed files with 887 additions and 552 deletions
@@ -19,17 +19,13 @@ namespace FineUIPro.Web.TestRun.ProduceTestRun
{
public partial class RunningLogManagementList : PageBase
{
/// <summary>
/// 系统主键
/// </summary>
public string SystemId { get { return (string)ViewState["SystemId"]; } set { ViewState["SystemId"] = value; } }
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//绑定数据
InitTreeMenu();
BindGrid();
}
}
@@ -99,10 +95,6 @@ namespace FineUIPro.Web.TestRun.ProduceTestRun
/// </summary>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
if (this.tvControlItem.SelectedNodeID.Split('|').Length > 2)
{
this.SystemId = this.tvControlItem.SelectedNodeID.Split('|').Last();
}
this.BindGrid();
}
@@ -115,14 +107,17 @@ namespace FineUIPro.Web.TestRun.ProduceTestRun
/// </summary>
public void BindGrid()
{
string strSql = @"select a.RunningId,a.ProjectId,project.ProjectName as ProjectName,a.InstallationId,a.ProcessesId,a.SystemId,a.JobNo,a.ShiftType,(case a.ShiftType when 1 then '白班' else '夜班' end) as ShiftTypeName,a.ShiftUser,shiftuser.UserName as ShiftUserName,a.SuccessionUser,successuser.UserName as SuccessionUserName,a.StartData,a.EndData,a.IsDesalinated,a.DesalinatedSituation,a.DesalinatedRemarks,a.IsLoop,a.LoopSituation,a.LoopRemarks,a.IsSteam,a.SteamSituation,a.SteamRemarks,a.IsAirCompression,a.AirCompressionSituation,a.AirCompressionRemarks,a.IsCompoundAmmonia,a.CompoundAmmoniaSituation,a.CompoundAmmoniaRemarks,a.IsUrea,a.UreaSituation,a.UreaRemarks,a.HandoverCare,a.OperationReason,a.OperationHandle,a.MaintenanceReason,a.MaintenanceHandle,a.AddUser,a.AddTime,a.Sort from Running_LogManagement as a inner join Sys_User as shiftuser on shiftuser.UserId=a.ShiftUser inner join Sys_User as successuser on successuser.UserId=a.SuccessionUser inner join Base_Project as project on project.ProjectId=a.ProjectId ";
string strSql = @"select a.RunningId,a.ProjectId,project.ProjectName as ProjectName,a.InstallationId,a.ProcessesId,a.SystemId,inst.PreRunName as InstallationName,proce.PreRunName as ProcessesName,syst.PreRunName as SystemName,a.JobNo,a.ShiftType,(case a.ShiftType when 1 then '白班' else '夜班' end) as ShiftTypeName,a.ShiftUser,shiftuser.UserName as ShiftUserName,a.SuccessionUser,successuser.UserName as SuccessionUserName,a.StartData,a.EndData,a.AddUser,a.AddTime,a.Sort from Running_LogManagement as a inner join Sys_User as shiftuser on shiftuser.UserId=a.ShiftUser inner join Sys_User as successuser on successuser.UserId=a.SuccessionUser inner join Base_Project as project on project.ProjectId=a.ProjectId inner join PreRun_SysDevice as inst on inst.PreRunId=a.InstallationId inner join PreRun_SysDevice as proce on proce.PreRunId=a.ProcessesId inner join PreRun_SysDevice as syst on syst.PreRunId=a.SystemId where a.ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@projectid", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (this.tvControlItem.SelectedNodeID.Split('|').Length > 0)
{
var installationId = this.tvControlItem.SelectedNodeID.Split('|').First();
strSql += " and a.InstallationId=@InstallationId";
listStr.Add(new SqlParameter("@InstallationId", installationId));
if (installationId != "0")
{
strSql += " and a.InstallationId=@InstallationId";
listStr.Add(new SqlParameter("@InstallationId", installationId));
}
}
if (this.tvControlItem.SelectedNodeID.Split('|').Length > 1)
{
@@ -209,12 +204,7 @@ namespace FineUIPro.Web.TestRun.ProduceTestRun
/// </summary>
protected void btnAdd_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(this.SystemId))
{
Alert.ShowInTop("请选择系统!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RunningLogManagementEdit.aspx?RunningId=&SystemId=" + this.SystemId, "新增 - ")));
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RunningLogManagementEdit.aspx?RunningId=", "新增 - ")));
}
/// <summary>
@@ -227,7 +217,7 @@ namespace FineUIPro.Web.TestRun.ProduceTestRun
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RunningLogManagementEdit.aspx?RunningId={0}&SystemId={1}", Grid1.SelectedRowID, this.SystemId, "编辑 - ")));
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RunningLogManagementEdit.aspx?RunningId={0}", Grid1.SelectedRowID, "编辑 - ")));
}
/// <summary>
@@ -292,29 +282,8 @@ namespace FineUIPro.Web.TestRun.ProduceTestRun
SuccessionUserName = d.UserName,
a.StartData,
a.EndData,
a.IsDesalinated,
a.DesalinatedSituation,
a.DesalinatedRemarks,
a.IsLoop,
a.LoopSituation,
a.LoopRemarks,
a.IsSteam,
a.SteamSituation,
a.SteamRemarks,
a.IsAirCompression,
a.AirCompressionSituation,
a.AirCompressionRemarks,
a.IsCompoundAmmonia,
a.CompoundAmmoniaSituation,
a.CompoundAmmoniaRemarks,
a.IsUrea,
a.UreaSituation,
a.UreaRemarks,
a.HandoverCare,
a.OperationReason,
a.OperationHandle,
a.MaintenanceReason,
a.MaintenanceHandle,
a.Situation,
a.Remarks,
a.AddUser,
a.AddTime,
a.Sort
@@ -404,181 +373,181 @@ namespace FineUIPro.Web.TestRun.ProduceTestRun
#region
var dataIndex = 5;
if (model.IsDesalinated == 1)
{
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 3);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("DW Station 脱盐水");
ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 4, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(4).SetCellValue("");
ws.GetRow(dataIndex + 1).GetCell(4).CellStyle = leftStyle;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 90);
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 3);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.DesalinatedSituation);
ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 4, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(4).SetCellValue(model.DesalinatedRemarks);
ws.GetRow(dataIndex + 2).GetCell(4).CellStyle = leftStyle;
dataIndex += 2;
}
if (model.IsLoop == 1)
{
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 3);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("ACW/UCW/ECW Station 循环水");
ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 4, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(4).SetCellValue("");
ws.GetRow(dataIndex + 1).GetCell(4).CellStyle = leftStyle;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 90);
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 3);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.LoopSituation);
ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 4, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(4).SetCellValue(model.LoopRemarks);
ws.GetRow(dataIndex + 2).GetCell(4).CellStyle = leftStyle;
dataIndex += 2;
}
if (model.IsSteam == 1)
{
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 3);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("Steam System蒸汽");
ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 4, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(4).SetCellValue("");
ws.GetRow(dataIndex + 1).GetCell(4).CellStyle = leftStyle;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 90);
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 3);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.SteamSituation);
ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 4, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(4).SetCellValue(model.SteamRemarks);
ws.GetRow(dataIndex + 2).GetCell(4).CellStyle = leftStyle;
dataIndex += 2;
}
if (model.IsAirCompression == 1)
{
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 3);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("Air Station 空压站");
ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 4, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(4).SetCellValue("");
ws.GetRow(dataIndex + 1).GetCell(4).CellStyle = leftStyle;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 90);
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 3);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.AirCompressionSituation);
ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 4, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(4).SetCellValue(model.AirCompressionRemarks);
ws.GetRow(dataIndex + 2).GetCell(4).CellStyle = leftStyle;
dataIndex += 2;
}
if (model.IsCompoundAmmonia == 1)
{
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 3);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("Ammonia Plant 合成氨");
ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 4, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(4).SetCellValue("");
ws.GetRow(dataIndex + 1).GetCell(4).CellStyle = leftStyle;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 90);
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 3);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.CompoundAmmoniaSituation);
ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 4, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(4).SetCellValue(model.CompoundAmmoniaRemarks);
ws.GetRow(dataIndex + 2).GetCell(4).CellStyle = leftStyle;
dataIndex += 2;
}
if (model.IsUrea == 1)
{
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 3);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("Urea Plant 尿素");
ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 4, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(4).SetCellValue("");
ws.GetRow(dataIndex + 1).GetCell(4).CellStyle = leftStyle;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 90);
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 3);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.UreaSituation);
ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 4, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(4).SetCellValue(model.UreaRemarks);
ws.GetRow(dataIndex + 2).GetCell(4).CellStyle = leftStyle;
dataIndex += 2;
}
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("Attention of next shift交班注意");
ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 30);
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.HandoverCare);
ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
dataIndex += 2;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("operation issue操作问题");
ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 30);
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue($"reason原因:{model.OperationReason}");
ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 3, dataIndex + 3, 0, 5, 30);
region = new CellRangeAddress(dataIndex + 3, dataIndex + 3, 0, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 3).GetCell(0).SetCellValue($"solution处理:{model.OperationHandle}");
ws.GetRow(dataIndex + 3).GetCell(0).CellStyle = leftStyle;
dataIndex += 3;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("maintenance issue维护问题");
ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 30);
region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue($"reason原因:{model.MaintenanceReason}");
ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 3, dataIndex + 3, 0, 5, 30);
region = new CellRangeAddress(dataIndex + 3, dataIndex + 3, 0, 5);
ws.AddMergedRegion(region);
ws.GetRow(dataIndex + 3).GetCell(0).SetCellValue($"solution处理:{model.MaintenanceHandle}");
ws.GetRow(dataIndex + 3).GetCell(0).CellStyle = leftStyle;
dataIndex += 3;
//if (model.IsDesalinated == 1)
//{
// ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
// region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 3);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("DW Station 脱盐水");
// ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
// region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 4, 5);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 1).GetCell(4).SetCellValue("");
// ws.GetRow(dataIndex + 1).GetCell(4).CellStyle = leftStyle;
// ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 90);
// region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 3);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.DesalinatedSituation);
// ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
// region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 4, 5);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 2).GetCell(4).SetCellValue(model.DesalinatedRemarks);
// ws.GetRow(dataIndex + 2).GetCell(4).CellStyle = leftStyle;
// dataIndex += 2;
//}
//if (model.IsLoop == 1)
//{
// ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
// region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 3);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("ACW/UCW/ECW Station 循环水");
// ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
// region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 4, 5);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 1).GetCell(4).SetCellValue("");
// ws.GetRow(dataIndex + 1).GetCell(4).CellStyle = leftStyle;
// ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 90);
// region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 3);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.LoopSituation);
// ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
// region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 4, 5);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 2).GetCell(4).SetCellValue(model.LoopRemarks);
// ws.GetRow(dataIndex + 2).GetCell(4).CellStyle = leftStyle;
// dataIndex += 2;
//}
//if (model.IsSteam == 1)
//{
// ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
// region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 3);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("Steam System蒸汽");
// ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
// region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 4, 5);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 1).GetCell(4).SetCellValue("");
// ws.GetRow(dataIndex + 1).GetCell(4).CellStyle = leftStyle;
// ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 90);
// region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 3);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.SteamSituation);
// ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
// region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 4, 5);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 2).GetCell(4).SetCellValue(model.SteamRemarks);
// ws.GetRow(dataIndex + 2).GetCell(4).CellStyle = leftStyle;
// dataIndex += 2;
//}
//if (model.IsAirCompression == 1)
//{
// ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
// region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 3);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("Air Station 空压站");
// ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
// region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 4, 5);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 1).GetCell(4).SetCellValue("");
// ws.GetRow(dataIndex + 1).GetCell(4).CellStyle = leftStyle;
// ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 90);
// region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 3);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.AirCompressionSituation);
// ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
// region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 4, 5);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 2).GetCell(4).SetCellValue(model.AirCompressionRemarks);
// ws.GetRow(dataIndex + 2).GetCell(4).CellStyle = leftStyle;
// dataIndex += 2;
//}
//if (model.IsCompoundAmmonia == 1)
//{
// ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
// region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 3);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("Ammonia Plant 合成氨");
// ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
// region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 4, 5);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 1).GetCell(4).SetCellValue("");
// ws.GetRow(dataIndex + 1).GetCell(4).CellStyle = leftStyle;
// ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 90);
// region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 3);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.CompoundAmmoniaSituation);
// ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
// region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 4, 5);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 2).GetCell(4).SetCellValue(model.CompoundAmmoniaRemarks);
// ws.GetRow(dataIndex + 2).GetCell(4).CellStyle = leftStyle;
// dataIndex += 2;
//}
//if (model.IsUrea == 1)
//{
// ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
// region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 3);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("Urea Plant 尿素");
// ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
// region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 4, 5);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 1).GetCell(4).SetCellValue("");
// ws.GetRow(dataIndex + 1).GetCell(4).CellStyle = leftStyle;
// ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 90);
// region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 3);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.UreaSituation);
// ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
// region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 4, 5);
// ws.AddMergedRegion(region);
// ws.GetRow(dataIndex + 2).GetCell(4).SetCellValue(model.UreaRemarks);
// ws.GetRow(dataIndex + 2).GetCell(4).CellStyle = leftStyle;
// dataIndex += 2;
//}
//ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
//region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 5);
//ws.AddMergedRegion(region);
//ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("Attention of next shift交班注意");
//ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
//ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 30);
//region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 5);
//ws.AddMergedRegion(region);
//ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue(model.HandoverCare);
//ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
//dataIndex += 2;
//ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
//region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 5);
//ws.AddMergedRegion(region);
//ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("operation issue操作问题");
//ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
//ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 30);
//region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 5);
//ws.AddMergedRegion(region);
//ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue($"reason原因:{model.OperationReason}");
//ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
//ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 3, dataIndex + 3, 0, 5, 30);
//region = new CellRangeAddress(dataIndex + 3, dataIndex + 3, 0, 5);
//ws.AddMergedRegion(region);
//ws.GetRow(dataIndex + 3).GetCell(0).SetCellValue($"solution处理:{model.OperationHandle}");
//ws.GetRow(dataIndex + 3).GetCell(0).CellStyle = leftStyle;
//dataIndex += 3;
//ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 1, dataIndex + 1, 0, 5);
//region = new CellRangeAddress(dataIndex + 1, dataIndex + 1, 0, 5);
//ws.AddMergedRegion(region);
//ws.GetRow(dataIndex + 1).GetCell(0).SetCellValue("maintenance issue维护问题");
//ws.GetRow(dataIndex + 1).GetCell(0).CellStyle = styleLeftBold;
//ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 2, dataIndex + 2, 0, 5, 30);
//region = new CellRangeAddress(dataIndex + 2, dataIndex + 2, 0, 5);
//ws.AddMergedRegion(region);
//ws.GetRow(dataIndex + 2).GetCell(0).SetCellValue($"reason原因:{model.MaintenanceReason}");
//ws.GetRow(dataIndex + 2).GetCell(0).CellStyle = leftStyle;
//ws = ExcelCreateRowTitle(ws, hssfworkbook, style, dataIndex + 3, dataIndex + 3, 0, 5, 30);
//region = new CellRangeAddress(dataIndex + 3, dataIndex + 3, 0, 5);
//ws.AddMergedRegion(region);
//ws.GetRow(dataIndex + 3).GetCell(0).SetCellValue($"solution处理:{model.MaintenanceHandle}");
//ws.GetRow(dataIndex + 3).GetCell(0).CellStyle = leftStyle;
//dataIndex += 3;
#endregion
ws.PrintSetup.Landscape = false;
@@ -616,7 +585,6 @@ namespace FineUIPro.Web.TestRun.ProduceTestRun
#endregion
#region
/// <summary>