From 9f41a34c0d9c2b91a69675a086a4d6de62e684df Mon Sep 17 00:00:00 2001 From: liangkun Date: Mon, 12 Apr 2021 11:47:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E6=8E=A7=E5=A4=9A=E9=80=89=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MP_PerformanceTrackingController.cs | 10 +++++++--- .../Controllers/MP_QualityObjectivesController.cs | 12 ++++++++---- .../MP_PerformanceTracking/IndexManagement.js | 15 ++++++++++++++- .../MP_PerformanceTrackingService.cs | 15 ++++++++++----- .../MP_QualityObjectivesService.cs | 7 ++++++- 5 files changed, 45 insertions(+), 14 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MP_PerformanceTrackingController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MP_PerformanceTrackingController.cs index c8b62e793..ba01e723b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MP_PerformanceTrackingController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MP_PerformanceTrackingController.cs @@ -133,9 +133,13 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [AjaxOnly] public ActionResult Qqualified(string keyValue,bool status) { - var entity = mP_PerformanceTrackingIBLL.GetMP_ManageMentPlanEntity(keyValue); - entity.MPConclusion = status?1:0; - mP_PerformanceTrackingIBLL.SaveEntity(keyValue,entity); + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + var entity = mP_PerformanceTrackingIBLL.GetMP_ManageMentPlanEntity(item); + entity.MPConclusion = status ? 1 : 0; + mP_PerformanceTrackingIBLL.SaveEntity(item, entity); + } return Success("操作成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MP_QualityObjectivesController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MP_QualityObjectivesController.cs index 90a357c94..c38535fce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MP_QualityObjectivesController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MP_QualityObjectivesController.cs @@ -136,10 +136,14 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [AjaxOnly] public ActionResult Qqualified(string keyValue, bool status) { - var entity = mP_QualityObjectivesIBLL.GetMP_ManageMentPlanEntity(keyValue); - entity.MPConclusion = status?1:0; - mP_QualityObjectivesIBLL.SaveEntity(keyValue, entity); - return Success("删除成功!"); + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + var entity = mP_QualityObjectivesIBLL.GetMP_ManageMentPlanEntity(item); + entity.MPConclusion = status ? 1 : 0; + mP_QualityObjectivesIBLL.SaveEntity(item, entity); + } + return Success("操作成功!"); } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/IndexManagement.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/IndexManagement.js index d09f68dee..cb221f741 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/IndexManagement.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MP_PerformanceTracking/IndexManagement.js @@ -73,6 +73,10 @@ var bootstrap = function ($, learun) { $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('MPId'); if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return; + } learun.layerForm({ id: 'form', title: '编辑', @@ -89,6 +93,10 @@ var bootstrap = function ($, learun) { $('#lr_uploadView').on('click', function () { var keyValue = $('#gridtable').jfGridValue('MPId'); if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return; + } learun.layerFormForPercent({ id: 'form', title: '提交材料', @@ -119,6 +127,10 @@ var bootstrap = function ($, learun) { $("#lr_statistics").on('click', function () { var keyValue = $('#gridtable').jfGridValue('MPId'); if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行编辑!"); + return; + } learun.layerFormForPercent({ id: 'form', title: '访问情况统计', @@ -236,7 +248,8 @@ var bootstrap = function ($, learun) { ], mainId: 'MPId', sidx: 'cast(MPMonth as int) asc', - isPage: true + isPage: true, + isMultiselect: true }); page.search(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_PerformanceTracking/MP_PerformanceTrackingService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_PerformanceTracking/MP_PerformanceTrackingService.cs index 97d468d0a..2648d1eab 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_PerformanceTracking/MP_PerformanceTrackingService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_PerformanceTracking/MP_PerformanceTrackingService.cs @@ -25,7 +25,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// 查询参数 /// - public IEnumerable GetPageList(Pagination pagination, string queryJson,int MPType=1) + public IEnumerable GetPageList(Pagination pagination, string queryJson, int MPType = 1) { try { @@ -85,12 +85,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } if (!queryParam["MPAcademicYearNo"].IsEmpty()) { - dp.Add("MPAcademicYearNo",queryParam["MPAcademicYearNo"].ToString(), DbType.String); + dp.Add("MPAcademicYearNo", queryParam["MPAcademicYearNo"].ToString(), DbType.String); strSql.Append(" AND t.MPAcademicYearNo = @MPAcademicYearNo "); } if (!queryParam["MPSemester"].IsEmpty()) { - dp.Add("MPSemester",queryParam["MPSemester"].ToString(), DbType.String); + dp.Add("MPSemester", queryParam["MPSemester"].ToString(), DbType.String); strSql.Append(" AND t.MPSemester = @MPSemester "); } if (!queryParam["MPDepartment"].IsEmpty()) @@ -108,7 +108,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement dp.Add("MPUploader", "%" + queryParam["MPUploader"].ToString() + "%", DbType.String); strSql.Append(" AND t.MPUploader Like @MPUploader "); } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -160,7 +160,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { - this.BaseRepository("CollegeMIS").Delete(t=>t.MPId == keyValue); + //多个删除 + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + this.BaseRepository("CollegeMIS").Delete(t => t.MPId == keyValue); + } } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_QualityObjectives/MP_QualityObjectivesService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_QualityObjectives/MP_QualityObjectivesService.cs index 4c8f8c67c..ebdb5c34c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_QualityObjectives/MP_QualityObjectivesService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MP_QualityObjectives/MP_QualityObjectivesService.cs @@ -160,7 +160,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { - this.BaseRepository("CollegeMIS").Delete(t => t.MPId == keyValue); + //多个删除 + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + this.BaseRepository("CollegeMIS").Delete(t => t.MPId == keyValue); + } } catch (Exception ex) {