@@ -0,0 +1,117 @@ | |||
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-08-02 10:14 | |||
/// 描 述:人员退休预测 | |||
/// </summary> | |||
public class RetireForecastController : MvcControllerBase | |||
{ | |||
private RetireForecastIBLL retireForecastIBLL = new RetireForecastBLL(); | |||
#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 = retireForecastIBLL.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 RetireForecastData = retireForecastIBLL.GetRetireForecastEntity( keyValue ); | |||
var jsonData = new { | |||
RetireForecast = RetireForecastData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
retireForecastIBLL.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) | |||
{ | |||
RetireForecastEntity entity = strEntity.ToObject<RetireForecastEntity>(); | |||
retireForecastIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "人员退休预测"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="RetireForecast" > | |||
<div class="lr-form-item-title">标题</div> | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="RetireForecast" > | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/CustomFunction/Views/RetireForecast/Form.js") |
@@ -0,0 +1,50 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-08-02 10:14 | |||
* 描 述:人员退休预测 | |||
*/ | |||
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 () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/CustomFunction/RetireForecast/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/RetireForecast/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,37 @@ | |||
@{ | |||
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> | |||
<input id="Title" 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> | |||
<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/RetireForecast/Index.js") |
@@ -0,0 +1,101 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-08-02 10:14 | |||
* 描 述:人员退休预测 | |||
*/ | |||
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); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/CustomFunction/RetireForecast/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/RetireForecast/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/RetireForecast/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/CustomFunction/RetireForecast/GetPageList', | |||
headData: [ | |||
{ label: "标题", name: "Title", width: 100, align: "left" }, | |||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||
{ | |||
label: "创建时间", name: "CreateTime", width: 100, align: "left", | |||
formatter: function (value) { | |||
return learun.formatDate(value, 'yyyy-MM-dd'); | |||
} | |||
}, | |||
{ label: "创建人", name: "CreateUserName", width: 100, align: "left" } | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
sidx: 'CreateTime', | |||
sord: 'DESC', | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -37,6 +37,16 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 统计 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexTJ() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -75,6 +85,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取统计数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetListForTJ() | |||
{ | |||
var data = teacherRetireIBLL.GetListForTJ(); | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -0,0 +1,27 @@ | |||
@{ | |||
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> | |||
</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"> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherRetire/IndexTJ.js") |
@@ -0,0 +1,48 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-03-19 14:27 | |||
* 描 述:退休教职工 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var startTime; | |||
var endTime; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/PersonnelManagement/TeacherRetire/GetListForTJ', | |||
headData: [ | |||
{ | |||
label: "年份", name: "year", width: 100, align: "left" | |||
}, | |||
{ label: "离职人数", name: "numlz", width: 100, align: "left" }, | |||
{ label: "退休人数", name: "numtx", width: 100, align: "left" }, | |||
], | |||
mainId: 'year', | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -840,6 +840,7 @@ | |||
<Compile Include="Areas\CustomFunction\Controllers\RetireConditionController.cs" /> | |||
<Compile Include="Areas\CustomFunction\Controllers\EstimateRetireController.cs" /> | |||
<Compile Include="Areas\CustomFunction\Controllers\RetireReturnController.cs" /> | |||
<Compile Include="Areas\CustomFunction\Controllers\RetireForecastController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -1456,6 +1457,7 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\TeacherReimbursementManagement\Form.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\TeacherReimbursementManagement\Index.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\TeacherRetire\IndexTJ.js" /> | |||
<Content Include="Areas\Statistics\Views\ChargingReport\Index.js" /> | |||
<Content Include="Areas\Statistics\Views\StudentAttendanceReport\Index.js" /> | |||
<Content Include="Areas\Statistics\Views\TeacherAttendanceReport\Index.js" /> | |||
@@ -6538,6 +6540,10 @@ | |||
<Content Include="Areas\CustomFunction\Views\RetireReturn\Index.js" /> | |||
<Content Include="Areas\CustomFunction\Views\RetireReturn\Form.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\RetireReturn\Form.js" /> | |||
<Content Include="Areas\CustomFunction\Views\RetireForecast\Index.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\RetireForecast\Index.js" /> | |||
<Content Include="Areas\CustomFunction\Views\RetireForecast\Form.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\RetireForecast\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\LR_Desktop\Models\" /> | |||
@@ -7364,6 +7370,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\DtStuLeave\FormView.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\EstimateRetire\IndexYT.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\EstimateRetire\FormYT.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\TeacherRetire\IndexTJ.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-08-02 10:14 | |||
/// 描 述:人员退休预测 | |||
/// </summary> | |||
public class RetireForecastMap : EntityTypeConfiguration<RetireForecastEntity> | |||
{ | |||
public RetireForecastMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("RETIREFORECAST"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -589,6 +589,7 @@ | |||
<Compile Include="CustomFunction\RetireConditionMap.cs" /> | |||
<Compile Include="CustomFunction\EstimateRetireMap.cs" /> | |||
<Compile Include="CustomFunction\RetireReturnMap.cs" /> | |||
<Compile Include="CustomFunction\RetireForecastMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,125 @@ | |||
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-08-02 10:14 | |||
/// 描 述:人员退休预测 | |||
/// </summary> | |||
public class RetireForecastBLL : RetireForecastIBLL | |||
{ | |||
private RetireForecastService retireForecastService = new RetireForecastService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<RetireForecastEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return retireForecastService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取RetireForecast表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public RetireForecastEntity GetRetireForecastEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return retireForecastService.GetRetireForecastEntity(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 | |||
{ | |||
retireForecastService.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, RetireForecastEntity entity) | |||
{ | |||
try | |||
{ | |||
retireForecastService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,74 @@ | |||
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-08-02 10:14 | |||
/// 描 述:人员退休预测 | |||
/// </summary> | |||
public class RetireForecastEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 主键 | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 标题 | |||
/// </summary> | |||
[Column("TITLE")] | |||
public string Title { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { 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,48 @@ | |||
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-08-02 10:14 | |||
/// 描 述:人员退休预测 | |||
/// </summary> | |||
public interface RetireForecastIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<RetireForecastEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取RetireForecast表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
RetireForecastEntity GetRetireForecastEntity(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, RetireForecastEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,151 @@ | |||
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-08-02 10:14 | |||
/// 描 述:人员退休预测 | |||
/// </summary> | |||
public class RetireForecastService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<RetireForecastEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.Title, | |||
t.Remark,t.CreateTime,t.CreateUserName | |||
"); | |||
strSql.Append(" FROM RetireForecast t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["Title"].IsEmpty()) | |||
{ | |||
dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Title Like @Title "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<RetireForecastEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取RetireForecast表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public RetireForecastEntity GetRetireForecastEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<RetireForecastEntity>(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<RetireForecastEntity>(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, RetireForecastEntity 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); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -1,5 +1,5 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<?PowerDesigner AppLocale="UTF16" ID="{88086B01-C9E1-11D4-9552-0090277716A9}" Label="" LastModificationDate="1627614400" Name="Physical Data Model 1" Objects="3561" Symbols="409" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?> | |||
<?PowerDesigner AppLocale="UTF16" ID="{88086B01-C9E1-11D4-9552-0090277716A9}" Label="" LastModificationDate="1627637184" Name="Physical Data Model 1" Objects="3560" Symbols="409" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?> | |||
<!-- do not edit this file --> | |||
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object"> | |||
@@ -12566,9 +12566,9 @@ LABL 0 新宋体,8,N</a:FontList> | |||
</o:TableSymbol> | |||
<o:TableSymbol Id="o672"> | |||
<a:CreationDate>1627612649</a:CreationDate> | |||
<a:ModificationDate>1627612654</a:ModificationDate> | |||
<a:ModificationDate>1627637184</a:ModificationDate> | |||
<a:IconMode>-1</a:IconMode> | |||
<a:Rect>((148502,-92137), (163558,-79461))</a:Rect> | |||
<a:Rect>((148682,-91319), (163738,-79941))</a:Rect> | |||
<a:AutoAdjustToText>0</a:AutoAdjustToText> | |||
<a:LineColor>12615680</a:LineColor> | |||
<a:FillColor>16570034</a:FillColor> | |||
@@ -52041,10 +52041,10 @@ B9AF | |||
<o:Table Id="o673"> | |||
<a:ObjectID>E886A047-DEB8-43D0-A58A-4225D04EEFCB</a:ObjectID> | |||
<a:Name>反聘人员管理</a:Name> | |||
<a:Code>ReturnRetire</a:Code> | |||
<a:Code>RetireReturn</a:Code> | |||
<a:CreationDate>1569645311</a:CreationDate> | |||
<a:Creator>edy</a:Creator> | |||
<a:ModificationDate>1627614400</a:ModificationDate> | |||
<a:ModificationDate>1627614822</a:ModificationDate> | |||
<a:Modifier>edy</a:Modifier> | |||
<a:Comment>反聘人员管理</a:Comment> | |||
<a:TotalSavingCurrency/> | |||
@@ -1774,6 +1774,10 @@ | |||
<Compile Include="CustomFunction\RetireReturn\RetireReturnService.cs" /> | |||
<Compile Include="CustomFunction\RetireReturn\RetireReturnBLL.cs" /> | |||
<Compile Include="CustomFunction\RetireReturn\RetireReturnIBLL.cs" /> | |||
<Compile Include="CustomFunction\RetireForecast\RetireForecastEntity.cs" /> | |||
<Compile Include="CustomFunction\RetireForecast\RetireForecastService.cs" /> | |||
<Compile Include="CustomFunction\RetireForecast\RetireForecastBLL.cs" /> | |||
<Compile Include="CustomFunction\RetireForecast\RetireForecastIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -42,6 +42,31 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<TeacherRetireEntity> GetListForTJ() | |||
{ | |||
try | |||
{ | |||
return teacherRetireService.GetListForTJ(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取TeacherRetire表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -69,6 +69,22 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
/// <summary> | |||
/// 年份 | |||
/// </summary> | |||
[NotMapped] | |||
public int year { get; set; } | |||
/// <summary> | |||
/// 退休 | |||
/// </summary> | |||
[NotMapped] | |||
public int numtx { get; set; } | |||
/// <summary> | |||
/// 离职 | |||
/// </summary> | |||
[NotMapped] | |||
public int numlz { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<TeacherRetireEntity> GetPageList(Pagination pagination, string queryJson); | |||
IEnumerable<TeacherRetireEntity> GetListForTJ(); | |||
/// <summary> | |||
/// 获取TeacherRetire表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -63,6 +63,33 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
public IEnumerable<TeacherRetireEntity> GetListForTJ() | |||
{ | |||
try | |||
{ | |||
var sql = @"select (case when year1 is null or len(year1)<=0 then year2 else year1 end) as year, | |||
ISNULL(numtx,0) as numtx,ISNULL(numlz,0) as numlz from | |||
(select year(trtime) as year1,count(1) as numtx from TeacherRetire group by year(trtime) ) a | |||
full join | |||
(select year(tdtime) as year2,count(1) as numlz from TeacherDimission group by year(tdtime) ) b | |||
on a.year1=b.year2 | |||
order by year desc | |||
"; | |||
return this.BaseRepository().FindList<TeacherRetireEntity>(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取TeacherRetire表实体数据 | |||
/// <param name="keyValue">主键</param> | |||