From 04b3d7cb57ddb724f125eee79d7a83737b6a715d Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Tue, 8 Apr 2025 20:36:53 +0800 Subject: [PATCH] salary --- conf/corp/1000.json | 1 - conf/corp/1002.json | 1 - worker/worker.go | 6 +++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/conf/corp/1000.json b/conf/corp/1000.json index f7dca96..b47f838 100644 --- a/conf/corp/1000.json +++ b/conf/corp/1000.json @@ -1,5 +1,4 @@ { - "salary_latest": 15, "staff_config": [ { "name": "员工角色", diff --git a/conf/corp/1002.json b/conf/corp/1002.json index 55111a8..86418c1 100644 --- a/conf/corp/1002.json +++ b/conf/corp/1002.json @@ -1,5 +1,4 @@ { - "salary_latest": 14, "staff_config": [ { "name": "员工角色", diff --git a/worker/worker.go b/worker/worker.go index 833e041..e36a5d7 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -46,7 +46,7 @@ func InitCorp1002(cron *gocron.Scheduler) { }) // 1号计算工资信息 - cron.Every(1).Month(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).At("06:00").Do(func() { + cron.Every(1).Month(1).At("06:00").Do(func() { go staff.SyncStaffSalary(corpId, "") }) @@ -87,12 +87,12 @@ func InitCorp1000(cron *gocron.Scheduler) { }) // 1号计算工资信息 - cron.Every(1).Month(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).At("06:00").Do(func() { + cron.Every(1).Month(1).At("06:00").Do(func() { go NewStaff().SyncStaffSalary(corpId, "") }) //10号晚上8点发送工资单 - cron.Every(1).Month(8).At("12:30").Do(func() { + cron.Every(1).Month(10).At("20:00").Do(func() { NewStaff().PayStaffSalary(corpId, time.Now().AddDate(0, -1, 0).Format("200601")) NewStaff().SendStaffSalaryBill(corpId, time.Now().AddDate(0, -1, 0).Format("200601")) })