@@ -439,6 +439,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
} | } | ||||
List<StuInfoFreshEmergePeopleEntity> stuInfoFreshEmergePeopleList = strstuInfoFreshEmergePeopleList.ToObject<List<StuInfoFreshEmergePeopleEntity>>(); | List<StuInfoFreshEmergePeopleEntity> stuInfoFreshEmergePeopleList = strstuInfoFreshEmergePeopleList.ToObject<List<StuInfoFreshEmergePeopleEntity>>(); | ||||
List<StuInfoFreshFamilyEntity> stuInfoFreshFamilyList = strstuInfoFreshFamilyList.ToObject<List<StuInfoFreshFamilyEntity>>(); | 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); | stuInfoFreshIBLL.SaveEntity(keyValue, entity, stuInfoFreshEmergePeopleList, stuInfoFreshFamilyList); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
@@ -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> | /// <summary> | ||||
/// 获取分配宿舍列表 | /// 获取分配宿舍列表 | ||||
@@ -75,6 +75,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<StuInfoFreshEntity> GetStuInfoFreshListByClassNo(string classNo); | IEnumerable<StuInfoFreshEntity> GetStuInfoFreshListByClassNo(string classNo); | ||||
IEnumerable<StuInfoFreshEntity> Getksh(string ksh); | |||||
/// <summary> | /// <summary> | ||||
/// 获取分配宿舍列表 | /// 获取分配宿舍列表 | ||||
/// </summary> | /// </summary> | ||||
@@ -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> | ||||
/// 获取分配宿舍列表 | /// 获取分配宿舍列表 | ||||
/// </summary> | /// </summary> | ||||