From 6c467031b41063d6a3c6e19225ed76b5f6424dff Mon Sep 17 00:00:00 2001
From: dyy <18335927079@163.com>
Date: Thu, 4 Mar 2021 16:29:23 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E4=BA=BA?=
=?UTF-8?q?=E4=BA=8B=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86=EF=BC=9A=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E6=95=99=E5=B8=88=E9=94=80=E5=81=87=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../TeacherCancelLeaveManagementController.cs | 152 ++++++++++++
.../TeacherCancelLeaveManagement/Form.cshtml | 34 +++
.../TeacherCancelLeaveManagement/Form.js | 108 +++++++++
.../FormView.cshtml | 34 +++
.../TeacherCancelLeaveManagement/FormView.js | 108 +++++++++
.../TeacherCancelLeaveManagement/Index.cshtml | 46 ++++
.../TeacherCancelLeaveManagement/Index.js | 195 +++++++++++++++
.../Views/TeacherLeaveManagement/Index.js | 2 -
.../Learun.Application.Web.csproj | 11 +-
.../XmlConfig/ioc.config | 2 +
.../Learun.Application.Mapping.csproj | 1 +
.../TeacherCancelLeaveManagementMap.cs | 29 +++
.../DBModel/资产系统.PDM | 2 +-
.../Learun.Application.TwoDevelopment.csproj | 4 +
.../TeacherCancelLeaveManagementBLL.cs | 193 +++++++++++++++
.../TeacherCancelLeaveManagementEntity.cs | 100 ++++++++
.../TeacherCancelLeaveManagementIBLL.cs | 65 +++++
.../TeacherCancelLeaveManagementService.cs | 222 ++++++++++++++++++
.../Learun.Application.WorkFlow.csproj | 1 +
.../TeacherCancelLeaveManageMethod.cs | 27 +++
20 files changed, 1332 insertions(+), 4 deletions(-)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherCancelLeaveManagementController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/TeacherCancelLeaveManagementMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementService.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TeacherCancelLeaveManageMethod.cs
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherCancelLeaveManagementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherCancelLeaveManagementController.cs
new file mode 100644
index 000000000..ec30a350f
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherCancelLeaveManagementController.cs
@@ -0,0 +1,152 @@
+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-04 14:21
+ /// 描 述:教师销假管理
+ ///
+ public class TeacherCancelLeaveManagementController : MvcControllerBase
+ {
+ private TeacherCancelLeaveManagementIBLL teacherCancelLeaveManagementIBLL = new TeacherCancelLeaveManagementBLL();
+
+ #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 = teacherCancelLeaveManagementIBLL.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 TeacherCancelLeaveManagementData = teacherCancelLeaveManagementIBLL.GetTeacherCancelLeaveManagementEntity( keyValue );
+ var jsonData = new {
+ TeacherCancelLeaveManagement = TeacherCancelLeaveManagementData,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 流程实例主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormDataByProcessId(string processId)
+ {
+ var TeacherCancelLeaveManagementData = teacherCancelLeaveManagementIBLL.GetEntityByProcessId( processId );
+ var jsonData = new {
+ TeacherCancelLeaveManagement = TeacherCancelLeaveManagementData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ teacherCancelLeaveManagementIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ TeacherCancelLeaveManagementEntity entity = strEntity.ToObject();
+ entity.CheckStatus = "0";
+ teacherCancelLeaveManagementIBLL.SaveEntity(keyValue,entity);
+ return Success("保存成功!");
+ }
+ ///
+ /// 提交实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DoSubmit(string keyValue, string status, string processId)
+ {
+ teacherCancelLeaveManagementIBLL.DoSubmit(keyValue, status, processId);
+ return Success("提交成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.cshtml
new file mode 100644
index 000000000..dcee88523
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.cshtml
@@ -0,0 +1,34 @@
+@{
+ ViewBag.Title = "教师销假管理";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.js
new file mode 100644
index 000000000..c3e01e190
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.js
@@ -0,0 +1,108 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2021-03-04 14:21
+ * 描 述:教师销假管理
+ */
+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'));
+ $('#CancelLeaveType').lrDataItemSelect({ code: 'LeaveType' });
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherCancelLeaveManagement/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/TeacherCancelLeaveManagement/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 == 'TeacherCancelLeaveManagement' && 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/TeacherCancelLeaveManagement/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/TeacherCancelLeaveManagement/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.cshtml
new file mode 100644
index 000000000..58d841b3a
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.cshtml
@@ -0,0 +1,34 @@
+@{
+ ViewBag.Title = "教师销假管理";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.js
new file mode 100644
index 000000000..c3e01e190
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.js
@@ -0,0 +1,108 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2021-03-04 14:21
+ * 描 述:教师销假管理
+ */
+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'));
+ $('#CancelLeaveType').lrDataItemSelect({ code: 'LeaveType' });
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherCancelLeaveManagement/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/TeacherCancelLeaveManagement/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 == 'TeacherCancelLeaveManagement' && 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/TeacherCancelLeaveManagement/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/TeacherCancelLeaveManagement/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.cshtml
new file mode 100644
index 000000000..a3535dd6c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.cshtml
@@ -0,0 +1,46 @@
+@{
+ /**/
+
+ ViewBag.Title = "教师销假管理";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.js
new file mode 100644
index 000000000..16892a560
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.js
@@ -0,0 +1,195 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2021-03-04 14:21
+ * 描 述:教师销假管理
+ */
+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);
+ $('#CancelLeaveType').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/TeacherCancelLeaveManagement/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/TeacherCancelLeaveManagement/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/TeacherCancelLeaveManagement/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/TeacherCancelLeaveManagement/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/TeacherCancelLeaveManagement/DoSubmit', { keyValue: keyValue, status: "1", processId: processId }, function (res) {
+ refreshGirdData(res, {});
+ });
+ }
+ });
+ }
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').lrAuthorizeJfGrid({
+ url: top.$.rootUrl + '/PersonnelManagement/TeacherCancelLeaveManagement/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: "CancelLeaveType", 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: "WorkTime", width: 120, align: "left" },
+ { label: "销假事由", name: "CancelLeaveReason", width: 200, 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: 'TeacherCancelLeaveManagement',// 填写流程对应模板编号
+ 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/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Index.js
index ef57d8df4..0c35dc4aa 100644
--- 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
@@ -37,8 +37,6 @@ var bootstrap = function ($, learun) {
res = top[id].validForm();
// 保存数据
if (res) {
- //processId = learun.newGuid();
- //res = top[id].save(processId, refreshGirdData);
res = top[id].save('', function () {
page.search();
});
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 8745ef9f6..c76ec1442 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
@@ -793,6 +793,7 @@
+
@@ -1348,6 +1349,7 @@
+
@@ -6131,6 +6133,10 @@
+
+
+
+
@@ -6150,7 +6156,9 @@
Designer
-
+
+ Designer
+
Designer
@@ -6903,6 +6911,7 @@
+
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 bd1c86895..3967d5b1f 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
@@ -28,6 +28,7 @@
+
@@ -66,6 +67,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 d7dd2e3b6..71070cac0 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
@@ -545,6 +545,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/TeacherCancelLeaveManagementMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/TeacherCancelLeaveManagementMap.cs
new file mode 100644
index 000000000..114ba1c33
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/TeacherCancelLeaveManagementMap.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-04 14:21
+ /// 描 述:教师销假管理
+ ///
+ public class TeacherCancelLeaveManagementMap : EntityTypeConfiguration
+ {
+ public TeacherCancelLeaveManagementMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("TEACHERCANCELLEAVEMANAGEMENT");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
index 74305403a..313a5bbc0 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
@@ -1,5 +1,5 @@
-
+
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 97ecb448d..7444cb4da 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
@@ -1601,6 +1601,10 @@
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementBLL.cs
new file mode 100644
index 000000000..627135c0c
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementBLL.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-04 14:21
+ /// 描 述:教师销假管理
+ ///
+ public class TeacherCancelLeaveManagementBLL : TeacherCancelLeaveManagementIBLL
+ {
+ private TeacherCancelLeaveManagementService teacherCancelLeaveManagementService = new TeacherCancelLeaveManagementService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return teacherCancelLeaveManagementService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取TeacherCancelLeaveManagement表实体数据
+ ///
+ /// 主键
+ ///
+ public TeacherCancelLeaveManagementEntity GetTeacherCancelLeaveManagementEntity(string keyValue)
+ {
+ try
+ {
+ return teacherCancelLeaveManagementService.GetTeacherCancelLeaveManagementEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取主表实体数据
+ ///
+ /// 流程实例ID
+ ///
+ public TeacherCancelLeaveManagementEntity GetEntityByProcessId(string processId)
+ {
+ try
+ {
+ return teacherCancelLeaveManagementService.GetEntityByProcessId(processId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ teacherCancelLeaveManagementService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, TeacherCancelLeaveManagementEntity entity)
+ {
+ try
+ {
+ teacherCancelLeaveManagementService.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
+ {
+ teacherCancelLeaveManagementService.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
+ {
+ teacherCancelLeaveManagementService.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/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementEntity.cs
new file mode 100644
index 000000000..9607f8fe8
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementEntity.cs
@@ -0,0 +1,100 @@
+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-04 14:21
+ /// 描 述:教师销假管理
+ ///
+ public class TeacherCancelLeaveManagementEntity
+ {
+ #region 实体成员
+ ///
+ /// Id
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// 销假类型
+ ///
+ [Column("CANCELLEAVETYPE")]
+ public string CancelLeaveType { get; set; }
+ ///
+ /// 到岗时间
+ ///
+ [Column("WORKTIME")]
+ public DateTime? WorkTime { get; set; }
+ ///
+ /// 销假事由
+ ///
+ [Column("CANCELLEAVEREASON")]
+ public string CancelLeaveReason { 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; }
+ ///
+ /// 备注
+ ///
+ [Column("REMARK")]
+ public string Remark { 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/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementIBLL.cs
new file mode 100644
index 000000000..3f2e211b7
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementIBLL.cs
@@ -0,0 +1,65 @@
+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-04 14:21
+ /// 描 述:教师销假管理
+ ///
+ public interface TeacherCancelLeaveManagementIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取TeacherCancelLeaveManagement表实体数据
+ ///
+ /// 主键
+ ///
+ TeacherCancelLeaveManagementEntity GetTeacherCancelLeaveManagementEntity(string keyValue);
+ ///
+ /// 获取主表实体数据
+ ///
+ /// 流程实例ID
+ ///
+ TeacherCancelLeaveManagementEntity GetEntityByProcessId(string processId);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, TeacherCancelLeaveManagementEntity 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/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementService.cs
new file mode 100644
index 000000000..07c18835a
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementService.cs
@@ -0,0 +1,222 @@
+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-04 14:21
+ /// 描 述:教师销假管理
+ ///
+ public class TeacherCancelLeaveManagementService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT t.* ");
+ strSql.Append(" FROM TeacherCancelLeaveManagement t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["CancelLeaveType"].IsEmpty())
+ {
+ dp.Add("CancelLeaveType",queryParam["CancelLeaveType"].ToString(), DbType.String);
+ strSql.Append(" AND t.CancelLeaveType = @CancelLeaveType ");
+ }
+ if (!queryParam["CreateUserId"].IsEmpty())
+ {
+ dp.Add("CreateUserId",queryParam["CreateUserId"].ToString(), DbType.String);
+ strSql.Append(" AND t.CreateUserId = @CreateUserId ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取TeacherCancelLeaveManagement表实体数据
+ ///
+ /// 主键
+ ///
+ public TeacherCancelLeaveManagementEntity GetTeacherCancelLeaveManagementEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取主表实体数据
+ ///
+ /// 流程实例ID
+ ///
+ public TeacherCancelLeaveManagementEntity 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, TeacherCancelLeaveManagementEntity 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 TeacherCancelLeaveManagement 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 TeacherCancelLeaveManagement 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 134e18ac1..4d6976b83 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
@@ -93,6 +93,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TeacherCancelLeaveManageMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TeacherCancelLeaveManageMethod.cs
new file mode 100644
index 000000000..50c40db3b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TeacherCancelLeaveManageMethod.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 TeacherCancelLeaveManageMethod : IWorkFlowMethod
+ {
+ TeacherCancelLeaveManagementIBLL teacherCancelLeaveManagementIBLL = new TeacherCancelLeaveManagementBLL();
+
+
+ public void Execute(WfMethodParameter parameter)
+ {
+ if (parameter.code == "agree")
+ {
+ teacherCancelLeaveManagementIBLL.ChangeStatusByProcessId("2", parameter.processId, parameter.userId);
+ }
+ else
+ {
+ teacherCancelLeaveManagementIBLL.ChangeStatusByProcessId("3", parameter.processId, parameter.userId);
+ }
+ }
+ }
+}