@@ -527,6 +527,18 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers | |||||
return Success("归档成功"); | return Success("归档成功"); | ||||
} | } | ||||
/// <summary> | |||||
/// 中层领导请假归档 | |||||
/// </summary> | |||||
/// <param name="keyValue">请假主键</param> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DoFileStudentLeaveZC(string keyValue) | |||||
{ | |||||
studentLeave_ZcIBLL.DoFile(keyValue); | |||||
return Success("归档成功"); | |||||
} | |||||
#endregion | #endregion | ||||
#region 流程API | #region 流程API | ||||
@@ -60,6 +60,7 @@ namespace Learun.Application.Web.Controllers | |||||
private ICache redisCache = CacheFactory.CaChe(); | private ICache redisCache = CacheFactory.CaChe(); | ||||
private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL(); | private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL(); | ||||
private StudentLeaveIBLL studentLeaveIBLL = new StudentLeaveBLL(); | private StudentLeaveIBLL studentLeaveIBLL = new StudentLeaveBLL(); | ||||
private StudentLeave_zcIBLL studentLeave_ZcIBLL = new StudentLeave_zcBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
public ActionResult ChangePwd() | public ActionResult ChangePwd() | ||||
@@ -493,12 +494,12 @@ namespace Learun.Application.Web.Controllers | |||||
ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId).Count(); | ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId).Count(); | ||||
//普通教师请假-未归档数 | //普通教师请假-未归档数 | ||||
ViewBag.UnfileLeave = studentLeaveIBLL.GetListWithProcess("{\"F_IsFinished\":\"1\",\"F_CreateUserName\":\"" + userinfo.userId + "\"}").Where(x => x.FileStatus != "1").Count(); | ViewBag.UnfileLeave = studentLeaveIBLL.GetListWithProcess("{\"F_IsFinished\":\"1\",\"F_CreateUserName\":\"" + userinfo.userId + "\"}").Where(x => x.FileStatus != "1").Count(); | ||||
//中层领导请假-未归档数 | |||||
ViewBag.UnfileLeaveZC = studentLeave_ZcIBLL.GetListWithProcess("{\"F_IsFinished\":\"1\",\"F_CreateUserName\":\"" + userinfo.userId + "\"}").Where(x => x.FileStatus != "1").Count(); | |||||
ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail + ViewBag.UnfileLeave; | |||||
ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail + ViewBag.UnfileLeave + ViewBag.UnfileLeaveZC; | |||||
#endregion | #endregion | ||||
//获取在线用户人数 | //获取在线用户人数 | ||||
ViewBag.OnlineUserNum = 0; | ViewBag.OnlineUserNum = 0; | ||||
var onlineUserResult = sys_UpdateRecordIBLL.GetOnlineUserNum(); | var onlineUserResult = sys_UpdateRecordIBLL.GetOnlineUserNum(); | ||||
@@ -42,6 +42,7 @@ | |||||
<li><a href="javascript:void(0);" id="btn_gongwen2"><i class="fa fa-anchor"></i>未批改作业 1 条</a></li> | <li><a href="javascript:void(0);" id="btn_gongwen2"><i class="fa fa-anchor"></i>未批改作业 1 条</a></li> | ||||
<li><a href="javascript:void(0);" id="btn_gongwen3"><i class="fa fa-balance-scale"></i>备课任务 0 条</a></li>*@ | <li><a href="javascript:void(0);" id="btn_gongwen3"><i class="fa fa-balance-scale"></i>备课任务 0 条</a></li>*@ | ||||
<li><a href="javascript:void(0);" id="btn_studentleave"><i class="fa fa-tag"></i>教师请假归档 @ViewBag.UnfileLeave 条</a></li> | <li><a href="javascript:void(0);" id="btn_studentleave"><i class="fa fa-tag"></i>教师请假归档 @ViewBag.UnfileLeave 条</a></li> | ||||
<li><a href="javascript:void(0);" id="btn_studentleavezc"><i class="fa fa-tag"></i>中层请假归档 @ViewBag.UnfileLeaveZC 条</a></li> | |||||
<li> 共 @ViewBag.UnreadNum 条</li> | <li> 共 @ViewBag.UnreadNum 条</li> | ||||
</ul> | </ul> | ||||
</div> | </div> | ||||
@@ -647,6 +647,17 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
}); | }); | ||||
//中层请假归档 | |||||
$("#btn_studentleavezc").on('click', | |||||
function () { | |||||
learun.frameTab.open({ | |||||
F_ModuleId: '106', | |||||
F_Icon: 'fa fa-user', | |||||
F_FullName: '中层领导请假归档', | |||||
F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/LeaderLeaveFiling' | |||||
}); | |||||
}); | |||||
// 打开关闭聊天窗 | // 打开关闭聊天窗 | ||||
$('.lr-im-bell').off('click').on('click', function () { | $('.lr-im-bell').off('click').on('click', function () { | ||||
var $this = $(this); | var $this = $(this); | ||||
@@ -67,6 +67,30 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取列表分页数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">条件参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StudentLeave_zcEntity> GetListWithProcess(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return studentLeave_zcService.GetListWithProcess(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取实体数据 | /// 获取实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -142,6 +166,29 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 归档 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DoFile(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
studentLeave_zcService.DoFile(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -104,6 +104,12 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager | |||||
/// <returns></returns> | /// <returns></returns> | ||||
[Column("LEAVEDAY")] | [Column("LEAVEDAY")] | ||||
public string LeaveDay { get; set; } | public string LeaveDay { get; set; } | ||||
/// <summary> | |||||
/// 归档状态(1已归档) | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("FILESTATUS")] | |||||
public string FileStatus { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -28,6 +28,14 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager | |||||
/// <param name="queryJson">查询参数</param> | /// <param name="queryJson">查询参数</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<StudentLeave_zcEntity> GetPageList(Pagination pagination, string queryJson); | IEnumerable<StudentLeave_zcEntity> GetPageList(Pagination pagination, string queryJson); | ||||
/// <summary> | |||||
/// 获取列表分页数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">条件参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<StudentLeave_zcEntity> GetListWithProcess(string queryJson); | |||||
/// <summary> | /// <summary> | ||||
/// 获取实体数据 | /// 获取实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -49,6 +57,12 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <param name="entity">实体</param> | /// <param name="entity">实体</param> | ||||
void SaveEntity(string keyValue, StudentLeave_zcEntity entity); | void SaveEntity(string keyValue, StudentLeave_zcEntity entity); | ||||
/// <summary> | |||||
/// 归档 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DoFile(string keyValue); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -148,6 +148,73 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取列表分页数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">条件参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<StudentLeave_zcEntity> GetListWithProcess(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT t.* "); | |||||
strSql.Append(" FROM StudentLeave_zc t left join LR_NWF_Process p on t.SLId=p.F_Id where p.F_EnabledMark!=2 and p.F_IsChild=0 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["F_IsFinished"].IsEmpty()) | |||||
{ | |||||
dp.Add("F_IsFinished", queryParam["F_IsFinished"].ToString(), DbType.String); | |||||
strSql.Append(" and p.F_IsFinished=@F_IsFinished "); | |||||
} | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND ( t.F_CreateDate >= @startTime AND t.F_CreateDate <= @endTime ) "); | |||||
} | |||||
if (!queryParam["F_CreateUserName"].IsEmpty()) | |||||
{ | |||||
var arr = queryParam["F_CreateUserName"].ToString().Split(','); | |||||
var arrtemp = ""; | |||||
foreach (var item in arr) | |||||
{ | |||||
arrtemp += $"'{item}',"; | |||||
} | |||||
arrtemp = arrtemp.TrimEnd(','); | |||||
strSql.Append($" and t.F_CreateUserName in ({arrtemp}) "); | |||||
} | |||||
if (!queryParam["F_BuMen"].IsEmpty()) | |||||
{ | |||||
dp.Add("F_BuMen", queryParam["F_BuMen"].ToString(), DbType.String); | |||||
strSql.Append(" and t.F_BuMen=@F_BuMen "); | |||||
} | |||||
if (!queryParam["F_QJType"].IsEmpty()) | |||||
{ | |||||
dp.Add("F_QJType", queryParam["F_QJType"].ToString(), DbType.String); | |||||
strSql.Append(" and t.F_QJType=@F_QJType "); | |||||
} | |||||
if (!queryParam["F_Description"].IsEmpty()) | |||||
{ | |||||
dp.Add("F_Description", "%" + queryParam["F_Description"].ToString() + "%", DbType.String); | |||||
strSql.Append(" and t.F_Description like @F_Description "); | |||||
} | |||||
return this.BaseRepository().FindList<StudentLeave_zcEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取实体数据 | /// 获取实体数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -232,6 +299,29 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 归档 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DoFile(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository().ExecuteBySql("update StudentLeave_zc set FileStatus='1' where SLId='" + keyValue + "' "); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||