debug : 電站啟用檢查 - inv 儘檢查是否啟用,不管是否為異常
This commit is contained in:
parent
3a57ed7769
commit
254a17d6d3
@ -227,7 +227,7 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
var dateNowMonth = DateTimeNow.AddDays(-1).ToString("yyyy-MM");
|
var dateNowMonth = DateTimeNow.AddDays(-1).ToString("yyyy-MM");
|
||||||
|
|
||||||
Root2 observation = null;
|
Root2 observation = null;
|
||||||
|
// from here
|
||||||
#region 氣象觀測(取資料)
|
#region 氣象觀測(取資料)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -326,9 +326,9 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
#region 60天刪除operation_record
|
#region 60天刪除operation_record
|
||||||
var OperationDeletes = await powerStationRepository.GetAllDataList<OperationRecord>("operation_record", "Deleted = 1");
|
var OperationDeletes = await powerStationRepository.GetAllDataList<OperationRecord>("operation_record", "Deleted = 1");
|
||||||
List<int> deleteoperations = new List<int>();
|
List<int> deleteoperations = new List<int>();
|
||||||
foreach(var deletes in OperationDeletes)
|
foreach (var deletes in OperationDeletes)
|
||||||
{
|
{
|
||||||
if(DateTime.Now.AddDays(-60) > Convert.ToDateTime(deletes.UpdatedAt))
|
if (DateTime.Now.AddDays(-60) > Convert.ToDateTime(deletes.UpdatedAt))
|
||||||
{
|
{
|
||||||
deleteoperations.Add(deletes.Id);
|
deleteoperations.Add(deletes.Id);
|
||||||
}
|
}
|
||||||
@ -785,7 +785,7 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
await powerStationRepository.UpdateMeterHistoryMonthList(updatemeterHistoryMonths);
|
await powerStationRepository.UpdateMeterHistoryMonthList(updatemeterHistoryMonths);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
// end from here
|
||||||
#region 補償機制
|
#region 補償機制
|
||||||
var gobackDay = this.Configuration.GetValue<int>("GoBackDay"); //回推天數
|
var gobackDay = this.Configuration.GetValue<int>("GoBackDay"); //回推天數
|
||||||
var Connection_string = Configuration.GetValue<string>("mySql");
|
var Connection_string = Configuration.GetValue<string>("mySql");
|
||||||
|
|||||||
@ -6016,11 +6016,11 @@ namespace SolarPower.Repository.Implement
|
|||||||
select '{code}' , 'inverter', 'inverter_isnull',
|
select '{code}' , 'inverter', 'inverter_isnull',
|
||||||
case when count(*) > 0 then 0 else 1 end isError,
|
case when count(*) > 0 then 0 else 1 end isError,
|
||||||
now(),
|
now(),
|
||||||
case when count(*) > 0 then Null else '電站無逆變器' end error_reason
|
case when count(*) > 0 then Null else '電站無逆變器或未啟用' end error_reason
|
||||||
from {DBname}.power_station a
|
from {DBname}.power_station a
|
||||||
join {DBname}.controller b on a.id = b.PowerStationId
|
join {DBname}.controller b on a.id = b.PowerStationId
|
||||||
join {DBname}.inverter c on b.id = c.ControllerId
|
join {DBname}.inverter c on b.id = c.ControllerId
|
||||||
where a.`Code` = '{code}' and c.Deleted = 0 and c.Enabled = 1 and c.Status = 1 ;";
|
where a.`Code` = '{code}' and c.Deleted = 0 and c.Enabled = 1 and c.Status > 0 ;";
|
||||||
await conn.ExecuteAsync(sql);
|
await conn.ExecuteAsync(sql);
|
||||||
|
|
||||||
// # 回傳結果
|
// # 回傳結果
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
//},
|
//},
|
||||||
"BackgroundServiceCron": {
|
"BackgroundServiceCron": {
|
||||||
"CalcPowerStationJob": "0 5 * * * ?",
|
"CalcPowerStationJob": "0 5 * * * ?",
|
||||||
"CalcAvgPowerStationJob": "0 0 2 * * ?",
|
"CalcAvgPowerStationJob": "0 12 0 * * ?",
|
||||||
"OperationScheduleJob": "0 0 8 * * ?",
|
"OperationScheduleJob": "0 0 8 * * ?",
|
||||||
"CalcInverter15minJob": "0 2/15 * * * ?",
|
"CalcInverter15minJob": "0 2/15 * * * ?",
|
||||||
"SendEmailJob": "0 0/5 * * * ?",
|
"SendEmailJob": "0 0/5 * * * ?",
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
},
|
},
|
||||||
"BackgroundServiceCron": {
|
"BackgroundServiceCron": {
|
||||||
"CalcPowerStationJob": "0 5 * * * ?",
|
"CalcPowerStationJob": "0 5 * * * ?",
|
||||||
"CalcAvgPowerStationJob": "0 0 2 * * ?",
|
"CalcAvgPowerStationJob": "0 12 0 * * ?",
|
||||||
"OperationScheduleJob": "0 0 8 * * ?",
|
"OperationScheduleJob": "0 0 8 * * ?",
|
||||||
"CalcInverter15minJob": "0 2/15 * * * ?",
|
"CalcInverter15minJob": "0 2/15 * * * ?",
|
||||||
"SendEmailJob": "0 0/5 * * * ?",
|
"SendEmailJob": "0 0/5 * * * ?",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user