debug: winfrom 紅綠燈顏色變換
This commit is contained in:
parent
437e3e3150
commit
401dd663d8
@ -720,20 +720,20 @@ namespace SolarPower.Controllers
|
|||||||
};
|
};
|
||||||
|
|
||||||
await userRepository.UpdatePassword(update, properties);
|
await userRepository.UpdatePassword(update, properties);
|
||||||
var website_url = await powerStationRepository.GetOneVariableByName("WebSiteUrl");
|
//var website_url = await powerStationRepository.GetOneVariableByName("WebSiteUrl");
|
||||||
|
|
||||||
var sendSubject = "密碼更改成功";
|
//var sendSubject = "密碼更改成功";
|
||||||
var sendContent = $@"您的新密碼為: { defPasswd}
|
//var sendContent = $@"您的新密碼為: { defPasswd}
|
||||||
<br>立即前往:<a href='{website_url}' target='_blank'>{website_url}</a>";
|
// <br>立即前往:<a href='{website_url}' target='_blank'>{website_url}</a>";
|
||||||
|
|
||||||
List<string> recipientEmails = new List<string>()
|
//List<string> recipientEmails = new List<string>()
|
||||||
{
|
//{
|
||||||
user.Email
|
// user.Email
|
||||||
};
|
//};
|
||||||
|
|
||||||
sendEmailService.Send(recipientEmails, sendSubject, sendContent);
|
//sendEmailService.Send(recipientEmails, sendSubject, sendContent);
|
||||||
apiResult.Code = "0000";
|
apiResult.Code = "0000";
|
||||||
apiResult.Msg = "變更成功";
|
apiResult.Msg = "密碼重置成功為六個零!";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"LoginExpireMinute": 60, //登入到期時間,單位(分)
|
"LoginExpireMinute": 60, //<EFBFBD>n<EFBFBD>J<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɶ<EFBFBD><EFBFBD>A<EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>)
|
||||||
"GoBackDay": 1, //補償機制(背景執行(每天)),回推天數
|
"GoBackDay": 1, //<EFBFBD><EFBFBD><EFBFBD>v<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD>I<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD>C<EFBFBD><EFBFBD>))<EFBFBD>A<EFBFBD>^<EFBFBD><EFBFBD><EFBFBD>Ѽ<EFBFBD>
|
||||||
//"DBConfig": {
|
//"DBConfig": {
|
||||||
// "Server": "MVgHWzR3rGDgD57TUoFunA==",
|
// "Server": "MVgHWzR3rGDgD57TUoFunA==",
|
||||||
// "port": "r4AoXMUDodcQjIzofGNCcg==",
|
// "port": "r4AoXMUDodcQjIzofGNCcg==",
|
||||||
@ -17,7 +17,7 @@
|
|||||||
//},
|
//},
|
||||||
//"mySql": "server=210.61.91.43;user=idafenweb;Database=solar_master;Port=10068;password=P@ssw0rd;charset='utf8';pooling=true;sslmode=none;",
|
//"mySql": "server=210.61.91.43;user=idafenweb;Database=solar_master;Port=10068;password=P@ssw0rd;charset='utf8';pooling=true;sslmode=none;",
|
||||||
"mySql": "server=60.251.164.103;user=webuser;Database=solar_master;Port=11306;password=FICadmin99;charset='utf8';pooling=true;sslmode=none;",
|
"mySql": "server=60.251.164.103;user=webuser;Database=solar_master;Port=11306;password=FICadmin99;charset='utf8';pooling=true;sslmode=none;",
|
||||||
//正式環境
|
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
"DBConfig": {
|
"DBConfig": {
|
||||||
"Server": "AVXfxd+IRlLtJ0MCi9HU1g==",
|
"Server": "AVXfxd+IRlLtJ0MCi9HU1g==",
|
||||||
"port": "CrEmevYrUsSo7Mkb7Gxn8A==",
|
"port": "CrEmevYrUsSo7Mkb7Gxn8A==",
|
||||||
@ -25,7 +25,7 @@
|
|||||||
"Root": "Aph7AzoiwAmmBHCfS1rqeQ==",
|
"Root": "Aph7AzoiwAmmBHCfS1rqeQ==",
|
||||||
"Password": "8WMHBEWuT0XoAB4kzduQHA=="
|
"Password": "8WMHBEWuT0XoAB4kzduQHA=="
|
||||||
},
|
},
|
||||||
// FIC 預發佈環境
|
// FIC <EFBFBD>w<EFBFBD>o<EFBFBD>G<EFBFBD><EFBFBD><EFBFBD>
|
||||||
//"DBConfig": {
|
//"DBConfig": {
|
||||||
// "Server": "MWAxcj1mgmbZ8tB6NgApnQ==",
|
// "Server": "MWAxcj1mgmbZ8tB6NgApnQ==",
|
||||||
// "port": "CY1x+1WYXRCBab3wKnBCOQ==",
|
// "port": "CY1x+1WYXRCBab3wKnBCOQ==",
|
||||||
@ -49,7 +49,7 @@
|
|||||||
"Password": "wswgnluvoodfexrb",
|
"Password": "wswgnluvoodfexrb",
|
||||||
"EnableSsl": true
|
"EnableSsl": true
|
||||||
},
|
},
|
||||||
"ExceptionTimes": 240, //異常通知時間,單位(分鐘)
|
"ExceptionTimes": 240, //<EFBFBD><EFBFBD><EFBFBD>`<EFBFBD>q<EFBFBD><EFBFBD><EFBFBD>ɶ<EFBFBD><EFBFBD>A<EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||||
"ExceptionTimes_Priority1": 1440,
|
"ExceptionTimes_Priority1": 1440,
|
||||||
"ExceptionTimes_Priority2": 720,
|
"ExceptionTimes_Priority2": 720,
|
||||||
"ExceptionTimes_Priority3": 0
|
"ExceptionTimes_Priority3": 0
|
||||||
|
|||||||
@ -290,7 +290,7 @@ namespace solarApp.Service
|
|||||||
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】開始執行[{_siteDB}.s{_siteID}_station]的資料表向[{_siteDB}_history.s{_siteID}_station]搬移");
|
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】開始執行[{_siteDB}.s{_siteID}_station]的資料表向[{_siteDB}_history.s{_siteID}_station]搬移");
|
||||||
string for_insert_station = $@"INSERT {_siteDB}_history.s{_siteID01}_station(`ID`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `CONTROLLERID`, `KWH`, `TODAYKWH`, `TOTALKWH`, `KWHKWP`, `PR`, `MP`, `SOLARHOUR`, `insertTime`)
|
string for_insert_station = $@"INSERT {_siteDB}_history.s{_siteID01}_station(`ID`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `CONTROLLERID`, `KWH`, `TODAYKWH`, `TOTALKWH`, `KWHKWP`, `PR`, `MP`, `SOLARHOUR`, `insertTime`)
|
||||||
SELECT `ID`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `CONTROLLERID`, `KWH`, `TODAYKWH`, `TOTALKWH`, `KWHKWP`, `PR`, `MP`, `SOLARHOUR`, `insertTime` FROM {_siteDB}.s{_siteID01}_station
|
SELECT `ID`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `CONTROLLERID`, `KWH`, `TODAYKWH`, `TOTALKWH`, `KWHKWP`, `PR`, `MP`, `SOLARHOUR`, `insertTime` FROM {_siteDB}.s{_siteID01}_station
|
||||||
WHERE FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d') < '2022-07'";
|
WHERE FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d') < '2022-08'";
|
||||||
int rowCT = conn.Execute(for_insert_station, commandTimeout : 600);
|
int rowCT = conn.Execute(for_insert_station, commandTimeout : 600);
|
||||||
// System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】{_siteDB}.s{_siteID}_station的七月前資料寫入至{_siteDB}_history.s{_siteID}_station【寫入成功】於{dateTime}");
|
// System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】{_siteDB}.s{_siteID}_station的七月前資料寫入至{_siteDB}_history.s{_siteID}_station【寫入成功】於{dateTime}");
|
||||||
|
|
||||||
@ -303,7 +303,7 @@ namespace solarApp.Service
|
|||||||
|
|
||||||
//刪除原本的資料
|
//刪除原本的資料
|
||||||
string for_delete_station = $@"DELETE FROM {_siteDB}.s{_siteID01}_station
|
string for_delete_station = $@"DELETE FROM {_siteDB}.s{_siteID01}_station
|
||||||
WHERE FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d') < '2022-07'";
|
WHERE FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d') < '2022-08'";
|
||||||
rowCT = conn.Execute(for_delete_station, commandTimeout: 600);
|
rowCT = conn.Execute(for_delete_station, commandTimeout: 600);
|
||||||
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】{_siteDB}.s{_siteID}_sensoravg搬移至{_siteDB}_history.s{_siteID}_sensoravg【搬移資料成功】於{dateTime} 共 {delete_station.ToString()} 筆");
|
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】{_siteDB}.s{_siteID}_sensoravg搬移至{_siteDB}_history.s{_siteID}_sensoravg【搬移資料成功】於{dateTime} 共 {delete_station.ToString()} 筆");
|
||||||
duration = DateTime.Now - dt_start1;
|
duration = DateTime.Now - dt_start1;
|
||||||
@ -346,7 +346,7 @@ namespace solarApp.Service
|
|||||||
// System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】開始執行[{_siteDB}.s{_siteID}_inv]的資料表向[{_siteDB}_history.s{_siteID}_inv]搬移");
|
// System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】開始執行[{_siteDB}.s{_siteID}_inv]的資料表向[{_siteDB}_history.s{_siteID}_inv]搬移");
|
||||||
string for_insert_inv = $@"INSERT {_siteDB}_history.s{_siteID01}_inv(`ID`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `CONTROLLERID`, `INVERTERID`, `SN`, `AC1V`, `AC1A`, `AC1W`, `AC1F`, `AC1WH`, `AC2V`, `AC2A`, `AC2W`, `AC2F`, `AC2WH`, `AC3V`, `AC3A`, `AC3W`, `AC3F`, `AC3WH`, `ACRUNTIME`, `DC1V`, `DC1A`, `DC1W`, `DC1WH`, `DC2V`, `DC2A`, `DC2W`, `DC2WH`, `DC3V`, `DC3A`, `DC3W`, `DC3WH`, `DC4V`, `DC4A`, `DC4W`, `DC4WH`, `DC5V`, `DC5A`, `DC5W`, `DC5WH`, `DCRUNTIME`, `WH`, `TODAYKWH`, `TOTALKWH`, `PR`, `RA1`, `RA2`, `RA3`, `RA4`, `RA5`, `CrdTime`)
|
string for_insert_inv = $@"INSERT {_siteDB}_history.s{_siteID01}_inv(`ID`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `CONTROLLERID`, `INVERTERID`, `SN`, `AC1V`, `AC1A`, `AC1W`, `AC1F`, `AC1WH`, `AC2V`, `AC2A`, `AC2W`, `AC2F`, `AC2WH`, `AC3V`, `AC3A`, `AC3W`, `AC3F`, `AC3WH`, `ACRUNTIME`, `DC1V`, `DC1A`, `DC1W`, `DC1WH`, `DC2V`, `DC2A`, `DC2W`, `DC2WH`, `DC3V`, `DC3A`, `DC3W`, `DC3WH`, `DC4V`, `DC4A`, `DC4W`, `DC4WH`, `DC5V`, `DC5A`, `DC5W`, `DC5WH`, `DCRUNTIME`, `WH`, `TODAYKWH`, `TOTALKWH`, `PR`, `RA1`, `RA2`, `RA3`, `RA4`, `RA5`, `CrdTime`)
|
||||||
SELECT `ID`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `CONTROLLERID`, `INVERTERID`, `SN`, `AC1V`, `AC1A`, `AC1W`, `AC1F`, `AC1WH`, `AC2V`, `AC2A`, `AC2W`, `AC2F`, `AC2WH`, `AC3V`, `AC3A`, `AC3W`, `AC3F`, `AC3WH`, `ACRUNTIME`, `DC1V`, `DC1A`, `DC1W`, `DC1WH`, `DC2V`, `DC2A`, `DC2W`, `DC2WH`, `DC3V`, `DC3A`, `DC3W`, `DC3WH`, `DC4V`, `DC4A`, `DC4W`, `DC4WH`, `DC5V`, `DC5A`, `DC5W`, `DC5WH`, `DCRUNTIME`, `WH`, `TODAYKWH`, `TOTALKWH`, `PR`, `RA1`, `RA2`, `RA3`, `RA4`, `RA5`, `CrdTime` FROM {_siteDB}.s{_siteID01}_inv
|
SELECT `ID`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `CONTROLLERID`, `INVERTERID`, `SN`, `AC1V`, `AC1A`, `AC1W`, `AC1F`, `AC1WH`, `AC2V`, `AC2A`, `AC2W`, `AC2F`, `AC2WH`, `AC3V`, `AC3A`, `AC3W`, `AC3F`, `AC3WH`, `ACRUNTIME`, `DC1V`, `DC1A`, `DC1W`, `DC1WH`, `DC2V`, `DC2A`, `DC2W`, `DC2WH`, `DC3V`, `DC3A`, `DC3W`, `DC3WH`, `DC4V`, `DC4A`, `DC4W`, `DC4WH`, `DC5V`, `DC5A`, `DC5W`, `DC5WH`, `DCRUNTIME`, `WH`, `TODAYKWH`, `TOTALKWH`, `PR`, `RA1`, `RA2`, `RA3`, `RA4`, `RA5`, `CrdTime` FROM {_siteDB}.s{_siteID01}_inv
|
||||||
WHERE LEFT(crdTime, 7) < '2022-07' ";
|
WHERE LEFT(crdTime, 7) < '2022-08' ";
|
||||||
int rowCT = conn.Execute(for_insert_inv, commandTimeout: 6000);
|
int rowCT = conn.Execute(for_insert_inv, commandTimeout: 6000);
|
||||||
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】{_siteDB}.s{_siteID}_inv的七月前資料寫入至{_siteDB}_history.s{_siteID}_inv【寫入成功】於{dateTime}");
|
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】{_siteDB}.s{_siteID}_inv的七月前資料寫入至{_siteDB}_history.s{_siteID}_inv【寫入成功】於{dateTime}");
|
||||||
// log
|
// log
|
||||||
@ -356,7 +356,7 @@ namespace solarApp.Service
|
|||||||
dt_start1 = DateTime.Now;
|
dt_start1 = DateTime.Now;
|
||||||
|
|
||||||
string for_delete_inv = $@"DELETE FROM {_siteDB}.s{_siteID01}_inv
|
string for_delete_inv = $@"DELETE FROM {_siteDB}.s{_siteID01}_inv
|
||||||
WHERE LEFT(crdTime, 7) < '2022-07'";
|
WHERE LEFT(crdTime, 7) < '2022-08'";
|
||||||
rowCT = conn.Execute(for_delete_inv, commandTimeout: 6000);
|
rowCT = conn.Execute(for_delete_inv, commandTimeout: 6000);
|
||||||
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】{_siteDB}.s{_siteID}_sensoravg搬移至{_siteDB}_history.s{_siteID}_sensoravg【搬移資料成功】於{dateTime} 共 {delete_inv.ToString()} 筆");
|
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】{_siteDB}.s{_siteID}_sensoravg搬移至{_siteDB}_history.s{_siteID}_sensoravg【搬移資料成功】於{dateTime} 共 {delete_inv.ToString()} 筆");
|
||||||
duration = DateTime.Now - dt_start1;
|
duration = DateTime.Now - dt_start1;
|
||||||
@ -391,14 +391,14 @@ namespace solarApp.Service
|
|||||||
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】開始執行[{_siteDB}.s{_siteID}_sensoravg]的資料表向[{_siteDB}_history.s{_siteID}_sensoravg]搬移");
|
//System.Diagnostics.Debug.WriteLine($"【ArchiveRowData】開始執行[{_siteDB}.s{_siteID}_sensoravg]的資料表向[{_siteDB}_history.s{_siteID}_sensoravg]搬移");
|
||||||
string for_insert_sensoravg = $@"INSERT {_siteDB}_history.s{_siteID01}_sensoravg(`ID`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `CONTROLLERID`, `SENSORAVG01`, `SENSORAVG02`, `SENSORAVG03`, `SENSORAVG04`, `SENSORAVG05`, `SENSORAVG06`, `SENSORAVG07`, `SENSORAVG08`, `SENSORAVG09`, `SENSORAVG10`, `SENSORAVG11`, `SENSORAVG12`, `SENSORAVG13`, `SENSORAVG14`, `SENSORAVG15`, `SENSORAVG16`, `SENSORAVG17`, `SENSORAVG18`, `SENSORAVG19`, `SENSORAVG20`, `SENSORAVG21`, `SENSORAVG22`, `SENSORAVG23`, `SENSORAVG24`, `SENSORAVG25`, `SENSORAVG26`, `SENSORAVG27`, `SENSORAVG28`, `SENSORAVG29`, `SENSORAVG30`, `SENSORAVG31`, `SENSORAVG32`, `SENSORAVG33`, `SENSORAVG34`, `SENSORAVG35`, `SENSORAVG36`, `SENSORAVG37`, `SENSORAVG38`, `SENSORAVG39`, `SENSORAVG40`, `SENSORAVG41`, `SENSORAVG42`, `SENSORAVG43`, `SENSORAVG44`, `SENSORAVG45`, `SENSORAVG46`, `SENSORAVG47`, `SENSORAVG48`, `SENSORAVG49`, `SENSORAVG50`, `CrdTime`)
|
string for_insert_sensoravg = $@"INSERT {_siteDB}_history.s{_siteID01}_sensoravg(`ID`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `CONTROLLERID`, `SENSORAVG01`, `SENSORAVG02`, `SENSORAVG03`, `SENSORAVG04`, `SENSORAVG05`, `SENSORAVG06`, `SENSORAVG07`, `SENSORAVG08`, `SENSORAVG09`, `SENSORAVG10`, `SENSORAVG11`, `SENSORAVG12`, `SENSORAVG13`, `SENSORAVG14`, `SENSORAVG15`, `SENSORAVG16`, `SENSORAVG17`, `SENSORAVG18`, `SENSORAVG19`, `SENSORAVG20`, `SENSORAVG21`, `SENSORAVG22`, `SENSORAVG23`, `SENSORAVG24`, `SENSORAVG25`, `SENSORAVG26`, `SENSORAVG27`, `SENSORAVG28`, `SENSORAVG29`, `SENSORAVG30`, `SENSORAVG31`, `SENSORAVG32`, `SENSORAVG33`, `SENSORAVG34`, `SENSORAVG35`, `SENSORAVG36`, `SENSORAVG37`, `SENSORAVG38`, `SENSORAVG39`, `SENSORAVG40`, `SENSORAVG41`, `SENSORAVG42`, `SENSORAVG43`, `SENSORAVG44`, `SENSORAVG45`, `SENSORAVG46`, `SENSORAVG47`, `SENSORAVG48`, `SENSORAVG49`, `SENSORAVG50`, `CrdTime`)
|
||||||
SELECT `ID`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `CONTROLLERID`, `SENSORAVG01`, `SENSORAVG02`, `SENSORAVG03`, `SENSORAVG04`, `SENSORAVG05`, `SENSORAVG06`, `SENSORAVG07`, `SENSORAVG08`, `SENSORAVG09`, `SENSORAVG10`, `SENSORAVG11`, `SENSORAVG12`, `SENSORAVG13`, `SENSORAVG14`, `SENSORAVG15`, `SENSORAVG16`, `SENSORAVG17`, `SENSORAVG18`, `SENSORAVG19`, `SENSORAVG20`, `SENSORAVG21`, `SENSORAVG22`, `SENSORAVG23`, `SENSORAVG24`, `SENSORAVG25`, `SENSORAVG26`, `SENSORAVG27`, `SENSORAVG28`, `SENSORAVG29`, `SENSORAVG30`, `SENSORAVG31`, `SENSORAVG32`, `SENSORAVG33`, `SENSORAVG34`, `SENSORAVG35`, `SENSORAVG36`, `SENSORAVG37`, `SENSORAVG38`, `SENSORAVG39`, `SENSORAVG40`, `SENSORAVG41`, `SENSORAVG42`, `SENSORAVG43`, `SENSORAVG44`, `SENSORAVG45`, `SENSORAVG46`, `SENSORAVG47`, `SENSORAVG48`, `SENSORAVG49`, `SENSORAVG50`, `CrdTime` FROM {_siteDB}.s{_siteID01}_sensoravg
|
SELECT `ID`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `CONTROLLERID`, `SENSORAVG01`, `SENSORAVG02`, `SENSORAVG03`, `SENSORAVG04`, `SENSORAVG05`, `SENSORAVG06`, `SENSORAVG07`, `SENSORAVG08`, `SENSORAVG09`, `SENSORAVG10`, `SENSORAVG11`, `SENSORAVG12`, `SENSORAVG13`, `SENSORAVG14`, `SENSORAVG15`, `SENSORAVG16`, `SENSORAVG17`, `SENSORAVG18`, `SENSORAVG19`, `SENSORAVG20`, `SENSORAVG21`, `SENSORAVG22`, `SENSORAVG23`, `SENSORAVG24`, `SENSORAVG25`, `SENSORAVG26`, `SENSORAVG27`, `SENSORAVG28`, `SENSORAVG29`, `SENSORAVG30`, `SENSORAVG31`, `SENSORAVG32`, `SENSORAVG33`, `SENSORAVG34`, `SENSORAVG35`, `SENSORAVG36`, `SENSORAVG37`, `SENSORAVG38`, `SENSORAVG39`, `SENSORAVG40`, `SENSORAVG41`, `SENSORAVG42`, `SENSORAVG43`, `SENSORAVG44`, `SENSORAVG45`, `SENSORAVG46`, `SENSORAVG47`, `SENSORAVG48`, `SENSORAVG49`, `SENSORAVG50`, `CrdTime` FROM {_siteDB}.s{_siteID01}_sensoravg
|
||||||
WHERE LEFT(crdTime, 7) < '2022-07'";
|
WHERE LEFT(crdTime, 7) < '2022-08'";
|
||||||
int rowCT = conn.Execute(for_insert_sensoravg, commandTimeout: 600);
|
int rowCT = conn.Execute(for_insert_sensoravg, commandTimeout: 600);
|
||||||
// log
|
// log
|
||||||
TimeSpan duration = DateTime.Now - dt_start1;
|
TimeSpan duration = DateTime.Now - dt_start1;
|
||||||
arclog.insert_log(_powerStationID, "move raw s1", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_sensoravg", $"{_siteDB}_history.s{_siteID01}_sensoravg", "0", "", rowCT.ToString(), conn, null);
|
arclog.insert_log(_powerStationID, "move raw s1", duration.TotalSeconds, $"{_siteDB}.s{_siteID01}_sensoravg", $"{_siteDB}_history.s{_siteID01}_sensoravg", "0", "", rowCT.ToString(), conn, null);
|
||||||
dt_start1 = DateTime.Now;
|
dt_start1 = DateTime.Now;
|
||||||
|
|
||||||
string for_delete_sensoravg = $@"DELETE FROM {_siteDB}.s{_siteID01}_sensoravg WHERE LEFT(crdTime, 7) < '2022-07'";
|
string for_delete_sensoravg = $@"DELETE FROM {_siteDB}.s{_siteID01}_sensoravg WHERE LEFT(crdTime, 7) < '2022-08'";
|
||||||
rowCT = conn.Execute(for_delete_sensoravg, commandTimeout: 600);
|
rowCT = conn.Execute(for_delete_sensoravg, commandTimeout: 600);
|
||||||
|
|
||||||
duration = DateTime.Now - dt_start1;
|
duration = DateTime.Now - dt_start1;
|
||||||
|
|||||||
@ -162,8 +162,8 @@ namespace solarApp.Service
|
|||||||
site_id, alarmID, datestamp, HealthStatus
|
site_id, alarmID, datestamp, HealthStatus
|
||||||
from (
|
from (
|
||||||
select site_id, datestamp, sourceState, id alarmID,
|
select site_id, datestamp, sourceState, id alarmID,
|
||||||
case when alarmClass = 14 then 3 # Network 控制盒斷線 - 紅燈
|
case when alarmClass = 31 then 3 # Network 控制盒斷線 - 紅燈
|
||||||
when alarmClass != 14 then 2 end HealthStatus # inv, sensor 異常 黃燈
|
when alarmClass != 31 then 2 end HealthStatus # inv, sensor 異常 黃燈
|
||||||
from err_main
|
from err_main
|
||||||
where sourceState = 1 and left(site_id , 1) = '0'
|
where sourceState = 1 and left(site_id , 1) = '0'
|
||||||
and datestamp > '{ System.DateTime.Now.AddDays(-60).ToString("yyyy-MM-dd")}'
|
and datestamp > '{ System.DateTime.Now.AddDays(-60).ToString("yyyy-MM-dd")}'
|
||||||
|
|||||||
25
solarApp/fmArchive.Designer.cs
generated
25
solarApp/fmArchive.Designer.cs
generated
@ -30,8 +30,8 @@ namespace solarApp
|
|||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||||
@ -88,6 +88,7 @@ namespace solarApp
|
|||||||
this.tbUserName = new System.Windows.Forms.TextBox();
|
this.tbUserName = new System.Windows.Forms.TextBox();
|
||||||
this.btSendMail = new System.Windows.Forms.Button();
|
this.btSendMail = new System.Windows.Forms.Button();
|
||||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||||
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
this.tabControl1.SuspendLayout();
|
this.tabControl1.SuspendLayout();
|
||||||
this.tabPage1.SuspendLayout();
|
this.tabPage1.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||||
@ -392,8 +393,8 @@ namespace solarApp
|
|||||||
//
|
//
|
||||||
this.gv_inv_detail.AllowUserToAddRows = false;
|
this.gv_inv_detail.AllowUserToAddRows = false;
|
||||||
this.gv_inv_detail.AllowUserToDeleteRows = false;
|
this.gv_inv_detail.AllowUserToDeleteRows = false;
|
||||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||||
this.gv_inv_detail.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
|
this.gv_inv_detail.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
|
||||||
this.gv_inv_detail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
this.gv_inv_detail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.gv_inv_detail.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.gv_inv_detail.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.gv_inv_detail.Location = new System.Drawing.Point(768, 75);
|
this.gv_inv_detail.Location = new System.Drawing.Point(768, 75);
|
||||||
@ -409,8 +410,8 @@ namespace solarApp
|
|||||||
//
|
//
|
||||||
this.gv_rpt_invDay.AllowUserToAddRows = false;
|
this.gv_rpt_invDay.AllowUserToAddRows = false;
|
||||||
this.gv_rpt_invDay.AllowUserToDeleteRows = false;
|
this.gv_rpt_invDay.AllowUserToDeleteRows = false;
|
||||||
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
||||||
this.gv_rpt_invDay.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2;
|
this.gv_rpt_invDay.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
|
||||||
this.gv_rpt_invDay.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
this.gv_rpt_invDay.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.gv_rpt_invDay.Dock = System.Windows.Forms.DockStyle.Left;
|
this.gv_rpt_invDay.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.gv_rpt_invDay.Location = new System.Drawing.Point(0, 75);
|
this.gv_rpt_invDay.Location = new System.Drawing.Point(0, 75);
|
||||||
@ -580,6 +581,7 @@ namespace solarApp
|
|||||||
// panel2
|
// panel2
|
||||||
//
|
//
|
||||||
this.panel2.BackColor = System.Drawing.Color.Moccasin;
|
this.panel2.BackColor = System.Drawing.Color.Moccasin;
|
||||||
|
this.panel2.Controls.Add(this.button1);
|
||||||
this.panel2.Controls.Add(this.lbReceiver);
|
this.panel2.Controls.Add(this.lbReceiver);
|
||||||
this.panel2.Controls.Add(this.tbReceiver);
|
this.panel2.Controls.Add(this.tbReceiver);
|
||||||
this.panel2.Controls.Add(this.gbox);
|
this.panel2.Controls.Add(this.gbox);
|
||||||
@ -743,6 +745,16 @@ namespace solarApp
|
|||||||
//
|
//
|
||||||
this.timer1.Interval = 10000;
|
this.timer1.Interval = 10000;
|
||||||
//
|
//
|
||||||
|
// button1
|
||||||
|
//
|
||||||
|
this.button1.Location = new System.Drawing.Point(1288, 73);
|
||||||
|
this.button1.Name = "button1";
|
||||||
|
this.button1.Size = new System.Drawing.Size(94, 29);
|
||||||
|
this.button1.TabIndex = 17;
|
||||||
|
this.button1.Text = "button1";
|
||||||
|
this.button1.UseVisualStyleBackColor = true;
|
||||||
|
this.button1.Click += new System.EventHandler(this.button1_Click_1);
|
||||||
|
//
|
||||||
// fmArchive
|
// fmArchive
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F);
|
||||||
@ -834,5 +846,6 @@ namespace solarApp
|
|||||||
private System.Windows.Forms.Label lbMsgStatus;
|
private System.Windows.Forms.Label lbMsgStatus;
|
||||||
private System.Windows.Forms.TabPage tabPage5;
|
private System.Windows.Forms.TabPage tabPage5;
|
||||||
private System.Windows.Forms.Button btSyncErr;
|
private System.Windows.Forms.Button btSyncErr;
|
||||||
|
private System.Windows.Forms.Button button1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user