From 63abac311d1b405b7db9826bfd9cfe3f9acf02f2 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Thu, 27 May 2021 17:58:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E8=AF=B7=E5=81=87=E5=BD=92=E6=A1=A3=EF=BC=9B=E8=AF=B7=E5=81=87?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E7=9B=91=E6=8E=A7=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/NWFProcessController.cs | 42 ++++ .../Views/NWFProcess/LeaderLeaveFiling.cshtml | 58 +++++ .../Views/NWFProcess/LeaderLeaveFiling.js | 218 ++++++++++++++++ .../LeaderLeaveFilingMonitor.cshtml | 66 +++++ .../NWFProcess/LeaderLeaveFilingMonitor.js | 187 ++++++++++++++ .../NWFProcess/LeaveFilingMonitor.cshtml | 66 +++++ .../Views/NWFProcess/LeaveFilingMonitor.js | 187 ++++++++++++++ .../Learun.Application.Web.csproj | 6 + .../LR_LGManager/StudentLeave_zcMap.cs | 28 +++ .../Learun.Application.Mapping.csproj | 1 + .../StudentLeave_zc/StudentLeave_zcBLL.cs | 148 +++++++++++ .../StudentLeave_zc/StudentLeave_zcEntity.cs | 131 ++++++++++ .../StudentLeave_zc/StudentLeave_zcIBLL.cs | 55 ++++ .../StudentLeave_zc/StudentLeave_zcService.cs | 238 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 15 files changed, 1435 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFiling.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFiling.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFilingMonitor.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFilingMonitor.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFilingMonitor.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFilingMonitor.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/StudentLeave_zcMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcService.cs 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 cbab26515..b44894195 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 @@ -27,6 +27,7 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers private UserIBLL userIbll = new UserBLL(); private UserRelationIBLL userRelationIBLL = new UserRelationBLL(); private StudentLeaveIBLL studentLeaveIBLL = new StudentLeaveBLL(); + private StudentLeave_zcIBLL studentLeave_ZcIBLL = new StudentLeave_zcBLL(); #region 视图功能 /// @@ -298,6 +299,25 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers return View(); } + /// + /// 中层领导请假归档 + /// + /// + [HttpGet] + public ActionResult LeaderLeaveFiling() + { + return View(); + } + /// + /// 中层领导请假流程监控 + /// + /// + [HttpGet] + public ActionResult LeaderLeaveFilingMonitor() + { + return View(); + } + #endregion @@ -458,6 +478,28 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers }; return Success(jsonData); } + + /// + /// 获取中层领导请假归档列表 + /// + /// + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetLeaderLeaveList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var list = studentLeave_ZcIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = list, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records, + }; + return Success(jsonData); + } #endregion #region 保存更新删除 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFiling.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFiling.cshtml new file mode 100644 index 000000000..d4a8411fe --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFiling.cshtml @@ -0,0 +1,58 @@ +@{ + ViewBag.Title = "中层领导请假归档"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
姓名
+
+
+
+
所属部门
+
+
+
+
请假类型
+
+
+
+
请假事由
+ +
+
+
+
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFiling.js") + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFiling.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFiling.js new file mode 100644 index 000000000..12c95d8ca --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFiling.js @@ -0,0 +1,218 @@ +/* + * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人:力软-前端开发组 + * 日 期:2021.05.18 + * 描 述:中层领导请假归档 + */ +var bootstrap = function ($, learun) { + "use strict"; + var categoryId = '1'; + var logbegin = ''; + var logend = ''; + + var page = { + init: function () { + $('#lr_verify').hide(); + page.initGrid(); + page.bind(); + }, + bind: function () { + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + selectfn: function (begin, end) { + logbegin = begin; + logend = end; + page.search(); + } + }); + // 查询 + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#F_CreateUserName').lrUserSelect(1); + $('#F_QJType').lrDataItemSelect({ code: 'LeaveType' }); + $('#F_BuMen').lrselect({ + type: 'tree', + // 展开最大高度 + maxHeight: 200, + // 是否允许搜索 + allowSearch: true, + // 访问数据接口地址 + url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看 + $('#lr_eye').on('click', function () { + page.eye(); + }); + // 归档 + $('#lr_file').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SLId'); + if (learun.checkrow(keyValue)) { + var FileStatus = $('#gridtable').jfGridValue('FileStatus'); + if (FileStatus == 1) { + learun.alert.warning("当前项已归档!"); + return false; + } + learun.layerConfirm('是否确认归档该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/DoFileStudentLeaveZC', { keyValue: keyValue }, function () { + page.search(); + }); + } + }); + } + }); + }, + initleft: function () { + $('#lr_left_list li').on('click', function () { + var $this = $(this); + var $parent = $this.parent(); + $parent.find('.active').removeClass('active'); + $this.addClass('active'); + categoryId = $this.attr('data-value'); + if (categoryId == 3) { + categoryId = 1; + F_EnabledMark = true; + } else { + F_EnabledMark = false; + } + page.search(); + }); + }, + initGrid: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetLeaderLeaveList', + headData: [ + { + label: '开始时间', name: 'StartDate', width: 140, align: "left", formatter: function (cellvalue, row) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { + label: '上下午', name: 'F_shangxiawu', width: 60, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'sxw', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: '结束时间', name: 'EndDate', width: 140, align: "left", formatter: function (cellvalue, row) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { + label: '上下午', name: 'F_sxw', width: 60, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'sxw', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: '姓名', name: 'F_CreateUserName', width: 80, align: "left", + formatterAsync: function (callback, value, row) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (item) { + callback(item.name); + } + }); + } + }, + { + label: '所属部门', name: 'F_BuMen', width: 120, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { label: '请假天数', name: 'F_tianshu', width: 60, align: "left" }, + { + label: '请假类型', name: 'F_QJType', width: 80, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'LeaveType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: '请假事由', name: 'F_Description', width: 80, align: "left" }, + { + label: '归档状态', name: 'FileStatus', width: 80, align: "left", formatter: function (cellvalue) { + if (cellvalue == 1) { + return "已归档"; + } else { + return "未归档"; + } + } + }, + ], + mainId: 'SLId', + isPage: true, + sidx: 'F_CreateDate DESC', + dblclick: function () { + page.eye(); + } + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = logbegin; + param.EndTime = logend; + param.F_IsFinished = 1; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + }, + eye: function () { + var processId = $('#gridtable').jfGridValue('SLId') || ''; + var title = $('#gridtable').jfGridValue('F_Description'); + + if (learun.checkrow(processId)) { + learun.frameTab.open({ F_ModuleId: 'monitor' + processId, F_FullName: '查看-' + title, F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId }); + } + } + }; + + page.init(); +} + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFilingMonitor.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFilingMonitor.cshtml new file mode 100644 index 000000000..fa410eb4c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFilingMonitor.cshtml @@ -0,0 +1,66 @@ +@{ + ViewBag.Title = "中层领导请假流程监控"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
    +
  • 未完成
  • +
  • 已完成
  • +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
姓名
+
+
+
+
所属部门
+
+
+
+
请假类型
+
+
+
+
请假事由
+ +
+
+
+
+
+
+
+ +
+
+  查看 +
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFilingMonitor.js") + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFilingMonitor.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFilingMonitor.js new file mode 100644 index 000000000..bb4040b2c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaderLeaveFilingMonitor.js @@ -0,0 +1,187 @@ +/* + * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人:力软-前端开发组 + * 日 期:2018.12.19 + * 描 述:中层领导请假流程监控 + */ +var bootstrap = function ($, learun) { + "use strict"; + var categoryId = '0'; + var logbegin = ''; + var logend = ''; + + var page = { + init: function () { + $('#lr_verify').hide(); + page.initleft(); + page.initGrid(); + page.bind(); + }, + bind: function () { + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + selectfn: function (begin, end) { + logbegin = begin; + logend = end; + page.search(); + } + }); + // 查询 + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#F_CreateUserName').lrUserSelect(1); + $('#F_QJType').lrDataItemSelect({ code: 'LeaveType' }); + $('#F_BuMen').lrselect({ + type: 'tree', + // 展开最大高度 + maxHeight: 200, + // 是否允许搜索 + allowSearch: true, + // 访问数据接口地址 + url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看 + $('#lr_eye').on('click', function () { + page.eye(); + }); + + }, + initleft: function () { + $('#lr_left_list li').on('click', function () { + var $this = $(this); + var $parent = $this.parent(); + $parent.find('.active').removeClass('active'); + $this.addClass('active'); + categoryId = $this.attr('data-value'); + page.search(); + }); + }, + initGrid: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetLeaderLeaveList', + headData: [ + { + label: '开始时间', name: 'StartDate', width: 140, align: "left", formatter: function (cellvalue, row) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { + label: '上下午', name: 'F_shangxiawu', width: 60, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'sxw', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: '结束时间', name: 'EndDate', width: 140, align: "left", formatter: function (cellvalue, row) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { + label: '上下午', name: 'F_sxw', width: 60, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'sxw', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: '姓名', name: 'F_CreateUserName', width: 80, align: "left", + formatterAsync: function (callback, value, row) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (item) { + callback(item.name); + } + }); + } + }, + { + label: '所属部门', name: 'F_BuMen', width: 120, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { label: '请假天数', name: 'F_tianshu', width: 60, align: "left" }, + { + label: '请假类型', name: 'F_QJType', width: 80, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'LeaveType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: '请假事由', name: 'F_Description', width: 80, align: "left" }, + ], + mainId: 'SLId', + isPage: true, + sidx: 'F_CreateDate DESC', + dblclick: function () { + page.eye(); + } + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = logbegin; + param.EndTime = logend; + param.F_IsFinished = categoryId; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + }, + eye: function () { + var processId = $('#gridtable').jfGridValue('SLId') || ''; + var title = $('#gridtable').jfGridValue('F_Description'); + + if (learun.checkrow(processId)) { + learun.frameTab.open({ F_ModuleId: 'monitor' + processId, F_FullName: '查看-' + title, F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId }); + } + } + }; + + page.init(); +} + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFilingMonitor.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFilingMonitor.cshtml new file mode 100644 index 000000000..27aa6a7ce --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFilingMonitor.cshtml @@ -0,0 +1,66 @@ +@{ + ViewBag.Title = "普通教师请假流程监控"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
    +
  • 未完成
  • +
  • 已完成
  • +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
姓名
+
+
+
+
所属部门
+
+
+
+
请假类型
+
+
+
+
请假事由
+ +
+
+
+
+
+
+
+ +
+
+  查看 +
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFilingMonitor.js") + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFilingMonitor.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFilingMonitor.js new file mode 100644 index 000000000..28c3eb194 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFilingMonitor.js @@ -0,0 +1,187 @@ +/* + * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2018 上海力软信息技术有限公司 + * 创建人:力软-前端开发组 + * 日 期:2018.12.19 + * 描 述:普通教师请假流程监控 + */ +var bootstrap = function ($, learun) { + "use strict"; + var categoryId = '0'; + var logbegin = ''; + var logend = ''; + + var page = { + init: function () { + $('#lr_verify').hide(); + page.initleft(); + page.initGrid(); + page.bind(); + }, + bind: function () { + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + selectfn: function (begin, end) { + logbegin = begin; + logend = end; + page.search(); + } + }); + // 查询 + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#F_CreateUserName').lrUserSelect(1); + $('#F_QJType').lrDataItemSelect({ code: 'LeaveType' }); + $('#F_BuMen').lrselect({ + type: 'tree', + // 展开最大高度 + maxHeight: 200, + // 是否允许搜索 + allowSearch: true, + // 访问数据接口地址 + url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看 + $('#lr_eye').on('click', function () { + page.eye(); + }); + + }, + initleft: function () { + $('#lr_left_list li').on('click', function () { + var $this = $(this); + var $parent = $this.parent(); + $parent.find('.active').removeClass('active'); + $this.addClass('active'); + categoryId = $this.attr('data-value'); + page.search(); + }); + }, + initGrid: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetLeaveList', + headData: [ + { + label: '开始时间', name: 'StartDate', width: 140, align: "left", formatter: function (cellvalue, row) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { + label: '上下午', name: 'F_shangxiawu', width: 60, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'sxw', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: '结束时间', name: 'EndDate', width: 140, align: "left", formatter: function (cellvalue, row) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { + label: '上下午', name: 'F_sxw', width: 60, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'sxw', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: '姓名', name: 'F_CreateUserName', width: 80, align: "left", + formatterAsync: function (callback, value, row) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (item) { + callback(item.name); + } + }); + } + }, + { + label: '所属部门', name: 'F_BuMen', width: 120, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { label: '请假天数', name: 'F_tianshu', width: 60, align: "left" }, + { + label: '请假类型', name: 'F_QJType', width: 80, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'LeaveType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: '请假事由', name: 'F_Description', width: 80, align: "left" }, + ], + mainId: 'SLId', + isPage: true, + sidx: 'F_CreateDate DESC', + dblclick: function () { + page.eye(); + } + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = logbegin; + param.EndTime = logend; + param.F_IsFinished = categoryId; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + }, + eye: function () { + var processId = $('#gridtable').jfGridValue('SLId') || ''; + var title = $('#gridtable').jfGridValue('F_Description'); + + if (learun.checkrow(processId)) { + learun.frameTab.open({ F_ModuleId: 'monitor' + processId, F_FullName: '查看-' + title, F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId }); + } + } + }; + + page.init(); +} + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 175325695..0d5bc76a6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1298,6 +1298,9 @@ + + + @@ -7260,6 +7263,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/StudentLeave_zcMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/StudentLeave_zcMap.cs new file mode 100644 index 000000000..a26ca578b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_LGManager/StudentLeave_zcMap.cs @@ -0,0 +1,28 @@ +using Learun.Application.TwoDevelopment.LR_LGManager; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-27 12:11 + /// 描 述:流程_中层请假表 + /// + public class StudentLeave_zcMap : EntityTypeConfiguration + { + public StudentLeave_zcMap() + { + #region 表、主键 + //表 + this.ToTable("STUDENTLEAVE_ZC"); + //主键 + this.HasKey(t => t.SLId); + #endregion + + #region 配置关系 + #endregion + } + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 1b5c35fdf..916362e59 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -138,6 +138,7 @@ + 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 new file mode 100644 index 000000000..591d4ddcd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcBLL.cs @@ -0,0 +1,148 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LR_LGManager +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-27 12:11 + /// 描 述:流程_中层请假表 + /// + public class StudentLeave_zcBLL : StudentLeave_zcIBLL + { + private StudentLeave_zcService studentLeave_zcService = new StudentLeave_zcService(); + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + return studentLeave_zcService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return studentLeave_zcService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public StudentLeave_zcEntity GetEntity(string keyValue) + { + try + { + return studentLeave_zcService.GetEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + studentLeave_zcService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, StudentLeave_zcEntity entity) + { + try + { + studentLeave_zcService.SaveEntity(keyValue, entity); + } + 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 new file mode 100644 index 000000000..d5b8d890f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcEntity.cs @@ -0,0 +1,131 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.LR_LGManager + +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-27 12:11 + /// 描 述:流程_中层请假表 + /// + public class StudentLeave_zcEntity + { + #region 实体成员 + /// + /// SLId + /// + /// + [Column("SLID")] + public string SLId { get; set; } + /// + /// 创建人ID + /// + /// + [Column("F_CREATEUSERID")] + public string F_CreateUserId { get; set; } + /// + /// 创建人 + /// + /// + [Column("F_CREATEUSERNAME")] + public string F_CreateUserName { get; set; } + /// + /// 创建时间 + /// + /// + [Column("F_CREATEDATE")] + public DateTime? F_CreateDate { get; set; } + /// + /// 备注 + /// + /// + [Column("F_DESCRIPTION")] + public string F_Description { get; set; } + /// + /// 开始时间 + /// + /// + [Column("STARTDATE")] + public DateTime? StartDate { get; set; } + /// + /// 结束时间 + /// + /// + [Column("ENDDATE")] + public DateTime? EndDate { get; set; } + /// + /// 请假类型 + /// + /// + [Column("F_QJTYPE")] + public string F_QJType { get; set; } + /// + /// 所属部门 + /// + /// + [Column("F_BUMEN")] + public string F_BuMen { get; set; } + /// + /// 请假天数 + /// + /// + [Column("F_TIANSHU")] + public string F_tianshu { get; set; } + /// + /// 资料上传 + /// + /// + [Column("F_FUJIAN")] + public string F_fujian { get; set; } + /// + /// 上下午(开始时间) + /// + /// + [Column("F_SHANGXIAWU")] + public string F_shangxiawu { get; set; } + /// + /// 上下午(结束时间) + /// + /// + [Column("F_SXW")] + public string F_sxw { get; set; } + /// + /// 当前角色 + /// + /// + [Column("F_DQJS")] + public string F_dqjs { get; set; } + /// + /// LeaveDay + /// + /// + [Column("LEAVEDAY")] + public string LeaveDay { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.SLId = Guid.NewGuid().ToString(); + this.F_CreateDate = DateTime.Now; + UserInfo userInfo = LoginUserInfo.Get(); + this.F_CreateUserId = userInfo.userId; + this.F_CreateUserName = userInfo.realName; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.SLId = keyValue; + } + #endregion + } +} 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 new file mode 100644 index 000000000..9a56d1739 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcIBLL.cs @@ -0,0 +1,55 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.LR_LGManager +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-27 12:11 + /// 描 述:流程_中层请假表 + /// + public interface StudentLeave_zcIBLL + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList(string queryJson); + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取实体数据 + /// + /// 主键 + /// + StudentLeave_zcEntity GetEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, StudentLeave_zcEntity entity); + #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 new file mode 100644 index 000000000..a13318c64 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave_zc/StudentLeave_zcService.cs @@ -0,0 +1,238 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.LR_LGManager +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-27 12:11 + /// 描 述:流程_中层请假表 + /// + public class StudentLeave_zcService : RepositoryFactory + { + #region 构造函数和属性 + + private string fieldSql; + /// + /// 构造方法 + /// + public StudentLeave_zcService() + { + fieldSql = @" + t.SLId, + t.F_CreateUserId, + t.F_CreateUserName, + t.F_CreateDate, + t.F_Description, + t.StartDate, + t.EndDate, + t.F_QJType, + t.F_BuMen, + t.F_tianshu, + t.F_fujian, + t.F_shangxiawu, + t.F_sxw, + t.F_dqjs, + t.LeaveDay + "; + } + #endregion + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 条件参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + //参考写法 + //var queryParam = queryJson.ToJObject(); + // 虚拟参数 + //var dp = new DynamicParameters(new { }); + //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM StudentLeave_zc t "); + return this.BaseRepository().FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable GetPageList(Pagination pagination, 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, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public StudentLeave_zcEntity GetEntity(string keyValue) + { + try + { + return this.BaseRepository().FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository().Delete(t => t.SLId == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, StudentLeave_zcEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository().Update(entity); + } + else + { + entity.Create(); + this.BaseRepository().Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 5190b7dbf..816d1c022 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -273,6 +273,10 @@ + + + + From e6b7590b7fdb4b7c9e3d66c2179161fcfe73fbbf Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Thu, 27 May 2021 18:03:34 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.Web/Learun.Application.Web.csproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 9130d92fc..2207b7b3e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1302,10 +1302,13 @@ + + + @@ -7268,6 +7271,9 @@ + + + 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 3/3] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E4=B8=AD=E5=B1=82=E9=A2=86=E5=AF=BC=E8=AF=B7=E5=81=87=E5=BD=92?= =?UTF-8?q?=E6=A1=A3=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 }