@@ -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<string> aaList = new List<string>(dispatchEntity.Listarray.Split('&')); | |||
ViewBag.aaList = aaList; | |||
} | |||
return View(dispatchEntity); | |||
} | |||
/// <summary> | |||
/// 判断是否查阅 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[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<string> aaList = new List<string>(dispatchEntity.Listarray.Split('&')); | |||
ViewBag.aaList = aaList; | |||
return Success("阅读失败!"); | |||
return View(dispatchEntity); | |||
} | |||
/// <summary> | |||
@@ -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 | |||
@@ -23,7 +23,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<DispatchAuditEntity> GetList( string queryJson ) | |||
public IEnumerable<DispatchAuditEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
@@ -145,15 +145,41 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 查阅数据 | |||
/// </summary> | |||
/// <param name="DisId"></param> | |||
/// <param name="Name"></param> | |||
/// <returns></returns> | |||
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); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="DisId">关联主键</param> | |||
public void Repetition(string DisId,string Name) | |||
public List<DispatchAuditEntity> 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 | |||
} | |||
} |
@@ -56,7 +56,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
/// <param name="DisId"></param> | |||
/// <param name="Name"></param> | |||
void Repetition(string DisId,string Name); | |||
DispatchAuditEntity Repetition(string DisId,string Name); | |||
/// <summary> | |||
/// 获取查阅数据 | |||
/// </summary> | |||
/// <param name="DisId"></param> | |||
/// <param name="Name"></param> | |||
List<DispatchAuditEntity> Readlist(string DisId); | |||
} | |||
} |
@@ -188,15 +188,38 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 查询数据 | |||
/// 查阅数据 | |||
/// </summary> | |||
/// <param name="DisId"></param> | |||
/// <param name="Name"></param> | |||
public void Repetition(string DisId, string Name) | |||
public DispatchAuditEntity Repetition(string DisId, string Name) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql()<DispatchAuditEntity>(DisId, Name); | |||
return this.BaseRepository("CollegeMIS").FindEntity<DispatchAuditEntity>(x => x.DisId == DisId && x.AuditUser == Name); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取查阅数据 | |||
/// </summary> | |||
/// <param name="DisId"></param> | |||
public List<DispatchAuditEntity> ReadList(string DisId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<DispatchAuditEntity>(x => x.DisId == DisId).ToList(); | |||
} | |||
catch (Exception ex) | |||
{ | |||