diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/RetireForecastController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/RetireForecastController.cs
new file mode 100644
index 000000000..b76c1ec94
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/RetireForecastController.cs
@@ -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
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-08-02 10:14
+ /// 描 述:人员退休预测
+ ///
+ public class RetireForecastController : MvcControllerBase
+ {
+ private RetireForecastIBLL retireForecastIBLL = new RetireForecastBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = retireForecastIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var RetireForecastData = retireForecastIBLL.GetRetireForecastEntity( keyValue );
+ var jsonData = new {
+ RetireForecast = RetireForecastData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ retireForecastIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ RetireForecastEntity entity = strEntity.ToObject();
+ retireForecastIBLL.SaveEntity(keyValue,entity);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/RetireForecast/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/RetireForecast/Form.cshtml
new file mode 100644
index 000000000..b1d6dfed7
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/RetireForecast/Form.cshtml
@@ -0,0 +1,15 @@
+@{
+ ViewBag.Title = "人员退休预测";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/CustomFunction/Views/RetireForecast/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/RetireForecast/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/RetireForecast/Form.js
new file mode 100644
index 000000000..ad851a7fd
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/RetireForecast/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/RetireForecast/Index.cshtml
new file mode 100644
index 000000000..045a7635b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/RetireForecast/Index.cshtml
@@ -0,0 +1,37 @@
+@{
+ ViewBag.Title = "人员退休预测";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/CustomFunction/Views/RetireForecast/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/RetireForecast/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/RetireForecast/Index.js
new file mode 100644
index 000000000..df6e7672b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherRetireController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherRetireController.cs
index e6a180115..13f317f9c 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherRetireController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherRetireController.cs
@@ -37,6 +37,16 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
{
return View();
}
+ ///
+ /// 统计
+ ///
+ ///
+ [HttpGet]
+ public ActionResult IndexTJ()
+ {
+ return View();
+ }
+
#endregion
#region 获取数据
@@ -75,6 +85,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
};
return Success(jsonData);
}
+
+
+ ///
+ /// 获取统计数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetListForTJ()
+ {
+ var data = teacherRetireIBLL.GetListForTJ();
+ return Success(data);
+ }
#endregion
#region 提交数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/IndexTJ.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/IndexTJ.cshtml
new file mode 100644
index 000000000..bef299572
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/IndexTJ.cshtml
@@ -0,0 +1,27 @@
+@{
+ ViewBag.Title = "退休教职工";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherRetire/IndexTJ.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/IndexTJ.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/IndexTJ.js
new file mode 100644
index 000000000..db1816f7f
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/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();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index 138e1c7ce..50a080fc6 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -840,6 +840,7 @@
+
@@ -1456,6 +1457,7 @@
+
@@ -6538,6 +6540,10 @@
+
+
+
+
@@ -7364,6 +7370,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/RetireForecastMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/RetireForecastMap.cs
new file mode 100644
index 000000000..68bfead59
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/CustomFunction/RetireForecastMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.CustomFunction;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-08-02 10:14
+ /// 描 述:人员退休预测
+ ///
+ public class RetireForecastMap : EntityTypeConfiguration
+ {
+ public RetireForecastMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("RETIREFORECAST");
+ //主键
+ this.HasKey(t => t.Id);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
index 29040b16f..5e76b826c 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
@@ -589,6 +589,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/RetireForecast/RetireForecastBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/RetireForecast/RetireForecastBLL.cs
new file mode 100644
index 000000000..1fa944d0e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/RetireForecast/RetireForecastBLL.cs
@@ -0,0 +1,125 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.CustomFunction
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-08-02 10:14
+ /// 描 述:人员退休预测
+ ///
+ public class RetireForecastBLL : RetireForecastIBLL
+ {
+ private RetireForecastService retireForecastService = new RetireForecastService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return retireForecastService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取RetireForecast表实体数据
+ ///
+ /// 主键
+ ///
+ 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 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ retireForecastService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ 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
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/RetireForecast/RetireForecastEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/RetireForecast/RetireForecastEntity.cs
new file mode 100644
index 000000000..863a4c482
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/RetireForecast/RetireForecastEntity.cs
@@ -0,0 +1,74 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.CustomFunction
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-08-02 10:14
+ /// 描 述:人员退休预测
+ ///
+ public class RetireForecastEntity
+ {
+ #region 实体成员
+ ///
+ /// 主键
+ ///
+ [Column("ID")]
+ public string Id { get; set; }
+ ///
+ /// 标题
+ ///
+ [Column("TITLE")]
+ public string Title { get; set; }
+ ///
+ /// 备注
+ ///
+ [Column("REMARK")]
+ public string Remark { get; set; }
+ ///
+ /// 创建时间
+ ///
+ [Column("CREATETIME")]
+ public DateTime? CreateTime { get; set; }
+ ///
+ /// 创建人
+ ///
+ [Column("CREATEUSERID")]
+ public string CreateUserId { get; set; }
+ ///
+ /// 创建人
+ ///
+ [Column("CREATEUSERNAME")]
+ public string CreateUserName { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.Id = Guid.NewGuid().ToString();
+ this.CreateTime = DateTime.Now;
+ var userinfo = LoginUserInfo.Get();
+ this.CreateUserId = userinfo.userId;
+ this.CreateUserName = userinfo.realName;
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.Id = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/RetireForecast/RetireForecastIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/RetireForecast/RetireForecastIBLL.cs
new file mode 100644
index 000000000..e1aacb215
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/RetireForecast/RetireForecastIBLL.cs
@@ -0,0 +1,48 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.CustomFunction
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-08-02 10:14
+ /// 描 述:人员退休预测
+ ///
+ public interface RetireForecastIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取RetireForecast表实体数据
+ ///
+ /// 主键
+ ///
+ RetireForecastEntity GetRetireForecastEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, RetireForecastEntity entity);
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/RetireForecast/RetireForecastService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/RetireForecast/RetireForecastService.cs
new file mode 100644
index 000000000..18f97bd7e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/RetireForecast/RetireForecastService.cs
@@ -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
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2021-08-02 10:14
+ /// 描 述:人员退休预测
+ ///
+ public class RetireForecastService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable 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(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取RetireForecast表实体数据
+ ///
+ /// 主键
+ ///
+ public RetireForecastEntity GetRetireForecastEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, 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
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
index feb2bf4d5..22616277b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
@@ -1,5 +1,5 @@
-
+
@@ -12566,9 +12566,9 @@ LABL 0 新宋体,8,N
1627612649
-1627612654
+1627637184
-1
-((148502,-92137), (163558,-79461))
+((148682,-91319), (163738,-79941))
0
12615680
16570034
@@ -52041,10 +52041,10 @@ B9AF
E886A047-DEB8-43D0-A58A-4225D04EEFCB
反聘人员管理
-ReturnRetire
+RetireReturn
1569645311
edy
-1627614400
+1627614822
edy
反聘人员管理
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
index bee17482c..5eae02050 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
@@ -1774,6 +1774,10 @@
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireBLL.cs
index c501fc227..8f732e5b7 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireBLL.cs
@@ -42,6 +42,31 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ public IEnumerable GetListForTJ()
+ {
+ try
+ {
+ return teacherRetireService.GetListForTJ();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
///
/// 获取TeacherRetire表实体数据
/// 主键
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireEntity.cs
index 0714185de..d1ea3f380 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireEntity.cs
@@ -69,6 +69,22 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
#endregion
#region 扩展字段
+ ///
+ /// 年份
+ ///
+ [NotMapped]
+ public int year { get; set; }
+ ///
+ /// 退休
+ ///
+ [NotMapped]
+ public int numtx { get; set; }
+ ///
+ /// 离职
+ ///
+ [NotMapped]
+ public int numlz { get; set; }
+
#endregion
}
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireIBLL.cs
index 8e4a0e447..2520d0507 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireIBLL.cs
@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// 查询参数
///
IEnumerable GetPageList(Pagination pagination, string queryJson);
+ IEnumerable GetListForTJ();
///
/// 获取TeacherRetire表实体数据
/// 主键
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireService.cs
index c3d7ef99a..0253e5164 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherRetire/TeacherRetireService.cs
@@ -63,6 +63,33 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}
+ public IEnumerable 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(sql);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
///
/// 获取TeacherRetire表实体数据
/// 主键