This commit is contained in:
ken 2022-06-13 21:26:21 +08:00
parent aa98950c14
commit a30f54e1b0
3 changed files with 31 additions and 31 deletions

View File

@ -92,54 +92,54 @@ namespace SolarPower
//services.AddHostedService<OperationScheduleBackgroundService>();
////添加Quartz服務
//services.AddSingleton<IJobFactory, SingletonJobFactory>();
//services.AddSingleton<ISchedulerFactory, StdSchedulerFactory>();
services.AddSingleton<IJobFactory, SingletonJobFactory>();
services.AddSingleton<ISchedulerFactory, StdSchedulerFactory>();
////添加Job
//#region 定期計畫
//services.AddSingleton<OperationScheduleJob>();
//services.AddSingleton(
// new JobSchedule(jobType: typeof(OperationScheduleJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:OperationScheduleJob"))
//);
services.AddSingleton<OperationScheduleJob>();
services.AddSingleton(
new JobSchedule(jobType: typeof(OperationScheduleJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:OperationScheduleJob"))
);
//#endregion
//#region 計算電站逆變器資訊(每整點2分開始執行15分鐘一個循環)
//services.AddSingleton<CalcInverter15minJob>();
//services.AddSingleton(
// new JobSchedule(jobType: typeof(CalcInverter15minJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:CalcInverter15minJob"))
//);
services.AddSingleton<CalcInverter15minJob>();
services.AddSingleton(
new JobSchedule(jobType: typeof(CalcInverter15minJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:CalcInverter15minJob"))
);
//#endregion
//#region 計算電站發電量等資訊(每整點5分執行)
//services.AddSingleton<CalcPowerStationJob>();
//services.AddSingleton(
//new JobSchedule(jobType: typeof(CalcPowerStationJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:CalcPowerStationJob"))
////new JobSchedule(jobType: typeof(CalcPowerStationJob), cronExpression: "0/10 * * * * ?")
//);
services.AddSingleton<CalcPowerStationJob>();
services.AddSingleton(
new JobSchedule(jobType: typeof(CalcPowerStationJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:CalcPowerStationJob"))
//new JobSchedule(jobType: typeof(CalcPowerStationJob), cronExpression: "0/10 * * * * ?")
);
//#endregion
//#region 計算電站日照量、PR、kWP 30日平均、(每天凌晨2點執行)
//services.AddSingleton<CalcAvgPowerStationJob>();
//services.AddSingleton(
//new JobSchedule(jobType: typeof(CalcAvgPowerStationJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:CalcAvgPowerStationJob"))
////new JobSchedule(jobType: typeof(CalcAvgPowerStationJob), cronExpression: "0 03 7 ? * * *")
//);
services.AddSingleton<CalcAvgPowerStationJob>();
services.AddSingleton(
new JobSchedule(jobType: typeof(CalcAvgPowerStationJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:CalcAvgPowerStationJob"))
//new JobSchedule(jobType: typeof(CalcAvgPowerStationJob), cronExpression: "0 03 7 ? * * *")
);
//#endregion
//#region 寄送Email(每天凌晨2點執行)
//services.AddSingleton<SendEmailJob>();
//services.AddSingleton(
//new JobSchedule(jobType: typeof(SendEmailJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:SendEmailJob"))
//);
services.AddSingleton<SendEmailJob>();
services.AddSingleton(
new JobSchedule(jobType: typeof(SendEmailJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:SendEmailJob"))
);
//#endregion
//#region 查詢異常新增至Email
//services.AddSingleton<ExceptionSchedule>();
//services.AddSingleton(
//new JobSchedule(jobType: typeof(ExceptionSchedule), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:ExceptionSchedule"))
//);
services.AddSingleton<ExceptionSchedule>();
services.AddSingleton(
new JobSchedule(jobType: typeof(ExceptionSchedule), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:ExceptionSchedule"))
);
//#endregion
//services.AddHostedService<QuartzHostedService>();
services.AddHostedService<QuartzHostedService>();
//#endregion
services.AddApplicationInsightsTelemetry();

View File

@ -1150,7 +1150,7 @@
operationRecordTable.ajax.reload();
}
toast_ok("修改完成");
toast_ok("修改完成");
// 取消鎖定按鈕
$("#save-record-btn").attr('disabled', false);
}

View File

@ -1740,7 +1740,7 @@
operationRecordTable.ajax.reload();
}
toast_ok("修改完成");
toast_ok("修改完成");
// 取消鎖定按鈕
$("#save-record-op-btn").attr('disabled', false);
}