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 }); }