|
@@ -263,8 +263,24 @@ func RefreshDataFromCalculateAll() (err error) {
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
+
|
|
|
+ nowStr := time.Now().AddDate(0, 0, -1).Format(utils.FormatDate)
|
|
|
+
|
|
|
+ startDateOfWeek := utils.GetNowWeekMonday()
|
|
|
+ endDateOfWeek := utils.GetNowWeekLastDay()
|
|
|
+
|
|
|
for _, v := range items {
|
|
|
|
|
|
+ if v.Frequency == "日度" {
|
|
|
+ if v.EndDate.Format(utils.FormatDate) == nowStr {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ } else if v.Frequency == "周度" {
|
|
|
+ if !v.EndDate.Before(startDateOfWeek) && !v.EndDate.After(endDateOfWeek) {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
source := v.Source
|
|
|
startDate := v.StartDate.Format(utils.FormatDate)
|
|
|
if startDate == "0001-01-01" {
|