From 322eca9cce8275c374d05411a003447326566bab Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 17 Jul 2023 14:46:24 +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 | 55 ++++++++++++++++++- .../ZHGL/Plan/ActionPlanList.aspx.cs | 55 ++++++++++++++++++- 2 files changed, 108 insertions(+), 2 deletions(-) diff --git a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs index c4a105dd..2db54921 100644 --- a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs @@ -564,8 +564,9 @@ namespace FineUIPro.Web.HSSE.ActionPlan { } + var approves = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == BLL.Const.ActionPlanList_Reviewing).ToList(); var ActionPlan_ActionPlanListApproveList2 = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == "6").ToList(); - if (ActionPlan_ActionPlanListApproveList2.Count > 0) + if (ActionPlan_ActionPlanListApproveList2.Count > 0 || approves.Count > 0) { #region 主要评审部门 //主要评审部门 @@ -607,6 +608,58 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.Write("评审部门负责人/日期"); builder.EndRow(); #endregion + foreach (var item in approves) + { + //部门名称 + 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 = 80; + var departModel = db.Base_Depart.FirstOrDefault(x => x.DepartId == item.DepartId); + builder.Font.Bold = false; + if (departModel != null) + { + 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 = 80; + 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 = 70; + builder.Font.Bold = false; + if (item.ApproveDate != null) + { + string personName = Person_PersonsService.GetPersonsNameById(item.ApproveMan); + builder.Write(personName + " " + item.ApproveDate.ToString().Split(' ')[0]); + } + else + { + builder.Write(""); + } + builder.EndRow(); + } foreach (var item in ActionPlan_ActionPlanListApproveList2) { //部门名称 diff --git a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs index e0c49224..e9fde409 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Plan/ActionPlanList.aspx.cs @@ -550,8 +550,9 @@ namespace FineUIPro.Web.ZHGL.Plan { } + var approves = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == BLL.Const.ActionPlanList_Reviewing).ToList(); var ActionPlan_ActionPlanListApproveList2 = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == "6").ToList(); - if (ActionPlan_ActionPlanListApproveList2.Count > 0) + if (ActionPlan_ActionPlanListApproveList2.Count > 0 || approves.Count > 0) { #region 主要评审部门 //主要评审部门 @@ -593,6 +594,58 @@ namespace FineUIPro.Web.ZHGL.Plan builder.Write("评审部门负责人/日期"); builder.EndRow(); #endregion + foreach (var item in approves) + { + //部门名称 + 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 = 80; + var departModel = db.Base_Depart.FirstOrDefault(x => x.DepartId == item.DepartId); + builder.Font.Bold = false; + if (departModel != null) + { + 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 = 80; + 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 = 70; + builder.Font.Bold = false; + if (item.ApproveDate != null) + { + string personName = Person_PersonsService.GetPersonsNameById(item.ApproveMan); + builder.Write(personName + " " + item.ApproveDate.ToString().Split(' ')[0]); + } + else + { + builder.Write(""); + } + builder.EndRow(); + } foreach (var item in ActionPlan_ActionPlanListApproveList2) { //部门名称