master
xiaochanghai 5 months ago
parent 450507a84b
commit e892574d7f
  1. 4373
      Model/Tiobon.Web.pdm
  2. 10
      Tiobon.Core.Api/Tiobon.Core.Model.xml
  3. 4
      Tiobon.Core.Api/appsettings.json
  4. 12
      Tiobon.Core.Model/Base/Ghre/Ghre_CourseWareAttachment.Dto.Base.cs
  5. 11
      Tiobon.Core.Model/Models/Ghre/Ghre_CourseWareAttachment.cs
  6. 4
      Tiobon.Core.Services/Ghre/Ghre_CourseWareServices.cs
  7. 2
      Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs
  8. 10
      Tiobon.Core/Tiobon.Core.Model.xml

File diff suppressed because it is too large Load Diff

@ -3460,6 +3460,11 @@
预留字段12 预留字段12
</summary> </summary>
</member> </member>
<member name="P:Tiobon.Core.Model.Models.Ghre_CourseWareAttachmentBase.SortNo">
<summary>
排序
</summary>
</member>
<member name="T:Tiobon.Core.Model.Models.Ghre_CreditPointBase"> <member name="T:Tiobon.Core.Model.Models.Ghre_CreditPointBase">
<summary> <summary>
学分记录 (Dto.Base) 学分记录 (Dto.Base)
@ -17131,6 +17136,11 @@
预留字段12 预留字段12
</summary> </summary>
</member> </member>
<member name="P:Tiobon.Core.Model.Models.Ghre_CourseWareAttachment.SortNo">
<summary>
排序
</summary>
</member>
<member name="T:Tiobon.Core.Model.Models.Ghre_CreditPoint"> <member name="T:Tiobon.Core.Model.Models.Ghre_CreditPoint">
<summary> <summary>
学分记录 (Model) 学分记录 (Model)

@ -107,8 +107,8 @@
"ConnId": "WMTiobon_MSSQL_Main", "ConnId": "WMTiobon_MSSQL_Main",
"DBType": 1, "DBType": 1,
"Enabled": true, "Enabled": true,
"Connection": "Data Source=47.99.54.186;User ID=GHR;Password=Tiobon20190101;Database=GHR30;Encrypt=True;TrustServerCertificate=True;", "Connection1": "Data Source=47.99.54.186;User ID=GHR;Password=Tiobon20190101;Database=GHR30;Encrypt=True;TrustServerCertificate=True;",
"Connection1": "Data Source=47.99.54.186;User ID=GHR;Password=Tiobon20190101;Database=GHR5_TY;Encrypt=True;TrustServerCertificate=True;", "Connection": "Data Source=47.99.54.186;User ID=GHR;Password=Tiobon20190101;Database=GHR5_TY;Encrypt=True;TrustServerCertificate=True;",
"ProviderName": "System.Data.SqlClient" "ProviderName": "System.Data.SqlClient"
}, },
{ {

@ -6,17 +6,14 @@
* *
* Ver * Ver
* *
*V0.01 2024/5/27 16:55:23 SimonHsiao *V0.01 2025/1/14 15:35:05 SimonHsiao
* *
* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. * Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
* *
*   *  
* SimonHsiao * SimonHsiao
* *
*/ */
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Tiobon.Core.Model.Models namespace Tiobon.Core.Model.Models
{ {
@ -139,5 +136,10 @@ namespace Tiobon.Core.Model.Models
/// 预留字段12 /// 预留字段12
/// </summary> /// </summary>
public int? ReverseI2 { get; set; } public int? ReverseI2 { get; set; }
/// <summary>
/// 排序
/// </summary>
public int? SortNo { get; set; }
} }
} }

@ -6,9 +6,9 @@
* *
* Ver * Ver
* *
*V0.01 2024/5/27 16:55:23 SimonHsiao *V0.01 2025/1/14 15:35:05 SimonHsiao
* *
* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. * Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
* *
*   *  
* SimonHsiao * SimonHsiao
@ -38,7 +38,7 @@ namespace Tiobon.Core.Model.Models
/// <summary> /// <summary>
/// 扩展名 /// 扩展名
/// </summary> /// </summary>
[Display(Name = "AttachFileExtension"), Description("扩展名"), MaxLength(32, ErrorMessage = "扩展名 不能超过 32 个字符")] [Display(Name = "AttachFileExtension"), Description("扩展名"), MaxLength(256, ErrorMessage = "扩展名 不能超过 256 个字符")]
public string AttachFileExtension { get; set; } public string AttachFileExtension { get; set; }
/// <summary> /// <summary>
@ -137,5 +137,10 @@ namespace Tiobon.Core.Model.Models
/// 预留字段12 /// 预留字段12
/// </summary> /// </summary>
public int? ReverseI2 { get; set; } public int? ReverseI2 { get; set; }
/// <summary>
/// 排序
/// </summary>
public int? SortNo { get; set; }
} }
} }

@ -105,7 +105,7 @@ public class Ghre_CourseWareServices : BaseServices<Ghre_CourseWare, Ghre_Course
var attachments = await _ghre_CourseWareAttachmentServices.Query(x => x.CourseWareId == body.id); var attachments = await _ghre_CourseWareAttachmentServices.Query(x => x.CourseWareId == body.id);
result.result.DT_TableDataT1[0].Attachments = attachments.Where(x => x.AttachFileExtension != "http").ToList(); result.result.DT_TableDataT1[0].Attachments = attachments.OrderBy(x => x.SortNo).Where(x => x.AttachFileExtension != "http").ToList();
if (result.result.DT_TableDataT1[0].Attachments.Any()) if (result.result.DT_TableDataT1[0].Attachments.Any())
{ {
result.result.DT_TableDataT1[0].Attachments.ForEach(x => x.RelativePath = "/Advanced" + x.RelativePath); result.result.DT_TableDataT1[0].Attachments.ForEach(x => x.RelativePath = "/Advanced" + x.RelativePath);
@ -179,7 +179,7 @@ public class Ghre_CourseWareServices : BaseServices<Ghre_CourseWare, Ghre_Course
x.StudyDuration = $"{x.Hours}小时{x.Minutes}分钟"; x.StudyDuration = $"{x.Hours}小时{x.Minutes}分钟";
x.SourceLabel = await GetParaLabel("CourseWareSource", x.Source); x.SourceLabel = await GetParaLabel("CourseWareSource", x.Source);
x.Attachments = attachments.Where(a => a.CourseWareId == x.Id && a.AttachFileExtension != "http").ToList(); x.Attachments = attachments.Where(a => a.CourseWareId == x.Id && a.AttachFileExtension != "http").OrderBy(x => x.SortNo).ToList();
x.Links = attachments.Where(x => x.AttachFileExtension == "http") x.Links = attachments.Where(x => x.AttachFileExtension == "http")
.Select(x => new Ghre_CourseWareLink() .Select(x => new Ghre_CourseWareLink()
{ {

@ -1234,7 +1234,7 @@ WHERE A.Id = '{id}'";
for (int j = 0; j < course.CourseWareList.Count; j++) for (int j = 0; j < course.CourseWareList.Count; j++)
{ {
var attachments = await Db.Queryable<Ghre_CourseWareAttachment>().Where(x => x.CourseWareId == course.CourseWareList[j].Id).ToListAsync(); var attachments = await Db.Queryable<Ghre_CourseWareAttachment>().Where(x => x.CourseWareId == course.CourseWareList[j].Id).ToListAsync();
course.CourseWareList[j].Attachments = attachments.Where(x => x.AttachFileExtension != "http").ToList(); course.CourseWareList[j].Attachments = attachments.Where(x => x.AttachFileExtension != "http").OrderBy(x => x.SortNo).ToList();
if (course.CourseWareList[j].Attachments != null && course.CourseWareList[j].Attachments.Any()) if (course.CourseWareList[j].Attachments != null && course.CourseWareList[j].Attachments.Any())
course.CourseWareList[j].Attachments.ForEach(x => x.RelativePath = "/Advanced" + x.RelativePath); course.CourseWareList[j].Attachments.ForEach(x => x.RelativePath = "/Advanced" + x.RelativePath);

@ -3460,6 +3460,11 @@
预留字段12 预留字段12
</summary> </summary>
</member> </member>
<member name="P:Tiobon.Core.Model.Models.Ghre_CourseWareAttachmentBase.SortNo">
<summary>
排序
</summary>
</member>
<member name="T:Tiobon.Core.Model.Models.Ghre_CreditPointBase"> <member name="T:Tiobon.Core.Model.Models.Ghre_CreditPointBase">
<summary> <summary>
学分记录 (Dto.Base) 学分记录 (Dto.Base)
@ -17131,6 +17136,11 @@
预留字段12 预留字段12
</summary> </summary>
</member> </member>
<member name="P:Tiobon.Core.Model.Models.Ghre_CourseWareAttachment.SortNo">
<summary>
排序
</summary>
</member>
<member name="T:Tiobon.Core.Model.Models.Ghre_CreditPoint"> <member name="T:Tiobon.Core.Model.Models.Ghre_CreditPoint">
<summary> <summary>
学分记录 (Model) 学分记录 (Model)

Loading…
Cancel
Save