From c78802b3870350bbc4b37379d13a770f368c8bfa Mon Sep 17 00:00:00 2001 From: "wanling040@gmail.com" Date: Fri, 22 Jul 2022 16:57:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=BB=E7=AB=99=E4=BA=A4=E5=8F=89=E5=88=86?= =?UTF-8?q?=E6=9E=90:=20=E6=9B=B2=E7=B7=9A=E5=9C=96=E8=A1=A8Y=E8=BB=B8?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E9=A2=A8=E9=80=9F=E7=9A=84=E6=AC=84=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SolarPower/Controllers/AnalysisStationInfoController.cs | 5 +++++ SolarPower/Repository/Implement/SensorDetailRepository.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/SolarPower/Controllers/AnalysisStationInfoController.cs b/SolarPower/Controllers/AnalysisStationInfoController.cs index 8e18bde..706616d 100644 --- a/SolarPower/Controllers/AnalysisStationInfoController.cs +++ b/SolarPower/Controllers/AnalysisStationInfoController.cs @@ -168,6 +168,7 @@ namespace SolarPower.Controllers { "EnvTemperature", "環境溫度計"}, { "Humidity", "濕度"}, { "Vane", "風速"}, + { "WingDirection", "風向"}, { "Dust", "落塵%"}, { "OUTPUT_KWH", "輸出發電量(kWh)"}, { "INPUT_KWH", "輸入發電量(kWh)"}, @@ -588,6 +589,10 @@ namespace SolarPower.Controllers suffix = analysisDevice.MultipleYaxes["Humidity"]; YaxesKey = "Humidity"; break; + case "WIN": //風向計 + suffix = analysisDevice.MultipleYaxes["WingDirection"]; + YaxesKey = "WingDirection"; + break; default: suffix = string.Empty; break; diff --git a/SolarPower/Repository/Implement/SensorDetailRepository.cs b/SolarPower/Repository/Implement/SensorDetailRepository.cs index 97f9fd5..e02b181 100644 --- a/SolarPower/Repository/Implement/SensorDetailRepository.cs +++ b/SolarPower/Repository/Implement/SensorDetailRepository.cs @@ -89,7 +89,7 @@ namespace SolarPower.Repository.Implement { try//tableName { - var sql = $"SELECT * FROM {tableName} WHERE deleted = 0 AND id = @Id"; + var sql = $"SELECT * FROM {tableName} WHERE deleted = 0 AND Id = @id"; result = await conn.QueryFirstOrDefaultAsync(sql, new { Id = id }); }