diff --git a/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs b/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs index 670b244e..6daab44a 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs @@ -269,6 +269,7 @@ public class Ghre_OpenClassServices : BaseServices InsertStaff(long Id, List staffIds) { var entity = await base.QueryById(Id); + var stafffIds = new List(); if (entity.StaffGroupId.IsNotEmptyOrNull()) { diff --git a/Tiobon.Core.Services/Ghre/Ghre_StaffGroupServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StaffGroupServices.cs index 7b548cdc..3def7e77 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StaffGroupServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StaffGroupServices.cs @@ -172,7 +172,7 @@ public class Ghre_StaffGroupServices : BaseServices(filter.pageNum, 0, filter.pageSize, new List()); + x.StaffType1s = JsonHelper.JsonToObj>(x.StaffType1); x.StaffType2s = JsonHelper.JsonToObj>(x.StaffType2); x.ZoneIds = JsonHelper.JsonToObj>(x.ZoneId); diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index e511ea9f..27c1b582 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -1270,7 +1270,6 @@ WHERE A.Status !='Temporary' AND ( EXISTS entitys.ForEach(x => { - x.ShowStudyBtn = false; x.ShowExamBtn = false; x.ShowRegisterBtn = false; @@ -1301,6 +1300,13 @@ WHERE A.Status !='Temporary' AND ( EXISTS if (x.IsRequireStudy == false) x.ShowStudyBtn = false; + + + if (dt >= x.CourseBeginDate && dt <= x.CourseEndDate) + x.DisableStudyBtn = false; + else + x.DisableStudyBtn = true; + if (!x.ExamId.IsNull()) { if (x.ExamBeginDate != null && x.ExamEndDate != null) @@ -1364,7 +1370,6 @@ WHERE A.Status !='Temporary' AND ( EXISTS #region 处理开班自动绑定学习记录 if (await Db.Queryable().Where(x => x.Id == id).AnyAsync() && - await Db.Queryable().Where(x => x.OpenClassId == id && x.StaffId == App.User.StaffId).AnyAsync() && !await Db.Queryable().Where(x => x.OpenClassId == id && x.StaffId == App.User.StaffId).AnyAsync()) { var openClass = await Db.Queryable().Where(x => x.Id == id).FirstAsync();