diff --git a/Tiobon.Core.Api/Controllers/Ghre/Ghre_CourseController.cs b/Tiobon.Core.Api/Controllers/Ghre/Ghre_CourseController.cs index f27f3c09..50cd8a27 100644 --- a/Tiobon.Core.Api/Controllers/Ghre/Ghre_CourseController.cs +++ b/Tiobon.Core.Api/Controllers/Ghre/Ghre_CourseController.cs @@ -68,4 +68,9 @@ public class Ghre_CourseController : BaseController> QueryPublicSearchFields([FromBody] QueryBody body) + { + return await _service.QueryPublicSearchFields(body); + } } \ No newline at end of file diff --git a/Tiobon.Core.Api/Controllers/Ghre/Ghre_CreditPointController.cs b/Tiobon.Core.Api/Controllers/Ghre/Ghre_CreditPointController.cs index 8b97d32a..024ffae2 100644 --- a/Tiobon.Core.Api/Controllers/Ghre/Ghre_CreditPointController.cs +++ b/Tiobon.Core.Api/Controllers/Ghre/Ghre_CreditPointController.cs @@ -24,6 +24,11 @@ public class Ghre_CreditPointController : BaseController /// 根据工号查询学分明细 /// @@ -35,6 +40,5 @@ public class Ghre_CreditPointController : BaseControllerbody + + + 根据工号查询学分明细 + + + 员工ID + + 考试(Controller) diff --git a/Tiobon.Core.Api/appsettings.json b/Tiobon.Core.Api/appsettings.json index 07f0422c..c0fff0b1 100644 --- a/Tiobon.Core.Api/appsettings.json +++ b/Tiobon.Core.Api/appsettings.json @@ -1,5 +1,5 @@ { - "urls": "http://*:9291", //web服务端口,如果用IIS部署,把这个去掉 + "urls": "http://*:9292", //web服务端口,如果用IIS部署,把这个去掉 "Serilog": { "MinimumLevel": { "Default": "Debug", diff --git a/Tiobon.Core.IServices/Ghre/IGhre_CourseServices.cs b/Tiobon.Core.IServices/Ghre/IGhre_CourseServices.cs index 8ebbfa66..30f49c19 100644 --- a/Tiobon.Core.IServices/Ghre/IGhre_CourseServices.cs +++ b/Tiobon.Core.IServices/Ghre/IGhre_CourseServices.cs @@ -20,5 +20,7 @@ namespace Tiobon.Core.IServices Task> ExportExcel(QueryExport body, string status); + Task> QueryPublicSearchFields(QueryBody body); + } } \ No newline at end of file diff --git a/Tiobon.Core.Model/ViewModels/Extend/CoursePublicSearchField.cs b/Tiobon.Core.Model/ViewModels/Extend/CoursePublicSearchField.cs new file mode 100644 index 00000000..38d86555 --- /dev/null +++ b/Tiobon.Core.Model/ViewModels/Extend/CoursePublicSearchField.cs @@ -0,0 +1,22 @@ +namespace Tiobon.Core.Model; + +public class CoursePublicSearch +{ + public List DT_PageMutiMsg { get; set; } + public List SearchFields { get; set; } = new List(); +} +public class CoursePublicSearchField +{ + + public string label { get; set; } + public string field { get; set; } + public string elementType { get; set; } + public bool required { get; set; } + public bool multipleSelect { get; set; } + public bool editable { get; set; } + public string dataSource { get; set; } + public string placeholder { get; set; } + + public int displayType { get; set; } + public int width { get; set; } = 150; +} \ No newline at end of file diff --git a/Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs b/Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs index 2d83b27d..dc4d368d 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs @@ -408,4 +408,69 @@ public class Ghre_CourseServices : BaseServices.OprateSuccess("导出成功", path); } + + #region 获取公开课查询条件 + public async Task> QueryPublicSearchFields(QueryBody body) + { + var entity = new CoursePublicSearch(); + string sql = @"SELECT Langkey field, + CASE {2} + WHEN 1 THEN isnull (Value01, LangValue) + WHEN 2 THEN isnull (Value02, LangValue) + WHEN 3 THEN isnull (Value03, LangValue) + WHEN 4 THEN isnull (Value04, LangValue) + WHEN 5 THEN isnull (Value05, LangValue) + WHEN 6 THEN isnull (Value06, LangValue) + WHEN 7 THEN isnull (Value07, LangValue) + WHEN 8 THEN isnull (Value08, LangValue) + WHEN 9 THEN isnull (Value09, LangValue) + WHEN 10 THEN isnull (Value10, LangValue) + END label + FROM Ghrs_LangKey + WHERE IsEnable = 1 + AND (LangKey LIKE 'GHR_Page%' OR LangKey LIKE 'GHR_Common%')"; + sql = string.Format(sql, body.menuName, App.User.ID, body.langId); + entity.DT_PageMutiMsg = await Db.Ado.SqlQueryAsync(sql); + entity.SearchFields.Add(new CoursePublicSearchField() + { + label = "课程编号/名称", + field = "CourseNoOrName", + elementType = "Input", + editable = true, + required = false, + multipleSelect = false, + }); + entity.SearchFields.Add(new CoursePublicSearchField() + { + label = "课程分类", + field = "CourseClassId", + elementType = "ApiSelect", + dataSource = "CommonList_TrainingCourseClass", + editable = true, + required = false, + multipleSelect = false, + }); + entity.SearchFields.Add(new CoursePublicSearchField() + { + label = "'课程场景", + field = "CourseSceneId", + elementType = "ApiSelect", + dataSource = "CommonList_TrainingCourseScene", + editable = true, + required = false, + multipleSelect = false, + }); + entity.SearchFields.Add(new CoursePublicSearchField() + { + label = "'是否学过", + field = "HasStudy", + elementType = "ApiSelect", + dataSource = "TBParaDetail_Train_CourseIsOpen", + editable = true, + required = false, + multipleSelect = false, + }); + return ServiceResult.OprateSuccess("", entity); + } + #endregion } \ No newline at end of file diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 554eff7b..a153619b 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -12125,5 +12125,20 @@ 学分 + + + Id + + + + + + + + + + 学分 + + diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index ea5a7266..756ea6e8 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -646,6 +646,14 @@ body + + + 根据工号查询学分明细 + + + 员工ID + + 考试(Controller)