From 87cd3b69d840d4723785d2c59dc51d3d55a1bbc8 Mon Sep 17 00:00:00 2001 From: liangkun Date: Tue, 8 Sep 2020 17:48:03 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E8=BF=90=E8=A1=8C=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E8=80=83=E5=8B=A4=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Quanjiang.DigitalScholl.JobService/App.config | 2 +- .../Quanjiang.DigitalScholl.JobService/Service1.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/App.config b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/App.config index 6688fcf64..2baacb87a 100644 --- a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/App.config +++ b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/App.config @@ -5,7 +5,7 @@
- + diff --git a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Service1.cs b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Service1.cs index 3f5887499..0066c3ded 100644 --- a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Service1.cs +++ b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Service1.cs @@ -20,6 +20,8 @@ namespace Quanjiang.DigitalScholl.JobService ServerName = "QuanjiangDigitalSchollJobService" }; _server = new BackgroundJobServer(options); + //自动运行连接考勤机 + RecurringJob.Trigger("HKAttendance"); } protected override void OnStop() From cff82eeb42e876863ca6facd499fa3682bede7b7 Mon Sep 17 00:00:00 2001 From: liangkun Date: Wed, 9 Sep 2020 09:17:43 +0800 Subject: [PATCH 2/5] website --- .../Learun.Application.Website.csproj | 12 ++++++++---- .../西昌单校区版V3.0.sln | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Website/Learun.Application.Website.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Website/Learun.Application.Website.csproj index 33f1ddf47..5db75a8fe 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Website/Learun.Application.Website.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Website/Learun.Application.Website.csproj @@ -26,10 +26,14 @@ - Learun.Application.Website - 1~a7250b02-76e9-4d74-aa27-f5cdf7719296 - http://123.57.209.16:8090/VaultService - SourceGear Vault Visual Studio 2005 Client:{1EA47954-8515-402d-82D9-B5C332120A8D} + + + + + + + + true diff --git a/Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln b/Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln index 3063ad091..12da3917c 100644 --- a/Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln +++ b/Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln @@ -1595,6 +1595,10 @@ Global {36083FBB-CE7F-4EE0-8459-C4B60A2DD070} = {16DDB25D-3101-47A2-BDC8-161954FD77FA} {DBB22F9E-ED75-40EB-A091-717D42C65A9B} = {29DFF52B-8455-4EA1-8798-3AEE210D9372} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35 + SolutionGuid = {968C278F-4142-4DFF-96B0-B3D70A649451} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {968C278F-4142-4DFF-96B0-B3D70A649451} EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35 From 44c9f657dbc24d99a8ecb25de51540f9cdcd7b27 Mon Sep 17 00:00:00 2001 From: liangkun Date: Wed, 9 Sep 2020 09:59:06 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Quanjiang.DigitalScholl.JobService.csproj | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Quanjiang.DigitalScholl.JobService.csproj b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Quanjiang.DigitalScholl.JobService.csproj index a2ade3afd..adca8eb44 100644 --- a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Quanjiang.DigitalScholl.JobService.csproj +++ b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Quanjiang.DigitalScholl.JobService.csproj @@ -124,44 +124,6 @@ - - - {8f770f8b-06b3-43da-886f-15d41cec62ee} - Learun.Application.AppMagager - - - {0cdd0dc8-74cf-4c71-923c-66204a8923d3} - Learun.Application.Base - - - {79f8e2f1-08e7-4336-93e0-512b39f9dd54} - Learun.Application.Mapping - - - {56f9a112-fd96-4809-98f4-0d7c5de0711b} - Learun.Application.TwoDevelopment - - - {890532f8-5205-4ee9-965c-84500cad24de} - Learun.DataBase.SqlServer - - - {7f5e2a6c-c859-494a-8577-75bf9603a80c} - Learun.DataBase.Repository - - - {c329f9e1-4327-4769-9d08-07e6fec41005} - Learun.DataBase - - - {81c03609-ae0d-414c-829b-16b990487add} - Learun.Ioc - - - {cf8ae293-88ab-436c-9720-a8386ba5d7b7} - Learun.Util - - From 96bf147dfe5c1c536dcb95f2aadbad446f42d675 Mon Sep 17 00:00:00 2001 From: zhichao lei <442149704@qq.com> Date: Wed, 9 Sep 2020 11:04:08 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=80=83=E5=8B=A4=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/ADR_Record/Index.js | 15 ++-- .../Views/ADR_Restriction/Form.cshtml | 71 ++++++++++--------- .../Views/ADR_Restriction/Form.js | 4 +- .../Views/ADR_Restriction/Index.js | 20 +++--- .../ADR_Record/ADR_RecordService.cs | 1 + .../LearunApp-2.2.0/pages.json | 10 +-- 6 files changed, 66 insertions(+), 55 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.js index 1b0798622..2efc5f652 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.js @@ -134,7 +134,8 @@ var bootstrap = function ($, learun) { callback(_data.text); } }); - } }, + } + }, { label: "考勤时间", name: "ADTime", width: 150, align: "left" }, { label: "打卡时间", name: "ClockTime", width: 150, align: "left" }, { @@ -146,19 +147,21 @@ var bootstrap = function ($, learun) { //callback(_data.text); if (_data.text) { if (_data.text == "正常") { - callback(''+_data.text+''); + callback('' + _data.text + ''); } else { - callback(''+_data.text+''); + callback('' + _data.text + ''); } } - + } }); - } }, + } + }, { label: "打卡地点", name: "ClockPlace", width: 100, align: "left" }, ], mainId: 'ID', - isPage: true + isPage: true, + sidx: "UserNo,ADYear,ADMonth,ADDay,ADTime", }); }, search: function (param) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.cshtml index a7cb5ac60..d8051cc11 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.cshtml @@ -2,46 +2,53 @@ ViewBag.Title = "考勤限制"; Layout = "~/Views/Shared/_Form.cshtml"; } +
-
-
开始时间
+
+
上班时间
-
-
结束时间
+
+
下班时间
-
-
签到有效时间
- -
-
-
-
- -
-
-
签退有效时间
- -
-
-
-
- -
-
-
迟到超过时间
- -
-
-
早退超过时间
- -
-
+ @*
+
签到有效时间
+ +
+
+
-
+ +
+
+
签退有效时间
+ +
+
+
-
+ +
*@ +
+
允许迟到范围(分)
+ +
+
+
允许早退范围(分)
+ +
+
未签到,记为
-
+
-
+
未签退,记为
-
+
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ADR_Restriction/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.js index 2dc4b02ec..48b7c34de 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Form.js @@ -15,8 +15,8 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#NoSignIn').lrDataItemSelect({ code: 'ADR_Status' }); - $('#NoSignOut').lrDataItemSelect({ code: 'ADR_Status' }); + $('#NoSignIn').lrDataItemSelect({ code: 'ADStatus' }); + $('#NoSignOut').lrDataItemSelect({ code: 'ADStatus' }); }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.js index c07fa16d5..2105d76c0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.js @@ -65,19 +65,19 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/PersonnelManagement/ADR_Restriction/GetPageList', headData: [ - { label: "开始时间", name: "WorkTime", width: 100, align: "left"}, - { label: "结束时间", name: "CloseTime", width: 100, align: "left"}, - { label: "签到有效时间", name: "SignInStartTime", width: 100, align: "left"}, - { label: "-", name: "SignInEndTime", width: 100, align: "left"}, - { label: "签退有效时间", name: "SignOutStartTime", width: 100, align: "left"}, - { label: "-", name: "SignOutEndTime", width: 100, align: "left"}, - { label: "迟到超过时间", name: "LateOvertime", width: 100, align: "left"}, - { label: "早退超过时间", name: "LeaveOverTime", width: 100, align: "left"}, + { label: "上班时间", name: "WorkTime", width: 100, align: "left"}, + { label: "下班时间", name: "CloseTime", width: 100, align: "left"}, + //{ label: "签到有效时间", name: "SignInStartTime", width: 100, align: "left"}, + //{ label: "-", name: "SignInEndTime", width: 100, align: "left"}, + //{ label: "签退有效时间", name: "SignOutStartTime", width: 100, align: "left"}, + //{ label: "-", name: "SignOutEndTime", width: 100, align: "left"}, + { label: "允许迟到范围(分)", name: "LateOvertime", width: 100, align: "left"}, + { label: "允许早退范围(分)", name: "LeaveOverTime", width: 100, align: "left"}, { label: "未签到,记为", name: "NoSignIn", width: 100, align: "left", formatterAsync: function (callback, value, row, op,$cell) { learun.clientdata.getAsync('dataItem', { key: value, - code: 'ADR_Status', + code: 'ADStatus', callback: function (_data) { callback(_data.text); } @@ -87,7 +87,7 @@ var bootstrap = function ($, learun) { formatterAsync: function (callback, value, row, op,$cell) { learun.clientdata.getAsync('dataItem', { key: value, - code: 'ADR_Status', + code: 'ADStatus', callback: function (_data) { callback(_data.text); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs index e5248474d..226e1d428 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs @@ -68,6 +68,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json index db1d81965..cf65c06a9 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json @@ -137,11 +137,11 @@ // 全局样式 "globalStyle": { - "navigationBarTextStyle": "black", - "enablePullDownRefresh": false, - "navigationBarBackgroundColor": "#FFF", - "backgroundColor": "#f3f3f3", - "navigationBarTitleText": "力软敏捷开发框架", + "navigationBarTextStyle": "black",//导航栏标题颜色及状态栏前景颜色 + "enablePullDownRefresh": false,//是否开启下拉刷新 + "navigationBarBackgroundColor": "#FFF",//导航栏背景颜色 + "backgroundColor": "#f3f3f3",//窗口背景色 + "navigationBarTitleText": "数字化校园",//导航栏标题文字内容 "mp-alipay": { "allowsBounceVertical": "NO" } }, From 2d5cebcf361884cf19a23e34c98e39849e8f2324 Mon Sep 17 00:00:00 2001 From: zhichao lei <442149704@qq.com> Date: Wed, 9 Sep 2020 11:30:50 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=80=83=E5=8B=A4=E9=99=90=E5=88=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=AF=E7=94=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ADR_RestrictionController.cs | 23 ++++-- .../Views/ADR_Restriction/Index.cshtml | 1 + .../Views/ADR_Restriction/Index.js | 77 ++++++++++++------- .../ADR_Restriction/ADR_RestrictionBLL.cs | 22 ++++++ .../ADR_Restriction/ADR_RestrictionIBLL.cs | 5 ++ .../ADR_Restriction/ADR_RestrictionService.cs | 36 ++++++++- 6 files changed, 129 insertions(+), 35 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_RestrictionController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_RestrictionController.cs index c6aab7c23..7854787e5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_RestrictionController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_RestrictionController.cs @@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -35,7 +35,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); } #endregion @@ -71,8 +71,9 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var ADR_RestrictionData = aDR_RestrictionIBLL.GetADR_RestrictionEntity( keyValue ); - var jsonData = new { + var ADR_RestrictionData = aDR_RestrictionIBLL.GetADR_RestrictionEntity(keyValue); + var jsonData = new + { ADR_Restriction = ADR_RestrictionData, }; return Success(jsonData); @@ -94,6 +95,18 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers return Success("删除成功!"); } /// + /// 启用限制 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult Enable(string keyValue) + { + aDR_RestrictionIBLL.Enable(keyValue); + return Success("启用成功!"); + } + /// /// 保存实体数据(新增、修改) /// /// 主键 @@ -105,7 +118,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { ADR_RestrictionEntity entity = strEntity.ToObject(); - aDR_RestrictionIBLL.SaveEntity(keyValue,entity); + aDR_RestrictionIBLL.SaveEntity(keyValue, entity); if (string.IsNullOrEmpty(keyValue)) { } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.cshtml index 0bf69441e..bcfbbe1a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.cshtml @@ -16,6 +16,7 @@  新增  编辑  删除 +  启用
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.js index 2105d76c0..20f62d7cd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_Restriction/Index.js @@ -52,56 +52,79 @@ var bootstrap = function ($, learun) { if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ADR_Restriction/DeleteForm', { keyValue: keyValue}, function () { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ADR_Restriction/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } }); } }); + // 启用 + $('#lr_enable').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认启用!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/ADR_Restriction/Enable', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/PersonnelManagement/ADR_Restriction/GetPageList', headData: [ - { label: "上班时间", name: "WorkTime", width: 100, align: "left"}, - { label: "下班时间", name: "CloseTime", width: 100, align: "left"}, + { label: "上班时间", name: "WorkTime", width: 100, align: "left" }, + { label: "下班时间", name: "CloseTime", width: 100, align: "left" }, //{ label: "签到有效时间", name: "SignInStartTime", width: 100, align: "left"}, //{ label: "-", name: "SignInEndTime", width: 100, align: "left"}, //{ label: "签退有效时间", name: "SignOutStartTime", width: 100, align: "left"}, //{ label: "-", name: "SignOutEndTime", width: 100, align: "left"}, - { label: "允许迟到范围(分)", name: "LateOvertime", width: 100, align: "left"}, - { label: "允许早退范围(分)", name: "LeaveOverTime", width: 100, align: "left"}, - { label: "未签到,记为", name: "NoSignIn", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('dataItem', { - key: value, - code: 'ADStatus', - callback: function (_data) { - callback(_data.text); - } - }); - }}, - { label: "未签退,记为", name: "NoSignOut", width: 100, align: "left", - formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('dataItem', { - key: value, - code: 'ADStatus', - callback: function (_data) { - callback(_data.text); - } - }); - }}, + { label: "允许迟到范围(分)", name: "LateOvertime", width: 100, align: "left" }, + { label: "允许早退范围(分)", name: "LeaveOverTime", width: 100, align: "left" }, + { + label: "未签到,记为", name: "NoSignIn", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'ADStatus', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "未签退,记为", name: "NoSignOut", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'ADStatus', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "是否启用", name: "REnable", width: 100, align: "left", formatter: function (val) { + return val ? "" : ""; + } + }, ], - mainId:'ID', + mainId: 'ID', 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.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionBLL.cs index f7fd1301a..9fb2465f9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionBLL.cs @@ -93,6 +93,28 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } + /// + /// 启用限制 + /// + /// 主键 + public void Enable(string keyValue) + { + try + { + aDR_RestrictionService.Enable(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 保存实体数据(新增、修改) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionIBLL.cs index a2255542b..67e6c66a2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionIBLL.cs @@ -37,6 +37,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// 主键 void DeleteEntity(string keyValue); /// + /// 启用限制 + /// + /// 主键 + void Enable(string keyValue); + /// /// 保存实体数据(新增、修改) /// /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionService.cs index 6aaf40df7..da393765d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_Restriction/ADR_RestrictionService.cs @@ -42,6 +42,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement t.LateOvertime, t.LeaveOverTime, t.NoSignIn, + t.REnable, t.NoSignOut "); strSql.Append(" FROM ADR_Restriction t "); @@ -49,7 +50,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -100,7 +101,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { - this.BaseRepository("CollegeMIS").Delete(t=>t.ID == keyValue); + this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyValue); } catch (Exception ex) { @@ -114,6 +115,35 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } + /// + /// 启用限制 + /// + /// 主键 + public void Enable(string keyValue) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + var sql = "UPDATE dbo.ADR_Restriction SET REnable='false'"; + db.ExecuteBySql(sql); + var entity = db.FindEntity(a => a.ID == keyValue); + entity.REnable = true; + db.Update(entity); + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 保存实体数据(新增、修改) @@ -154,7 +184,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { - return this.BaseRepository("CollegeMIS").FindEntity(m=>m.REnable==true); + return this.BaseRepository("CollegeMIS").FindEntity(m => m.REnable == true); } catch (Exception ex) {