@@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -35,8 +35,27 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 延退人员管理 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexYT() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 延退人员管理 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormYT() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -71,8 +90,9 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var EstimateRetireData = estimateRetireIBLL.GetEstimateRetireEntity( keyValue ); | |||
var jsonData = new { | |||
var EstimateRetireData = estimateRetireIBLL.GetEstimateRetireEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
EstimateRetire = EstimateRetireData, | |||
}; | |||
return Success(jsonData); | |||
@@ -105,12 +125,53 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
EstimateRetireEntity entity = strEntity.ToObject<EstimateRetireEntity>(); | |||
estimateRetireIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
var erEntity = estimateRetireIBLL.GetEntityByEId(entity.EID); | |||
if (entity.Status == 0) | |||
{ | |||
if ((string.IsNullOrEmpty(keyValue) && erEntity != null) || (!string.IsNullOrEmpty(keyValue) && erEntity != null && keyValue != erEntity.Id)) | |||
{ | |||
if (erEntity.Status == 0) | |||
{ | |||
return Fail("该教师已存在!"); | |||
} | |||
else if (erEntity.Status == 1) | |||
{ | |||
return Fail("该教师已退休!"); | |||
} | |||
else if (erEntity.Status == 2) | |||
{ | |||
return Fail("该教师已延退!"); | |||
} | |||
} | |||
} | |||
estimateRetireIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 退休 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult RetireForm(string keyValue) | |||
{ | |||
estimateRetireIBLL.RetireForm(keyValue); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 延退 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DelayForm(string keyValue, int Status) | |||
{ | |||
estimateRetireIBLL.DelayForm(keyValue, Status); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
@@ -0,0 +1,131 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.CustomFunction; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-07-30 11:33 | |||
/// 描 述:反聘人员管理 | |||
/// </summary> | |||
public class RetireReturnController : MvcControllerBase | |||
{ | |||
private RetireReturnIBLL retireReturnIBLL = new RetireReturnBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
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 = retireReturnIBLL.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 RetireReturnData = retireReturnIBLL.GetRetireReturnEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
RetireReturn = RetireReturnData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
retireReturnIBLL.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) | |||
{ | |||
RetireReturnEntity entity = strEntity.ToObject<RetireReturnEntity>(); | |||
retireReturnIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 撤销 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult UpdateIsShow(string keyValue, int IsShow) | |||
{ | |||
retireReturnIBLL.UpdateIsShow(keyValue, IsShow); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -3,25 +3,29 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire" > | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire" style="display: none;"> | |||
<div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div> | |||
<div id="EID" isvalid="yes" checkexpession="NotNull" ></div> | |||
<input id="Status" type="text" class="form-control" value="0" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire" > | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire"> | |||
<div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div> | |||
<div id="EID" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire"> | |||
<div class="lr-form-item-title">原在职状态</div> | |||
<div id="EStatus" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire" > | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire"> | |||
<div class="lr-form-item-title">预退休时间<font face="宋体">*</font></div> | |||
<input id="Time" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Time').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="Time" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#Time').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire" > | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire"> | |||
<div class="lr-form-item-title">预退休年龄<font face="宋体">*</font></div> | |||
<input id="Ages" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire" > | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Comment" class="form-control" style="height:100px;" ></textarea> | |||
<textarea id="Comment" class="form-control" style="height: 100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/CustomFunction/Views/EstimateRetire/Form.js") |
@@ -0,0 +1,31 @@ | |||
@{ | |||
ViewBag.Title = "预退休人员管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire" style="display: none;"> | |||
<div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div> | |||
<input id="Status" type="text" class="form-control" value="2" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire"> | |||
<div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div> | |||
<div id="EID" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire"> | |||
<div class="lr-form-item-title">原在职状态</div> | |||
<div id="EStatus" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire"> | |||
<div class="lr-form-item-title">延迟退休时间<font face="宋体">*</font></div> | |||
<input id="Time" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Time').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire"> | |||
<div class="lr-form-item-title">延迟退休年龄<font face="宋体">*</font></div> | |||
<input id="Ages" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EstimateRetire"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Comment" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/CustomFunction/Views/EstimateRetire/FormYT.js") |
@@ -0,0 +1,64 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-07-27 17:53 | |||
* 描 述:预退休人员管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#EID').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo', | |||
param: { strWhere: "1=1 " }, | |||
value: "empid", | |||
text: "empname", | |||
select: function (item) { | |||
if (item) { | |||
$('#EStatus').lrselectSet(item.isinactivestatus); | |||
} | |||
} | |||
}); | |||
//$('#EID').lrDataSourceSelect({ code: 'EmpInfo',value: 'empid',text: 'empname' }); | |||
$('#EStatus').lrDataItemSelect({ code: 'JobStatus' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/CustomFunction/EstimateRetire/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]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/CustomFunction/EstimateRetire/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -16,8 +16,15 @@ var bootstrap = function ($, learun) { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#EID').lrDataSourceSelect({ code: 'EmpInfo',value: 'empid',text: 'empname' }); | |||
$('#EStatus').lrDataItemSelect({ code: 'JobStatus' }); | |||
$('#EID').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo', | |||
param: { strWhere: "1=1 " }, | |||
value: "empid", | |||
text: "empname", | |||
maxHeight: 160 | |||
}); | |||
$('#EStatus').lrDataItemSelect({ code: 'JobStatus', maxHeight: 160}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -57,7 +64,33 @@ var bootstrap = function ($, learun) { | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/CustomFunction/EstimateRetire/DeleteForm', { keyValue: keyValue}, function () { | |||
learun.deleteForm(top.$.rootUrl + '/CustomFunction/EstimateRetire/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 退休 | |||
$('#lr_tx').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认退休该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/CustomFunction/EstimateRetire/RetireForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 延退 | |||
$('#lr_yt').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认延退该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/CustomFunction/EstimateRetire/DelayForm', { keyValue: keyValue, Status: 2 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
@@ -74,39 +107,44 @@ var bootstrap = function ($, learun) { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/CustomFunction/EstimateRetire/GetPageList', | |||
headData: [ | |||
{ label: "教师姓名", name: "EID", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: value, | |||
keyId: 'empid', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
}}, | |||
{ label: "原在职状态", name: "EStatus", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'JobStatus', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
}}, | |||
{ label: "预退休时间", name: "Time", width: 100, align: "left"}, | |||
{ label: "预退休年龄", name: "Ages", width: 100, align: "left"}, | |||
{ label: "备注", name: "Comment", width: 100, align: "left"}, | |||
{ | |||
label: "教师姓名", name: "EID", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: value, | |||
keyId: 'empid', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "原在职状态", name: "EStatus", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'JobStatus', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "预退休时间", name: "Time", width: 100, align: "left" }, | |||
{ label: "预退休年龄", name: "Ages", width: 100, align: "left" }, | |||
{ label: "备注", name: "Comment", width: 100, align: "left" }, | |||
], | |||
mainId:'Id', | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
param.SqlParameter = " and Status=0"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
@@ -0,0 +1,43 @@ | |||
@{ | |||
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="EID"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">原在职状态</div> | |||
<div id="EStatus"></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> 新增</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> | |||
<a id="lr_cancle" class="btn btn-default"><i class="fa fa-plus"></i> 撤销</a> | |||
<a id="lr_tx" class="btn btn-default"><i class="fa fa-plus"></i> 退休</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/CustomFunction/Views/EstimateRetire/IndexYT.js") |
@@ -0,0 +1,150 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-07-27 17:53 | |||
* 描 述:预退休人员管理 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#EID').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo', | |||
param: { strWhere: "1=1 " }, | |||
value: "empid", | |||
text: "empname", | |||
maxHeight: 160 | |||
}); | |||
$('#EStatus').lrDataItemSelect({ code: 'JobStatus' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/CustomFunction/EstimateRetire/FormYT', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/CustomFunction/EstimateRetire/FormYT?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/CustomFunction/EstimateRetire/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 退休 | |||
$('#lr_tx').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认退休该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/CustomFunction/EstimateRetire/RetireForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 延退 | |||
$('#lr_cancle').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认撤销该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/CustomFunction/EstimateRetire/DelayForm', { keyValue: keyValue, Status: 0 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/CustomFunction/EstimateRetire/GetPageList', | |||
headData: [ | |||
{ label: "教师姓名", name: "EID", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: value, | |||
keyId: 'empid', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
}}, | |||
{ label: "原在职状态", name: "EStatus", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'JobStatus', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
}}, | |||
{ label: "延迟退休时间", name: "Time", width: 100, align: "left"}, | |||
{ label: "延迟退休年龄", name: "Ages", width: 100, align: "left"}, | |||
{ label: "备注", name: "Comment", width: 100, align: "left"}, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = " and Status=2"; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,23 @@ | |||
@{ | |||
ViewBag.Title = "反聘人员管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="RetireReturn" > | |||
<div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div> | |||
<div id="EID" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="RetireReturn" > | |||
<div class="lr-form-item-title">返聘时间<font face="宋体">*</font></div> | |||
<input id="Time" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Time').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="RetireReturn" > | |||
<div class="lr-form-item-title">返聘年龄<font face="宋体">*</font></div> | |||
<input id="Ages" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="RetireReturn" > | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Comment" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/CustomFunction/Views/RetireReturn/Form.js") |
@@ -0,0 +1,60 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-07-30 11:33 | |||
* 描 述:反聘人员管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#EID').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo', | |||
param: { strWhere: "1=1 " }, | |||
value: "empid", | |||
text: "empname", | |||
maxHeight: 160 | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/CustomFunction/RetireReturn/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]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var strEntity = $('body').lrGetFormData(); | |||
strEntity.IsShow = 1; | |||
var postData = { | |||
strEntity: JSON.stringify(strEntity) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/CustomFunction/RetireReturn/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,42 @@ | |||
@{ | |||
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="EID"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">返聘时间</div> | |||
<input id="Time" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Time').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</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> | |||
<a id="lr_cancle" class="btn btn-default"><i class="fa fa-trash-o"></i> 撤销</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/CustomFunction/Views/RetireReturn/Index.js") |
@@ -0,0 +1,129 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-07-30 11:33 | |||
* 描 述:反聘人员管理 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#EID').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo', | |||
param: { strWhere: "1=1 " }, | |||
value: "empid", | |||
text: "empname", | |||
maxHeight: 160 | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/CustomFunction/RetireReturn/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/CustomFunction/RetireReturn/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/CustomFunction/RetireReturn/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 撤销 | |||
$('#lr_cancle').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认撤销该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/CustomFunction/RetireReturn/UpdateIsShow', { keyValue: keyValue, IsShow: 0 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/CustomFunction/RetireReturn/GetPageList', | |||
headData: [ | |||
{ | |||
label: "教师姓名", name: "EID", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: value, | |||
keyId: 'empid', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "返聘时间", name: "Time", width: 100, align: "left" }, | |||
{ label: "返聘年龄", name: "Ages", width: 100, align: "left" }, | |||
{ label: "备注", name: "Comment", width: 100, align: "left" }, | |||
], | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = " and IsShow=1"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -839,6 +839,7 @@ | |||
<Compile Include="Areas\CustomFunction\Controllers\SystemManageController.cs" /> | |||
<Compile Include="Areas\CustomFunction\Controllers\RetireConditionController.cs" /> | |||
<Compile Include="Areas\CustomFunction\Controllers\EstimateRetireController.cs" /> | |||
<Compile Include="Areas\CustomFunction\Controllers\RetireReturnController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -954,6 +955,8 @@ | |||
<Content Include="Areas\CustomFunction\Views\ArchiveUser\IndexTJ.js" /> | |||
<Content Include="Areas\CustomFunction\Views\ArchiveUser\IndexYJ.js" /> | |||
<Content Include="Areas\CustomFunction\Views\ArchiveUser\IndexData.js" /> | |||
<Content Include="Areas\CustomFunction\Views\EstimateRetire\FormYT.js" /> | |||
<Content Include="Areas\CustomFunction\Views\EstimateRetire\IndexYT.js" /> | |||
<Content Include="Areas\CustomFunction\Views\OfficialSealRecord\Form.js" /> | |||
<Content Include="Areas\CustomFunction\Views\OfficialSealRecord\Index.js" /> | |||
<Content Include="Areas\CustomFunction\Views\OfficialSealUse\Form.js" /> | |||
@@ -6531,6 +6534,10 @@ | |||
<Content Include="Areas\CustomFunction\Views\EstimateRetire\Index.js" /> | |||
<Content Include="Areas\CustomFunction\Views\EstimateRetire\Form.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\EstimateRetire\Form.js" /> | |||
<Content Include="Areas\CustomFunction\Views\RetireReturn\Index.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\RetireReturn\Index.js" /> | |||
<Content Include="Areas\CustomFunction\Views\RetireReturn\Form.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\RetireReturn\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\LR_Desktop\Models\" /> | |||
@@ -7355,6 +7362,8 @@ | |||
<Content Include="Areas\CustomFunction\Views\VehicleCost\IndexCost.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\VehicleCost\FormBuy.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtStuLeave\FormView.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\EstimateRetire\IndexYT.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\EstimateRetire\FormYT.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.CustomFunction; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-07-30 11:33 | |||
/// 描 述:反聘人员管理 | |||
/// </summary> | |||
public class RetireReturnMap : EntityTypeConfiguration<RetireReturnEntity> | |||
{ | |||
public RetireReturnMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("RETIRERETURN"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -588,6 +588,7 @@ | |||
<Compile Include="CustomFunction\SystemManageMap.cs" /> | |||
<Compile Include="CustomFunction\RetireConditionMap.cs" /> | |||
<Compile Include="CustomFunction\EstimateRetireMap.cs" /> | |||
<Compile Include="CustomFunction\RetireReturnMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -66,7 +66,29 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取EstimateRetire表实体数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
public EstimateRetireEntity GetEntityByEId(string eid) | |||
{ | |||
try | |||
{ | |||
return estimateRetireService.GetEntityByEId(eid); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -119,6 +141,44 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
} | |||
} | |||
public void RetireForm(string keyValue) | |||
{ | |||
try | |||
{ | |||
estimateRetireService.RetireForm(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void DelayForm(string keyValue, int Status) | |||
{ | |||
try | |||
{ | |||
estimateRetireService.DelayForm(keyValue,Status); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
/// 日 期:2021-07-27 17:53 | |||
/// 描 述:预退休人员管理 | |||
/// </summary> | |||
public class EstimateRetireEntity | |||
public class EstimateRetireEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
@@ -49,7 +49,12 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
/// </summary> | |||
[Column("IsShow")] | |||
public int? IsShow { get; set; } | |||
/// <summary> | |||
/// 状态(0:预退休,1:退休,2:延退) | |||
/// </summary> | |||
[Column("STATUS")] | |||
public int? Status { get; set; } | |||
/// <summary> | |||
/// 创建时间 | |||
/// </summary> | |||
@@ -27,6 +27,12 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
EstimateRetireEntity GetEstimateRetireEntity(string keyValue); | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="eid"></param> | |||
/// <returns></returns> | |||
EstimateRetireEntity GetEntityByEId(string eid); | |||
#endregion | |||
#region 提交数据 | |||
@@ -36,6 +42,8 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
void RetireForm(string keyValue); | |||
void DelayForm(string keyValue, int Status); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
@@ -5,6 +5,7 @@ using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||
namespace Learun.Application.TwoDevelopment.CustomFunction | |||
{ | |||
@@ -46,15 +47,20 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["EID"].IsEmpty()) | |||
{ | |||
dp.Add("EID",queryParam["EID"].ToString(), DbType.String); | |||
dp.Add("EID", queryParam["EID"].ToString(), DbType.String); | |||
strSql.Append(" AND t.EID = @EID "); | |||
} | |||
if (!queryParam["EStatus"].IsEmpty()) | |||
{ | |||
dp.Add("EStatus",queryParam["EStatus"].ToString(), DbType.String); | |||
dp.Add("EStatus", queryParam["EStatus"].ToString(), DbType.String); | |||
strSql.Append(" AND t.EStatus = @EStatus "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<EstimateRetireEntity>(strSql.ToString(),dp, pagination); | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<EstimateRetireEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -92,6 +98,28 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取EstimateRetire表实体数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
public EstimateRetireEntity GetEntityByEId(string eid) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<EstimateRetireEntity>(x => x.EID == eid); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
@@ -105,7 +133,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<EstimateRetireEntity>(t=>t.Id == keyValue); | |||
this.BaseRepository("CollegeMIS").Delete<EstimateRetireEntity>(t => t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -153,6 +181,62 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
} | |||
} | |||
/// <summary> | |||
/// 退休 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void RetireForm(string keyValue) | |||
{ | |||
try | |||
{ | |||
var sql = $"update EstimateRetire set [Status]=1 where Id='{keyValue}'"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
var entity = this.BaseRepository("CollegeMIS").FindEntity<EstimateRetireEntity>(x => x.Id == keyValue); | |||
TeacherRetireEntity trEntity = new TeacherRetireEntity(); | |||
trEntity.Create(); | |||
trEntity.EID = entity.EID; | |||
trEntity.EStatus = entity.EStatus; | |||
trEntity.TRAges = entity.Ages.ToString(); | |||
trEntity.TRTime = entity.Time; | |||
trEntity.TRComment = entity.Comment; | |||
this.BaseRepository().Insert(trEntity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 延退 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DelayForm(string keyValue, int Status) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS") | |||
.ExecuteBySql($"update EstimateRetire set [Status]={Status} where Id='{keyValue}'"); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -0,0 +1,142 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.CustomFunction | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-07-30 11:33 | |||
/// 描 述:反聘人员管理 | |||
/// </summary> | |||
public class RetireReturnBLL : RetireReturnIBLL | |||
{ | |||
private RetireReturnService retireReturnService = new RetireReturnService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<RetireReturnEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return retireReturnService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取RetireReturn表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public RetireReturnEntity GetRetireReturnEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return retireReturnService.GetRetireReturnEntity(keyValue); | |||
} | |||
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 | |||
{ | |||
retireReturnService.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> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, RetireReturnEntity entity) | |||
{ | |||
try | |||
{ | |||
retireReturnService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void UpdateIsShow(string keyValue, int IsShow) | |||
{ | |||
try | |||
{ | |||
retireReturnService.UpdateIsShow(keyValue, IsShow); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,94 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.CustomFunction | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-07-30 11:33 | |||
/// 描 述:反聘人员管理 | |||
/// </summary> | |||
public class RetireReturnEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 主键 | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 教师Id | |||
/// </summary> | |||
[Column("EID")] | |||
public string EID { get; set; } | |||
/// <summary> | |||
/// 姓名 | |||
/// </summary> | |||
[Column("ENAME")] | |||
public string EName { get; set; } | |||
/// <summary> | |||
/// 返聘时间 | |||
/// </summary> | |||
[Column("TIME")] | |||
public DateTime? Time { get; set; } | |||
/// <summary> | |||
/// 返聘年龄 | |||
/// </summary> | |||
[Column("AGES")] | |||
public int? Ages { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("COMMENT")] | |||
public string Comment { get; set; } | |||
/// <summary> | |||
/// 是否显示 | |||
/// </summary> | |||
[Column("ISSHOW")] | |||
public int? IsShow { get; set; } | |||
/// <summary> | |||
/// 创建时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// 创建人 | |||
/// </summary> | |||
[Column("CREATEUSERID")] | |||
public string CreateUserId { get; set; } | |||
/// <summary> | |||
/// 创建人 | |||
/// </summary> | |||
[Column("CREATEUSERNAME")] | |||
public string CreateUserName { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
var userinfo = LoginUserInfo.Get(); | |||
this.CreateUserId = userinfo.userId; | |||
this.CreateUserName = userinfo.realName; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,49 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.CustomFunction | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-07-30 11:33 | |||
/// 描 述:反聘人员管理 | |||
/// </summary> | |||
public interface RetireReturnIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<RetireReturnEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取RetireReturn表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
RetireReturnEntity GetRetireReturnEntity(string keyValue); | |||
#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, RetireReturnEntity entity); | |||
void UpdateIsShow(string keyValue, int IsShow); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,186 @@ | |||
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.CustomFunction | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-07-30 11:33 | |||
/// 描 述:反聘人员管理 | |||
/// </summary> | |||
public class RetireReturnService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<RetireReturnEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.EID, | |||
t.Time, | |||
t.Ages, | |||
t.Comment | |||
"); | |||
strSql.Append(" FROM RetireReturn t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["EID"].IsEmpty()) | |||
{ | |||
dp.Add("EID", queryParam["EID"].ToString(), DbType.String); | |||
strSql.Append(" AND t.EID = @EID "); | |||
} | |||
if (!queryParam["Time"].IsEmpty()) | |||
{ | |||
dp.Add("Time", queryParam["Time"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Time = @Time "); | |||
} | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<RetireReturnEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取RetireReturn表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public RetireReturnEntity GetRetireReturnEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<RetireReturnEntity>(keyValue); | |||
} | |||
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<RetireReturnEntity>(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> | |||
public void SaveEntity(string keyValue, RetireReturnEntity 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> | |||
/// <param name="IsShow"></param> | |||
public void UpdateIsShow(string keyValue, int IsShow) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql($"update RetireReturn set IsShow={IsShow} where Id='{keyValue}'"); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -1770,6 +1770,10 @@ | |||
<Compile Include="CustomFunction\EstimateRetire\EstimateRetireService.cs" /> | |||
<Compile Include="CustomFunction\EstimateRetire\EstimateRetireBLL.cs" /> | |||
<Compile Include="CustomFunction\EstimateRetire\EstimateRetireIBLL.cs" /> | |||
<Compile Include="CustomFunction\RetireReturn\RetireReturnEntity.cs" /> | |||
<Compile Include="CustomFunction\RetireReturn\RetireReturnService.cs" /> | |||
<Compile Include="CustomFunction\RetireReturn\RetireReturnBLL.cs" /> | |||
<Compile Include="CustomFunction\RetireReturn\RetireReturnIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||