From 1fe803ac9eb9489d04ca944ba37a8f9b02d53cda Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Fri, 9 May 2025 13:42:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=BA=E5=91=98=E7=BE=A4?= =?UTF-8?q?=E7=BB=84=E6=9F=A5=E8=AF=A2=E4=BA=BA=E5=91=98=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs | 1 + Tiobon.Core.Services/Ghre/Ghre_StaffGroupServices.cs | 5 ++++- Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs | 9 +++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) 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();