From fa5ccc8f15e2bfc812bcacaa5bafbdb2f89b10af Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 17 Jul 2023 15:58:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=89=E5=85=A8=E5=AE=9E?= =?UTF-8?q?=E6=96=BD=E8=AE=A1=E5=88=92=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HSSE/ActionPlan/ActionPlanList.aspx.cs | 26 ++++++++++++++++--- .../ZHGL/Plan/ActionPlanList.aspx.cs | 26 ++++++++++++++++--- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs index 8532c378..57b81a6b 100644 --- a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs @@ -647,8 +647,17 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.Font.Bold = false; if (item.ApproveDate != null) { - string personName = Person_PersonsService.GetPersonsNameById(item.ApproveMan); - builder.Write(personName + " " + item.ApproveDate.ToString().Split(' ')[0]); + var getUser = Person_PersonsService.GetPerson_PersonsById(item.ApproveMan); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builder.InsertImage(file, 80, 20); + builder.Write(item.ApproveDate.ToString().Split(' ')[0]); + } + else + { + builder.Write(getUser.PersonName + " " + item.ApproveDate.ToString().Split(' ')[0]); + } } else { @@ -699,8 +708,17 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.Font.Bold = false; if (item.ApproveDate != null) { - string personName = Person_PersonsService.GetPersonsNameById(item.ApproveMan); - builder.Write(personName + " " + item.ApproveDate.ToString().Split(' ')[0]); + var getUser = Person_PersonsService.GetPerson_PersonsById(item.ApproveMan); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builder.InsertImage(file, 80, 20); + builder.Write(item.ApproveDate.ToString().Split(' ')[0]); + } + else + { + builder.Write(getUser.PersonName + " " + item.ApproveDate.ToString().Split(' ')[0]); + } } else { diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs index fb666eea..7dfd21ea 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs @@ -633,8 +633,17 @@ namespace FineUIPro.Web.ZHGL.Plan builder.Font.Bold = false; if (item.ApproveDate != null) { - string personName = Person_PersonsService.GetPersonsNameById(item.ApproveMan); - builder.Write(personName + " " + item.ApproveDate.ToString().Split(' ')[0]); + var getUser = Person_PersonsService.GetPerson_PersonsById(item.ApproveMan); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builder.InsertImage(file, 80, 20); + builder.Write(item.ApproveDate.ToString().Split(' ')[0]); + } + else + { + builder.Write(getUser.PersonName + " " + item.ApproveDate.ToString().Split(' ')[0]); + } } else { @@ -685,8 +694,17 @@ namespace FineUIPro.Web.ZHGL.Plan builder.Font.Bold = false; if (item.ApproveDate != null) { - string personName = Person_PersonsService.GetPersonsNameById(item.ApproveMan); - builder.Write(personName + " " + item.ApproveDate.ToString().Split(' ')[0]); + var getUser = Person_PersonsService.GetPerson_PersonsById(item.ApproveMan); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builder.InsertImage(file, 80, 20); + builder.Write(item.ApproveDate.ToString().Split(' ')[0]); + } + else + { + builder.Write(getUser.PersonName + " " + item.ApproveDate.ToString().Split(' ')[0]); + } } else {