1. 背景執行 逆便器檢測 抓取所有電站
This commit is contained in:
parent
355ad96330
commit
f5be10dc0c
@ -134,6 +134,8 @@ namespace SolarPower.Quartz.Jobs
|
||||
|
||||
try
|
||||
{
|
||||
powerStations = await powerStationRepository.GetAllNoStatusAsync();
|
||||
|
||||
logger.LogInformation("【CalcInverter15minJob】開始檢測逆變器狀態");
|
||||
var ps_groupby_SitDB = powerStations.GroupBy(x => x.SiteDB).ToList();
|
||||
|
||||
|
||||
@ -416,6 +416,25 @@ namespace SolarPower.Repository.Implement
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<List<PowerStation>> GetAllNoStatusAsync()
|
||||
{
|
||||
List<PowerStation> result;
|
||||
using (IDbConnection conn = this._databaseHelper.GetConnection())
|
||||
{
|
||||
try
|
||||
{
|
||||
var sql = $"SELECT * FROM {tableName} WHERE Deleted = 0";
|
||||
|
||||
result = (await conn.QueryAsync<PowerStation>(sql)).ToList();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
throw exception;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 透過電站編號,取得單一電站資訊(覆寫)
|
||||
/// </summary>
|
||||
|
||||
@ -612,5 +612,7 @@ namespace SolarPower.Repository.Interface
|
||||
Task<int> CheckSensorAvgTableColumn(string dbname, string code);
|
||||
Task AlertColInvTableColumn(string dbname, string code);
|
||||
Task AlertColSensoravgTableColumn(string dbname, string code);
|
||||
|
||||
Task<List<PowerStation>> GetAllNoStatusAsync();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user