修改安全实施计划导出

This commit is contained in:
2023-07-17 16:09:08 +08:00
parent fa5ccc8f15
commit 216cdad9de
2 changed files with 78 additions and 12 deletions
@@ -478,7 +478,16 @@ namespace FineUIPro.Web.HSSE.ActionPlan
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
builder.CellFormat.Width = 130; builder.CellFormat.Width = 130;
builder.Font.Bold = false; builder.Font.Bold = false;
builder.Write(BLL.Person_PersonsService.GetPersonsNameById(actionPlanList.CompileMan)); var getCompileMan = Person_PersonsService.GetPerson_PersonsById(actionPlanList.CompileMan);
if (!string.IsNullOrEmpty(getCompileMan.SignatureUrl) && File.Exists(rootPath + getCompileMan.SignatureUrl))
{
var file = rootPath + getCompileMan.SignatureUrl;
builder.InsertImage(file, 80, 20);
}
else
{
builder.Write(getCompileMan.PersonName);
}
builder.EndRow(); builder.EndRow();
#endregion #endregion
@@ -504,13 +513,21 @@ namespace FineUIPro.Web.HSSE.ActionPlan
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
string manname = man(ActionPlan_ActionPlanListApproveList[i].ApproveMan); var getApproveMan = Person_PersonsService.GetPerson_PersonsById(ActionPlan_ActionPlanListApproveList[i].ApproveMan);
//判断是不是最后一个 //判断是不是最后一个
if (ActionPlan_ActionPlanListApproveList.Count == i + 1) if (ActionPlan_ActionPlanListApproveList.Count == i + 1)
{ {
builder.CellFormat.Width = 40; builder.CellFormat.Width = 40;
builder.Font.Bold = false; builder.Font.Bold = false;
builder.Write(manname); if (!string.IsNullOrEmpty(getApproveMan.SignatureUrl) && File.Exists(rootPath + getApproveMan.SignatureUrl))
{
var file = rootPath + getApproveMan.SignatureUrl;
builder.InsertImage(file, 80, 20);
}
else
{
builder.Write(getApproveMan.PersonName);
}
builder.InsertCell(); builder.InsertCell();
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
@@ -524,7 +541,15 @@ namespace FineUIPro.Web.HSSE.ActionPlan
{ {
builder.CellFormat.Width = 40; builder.CellFormat.Width = 40;
builder.Font.Bold = false; builder.Font.Bold = false;
builder.Write(manname); if (!string.IsNullOrEmpty(getApproveMan.SignatureUrl) && File.Exists(rootPath + getApproveMan.SignatureUrl))
{
var file = rootPath + getApproveMan.SignatureUrl;
builder.InsertImage(file, 80, 20);
}
else
{
builder.Write(getApproveMan.PersonName);
}
} }
@@ -546,9 +571,17 @@ namespace FineUIPro.Web.HSSE.ActionPlan
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
builder.CellFormat.Width = 20; builder.CellFormat.Width = 20;
string manname2 = man(ActionPlan_ActionPlanListApproveList[i + 1].ApproveMan); var getApproveMan2 = Person_PersonsService.GetPerson_PersonsById(ActionPlan_ActionPlanListApproveList[i + 1].ApproveMan);
builder.Font.Bold = false; builder.Font.Bold = false;
builder.Write(manname2); if (!string.IsNullOrEmpty(getApproveMan2.SignatureUrl) && File.Exists(rootPath + getApproveMan2.SignatureUrl))
{
var file = rootPath + getApproveMan2.SignatureUrl;
builder.InsertImage(file, 80, 20);
}
else
{
builder.Write(getApproveMan2.PersonName);
}
builder.EndRow(); builder.EndRow();
i += 1; i += 1;
} }
@@ -464,7 +464,16 @@ namespace FineUIPro.Web.ZHGL.Plan
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
builder.CellFormat.Width = 130; builder.CellFormat.Width = 130;
builder.Font.Bold = false; builder.Font.Bold = false;
builder.Write(BLL.Person_PersonsService.GetPersonsNameById(actionPlanList.CompileMan)); var getCompileMan = Person_PersonsService.GetPerson_PersonsById(actionPlanList.CompileMan);
if (!string.IsNullOrEmpty(getCompileMan.SignatureUrl) && File.Exists(rootPath + getCompileMan.SignatureUrl))
{
var file = rootPath + getCompileMan.SignatureUrl;
builder.InsertImage(file, 80, 20);
}
else
{
builder.Write(getCompileMan.PersonName);
}
builder.EndRow(); builder.EndRow();
#endregion #endregion
@@ -490,13 +499,21 @@ namespace FineUIPro.Web.ZHGL.Plan
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
string manname = man(ActionPlan_ActionPlanListApproveList[i].ApproveMan); var getApproveMan = Person_PersonsService.GetPerson_PersonsById(ActionPlan_ActionPlanListApproveList[i].ApproveMan);
//判断是不是最后一个 //判断是不是最后一个
if (ActionPlan_ActionPlanListApproveList.Count == i + 1) if (ActionPlan_ActionPlanListApproveList.Count == i + 1)
{ {
builder.CellFormat.Width = 40; builder.CellFormat.Width = 40;
builder.Font.Bold = false; builder.Font.Bold = false;
builder.Write(manname); if (!string.IsNullOrEmpty(getApproveMan.SignatureUrl) && File.Exists(rootPath + getApproveMan.SignatureUrl))
{
var file = rootPath + getApproveMan.SignatureUrl;
builder.InsertImage(file, 80, 20);
}
else
{
builder.Write(getApproveMan.PersonName);
}
builder.InsertCell(); builder.InsertCell();
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
@@ -510,7 +527,15 @@ namespace FineUIPro.Web.ZHGL.Plan
{ {
builder.CellFormat.Width = 40; builder.CellFormat.Width = 40;
builder.Font.Bold = false; builder.Font.Bold = false;
builder.Write(manname); if (!string.IsNullOrEmpty(getApproveMan.SignatureUrl) && File.Exists(rootPath + getApproveMan.SignatureUrl))
{
var file = rootPath + getApproveMan.SignatureUrl;
builder.InsertImage(file, 80, 20);
}
else
{
builder.Write(getApproveMan.PersonName);
}
} }
@@ -532,9 +557,17 @@ namespace FineUIPro.Web.ZHGL.Plan
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
builder.CellFormat.Width = 20; builder.CellFormat.Width = 20;
string manname2 = man(ActionPlan_ActionPlanListApproveList[i + 1].ApproveMan); var getApproveMan2 = Person_PersonsService.GetPerson_PersonsById(ActionPlan_ActionPlanListApproveList[i + 1].ApproveMan);
builder.Font.Bold = false; builder.Font.Bold = false;
builder.Write(manname2); if (!string.IsNullOrEmpty(getApproveMan2.SignatureUrl) && File.Exists(rootPath + getApproveMan2.SignatureUrl))
{
var file = rootPath + getApproveMan2.SignatureUrl;
builder.InsertImage(file, 80, 20);
}
else
{
builder.Write(getApproveMan2.PersonName);
}
builder.EndRow(); builder.EndRow();
i += 1; i += 1;
} }