From 4520a040ed6f32888364235d963ec35e094bfe89 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 15 Jan 2025 14:28:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Api/appsettings.json | 4 ++-- Tiobon.Core.Services/CommonServices.cs | 10 ++++++++++ Tiobon.Core.Services/Ghre/Ghre_CourseWareServices.cs | 2 +- Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Tiobon.Core.Api/appsettings.json b/Tiobon.Core.Api/appsettings.json index 273ee7bf..3e44c36b 100644 --- a/Tiobon.Core.Api/appsettings.json +++ b/Tiobon.Core.Api/appsettings.json @@ -107,8 +107,8 @@ "ConnId": "WMTiobon_MSSQL_Main", "DBType": 1, "Enabled": true, - "Connection1": "Data Source=47.99.54.186;User ID=GHR;Password=Tiobon20190101;Database=GHR30;Encrypt=True;TrustServerCertificate=True;", - "Connection": "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=GHR30;Encrypt=True;TrustServerCertificate=True;", + "Connection1": "Data Source=47.99.54.186;User ID=GHR;Password=Tiobon20190101;Database=GHR5_TY;Encrypt=True;TrustServerCertificate=True;", "ProviderName": "System.Data.SqlClient" }, { diff --git a/Tiobon.Core.Services/CommonServices.cs b/Tiobon.Core.Services/CommonServices.cs index cc8b0e10..8cb5f9e9 100644 --- a/Tiobon.Core.Services/CommonServices.cs +++ b/Tiobon.Core.Services/CommonServices.cs @@ -1052,6 +1052,16 @@ public partial class CommonServices : BaseServices>, ICommon case "F_CourseScene": index = result.JM_PageControlT1.Toolbar.FindIndex(x => x.fnKey == "BatchUpdateYN"); result.JM_PageControlT1.Toolbar.RemoveAt(index); + + result.JM_PageControlT1.Toolbar.Insert(0, new Toolbar() + { + display = true, + fnKey = "TBD4YN", + fnTitle = "课程顺序", + fnType = "row", + icon = "ghr-publish", + position = "left" + }); break; case "F_SchoolManage": case "F_WorkLicenseManage": diff --git a/Tiobon.Core.Services/Ghre/Ghre_CourseWareServices.cs b/Tiobon.Core.Services/Ghre/Ghre_CourseWareServices.cs index fc6f787d..ad975deb 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_CourseWareServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_CourseWareServices.cs @@ -180,7 +180,7 @@ public class Ghre_CourseWareServices : BaseServices a.CourseWareId == x.Id && a.AttachFileExtension != "http").OrderBy(x => x.SortNo).ToList(); - x.Links = attachments.Where(x => x.AttachFileExtension == "http") + x.Links = attachments.Where(a => a.CourseWareId == x.Id && a.AttachFileExtension == "http").OrderBy(x => x.SortNo) .Select(x => new Ghre_CourseWareLink() { LinkName = x.AttachmentName, diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs index 6bec660a..9de704b8 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs @@ -869,7 +869,7 @@ delete from Ghre_ExamPaperQuestion WHERE ExamPaperId='{id}';"); { if (model.baseData.PassScore == 0) throw new Exception("及格分需大于0!"); - if (model.baseData.PassScore >= model.baseData.TotalScore) + if (model.baseData.PassScore > model.baseData.TotalScore) throw new Exception("及格分需小于卷面总分!"); if (model.baseData.AnswerTime <= 0)