From a7b6d09ef05fd97b7ecbb113b8b4bfecf5e4aede Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Wed, 30 Jun 2021 12:06:58 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E5=8B=A4?= =?UTF-8?q?=E5=B7=A5=E4=BF=AD=E5=AD=A6=E7=AE=A1=E7=90=86=EF=BC=9A=E5=B2=97?= =?UTF-8?q?=E4=BD=8D=E7=94=B3=E8=AF=B7=EF=BC=9B=E5=B2=97=E4=BD=8D=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=AE=A1=E6=A0=B8=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorkStudyPositionApplyController.cs | 26 ++++- .../WorkStudyPositionController.cs | 13 +++ .../WorkStudyPositionApply/CheckIndex.cshtml | 40 +++++++ .../WorkStudyPositionApply/CheckIndex.js | 108 ++++++++++++++++++ .../Views/WorkStudyPositionApply/Form.cshtml | 16 ++- .../Views/WorkStudyPositionApply/Form.js | 8 +- .../WorkStudyPositionApply/FormView.cshtml | 23 ++++ .../Views/WorkStudyPositionApply/FormView.js | 57 +++++++++ .../Views/WorkStudyPositionApply/Index.cshtml | 8 +- .../Views/WorkStudyPositionApply/Index.js | 80 +++++-------- .../Learun.Application.Web.csproj | 4 + .../DBModel/资产系统.PDM | 14 +-- .../WorkStudyPosition/WorkStudyPositionBLL.cs | 23 ++++ .../WorkStudyPositionIBLL.cs | 7 ++ .../WorkStudyPositionService.cs | 36 ++++++ .../WorkStudyPositionApplyEntity.cs | 97 ++++++++++++---- .../WorkStudyPositionApplyService.cs | 25 ++-- 17 files changed, 475 insertions(+), 110 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/CheckIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/CheckIndex.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/FormView.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/FormView.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/WorkStudyPositionApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/WorkStudyPositionApplyController.cs index a0ece9a87..6fba3bfec 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/WorkStudyPositionApplyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/WorkStudyPositionApplyController.cs @@ -3,6 +3,7 @@ using System.Data; using Learun.Application.TwoDevelopment.PersonnelManagement; using System.Web.Mvc; using System.Collections.Generic; +using System; namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { @@ -37,6 +38,24 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { return View(); } + /// + /// 表单页-查看 + /// + /// + [HttpGet] + public ActionResult FormView() + { + return View(); + } + /// + /// 主页面-审核 + /// + /// + [HttpGet] + public ActionResult CheckIndex() + { + return View(); + } #endregion #region 获取数据 @@ -103,7 +122,8 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { WorkStudyPositionApplyEntity entity = strEntity.ToObject(); - entity.CheckStatus = false; + entity.CreateTime = DateTime.Now; + entity.CreateUserId = LoginUserInfo.Get().userId; workStudyPositionApplyIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } @@ -115,7 +135,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers /// [HttpPost] [AjaxOnly] - public ActionResult DoCheck(string keyValue, bool checkStatus) + public ActionResult DoCheck(string keyValue, string checkStatus) { var entity = workStudyPositionApplyIBLL.GetWorkStudyPositionApplyEntity(keyValue); if (entity == null) @@ -123,6 +143,8 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers return Fail("数据不存在!"); } entity.CheckStatus = checkStatus; + entity.CheckTime = DateTime.Now; + entity.CheckUserId = LoginUserInfo.Get().userId; workStudyPositionApplyIBLL.SaveEntity(keyValue, entity); return Success("操作成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/WorkStudyPositionController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/WorkStudyPositionController.cs index f490ac713..2c9d6f257 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/WorkStudyPositionController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/WorkStudyPositionController.cs @@ -62,6 +62,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers }; return Success(jsonData); } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList(string queryJson) + { + var data = workStudyPositionIBLL.GetList("{\"Status\":\"1\"}"); + return Success(data); + } /// /// 获取表单数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/CheckIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/CheckIndex.cshtml new file mode 100644 index 000000000..eabfa1959 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/CheckIndex.cshtml @@ -0,0 +1,40 @@ +@{ + ViewBag.Title = "岗位申请"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学生
+
+
+
+
岗位名称
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/WorkStudyPositionApply/CheckIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/CheckIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/CheckIndex.js new file mode 100644 index 000000000..571dc3e90 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/CheckIndex.js @@ -0,0 +1,108 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-03-04 16:01 + * 描 述:岗位申请 + */ +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); + $('#StuId').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); + $('#PositionId').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/GetList', + value: "Id", + text: "Name" + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/FormView?keyValue=' + keyValue, + width: 600, + height: 400, + btn: null + }); + } + }); + //  审核 + $('#lr_check').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认审核通过该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DoCheck', { keyValue: keyValue, checkStatus: "1" }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //  去审核 + $('#lr_uncheck').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认审核不通过该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DoCheck', { keyValue: keyValue, checkStatus: "2" }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/GetPageList', + headData: [ + { label: "学生姓名", name: "StuName", width: 100, align: "left" }, + { label: "学生学号", name: "StuNo", width: 100, align: "left" }, + { label: "所属专业", name: "MajorName", width: 100, align: "left" }, + { label: "所属班级", name: "ClassName", width: 100, align: "left" }, + { label: "岗位名称", name: "Name", width: 100, align: "left" }, + { label: "薪资(元/月)", name: "Salary", width: 100, align: "left" }, + { label: "学期", name: "Semester", width: 100, align: "left" }, + { label: "申请时间", name: "ApplyTime", width: 130, align: "left" }, + { + label: "申请状态", name: "CheckStatus", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == 1 ? "通过" : cellvalue == 2 ? "未通过" : "待审核"; + } + }, + { label: "审核时间", name: "CheckTime", width: 130, align: "left" }, + ], + mainId: 'Id', + isPage: true, + sidx: 'CreateTime desc' + }); + 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/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Form.cshtml index c914335b7..6908852a4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Form.cshtml @@ -3,17 +3,21 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
学生*
-
+
-
+
岗位名称*
- +
-
+
申请时间*
- + +
+
+
申请说明
+
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Form.js index 70a4c4f4d..0f27d7bec 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Form.js @@ -15,7 +15,13 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#Student').lrDataSourceSelect({ code: 'StuInfoBasic',value: 'stuno',text: 'stuname' }); + $('#StuId').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); + $('#PositionId').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/GetList', + value: "Id", + text: "Name" + }); }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/FormView.cshtml new file mode 100644 index 000000000..addc19504 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/FormView.cshtml @@ -0,0 +1,23 @@ +@{ + ViewBag.Title = "岗位申请"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学生*
+
+
+
+
岗位名称*
+
+
+
+
申请时间*
+ +
+
+
申请说明
+ +
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/WorkStudyPositionApply/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/FormView.js new file mode 100644 index 000000000..0f27d7bec --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/FormView.js @@ -0,0 +1,57 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-03-04 16:01 + * 描 述:岗位申请 + */ +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 () { + $('#StuId').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); + $('#PositionId').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/GetList', + value: "Id", + text: "Name" + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/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 + '/PersonnelManagement/WorkStudyPositionApply/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Index.cshtml index ae2796852..c9e72046d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Index.cshtml @@ -12,11 +12,11 @@
学生
-
+
岗位名称
- +
@@ -31,10 +31,6 @@  编辑  删除
-
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Index.js index 66e74869c..05daa496c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Index.js @@ -16,7 +16,13 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); - $('#Student').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); + $('#StuId').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); + $('#PositionId').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/GetList', + value: "Id", + text: "Name" + }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -38,6 +44,11 @@ var bootstrap = function ($, learun) { $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus == 1 || CheckStatus == 2) { + learun.alert.warning("当前项目已审核!"); + return false; + } learun.layerForm({ id: 'form', title: '编辑', @@ -52,84 +63,47 @@ var bootstrap = function ($, learun) { }); // 删除 $('#lr_delete').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('Id'); - if (learun.checkrow(keyValue)) { - learun.layerConfirm('是否确认删除该项!', function (res) { - if (res) { - learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DeleteForm', { keyValue: keyValue }, function () { - refreshGirdData(); - }); - } - }); - } - }); - - //  审核 - $('#lr_check').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); - if (CheckStatus == true) { + if (CheckStatus == 1 || CheckStatus == 2) { learun.alert.warning("当前项目已审核!"); return false; } - learun.layerConfirm('是否确认审核该项!', function (res) { - if (res) { - learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DoCheck', { keyValue: keyValue, checkStatus: true }, function () { - refreshGirdData(); - }); - } - }); - } - }); - //  去审核 - $('#lr_uncheck').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('Id'); - if (learun.checkrow(keyValue)) { - var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); - if (CheckStatus != true) { - learun.alert.warning("当前项目未审核!"); - return false; - } - learun.layerConfirm('是否确认审核该项!', function (res) { + learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DoCheck', { keyValue: keyValue, checkStatus: false }, function () { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } }); } }); + }, // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/GetPageList', headData: [ - { - label: "学生", name: "Student", width: 100, align: "left", - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', - key: value, - keyId: 'stuno', - callback: function (_data) { - callback(_data['stuname']); - } - }); - } - }, - { label: "岗位名称", name: "PositionName", width: 100, align: "left" }, + { label: "学生姓名", name: "StuName", width: 100, align: "left" }, + { label: "学生学号", name: "StuNo", width: 100, align: "left" }, + { label: "所属专业", name: "MajorName", width: 100, align: "left" }, + { label: "所属班级", name: "ClassName", width: 100, align: "left" }, + { label: "岗位名称", name: "Name", width: 100, align: "left" }, + { label: "薪资(元/月)", name: "Salary", width: 100, align: "left" }, + { label: "学期", name: "Semester", width: 100, align: "left" }, { label: "申请时间", name: "ApplyTime", width: 130, align: "left" }, { - label: "审核状态", name: "CheckStatus", width: 100, align: "left", + label: "申请状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { - return cellvalue == true ? "已审核" : "未审核"; + return cellvalue == 1 ? "通过" : cellvalue == 2 ? "未通过" : "待审核"; } }, ], mainId: 'Id', - isPage: true + isPage: true, + sidx: 'CreateTime desc' }); page.search(); }, 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 d934837ae..e762f1867 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 @@ -1413,6 +1413,8 @@ + + @@ -7236,6 +7238,8 @@ + + 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 b4275b3ef..2fbb2f836 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 @@ - + @@ -35905,11 +35905,11 @@ B9AF A57AC16B-5B75-4595-BBFA-AB30028DEB0B 学生 -Student +StuId 1583230375 admin -1583230479 -admin +1624958582 +edz 学生 nvarchar(50) 50 @@ -35917,11 +35917,11 @@ B9AF 85DC7815-F863-4B48-8012-EA76D0D1EA61 岗位名称 -PositionName +PositionId 1583230375 admin -1583230479 -admin +1624958582 +edz 岗位名称 nvarchar(50) 50 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionBLL.cs index a8a6f302d..f8542d13b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionBLL.cs @@ -42,6 +42,29 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + return workStudyPositionService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取WorkStudyPosition表实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionIBLL.cs index 87af13f69..34760991d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionIBLL.cs @@ -21,6 +21,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList(string queryJson); /// /// 获取WorkStudyPosition表实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionService.cs index 01e41b77b..36444d6cf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPosition/WorkStudyPositionService.cs @@ -55,6 +55,42 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*"); + strSql.Append(" FROM WorkStudyPosition t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["Status"].IsEmpty()) + { + dp.Add("Status", queryParam["Status"].ToString(), DbType.String); + strSql.Append(" AND t.Status = @Status "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 获取WorkStudyPosition表实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPositionApply/WorkStudyPositionApplyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPositionApply/WorkStudyPositionApplyEntity.cs index 9a9e02abd..30e2ef40e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPositionApply/WorkStudyPositionApplyEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPositionApply/WorkStudyPositionApplyEntity.cs @@ -13,32 +13,67 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// public class WorkStudyPositionApplyEntity { - #region 实体成员 - /// - /// 主键 - /// + #region 实体成员 + /// + /// 主键 + /// + /// [Column("ID")] public string Id { get; set; } - /// - /// 学生 - /// - [Column("STUDENT")] - public string Student { get; set; } - /// - /// 岗位名称 - /// - [Column("POSITIONNAME")] - public string PositionName { get; set; } - /// - /// 申请时间 - /// + /// + /// 学生 + /// + /// + [Column("STUID")] + public string StuId { get; set; } + /// + /// 岗位名称 + /// + /// + [Column("POSITIONID")] + public string PositionId { get; set; } + /// + /// 申请时间 + /// + /// [Column("APPLYTIME")] public DateTime? ApplyTime { get; set; } - /// - /// 审核状态 - /// + /// + /// 申请说明 + /// + /// + [Column("APPLYREASON")] + public string ApplyReason { get; set; } + /// + /// 审核状态 + /// + /// [Column("CHECKSTATUS")] - public bool? CheckStatus { get; set; } + public string CheckStatus { get; set; } + /// + /// 审核时间 + /// + /// + [Column("CHECKTIME")] + public DateTime? CheckTime { get; set; } + /// + /// 审核人 + /// + /// + [Column("CHECKUSERID")] + public string CheckUserId { get; set; } + /// + /// 创建用户 + /// + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// 创建时间 + /// + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } #endregion #region 扩展操作 @@ -59,6 +94,26 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } #endregion #region 扩展字段 + [NotMapped] + public string StuNo { get; set; } + [NotMapped] + public string StuName { get; set; } + [NotMapped] + public string MajorNo { get; set; } + [NotMapped] + public string ClassNo { get; set; } + [NotMapped] + public string Name { get; set; } + [NotMapped] + public string Salary { get; set; } + [NotMapped] + public string Semester { get; set; } + [NotMapped] + public string MajorName { get; set; } + [NotMapped] + public string ClassName { get; set; } + + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPositionApply/WorkStudyPositionApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPositionApply/WorkStudyPositionApplyService.cs index 1298b2f3a..6525a7bca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPositionApply/WorkStudyPositionApplyService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/WorkStudyPositionApply/WorkStudyPositionApplyService.cs @@ -29,28 +29,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement try { var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.Id, - t.Student, - t.PositionName, - t.ApplyTime, - t.CheckStatus - "); + strSql.Append("SELECT t.*,s.StuNo,s.StuName,s.MajorNo,s.ClassNo,p.Name,p.Salary,p.Semester,m.MajorName,c.ClassName "); strSql.Append(" FROM WorkStudyPositionApply t "); + strSql.Append(" left join StuInfoBasic s on t.StuId=s.StuId "); + strSql.Append(" left join CdMajor m on s.MajorNo=m.MajorNo "); + strSql.Append(" left join ClassInfo c on s.ClassNo=c.ClassNo "); + strSql.Append(" left join WorkStudyPosition p on t.PositionId=p.Id "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - if (!queryParam["Student"].IsEmpty()) + if (!queryParam["StuId"].IsEmpty()) { - dp.Add("Student",queryParam["Student"].ToString(), DbType.String); - strSql.Append(" AND t.Student = @Student "); + dp.Add("StuId", queryParam["StuId"].ToString(), DbType.String); + strSql.Append(" AND t.StuId = @StuId "); } - if (!queryParam["PositionName"].IsEmpty()) + if (!queryParam["PositionId"].IsEmpty()) { - dp.Add("PositionName", "%" + queryParam["PositionName"].ToString() + "%", DbType.String); - strSql.Append(" AND t.PositionName Like @PositionName "); + dp.Add("PositionId", queryParam["PositionId"].ToString(), DbType.String); + strSql.Append(" AND t.PositionId = @PositionId "); } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); }