From beb80878864b8b54c701d160a4f7d7299638d17a Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 22 Mar 2022 17:35:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=94=9F=E4=BF=A1=E6=81=AF=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuInfoFreshController.cs | 10 ++++++---- .../Views/Scholarshipxj/Indexzxj.js | 1 + .../StuInfoFresh/StuInfoFreshBLL.cs | 2 +- .../StuInfoFresh/StuInfoFreshIBLL.cs | 2 +- .../StuInfoFresh/StuInfoFreshService.cs | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs index 2c1def844..2fb9f24e3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs @@ -440,17 +440,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers List stuInfoFreshEmergePeopleList = strstuInfoFreshEmergePeopleList.ToObject>(); List stuInfoFreshFamilyList = strstuInfoFreshFamilyList.ToObject>(); var kshList = stuInfoFreshIBLL.Getksh(entity.ksh); - if (!string.IsNullOrEmpty(keyValue)) + if (string.IsNullOrEmpty(keyValue)) { - kshList.Where(x => x.ID == keyValue); - if (kshList.Count() > 0) + if (kshList != null) { return Fail("保存失败,考生号不可重复"); } } else { - return Fail("保存失败,考生号不可重复"); + if (kshList != null && kshList.ID != keyValue) + { + return Fail("保存失败,考生号不可重复"); + } } stuInfoFreshIBLL.SaveEntity(keyValue, entity, stuInfoFreshEmergePeopleList, stuInfoFreshFamilyList); return Success("保存成功!"); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Indexzxj.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Indexzxj.js index 5bfa2a096..bfbc1353a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Indexzxj.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Indexzxj.js @@ -68,6 +68,7 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + var State = $('#gridtable').jfGridValue('State'); if (State != 0) { learun.alert.warning("当前项不可进行删除!"); return false; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs index fdc7b57af..09eb1f7cc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs @@ -253,7 +253,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } - public IEnumerable Getksh(string ksh) + public StuInfoFreshEntity Getksh(string ksh) { try { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs index 422191242..3f3698ee3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs @@ -75,7 +75,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// IEnumerable GetStuInfoFreshListByClassNo(string classNo); - IEnumerable Getksh(string ksh); + StuInfoFreshEntity Getksh(string ksh); /// /// 获取分配宿舍列表 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs index 4fed1b52f..5afca2256 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs @@ -597,11 +597,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 分页参数 /// /// - public IEnumerable Getksh(string ksh) + public StuInfoFreshEntity Getksh(string ksh) { try { - return this.BaseRepository("CollegeMIS").FindList(x => x.ksh == ksh); + return this.BaseRepository("CollegeMIS").FindEntity(x => x.ksh == ksh); } catch (Exception ex) {