From 8f991d32f622e473257ccd920ab22f01d52afb22 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 22 Mar 2022 12:18:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=94=9F=E4=BF=A1=E6=81=AF=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E4=BF=9D=E5=AD=98=E6=97=B6=E8=80=83=E7=94=9F?= =?UTF-8?q?=E5=8F=B7=E9=87=8D=E5=A4=8D=E6=8F=90=E7=A4=BA=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuInfoFreshController.cs | 13 ++++++++++ .../StuInfoFresh/StuInfoFreshBLL.cs | 18 ++++++++++++++ .../StuInfoFresh/StuInfoFreshIBLL.cs | 2 ++ .../StuInfoFresh/StuInfoFreshService.cs | 24 +++++++++++++++++++ 4 files changed, 57 insertions(+) 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 ae881ba38..2c1def844 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 @@ -439,6 +439,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)) + { + kshList.Where(x => x.ID == keyValue); + if (kshList.Count() > 0) + { + return Fail("保存失败,考生号不可重复"); + } + } + else + { + return Fail("保存失败,考生号不可重复"); + } stuInfoFreshIBLL.SaveEntity(keyValue, entity, stuInfoFreshEmergePeopleList, stuInfoFreshFamilyList); return Success("保存成功!"); } 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 65a5ef009..fdc7b57af 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,6 +253,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public IEnumerable Getksh(string ksh) + { + try + { + return stuInfoFreshService.Getksh(ksh); + } + 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/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs index d86565ebf..422191242 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,6 +75,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// IEnumerable GetStuInfoFreshListByClassNo(string classNo); + IEnumerable 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 564490085..4fed1b52f 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 @@ -592,6 +592,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取列表分页数据 + /// 分页参数 + /// + /// + public IEnumerable Getksh(string ksh) + { + try + { + return this.BaseRepository("CollegeMIS").FindList(x => x.ksh == ksh); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 获取分配宿舍列表 ///