diff --git a/CoreCms.Net.Services/Financial/CoreCmsReportsServices.cs b/CoreCms.Net.Services/Financial/CoreCmsReportsServices.cs
index 4c1ccb8..c661ff2 100644
--- a/CoreCms.Net.Services/Financial/CoreCmsReportsServices.cs
+++ b/CoreCms.Net.Services/Financial/CoreCmsReportsServices.cs
@@ -19,6 +19,7 @@ using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.ViewModels.Basics;
using CoreCms.Net.Model.ViewModels.Echarts;
using CoreCms.Net.Model.ViewModels.UI;
+using CoreCms.Net.Utility.Helper;
using SqlSugar;
@@ -83,7 +84,7 @@ namespace CoreCms.Net.Services
select * from CoreCmsOrder
where 1 = 1
" + where + @"
- ) o on tmp_x.x = ((cast(date(o." + joinVal + @") as signed) - " + sTime.ToString("yyyy-MM-dd") + @") div(" + section + @"))
+ ) o on tmp_x.x = ((unix_timestamp(o." + joinVal + @") - " + CommonHelper.ConvertDateTimeToInt(sTime) + @") div(" + section + @"))
group by tmp_x.x
";
}
@@ -141,7 +142,7 @@ namespace CoreCms.Net.Services
select * from CoreCmsBillPayments
where 1 = 1
" + where + @"
- ) o on tmp_x.x = ((cast(date(o." + joinVal + @") as signed) - " + sTime.ToString("yyyy-MM-dd") + @") div(" + section + @"))
+ ) o on tmp_x.x = ((unix_timestamp(o." + joinVal + @") - " + CommonHelper.ConvertDateTimeToInt(sTime) + @") div(" + section + @"))
group by tmp_x.x
";
}
@@ -201,7 +202,7 @@ namespace CoreCms.Net.Services
select* from CoreCmsBillRefund
where 1 = 1
" + where + @"
- ) o on tmp_x.x = ((cast(date(o." + joinVal + @") as signed) - " + sTime.ToString("yyyy-MM-dd") + @") div(" + section + @"))
+ ) o on tmp_x.x = ((unix_timestamp(o." + joinVal + @") - " + CommonHelper.ConvertDateTimeToInt(sTime) + @") div(" + section + @"))
group by tmp_x.x
";
}
@@ -258,7 +259,7 @@ namespace CoreCms.Net.Services
select * from CoreCmsUserTocash
where 1 = 1
" + where + @"
- ) o on tmp_x.x = ((cast(date(o." + joinVal + @") as signed) - " + sTime.ToString("yyyy-MM-dd") + @") div(" + section + @"))
+ ) o on tmp_x.x = ((unix_timestamp(o." + joinVal + @") - " + CommonHelper.ConvertDateTimeToInt(sTime) + @") div(" + section + @"))
group by tmp_x.x
";
}
diff --git a/CoreCms.Net.Utility/Helper/CommonHelper.cs b/CoreCms.Net.Utility/Helper/CommonHelper.cs
index 90bb641..3d16271 100644
--- a/CoreCms.Net.Utility/Helper/CommonHelper.cs
+++ b/CoreCms.Net.Utility/Helper/CommonHelper.cs
@@ -650,5 +650,19 @@ namespace CoreCms.Net.Utility.Helper
// 如果上传文件大于限定的容量
return !(fileSize > size);
}
+
+
+ ///
+ /// 10位时间戳 转化
+ ///
+ ///
+ ///
+ public static long ConvertDateTimeToInt(System.DateTime time)
+ {
+ System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0));
+ long t = (time.Ticks - startTime.Ticks) / 10000000; //除10000000调整为10位
+ return t;
+ }
+
}
}
diff --git a/CoreCms.Net.Utility/Helper/ReportsHelper.cs b/CoreCms.Net.Utility/Helper/ReportsHelper.cs
index c09338f..0c5b559 100644
--- a/CoreCms.Net.Utility/Helper/ReportsHelper.cs
+++ b/CoreCms.Net.Utility/Helper/ReportsHelper.cs
@@ -110,29 +110,29 @@ namespace CoreCms.Net.Utility.Helper
case 3600: //小时
if (dateArr.num <= 24)
{
- xType = "H时";
+ xType = "d日H时";
}
else if (dateArr.num <= 720)
{
- xType = "d日H时";
+ xType = "M月d日H时";
}
else
{
- xType = "m月d日H时";
+ xType = "M月d日H时";
}
break;
case 86400: //天
if (dateArr.num <= 31)
{
- xType = "d号";
+ xType = "M月d号";
}
else if (dateArr.num <= 365)
{
- xType = "m.d";
+ xType = "yyyy年M月dd日";
}
else
{
- xType = "Y.m.d";
+ xType = "yyyy年M月dd日";
}
break;
}
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/content/reports/order.html b/CoreCms.Net.Web.Admin/wwwroot/views/content/reports/order.html
index b74f4a8..34c824c 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/content/reports/order.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/content/reports/order.html
@@ -84,8 +84,8 @@
defaultToolbar: ['filter', 'print', 'exports'],
//height: 'full-127',
page: false,
- limit: 30,
- limits: [10, 15, 20, 25, 30, 50, 100, 200],
+ limit: 8760,
+ //limits: [10, 15, 20, 25, 30, 50, 100, 200],
text: { none: '暂无相关数据' },
totalRow: true,
cols: [
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/content/reports/payments.html b/CoreCms.Net.Web.Admin/wwwroot/views/content/reports/payments.html
index a5ce775..73b2375 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/content/reports/payments.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/content/reports/payments.html
@@ -85,8 +85,8 @@
//height: 'full-127',
page: false,
cellMinWidth: '80',
- limit: 30,
- limits: [10, 15, 20, 25, 30, 50, 100, 200],
+ limit: 8760,
+ //limits: [10, 15, 20, 25, 30, 50, 100, 200],
text: { none: '暂无相关数据' },
totalRow: true,
cols: [