diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherLeaveManagementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherLeaveManagementController.cs
new file mode 100644
index 000000000..5531c43fa
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherLeaveManagementController.cs
@@ -0,0 +1,155 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.PersonnelManagement;
+using System.Web.Mvc;
+using Learun.Application.TwoDevelopment.LR_CodeDemo;
+using System.Collections.Generic;
+
+namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-03-03 11:29
+ /// 描 述:教师请假管理
+ ///
+ public class TeacherLeaveManagementController : MvcControllerBase
+ {
+ private TeacherLeaveManagementIBLL teacherLeaveManagementIBLL = new TeacherLeaveManagementBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 表单页-查看
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormView()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = teacherLeaveManagementIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var TeacherLeaveManagementData = teacherLeaveManagementIBLL.GetTeacherLeaveManagementEntity(keyValue);
+ var jsonData = new
+ {
+ TeacherLeaveManagement = TeacherLeaveManagementData,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 流程实例主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormDataByProcessId(string processId)
+ {
+ var TeacherLeaveManagementData = teacherLeaveManagementIBLL.GetEntityByProcessId(processId);
+ var jsonData = new
+ {
+ TeacherLeaveManagement = TeacherLeaveManagementData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ teacherLeaveManagementIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ TeacherLeaveManagementEntity entity = strEntity.ToObject();
+ entity.CheckStatus = "0";
+ teacherLeaveManagementIBLL.SaveEntity(keyValue, entity);
+ return Success("保存成功!");
+ }
+
+ ///
+ /// 提交实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DoSubmit(string keyValue, string status, string processId)
+ {
+ teacherLeaveManagementIBLL.DoSubmit(keyValue, status, processId);
+ return Success("提交成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Form.cshtml
new file mode 100644
index 000000000..070950c1e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Form.cshtml
@@ -0,0 +1,46 @@
+@{
+ ViewBag.Title = "教师请假管理";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Form.js
new file mode 100644
index 000000000..bd1947328
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Form.js
@@ -0,0 +1,110 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2021-03-03 11:29
+ * 描 述:教师请假管理
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+// 设置权限
+var setAuthorize;
+// 设置表单数据
+var setFormData;
+// 验证数据是否填写完整
+var validForm;
+// 保存数据
+var save;
+var bootstrap = function ($, learun) {
+ "use strict";
+ // 设置权限
+ setAuthorize = function (data) {
+ if(!!data)
+ {
+ for (var field in data) {
+ if (data[field].isLook != 1) {// 如果没有查看权限就直接移除
+ $('#' + data[field].fieldId).parent().remove();
+ }
+ else {
+ if (data[field].isEdit != 1) {
+ $('#' + data[field].fieldId).attr('disabled', 'disabled');
+ if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) {
+ $('#' + data[field].fieldId).css({ 'padding-right': '58px' });
+ $('#' + data[field].fieldId).find('.btn-success').remove();
+ }
+ }
+ }
+ }
+ }
+ };
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#CreateUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
+ $('#CreateUserId').val(learun.clientdata.get(['userinfo']).realName);
+ $('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
+ $('#LeaveType').lrDataItemSelect({ code: 'LeaveType' });
+ $('#LeaveDay').lrDataItemSelect({ code: 'LeaveDay' });
+ $('#Files').lrUploader();
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetFormData?keyValue=' + keyValue, function (data) {
+ for (var id in data) {
+ if (!!data[id].length && data[id].length > 0) {
+ $('#' + id ).jfGridSet('refreshdata', data[id]);
+ }
+ else {
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ }
+ });
+ }
+ }
+ };
+ // 设置表单数据
+ setFormData = function (processId,param,callback) {
+ if (!!processId) {
+ $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetFormDataByProcessId?processId=' + processId, function (data) {
+ for (var id in data) {
+ if (!!data[id] && data[id].length > 0) {
+ $('#' + id ).jfGridSet('refreshdata', data[id]);
+ }
+ else {
+ if(id == 'TeacherLeaveManagement' && data[id] ){
+ keyValue = data[id].Id;
+ }
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ }
+ });
+ }
+ callback && callback(); }
+ // 验证数据是否填写完整
+ validForm = function () {
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ return true;
+ };
+ // 保存数据
+ save = function (processId, callBack, i) {
+ var formData = $('body').lrGetFormData();
+ if(!!processId){
+ formData.ProcessId =processId;
+ }
+ var postData = {
+ strEntity: JSON.stringify(formData)
+ };
+ $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack(res, i);
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/FormView.cshtml
new file mode 100644
index 000000000..2dd244a20
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/FormView.cshtml
@@ -0,0 +1,46 @@
+@{
+ ViewBag.Title = "教师请假管理";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherLeaveManagement/FormView.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/FormView.js
new file mode 100644
index 000000000..bd1947328
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/FormView.js
@@ -0,0 +1,110 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2021-03-03 11:29
+ * 描 述:教师请假管理
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+// 设置权限
+var setAuthorize;
+// 设置表单数据
+var setFormData;
+// 验证数据是否填写完整
+var validForm;
+// 保存数据
+var save;
+var bootstrap = function ($, learun) {
+ "use strict";
+ // 设置权限
+ setAuthorize = function (data) {
+ if(!!data)
+ {
+ for (var field in data) {
+ if (data[field].isLook != 1) {// 如果没有查看权限就直接移除
+ $('#' + data[field].fieldId).parent().remove();
+ }
+ else {
+ if (data[field].isEdit != 1) {
+ $('#' + data[field].fieldId).attr('disabled', 'disabled');
+ if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) {
+ $('#' + data[field].fieldId).css({ 'padding-right': '58px' });
+ $('#' + data[field].fieldId).find('.btn-success').remove();
+ }
+ }
+ }
+ }
+ }
+ };
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#CreateUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
+ $('#CreateUserId').val(learun.clientdata.get(['userinfo']).realName);
+ $('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
+ $('#LeaveType').lrDataItemSelect({ code: 'LeaveType' });
+ $('#LeaveDay').lrDataItemSelect({ code: 'LeaveDay' });
+ $('#Files').lrUploader();
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetFormData?keyValue=' + keyValue, function (data) {
+ for (var id in data) {
+ if (!!data[id].length && data[id].length > 0) {
+ $('#' + id ).jfGridSet('refreshdata', data[id]);
+ }
+ else {
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ }
+ });
+ }
+ }
+ };
+ // 设置表单数据
+ setFormData = function (processId,param,callback) {
+ if (!!processId) {
+ $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetFormDataByProcessId?processId=' + processId, function (data) {
+ for (var id in data) {
+ if (!!data[id] && data[id].length > 0) {
+ $('#' + id ).jfGridSet('refreshdata', data[id]);
+ }
+ else {
+ if(id == 'TeacherLeaveManagement' && data[id] ){
+ keyValue = data[id].Id;
+ }
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ }
+ });
+ }
+ callback && callback(); }
+ // 验证数据是否填写完整
+ validForm = function () {
+ if (!$('body').lrValidform()) {
+ return false;
+ }
+ return true;
+ };
+ // 保存数据
+ save = function (processId, callBack, i) {
+ var formData = $('body').lrGetFormData();
+ if(!!processId){
+ formData.ProcessId =processId;
+ }
+ var postData = {
+ strEntity: JSON.stringify(formData)
+ };
+ $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack(res, i);
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Index.cshtml
new file mode 100644
index 000000000..f1deb0dc2
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Index.cshtml
@@ -0,0 +1,50 @@
+@{
+ /**/
+
+ ViewBag.Title = "教师请假管理";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Index.js
new file mode 100644
index 000000000..0c35dc4aa
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Index.js
@@ -0,0 +1,209 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2021-03-03 11:29
+ * 描 述:教师请假管理
+ */
+var refreshGirdData;
+var bootstrap = function ($, learun) {
+ "use strict";
+ var processId = '';
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
+ page.search(queryJson);
+ }, 220, 400);
+ $('#LeaveType').lrDataItemSelect({ code: 'LeaveType' });
+ $('#CreateUserId').lrUserSelect(0);
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ // 新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/Form',
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ var res = false;
+ // 验证数据
+ res = top[id].validForm();
+ // 保存数据
+ if (res) {
+ res = top[id].save('', function () {
+ page.search();
+ });
+ }
+ return res;
+ }
+ });
+ });
+ // 编辑
+ $('#lr_edit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ if (learun.checkrow(keyValue)) {
+ var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
+ if (CheckStatus != "0") {
+ learun.alert.warning("当前项已提交!");
+ return false;
+ }
+ learun.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/Form?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ callBack: function (id) {
+ var res = false;
+ // 验证数据
+ res = top[id].validForm();
+ // 保存数据
+ if (res) {
+ res = top[id].save('', function () {
+ page.search();
+ });
+ }
+ return res;
+ }
+ });
+ }
+ });
+ // 删除
+ $('#lr_delete').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ if (learun.checkrow(keyValue)) {
+ var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
+ if (CheckStatus != "0") {
+ learun.alert.warning("当前项已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认删除该项!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/DeleteForm', { keyValue: keyValue }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
+ // 查看
+ $('#lr_view').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ if (learun.checkrow(keyValue)) {
+ learun.layerForm({
+ id: 'formview',
+ title: '查看',
+ url: top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/FormView?keyValue=' + keyValue,
+ width: 1000,
+ height: 800,
+ btn: null
+ });
+ }
+ });
+ // 提交
+ $('#lr_submit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ if (learun.checkrow(keyValue)) {
+ var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
+ if (CheckStatus != "0") {
+ learun.alert.warning("当前项已提交!");
+ return false;
+ }
+ learun.layerConfirm('是否确认提交该项!', function (res) {
+ if (res) {
+ processId = learun.newGuid();
+ learun.postForm(top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/DoSubmit', { keyValue: keyValue, status: "1", processId: processId }, function (res) {
+ refreshGirdData(res, {});
+ });
+ }
+ });
+ }
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').lrAuthorizeJfGrid({
+ url: top.$.rootUrl + '/PersonnelManagement/TeacherLeaveManagement/GetPageList',
+ headData: [
+ {
+ label: "姓名", name: "CreateUserId", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op, $cell) {
+ learun.clientdata.getAsync('user', {
+ key: value,
+ callback: function (_data) {
+ callback(_data.name);
+ }
+ });
+ }
+ },
+ { label: "填表时间", name: "CreateTime", width: 130, align: "left" },
+ { label: "联系电话", name: "Telephone", width: 100, align: "left" },
+ {
+ label: "请假种类", name: "LeaveType", width: 100, 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: "StartTime", width: 120, align: "left" },
+ { label: "结束时间", name: "EndTime", width: 120, align: "left" },
+ {
+ label: "请假天数", name: "LeaveDay", width: 100, align: "left",
+ formatterAsync: function (callback, value, row, op, $cell) {
+ learun.clientdata.getAsync('dataItem', {
+ key: value,
+ code: 'LeaveDay',
+ callback: function (_data) {
+ callback(_data.text);
+ }
+ });
+ }
+ },
+ { label: "请假事由", name: "LeaveReason", width: 150, align: "left" },
+ {
+ label: "审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) {
+ return cellvalue == "1" ? "审核中" : cellvalue == "2" ? "审核通过" : cellvalue == "3" ? "审核未通过" : "草稿";
+ }
+ },
+ ],
+ mainId: 'Id',
+ isPage: true,
+ sidx: 'CreateTime desc'
+ });
+ page.search();
+ },
+ search: function (param) {
+ param = param || {};
+ $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function (res, postData) {
+ if (!!res) {
+ if (res.code == 200) {
+ // 发起流程
+ var postData = {
+ schemeCode: 'TeacherLeaveManagement',// 填写流程对应模板编号
+ processId: processId,
+ level: '1',
+ };
+ learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
+ learun.loading(false);
+ });
+ }
+ page.search();
+ }
+ };
+ 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 c52f76814..1fd31ada0 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
@@ -495,6 +495,7 @@
+
@@ -1508,6 +1509,9 @@
+
+
+
@@ -7505,6 +7509,9 @@
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
index c5c4572c7..2c173d9c6 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
@@ -29,6 +29,7 @@
+
@@ -68,6 +69,7 @@
+
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 3c2b6c546..b1242fa9b 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
@@ -224,6 +224,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/TeacherLeaveManagementMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/TeacherLeaveManagementMap.cs
new file mode 100644
index 000000000..33c10f180
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/TeacherLeaveManagementMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.PersonnelManagement;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-03-03 11:29
+ /// 描 述:教师请假管理
+ ///
+ public class TeacherLeaveManagementMap : EntityTypeConfiguration
+ {
+ public TeacherLeaveManagementMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("TEACHERLEAVEMANAGEMENT");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #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 a13cc5c5c..994386281 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
@@ -423,6 +423,10 @@
+
+
+
+
@@ -1813,6 +1817,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherLeaveManagement/TeacherLeaveManagementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherLeaveManagement/TeacherLeaveManagementBLL.cs
new file mode 100644
index 000000000..020dd2977
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherLeaveManagement/TeacherLeaveManagementBLL.cs
@@ -0,0 +1,193 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.PersonnelManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-03-03 11:29
+ /// 描 述:教师请假管理
+ ///
+ public class TeacherLeaveManagementBLL : TeacherLeaveManagementIBLL
+ {
+ private TeacherLeaveManagementService teacherLeaveManagementService = new TeacherLeaveManagementService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return teacherLeaveManagementService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取TeacherLeaveManagement表实体数据
+ ///
+ /// 主键
+ ///
+ public TeacherLeaveManagementEntity GetTeacherLeaveManagementEntity(string keyValue)
+ {
+ try
+ {
+ return teacherLeaveManagementService.GetTeacherLeaveManagementEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取主表实体数据
+ ///
+ /// 流程实例ID
+ ///
+ public TeacherLeaveManagementEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return teacherLeaveManagementService.GetEntityByProcessId(processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ teacherLeaveManagementService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, TeacherLeaveManagementEntity entity)
+ {
+ try
+ {
+ teacherLeaveManagementService.SaveEntity(keyValue, entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 提交实体数据
+ ///
+ /// 主键
+ public void DoSubmit(string keyValue, string status, string processId)
+ {
+ try
+ {
+ teacherLeaveManagementService.DoSubmit(keyValue, status, processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 审核实体数据
+ ///
+ /// 主键
+ public void ChangeStatusByProcessId(string status, string processId, string userId)
+ {
+ try
+ {
+ teacherLeaveManagementService.ChangeStatusByProcessId(status, processId, userId);
+ }
+ 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/PersonnelManagement/TeacherLeaveManagement/TeacherLeaveManagementEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherLeaveManagement/TeacherLeaveManagementEntity.cs
new file mode 100644
index 000000000..b148888b9
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherLeaveManagement/TeacherLeaveManagementEntity.cs
@@ -0,0 +1,115 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.PersonnelManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-03-03 11:29
+ /// 描 述:教师请假管理
+ ///
+ public class TeacherLeaveManagementEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// 请假类型
+ ///
+ [Column("LEAVETYPE")]
+ public string LeaveType { get; set; }
+ ///
+ /// 请假开始时间
+ ///
+ [Column("STARTTIME")]
+ public DateTime? StartTime { get; set; }
+ ///
+ /// 请假结束时间
+ ///
+ [Column("ENDTIME")]
+ public DateTime? EndTime { get; set; }
+ ///
+ /// 请假天数
+ ///
+ [Column("LEAVEDAY")]
+ public string LeaveDay { get; set; }
+ ///
+ /// 请假事由
+ ///
+ [Column("LEAVEREASON")]
+ public string LeaveReason { get; set; }
+ ///
+ /// 联系电话
+ ///
+ [Column("TELEPHONE")]
+ public string Telephone { get; set; }
+ ///
+ /// 附件上传
+ ///
+ [Column("FILES")]
+ public string Files { get; set; }
+ ///
+ /// 申请人
+ ///
+ [Column("CREATEUSERID")]
+ public string CreateUserId { get; set; }
+ ///
+ /// 申请时间
+ ///
+ [Column("CREATETIME")]
+ public DateTime? CreateTime { get; set; }
+ ///
+ /// 审核状态(0草稿,1审核中,2审核通过,3,审核不通过)
+ ///
+ [Column("CHECKSTATUS")]
+ public string CheckStatus { get; set; }
+ ///
+ /// 审核备注
+ ///
+ [Column("CHECKREMARK")]
+ public string CheckRemark { get; set; }
+ ///
+ /// 审核人
+ ///
+ [Column("CHECKUSERID")]
+ public string CheckUserId { get; set; }
+ ///
+ /// 审核时间
+ ///
+ [Column("CHECKTIME")]
+ public DateTime? CheckTime { get; set; }
+ ///
+ /// 流程Id
+ ///
+ [Column("PROCESSID")]
+ public string ProcessId { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherLeaveManagement/TeacherLeaveManagementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherLeaveManagement/TeacherLeaveManagementIBLL.cs
new file mode 100644
index 000000000..13cefa620
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherLeaveManagement/TeacherLeaveManagementIBLL.cs
@@ -0,0 +1,66 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.PersonnelManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-03-03 11:29
+ /// 描 述:教师请假管理
+ ///
+ public interface TeacherLeaveManagementIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取TeacherLeaveManagement表实体数据
+ ///
+ /// 主键
+ ///
+ TeacherLeaveManagementEntity GetTeacherLeaveManagementEntity(string keyValue);
+ ///
+ /// 获取主表实体数据
+ ///
+ /// 流程实例ID
+ ///
+ TeacherLeaveManagementEntity GetEntityByProcessId(string processId);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, TeacherLeaveManagementEntity entity);
+
+ ///
+ /// 提交实体数据
+ ///
+ /// 主键
+ void DoSubmit(string keyValue, string status, string processId);
+ ///
+ /// 审核实体数据
+ ///
+ /// 主键
+ void ChangeStatusByProcessId(string status, string processId, string userId);
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherLeaveManagement/TeacherLeaveManagementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherLeaveManagement/TeacherLeaveManagementService.cs
new file mode 100644
index 000000000..922d5ad4e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherLeaveManagement/TeacherLeaveManagementService.cs
@@ -0,0 +1,227 @@
+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.PersonnelManagement
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-03-03 11:29
+ /// 描 述:教师请假管理
+ ///
+ public class TeacherLeaveManagementService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT t.* ");
+ strSql.Append(" FROM TeacherLeaveManagement t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["LeaveType"].IsEmpty())
+ {
+ dp.Add("LeaveType", queryParam["LeaveType"].ToString(), DbType.String);
+ strSql.Append(" AND t.LeaveType = @LeaveType ");
+ }
+ if (!queryParam["CreateUserId"].IsEmpty())
+ {
+ dp.Add("CreateUserId", queryParam["CreateUserId"].ToString(), DbType.String);
+ strSql.Append(" AND t.CreateUserId = @CreateUserId ");
+ }
+ if (!queryParam["Telephone"].IsEmpty())
+ {
+ dp.Add("Telephone", "%" + queryParam["Telephone"].ToString() + "%", DbType.String);
+ strSql.Append(" AND t.Telephone Like @Telephone ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取TeacherLeaveManagement表实体数据
+ ///
+ /// 主键
+ ///
+ public TeacherLeaveManagementEntity GetTeacherLeaveManagementEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取主表实体数据
+ ///
+ /// 流程实例ID
+ ///
+ public TeacherLeaveManagementEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(t => t.ProcessId == processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, TeacherLeaveManagementEntity entity)
+ {
+ try
+ {
+ if (!string.IsNullOrEmpty(keyValue))
+ {
+ entity.Modify(keyValue);
+ this.BaseRepository("CollegeMIS").Update(entity);
+ }
+ else
+ {
+ entity.Create();
+ this.BaseRepository("CollegeMIS").Insert(entity);
+ }
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 提交实体数据
+ ///
+ /// 主键
+ public void DoSubmit(string keyValue, string status, string processId)
+ {
+ try
+ {
+ this.BaseRepository("CollegeMIS").ExecuteBySql("update TeacherLeaveManagement set CheckStatus='" + status + "',ProcessId='" + processId + "' where Id='" + keyValue + "' ");
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 审核实体数据
+ ///
+ /// 主键
+ public void ChangeStatusByProcessId(string status, string processId, string userId)
+ {
+ try
+ {
+ this.BaseRepository("CollegeMIS").ExecuteBySql("update TeacherLeaveManagement set CheckStatus='" + status + "',CheckUserId='" + userId + "',CheckTime='" + DateTime.Now + "' where ProcessId='" + processId + "' ");
+ }
+ 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.WorkFlow/Learun.Application.WorkFlow.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj
index 328580d7e..c8a60a3ab 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj
@@ -118,6 +118,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TeacherLeaveManagementMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TeacherLeaveManagementMethod.cs
new file mode 100644
index 000000000..aabc40256
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TeacherLeaveManagementMethod.cs
@@ -0,0 +1,27 @@
+using Learun.Application.TwoDevelopment.PersonnelManagement;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Learun.Application.WorkFlow
+{
+ public class TeacherLeaveManagementMethod : IWorkFlowMethod
+ {
+ TeacherLeaveManagementIBLL teacherLeaveManagementIBLL = new TeacherLeaveManagementBLL();
+
+
+ public void Execute(WfMethodParameter parameter)
+ {
+ if (parameter.code == "agree")
+ {
+ teacherLeaveManagementIBLL.ChangeStatusByProcessId("2", parameter.processId, parameter.userId);
+ }
+ else
+ {
+ teacherLeaveManagementIBLL.ChangeStatusByProcessId("3", parameter.processId, parameter.userId);
+ }
+ }
+ }
+}