diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs index 6f91ae6e3..848418fdb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs @@ -363,13 +363,16 @@ namespace Learun.Application.WebApi.Modules return Fail("缺少参数:Grade"); } string query = "{\"Grade\":\"" + grade + "\"}"; - var list = stuInfoFreshIBLL.GetList2(query).Where(m => !string.IsNullOrEmpty(m.ExamPhoto)); + var list = stuInfoFreshIBLL.GetList2(query); foreach (var item in list) { - var annexesFileEntity = annexesFileIBLL.GetEntityByFolderId(item.ExamPhoto); - if (annexesFileEntity != null && annexesFileEntity.F_FilePath.IndexOf("Resource") != -1) + if (!string.IsNullOrEmpty(item.ExamPhoto)) { - item.ExamPhoto = webrootpath + "/" + annexesFileEntity.F_FilePath.Substring(annexesFileEntity.F_FilePath.IndexOf("Resource")); + var annexesFileEntity = annexesFileIBLL.GetEntityByFolderId(item.ExamPhoto); + if (annexesFileEntity != null && annexesFileEntity.F_FilePath.IndexOf("Resource") != -1) + { + item.ExamPhoto = webrootpath + "/" + annexesFileEntity.F_FilePath.Substring(annexesFileEntity.F_FilePath.IndexOf("Resource")); + } } } return Success(list.Select(m => new