From a30f54e1b099ac91737c2da831f28f74c69c615e Mon Sep 17 00:00:00 2001 From: ken Date: Mon, 13 Jun 2022 21:26:21 +0800 Subject: [PATCH] toast --- SolarPower/Startup.cs | 58 +++++++++---------- .../Views/Operation/OperationRecord.cshtml | 2 +- .../StationOverviewInfo.cshtml | 2 +- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/SolarPower/Startup.cs b/SolarPower/Startup.cs index 0b9e12b..ff674bd 100644 --- a/SolarPower/Startup.cs +++ b/SolarPower/Startup.cs @@ -92,54 +92,54 @@ namespace SolarPower //services.AddHostedService(); ////添加Quartz服務 - //services.AddSingleton(); - //services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); ////添加Job //#region 定期計畫 - //services.AddSingleton(); - //services.AddSingleton( - // new JobSchedule(jobType: typeof(OperationScheduleJob), cronExpression: Configuration.GetValue("BackgroundServiceCron:OperationScheduleJob")) - //); + services.AddSingleton(); + services.AddSingleton( + new JobSchedule(jobType: typeof(OperationScheduleJob), cronExpression: Configuration.GetValue("BackgroundServiceCron:OperationScheduleJob")) + ); //#endregion //#region 計算電站逆變器資訊(每整點2分開始執行15分鐘一個循環) - //services.AddSingleton(); - //services.AddSingleton( - // new JobSchedule(jobType: typeof(CalcInverter15minJob), cronExpression: Configuration.GetValue("BackgroundServiceCron:CalcInverter15minJob")) - //); + services.AddSingleton(); + services.AddSingleton( + new JobSchedule(jobType: typeof(CalcInverter15minJob), cronExpression: Configuration.GetValue("BackgroundServiceCron:CalcInverter15minJob")) + ); //#endregion //#region 計算電站發電量等資訊(每整點5分執行) - //services.AddSingleton(); - //services.AddSingleton( - //new JobSchedule(jobType: typeof(CalcPowerStationJob), cronExpression: Configuration.GetValue("BackgroundServiceCron:CalcPowerStationJob")) - ////new JobSchedule(jobType: typeof(CalcPowerStationJob), cronExpression: "0/10 * * * * ?") - //); + services.AddSingleton(); + services.AddSingleton( + new JobSchedule(jobType: typeof(CalcPowerStationJob), cronExpression: Configuration.GetValue("BackgroundServiceCron:CalcPowerStationJob")) + //new JobSchedule(jobType: typeof(CalcPowerStationJob), cronExpression: "0/10 * * * * ?") + ); //#endregion //#region 計算電站日照量、PR、kWP 30日平均、(每天凌晨2點執行) - //services.AddSingleton(); - //services.AddSingleton( - //new JobSchedule(jobType: typeof(CalcAvgPowerStationJob), cronExpression: Configuration.GetValue("BackgroundServiceCron:CalcAvgPowerStationJob")) - ////new JobSchedule(jobType: typeof(CalcAvgPowerStationJob), cronExpression: "0 03 7 ? * * *") - //); + services.AddSingleton(); + services.AddSingleton( + new JobSchedule(jobType: typeof(CalcAvgPowerStationJob), cronExpression: Configuration.GetValue("BackgroundServiceCron:CalcAvgPowerStationJob")) + //new JobSchedule(jobType: typeof(CalcAvgPowerStationJob), cronExpression: "0 03 7 ? * * *") + ); //#endregion //#region 寄送Email(每天凌晨2點執行) - //services.AddSingleton(); - //services.AddSingleton( - //new JobSchedule(jobType: typeof(SendEmailJob), cronExpression: Configuration.GetValue("BackgroundServiceCron:SendEmailJob")) - //); + services.AddSingleton(); + services.AddSingleton( + new JobSchedule(jobType: typeof(SendEmailJob), cronExpression: Configuration.GetValue("BackgroundServiceCron:SendEmailJob")) + ); //#endregion //#region 查詢異常新增至Email - //services.AddSingleton(); - //services.AddSingleton( - //new JobSchedule(jobType: typeof(ExceptionSchedule), cronExpression: Configuration.GetValue("BackgroundServiceCron:ExceptionSchedule")) - //); + services.AddSingleton(); + services.AddSingleton( + new JobSchedule(jobType: typeof(ExceptionSchedule), cronExpression: Configuration.GetValue("BackgroundServiceCron:ExceptionSchedule")) + ); //#endregion - //services.AddHostedService(); + services.AddHostedService(); //#endregion services.AddApplicationInsightsTelemetry(); diff --git a/SolarPower/Views/Operation/OperationRecord.cshtml b/SolarPower/Views/Operation/OperationRecord.cshtml index 5f929c7..59c5a2e 100644 --- a/SolarPower/Views/Operation/OperationRecord.cshtml +++ b/SolarPower/Views/Operation/OperationRecord.cshtml @@ -1150,7 +1150,7 @@ operationRecordTable.ajax.reload(); } - toast_ok("撌脖耨孵"); + toast_ok("靽格孵"); // 瘨摰 $("#save-record-btn").attr('disabled', false); } diff --git a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml index e980bb9..7b7649b 100644 --- a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml +++ b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml @@ -1740,7 +1740,7 @@ operationRecordTable.ajax.reload(); } - toast_ok("撌脖耨孵"); + toast_ok("靽格孵"); // 瘨摰 $("#save-record-op-btn").attr('disabled', false); }