Browse Source

新生信息管理 保存时考生号重复提示有误

临城职教中职
ndbs 2 years ago
parent
commit
8f991d32f6
4 changed files with 57 additions and 0 deletions
  1. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs
  2. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs
  3. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs
  4. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs

+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs View File

@@ -439,6 +439,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}
List<StuInfoFreshEmergePeopleEntity> stuInfoFreshEmergePeopleList = strstuInfoFreshEmergePeopleList.ToObject<List<StuInfoFreshEmergePeopleEntity>>();
List<StuInfoFreshFamilyEntity> stuInfoFreshFamilyList = strstuInfoFreshFamilyList.ToObject<List<StuInfoFreshFamilyEntity>>();
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("保存成功!");
}


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs View File

@@ -253,6 +253,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
public IEnumerable<StuInfoFreshEntity> Getksh(string ksh)
{
try
{
return stuInfoFreshService.Getksh(ksh);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取分配宿舍列表


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs View File

@@ -75,6 +75,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <returns></returns>
IEnumerable<StuInfoFreshEntity> GetStuInfoFreshListByClassNo(string classNo);

IEnumerable<StuInfoFreshEntity> Getksh(string ksh);

/// <summary>
/// 获取分配宿舍列表
/// </summary>


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs View File

@@ -592,6 +592,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取列表分页数据
/// <param name="pagination">分页参数</param>
/// <summary>
/// <returns></returns>
public IEnumerable<StuInfoFreshEntity> Getksh(string ksh)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<StuInfoFreshEntity>(x => x.ksh == ksh);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取分配宿舍列表
/// </summary>


Loading…
Cancel
Save