From 803b559e7e99c9aff7363efbee5e700b8a4e077d Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Wed, 26 Jul 2023 17:47:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9E=E6=96=BD=E8=AE=A1?= =?UTF-8?q?=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 | 118 ++++++++++-------- .../ZHGL/Plan/ActionPlanList.aspx.cs | 118 ++++++++++-------- 2 files changed, 132 insertions(+), 104 deletions(-) diff --git a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs index bba2f340..0b8ead23 100644 --- a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs @@ -703,64 +703,67 @@ namespace FineUIPro.Web.HSSE.ActionPlan } foreach (var item in ActionPlan_ActionPlanListApproveList2) { - //部门名称 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 150; - var departModel = db.Base_Depart.FirstOrDefault(x => x.DepartId == item.DepartId); - builder.Font.Bold = false; - if (departModel != null) + if (item.ApproveMan != "905a75d6-e733-449f-9742-4dcd71e8d2e1" && item.DepartId != BLL.Const.Depart_CompanyLeaderId) { - builder.Write(departModel.DepartName); - } - //评审意见 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 100; - builder.Font.Bold = false; - if (!string.IsNullOrEmpty(item.ApproveIdea)) - { - builder.Write(item.ApproveIdea); - } - else - { - builder.Write("无"); - } - - - //评审日期 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 150; - builder.Font.Bold = false; - if (item.ApproveDate != null) - { - var getUser = Person_PersonsService.GetPerson_PersonsById(item.ApproveMan); - if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + //部门名称 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 150; + var departModel = db.Base_Depart.FirstOrDefault(x => x.DepartId == item.DepartId); + builder.Font.Bold = false; + if (departModel != null) { - var file = rootPath + getUser.SignatureUrl; - builder.InsertImage(file, 80, 20); - builder.Write(item.ApproveDate.ToString().Split(' ')[0]); + builder.Write(departModel.DepartName); + } + //评审意见 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 100; + builder.Font.Bold = false; + if (!string.IsNullOrEmpty(item.ApproveIdea)) + { + builder.Write(item.ApproveIdea); } else { - builder.Write(getUser.PersonName + " " + item.ApproveDate.ToString().Split(' ')[0]); + builder.Write("无"); } + + + //评审日期 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 150; + builder.Font.Bold = false; + if (item.ApproveDate != null) + { + 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 + { + builder.Write(""); + } + builder.EndRow(); } - else - { - builder.Write(""); - } - builder.EndRow(); } #endregion } @@ -783,6 +786,13 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.CellFormat.Width = 300; builder.Font.Bold = true; builder.RowFormat.Height = 40; + var AQApprove = (from x in db.ActionPlan_ActionPlanListApprove + where x.ApproveMan == "905a75d6-e733-449f-9742-4dcd71e8d2e1" + select x).FirstOrDefault(); + if (AQApprove != null) + { + builder.Write(AQApprove.ApproveIdea + "\n\n"); + } builder.Write("公司安全总监/部门负责人:"); var personAQ = BLL.Person_PersonsService.GetPerson_PersonsById("905a75d6-e733-449f-9742-4dcd71e8d2e1"); //安全总监任学宁 if (!string.IsNullOrEmpty(personAQ.SignatureUrl) && File.Exists(rootPath + personAQ.SignatureUrl)) @@ -817,13 +827,17 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.CellFormat.Width = 300; builder.Font.Bold = true; builder.RowFormat.Height = 40; - builder.Write("公司主管生产/安全领导:"); var GSLDApprove = (from x in db.ActionPlan_ActionPlanListApprove join y in db.Person_Persons on x.ApproveMan equals y.PersonId where x.ActionPlanListId == Id && x.DepartId == BLL.Const.Depart_CompanyLeaderId select x).FirstOrDefault(); if (GSLDApprove != null) + { + builder.Write(GSLDApprove.ApproveIdea + "\n\n"); + } + builder.Write("公司主管生产/安全领导:"); + if (GSLDApprove != null) { var personGSLD = BLL.Person_PersonsService.GetPerson_PersonsById(GSLDApprove.ApproveMan); if (!string.IsNullOrEmpty(personGSLD.SignatureUrl) && File.Exists(rootPath + personGSLD.SignatureUrl)) diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs index 6cb6ae07..1e3525b3 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs @@ -685,64 +685,67 @@ namespace FineUIPro.Web.ZHGL.Plan } foreach (var item in ActionPlan_ActionPlanListApproveList2) { - //部门名称 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 150; - var departModel = db.Base_Depart.FirstOrDefault(x => x.DepartId == item.DepartId); - builder.Font.Bold = false; - if (departModel != null) + if (item.ApproveMan != "905a75d6-e733-449f-9742-4dcd71e8d2e1" && item.DepartId != BLL.Const.Depart_CompanyLeaderId) { - builder.Write(departModel.DepartName); - } - //评审意见 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 100; - builder.Font.Bold = false; - if (!string.IsNullOrEmpty(item.ApproveIdea)) - { - builder.Write(item.ApproveIdea); - } - else - { - builder.Write("无"); - } - - - //评审日期 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 150; - builder.Font.Bold = false; - if (item.ApproveDate != null) - { - var getUser = Person_PersonsService.GetPerson_PersonsById(item.ApproveMan); - if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + //部门名称 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 150; + var departModel = db.Base_Depart.FirstOrDefault(x => x.DepartId == item.DepartId); + builder.Font.Bold = false; + if (departModel != null) { - var file = rootPath + getUser.SignatureUrl; - builder.InsertImage(file, 80, 20); - builder.Write(item.ApproveDate.ToString().Split(' ')[0]); + builder.Write(departModel.DepartName); + } + //评审意见 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 100; + builder.Font.Bold = false; + if (!string.IsNullOrEmpty(item.ApproveIdea)) + { + builder.Write(item.ApproveIdea); } else { - builder.Write(getUser.PersonName + " " + item.ApproveDate.ToString().Split(' ')[0]); + builder.Write("无"); } + + + //评审日期 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 150; + builder.Font.Bold = false; + if (item.ApproveDate != null) + { + 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 + { + builder.Write(""); + } + builder.EndRow(); } - else - { - builder.Write(""); - } - builder.EndRow(); } #endregion } @@ -765,6 +768,13 @@ namespace FineUIPro.Web.ZHGL.Plan builder.CellFormat.Width = 300; builder.Font.Bold = true; builder.RowFormat.Height = 40; + var AQApprove = (from x in db.ActionPlan_ActionPlanListApprove + where x.ApproveMan == "905a75d6-e733-449f-9742-4dcd71e8d2e1" + select x).FirstOrDefault(); + if (AQApprove != null) + { + builder.Write(AQApprove.ApproveIdea + "\n\n"); + } builder.Write("公司安全总监/部门负责人:"); var personAQ = BLL.Person_PersonsService.GetPerson_PersonsById("905a75d6-e733-449f-9742-4dcd71e8d2e1"); //安全总监任学宁 if (!string.IsNullOrEmpty(personAQ.SignatureUrl) && File.Exists(rootPath + personAQ.SignatureUrl)) @@ -799,13 +809,17 @@ namespace FineUIPro.Web.ZHGL.Plan builder.CellFormat.Width = 300; builder.Font.Bold = true; builder.RowFormat.Height = 40; - builder.Write("公司主管生产/安全领导:"); var GSLDApprove = (from x in db.ActionPlan_ActionPlanListApprove join y in db.Person_Persons on x.ApproveMan equals y.PersonId where x.ActionPlanListId == Id && x.DepartId == BLL.Const.Depart_CompanyLeaderId select x).FirstOrDefault(); if (GSLDApprove != null) + { + builder.Write(GSLDApprove.ApproveIdea + "\n\n"); + } + builder.Write("公司主管生产/安全领导:"); + if (GSLDApprove != null) { var personGSLD = BLL.Person_PersonsService.GetPerson_PersonsById(GSLDApprove.ApproveMan); if (!string.IsNullOrEmpty(personGSLD.SignatureUrl) && File.Exists(rootPath + personGSLD.SignatureUrl))