From 8b9efdf89e1305263dbc626af0592d34ef497118 Mon Sep 17 00:00:00 2001 From: dev02 Date: Wed, 24 May 2023 16:50:03 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E7=AB=AF]=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8C=AF=E5=87=BA=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/_historyData.html | 3 +-- FrontendWebApi/ApiControllers/HistoryController.cs | 5 +++-- FrontendWebApi/Models/HistoryClass.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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; }