From 14cc8d73dc859c04af5fed95a1a8d67c68c666d8 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Tue, 27 Oct 2020 18:18:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E6=95=99=E5=B8=88=E8=81=8C=E7=A7=B0=E5=8F=98=E6=9B=B4=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E3=80=81=E6=95=99=E8=81=8C=E5=B7=A5=E9=80=80=E5=AD=A6?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E3=80=81=E7=A6=BB=E8=81=8C=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=B8=8E=E6=95=99=E5=B8=88=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=90=8C=E6=AD=A5=EF=BC=9B=E5=AD=A6=E7=B1=8D?= =?UTF-8?q?=E3=80=81=E6=95=99=E5=B8=88=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=94=BF=E6=B2=BB=E9=9D=A2=E8=B2=8C=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuInfoBasic/Index.js | 13 ++++ .../Controllers/TeacherDimissionController.cs | 13 +--- .../Views/TeacherChange/Index.cshtml | 2 +- .../Views/TeacherChange/Index.js | 60 ++++++++++--------- .../Views/TeacherDimission/Form.cshtml | 20 ++++--- .../Views/TeacherDimission/Form.js | 19 ++++-- .../Views/TeacherDimission/Index.cshtml | 2 +- .../Views/TeacherDimission/Index.js | 41 +++++++------ .../Views/TeacherRetire/Form.cshtml | 18 +++--- .../Views/TeacherRetire/Form.js | 19 ++++-- .../Views/TeacherRetire/Index.cshtml | 2 +- .../Views/TeacherRetire/Index.js | 39 ++++++------ .../Views/TeacherTitleChange/Form.js | 8 ++- .../Views/TeacherTitleChange/Index.cshtml | 2 +- .../Views/TeacherTitleChange/Index.js | 2 +- .../TeacherChange/TeacherChangeService.cs | 17 ++---- .../TeacherDimissionEntity.cs | 5 ++ .../TeacherDimissionService.cs | 47 +++++++++------ .../TeacherRetire/TeacherRetireEntity.cs | 5 ++ .../TeacherRetire/TeacherRetireService.cs | 46 +++++++++----- .../TeacherTitleChangeService.cs | 43 ++++++------- 21 files changed, 250 insertions(+), 173 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js index 3680cd302..66696492e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js @@ -247,6 +247,19 @@ var bootstrap = function ($, learun) { }); } }, + { + label: "政治面貌", name: "PartyFaceNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdPartyFace', + key: value, + keyId: 'partyfaceno', + callback: function (_data) { + callback(_data['partyface']); + } + }); + } + }, { label: "系所", name: "DeptNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherDimissionController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherDimissionController.cs index c2ad41e41..0e9b04420 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherDimissionController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TeacherDimissionController.cs @@ -93,13 +93,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { var entity = teacherDimissionIBLL.GetTeacherDimissionEntity(keyValue); teacherDimissionIBLL.DeleteEntity(keyValue); - - //修改用户状态 - if (entity != null) - { - userIBLL.UpdateState(entity.EID, 1); - } - + return Success("删除成功!"); } /// @@ -114,10 +108,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { TeacherDimissionEntity entity = strEntity.ToObject(); teacherDimissionIBLL.SaveEntity(keyValue, entity); - - //修改用户状态 - userIBLL.UpdateState(entity.EID, 0); - + return Success("保存成功!"); } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherChange/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherChange/Index.cshtml index 07a74edd6..d6f30dcab 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherChange/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherChange/Index.cshtml @@ -12,7 +12,7 @@
教师
-
+
异动类型
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherChange/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherChange/Index.js index b8a188d35..916cfc201 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherChange/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherChange/Index.js @@ -16,7 +16,6 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); - $('#EmpId').lrUserSelect(0); $('#ChangeType').lrDataItemSelect({ code: 'TeacherChangeType' }); // 刷新 $('#lr_refresh').on('click', function () { @@ -24,7 +23,7 @@ var bootstrap = function ($, learun) { }); // 新增 $('#lr_add').on('click', function () { - learun.layerForm({ + learun.layerForm({ id: 'form', title: '新增', url: top.$.rootUrl + '/PersonnelManagement/TeacherChange/Form', @@ -55,9 +54,9 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { - learun.layerConfirm('是否确认删除该项!', function (res) { + learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherChange/DeleteForm', { keyValue: keyValue}, function () { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherChange/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } @@ -70,35 +69,42 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/PersonnelManagement/TeacherChange/GetPageList', headData: [ - { label: "教师", name: "EmpId", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('user', { - key: value, - callback: function (_data) { - callback(_data.name); - } - }); - }}, - { label: "异动时间", name: "ChangeTime", width: 130, align: "left"}, - { label: "异动类型", name: "ChangeType", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('dataItem', { - key: value, - code: 'TeacherChangeType', - callback: function (_data) { - callback(_data.text); - } - }); - }}, + { + label: "教师", name: "EmpId", 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: "ChangeTime", width: 130, align: "left" }, + { + label: "异动类型", name: "ChangeType", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'TeacherChangeType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, ], - mainId:'Id', - isPage: true + mainId: 'Id', + isPage: true, + sidx: 'ChangeTime desc' }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Form.cshtml index 22a324123..4e2e6bdfe 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Form.cshtml @@ -3,25 +3,29 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
教师姓名*
-
+
-
+
+
原在职状态
+
+
+
离职时间*
- +
-
+
离职原因*
-
+
经手人*
-
+
备注
- +
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherDimission/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Form.js index 01e125daf..3ed78750a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Form.js @@ -15,19 +15,26 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#EID').lrformselect({ - layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', - layerUrlW: 400, - layerUrlH: 300, - dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' + $('#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); + } + } }); + $('#EStatus').lrDataItemSelect({ code: 'JobStatus' }); }, initData: function () { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherDimission/GetFormData?keyValue=' + keyValue, function (data) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { - $('#' + id ).jfGridSet('refreshdata', data[id]); + $('#' + id).jfGridSet('refreshdata', data[id]); } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Index.cshtml index 3699fdecc..57c31b096 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Index.cshtml @@ -12,7 +12,7 @@
教师姓名
-
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Index.js index 9ac4c2626..f3d23b982 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherDimission/Index.js @@ -16,14 +16,13 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); - $('#EID').lrUserSelect(0); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); // 新增 $('#lr_add').on('click', function () { - learun.layerForm({ + learun.layerForm({ id: 'form', title: '新增', url: top.$.rootUrl + '/PersonnelManagement/TeacherDimission/Form', @@ -54,9 +53,9 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('TDID'); if (learun.checkrow(keyValue)) { - learun.layerConfirm('是否确认删除该项!', function (res) { + learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherDimission/DeleteForm', { keyValue: keyValue}, function () { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherDimission/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } @@ -69,28 +68,32 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/PersonnelManagement/TeacherDimission/GetPageList', headData: [ - { label: "教师姓名", name: "EID", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('user', { - key: value, - callback: function (_data) { - callback(_data.name); - } - }); - }}, - { label: "离职时间", name: "TDTime", width: 100, align: "left"}, - { label: "离职原因", name: "TDReason", width: 100, align: "left"}, - { label: "经手人", name: "TDTransactor", width: 100, align: "left"}, - { label: "备注", name: "TDComment", 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: "TDTime", width: 100, align: "left" }, + { label: "离职原因", name: "TDReason", width: 100, align: "left" }, + { label: "经手人", name: "TDTransactor", width: 100, align: "left" }, + { label: "备注", name: "TDComment", width: 100, align: "left" }, ], - mainId:'TDID', + mainId: 'TDID', isPage: true }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Form.cshtml index 8e8061fe1..31d1dbc39 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Form.cshtml @@ -3,21 +3,25 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
教师姓名*
-
+
-
+
+
原在职状态
+
+
+
退休时间*
- +
-
+
退休年龄*
-
+
备注
- +
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherRetire/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Form.js index 2877ae783..7801c4f68 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Form.js @@ -15,19 +15,26 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#EID').lrformselect({ - layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', - layerUrlW: 400, - layerUrlH: 300, - dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' + $('#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); + } + } }); + $('#EStatus').lrDataItemSelect({ code: 'JobStatus' }); }, initData: function () { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherRetire/GetFormData?keyValue=' + keyValue, function (data) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { - $('#' + id ).jfGridSet('refreshdata', data[id]); + $('#' + id).jfGridSet('refreshdata', data[id]); } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Index.cshtml index ef33d4de7..acdbec876 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Index.cshtml @@ -15,7 +15,7 @@
教师姓名
-
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Index.js index c1ac0c126..432205846 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherRetire/Index.js @@ -45,14 +45,13 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); - $('#EID').lrUserSelect(0); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); // 新增 $('#lr_add').on('click', function () { - learun.layerForm({ + learun.layerForm({ id: 'form', title: '新增', url: top.$.rootUrl + '/PersonnelManagement/TeacherRetire/Form', @@ -83,9 +82,9 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('TRID'); if (learun.checkrow(keyValue)) { - learun.layerConfirm('是否确认删除该项!', function (res) { + learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherRetire/DeleteForm', { keyValue: keyValue}, function () { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherRetire/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } @@ -98,20 +97,24 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/PersonnelManagement/TeacherRetire/GetPageList', headData: [ - { label: "教师姓名", name: "EID", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('user', { - key: value, - callback: function (_data) { - callback(_data.name); - } - }); - }}, - { label: "退休时间", name: "TRTime", width: 100, align: "left"}, - { label: "退休年龄", name: "TRAges", width: 100, align: "left"}, - { label: "备注", name: "TRComment", 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: "TRTime", width: 100, align: "left" }, + { label: "退休年龄", name: "TRAges", width: 100, align: "left" }, + { label: "备注", name: "TRComment", width: 100, align: "left" }, ], - mainId:'TRID', + mainId: 'TRID', isPage: true }); }, @@ -119,7 +122,7 @@ var bootstrap = function ($, learun) { param = param || {}; param.StartTime = startTime; param.EndTime = endTime; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTitleChange/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTitleChange/Form.js index 7764d8260..7229fa81c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTitleChange/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTitleChange/Form.js @@ -21,8 +21,12 @@ var bootstrap = function ($, learun) { // layerUrlH: 300, // dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' //}); - $('#EID').lrDataSourceSelect({ - code: 'EmpInfo', value: 'empid', text: 'empname', + $('#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) { $('#TCTitlesID').lrselectSet(item.professionaltitle); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTitleChange/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTitleChange/Index.cshtml index f0ce379f8..bba1f4ad1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTitleChange/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTitleChange/Index.cshtml @@ -12,7 +12,7 @@
教师姓名
-
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTitleChange/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTitleChange/Index.js index 879b66800..8e0a7460c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTitleChange/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTitleChange/Index.js @@ -16,7 +16,7 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); - $('#EID').lrUserSelect(0); + //$('#EID').lrUserSelect(0); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherChange/TeacherChangeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherChange/TeacherChangeService.cs index 7b6a2da42..a0606c848 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherChange/TeacherChangeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherChange/TeacherChangeService.cs @@ -28,23 +28,18 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { + var admsdb = this.BaseRepository("CollegeMIS").getDbConnection().Database; var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.Id, - t.EmpId, - t.ChangeTime, - t.ChangeType - "); - strSql.Append(" FROM TeacherChange t "); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM TeacherChange t left join " + admsdb + ".dbo.EmpInfo e on t.EmpId=e.EmpId "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - if (!queryParam["EmpId"].IsEmpty()) + if (!queryParam["EName"].IsEmpty()) { - dp.Add("EmpId", queryParam["EmpId"].ToString(), DbType.String); - strSql.Append(" AND t.EmpId = @EmpId "); + dp.Add("EName", "%" + queryParam["EName"].ToString() + "%", DbType.String); + strSql.Append(" AND e.EmpName like @EName "); } if (!queryParam["ChangeType"].IsEmpty()) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherDimission/TeacherDimissionEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherDimission/TeacherDimissionEntity.cs index 115b6b835..59ba10d95 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherDimission/TeacherDimissionEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherDimission/TeacherDimissionEntity.cs @@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement [Column("ENAME")] public string EName { get; set; } /// + /// 原在职状态 + /// + [Column("ESTATUS")] + public string EStatus { get; set; } + /// /// TDReason /// [Column("TDREASON")] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherDimission/TeacherDimissionService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherDimission/TeacherDimissionService.cs index 128d359d9..4ff8f81e2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherDimission/TeacherDimissionService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherDimission/TeacherDimissionService.cs @@ -1,4 +1,5 @@ using Dapper; +using Learun.Application.TwoDevelopment.EducationalAdministration; using Learun.DataBase.Repository; using Learun.Util; using System; @@ -28,25 +29,18 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { + var admsdb = this.BaseRepository("CollegeMIS").getDbConnection().Database; var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.TDID, - t.EID, - t.TDTime, - t.TDReason, - t.TDTransactor, - t.TDComment - "); - strSql.Append(" FROM TeacherDimission t "); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM TeacherDimission t left join " + admsdb + ".dbo.EmpInfo e on t.EID=e.EmpId "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - if (!queryParam["EID"].IsEmpty()) + if (!queryParam["EName"].IsEmpty()) { - dp.Add("EID", queryParam["EID"].ToString(), DbType.String); - strSql.Append(" AND t.EID = @EID "); + dp.Add("EName", "%" + queryParam["EName"].ToString() + "%", DbType.String); + strSql.Append(" AND e.EmpName like @EName "); } return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); } @@ -103,15 +97,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement try { var entity = db.FindEntity(keyValue); - //人事异动 - db.Delete(x => x.EmpId == entity.EID && x.ChangeType == "02"); - - db.Delete(t => t.TDID == keyValue); + if (entity != null) + { + //更新教师信息 + var empInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.EmpId == entity.EID); + if (empInfoEntity != null) + { + empInfoEntity.IsInActiveStatus = entity.EStatus; + this.BaseRepository("CollegeMIS").Update(empInfoEntity); + } + //人事异动 + db.Delete(x => x.EmpId == entity.EID && x.ChangeType == "02"); + db.Delete(entity); + } db.Commit(); } catch (Exception ex) { + db.Rollback(); if (ex is ExceptionEx) { throw; @@ -166,9 +170,18 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } db.Commit(); + + //更新教师信息 + var empInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.EmpId == entity.EID); + if (empInfoEntity != null) + { + empInfoEntity.IsInActiveStatus = "0"; + this.BaseRepository("CollegeMIS").Update(empInfoEntity); + } } catch (Exception ex) { + db.Rollback(); if (ex is ExceptionEx) { throw; 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 72bae3787..0714185de 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 @@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement [Column("ENAME")] public string EName { get; set; } /// + /// 原在职状态 + /// + [Column("ESTATUS")] + public string EStatus { get; set; } + /// /// TRAges /// [Column("TRAGES")] 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 49916a94c..c3d7ef99a 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 @@ -1,4 +1,5 @@ using Dapper; +using Learun.Application.TwoDevelopment.EducationalAdministration; using Learun.DataBase.Repository; using Learun.Util; using System; @@ -28,16 +29,10 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { + var admsdb = this.BaseRepository("CollegeMIS").getDbConnection().Database; var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.TRID, - t.EID, - t.TRTime, - t.TRAges, - t.TRComment - "); - strSql.Append(" FROM TeacherRetire t "); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM TeacherRetire t left join " + admsdb + ".dbo.EmpInfo e on t.EID=e.EmpId "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 @@ -48,10 +43,10 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); strSql.Append(" AND ( t.TRTime >= @startTime AND t.TRTime <= @endTime ) "); } - if (!queryParam["EID"].IsEmpty()) + if (!queryParam["EName"].IsEmpty()) { - dp.Add("EID", queryParam["EID"].ToString(), DbType.String); - strSql.Append(" AND t.EID = @EID "); + dp.Add("EName", "%" + queryParam["EName"].ToString() + "%", DbType.String); + strSql.Append(" AND e.EmpName like @EName "); } return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); } @@ -108,15 +103,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement try { var entity = db.FindEntity(keyValue); - //人事异动 - db.Delete(x => x.EmpId == entity.EID && x.ChangeType == "01"); - - db.Delete(t => t.TRID == keyValue); + if (entity != null) + { + //更新教师信息 + var empInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.EmpId == entity.EID); + if (empInfoEntity != null) + { + empInfoEntity.IsInActiveStatus = entity.EStatus; + this.BaseRepository("CollegeMIS").Update(empInfoEntity); + } + //人事异动 + db.Delete(x => x.EmpId == entity.EID && x.ChangeType == "01"); + db.Delete(entity); + } db.Commit(); } catch (Exception ex) { + db.Rollback(); if (ex is ExceptionEx) { throw; @@ -171,9 +176,18 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } db.Commit(); + + //更新教师信息 + var empInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.EmpId == entity.EID); + if (empInfoEntity != null) + { + empInfoEntity.IsInActiveStatus = "6"; + this.BaseRepository("CollegeMIS").Update(empInfoEntity); + } } catch (Exception ex) { + db.Rollback(); if (ex is ExceptionEx) { throw; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherTitleChange/TeacherTitleChangeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherTitleChange/TeacherTitleChangeService.cs index 28fd4da47..0511b5d7b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherTitleChange/TeacherTitleChangeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherTitleChange/TeacherTitleChangeService.cs @@ -29,32 +29,20 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { + var admsdb = this.BaseRepository("CollegeMIS").getDbConnection().Database; var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.TCID, - t.EID, - t.TCTitlesID, - t.TCTime, - t.TCTitlesNewID, - t.TCChangeTime, - t.TCTitlesPostLevel, - t.TCTitlesPostLevelNew, - t.TCChangeReason, - t.TCRemark, - u.F_Gender as Sex, - u.F_Birthday as Birthday - "); - strSql.Append(" FROM TeacherTitleChange t left join LR_Base_User u on t.EID=u.F_UserId "); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM TeacherTitleChange t left join " + admsdb + ".dbo.EmpInfo e on t.EID=e.EmpId "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - if (!queryParam["EID"].IsEmpty()) + if (!queryParam["EName"].IsEmpty()) { - dp.Add("EID", queryParam["EID"].ToString(), DbType.String); - strSql.Append(" AND t.EID = @EID "); + dp.Add("EName", "%" + queryParam["EName"].ToString() + "%", DbType.String); + strSql.Append(" AND e.EmpName like @EName "); } + return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) @@ -107,7 +95,22 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { - this.BaseRepository().Delete(t => t.TCID == keyValue); + var entity = this.BaseRepository().FindEntity(keyValue); + if (entity != null) + { + //更新教师信息 + var empInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.EmpId == entity.EID); + if (empInfoEntity != null) + { + empInfoEntity.ProfessionalTitle = entity.TCTitlesID; + empInfoEntity.ProfessionalTitleLevel = entity.TCTitlesPostLevel; + empInfoEntity.ProfessionalTitleGetTime = entity.TCTime; + this.BaseRepository("CollegeMIS").Update(empInfoEntity); + } + + //删除变更 + this.BaseRepository().Delete(entity); + } } catch (Exception ex) { From 7ad7e9a1b2a6a3c32be4fe916d8cb6f903cbff56 Mon Sep 17 00:00:00 2001 From: zhichao lei <442149704@qq.com> Date: Wed, 28 Oct 2020 09:28:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E5=A2=9E=E5=8A=A0=E5=BD=95=E5=85=A5?= =?UTF-8?q?=E5=8F=91=E6=94=BE=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Sal_UserSalaryController.cs | 8 ++++++++ .../PersonnelManagement/Views/Sal_UserSalary/Index.cshtml | 2 +- .../Learun.Application.Excel/Import/ExcelImportBLL.cs | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Sal_UserSalaryController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Sal_UserSalaryController.cs index b6df361d8..e03d43a2f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Sal_UserSalaryController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Sal_UserSalaryController.cs @@ -292,6 +292,14 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers Background = new Color() }); dt.Columns.Add("姓名", typeof(string)); + excelConfig.ColumnEntity.Add(new ColumnModel() + { + Column = "发放时间", + ExcelColumn = "发放时间", + Alignment = "center", + Background = new Color() + }); + dt.Columns.Add("发放时间", typeof(string)); foreach (var item in itemList) { excelConfig.ColumnEntity.Add(new ColumnModel() diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Sal_UserSalary/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Sal_UserSalary/Index.cshtml index bb14df0c5..0004b57d3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Sal_UserSalary/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Sal_UserSalary/Index.cshtml @@ -30,7 +30,7 @@  编辑  查看  删除 -  导入 +  导入
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Excel/Import/ExcelImportBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Excel/Import/ExcelImportBLL.cs index df3e70990..1be541e3f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Excel/Import/ExcelImportBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Excel/Import/ExcelImportBLL.cs @@ -719,7 +719,7 @@ namespace Learun.Application.Excel Sal_UserSalaryEntity sal_UserSalaryEntity = new Sal_UserSalaryEntity(); sal_UserSalaryEntity.Create(); sal_UserSalaryEntity.F_UserId = userIBLL.GetEntityByName(dr["姓名"].ToString())?.F_UserId; - sal_UserSalaryEntity.USDate = DateTime.Now; + sal_UserSalaryEntity.USDate = Convert.ToDateTime(dr["发放时间"].ToString()); stall = 0;//重置应发合计 stactual = 0;//重置实发合计 foreach (var templateItem in templateItemList)