for 婉伶测试
This commit is contained in:
parent
53476fdfcd
commit
0c2f647ff5
@ -55,7 +55,8 @@ namespace SolarPower.Quartz.Jobs
|
||||
|
||||
#region step1. 找出所有電站
|
||||
logger.LogInformation("【CalcInverter15minJob】【開始取得電站資料】");
|
||||
var powerStations = await powerStationRepository.GetAllAsync();
|
||||
//var powerStations = await powerStationRepository.GetAllAsync();
|
||||
var powerStations = await powerStationRepository.Get_station_4_debug();
|
||||
logger.LogInformation("【CalcInverter15minJob】【取得成功電站資料】");
|
||||
//logger.LogInformation("【CalcInverter15minJob】【電站資料】 - {0}", System.Text.Json.JsonSerializer.Serialize(powerStations));
|
||||
#endregion
|
||||
|
||||
@ -425,6 +425,25 @@ namespace SolarPower.Repository.Implement
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<List<PowerStation>> Get_station_4_debug()
|
||||
{
|
||||
List<PowerStation> result;
|
||||
using (IDbConnection conn = this._databaseHelper.GetConnection())
|
||||
{
|
||||
try
|
||||
{
|
||||
var sql = $"SELECT * FROM {tableName} WHERE Deleted = 0 AND Status = 1 and `code` = '030010003'"; //
|
||||
|
||||
result = (await conn.QueryAsync<PowerStation>(sql)).ToList();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
throw exception;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<List<PowerStation>> GetAllNoStatusAsync()
|
||||
{
|
||||
List<PowerStation> result;
|
||||
|
||||
@ -18,6 +18,12 @@ namespace SolarPower.Repository.Interface
|
||||
/// <returns></returns>
|
||||
List<MyCity> GetMyCities(MyUser myUser, byte showEnable);
|
||||
|
||||
/// <summary>
|
||||
/// 獲取單一電站 - 臨時測試用
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<PowerStation>> Get_station_4_debug();//
|
||||
|
||||
/// <summary>
|
||||
/// 取得當前使用者可操作的電站
|
||||
/// </summary>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user