@@ -4,10 +4,14 @@ | |||||
} | } | ||||
<div class="lr-form-wrap" id="form"> | <div class="lr-form-wrap" id="form"> | ||||
<div class="col-xs-12 lr-form-item" data-table="OANews"> | |||||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||||
<div class="lr-form-item-title">公告标题<font face="宋体">*</font></div> | <div class="lr-form-item-title">公告标题<font face="宋体">*</font></div> | ||||
<input id="F_FullHead" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请输入标题" /> | <input id="F_FullHead" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请输入标题" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | |||||
<div class="lr-form-item-title">下发CMS<font face="宋体">*</font></div> | |||||
<div id="IsSend" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="OANews"> | <div class="col-xs-6 lr-form-item" data-table="OANews"> | ||||
<div class="lr-form-item-title">公告类别<font face="宋体">*</font></div> | <div class="lr-form-item-title">公告类别<font face="宋体">*</font></div> | ||||
<div id="F_CategoryId" isvalid="yes" checkexpession="NotNull"></div> | <div id="F_CategoryId" isvalid="yes" checkexpession="NotNull"></div> | ||||
@@ -26,6 +26,11 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
var loginInfo = top.learun.clientdata.get(['userinfo']); | var loginInfo = top.learun.clientdata.get(['userinfo']); | ||||
$('#IsSend').lrselect({ | |||||
data: [{ text: "是", value: "1" }, { text: "否", value: "0" }], | |||||
text: "text", | |||||
value: "value" | |||||
}); | |||||
//公告类别 | //公告类别 | ||||
$('#F_CategoryId').lrselect({ | $('#F_CategoryId').lrselect({ | ||||
url: top.$.rootUrl + '/LR_OAModule/Notice/GetNoticeCategoryByDepartment?userId=' + loginInfo.userId, | url: top.$.rootUrl + '/LR_OAModule/Notice/GetNoticeCategoryByDepartment?userId=' + loginInfo.userId, | ||||
@@ -23,6 +23,11 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
$('#IsSend').lrselect({ | |||||
data: [{ text: "是", value: "1" }, { text: "是", value: "否" }], | |||||
text: "text", | |||||
value: "value" | |||||
}); | |||||
// 新增 | // 新增 | ||||
$('#lr_add').on('click', function () { | $('#lr_add').on('click', function () { | ||||
learun.layerForm({ | learun.layerForm({ | ||||
@@ -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 | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-03-03 11:29 | |||||
/// 描 述:教师请假管理 | |||||
/// </summary> | |||||
public class TeacherLeaveManagementController : MvcControllerBase | |||||
{ | |||||
private TeacherLeaveManagementIBLL teacherLeaveManagementIBLL = new TeacherLeaveManagementBLL(); | |||||
#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 = teacherLeaveManagementIBLL.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 TeacherLeaveManagementData = teacherLeaveManagementIBLL.GetTeacherLeaveManagementEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
TeacherLeaveManagement = TeacherLeaveManagementData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="processId">流程实例主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormDataByProcessId(string processId) | |||||
{ | |||||
var TeacherLeaveManagementData = teacherLeaveManagementIBLL.GetEntityByProcessId(processId); | |||||
var jsonData = new | |||||
{ | |||||
TeacherLeaveManagement = TeacherLeaveManagementData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
teacherLeaveManagementIBLL.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) | |||||
{ | |||||
TeacherLeaveManagementEntity entity = strEntity.ToObject<TeacherLeaveManagementEntity>(); | |||||
entity.CheckStatus = "0"; | |||||
teacherLeaveManagementIBLL.SaveEntity(keyValue, entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 提交实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DoSubmit(string keyValue, string status, string processId) | |||||
{ | |||||
teacherLeaveManagementIBLL.DoSubmit(keyValue, status, processId); | |||||
return Success("提交成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,46 @@ | |||||
@{ | |||||
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="TeacherLeaveManagement" > | |||||
<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="TeacherLeaveManagement" > | |||||
<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="TeacherLeaveManagement" > | |||||
<div class="lr-form-item-title">联系电话</div> | |||||
<input id="Telephone" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TeacherLeaveManagement" > | |||||
<div class="lr-form-item-title">请假种类<font face="宋体">*</font></div> | |||||
<div id="LeaveType" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TeacherLeaveManagement" > | |||||
<div class="lr-form-item-title">开始时间</div> | |||||
<input id="StartTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#StartTime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TeacherLeaveManagement" > | |||||
<div class="lr-form-item-title">结束时间</div> | |||||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#EndTime').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherLeaveManagement" > | |||||
<div class="lr-form-item-title">请假天数<font face="宋体">*</font></div> | |||||
<div id="LeaveDay" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherLeaveManagement" > | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="Files" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherLeaveManagement" > | |||||
<div class="lr-form-item-title">请假事由</div> | |||||
<textarea id="LeaveReason" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/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(); | |||||
} |
@@ -0,0 +1,46 @@ | |||||
@{ | |||||
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="TeacherLeaveManagement"> | |||||
<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="TeacherLeaveManagement"> | |||||
<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="TeacherLeaveManagement"> | |||||
<div class="lr-form-item-title">联系电话</div> | |||||
<input id="Telephone" type="text" class="form-control" readonly="readonly" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TeacherLeaveManagement"> | |||||
<div class="lr-form-item-title">请假种类<font face="宋体">*</font></div> | |||||
<div id="LeaveType" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TeacherLeaveManagement"> | |||||
<div class="lr-form-item-title">开始时间</div> | |||||
<input id="StartTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="TeacherLeaveManagement"> | |||||
<div class="lr-form-item-title">结束时间</div> | |||||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherLeaveManagement"> | |||||
<div class="lr-form-item-title">请假天数<font face="宋体">*</font></div> | |||||
<div id="LeaveDay" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherLeaveManagement"> | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="Files"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherLeaveManagement"> | |||||
<div class="lr-form-item-title">请假事由</div> | |||||
<textarea id="LeaveReason" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/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(); | |||||
} |
@@ -0,0 +1,50 @@ | |||||
@{ | |||||
/**/ | |||||
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="LeaveType"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">姓名</div> | |||||
<div id="CreateUserId"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">联系电话</div> | |||||
<input id="Telephone" type="text" class="form-control" /> | |||||
</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> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</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> 查看</a> | |||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/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" ? "<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: 'TeacherLeaveManagement',// 填写流程对应模板编号 | |||||
processId: processId, | |||||
level: '1', | |||||
}; | |||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||||
learun.loading(false); | |||||
}); | |||||
} | |||||
page.search(); | |||||
} | |||||
}; | |||||
page.init(); | |||||
} |
@@ -495,6 +495,7 @@ | |||||
<Compile Include="Areas\PersonnelManagement\Controllers\MP_ManagementPlanController.cs" /> | <Compile Include="Areas\PersonnelManagement\Controllers\MP_ManagementPlanController.cs" /> | ||||
<Compile Include="Areas\PersonnelManagement\Controllers\OvertimeApplicationController.cs" /> | <Compile Include="Areas\PersonnelManagement\Controllers\OvertimeApplicationController.cs" /> | ||||
<Compile Include="Areas\PersonnelManagement\Controllers\StuSaverecordController.cs" /> | <Compile Include="Areas\PersonnelManagement\Controllers\StuSaverecordController.cs" /> | ||||
<Compile Include="Areas\PersonnelManagement\Controllers\TeacherLeaveManagementController.cs" /> | |||||
<Compile Include="Areas\PersonnelManagement\Controllers\TimeTableController.cs" /> | <Compile Include="Areas\PersonnelManagement\Controllers\TimeTableController.cs" /> | ||||
<Compile Include="Areas\PersonnelManagement\PersonnelManagementAreaRegistration.cs" /> | <Compile Include="Areas\PersonnelManagement\PersonnelManagementAreaRegistration.cs" /> | ||||
<Compile Include="Areas\ReceiveSendFeeManagement\ReceiveSendFeeManagementAreaRegistration.cs" /> | <Compile Include="Areas\ReceiveSendFeeManagement\ReceiveSendFeeManagementAreaRegistration.cs" /> | ||||
@@ -1510,6 +1511,9 @@ | |||||
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" /> | <Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" /> | <Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" /> | <Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Form.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\FormView.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Index.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\ExamineForm.js" /> | <Content Include="Areas\PersonnelManagement\Views\VisitorInfo\ExamineForm.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\fromAdd.css" /> | <Content Include="Areas\PersonnelManagement\Views\VisitorInfo\fromAdd.css" /> | ||||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\AmountConversion.js" /> | <Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\AmountConversion.js" /> | ||||
@@ -7506,6 +7510,9 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteerPhone\Search.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteerPhone\Search.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteerPhone\SearchResult.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteerPhone\SearchResult.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\QRCode.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteer\QRCode.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Form.cshtml" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\FormView.cshtml" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\ClassForm.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteer\ClassForm.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexGenerate.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteer\IndexGenerate.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\FormGenerate.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuVolunteer\FormGenerate.cshtml" /> | ||||
@@ -29,6 +29,7 @@ | |||||
<typeAlias alias="Ass_AcceptanceMethod" type="Learun.Application.WorkFlow.Ass_AcceptanceMethod,Learun.Application.WorkFlow" /> | <typeAlias alias="Ass_AcceptanceMethod" type="Learun.Application.WorkFlow.Ass_AcceptanceMethod,Learun.Application.WorkFlow" /> | ||||
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" /> | <typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" /> | ||||
<typeAlias alias="FD_PayManageMethod" type="Learun.Application.WorkFlow.FD_PayManageMethod,Learun.Application.WorkFlow" /> | <typeAlias alias="FD_PayManageMethod" type="Learun.Application.WorkFlow.FD_PayManageMethod,Learun.Application.WorkFlow" /> | ||||
<typeAlias alias="TeacherLeaveManagementMethod" type="Learun.Application.WorkFlow.TeacherLeaveManagementMethod,Learun.Application.WorkFlow" /> | |||||
<!--任务调度器--> | <!--任务调度器--> | ||||
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" /> | <typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" /> | ||||
@@ -68,6 +69,7 @@ | |||||
<type type="IWorkFlowMethod" mapTo="Ass_AcceptanceMethod" name="Ass_AcceptanceMethod"></type> | <type type="IWorkFlowMethod" mapTo="Ass_AcceptanceMethod" name="Ass_AcceptanceMethod"></type> | ||||
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | <type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | ||||
<type type="IWorkFlowMethod" mapTo="FD_PayManageMethod" name="FD_PayManageMethod"></type> | <type type="IWorkFlowMethod" mapTo="FD_PayManageMethod" name="FD_PayManageMethod"></type> | ||||
<type type="IWorkFlowMethod" mapTo="TeacherLeaveManagementMethod" name="TeacherLeaveManagementMethod"></type> | |||||
</container> | </container> | ||||
@@ -167,4 +167,13 @@ | |||||
<add key="ForbidLoginNum" value="5"/> | <add key="ForbidLoginNum" value="5"/> | ||||
<!-- 禁止登录时间(分钟) --> | <!-- 禁止登录时间(分钟) --> | ||||
<add key="ForbidLoginMinutes" value="10"/> | <add key="ForbidLoginMinutes" value="10"/> | ||||
<!--下发新闻配置--> | |||||
<add key="SiteId" value="1"/> | |||||
<add key="ChannelId" value="6"/> | |||||
<!--秘钥--> | |||||
<add key="ApiKey" value="fafc361a-40c1-4060-8eee-ea796640c39c"/> | |||||
<!--CMS部署端口--> | |||||
<add key="Ports" value="8007"/> | |||||
</appSettings> | </appSettings> |
@@ -224,6 +224,7 @@ | |||||
<Compile Include="PersonnelManagement\SRPaperMap.cs" /> | <Compile Include="PersonnelManagement\SRPaperMap.cs" /> | ||||
<Compile Include="PersonnelManagement\SRProjectMap.cs" /> | <Compile Include="PersonnelManagement\SRProjectMap.cs" /> | ||||
<Compile Include="PersonnelManagement\SRWorkMap.cs" /> | <Compile Include="PersonnelManagement\SRWorkMap.cs" /> | ||||
<Compile Include="PersonnelManagement\TeacherLeaveManagementMap.cs" /> | |||||
<Compile Include="Properties\AssemblyInfo.cs" /> | <Compile Include="Properties\AssemblyInfo.cs" /> | ||||
<Compile Include="LR_Authorize\DataAuthorizeConditionMap.cs" /> | <Compile Include="LR_Authorize\DataAuthorizeConditionMap.cs" /> | ||||
<Compile Include="LR_Authorize\DataAuthorizeRelationMap.cs" /> | <Compile Include="LR_Authorize\DataAuthorizeRelationMap.cs" /> | ||||
@@ -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-03 11:29 | |||||
/// 描 述:教师请假管理 | |||||
/// </summary> | |||||
public class TeacherLeaveManagementMap : EntityTypeConfiguration<TeacherLeaveManagementEntity> | |||||
{ | |||||
public TeacherLeaveManagementMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("TEACHERLEAVEMANAGEMENT"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -45,6 +45,9 @@ | |||||
<SpecificVersion>False</SpecificVersion> | <SpecificVersion>False</SpecificVersion> | ||||
<HintPath>..\..\..\packages\Dapper.1.50.2\lib\net45\Dapper.dll</HintPath> | <HintPath>..\..\..\packages\Dapper.1.50.2\lib\net45\Dapper.dll</HintPath> | ||||
</Reference> | </Reference> | ||||
<Reference Include="Nancy, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL"> | |||||
<HintPath>..\..\..\packages\Nancy.1.4.1\lib\net40\Nancy.dll</HintPath> | |||||
</Reference> | |||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> | <HintPath>..\..\..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> | ||||
</Reference> | </Reference> | ||||
@@ -95,6 +98,7 @@ | |||||
</Reference> | </Reference> | ||||
<Reference Include="System" /> | <Reference Include="System" /> | ||||
<Reference Include="System.ComponentModel.DataAnnotations" /> | <Reference Include="System.ComponentModel.DataAnnotations" /> | ||||
<Reference Include="System.Configuration" /> | |||||
<Reference Include="System.Core" /> | <Reference Include="System.Core" /> | ||||
<Reference Include="System.Xml.Linq" /> | <Reference Include="System.Xml.Linq" /> | ||||
<Reference Include="System.Data.DataSetExtensions" /> | <Reference Include="System.Data.DataSetExtensions" /> | ||||
@@ -1,5 +1,6 @@ | |||||
using Learun.Util; | using Learun.Util; | ||||
using System; | using System; | ||||
using System.Collections.Generic; | |||||
using System.ComponentModel.DataAnnotations.Schema; | using System.ComponentModel.DataAnnotations.Schema; | ||||
namespace Learun.Application.OA | namespace Learun.Application.OA | ||||
@@ -206,6 +207,12 @@ namespace Learun.Application.OA | |||||
/// </summary> | /// </summary> | ||||
[NotMapped] | [NotMapped] | ||||
public string RTime { get; set; } | public string RTime { get; set; } | ||||
/// <summary> | |||||
/// 是否下发到网站 | |||||
/// </summary> | |||||
[Column("ISSEND")] | |||||
public string IsSend { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -241,6 +248,171 @@ namespace Learun.Application.OA | |||||
} | } | ||||
#endregion | #endregion | ||||
public class SemdNewList | |||||
{ | |||||
/// <summary> | |||||
/// 添加人 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string AddUserName { get; set; } | |||||
/// <summary> | |||||
/// 修改人 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string LastEditUserName { get; set; } | |||||
/// <summary> | |||||
/// 投稿人 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string WritingUserName { get; set; } | |||||
/// <summary> | |||||
/// 修改时间 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public DateTime? LastEditDate { get; set; } | |||||
/// <summary> | |||||
/// 排序 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public int? Taxis { get; set; } | |||||
/// <summary> | |||||
/// 内容组 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string GroupNameCollection { get; set; } | |||||
/// <summary> | |||||
/// 标签 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string Tags { get; set; } | |||||
/// <summary> | |||||
/// 来源内容Id | |||||
/// </summary> | |||||
[NotMapped] | |||||
public int? SourceId { get; set; } | |||||
/// <summary> | |||||
/// 引用内容Id | |||||
/// </summary> | |||||
[NotMapped] | |||||
public int? ReferenceId { get; set; } | |||||
/// <summary> | |||||
/// 是否终审通过通过 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string IsChecked { get; set; } | |||||
/// <summary> | |||||
/// 未终审通过情况下,处于第几级审核状态 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public int? CheckedLevel { get; set; } | |||||
/// <summary> | |||||
/// 总点击量 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public int? Hits { get; set; } | |||||
/// <summary> | |||||
/// 日点击 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public int? HitsByDay { get; set; } | |||||
/// <summary> | |||||
/// 月点击 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public int? HitsByMonth { get; set; } | |||||
/// <summary> | |||||
/// 最后点击时间 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public DateTime? LastHitsDate { get; set; } | |||||
/// <summary> | |||||
/// 标题 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string Title { get; set; } | |||||
[NotMapped] | |||||
/// <summary> | |||||
/// 是否置顶内容 | |||||
/// </summary> | |||||
public int? IsTop { get; set; } | |||||
/// <summary> | |||||
/// 是否置顶内容 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public int? IsRecommend { get; set; } | |||||
/// <summary> | |||||
/// 是否热点内容 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public int? IsHot { get; set; } | |||||
/// <summary> | |||||
/// 是否醒目内容 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public int? IsColor { get; set; } | |||||
/// <summary> | |||||
/// 外部链接 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string LinkUrl { get; set; } | |||||
/// <summary> | |||||
/// 添加时间 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public DateTime? AddDate { get; set; } | |||||
/// <summary> | |||||
/// 内容副标题 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string SubTitle { get; set; } | |||||
/// <summary> | |||||
/// 内容图片 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string ImageUrl { get; set; } | |||||
/// <summary> | |||||
/// 内容视频 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string VideoUrl { get; set; } | |||||
/// <summary> | |||||
/// 内容附件 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string FileUrl { get; set; } | |||||
/// <summary> | |||||
/// 内容正文 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string Content { get; set; } | |||||
/// <summary> | |||||
/// 内容摘要 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string Summary { get; set; } | |||||
/// <summary> | |||||
/// 作者 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string Author { get; set; } | |||||
/// <summary> | |||||
/// 来源 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public string Source { get; set; } | |||||
} | |||||
public class AuditList | |||||
{ | |||||
public string siteId { get; set; } | |||||
public List<contents> contents { get; set; } | |||||
public string reasons { get; set; } | |||||
} | |||||
public class contents | |||||
{ | |||||
public int channelId { get; set; } | |||||
public int id { get; set; } | |||||
} | |||||
} | } | ||||
} | } |
@@ -2,8 +2,13 @@ | |||||
using Learun.Util; | using Learun.Util; | ||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Net; | |||||
using System.Text; | using System.Text; | ||||
using Nancy.Json; | |||||
using Spire.Pdf.General.Render.Decode.Jpeg2000.Icc; | using Spire.Pdf.General.Render.Decode.Jpeg2000.Icc; | ||||
using static Learun.Application.OA.NewsEntity; | |||||
using Nancy.Helpers; | |||||
using System.Configuration; | |||||
namespace Learun.Application.OA | namespace Learun.Application.OA | ||||
{ | { | ||||
@@ -16,6 +21,7 @@ namespace Learun.Application.OA | |||||
/// </summary> | /// </summary> | ||||
public class NewsService : RepositoryFactory | public class NewsService : RepositoryFactory | ||||
{ | { | ||||
#region 获取数据 | #region 获取数据 | ||||
/// <summary> | /// <summary> | ||||
/// 新闻列表 | /// 新闻列表 | ||||
@@ -178,14 +184,60 @@ namespace Learun.Application.OA | |||||
try | try | ||||
{ | { | ||||
var newEntity = this.BaseRepository() | |||||
.FindEntity<NewsEntity>(a => a.F_ProgressId == parameterProcessId); | |||||
var newEntity = this.BaseRepository().FindEntity<NewsEntity>(a => a.F_ProgressId == parameterProcessId); | |||||
if (null != newEntity) | if (null != newEntity) | ||||
{ | { | ||||
if (status == 2) | if (status == 2) | ||||
{ | { | ||||
newEntity.F_Status = "2"; | newEntity.F_Status = "2"; | ||||
if (newEntity.IsSend == "1") //判断是否下发 | |||||
{ | |||||
#region 获取配置文件 | |||||
string siteId = HttpUtility.UrlEncode(ConfigurationManager.AppSettings["SiteId"]); | |||||
string channelId = HttpUtility.UrlEncode(ConfigurationManager.AppSettings["ChannelId"]); | |||||
string ApiKey = HttpUtility.UrlEncode(ConfigurationManager.AppSettings["ApiKey"]); | |||||
string ports = HttpUtility.UrlEncode(ConfigurationManager.AppSettings["Ports"]); | |||||
#endregion | |||||
SemdNewList SendNew = new SemdNewList | |||||
{ | |||||
Title = newEntity.F_FullHead, | |||||
SubTitle = newEntity.F_BriefHead, | |||||
Content = newEntity.F_NewsContent, | |||||
Author = newEntity.F_AuthorName, | |||||
Source = newEntity.F_SourceName, | |||||
AddDate = DateTime.Now, | |||||
Tags = newEntity.F_TagWord, | |||||
AddUserName = newEntity.F_CreateUserName, | |||||
}; | |||||
WebHeaderCollection ApiId = new WebHeaderCollection | |||||
{ | |||||
{ "X-SS-API-KEY", ApiKey } | |||||
}; | |||||
string responses = Util.HttpMethods.HttpPosts("http://localhost:" + ports + "/api/v1/contents/" + siteId + "/" + channelId, SendNew.ToJson(), ApiId); | |||||
#region 修改审核状态 | |||||
JavaScriptSerializer Jss = new JavaScriptSerializer(); | |||||
Dictionary<string, object> DicText = (Dictionary<string, object>)Jss.DeserializeObject(responses); | |||||
string Nid = DicText["id"].ToString(); | |||||
AuditList AList = new AuditList(); | |||||
if (Nid != null) | |||||
{ | |||||
AList.siteId = siteId; | |||||
List<contents> listCon = new List<contents>(); | |||||
//这里应该循环,如果多个 | |||||
contents con = new contents(); | |||||
con.channelId = Convert.ToInt32(channelId); | |||||
con.id = Convert.ToInt32(Nid); | |||||
listCon.Add(con); | |||||
AList.contents = listCon; | |||||
AList.reasons = "终审通过"; | |||||
Util.HttpMethods.HttpPosts("http://localhost:" + ports + "/api/v1/contents/actions/check", AList.ToJson(), ApiId); | |||||
} | |||||
#endregion | |||||
} | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
@@ -423,6 +423,10 @@ | |||||
<Compile Include="PersonnelManagement\SRWork\SRWorkEntity.cs" /> | <Compile Include="PersonnelManagement\SRWork\SRWorkEntity.cs" /> | ||||
<Compile Include="PersonnelManagement\SRWork\SRWorkIBLL.cs" /> | <Compile Include="PersonnelManagement\SRWork\SRWorkIBLL.cs" /> | ||||
<Compile Include="PersonnelManagement\SRWork\SRWorkService.cs" /> | <Compile Include="PersonnelManagement\SRWork\SRWorkService.cs" /> | ||||
<Compile Include="PersonnelManagement\TeacherLeaveManagement\TeacherLeaveManagementBLL.cs" /> | |||||
<Compile Include="PersonnelManagement\TeacherLeaveManagement\TeacherLeaveManagementEntity.cs" /> | |||||
<Compile Include="PersonnelManagement\TeacherLeaveManagement\TeacherLeaveManagementIBLL.cs" /> | |||||
<Compile Include="PersonnelManagement\TeacherLeaveManagement\TeacherLeaveManagementService.cs" /> | |||||
<Compile Include="Properties\AssemblyInfo.cs" /> | <Compile Include="Properties\AssemblyInfo.cs" /> | ||||
<Compile Include="StudentWork\SW_Ask_Main\SW_Ask_MainBLL.cs" /> | <Compile Include="StudentWork\SW_Ask_Main\SW_Ask_MainBLL.cs" /> | ||||
<Compile Include="StudentWork\SW_Ask_Main\SW_Ask_MainEntity.cs" /> | <Compile Include="StudentWork\SW_Ask_Main\SW_Ask_MainEntity.cs" /> | ||||
@@ -1813,6 +1817,7 @@ | |||||
<Analyzer Include="..\..\..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\cs\Microsoft.DependencyValidation.Analyzers.resources.dll" /> | <Analyzer Include="..\..\..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\cs\Microsoft.DependencyValidation.Analyzers.resources.dll" /> | ||||
<Analyzer Include="..\..\..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\Microsoft.DependencyValidation.Analyzers.dll" /> | <Analyzer Include="..\..\..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\Microsoft.DependencyValidation.Analyzers.dll" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup /> | |||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> | <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> | ||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||||
@@ -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-03 11:29 | |||||
/// 描 述:教师请假管理 | |||||
/// </summary> | |||||
public class TeacherLeaveManagementBLL : TeacherLeaveManagementIBLL | |||||
{ | |||||
private TeacherLeaveManagementService teacherLeaveManagementService = new TeacherLeaveManagementService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<TeacherLeaveManagementEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return teacherLeaveManagementService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取TeacherLeaveManagement表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public TeacherLeaveManagementEntity GetTeacherLeaveManagementEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return teacherLeaveManagementService.GetTeacherLeaveManagementEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// </summary> | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <returns></returns> | |||||
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 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
teacherLeaveManagementService.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, TeacherLeaveManagementEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
teacherLeaveManagementService.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 | |||||
{ | |||||
teacherLeaveManagementService.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 | |||||
{ | |||||
teacherLeaveManagementService.ChangeStatusByProcessId(status, processId, userId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,115 @@ | |||||
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-03 11:29 | |||||
/// 描 述:教师请假管理 | |||||
/// </summary> | |||||
public class TeacherLeaveManagementEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 请假类型 | |||||
/// </summary> | |||||
[Column("LEAVETYPE")] | |||||
public string LeaveType { get; set; } | |||||
/// <summary> | |||||
/// 请假开始时间 | |||||
/// </summary> | |||||
[Column("STARTTIME")] | |||||
public DateTime? StartTime { get; set; } | |||||
/// <summary> | |||||
/// 请假结束时间 | |||||
/// </summary> | |||||
[Column("ENDTIME")] | |||||
public DateTime? EndTime { get; set; } | |||||
/// <summary> | |||||
/// 请假天数 | |||||
/// </summary> | |||||
[Column("LEAVEDAY")] | |||||
public string LeaveDay { get; set; } | |||||
/// <summary> | |||||
/// 请假事由 | |||||
/// </summary> | |||||
[Column("LEAVEREASON")] | |||||
public string LeaveReason { get; set; } | |||||
/// <summary> | |||||
/// 联系电话 | |||||
/// </summary> | |||||
[Column("TELEPHONE")] | |||||
public string Telephone { get; set; } | |||||
/// <summary> | |||||
/// 附件上传 | |||||
/// </summary> | |||||
[Column("FILES")] | |||||
public string Files { 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; } | |||||
#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 | |||||
} | |||||
} | |||||
@@ -0,0 +1,66 @@ | |||||
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-03 11:29 | |||||
/// 描 述:教师请假管理 | |||||
/// </summary> | |||||
public interface TeacherLeaveManagementIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<TeacherLeaveManagementEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取TeacherLeaveManagement表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
TeacherLeaveManagementEntity GetTeacherLeaveManagementEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// </summary> | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <returns></returns> | |||||
TeacherLeaveManagementEntity 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, TeacherLeaveManagementEntity 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 | |||||
} | |||||
} |
@@ -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 | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-03-03 11:29 | |||||
/// 描 述:教师请假管理 | |||||
/// </summary> | |||||
public class TeacherLeaveManagementService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<TeacherLeaveManagementEntity> 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<TeacherLeaveManagementEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取TeacherLeaveManagement表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public TeacherLeaveManagementEntity GetTeacherLeaveManagementEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<TeacherLeaveManagementEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// </summary> | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <returns></returns> | |||||
public TeacherLeaveManagementEntity GetEntityByProcessId(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<TeacherLeaveManagementEntity>(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<TeacherLeaveManagementEntity>(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, 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); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 提交实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
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); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 审核实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
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 | |||||
} | |||||
} |
@@ -118,6 +118,7 @@ | |||||
<Compile Include="NodeMethod\Ass_AssetsInfoApplyMethod.cs" /> | <Compile Include="NodeMethod\Ass_AssetsInfoApplyMethod.cs" /> | ||||
<Compile Include="NodeMethod\INodeMethod.cs" /> | <Compile Include="NodeMethod\INodeMethod.cs" /> | ||||
<Compile Include="NodeMethod\NodeMethod.cs" /> | <Compile Include="NodeMethod\NodeMethod.cs" /> | ||||
<Compile Include="NodeMethod\TeacherLeaveManagementMethod.cs" /> | |||||
<Compile Include="NodeMethod\WfMethodParameter.cs" /> | <Compile Include="NodeMethod\WfMethodParameter.cs" /> | ||||
<Compile Include="NodeMethod\WF\WFFileRelease.cs" /> | <Compile Include="NodeMethod\WF\WFFileRelease.cs" /> | ||||
<Compile Include="Node\WfForm.cs" /> | <Compile Include="Node\WfForm.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); | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -148,5 +148,32 @@ namespace Learun.Util | |||||
} | } | ||||
return result; | return result; | ||||
} | } | ||||
public static string HttpPosts(string url, string json, WebHeaderCollection header) | |||||
{ | |||||
string result = ""; | |||||
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); | |||||
req.Method = "POST"; | |||||
req.ContentType = "application/json;charset=UTF-8"; | |||||
req.Headers.Add(header); | |||||
byte[] data = Encoding.UTF8.GetBytes(json);//把字符串转换为字节 | |||||
req.ContentLength = data.Length; //请求长度 | |||||
using (Stream reqStream = req.GetRequestStream()) //获取 | |||||
{ | |||||
reqStream.Write(data, 0, data.Length);//向当前流中写入字节 | |||||
reqStream.Close(); //关闭当前流 | |||||
} | |||||
HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); //响应结果 | |||||
Stream stream = resp.GetResponseStream(); | |||||
//获取响应内容 | |||||
using (StreamReader reader = new StreamReader(stream, Encoding.UTF8)) | |||||
{ | |||||
result = reader.ReadToEnd(); | |||||
} | |||||
return result; | |||||
} | |||||
} | } | ||||
} | } |