From 1e003e4d453da39a204bc396df63808d1de954b5 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Thu, 1 Dec 2022 11:50:34 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF-=E6=88=91=E7=9A=84=E8=AF=BE=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=9A=E5=A2=9E=E5=8A=A0=E8=AF=B7=E5=81=87?= =?UTF-8?q?=E6=A0=87=E8=AF=86=E5=92=8C=E5=AE=A1=E6=89=B9=E7=8A=B6=E6=80=81?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ArrangeLessonTermController.cs | 6 +++--- .../Learun.Application.WebApi/Modules/TimeTable.cs | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs index 59c0b8b36..4908acf4d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs @@ -365,7 +365,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return JsonResult(noDataResult); } //学生课表请假记录 - var leaveList = stuAttendanceLeaveIBLL.GetList(); + var leaveList = stuAttendanceLeaveIBLL.GetListByJson("{\"StuNo\":\"" + userInfo.account + "\"}"); var formatData = from d in timeTables.AsEnumerable() let tt = d.LessonTime.Split('-')[1] group d by tt into g @@ -394,8 +394,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers lessonSortNo = e.LessonSortNo, e?.OLPEId, className = string.IsNullOrEmpty(e.ClassName) ? "" : e.ClassName, - leaveType = leaveList.Any(c => c.LessonNo == e?.LessonNo && c.StuNo == userInfo.account && c.LessonDate == e.LessonDate && c.LessonTime == e.LessonTime) ? 1 : 0, - checkType = leaveList.FirstOrDefault(c => c.LessonNo == e?.LessonNo && c.StuNo == userInfo.account && c.LessonDate == e.LessonDate && c.LessonTime == e.LessonTime)?.IsCheck, + leaveType = leaveList.Any(c => c.LessonNo == e?.LessonNo && c.LessonDate == e.LessonDate && c.LessonTime == e.LessonTime) ? 1 : 0, + checkType = leaveList.FirstOrDefault(c => c.LessonNo == e?.LessonNo && c.LessonDate == e.LessonDate && c.LessonTime == e.LessonTime)?.IsCheck, } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs index 47b01af09..f89c04510 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs @@ -6,6 +6,7 @@ using System.Data.SqlClient; using System.Linq; using System.Threading.Tasks; using System.Web; +using System.Web.Helpers; using Learun.Application.Organization; using Learun.Application.TwoDevelopment.EducationalAdministration; using Learun.Util; @@ -295,7 +296,8 @@ namespace Learun.Application.WebApi.Modules Data = arrangeLessonTermIBLL.GetTimeTableInEducation(param.StartDate, param.EndDate, "", param.Account, "").ToList(); } } - + //学生课表请假记录 + var leaveList = stuAttendanceLeaveIBLL.GetListByJson("{\"StuNo\":\""+userInfo.account+"\"}"); var formatData = from d in Data.AsEnumerable() let tt = d.LessonTime.Split('-')[0] group d by tt into g @@ -324,7 +326,10 @@ namespace Learun.Application.WebApi.Modules classRoomNo = string.IsNullOrEmpty(e.ClassRoomNo) ? "" : e.ClassRoomNo.Trim(), lessonSortNo = e.LessonSortNo, e?.OLPEId, - className = string.IsNullOrEmpty(e.ClassName) ? "" : e.ClassName + className = string.IsNullOrEmpty(e.ClassName) ? "" : e.ClassName, + leaveType = leaveList.Any(c => c.LessonNo == e?.LessonNo && c.LessonDate == e.LessonDate && c.LessonTime == e.LessonTime) ? 1 : 0, + checkType = leaveList.FirstOrDefault(c => c.LessonNo == e?.LessonNo && c.LessonDate == e.LessonDate && c.LessonTime == e.LessonTime)?.IsCheck, + } } ;