diff --git a/Tiobon.Core.Common/Attribute/QueryFilter.cs b/Tiobon.Core.Common/Attribute/QueryFilter.cs
index 9e77159f..fbc4f9aa 100644
--- a/Tiobon.Core.Common/Attribute/QueryFilter.cs
+++ b/Tiobon.Core.Common/Attribute/QueryFilter.cs
@@ -208,6 +208,8 @@ public class QueryExportColumn
public string dataSourceType { get; set; }
public int? dataSourceId { get; set; }
+
+ public string Comment { get; set; }
}
public class QueryExportReturn
diff --git a/Tiobon.Core.DataAccess/ReportHelper.cs b/Tiobon.Core.DataAccess/ReportHelper.cs
index b1e0ed4d..92109734 100644
--- a/Tiobon.Core.DataAccess/ReportHelper.cs
+++ b/Tiobon.Core.DataAccess/ReportHelper.cs
@@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Http;
using NPOI.HSSF.UserModel;
using NPOI.OpenXmlFormats.Spreadsheet;
using NPOI.POIFS.NIO;
+using NPOI.SS.Formula.Functions;
using NPOI.SS.UserModel;
using NPOI.SS.Util;
using NPOI.XSSF.UserModel;
@@ -218,11 +219,16 @@ public static class ReportHelper
string dataSource = tableColumn[j].dataSource;
string field = tableColumn[j].field;
string label = tableColumn[j].label;
- headerRow.CreateCell(j).SetCellValue(label);
+ var cel2 = headerRow.CreateCell(j);
+ cel2.SetCellValue(label);
if (tableColumn[j].required == "true")
headerRow.GetCell(j).CellStyle = headRequiredStyle;
else
headerRow.GetCell(j).CellStyle = headStyle;
+
+ if (tableColumn[j].Comment.IsNotEmptyOrNull())
+ cel2.CellComment = GetComment(sheet, null, j, tableColumn[j].Comment);
+
//设置列宽
//sheet.SetColumnWidth(column.Ordinal, (arrColWidth[column.Ordinal] + 1) * 256);
if (arrColWidth[j] > 255)
@@ -234,6 +240,7 @@ public static class ReportHelper
sheet.SetColumnWidth(j, (arrColWidth[j] + 1) * 256);
}
+
//是否下拉
if (!string.IsNullOrEmpty(dataSource)
&& !dataSource.StartsWith("OrgTreeWith")
@@ -828,7 +835,6 @@ public static class ReportHelper
///
public static async Task<(List>, int)> ValidImportExcel(ISqlSugarClient Db, List columns, DataTable dt)
{
- bool result = false;
int ErrorCount = 0;
var dictList = new List>();
for (int i = 0; i < dt.Rows.Count; i++)
@@ -929,7 +935,6 @@ public static class ReportHelper
{
dt.Rows[i]["Comments"] = string.Join(";", comments.Select(a => a));
ErrorCount++;
- result = true;
continue;
}
else
diff --git a/Tiobon.Core.Services/BASE/BaseServices.cs b/Tiobon.Core.Services/BASE/BaseServices.cs
index 546f5d81..c31da284 100644
--- a/Tiobon.Core.Services/BASE/BaseServices.cs
+++ b/Tiobon.Core.Services/BASE/BaseServices.cs
@@ -999,7 +999,35 @@ public class BaseServices : IBaseServ
,
elementType
+ CASE WHEN multipleSelect = 'true' THEN '_multiple' ELSE '' END
- elementType, APIDataSourceID dataSourceId -- 增加多选判断
+ elementType,
+ APIDataSourceID
+ dataSourceId,
+ CASE
+ WHEN elementType = 'YearMonthPicker' AND required = 'true'
+ THEN
+ '必填;输入年月,如(2024-01),不是年月日'
+ WHEN elementType = 'YearMonthPicker'
+ THEN
+ '输入年月,如(2024-01),不是年月日'
+ WHEN required = 'true'
+ THEN
+ '必填'
+ WHEN required = 'true' AND dataType = 'int'
+ THEN
+ '必填且输入整数'
+ WHEN required = 'true' AND dataType = 'decimal'
+ THEN
+ '必填且输入整数'
+ WHEN required = 'false' AND dataType = 'int'
+ THEN
+ '输入整数'
+ WHEN elementType = 'GDatePicker'
+ THEN
+ '输入日期'
+ ELSE
+ NULL
+ END
+ Comment
FROM Ghrs_PageSettingEdit
WHERE IsEnable = 1
AND elementType NOT IN ('FnKey', 'PageGroup')