Parcourir la source

【增加】人事信息管理:增加教师销假管理;

西昌缴费二期
dyy il y a 3 ans
Parent
révision
6c467031b4
20 fichiers modifiés avec 1332 ajouts et 4 suppressions
  1. +152
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherCancelLeaveManagementController.cs
  2. +34
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.cshtml
  3. +108
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.js
  4. +34
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.cshtml
  5. +108
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.js
  6. +46
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.cshtml
  7. +195
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.js
  8. +0
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Index.js
  9. +10
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  10. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
  11. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  12. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/TeacherCancelLeaveManagementMap.cs
  13. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
  14. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  15. +193
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementBLL.cs
  16. +100
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementEntity.cs
  17. +65
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementIBLL.cs
  18. +222
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementService.cs
  19. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj
  20. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TeacherCancelLeaveManageMethod.cs

+ 152
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherCancelLeaveManagementController.cs Voir le fichier

@@ -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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-03-04 14:21
/// 描 述:教师销假管理
/// </summary>
public class TeacherCancelLeaveManagementController : MvcControllerBase
{
private TeacherCancelLeaveManagementIBLL teacherCancelLeaveManagementIBLL = new TeacherCancelLeaveManagementBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 表单页-查看
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormView()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = teacherCancelLeaveManagementIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var TeacherCancelLeaveManagementData = teacherCancelLeaveManagementIBLL.GetTeacherCancelLeaveManagementEntity( keyValue );
var jsonData = new {
TeacherCancelLeaveManagement = TeacherCancelLeaveManagementData,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="processId">流程实例主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var TeacherCancelLeaveManagementData = teacherCancelLeaveManagementIBLL.GetEntityByProcessId( processId );
var jsonData = new {
TeacherCancelLeaveManagement = TeacherCancelLeaveManagementData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
teacherCancelLeaveManagementIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
TeacherCancelLeaveManagementEntity entity = strEntity.ToObject<TeacherCancelLeaveManagementEntity>();
entity.CheckStatus = "0";
teacherCancelLeaveManagementIBLL.SaveEntity(keyValue,entity);
return Success("保存成功!");
}
/// <summary>
/// 提交实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DoSubmit(string keyValue, string status, string processId)
{
teacherCancelLeaveManagementIBLL.DoSubmit(keyValue, status, processId);
return Success("提交成功!");
}
#endregion

}
}

+ 34
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.cshtml Voir le fichier

@@ -0,0 +1,34 @@
@{
ViewBag.Title = "教师销假管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" style="padding:0;line-height:38px;text-align:center;font-size:20px;font-weight:bold;color:#333;" >
<span>教职工销假申请表</span>
</div>
<div class="col-xs-6 lr-form-item" data-table="TeacherCancelLeaveManagement" >
<div class="lr-form-item-title">姓名</div>
<input id="CreateUserId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TeacherCancelLeaveManagement" >
<div class="lr-form-item-title">填表时间</div>
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TeacherCancelLeaveManagement" >
<div class="lr-form-item-title">销假类型<font face="宋体">*</font></div>
<div id="CancelLeaveType" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TeacherCancelLeaveManagement" >
<div class="lr-form-item-title">到岗时间<font face="宋体">*</font></div>
<input id="WorkTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#WorkTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TeacherCancelLeaveManagement" >
<div class="lr-form-item-title">销假事由</div>
<textarea id="CancelLeaveReason" class="form-control" style="height:100px;" ></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="TeacherCancelLeaveManagement" >
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.js")

+ 108
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Form.js Voir le fichier

@@ -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();
}

+ 34
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.cshtml Voir le fichier

@@ -0,0 +1,34 @@
@{
ViewBag.Title = "教师销假管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" style="padding:0;line-height:38px;text-align:center;font-size:20px;font-weight:bold;color:#333;">
<span>教职工销假申请表</span>
</div>
<div class="col-xs-6 lr-form-item" data-table="TeacherCancelLeaveManagement">
<div class="lr-form-item-title">姓名</div>
<input id="CreateUserId" type="text" readonly="readonly" class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TeacherCancelLeaveManagement">
<div class="lr-form-item-title">填表时间</div>
<input id="CreateTime" type="text" readonly="readonly" class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TeacherCancelLeaveManagement">
<div class="lr-form-item-title">销假类型<font face="宋体">*</font></div>
<div id="CancelLeaveType" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TeacherCancelLeaveManagement">
<div class="lr-form-item-title">到岗时间<font face="宋体">*</font></div>
<input id="WorkTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TeacherCancelLeaveManagement">
<div class="lr-form-item-title">销假事由</div>
<textarea id="CancelLeaveReason" class="form-control" style="height:100px;" readonly="readonly"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="TeacherCancelLeaveManagement">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" readonly="readonly"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.js")

+ 108
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/FormView.js Voir le fichier

@@ -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();
}

+ 46
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.cshtml Voir le fichier

@@ -0,0 +1,46 @@
@{
/**/

ViewBag.Title = "教师销假管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">销假类型</div>
<div id="CancelLeaveType"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">姓名</div>
<div id="CreateUserId"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;查看</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;提交</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.js")

+ 195
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCancelLeaveManagement/Index.js Voir le fichier

@@ -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" ? "<span class=\"label label-warning\">审核中</span>" : cellvalue == "2" ? "<span class=\"label label-success\">审核通过</span>" : cellvalue == "3" ? "<span class=\"label label-danger\">审核未通过</span>" : "<span class=\"label label-default\">草稿</span>";
}
},
],
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();
}

+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherLeaveManagement/Index.js Voir le fichier

@@ -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();
});


+ 10
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Voir le fichier

@@ -793,6 +793,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\StuLeaveManagementController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\EATalentTrainController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\TeacherLeaveManagementController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\TeacherCancelLeaveManagementController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -1348,6 +1349,7 @@
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" />
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" />
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" />
<Content Include="Areas\PersonnelManagement\Views\TeacherCancelLeaveManagement\FormView.js" />
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\FormView.js" />
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerIndex.js" />
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerQuery.js" />
@@ -6131,6 +6133,10 @@
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Form.js" />
<Content Include="Areas\PersonnelManagement\Views\TeacherCancelLeaveManagement\Index.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\TeacherCancelLeaveManagement\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\TeacherCancelLeaveManagement\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\TeacherCancelLeaveManagement\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\LR_Desktop\Models\" />
@@ -6150,7 +6156,9 @@
<Content Include="XmlConfig\database.config">
<SubType>Designer</SubType>
</Content>
<Content Include="XmlConfig\ioc.config" />
<Content Include="XmlConfig\ioc.config">
<SubType>Designer</SubType>
</Content>
<Content Include="XmlConfig\log4net.config" />
<Content Include="XmlConfig\system.config">
<SubType>Designer</SubType>
@@ -6903,6 +6911,7 @@
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\SelectUserForm.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\FormView.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\TeacherCancelLeaveManagement\FormView.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" />


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config Voir le fichier

@@ -28,6 +28,7 @@
<typeAlias alias="OA_NewsMethod" type="Learun.Application.WorkFlow.OA_NewsMethod,Learun.Application.WorkFlow" />
<typeAlias alias="Ass_AcceptanceMethod" type="Learun.Application.WorkFlow.Ass_AcceptanceMethod,Learun.Application.WorkFlow" />
<typeAlias alias="TeacherLeaveManagementMethod" type="Learun.Application.WorkFlow.TeacherLeaveManagementMethod,Learun.Application.WorkFlow" />
<typeAlias alias="TeacherCancelLeaveManageMethod" type="Learun.Application.WorkFlow.TeacherCancelLeaveManageMethod,Learun.Application.WorkFlow" />

<!--任务调度器-->
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" />
@@ -66,6 +67,7 @@
<type type="IWorkFlowMethod" mapTo="OA_NewsMethod" name="OA_NewsMethod"></type>
<type type="IWorkFlowMethod" mapTo="Ass_AcceptanceMethod" name="Ass_AcceptanceMethod"></type>
<type type="IWorkFlowMethod" mapTo="TeacherLeaveManagementMethod" name="TeacherLeaveManagementMethod"></type>
<type type="IWorkFlowMethod" mapTo="TeacherCancelLeaveManageMethod" name="TeacherCancelLeaveManageMethod"></type>

</container>



+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Voir le fichier

@@ -545,6 +545,7 @@
<Compile Include="EducationalAdministration\StuLeaveManagementMap.cs" />
<Compile Include="EducationalAdministration\EATalentTrainMap.cs" />
<Compile Include="PersonnelManagement\TeacherLeaveManagementMap.cs" />
<Compile Include="PersonnelManagement\TeacherCancelLeaveManagementMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/TeacherCancelLeaveManagementMap.cs Voir le fichier

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.PersonnelManagement;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-03-04 14:21
/// 描 述:教师销假管理
/// </summary>
public class TeacherCancelLeaveManagementMap : EntityTypeConfiguration<TeacherCancelLeaveManagementEntity>
{
public TeacherCancelLeaveManagementMap()
{
#region 表、主键
//表
this.ToTable("TEACHERCANCELLEAVEMANAGEMENT");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM Voir le fichier

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{88086B01-C9E1-11D4-9552-0090277716A9}" Label="" LastModificationDate="1614760360" Name="Physical Data Model 1" Objects="3316" Symbols="381" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{88086B01-C9E1-11D4-9552-0090277716A9}" Label="" LastModificationDate="1614760360" Name="Physical Data Model 1" Objects="3292" Symbols="381" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->

<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Voir le fichier

@@ -1601,6 +1601,10 @@
<Compile Include="PersonnelManagement\TeacherLeaveManagement\TeacherLeaveManagementService.cs" />
<Compile Include="PersonnelManagement\TeacherLeaveManagement\TeacherLeaveManagementBLL.cs" />
<Compile Include="PersonnelManagement\TeacherLeaveManagement\TeacherLeaveManagementIBLL.cs" />
<Compile Include="PersonnelManagement\TeacherCancelLeaveManagement\TeacherCancelLeaveManagementEntity.cs" />
<Compile Include="PersonnelManagement\TeacherCancelLeaveManagement\TeacherCancelLeaveManagementService.cs" />
<Compile Include="PersonnelManagement\TeacherCancelLeaveManagement\TeacherCancelLeaveManagementBLL.cs" />
<Compile Include="PersonnelManagement\TeacherCancelLeaveManagement\TeacherCancelLeaveManagementIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 193
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementBLL.cs Voir le fichier

@@ -0,0 +1,193 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-03-04 14:21
/// 描 述:教师销假管理
/// </summary>
public class TeacherCancelLeaveManagementBLL : TeacherCancelLeaveManagementIBLL
{
private TeacherCancelLeaveManagementService teacherCancelLeaveManagementService = new TeacherCancelLeaveManagementService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TeacherCancelLeaveManagementEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return teacherCancelLeaveManagementService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取TeacherCancelLeaveManagement表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TeacherCancelLeaveManagementEntity GetTeacherCancelLeaveManagementEntity(string keyValue)
{
try
{
return teacherCancelLeaveManagementService.GetTeacherCancelLeaveManagementEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
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 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
teacherCancelLeaveManagementService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
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);
}
}
}

/// <summary>
/// 提交实体数据
/// </summary>
/// <param name="keyValue">主键</param>
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);
}
}
}

/// <summary>
/// 审核实体数据
/// </summary>
/// <param name="keyValue">主键</param>
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

}
}

+ 100
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementEntity.cs Voir le fichier

@@ -0,0 +1,100 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-03-04 14:21
/// 描 述:教师销假管理
/// </summary>
public class TeacherCancelLeaveManagementEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 销假类型
/// </summary>
[Column("CANCELLEAVETYPE")]
public string CancelLeaveType { get; set; }
/// <summary>
/// 到岗时间
/// </summary>
[Column("WORKTIME")]
public DateTime? WorkTime { get; set; }
/// <summary>
/// 销假事由
/// </summary>
[Column("CANCELLEAVEREASON")]
public string CancelLeaveReason { get; set; }
/// <summary>
/// 申请人
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// 申请时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 审核状态(0草稿,1审核中,2审核通过,3,审核不通过)
/// </summary>
[Column("CHECKSTATUS")]
public string CheckStatus { get; set; }
/// <summary>
/// 审核备注
/// </summary>
[Column("CHECKREMARK")]
public string CheckRemark { get; set; }
/// <summary>
/// 审核人
/// </summary>
[Column("CHECKUSERID")]
public string CheckUserId { get; set; }
/// <summary>
/// 审核时间
/// </summary>
[Column("CHECKTIME")]
public DateTime? CheckTime { get; set; }
/// <summary>
/// 流程Id
/// </summary>
[Column("PROCESSID")]
public string ProcessId { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 65
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementIBLL.cs Voir le fichier

@@ -0,0 +1,65 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-03-04 14:21
/// 描 述:教师销假管理
/// </summary>
public interface TeacherCancelLeaveManagementIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TeacherCancelLeaveManagementEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取TeacherCancelLeaveManagement表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TeacherCancelLeaveManagementEntity GetTeacherCancelLeaveManagementEntity(string keyValue);
/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
TeacherCancelLeaveManagementEntity GetEntityByProcessId(string processId);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, TeacherCancelLeaveManagementEntity entity);
/// <summary>
/// 提交实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DoSubmit(string keyValue, string status, string processId);
/// <summary>
/// 审核实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void ChangeStatusByProcessId(string status, string processId, string userId);
#endregion

}
}

+ 222
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCancelLeaveManagement/TeacherCancelLeaveManagementService.cs Voir le fichier

@@ -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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-03-04 14:21
/// 描 述:教师销假管理
/// </summary>
public class TeacherCancelLeaveManagementService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TeacherCancelLeaveManagementEntity> 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<TeacherCancelLeaveManagementEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取TeacherCancelLeaveManagement表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TeacherCancelLeaveManagementEntity GetTeacherCancelLeaveManagementEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TeacherCancelLeaveManagementEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public TeacherCancelLeaveManagementEntity GetEntityByProcessId(string processId)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TeacherCancelLeaveManagementEntity>(t=>t.ProcessId == processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<TeacherCancelLeaveManagementEntity>(t=>t.Id == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
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);
}
}
}

/// <summary>
/// 提交实体数据
/// </summary>
/// <param name="keyValue">主键</param>
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);
}
}
}

/// <summary>
/// 审核实体数据
/// </summary>
/// <param name="keyValue">主键</param>
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

}
}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj Voir le fichier

@@ -93,6 +93,7 @@
<Compile Include="Delegate\NWFDelegateRelationEntity.cs" />
<Compile Include="Delegate\NWFDelegateRuleEntity.cs" />
<Compile Include="Delegate\NWFDelegateService.cs" />
<Compile Include="NodeMethod\TeacherCancelLeaveManageMethod.cs" />
<Compile Include="NodeMethod\TeacherLeaveManagementMethod.cs" />
<Compile Include="NodeMethod\ArrangeLessonTermAttemperMethod.cs" />
<Compile Include="NodeMethod\ADR_AddApplyMethod.cs" />


+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TeacherCancelLeaveManageMethod.cs Voir le fichier

@@ -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);
}
}
}
}

Chargement…
Annuler
Enregistrer