|
@@ -1,6 +1,7 @@
|
|
|
package services
|
|
|
|
|
|
import (
|
|
|
+ "context"
|
|
|
"fmt"
|
|
|
"hongze/hongze_task/models/data_manage"
|
|
|
"hongze/hongze_task/services/alarm_msg"
|
|
@@ -11,7 +12,7 @@ import (
|
|
|
"time"
|
|
|
)
|
|
|
|
|
|
-func CygxResearchSummary() (err error) {
|
|
|
+func CygxResearchSummary(cont context.Context) (err error) {
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
go alarm_msg.SendAlarmMsg("CygxResearchSummary-定时本周生成研究汇总失败, ErrMsg:\n"+err.Error(), 3)
|
|
@@ -19,8 +20,8 @@ func CygxResearchSummary() (err error) {
|
|
|
}
|
|
|
}()
|
|
|
//content := "本周研究汇总"
|
|
|
- friday := utils.GetNowWeekFriday().Add(15 * time.Hour)
|
|
|
- lastfriday := utils.GetLastWeekFriday().Add(15 * time.Hour)
|
|
|
+ friday := utils.GetNowWeekThursday().Add(9 * time.Hour)
|
|
|
+ lastfriday := utils.GetLastWeekThursday().Add(9 * time.Hour)
|
|
|
lastMonth := int(lastfriday.Month())
|
|
|
month := int(friday.Month())
|
|
|
lastDay := lastfriday.Day()
|
|
@@ -487,15 +488,15 @@ func CygxResearchSummary() (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-func CygxLastWeekSummary() (err error) {
|
|
|
+func CygxLastWeekSummary(cont context.Context) (err error) {
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
go alarm_msg.SendAlarmMsg("CygxLastWeekSummary-定时生成上周纪要汇总失败, ErrMsg:\n"+err.Error(), 3)
|
|
|
fmt.Println(err)
|
|
|
}
|
|
|
}()
|
|
|
- tuesday := utils.GetNowWeekTuesday().Add(8 * time.Hour)
|
|
|
- lastTuesday := utils.GetLastWeekTuesday().Add(8 * time.Hour)
|
|
|
+ tuesday := utils.GetNowWeekThursday().Add(8 * time.Hour)
|
|
|
+ lastTuesday := utils.GetLastWeekThursday().Add(8 * time.Hour)
|
|
|
lastMonth := int(lastTuesday.Month())
|
|
|
month := int(tuesday.Month())
|
|
|
lastDay := lastTuesday.Day()
|