diff --git a/Tiobon.Core.Model/Models/Ghre/Ghre_OpenClass.cs b/Tiobon.Core.Model/Models/Ghre/Ghre_OpenClass.cs
index e910b3f8..bc4d12c9 100644
--- a/Tiobon.Core.Model/Models/Ghre/Ghre_OpenClass.cs
+++ b/Tiobon.Core.Model/Models/Ghre/Ghre_OpenClass.cs
@@ -178,7 +178,7 @@ public class Ghre_OpenClass : BasePoco
///
/// 是否需要学习
///
- public int? IsRequireStudy { get; set; }
+ public bool? IsRequireStudy { get; set; }
///
/// 发布状态
diff --git a/Tiobon.Core.Model/View/Ghre/Ghre_StaffGroup.Dto.View.cs b/Tiobon.Core.Model/View/Ghre/Ghre_StaffGroup.Dto.View.cs
index 6c80fa40..c37401ac 100644
--- a/Tiobon.Core.Model/View/Ghre/Ghre_StaffGroup.Dto.View.cs
+++ b/Tiobon.Core.Model/View/Ghre/Ghre_StaffGroup.Dto.View.cs
@@ -101,4 +101,7 @@ public class Ghre_StaffGroupDto : Ghre_StaffGroup
/// 不包含员工
///
public List ExclStaffIds { get; set; } = new List();
+
+ public int MasterId { get; set; }
+ public string DataType { get; set; }
}
diff --git a/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs b/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs
index 8b6717cb..6e993910 100644
--- a/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs
+++ b/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs
@@ -272,7 +272,7 @@ public class Ghre_OpenClassServices : BaseServices.OprateSuccess("导出成功", result);
+ return ServiceResult.OprateSuccess("导出成功", result);
}
#endregion
@@ -374,7 +374,8 @@ public class Ghre_OpenClassServices : BaseServices().Where(x => x.OpenClassId != null && ids.Contains(x.OpenClassId.Value) && x.StaffId == staffId).ToListAsync();
- var dt = DateTime.Now.Date;
+ var dt = DateTime.Now;
entitys.ForEach(x =>
{
@@ -1311,11 +1251,25 @@ WHERE A.Status !='Temporary' AND EXISTS (
x.ShowExamBtn = false;
x.ShowRegisterBtn = false;
- if (dt >= x.RegisterStartTime && dt <= x.RegisterEndTime && x.OpenClassStatus == "Publish" && !openClassStaffs.Any(o => o.OpenClassId == x.Id))
+ x.DisableExamBtn = true;
+ x.DisableStudyBtn = true;
+
+
+ if (x.OpenClassStatus == "Publish" && !openClassStaffs.Any(o => o.OpenClassId == x.Id))
+ {
x.ShowRegisterBtn = true;
+ x.DisableRegisterBtn = true;
+ if (dt >= x.RegisterStartTime && dt <= x.RegisterEndTime)
+ x.DisableRegisterBtn = false;
- if (dt >= x.CourseBeginDate && dt <= x.CourseEndDate && (x.OpenClassStatus == "Publish" || x.OpenClassStatus == "Opening") && openClassStaffs.Any(o => o.OpenClassId == x.Id))
+ }else if (openClassStaffs.Any(o => o.OpenClassId == x.Id))
+ {
x.ShowStudyBtn = true;
+ x.ShowExamBtn = true;
+ }
+
+ if (dt >= x.CourseBeginDate && dt <= x.CourseEndDate && (x.OpenClassStatus == "Publish" || x.OpenClassStatus == "Opening") && openClassStaffs.Any(o => o.OpenClassId == x.Id))
+ x.DisableStudyBtn = false;
if (x.CourseBeginDate != null && x.CourseEndDate != null)
x.CourseDateString = DateTimeHelper.ConvertToDayString(x.CourseBeginDate) + "~" + DateTimeHelper.ConvertToDayString(x.CourseEndDate);
@@ -1330,8 +1284,9 @@ WHERE A.Status !='Temporary' AND EXISTS (
//if (x.CourseBeginDate != null && x.CourseEndDate != null)
// if (x.StudyProgress >= 100 || !(x.CourseBeginDate.Value.Date <= DateTime.Now.Date && x.CourseEndDate.Value.Date >= DateTime.Now.Date))
// x.DisableStudyBtn = true;
- if (!x.ExamId.IsNull())
- x.ShowExamBtn = true;
+ if (!x.ExamId.IsNull() && x.ExamBeginDate != null && x.ExamEndDate != null && x.ExamBeginDate <= dt && x.ExamEndDate >= dt)
+ x.DisableExamBtn = false;
+
if (x.StudyProgress < 100 || x.ExamId.IsNull())
x.DisableExamBtn = true;
if (x.FeedbackOrderId.IsNull())