From 5e7e79881c44d7d5209fec170c02c76ea1847a47 Mon Sep 17 00:00:00 2001 From: liangkun Date: Mon, 28 Nov 2022 18:27:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E5=AD=A6=E5=88=86=E9=93=B6=E8=A1=8C?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E4=B8=AA=E5=AD=A6=E7=94=9F=E5=AD=A6=E7=B1=8D?= =?UTF-8?q?=E7=85=A7=E7=89=87=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Arrangelesson.cs | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) 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 e0fd4693c..34d3510e2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Web; +using Learun.Application.Base.SystemModule; using Learun.Application.Organization; using Learun.Application.TwoDevelopment.EducationalAdministration; using Learun.Util; @@ -88,6 +90,7 @@ namespace Learun.Application.WebApi.Modules private StuSelectLessonListOfElectiveIBLL stuSelectLessonListOfElectiveIbll = new StuSelectLessonListOfElectiveBLL(); + private AnnexesFileIBLL annexesFileIbll = new AnnexesFileBLL(); private Response TranTest(dynamic _) { @@ -150,7 +153,7 @@ namespace Learun.Application.WebApi.Modules } private Response GetAllUsers(dynamic _) { - var webrootpath= Config.GetValue("webrootpath"); + var webrootpath = Config.GetValue("webrootpath"); var result = userIbll.GetAllList().Where(m => !m.F_Account.Contains("System") && m.F_DeleteMark == 0 && m.F_EnabledMark == 1).Select(m => new { m.F_UserId, @@ -162,13 +165,31 @@ namespace Learun.Application.WebApi.Modules m.F_Account, Year = "20" + stuInfoBasicIbll.GetStuInfoBasicEntityByStuNo(m.F_Account)?.Grade, m.F_IdentityCardNo, - F_HeadIcon= webrootpath + m?.F_HeadIcon + F_HeadIcon = webrootpath + m?.F_HeadIcon }); return Success(result); } private Response GetAllStudents(dynamic _) { + var webrootpath = Config.GetValue("webrootpath"); var result = stuInfoBasicIbll.GetAllList(); + foreach (var item in result) + { + if (!string.IsNullOrEmpty(item.Photo)) + { + var annfile = annexesFileIbll.GetEntityByFolderId(item.Photo); + if (annfile != null && annfile.F_FilePath != null) + { + item.Photo = webrootpath + item.Photo.Substring(item.Photo.IndexOf("Resource") - 1); + } + else + item.Photo = ""; + } + else + { + item.Photo = ""; + } + } return Success(result); } private Response GetDepartment(dynamic _)