From 305280cf1cd00a3c1142efedd56c26976cb8623b Mon Sep 17 00:00:00 2001 From: dev02 Date: Mon, 29 Jan 2024 09:28:29 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E7=AB=AF]=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=96=B0=E9=9C=80=E6=B1=82=E6=9E=B6=E6=A7=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/HistoryController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FrontendWebApi/ApiControllers/HistoryController.cs b/FrontendWebApi/ApiControllers/HistoryController.cs index f61b19d..3f99f55 100644 --- a/FrontendWebApi/ApiControllers/HistoryController.cs +++ b/FrontendWebApi/ApiControllers/HistoryController.cs @@ -1230,7 +1230,8 @@ namespace FrontendWebApi.ApiControllers var abstime = obj["abstime"]["@val"].ToString(); historyRawData.Timestamp = Convert.ToDateTime(abstime).ToString("yyyy-MM-dd HH:mm:ss"); //取得資料 - historyRawData.Value = obj["real"]["@val"].ToString(); + string tag = device_item_info.Points.Equals("st") || device_item_info.Points.Equals("ST") ? "bool" : "real"; + historyRawData.Value = obj[tag]["@val"].ToString(); historyRawDatas.Add(historyRawData); }