diff --git a/Lib/Tiobon.Core.Base.dll b/Lib/Tiobon.Core.Base.dll
index 8d7b349c..128f0ddf 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
index 01594ff1..0652f75e 100644
Binary files a/Lib/Tiobon.Core.Model.Entity.dll 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
index 80c63e95..3b3bb690 100644
--- a/Lib/Tiobon.Core.Model.Entity.xml
+++ b/Lib/Tiobon.Core.Model.Entity.xml
@@ -4,6 +4,61 @@
Tiobon.Core.Model.Entity
+
+
+ 表主键
+
+
+
+
+ 1:有效,0:未生效
+
+
+
+
+ 创建人
+
+
+
+
+ 创建时间
+
+
+
+
+ 创建程序
+
+
+
+
+ 创建IP
+
+
+
+
+ 最后修改人
+
+
+
+
+ 最后修改时间
+
+
+
+
+ 最后修改程序
+
+
+
+
+ 最后修改IP
+
+
+
+
+ 软删除 过滤器
+
+
动态查询条件
diff --git a/Tiobon.Core.Api/wwwroot/MVP_Logo_Horizontal_Preferred_Cyan300_CMYK_72ppi.png b/Tiobon.Core.Api/wwwroot/MVP_Logo_Horizontal_Preferred_Cyan300_CMYK_72ppi.png
deleted file mode 100644
index 0315b2ef..00000000
Binary files a/Tiobon.Core.Api/wwwroot/MVP_Logo_Horizontal_Preferred_Cyan300_CMYK_72ppi.png and /dev/null differ
diff --git a/Tiobon.Core.Common/DB/Aop/SqlsugarAop.cs b/Tiobon.Core.Common/DB/Aop/SqlsugarAop.cs
index 194970ad..a561cad1 100644
--- a/Tiobon.Core.Common/DB/Aop/SqlsugarAop.cs
+++ b/Tiobon.Core.Common/DB/Aop/SqlsugarAop.cs
@@ -5,6 +5,7 @@ using StackExchange.Profiling;
using Tiobon.Core.Common.LogHelper;
using Tiobon.Core.Common.UserManager;
using Tiobon.Core.Model;
+using Tiobon.Core.Model.Entity;
using Tiobon.Core.Model.Models.RootTkey;
using Tiobon.Core.Model.Tenants;
diff --git a/Tiobon.Core.Common/DB/RepositorySetting.cs b/Tiobon.Core.Common/DB/RepositorySetting.cs
index 011e697c..5a583256 100644
--- a/Tiobon.Core.Common/DB/RepositorySetting.cs
+++ b/Tiobon.Core.Common/DB/RepositorySetting.cs
@@ -1,7 +1,7 @@
-using Tiobon.Core.Model.Models.RootTkey;
-using Tiobon.Core.Model.Models.RootTkey.Interface;
+using SqlSugar;
+using Tiobon.Core.Model.Entity;
+using Tiobon.Core.Model.Models.RootTkey;
using Tiobon.Core.Model.Tenants;
-using SqlSugar;
namespace Tiobon.Core.Common.DB;
diff --git a/Tiobon.Core.Common/Helper/NPOIHelper.cs b/Tiobon.Core.Common/Helper/NPOIHelper.cs
index f5c012d4..edd853ad 100644
--- a/Tiobon.Core.Common/Helper/NPOIHelper.cs
+++ b/Tiobon.Core.Common/Helper/NPOIHelper.cs
@@ -186,6 +186,80 @@ public class NPOIHelper
}
#endregion
+ #region 培训计划【牛尾】
+ if (sheetName == "培训计划【牛尾】")
+ {
+ HeightInPoints = 15;
+ #region 标题单元格样式
+
+ ICellStyle titleStyle = workbook.CreateCellStyle();
+ titleStyle.Alignment = HorizontalAlignment.Center; //居中
+ titleStyle.VerticalAlignment = VerticalAlignment.Center;//垂直居中
+ titleStyle.WrapText = true;//自动换行
+ // 边框
+ titleStyle.BorderBottom = BorderStyle.Thin;
+ titleStyle.BorderLeft = BorderStyle.Thin;
+ titleStyle.BorderRight = BorderStyle.Thin;
+ titleStyle.BorderTop = BorderStyle.Thin;
+
+ IFont font = workbook.CreateFont();
+ font.FontHeightInPoints = (short)10;
+ font.FontName = "宋体";
+ font.IsBold = true;
+ titleStyle.SetFont(font);
+ #endregion
+
+ IRow headerRow = sheet.CreateRow(intTop);
+ headerRow.HeightInPoints = HeightInPoints;
+
+ for (int i = 0; i < 13; i++)
+ {
+ headerRow.CreateCell(i).SetCellValue(dtSource.Columns[i].ColumnName);
+ headerRow.GetCell(i).CellStyle = titleStyle;
+ sheet.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0 + intTop, 1 + intTop, i, i));
+ }
+
+ for (int i = 13; i < 36; i = i + 2)
+ {
+ string month = dtSource.Columns[i].ColumnName.Replace("实际合计人天_M", "") + "月";
+ //month = month.Replace("进展率_M", "");
+ headerRow.CreateCell(i).SetCellValue(month);
+ headerRow.GetCell(i).CellStyle = titleStyle;
+ headerRow.CreateCell(i + 1).SetCellValue(month);
+ headerRow.GetCell(i + 1).CellStyle = titleStyle;
+ sheet.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(intTop, intTop, i, i + 1));
+
+ }
+
+ for (int i = 37; i < 42; i++)
+ {
+ headerRow.CreateCell(i).SetCellValue(dtSource.Columns[i].ColumnName);
+ headerRow.GetCell(i).CellStyle = titleStyle;
+ sheet.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0 + intTop, 1 + intTop, i, i));
+ }
+
+ //for (int i = 5; i < 17; i++)
+ //{
+ // headerRow.CreateCell(i).SetCellValue("预算编制数");
+ // headerRow.GetCell(i).CellStyle = titleStyle;
+
+ //}
+
+ ////headerRow.CreateCell(5).SetCellValue("预算编制数");
+ ////headerRow.GetCell(5).CellStyle = titleStyle;
+ //headerRow.CreateCell(17).SetCellValue("备注");
+ //headerRow.GetCell(17).CellStyle = titleStyle;
+
+
+ //for (int i = 36; i < 41; i++)
+ //sheet.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0 + intTop, 1 + intTop, 17, 17));
+ //sheet.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0 + intTop, 0 + intTop, 5, 16));
+
+ intTop += 1;
+
+ }
+ #endregion
+
#region 列头及样式
{
IRow headerRow = sheet.CreateRow(intTop);
@@ -218,7 +292,14 @@ public class NPOIHelper
//headStyle.SetFont(font);
foreach (DataColumn column in dtSource.Columns)
{
- headerRow.CreateCell(column.Ordinal).SetCellValue(column.ColumnName);
+ var name = column.ColumnName;
+
+ if (name.IndexOf("实际合计人天") > -1)
+ name = "实际合计人天";
+ if (name.IndexOf("进展率") > -1)
+ name = "进展率";
+
+ headerRow.CreateCell(column.Ordinal).SetCellValue(name);
headerRow.GetCell(column.Ordinal).CellStyle = headStyle;
//设置列宽
//sheet.SetColumnWidth(column.Ordinal, (arrColWidth[column.Ordinal] + 1) * 256);
diff --git a/Tiobon.Core.Model/Base/BasePoco.cs b/Tiobon.Core.Model/Base/BasePoco.cs
deleted file mode 100644
index 09a2f7a6..00000000
--- a/Tiobon.Core.Model/Base/BasePoco.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using Tiobon.Core.Model.Models.RootTkey.Interface;
-
-namespace Tiobon.Core.Model;
-
-public class BasePoco : BasePoco1
-{
-
- ///
- /// 表主键
- ///
- //public long Id { get; set; }
- [SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = false), Display(Name = "表主键")]
- public long Id { get; set; }
-}
-public class BasePoco1 : IBaseDeleteFilter
-{
-
- ///
- /// 1:有效,0:未生效
- ///
- [Display(Name = "1:有效,0:未生效")]
- public int IsEnable { get; set; } = 1;
-
- /////
- ///// 操作日志ID
- /////
- //[Display(Name = "操作日志ID")]
- //public long? OperateLogID { get; set; }
-
- ///
- /// 创建人
- ///
- [Display(Name = "创建人"), SugarColumn(IsOnlyIgnoreUpdate = true)]
- public int? CreateBy { get; set; }
-
- ///
- /// 创建时间
- ///
- [Display(Name = "创建时间"), SugarColumn(IsOnlyIgnoreUpdate = true)]
- public DateTime? CreateTime { get; set; }
-
- ///
- /// 创建程序
- ///
- [Display(Name = "创建程序"), SugarColumn(IsOnlyIgnoreUpdate = true)]
- public string CreateProg { get; set; }
-
- ///
- /// 创建IP
- ///
- [Display(Name = "创建IP"), SugarColumn(IsOnlyIgnoreUpdate = true)]
- public string CreateIP { get; set; }
-
- ///
- /// 最后修改人
- ///
- [Display(Name = "最后修改人")]
- public int? UpdateBy { get; set; }
-
- ///
- /// 最后修改时间
- ///
- [Display(Name = "最后修改时间")]
- public DateTime? UpdateTime { get; set; }
-
- ///
- /// 最后修改程序
- ///
- [Display(Name = "最后修改程序")]
- public string UpdateProg { get; set; }
-
- ///
- /// 最后修改IP
- ///
- [Display(Name = "最后修改IP")]
- public string UpdateIP { get; set; }
-
-}
diff --git a/Tiobon.Core.Model/Models/RootTkey/BaseEntity.cs b/Tiobon.Core.Model/Models/RootTkey/BaseEntity.cs
index cfbcad8b..8e2eea8b 100644
--- a/Tiobon.Core.Model/Models/RootTkey/BaseEntity.cs
+++ b/Tiobon.Core.Model/Models/RootTkey/BaseEntity.cs
@@ -1,6 +1,4 @@
-using Tiobon.Core.Model.Models.RootTkey.Interface;
-
-namespace Tiobon.Core.Model.Models.RootTkey;
+namespace Tiobon.Core.Model.Models.RootTkey;
[SugarIndex("index_{table}_Enabled", nameof(Enabled), OrderByType.Asc)]
[SugarIndex("index_{table}_IsDeleted", nameof(IsDeleted), OrderByType.Asc)]
diff --git a/Tiobon.Core.Model/Models/RootTkey/Interface/IDeleteFilter.cs b/Tiobon.Core.Model/Models/RootTkey/Interface/IDeleteFilter.cs
deleted file mode 100644
index afbbf682..00000000
--- a/Tiobon.Core.Model/Models/RootTkey/Interface/IDeleteFilter.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace Tiobon.Core.Model.Models.RootTkey.Interface;
-
-///
-/// 软删除 过滤器
-///
-public interface IDeleteFilter
-{
- public bool IsDeleted { get; set; }
-}
-public interface IBaseDeleteFilter
-{
- public int IsEnable { get; set; }
-}
\ No newline at end of file
diff --git a/Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs b/Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs
index 7c950b53..2fd01c5b 100644
--- a/Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs
+++ b/Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs
@@ -394,11 +394,11 @@ public class Ghre_PlanServices : BaseServices item.field, item => item.label);
- var dt = ToDataTable(data.result.DT_TableDataT1, fieldDescs, null);
+ var dt = ToUshioDataTable(data.result.DT_TableDataT1, fieldDescs, null);
// 获取所有列名
var dtColumns = dt.Columns;
@@ -422,13 +422,104 @@ public class Ghre_PlanServices : BaseServices.OprateSuccess("导出成功", result);
}
+
+ public static DataTable ToUshioDataTable(List list, Dictionary fieldDescs = null, params string[] propertyName)
+ {
+ var (fields, colunms) = Sort(fieldDescs, null);
+
+ List propertyNameList = new List();
+ if (propertyName != null)
+ {
+ propertyNameList.AddRange(propertyName);
+ }
+ DataTable result = new DataTable();
+ if (list.Count > 0)
+ {
+ PropertyInfo[] propertys = list[0].GetType().GetProperties();
+ for (int i = 0; i < fields.Count; i++)
+ {
+ foreach (PropertyInfo pi in propertys)
+ {
+ if (propertyNameList.Count == 0)
+ {
+ //if (DBNull.Value.Equals(pi.PropertyType))
+ //{
+ // // pi.PropertyType = DateTime;
+ //}
+ Type colType = pi.PropertyType;
+ if (colType.IsGenericType && colType.GetGenericTypeDefinition() == typeof(Nullable<>))
+ {
+ colType = colType.GetGenericArguments()[0];
+ }
+ if (fields[i] == pi.Name)
+ {
+ if (fields[i].IndexOf("_Count") > 0)
+ result.Columns.Add(colunms[i] + "_" + fields[i].Replace("_Count", ""), colType);
+ else if (fields[i].IndexOf("_CompletionRate") > 0)
+ result.Columns.Add(colunms[i] + "_" + fields[i].Replace("_CompletionRate", ""), colType);
+ else
+ result.Columns.Add(colunms[i], colType);
+ }
+ //result.Columns.Add(pi.Name, pi.PropertyType);
+ }
+ else
+ {
+ if (propertyNameList.Contains(pi.Name))
+ {
+ if (fields[i] == pi.Name)
+ result.Columns.Add(fields[i], pi.PropertyType);
+ }
+ }
+ }
+ }
+ for (int i = 0; i < list.Count; i++)
+ {
+ ArrayList tempList = new ArrayList();
+ for (int j = 0; j < fields.Count; j++)
+ {
+ foreach (PropertyInfo pi in propertys)
+ {
+ if (fields[j] == pi.Name)
+ {
+ if (propertyNameList.Count == 0)
+ {
+ object obj = pi.GetValue(list[i], null);
+ tempList.Add(obj);
+ }
+ else
+ {
+ if (propertyNameList.Contains(pi.Name))
+ {
+ object obj = pi.GetValue(list[i], null);
+ tempList.Add(obj);
+ }
+ }
+ }
+ }
+ }
+ object[] array = tempList.ToArray();
+
+ try
+ {
+ result.LoadDataRow(array, true);
+ }
+ catch (Exception E)
+ {
+
+ }
+
+ }
+ }
+ return result;
+ }
+
#endregion
public override async Task> DownloadExcel(string menuName)
diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs
index 232f9fbe..bcc47b68 100644
--- a/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs
+++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs
@@ -1,5 +1,4 @@
using MongoDB.Driver.Linq;
-using Tiobon.Core.Model.Models.RootTkey.Interface;
using static Tiobon.Core.Model.Consts;
namespace Tiobon.Core.Services;
diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml
index df8aeb1b..9be796f5 100644
--- a/Tiobon.Core/Tiobon.Core.Model.xml
+++ b/Tiobon.Core/Tiobon.Core.Model.xml
@@ -4,56 +4,6 @@
Tiobon.Core.Model
-
-
- 表主键
-
-
-
-
- 1:有效,0:未生效
-
-
-
-
- 创建人
-
-
-
-
- 创建时间
-
-
-
-
- 创建程序
-
-
-
-
- 创建IP
-
-
-
-
- 最后修改人
-
-
-
-
- 最后修改时间
-
-
-
-
- 最后修改程序
-
-
-
-
- 最后修改IP
-
-
年级 (Dto.Base)
@@ -38794,11 +38744,6 @@
数据版本
-
-
- 软删除 过滤器
-
-
系统租户表