From 608cc77e893cc355298b84d0e2a88973b98c8f90 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Fri, 28 May 2021 12:29:06 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E4=B8=AD?= =?UTF-8?q?=E5=B1=82=E9=A2=86=E5=AF=BC=E8=AF=B7=E5=81=87=E5=BD=92=E6=A1=A3?= =?UTF-8?q?=E6=8F=90=E9=86=92=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/NWFProcessController.cs | 12 +++ .../Controllers/HomeController.cs | 7 +- .../Views/Home/AdminDefault.cshtml | 1 + .../Views/Home/AdminDefault/index.js | 11 +++ .../StudentLeave_zc/StudentLeave_zcBLL.cs | 47 ++++++++++ .../StudentLeave_zc/StudentLeave_zcEntity.cs | 6 ++ .../StudentLeave_zc/StudentLeave_zcIBLL.cs | 14 +++ .../StudentLeave_zc/StudentLeave_zcService.cs | 90 +++++++++++++++++++ 8 files changed, 185 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs index b44894195..6f111c79a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs @@ -527,6 +527,18 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers return Success("归档成功"); } + /// + /// 中层领导请假归档 + /// + /// 请假主键 + [HttpPost] + [AjaxOnly] + public ActionResult DoFileStudentLeaveZC(string keyValue) + { + studentLeave_ZcIBLL.DoFile(keyValue); + return Success("归档成功"); + } + #endregion #region 流程API diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs index 9d6a082a7..e43c5c53e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs @@ -60,6 +60,7 @@ namespace Learun.Application.Web.Controllers private ICache redisCache = CacheFactory.CaChe(); private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL(); private StudentLeaveIBLL studentLeaveIBLL = new StudentLeaveBLL(); + private StudentLeave_zcIBLL studentLeave_ZcIBLL = new StudentLeave_zcBLL(); #region 视图功能 public ActionResult ChangePwd() @@ -493,12 +494,12 @@ namespace Learun.Application.Web.Controllers 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.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 - //获取在线用户人数 ViewBag.OnlineUserNum = 0; var onlineUserResult = sys_UpdateRecordIBLL.GetOnlineUserNum(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml index b60bf188e..7492fde31 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml @@ -42,6 +42,7 @@
  • 未批改作业 1 条
  • 备课任务 0 条
  • *@
  • 教师请假归档 @ViewBag.UnfileLeave 条
  • +
  • 中层请假归档 @ViewBag.UnfileLeaveZC 条
  •           共 @ViewBag.UnreadNum 条
  • diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js index 94f094101..27643b86a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js @@ -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 () { var $this = $(this); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcBLL.cs index 591d4ddcd..3e9a2eaa2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcBLL.cs @@ -67,6 +67,30 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager } } + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable GetListWithProcess(string queryJson) + { + try + { + return studentLeave_zcService.GetListWithProcess(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取实体数据 /// @@ -142,6 +166,29 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager } } + /// + /// 归档 + /// + /// 主键 + public void DoFile(string keyValue) + { + try + { + studentLeave_zcService.DoFile(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcEntity.cs index d5b8d890f..d8ecfb91c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcEntity.cs @@ -104,6 +104,12 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager /// [Column("LEAVEDAY")] public string LeaveDay { get; set; } + /// + /// 归档状态(1已归档) + /// + /// + [Column("FILESTATUS")] + public string FileStatus { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcIBLL.cs index 9a56d1739..84d55e1c8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcIBLL.cs @@ -28,6 +28,14 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + IEnumerable GetListWithProcess(string queryJson); /// /// 获取实体数据 /// @@ -49,6 +57,12 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager /// 主键 /// 实体 void SaveEntity(string keyValue, StudentLeave_zcEntity entity); + + /// + /// 归档 + /// + /// 主键 + void DoFile(string keyValue); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcService.cs index a13318c64..7911e2948 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcService.cs @@ -148,6 +148,73 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager } } + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable 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(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取实体数据 /// @@ -232,6 +299,29 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager } } + /// + /// 归档 + /// + /// 主键 + 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 }