Commit 437dc5aa authored by liudong1993's avatar liudong1993

定时器调整

parent a3ebadf6
...@@ -120,6 +120,7 @@ namespace Edu.Education.Helper ...@@ -120,6 +120,7 @@ namespace Edu.Education.Helper
/// <returns></returns> /// <returns></returns>
public async Task RevenueReportTimer() public async Task RevenueReportTimer()
{ {
string CronExpression2 = "0 10 8,12,18,22 * * ?";//每天8,12,19,22点触发
NameValueCollection props = new NameValueCollection NameValueCollection props = new NameValueCollection
{ {
{ "quartz.serializer.type", "binary" } { "quartz.serializer.type", "binary" }
...@@ -131,12 +132,16 @@ namespace Edu.Education.Helper ...@@ -131,12 +132,16 @@ namespace Edu.Education.Helper
IJobDetail job = JobBuilder.Create<CreateRevenueReport>() IJobDetail job = JobBuilder.Create<CreateRevenueReport>()
.WithIdentity("job4", "group4") .WithIdentity("job4", "group4")
.Build(); .Build();
ITrigger trigger = TriggerBuilder.Create() //ITrigger trigger = TriggerBuilder.Create()
// .WithIdentity("trigger4", "group4")
// .StartNow()
// .WithSimpleSchedule(x => x
// .WithIntervalInHours(1)
// .RepeatForever())
// .Build();
ICronTrigger trigger = (ICronTrigger)TriggerBuilder.Create()
.WithIdentity("trigger4", "group4") .WithIdentity("trigger4", "group4")
.StartNow() .WithCronSchedule(CronExpression2)
.WithSimpleSchedule(x => x
.WithIntervalInHours(1)
.RepeatForever())
.Build(); .Build();
await scheduler.ScheduleJob(job, trigger); await scheduler.ScheduleJob(job, trigger);
......
{ {
"ConnectionStrings": { "ConnectionStrings": {
"DefaultConnection": "server=192.168.1.214;user id=reborn;password=Reborn@2018;database=reborn_edu;CharSet=utf8mb4; Convert Zero Datetime=true; ", //"DefaultConnection": "server=192.168.1.214;user id=reborn;password=Reborn@2018;database=reborn_edu;CharSet=utf8mb4; Convert Zero Datetime=true; ",
//"DefaultConnectionPName": "MySql.Data.MySqlClient",
//"FinanceConnection": "server=192.168.1.214;user id=reborn;password=Reborn@2018;database=test_reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; ",
//"FinanceConnectionPName": "MySql.Data.MySqlClient",
//"DataStatisticsConnection": "server=192.168.1.214;user id=reborn;password=Reborn@2018;database=reborn_datastatistics;CharSet=utf8mb4; Convert Zero Datetime=true; ",
//"DataStatisticsConnectionPName": "MySql.Data.MySqlClient",
"DefaultConnection": "server=rm-bp1tj77h6kp0d02fb.mysql.rds.aliyuncs.com;user id=reborn;password=Reborn@2018;database=uat_reborn_edu;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"DefaultConnectionPName": "MySql.Data.MySqlClient", "DefaultConnectionPName": "MySql.Data.MySqlClient",
"FinanceConnection": "server=192.168.1.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; ", "FinanceConnection": "server=rm-bp1tj77h6kp0d02fb.mysql.rds.aliyuncs.com;user id=reborn;password=Reborn@2018;database=uat_reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"FinanceConnectionPName": "MySql.Data.MySqlClient" "FinanceConnectionPName": "MySql.Data.MySqlClient",
"DataStatisticsConnection": "server=rm-bp1tj77h6kp0d02fb.mysql.rds.aliyuncs.com;user id=reborn;password=Reborn@2018;database=uat_reborn_datastatistics;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"DataStatisticsConnectionPName": "MySql.Data.MySqlClient"
}, },
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
......
...@@ -325,6 +325,7 @@ namespace Edu.Module.Finance ...@@ -325,6 +325,7 @@ namespace Edu.Module.Finance
demodel = new RB_Edu_RevenueReport_Extend() demodel = new RB_Edu_RevenueReport_Extend()
{ {
Id = 0, Id = 0,
ClassId = item.ClassId,
Rb_Group_Id = GroupId, Rb_Group_Id = GroupId,
SchoolId = item.School_Id, SchoolId = item.School_Id,
SchoolName = item.SchoolName, SchoolName = item.SchoolName,
......
...@@ -67,7 +67,7 @@ namespace Edu.WebApi.Controllers.Finance ...@@ -67,7 +67,7 @@ namespace Edu.WebApi.Controllers.Finance
//利润 //利润
decimal ProfitActual = 0;//实际利润 decimal ProfitActual = 0;//实际利润
decimal ProfitNow = 0;//当前利润 decimal ProfitNow = 0;//当前利润
ProfitActual = (IncomeReceive + OtherIncomeReceive) - PayReceive; ProfitActual = (IncomeActual + OtherIncomeActual) - PayReceive;
ProfitNow = (IncomeActual + OtherIncomeActual) - PayActual; ProfitNow = (IncomeActual + OtherIncomeActual) - PayActual;
//提成 //提成
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment