diff --git a/Lib/Tiobon.Core.Base.dll b/Lib/Tiobon.Core.Base.dll index 93646b97..f6cbd118 100644 Binary files a/Lib/Tiobon.Core.Base.dll and b/Lib/Tiobon.Core.Base.dll differ diff --git a/Lib/Tiobon.Core.Model.Entity.dll b/Lib/Tiobon.Core.Model.Entity.dll new file mode 100644 index 00000000..b907818c Binary files /dev/null and b/Lib/Tiobon.Core.Model.Entity.dll differ diff --git a/Lib/Tiobon.Core.Model.Entity.xml b/Lib/Tiobon.Core.Model.Entity.xml new file mode 100644 index 00000000..e4db7ae3 --- /dev/null +++ b/Lib/Tiobon.Core.Model.Entity.xml @@ -0,0 +1,137 @@ + + + + Tiobon.Core.Model.Entity + + + + + 服务层响应实体(泛型) + + + + + 状态码 + + + + + 操作是否成功 + + + + + 返回信息 + + + + + 开发者信息 + + + + + 返回数据集合 + + + + + 返回成功 + + 消息 + + + + + 返回成功 + + 消息 + 数据 + + + + + 返回失败 + + 消息 + + + + + 返回失败 + + 消息 + 数据 + + + + + 返回消息 + + 失败/成功 + 消息 + 数据 + + + + + 服务层响应实体 + + + + + 状态码 + + + + + 操作是否成功 + + + + + 返回信息 + + + + + 返回数据集合 + + + + + 操作成功 + + + + + + + 操作失败 + + + + + + + + 返回数据 + + + + + 服务层分页响应实体(泛型) + + + + + 操作是否成功 + + + + + 返回信息 + + + + diff --git a/Tiobon.CodeGenerator/Program.cs b/Tiobon.CodeGenerator/Program.cs index 094ffc0b..8e883f8b 100644 --- a/Tiobon.CodeGenerator/Program.cs +++ b/Tiobon.CodeGenerator/Program.cs @@ -6,6 +6,7 @@ using Tiobon.Core.Common.DB.Dapper.Extensions; using Tiobon.Core.Common.Seed; using Tiobon.Core.Extensions; using Tiobon.Core.Model; +using Tiobon.Core.Model.Entity; namespace JianLian.HDIS.CodeGenerator; class Program diff --git a/Tiobon.CodeGenerator/Tiobon.CodeGenerator.csproj b/Tiobon.CodeGenerator/Tiobon.CodeGenerator.csproj index 918d1713..e9cea70f 100644 --- a/Tiobon.CodeGenerator/Tiobon.CodeGenerator.csproj +++ b/Tiobon.CodeGenerator/Tiobon.CodeGenerator.csproj @@ -37,4 +37,10 @@ + + + ..\Lib\Tiobon.Core.Model.Entity.dll + + + diff --git a/Tiobon.Core.Api/Controllers/Ghre/Ghre_PlanController.cs b/Tiobon.Core.Api/Controllers/Ghre/Ghre_PlanController.cs index ebae157e..3b58544e 100644 --- a/Tiobon.Core.Api/Controllers/Ghre/Ghre_PlanController.cs +++ b/Tiobon.Core.Api/Controllers/Ghre/Ghre_PlanController.cs @@ -59,6 +59,16 @@ public class Ghre_PlanController : BaseController> QueryUshioPlan([FromBody] QueryBody body) => await _service.QueryUshioPlan(body); #endregion + #region 牛尾报表导出 + /// + /// 根据条件查询数据 + /// + /// 条件 + /// + [HttpPost, Route("QueryUshioPlanReport/ExportExcel")] + public async Task> ExportUshioPlan([FromBody] QueryExport body) => await _service.ExportUshioPlan(body); + #endregion + #region 培训计划达成率——宝连通 /// /// 培训计划达成率——宝连通 diff --git a/Tiobon.Core.Api/GlobalUsings.cs b/Tiobon.Core.Api/GlobalUsings.cs index f937d75a..eeef7b05 100644 --- a/Tiobon.Core.Api/GlobalUsings.cs +++ b/Tiobon.Core.Api/GlobalUsings.cs @@ -17,3 +17,4 @@ global using Tiobon.Core.Repository.UnitOfWorks; global using Tiobon.Core.SwaggerHelper; global using static Tiobon.Core.Extensions.SwaggerSetup; global using Tiobon.Core.Base.Helper; +global using Tiobon.Core.Model.Entity; diff --git a/Tiobon.Core.Api/Tiobon.Core.Api.csproj b/Tiobon.Core.Api/Tiobon.Core.Api.csproj index d49888fc..b1ea7e61 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Api.csproj +++ b/Tiobon.Core.Api/Tiobon.Core.Api.csproj @@ -134,6 +134,9 @@ ..\Lib\Tiobon.Core.Base.dll + + ..\Lib\Tiobon.Core.Model.Entity.dll + diff --git a/Tiobon.Core.Common/Attribute/QueryFilter.cs b/Tiobon.Core.Common/Attribute/QueryFilter.cs index 87921aac..a756bf45 100644 --- a/Tiobon.Core.Common/Attribute/QueryFilter.cs +++ b/Tiobon.Core.Common/Attribute/QueryFilter.cs @@ -1,6 +1,6 @@ -using System.ComponentModel.DataAnnotations; -using Newtonsoft.Json.Linq; -using Tiobon.Core.Model; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using Tiobon.Core.Model.Entity; namespace Tiobon.Core.Common; diff --git a/Tiobon.Core.Common/HttpContextUser/AspNetUser.cs b/Tiobon.Core.Common/HttpContextUser/AspNetUser.cs index 395f1eb5..7926a806 100644 --- a/Tiobon.Core.Common/HttpContextUser/AspNetUser.cs +++ b/Tiobon.Core.Common/HttpContextUser/AspNetUser.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Logging; using System.IdentityModel.Tokens.Jwt; using System.Security.Claims; using Tiobon.Core.Common.Swagger; -using Tiobon.Core.Model; +using Tiobon.Core.Model.Entity; namespace Tiobon.Core.Common.HttpContextUser; diff --git a/Tiobon.Core.Common/HttpContextUser/IUser.cs b/Tiobon.Core.Common/HttpContextUser/IUser.cs index 600eaf26..76df174f 100644 --- a/Tiobon.Core.Common/HttpContextUser/IUser.cs +++ b/Tiobon.Core.Common/HttpContextUser/IUser.cs @@ -1,5 +1,5 @@ using System.Security.Claims; -using Tiobon.Core.Model; +using Tiobon.Core.Model.Entity; namespace Tiobon.Core.Common.HttpContextUser; diff --git a/Tiobon.Core.Common/Tiobon.Core.Common.csproj b/Tiobon.Core.Common/Tiobon.Core.Common.csproj index 0641eaf6..92e88d17 100644 --- a/Tiobon.Core.Common/Tiobon.Core.Common.csproj +++ b/Tiobon.Core.Common/Tiobon.Core.Common.csproj @@ -60,4 +60,10 @@ + + + ..\Lib\Tiobon.Core.Model.Entity.dll + + + diff --git a/Tiobon.Core.Extensions/Tiobon.Core.Extensions.csproj b/Tiobon.Core.Extensions/Tiobon.Core.Extensions.csproj index 30a4a57e..ef27bd6b 100644 --- a/Tiobon.Core.Extensions/Tiobon.Core.Extensions.csproj +++ b/Tiobon.Core.Extensions/Tiobon.Core.Extensions.csproj @@ -45,6 +45,9 @@ ..\Lib\Tiobon.Core.Base.dll + + ..\Lib\Tiobon.Core.Model.Entity.dll + diff --git a/Tiobon.Core.Gateway/Controllers/UserController.cs b/Tiobon.Core.Gateway/Controllers/UserController.cs index 5e2df322..0701ed86 100644 --- a/Tiobon.Core.Gateway/Controllers/UserController.cs +++ b/Tiobon.Core.Gateway/Controllers/UserController.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; using System.Linq; +using Tiobon.Core.Model.Entity; namespace Tiobon.Core.Gateway.Controllers { diff --git a/Tiobon.Core.Gateway/Tiobon.Core.Gateway.csproj b/Tiobon.Core.Gateway/Tiobon.Core.Gateway.csproj index 744a9acc..eba19348 100644 --- a/Tiobon.Core.Gateway/Tiobon.Core.Gateway.csproj +++ b/Tiobon.Core.Gateway/Tiobon.Core.Gateway.csproj @@ -35,4 +35,10 @@ + + + ..\Lib\Tiobon.Core.Model.Entity.dll + + + diff --git a/Tiobon.Core.IServices/Ghre/IGhre_PlanServices.cs b/Tiobon.Core.IServices/Ghre/IGhre_PlanServices.cs index 527da052..1320344e 100644 --- a/Tiobon.Core.IServices/Ghre/IGhre_PlanServices.cs +++ b/Tiobon.Core.IServices/Ghre/IGhre_PlanServices.cs @@ -1,6 +1,4 @@ using Tiobon.Core.Common; -using Tiobon.Core.Model; -using Tiobon.Core.Model.ViewModels.Extend; namespace Tiobon.Core.IServices; @@ -16,4 +14,6 @@ public interface IGhre_PlanServices : IBaseServices> QueryUshioPlan(QueryBody filter); Task> QueryCompletionRateBLT(QueryBody filter); + + Task> ExportUshioPlan(QueryExport body); } \ No newline at end of file diff --git a/Tiobon.Core.IServices/GlobalUsings.cs b/Tiobon.Core.IServices/GlobalUsings.cs index 43f84361..46738193 100644 --- a/Tiobon.Core.IServices/GlobalUsings.cs +++ b/Tiobon.Core.IServices/GlobalUsings.cs @@ -1,4 +1,7 @@ -global using Tiobon.Core.Base.IServices; +global using Newtonsoft.Json.Linq; +global using Tiobon.Core.Base.IServices; +global using Tiobon.Core.Model; +global using Tiobon.Core.Model.Entity; global using Tiobon.Core.Model.Models; -global using Newtonsoft.Json.Linq; -global using Tiobon.Core.Model; \ No newline at end of file +global using Tiobon.Core.Model.ViewModels.Extend; + diff --git a/Tiobon.Core.IServices/Tiobon.Core.IServices.csproj b/Tiobon.Core.IServices/Tiobon.Core.IServices.csproj index 5a479337..182efb52 100644 --- a/Tiobon.Core.IServices/Tiobon.Core.IServices.csproj +++ b/Tiobon.Core.IServices/Tiobon.Core.IServices.csproj @@ -21,6 +21,9 @@ ..\Lib\Tiobon.Core.Base.dll + + ..\Lib\Tiobon.Core.Model.Entity.dll + diff --git a/Tiobon.Core.Jobs/Tiobon.Core.Jobs.csproj b/Tiobon.Core.Jobs/Tiobon.Core.Jobs.csproj index 74b2f909..c27b0f44 100644 --- a/Tiobon.Core.Jobs/Tiobon.Core.Jobs.csproj +++ b/Tiobon.Core.Jobs/Tiobon.Core.Jobs.csproj @@ -26,4 +26,10 @@ + + + ..\Lib\Tiobon.Core.Model.Entity.dll + + + diff --git a/Tiobon.Core.Model/ApiResponse.cs b/Tiobon.Core.Model/ApiResponse.cs index 6052c205..7fa42666 100644 --- a/Tiobon.Core.Model/ApiResponse.cs +++ b/Tiobon.Core.Model/ApiResponse.cs @@ -1,4 +1,5 @@ -namespace Tiobon.Core.Model; + +namespace Tiobon.Core.Model; public class ApiResponse { diff --git a/Tiobon.Core.Model/GlobalUsings.cs b/Tiobon.Core.Model/GlobalUsings.cs index 247ac136..bb2751d1 100644 --- a/Tiobon.Core.Model/GlobalUsings.cs +++ b/Tiobon.Core.Model/GlobalUsings.cs @@ -2,4 +2,5 @@ global using System.ComponentModel; global using System.ComponentModel.DataAnnotations; global using System.ComponentModel.DataAnnotations.Schema; -global using Tiobon.Core.Model.Base; \ No newline at end of file +global using Tiobon.Core.Model.Base; +global using Tiobon.Core.Model.Entity; diff --git a/Tiobon.Core.Model/ServiceResult.cs b/Tiobon.Core.Model/ServiceResult.cs deleted file mode 100644 index 16a89dbb..00000000 --- a/Tiobon.Core.Model/ServiceResult.cs +++ /dev/null @@ -1,263 +0,0 @@ -namespace Tiobon.Core.Model; - -/// -/// 服务层响应实体(泛型) -/// -public class ServiceResult -{ - /// - /// 状态码 - /// - public int Status { get; set; } = 200; - /// - /// 操作是否成功 - /// - public bool Success { get; set; } = false; - /// - /// 返回信息 - /// - public string Message { get; set; } = ""; - /// - /// 开发者信息 - /// - public string MessageDev { get; set; } - /// - /// 返回数据集合 - /// - public T Data { get; set; } - public T result { get; set; } - - /// - /// 返回成功 - /// - /// 消息 - /// - public static ServiceResult OprateSuccess(string message) - { - return OprateSuccess(true, message, default); - } - - /// - /// 返回成功 - /// - /// 消息 - /// 数据 - /// - public static ServiceResult OprateSuccess(string message, T data) - { - return OprateSuccess(true, message, data); - } - /// - /// 返回失败 - /// - /// 消息 - /// - public static ServiceResult OprateFailed(string message) - { - return OprateSuccess(false, message, default); - } - /// - /// 返回失败 - /// - /// 消息 - /// 数据 - /// - public static ServiceResult OprateFailed(string message, T data) - { - return OprateSuccess(false, message, data); - } - /// - /// 返回消息 - /// - /// 失败/成功 - /// 消息 - /// 数据 - /// - public static ServiceResult OprateSuccess(bool success, string message, T data) - { - return new ServiceResult() { Message = message, Data = data, Success = success }; - } -} - -/// -/// 服务层响应实体 -/// -public class ServiceResult -{ - /// - /// 状态码 - /// - public int Status { get; set; } = 200; - /// - /// 操作是否成功 - /// - public bool Success { get; set; } = false; - /// - /// 返回信息 - /// - public string Message { get; set; } = ""; - /// - /// 返回数据集合 - /// - public object Data { get; set; } - - /// - /// 操作成功 - /// - /// - /// - public static ServiceResult OprateSuccess(string msg = "操作成功") - { - return new ServiceResult - { - Message = msg, - Success = true, - Data = null - }; - } - - /// - /// 操作失败 - /// - /// - /// - /// - public static ServiceResult OprateFailed(string msg = "操作失败", int status = 500) - { - return new ServiceResult - { - Message = msg, - Status = status, - Data = null, - }; - } -} - -//public class ServicePageResult -//{ -// /// -// /// 状态码 -// /// -// public int Status { get; set; } = 200; -// /// -// /// 操作是否成功 -// /// -// public bool Success { get; set; } = true; -// /// -// /// 返回信息 -// /// -// public string Message { get; set; } = null; -// /// -// /// 当前页标 -// /// -// public int Page { get; set; } = 1; -// /// -// /// 总页数 -// /// -// public int PageCount => (int)Math.Ceiling((decimal)TotalCount / PageSize); -// /// -// /// 数据总数 -// /// -// public int TotalCount { get; set; } = 0; -// /// -// /// 每页大小 -// /// -// public int PageSize { set; get; } = 20; -// /// -// /// 返回数据 -// /// -// public List Data { get; set; } - -// public ServicePageResult() { } - -// public ServicePageResult(int page, int totalCount, int pageSize, List data) -// { -// this.Page = page; -// this.TotalCount = totalCount; -// PageSize = pageSize; -// this.Data = data; -// } - -// public PageModel ConvertTo() -// { -// return new PageModel(Page, TotalCount, PageSize, default); -// } - - -// public PageModel ConvertTo(IMapper mapper) -// { -// var model = ConvertTo(); - -// if (Data != null) -// { -// model.data = mapper.Map>(Data); -// } - -// return model; -// } - - -// public PageModel ConvertTo(IMapper mapper, Action options) -// { -// var model = ConvertTo(); -// if (Data != null) -// { -// model.data = mapper.Map>(Data, options); -// } - -// return model; - -// } - -//} - - -public class DT_TableDataT -{ - /// - /// 返回数据 - /// - public List DT_TableDataT1 { get; set; } = new List(); - - public DT_TablePageInfoT DT_TablePageInfoT1 { get; set; } = new DT_TablePageInfoT(); - - public JM_TableColumnT1 JM_TableColumnT1 { get; set; } = new JM_TableColumnT1(); - -} -public class DT_TablePageInfoT -{ - public int PageNum { get; set; } - public int PageSize { get; set; } - public int TotalCount { get; set; } - -} - -/// -/// 服务层分页响应实体(泛型) -/// -public class ServicePageResult -{ - public int code { get; set; } = 0; - public string type { get; set; } = "success"; - /// - /// 操作是否成功 - /// - public bool Success { get; set; } = true; - /// - /// 返回信息 - /// - public string message { get; set; } = null; - - public DT_TableDataT result { get; set; } - - public ServicePageResult(int page, int totalCount, int pageSize, List data, string message = "查询成功!") - { - var result = new DT_TableDataT(); - result.DT_TableDataT1 = data; - result.DT_TablePageInfoT1.PageNum = page; - result.DT_TablePageInfoT1.PageSize = pageSize; - result.DT_TablePageInfoT1.TotalCount = totalCount; - this.message = message; - this.result = result; - } -} \ No newline at end of file diff --git a/Tiobon.Core.Model/Tiobon.Core.Model.csproj b/Tiobon.Core.Model/Tiobon.Core.Model.csproj index 02ebdf03..fcc4f42d 100644 --- a/Tiobon.Core.Model/Tiobon.Core.Model.csproj +++ b/Tiobon.Core.Model/Tiobon.Core.Model.csproj @@ -63,4 +63,10 @@ + + + ..\Lib\Tiobon.Core.Model.Entity.dll + + + diff --git a/Tiobon.Core.Model/ViewModels/Menu.cs b/Tiobon.Core.Model/ViewModels/Menu.cs deleted file mode 100644 index 138214a4..00000000 --- a/Tiobon.Core.Model/ViewModels/Menu.cs +++ /dev/null @@ -1,285 +0,0 @@ -using Newtonsoft.Json.Linq; - -namespace Tiobon.Core.Model; - -public class MenuParam -{ - public int langId { get; set; } - public string menuName { get; set; } - public string timestamp { get; set; } - public string token { get; set; } - public dynamic jsonParam { get; set; } -} -public class MenuReturn -{ - public List DT_SubMenu { get; set; } - public List DT_MenuColType { get; set; } - -} -public class DT_SubMenu -{ - public string IconType { get; set; } - public string MenuGroupTitle { get; set; } - public string MenuName { get; set; } - public string MenuNo { get; set; } - public string MenuUrl { get; set; } - -} - -public class DT_MenuColType -{ - public string MenuColType { get; set; } -} - -public class ModuleParam -{ - public int langId { get; set; } - public string menuName { get; set; } - public string timestamp { get; set; } - public string token { get; set; } - public ModulejsonParam jsonParam { get; set; } - - private JObject _jsonParam; - public JObject jsonParam1 - { - get { return _jsonParam; } - set - { - _jsonParam = value; - } - } -} -public class ModulejsonParam -{ - public long? MasterId { get; set; } -} - -public class ModuleReturn -{ - public JM_PageControlT1 JM_PageControlT1 { get; set; } = new JM_PageControlT1(); - public JM_TableColumnT1 JM_TableColumnT1 { get; set; } = new JM_TableColumnT1(); - public List DT_PageMutiMsg { get; set; } - - public DT_Procedure DT_Procedure { get; set; } = new DT_Procedure(); -} - -public class ModuleESSReturn -{ - public JM_PageControlT1 JM_PageControlT1 { get; set; } = new JM_PageControlT1(); - public List DT_TableColumnT1 { get; set; } = new List(); - public List DT_TableDataSearchT1 { get; set; } = new List(); - public List DT_PageMutiMsg { get; set; } - - public DT_Procedure DT_Procedure { get; set; } = new DT_Procedure(); -} - -public class JM_PageControlT1 -{ - public List Toolbar { get; set; } -} -public class Toolbar -{ - public string fnKey { get; set; } - public string fnKeyValue { get; set; } - public string fnTitle { get; set; } - public string fnType { get; set; } - public string position { get; set; } - public string icon { get; set; } - public bool display { get; set; } = true; -} -public class JM_TableColumnT1 -{ - public List TableColumn { get; set; } -} -public class TableColumn -{ - public string PageSettingQueryId { get; set; } - public string elementType { get; set; } - public string field { get; set; } - public string label { get; set; } - public string Meky { get; set; } - public string multipleSelect { get; set; } - public string dataType { get; set; } - public bool? required { get; set; } - public string palceholder { get; set; } - public string dataSourceType { get; set; } - public string dataSource { get; set; } - public bool? sortable { get; set; } - public string sortOrder { get; set; } - public bool? defaultHidden { get; set; } - public bool? ConfigIsShow { get; set; } - public string filterable { get; set; } - public int width { get; set; } - public string align { get; set; } - public string fixed1 { get; set; } - public bool? @fixed { get; set; } - public bool? editable { get; set; } - public bool? searchable { get; set; } - public bool? searchRequired { get; set; } - public int? searchColumnSeq { get; set; } - public string multipleSearchValue { get; set; } - public string maxTagCount { get; set; } - public string selfDefine { get; set; } - public string selectUI { get; set; } - public string isPrimaryKey { get; set; } - public bool? isSorted { get; set; } - public bool? isHidden { get; set; } - public bool? isSearched { get; set; } - public int SortNo { get; set; } - public string searchOperator1 { get; set; } - public List searchOperator { get; set; } - public object searchColumnDefaultValue { get; set; } = ""; - public string AppColumnType { get; set; } - public int pageColumnID { get; set; } - public int IsRange { get; set; } = 0; - public string GroupName { get; set; } -} -public class searchOperator -{ - public string @operator { get; set; } - public string operatorDesc { get; set; } - public string operatorIcon { get; set; } -} -public class TableColumn1 -{ - public string PageSettingQueryId { get; set; } - public string elementType { get; set; } - public string field { get; set; } - public string label { get; set; } - public string Meky { get; set; } - public string multipleSelect { get; set; } - public string dataType { get; set; } - public string required { get; set; } - public string palceholder { get; set; } - public string dataSourceType { get; set; } - public string dataSource { get; set; } - public string sortable { get; set; } - public string sortOrder { get; set; } - public string defaultHidden { get; set; } - public string ConfigIsShow { get; set; } - public string filterable { get; set; } - public int width { get; set; } - public string align { get; set; } - public bool? @fixed { get; set; } - public string fixed1 { get; set; } - public string editable { get; set; } - public string searchable { get; set; } - public string searchRequired { get; set; } - public int? searchColumnSeq { get; set; } - public string searchColumnSeq1 { get; set; } - public string multipleSearchValue { get; set; } - public string maxTagCount { get; set; } - public string selfDefine { get; set; } - public string selectUI { get; set; } - public string isPrimaryKey { get; set; } - public string isSorted { get; set; } - public string isHidden { get; set; } - public string isSearched { get; set; } - public int SortNo { get; set; } - public string searchOperator1 { get; set; } - public string searchColumnDefaultValue { get; set; } - public string AppColumnType { get; set; } - public int pageColumnID { get; set; } -} - -public class DT_PageMutiMsg -{ - public string field { get; set; } - public string label { get; set; } -} - - -public class DT_Procedure -{ - public string EditProcedure { get; set; } - public string IUDProcedure { get; set; } - public string QueryProcedure { get; set; } - public string ImportExcel { get; set; } - - public string DownExcelTemplate { get; set; } - public string ExportExcel { get; set; } -} -public class FlowParam -{ - public string doType { get; set; } - public int? id { get; set; } - public FlowJsonParam jsonParam { get; set; } - public int langId { get; set; } - public string menuName { get; set; } - public string timestamp { get; set; } - public string token { get; set; } - public int? userId { get; set; } -} -public class FlowJsonParam -{ - public int? FlowID { get; set; } -} -public class FlowReturn -{ - public JM_PageFormT1 JM_PageFormT1 { get; set; } = new JM_PageFormT1(); - public List DT_PageMutiMsg { get; set; } = new List(); - public JM_PageFormActionsT1 JM_PageFormActionsT1 { get; set; } = new JM_PageFormActionsT1(); - public FlowJM_TableColumnT1 JM_TableColumnT1 { get; set; } = new FlowJM_TableColumnT1(); - public object DT_TableDataT1 { get; set; } - -} - -public class JM_PageFormActionsT1 -{ - public List Toolbar { get; set; } -} -public class JM_PageFormT1 -{ - public List PageForm { get; set; } = new List(); -} -public class PageForm -{ - public string FlowPageStyle { get; set; } - public string RowDisplayType { get; set; } - public string apiName { get; set; } - public string disabled { get; set; } - public string labelAlign { get; set; } - public string labelCol { get; set; } - public int labelWidth { get; set; } - public string layout { get; set; } - public string pageTitle { get; set; } -} -public class FlowJM_TableColumnT1 -{ - public List TableColumn { get; set; } -} - -public class FlowTableColumn -{ - public bool canBatchPageDisplay { get; set; } - public int colNum { get; set; } - public int columnWidth { get; set; } - public string dataSource { get; set; } - public string dataType { get; set; } - public bool defaultHidden { get; set; } - public int dynamicShow { get; set; } - public bool editable { get; set; } - public string elementType { get; set; } - public string field { get; set; } - public bool isPrimaryKey { get; set; } - public int isSingleColumn { get; set; } - public string label { get; set; } - public bool @required { get; set; } - public bool multipleSelect { get; set; } - public int rowNum { get; set; } - public int? isFullWidth { get; set; } - public int? hasMarginLeft { get; set; } - - public string GroupName { get; set; } -} -public class FlowCommitParam -{ - public string doType { get; set; } - public int? id { get; set; } - public object jsonParam { get; set; } - public int langId { get; set; } - public string menuName { get; set; } - public string timestamp { get; set; } - public string token { get; set; } - public int? userId { get; set; } -} \ No newline at end of file diff --git a/Tiobon.Core.Repository/BASE/BaseRepository.cs b/Tiobon.Core.Repository/BASE/BaseRepository.cs index 1485be0c..251a3719 100644 --- a/Tiobon.Core.Repository/BASE/BaseRepository.cs +++ b/Tiobon.Core.Repository/BASE/BaseRepository.cs @@ -8,6 +8,7 @@ using Tiobon.Core.Common; using Tiobon.Core.Common.DB; using Tiobon.Core.IRepository.Base; using Tiobon.Core.Model; +using Tiobon.Core.Model.Entity; using Tiobon.Core.Model.Models; using Tiobon.Core.Model.Tenants; using Tiobon.Core.Repository.UnitOfWorks; diff --git a/Tiobon.Core.Repository/BASE/IBaseRepository.cs b/Tiobon.Core.Repository/BASE/IBaseRepository.cs index bf459f1e..cb1fd2e7 100644 --- a/Tiobon.Core.Repository/BASE/IBaseRepository.cs +++ b/Tiobon.Core.Repository/BASE/IBaseRepository.cs @@ -3,6 +3,7 @@ using SqlSugar; using System.Data; using System.Linq.Expressions; using Tiobon.Core.Common; +using Tiobon.Core.Model.Entity; namespace Tiobon.Core.IRepository.Base; diff --git a/Tiobon.Core.Repository/Tiobon.Core.Repository.csproj b/Tiobon.Core.Repository/Tiobon.Core.Repository.csproj index f838f7cb..dd85cc7f 100644 --- a/Tiobon.Core.Repository/Tiobon.Core.Repository.csproj +++ b/Tiobon.Core.Repository/Tiobon.Core.Repository.csproj @@ -27,4 +27,10 @@ + + + ..\Lib\Tiobon.Core.Model.Entity.dll + + + diff --git a/Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs b/Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs index f76ad99e..7c950b53 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs @@ -270,7 +270,7 @@ public class Ghre_PlanServices : BaseServices> ExportUshioPlan(QueryExport body) + { + QueryBody filter = new QueryBody(); + filter.pageNum = 1; + filter.pageSize = 1000000; + filter.jsonParam = body.jsonParam; + filter.langId = body.langId; + filter.menuName = body.menuName; + + var condition = "1=1"; + if (body.exportSet.SelectRowKeys != null && body.exportSet.SelectRowKeys.Any()) + condition += $" AND Id IN({string.Join(",", body.exportSet.SelectRowKeys)})"; + + var data = await QueryFilterPage(filter, condition, true); + + var columns = data.result.JM_TableColumnT1.TableColumn; + + var fieldDescs = new Dictionary(); + if (body.exportSet.ExFields.Any()) + body.exportSet.ExFields.ForEach(x => + { + if (columns.Any(o => o.field == x)) + fieldDescs.Add(x, columns.FirstOrDefault(o => o.field == x)?.label); + }); + else + fieldDescs = columns.ToDictionary(item => item.field, item => item.label); + var dt = ToDataTable(data.result.DT_TableDataT1, fieldDescs, null); + // 获取所有列名 + var dtColumns = dt.Columns; + + var id = SnowFlakeSingle.instance.getID(); + var physicsPath = $"{Environment.CurrentDirectory}{Path.DirectorySeparatorChar}wwwroot"; + var path = $"{$"/files/export/{id}/"}"; + if (!Directory.Exists(physicsPath + path)) + Directory.CreateDirectory(physicsPath + path); + + path = path + body.exportSet.TitleName + ".xlsx"; + NPOIHelper.ExportExcel(dt, body.exportSet.TitleName, "年度人力配置", physicsPath + path); + + var result = new ExcelData(); + result.filePath = "/Advanced" + path; + result.fileName = body.exportSet.TitleName + ".xlsx"; + return ServiceResult.OprateSuccess("导出成功", result); + } + #endregion public override async Task> DownloadExcel(string menuName) { diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index d4741ef2..b869db8b 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -1,5 +1,4 @@ using Microsoft.Extensions.Logging; -using MongoDB.Driver.Linq; using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using NPOI.SS.Util; diff --git a/Tiobon.Core.Services/GlobalUsings.cs b/Tiobon.Core.Services/GlobalUsings.cs index 7ac1d3c7..e1f8af2b 100644 --- a/Tiobon.Core.Services/GlobalUsings.cs +++ b/Tiobon.Core.Services/GlobalUsings.cs @@ -25,3 +25,5 @@ global using Tiobon.Core.Model.ViewModels.Extend; global using Tiobon.Core.Services.BASE; global using Tiobon.Core.Model.ViewModels; global using Newtonsoft.Json; +global using Tiobon.Core.Model.Entity; + diff --git a/Tiobon.Core.Services/Tiobon.Core.Services.csproj b/Tiobon.Core.Services/Tiobon.Core.Services.csproj index 0472c1fe..0c00105d 100644 --- a/Tiobon.Core.Services/Tiobon.Core.Services.csproj +++ b/Tiobon.Core.Services/Tiobon.Core.Services.csproj @@ -37,6 +37,9 @@ ..\Lib\Tiobon.Core.Base.dll + + ..\Lib\Tiobon.Core.Model.Entity.dll + diff --git a/Tiobon.Core.Tasks/QuartzNet/ISchedulerCenter.cs b/Tiobon.Core.Tasks/QuartzNet/ISchedulerCenter.cs index 88915714..4fb8d046 100644 --- a/Tiobon.Core.Tasks/QuartzNet/ISchedulerCenter.cs +++ b/Tiobon.Core.Tasks/QuartzNet/ISchedulerCenter.cs @@ -1,4 +1,5 @@ using Tiobon.Core.Model; +using Tiobon.Core.Model.Entity; using Tiobon.Core.Model.Models; using Tiobon.Core.Model.ViewModels; diff --git a/Tiobon.Core.Tasks/QuartzNet/SchedulerCenterServer.cs b/Tiobon.Core.Tasks/QuartzNet/SchedulerCenterServer.cs index 6fcea1fd..08faf7b1 100644 --- a/Tiobon.Core.Tasks/QuartzNet/SchedulerCenterServer.cs +++ b/Tiobon.Core.Tasks/QuartzNet/SchedulerCenterServer.cs @@ -6,6 +6,7 @@ using System.Reflection; using Tiobon.Core.Common; using Tiobon.Core.Common.DB.Dapper; using Tiobon.Core.Model; +using Tiobon.Core.Model.Entity; using Tiobon.Core.Model.Models; using Tiobon.Core.Model.ViewModels; diff --git a/Tiobon.Core.Tasks/Tiobon.Core.Tasks.csproj b/Tiobon.Core.Tasks/Tiobon.Core.Tasks.csproj index 4fc308d4..e2a29ecd 100644 --- a/Tiobon.Core.Tasks/Tiobon.Core.Tasks.csproj +++ b/Tiobon.Core.Tasks/Tiobon.Core.Tasks.csproj @@ -19,6 +19,9 @@ ..\Lib\Tiobon.Core.Base.dll + + ..\Lib\Tiobon.Core.Model.Entity.dll + diff --git a/Tiobon.Core.Tests/Tiobon.Core.Tests.csproj b/Tiobon.Core.Tests/Tiobon.Core.Tests.csproj index d9ada485..a9595e17 100644 --- a/Tiobon.Core.Tests/Tiobon.Core.Tests.csproj +++ b/Tiobon.Core.Tests/Tiobon.Core.Tests.csproj @@ -54,6 +54,9 @@ ..\Lib\Tiobon.Core.Base.dll + + ..\Lib\Tiobon.Core.Model.Entity.dll + diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 21606e1c..df8aeb1b 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -42627,135 +42627,6 @@ 查询条件( 例如:id = 1 and name = 小明) - - - 服务层响应实体(泛型) - - - - - 状态码 - - - - - 操作是否成功 - - - - - 返回信息 - - - - - 开发者信息 - - - - - 返回数据集合 - - - - - 返回成功 - - 消息 - - - - - 返回成功 - - 消息 - 数据 - - - - - 返回失败 - - 消息 - - - - - 返回失败 - - 消息 - 数据 - - - - - 返回消息 - - 失败/成功 - 消息 - 数据 - - - - - 服务层响应实体 - - - - - 状态码 - - - - - 操作是否成功 - - - - - 返回信息 - - - - - 返回数据集合 - - - - - 操作成功 - - - - - - - 操作失败 - - - - - - - - 返回数据 - - - - - 服务层分页响应实体(泛型) - - - - - 操作是否成功 - - - - - 返回信息 - - 数据库读取类型 diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index 5ee6772c..96d5b023 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -176,21 +176,21 @@ - + 获取菜单 - + 获取模块信息接口 - + 获取模块信息接口 @@ -222,14 +222,14 @@ 多语 - + 获取流程信息 - + 流程提交处理 @@ -910,7 +910,7 @@ 考试(Controller) - + 查询初始化数据 @@ -1370,6 +1370,13 @@ 条件 + + + 根据条件查询数据 + + 条件 + + 培训计划达成率——宝连通