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 35bae6c8b..a580ef732 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 @@ -237,6 +237,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers //获取校长的签名盖章 批示+时间+阅 var listTaskLog = nWFTaskIBLL.GetLogList(dispatchEntity.processId); var PrintList = nWFTaskIBLL.GetLogList(dispatchEntity.processId).OrderBy(o => o.F_CreateDate).ToList(); + var Auditlist = dispatchAuditIBLL.Readlist(keyValue); if (listTaskLog.Count() > 0) { for (int i = 0; i < PrintList.Count; i++) @@ -249,29 +250,20 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } dispatchEntity.Listarray += PrintList[i].F_CreateUserName + PrintList[i].F_CreateDate + "阅" + "&"; } - dispatchEntity.Listarray = dispatchEntity.Listarray.TrimEnd('&'); - List aaList = new List(dispatchEntity.Listarray.Split('&')); - ViewBag.aaList = aaList; } - return View(dispatchEntity); - } - - /// - /// 判断是否查阅 - /// - /// - /// - [HttpPost] - [AjaxOnly] - public ActionResult IsRead(string keyValue) - { - var userInfo = LoginUserInfo.Get(); - string sss = userInfo.realName; - - //var Model = dispatchAuditIBLL.Repetition(keyValue, sss); - //this.BaseRepository("CollegeMIS").ExecuteBySql("update StuInfoFresh set OtherPayFeeStatus='1',OtherPayFeeDate='" + DateTime.Now + "' where ID='" + keyValue + "' "); + if (Auditlist != null) + { + for (int i = 0; i < Auditlist.Count; i++) + { + + dispatchEntity.Listarray += Auditlist[i].AuditUser + Auditlist[i].AuditTime + "阅" + "&"; + } + } + dispatchEntity.Listarray = dispatchEntity.Listarray.TrimEnd('&'); + List aaList = new List(dispatchEntity.Listarray.Split('&')); + ViewBag.aaList = aaList; - return Success("阅读失败!"); + return View(dispatchEntity); } /// @@ -285,11 +277,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { DispatchAuditEntity entityaudit = new DispatchAuditEntity(); var userInfo = LoginUserInfo.Get(); - entityaudit.DisId = keyValue; - entityaudit.AuditTime = DateTime.Now; - entityaudit.AuditUser = userInfo.realName; - dispatchAuditIBLL.SaveEntity("", entityaudit); - return Success("阅读成功!"); + var Model = dispatchAuditIBLL.Repetition(keyValue, userInfo.realName); + if (Model != null) + { + return Fail("请勿重复批阅!"); + } + else + { + entityaudit.DisId = keyValue; + entityaudit.AuditTime = DateTime.Now; + entityaudit.AuditUser = userInfo.realName; + dispatchAuditIBLL.SaveEntity("", entityaudit); + return Success("阅读成功!"); + } } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DispatchAudit/DispatchAuditBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DispatchAudit/DispatchAuditBLL.cs index b40e18935..ca6f12c92 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DispatchAudit/DispatchAuditBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DispatchAudit/DispatchAuditBLL.cs @@ -23,7 +23,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// 查询参数 /// - public IEnumerable GetList( string queryJson ) + public IEnumerable GetList(string queryJson) { try { @@ -145,15 +145,41 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion #region 扩展数据 + /// + /// 查阅数据 + /// + /// + /// + /// + public DispatchAuditEntity Repetition(string DisId, string Name) + { + try + { + return dispatchAuditService.Repetition(DisId, Name); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// /// /// /// 关联主键 - public void Repetition(string DisId,string Name) + public List ReadList(string DisId) { try { - dispatchAuditService.Repetition(DisId,Name); + return dispatchAuditService.ReadList(DisId); } catch (Exception ex) { @@ -167,7 +193,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } - #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DispatchAudit/DispatchAuditIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DispatchAudit/DispatchAuditIBLL.cs index 940d87d9c..b9979bbb7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DispatchAudit/DispatchAuditIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DispatchAudit/DispatchAuditIBLL.cs @@ -56,7 +56,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// /// - void Repetition(string DisId,string Name); + DispatchAuditEntity Repetition(string DisId,string Name); + + /// + /// 获取查阅数据 + /// + /// + /// + List Readlist(string DisId); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DispatchAudit/DispatchAuditService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DispatchAudit/DispatchAuditService.cs index ee420fc9a..95abdfc65 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DispatchAudit/DispatchAuditService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DispatchAudit/DispatchAuditService.cs @@ -188,15 +188,38 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 扩展数据 /// - /// 查询数据 + /// 查阅数据 /// /// /// - public void Repetition(string DisId, string Name) + public DispatchAuditEntity Repetition(string DisId, string Name) { try { - this.BaseRepository("CollegeMIS").ExecuteBySql()(DisId, Name); + return this.BaseRepository("CollegeMIS").FindEntity(x => x.DisId == DisId && x.AuditUser == Name); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取查阅数据 + /// + /// + public List ReadList(string DisId) + { + try + { + return this.BaseRepository("CollegeMIS").FindList(x => x.DisId == DisId).ToList(); } catch (Exception ex) {