From b96b8bcecbded492eb64dcb09ec3d0e1cb8dac46 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 29 May 2024 15:26:47 +0800 Subject: [PATCH] =?UTF-8?q?2.=E6=96=B0=E5=A2=9E=20=E8=80=83=E8=AF=95?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B5=E7=9A=84=E5=9F=BA=E7=A1=80=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Ghre/Ghre_ExamController.cs | 20 +- Tiobon.Core.Api/Tiobon.Core.Model.xml | 10 + Tiobon.Core.Api/Tiobon.Core.xml | 1 + .../Ghre/IGhre_ExamServices.cs | 2 + .../Extend/DefaultGhre_ExamInput.cs | 54 ++++++ .../Extend/DefaultGhre_ExamPaperInput.cs | 3 +- .../Ghre/Ghre_ExamServices.cs | 180 +++++++++++++++++- Tiobon.Core/Tiobon.Core.Model.xml | 10 + Tiobon.Core/Tiobon.Core.xml | 1 + 9 files changed, 274 insertions(+), 7 deletions(-) create mode 100644 Tiobon.Core.Model/ViewModels/Extend/DefaultGhre_ExamInput.cs diff --git a/Tiobon.Core.Api/Controllers/Ghre/Ghre_ExamController.cs b/Tiobon.Core.Api/Controllers/Ghre/Ghre_ExamController.cs index 5ea77ee3..22ea94b3 100644 --- a/Tiobon.Core.Api/Controllers/Ghre/Ghre_ExamController.cs +++ b/Tiobon.Core.Api/Controllers/Ghre/Ghre_ExamController.cs @@ -20,8 +20,7 @@ public class Ghre_ExamController : BaseController GetModuleInfo([FromBody] ModuleParam param) { - var data = await _service.GetModuleInfo(param); - return data; + return await _service.GetModuleInfo(param); } #endregion @@ -36,8 +35,21 @@ public class Ghre_ExamController : BaseController> QueryList(string status, [FromBody] QueryBody body) { - var data = await _service.QueryList(body, status); - return data; + return await _service.QueryList(body, status); + } + + #endregion + + #region 查询明细数据 + /// + /// 查询明细数据 + /// + /// status + [HttpPost, Route("QueryDefault/{id}")] + public async Task> QueryDefault(long id) + { + return await _service.QueryDefault(id); } #endregion diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index 260a8045..d7d2e2e8 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -6334,6 +6334,16 @@ + + + 修改信息 黄一名 于 2024-05-10 15:02 最后修改 + + + + + 创建信息 黄一名 于 2024-05-10 14:57 创建 + + 修改信息 黄一名 于 2024-05-10 15:02 最后修改 diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index c0eb4206..3b640028 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -598,6 +598,7 @@ 条件 + 试卷配置(Controller) diff --git a/Tiobon.Core.IServices/Ghre/IGhre_ExamServices.cs b/Tiobon.Core.IServices/Ghre/IGhre_ExamServices.cs index 5f5f43df..e74a294f 100644 --- a/Tiobon.Core.IServices/Ghre/IGhre_ExamServices.cs +++ b/Tiobon.Core.IServices/Ghre/IGhre_ExamServices.cs @@ -12,5 +12,7 @@ namespace Tiobon.Core.IServices { Task GetModuleInfo(ModuleParam param); Task> QueryList(QueryBody body, string status); + + Task> QueryDefault(long Id); } } \ No newline at end of file diff --git a/Tiobon.Core.Model/ViewModels/Extend/DefaultGhre_ExamInput.cs b/Tiobon.Core.Model/ViewModels/Extend/DefaultGhre_ExamInput.cs new file mode 100644 index 00000000..6aa24e73 --- /dev/null +++ b/Tiobon.Core.Model/ViewModels/Extend/DefaultGhre_ExamInput.cs @@ -0,0 +1,54 @@ +using Tiobon.Core.Model.Models; + +namespace Tiobon.Core.Model; + +public class DefaultGhre_ExamInput +{ + public List baseColumns { get; set; } = new List(); + public List staffTableColumns { get; set; } = new List(); + public DefaultGhre_ExamPageData pageData { get; set; } = new DefaultGhre_ExamPageData(); + + /// + /// 修改信息 黄一名 于 2024-05-10 15:02 最后修改 + /// + public string UpdateDataInfo { get; set; } + + /// + /// 创建信息 黄一名 于 2024-05-10 14:57 创建 + /// + public string CreateDataInfo { get; set; } +} +public class DefaultGhre_ExamColumn +{ + 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; + public string @fixed { get; set; } + public string align { get; set; } + + +} + +public class DefaultGhre_ExamPageData : Ghre_ExamBase +{ + public List staffTableData { get; set; } = new List(); +} +public class StaffTableData +{ + public int StaffID { get; set; } + public string StaffNo { get; set; } + public string StaffName { get; set; } + public string DeptName { get; set; } + public string TitleName { get; set; } + public string InDate { get; set; } + public string Mail { get; set; } + public string DataSource { get; set; } +} \ No newline at end of file diff --git a/Tiobon.Core.Model/ViewModels/Extend/DefaultGhre_ExamPaperInput.cs b/Tiobon.Core.Model/ViewModels/Extend/DefaultGhre_ExamPaperInput.cs index d091de02..2f38540f 100644 --- a/Tiobon.Core.Model/ViewModels/Extend/DefaultGhre_ExamPaperInput.cs +++ b/Tiobon.Core.Model/ViewModels/Extend/DefaultGhre_ExamPaperInput.cs @@ -1,5 +1,4 @@ -using System.Net.NetworkInformation; -using Tiobon.Core.Model.Models; +using Tiobon.Core.Model.Models; namespace Tiobon.Core.Model; diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs index 15448719..8741f126 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs @@ -9,7 +9,6 @@ using Tiobon.Core.Model; using Tiobon.Core.Common; using AgileObjects.AgileMapper; using Newtonsoft.Json; -using System.Text.RegularExpressions; using Newtonsoft.Json.Linq; using SqlSugar; @@ -269,4 +268,183 @@ public class Ghre_ExamServices : BaseServices(filter.pageNum, totalCount, filter.pageSize, list); } + + public async Task> QueryDefault(long Id) + { + var input = new DefaultGhre_ExamInput(); + + #region baseColumns + var baseColumns = new List + { + new DefaultGhre_ExamColumn() + { + label = "关联课程", + field = "LinkType", + elementType = "RadioBox", + required = true, + multipleSelect = false, + editable = false, + }, + new DefaultGhre_ExamColumn() + { + label = "课程名称", + field = "CourseId", + elementType = "ApiSelect", + required = true, + multipleSelect = false, + editable = true, + }, + new DefaultGhre_ExamColumn() + { + label = "选择试卷", + field = "ExamPaperId", + elementType = "ApiSelect", + required = true, + multipleSelect = false, + editable = true, + }, + new DefaultGhre_ExamColumn() + { + label = "考试编号", + field = "ExamNo", + elementType = "Input", + required =false , + multipleSelect = false, + editable = false + }, + new DefaultGhre_ExamColumn() + { + label = "考试名称", + field = "ExamName", + elementType = "Input", + required = true, + multipleSelect = false, + editable = true, + }, + new DefaultGhre_ExamColumn() + { + label = "考试日期", + field = "DateType", + elementType = "RadioBox", + required = true, + multipleSelect = false, + editable = true, + }, + new DefaultGhre_ExamColumn() + { + label = "考试区间", + field = "ExamDate", + elementType = "GRangePicker", + required = true, + multipleSelect = false, + editable = true, + }, + new DefaultGhre_ExamColumn() + { + label = "学完多久", + field = "AfterHowLong", + elementType = "RadioBox", + required = false, + multipleSelect = false, + editable = true, + }, + new DefaultGhre_ExamColumn() + { + label = "考试形式", + field = "ExamMode", + elementType = "RadioBox", + required = false, + multipleSelect = false, + editable = true, + }, + new DefaultGhre_ExamColumn() + { + label = "线下考试地点", + field = "ExamPlace", + elementType = "Input", + required = true, + multipleSelect = false, + editable = true, + }, + new DefaultGhre_ExamColumn() + { + label = "关联开班", + field = "IsLinkOpenClass", + elementType = "RadioBox", + required = true, + multipleSelect = false, + editable = true + }, + new DefaultGhre_ExamColumn() + { + label = "考试说明", + field = "RemarkSz", + elementType = "InputTextArea", + required = true, + multipleSelect = false, + editable = true + } + }; + #endregion + + #region staffTableColumns + + var staffTableColumns = new List + { + new DefaultGhre_ExamColumn() + { + label = "工号", + field = "StaffNo", + align = "center", + }, + new DefaultGhre_ExamColumn() + { + label = "姓名", + field = "StaffName", + align = "center", + }, new DefaultGhre_ExamColumn() + { + label = "部门", + field = "DeptName", + align = "center", + }, new DefaultGhre_ExamColumn() + { + label = "岗位", + field = "TitleName", + align = "center", + }, new DefaultGhre_ExamColumn() + { + label = "入职日期", + field = "InDate", + align = "center", + }, new DefaultGhre_ExamColumn() + { + label = "邮箱", + field = "Mail", + align = "center", + width=200 + }, new DefaultGhre_ExamColumn() + { + label = "数据来源", + field = "DataSource", + align = "center", + width=200 + } + }; + #endregion + + + #region pageData + if (Id != 0) + { + var exam = await base.QueryById(Id); + input.pageData = Mapper.Map(exam).ToANew(); + } + #endregion + + input.baseColumns = baseColumns; + input.staffTableColumns = staffTableColumns; + return ServiceResult.OprateSuccess("查询成功!", input); + } + } \ No newline at end of file diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 260a8045..d7d2e2e8 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -6334,6 +6334,16 @@ + + + 修改信息 黄一名 于 2024-05-10 15:02 最后修改 + + + + + 创建信息 黄一名 于 2024-05-10 14:57 创建 + + 修改信息 黄一名 于 2024-05-10 15:02 最后修改 diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index c0eb4206..3b640028 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -598,6 +598,7 @@ 条件 + 试卷配置(Controller)