diff --git a/Frontend/_historyData.html b/Frontend/_historyData.html
index ac91126..8c23cb7 100644
--- a/Frontend/_historyData.html
+++ b/Frontend/_historyData.html
@@ -363,7 +363,7 @@
let start = new Date($('#his_startdate').val());
let end = new Date(new Date().setDate(new Date($('#his_enddate input').val()).getDate() + 1));
- if (pageAct.dateType == "day")
+ if (pageAct.dateType == "today")
end = new Date(new Date().setDate(start.getDate() + 1));
else if (pageAct.dateType == "month") {
start = new Date($('#getmonth').val());
@@ -445,7 +445,6 @@
v.endtime = $('#his_enddate input').val() === "" ? null : new Date($('#his_enddate input').val());
v.dateType = pageAct.dateType;
});
-
ytAjax = new YourTeam.Ajax(url, objSendData, function (rel) {
if (rel.code == "0000") {
location.href = baseApiUrl + "/api/df?path=" + rel.data.split('/')[0] + "&fileName=" + rel.data.split('/')[1] + "&token=" + cookies.get("JWT-Authorization");
diff --git a/FrontendWebApi/ApiControllers/HistoryController.cs b/FrontendWebApi/ApiControllers/HistoryController.cs
index 438eac7..ee0fd3c 100644
--- a/FrontendWebApi/ApiControllers/HistoryController.cs
+++ b/FrontendWebApi/ApiControllers/HistoryController.cs
@@ -46,7 +46,8 @@ namespace FrontendWebApi.ApiControllers
///
///
///
- public ActionResult> OpeExportExcel([FromBody] List lhe)
+ [HttpPost]
+ public async Task>> OpeExportExcel([FromBody] List lhe)
{
ApiResult apiResult = new ApiResult();
@@ -172,7 +173,7 @@ namespace FrontendWebApi.ApiControllers
catch (Exception exception)
{
apiResult.Code = "9999";
- apiResult.Msg = "系統內部錯誤,請聯絡管理者。";
+ apiResult.Msg = "系統內部錯誤,請聯絡管理者。 Msg: " + exception.Message;
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
return Ok(apiResult);
}
diff --git a/FrontendWebApi/Models/HistoryClass.cs b/FrontendWebApi/Models/HistoryClass.cs
index 79bc3a1..ecb456a 100644
--- a/FrontendWebApi/Models/HistoryClass.cs
+++ b/FrontendWebApi/Models/HistoryClass.cs
@@ -289,7 +289,7 @@ namespace FrontendWebApi.Models
public class HistoryExport
{
public string deviceName { get; set; }
- public int value { get; set; }
+ public double value { get; set; }
public DateTime timestamp { get; set; }
public DateTime starttime { get; set; }
public DateTime? endtime { get; set; }