From c7c9386c23e710cf3d612255fa7ba694b3a33ce9 Mon Sep 17 00:00:00 2001 From: edy Date: Wed, 20 Oct 2021 09:26:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=9A=E5=8A=9E=E6=A0=A1=E5=8A=9E=20?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E7=AD=BE=E7=AB=A0=E7=AD=BE=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/DispatchController.cs | 38 ++++++------ .../Views/Dispatch/Print.cshtml | 60 +++++++++++-------- 2 files changed, 53 insertions(+), 45 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs index 1a6d2db42..c27ebd42f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs @@ -232,7 +232,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { for (int i = 0; i < array.Length; i++) { - if (array[i].Trim()!="") + if (array[i].Trim() != "") { str += array[i].Substring(0, array[i].IndexOf(".")) + ","; } @@ -268,35 +268,33 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } #endregion - #region 获取校长的签名盖章 批示+时间+阅 + #region 获取校长的签名盖章+ 批示+时间+阅 //var listTaskLog = nWFTaskIBLL.GetLogList(dispatchEntity.processId); - var PrintList = nWFTaskIBLL.GetLogList(dispatchEntity.processId).OrderBy(o => o.F_CreateDate).ToList(); - var Auditlist = dispatchAuditIBLL.ReadList(keyValue); - if (PrintList.Count > 0) + var firstList = nWFTaskIBLL.GetLogList(dispatchEntity.processId).OrderBy(o => o.F_CreateDate).ToList(); + for (int i = 1; i < firstList.Count; i++) { - for (int i = 1; i < PrintList.Count; i++) + if (i == 1) { - if (i == 1) - { - dispatchEntity.Render = PrintList[i].F_Des; - ViewBag.StampImg = PrintList[i].F_StampImg; - ViewBag.SignImg = PrintList[i].F_SignImg; - } - dispatchEntity.Listarray += PrintList[i].F_CreateUserName + PrintList[i].F_CreateDate + "阅" + "&"; + dispatchEntity.Render = firstList[i].F_Des; + ViewBag.pSList += firstList[i].F_CreateUserName + firstList[i].F_CreateDate + "阅" + "&"; } } - if (Auditlist != null) + var PrintList = nWFTaskIBLL.GetLogList(dispatchEntity.processId).GroupBy(o => o.F_CreateUserName).Select(o => new { - for (int i = 0; i < Auditlist.Count; i++) + F_CreateDate = o.FirstOrDefault().F_CreateDate, + F_CreateUserName = o.FirstOrDefault().F_CreateUserName, + }); + var newList = PrintList.Where(s => PrintList.Select(mo => mo.F_CreateDate).Contains(s.F_CreateDate)).OrderBy(s => s.F_CreateDate).ToList(); + for (int i = 1; i < newList.Count; i++) + { + if (!ViewBag.pSList.Contains(newList[i].F_CreateUserName)) { - dispatchEntity.Listarray += Auditlist[i].AuditName + Auditlist[i].AuditTime + "阅" + "&"; + ViewBag.pSList += newList[i].F_CreateUserName + newList[i].F_CreateDate + "阅" + "&"; } } - dispatchEntity.Listarray = dispatchEntity.Listarray.TrimEnd('&'); - List aaList = new List(dispatchEntity.Listarray.Split('&')); - ViewBag.aaList = aaList; + ViewBag.pSList = ViewBag.pSList.TrimEnd('&'); + ViewBag.pSList = new List(ViewBag.pSList.Split('&')); #endregion - return View(dispatchEntity); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml index 82fea4558..a18e6debe 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml @@ -165,7 +165,7 @@ } .ps { - height: 500px; + height: auto; width: 90%; margin: 0 auto; } @@ -221,6 +221,10 @@ text-indent: 0; text-align: center; } + + #psMain div { + border: 0; + } @@ -234,14 +238,14 @@ 线

-
@Model.DisTitle
+
@Model.DisTitle

@Model.DisFrom

来 文 单 位

@*@Model.Copies - 份 数 *@ + 份 数 *@ @Model.DisWork @Model.DisMark @@ -266,10 +270,10 @@

@*
- - 件: @Model.AttachmentName - -
*@ + + 件: @Model.AttachmentName + +
*@
呈送意见:@Model.Render @@ -283,26 +287,30 @@

-
+
示: - - @foreach (var item in ViewBag.aaList) - { - @item - } + +
+ @foreach (var item in ViewBag.pSList) + { +
+ @item +
+ } +
-
-
    -
  • (签字):
  • -
  • -
-
    -
  • (签章):
  • -
  • -
-
+ @*
+
    +
  • (签字):
  • +
  • +
+
    +
  • (签章):
  • +
  • +
+
*@

@Model.DisOffice 收 文 单 位 @@ -312,6 +320,7 @@ @Model.DisMonth @Model.DisDay

+

@@ -322,7 +331,7 @@