diff --git a/Tiobon.Core.Model/Models/Ghre/Ghre_CourseScene.cs b/Tiobon.Core.Model/Models/Ghre/Ghre_CourseScene.cs
index c006fa15..e7c418ce 100644
--- a/Tiobon.Core.Model/Models/Ghre/Ghre_CourseScene.cs
+++ b/Tiobon.Core.Model/Models/Ghre/Ghre_CourseScene.cs
@@ -63,6 +63,33 @@ namespace Tiobon.Core.Model.Models
///
public int? SortNo { get; set; }
+ ///
+ /// 标准课时
+ ///
+ public int? StandardHour { get; set; }
+
+ ///
+ /// 学分
+ ///
+ public int? CreditPoints { get; set; }
+
+ ///
+ /// 封面图
+ ///
+ [Display(Name = "CoverUrl"), Description("封面图"), MaxLength(2000, ErrorMessage = "封面图 不能超过 2000 个字符")]
+ public string CoverUrl { get; set; }
+
+ ///
+ /// 是否使用默认封面
+ ///
+ public bool? UseDefaultCoverImage { get; set; }
+
+ ///
+ /// 默认封面图Name
+ ///
+ [Display(Name = "DefaultCoverImageName"), Description("默认封面图Name"), MaxLength(32, ErrorMessage = "默认封面图Name 不能超过 32 个字符")]
+ public string DefaultCoverImageName { get; set; }
+
///
/// 默认标志
///
diff --git a/Tiobon.Core.Model/View/Ghre/Ghre_RequiredCourse.Dto.View.cs b/Tiobon.Core.Model/View/Ghre/Ghre_RequiredCourse.Dto.View.cs
index ae5c007d..5413d962 100644
--- a/Tiobon.Core.Model/View/Ghre/Ghre_RequiredCourse.Dto.View.cs
+++ b/Tiobon.Core.Model/View/Ghre/Ghre_RequiredCourse.Dto.View.cs
@@ -50,7 +50,9 @@ public class Ghre_RequiredCourseDto : Ghre_RequiredCourse
public string InStatusLabel { get; set; }
public string DueDate1 { get; set; }
+
public string Indate1 { get; set; }
+ public long? CourseSceneId { get; set; }
public string ExamDate1
{
get; set;
diff --git a/Tiobon.Core.Services/Ghre/Ghre_RequiredCourseServices.cs b/Tiobon.Core.Services/Ghre/Ghre_RequiredCourseServices.cs
index e0f811b5..ce8c2945 100644
--- a/Tiobon.Core.Services/Ghre/Ghre_RequiredCourseServices.cs
+++ b/Tiobon.Core.Services/Ghre/Ghre_RequiredCourseServices.cs
@@ -73,6 +73,9 @@ public class Ghre_RequiredCourseServices : BaseServices" + (filter.pageNum - 1) * filter.pageSize;
var entitys = await Db.Ado.SqlQueryAsync(sql);
+ var courseSceneIds = entitys.Select(x => x.CourseSceneId).Distinct().ToList();
+
+ var courses = await Db.Queryable().Where(x => x.CourseSceneId != null && courseSceneIds.Contains(x.CourseSceneId)).ToListAsync();
entitys.ForEach(async x =>
{
@@ -85,6 +88,12 @@ public class Ghre_RequiredCourseServices : BaseServices x.CourseSceneId == x.CourseSceneId).Select(x => x.CourseName + " (" + x.CourseNo + ")"));
+ }
+ #endregion
});
return new ServicePageResult(filter.pageNum, total, filter.pageSize, entitys);
diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs
index 100accd0..482353e0 100644
--- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs
+++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs
@@ -19,7 +19,6 @@ using NPOI.SS.Util;
using NPOI.XSSF.UserModel;
using Microsoft.AspNetCore.Http;
using System.Data;
-using Org.BouncyCastle.Crypto;
namespace Tiobon.Core.Services;
@@ -101,6 +100,10 @@ public class Ghre_StudyRecordServices : BaseServices(sql);
+ var courseSceneIds = entitys.Select(x => x.CourseSceneId).Distinct().ToList();
+
+ var courses = await Db.Queryable().Where(x => x.CourseSceneId != null && courseSceneIds.Contains(x.CourseSceneId)).ToListAsync();
+
entitys.ForEach(entity =>
{
if (!string.IsNullOrWhiteSpace(entity.Indate))
@@ -118,6 +121,13 @@ public class Ghre_StudyRecordServices : BaseServices x.CourseSceneId == entity.CourseSceneId).Select(x => x.CourseName + " (" + x.CourseNo + ")"));
+ }
+ #endregion
+
});
return new ServicePageResult(filter.pageNum, total, filter.pageSize, entitys);
@@ -181,6 +191,10 @@ public class Ghre_StudyRecordServices : BaseServices(sql);
+ var courseSceneIds = entitys.Select(x => x.CourseSceneId).Distinct().ToList();
+
+ var courses = await Db.Queryable().Where(x => x.CourseSceneId != null && courseSceneIds.Contains(x.CourseSceneId)).ToListAsync();
+
entitys.ForEach(entity =>
{
if (!string.IsNullOrWhiteSpace(entity.Indate))
@@ -197,7 +211,12 @@ public class Ghre_StudyRecordServices : BaseServices x.CourseSceneId == entity.CourseSceneId).Select(x => x.CourseName + " (" + x.CourseNo + ")"));
+ }
+ #endregion
});
return new ServicePageResult(filter.pageNum, total, filter.pageSize, entitys);
diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml
index 1709f1fd..1608985d 100644
--- a/Tiobon.Core/Tiobon.Core.Model.xml
+++ b/Tiobon.Core/Tiobon.Core.Model.xml
@@ -1955,6 +1955,31 @@
排序
+
+
+ 标准课时
+
+
+
+
+ 学分
+
+
+
+
+ 封面图
+
+
+
+
+ 是否使用默认封面
+
+
+
+
+ 默认封面图Name
+
+
默认标志
@@ -8666,6 +8691,31 @@
排序
+
+
+ 标准课时
+
+
+
+
+ 学分
+
+
+
+
+ 封面图
+
+
+
+
+ 是否使用默认封面
+
+
+
+
+ 默认封面图Name
+
+
默认标志