|
@@ -56,6 +56,7 @@ func EggEnergyAutomaticScoring(engine *xorm.Engine) { |
|
|
yearString := utils.IntToStr(year) |
|
|
yearString := utils.IntToStr(year) |
|
|
weekString := utils.IntToStr(week) |
|
|
weekString := utils.IntToStr(week) |
|
|
LastWeekIndex := es.GetAppointIndexFromAlias(yearString, weekString) |
|
|
LastWeekIndex := es.GetAppointIndexFromAlias(yearString, weekString) |
|
|
|
|
|
|
|
|
// 1. 获取上周未被打分的文档 |
|
|
// 1. 获取上周未被打分的文档 |
|
|
page := 1 |
|
|
page := 1 |
|
|
limit := 100 |
|
|
limit := 100 |
|
@@ -111,6 +112,15 @@ func EggEnergyAutomaticScoring(engine *xorm.Engine) { |
|
|
page++ |
|
|
page++ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
nextWeekTime := now.AddDate(0, 0, 7) |
|
|
|
|
|
nextYear, nextWeek := nextWeekTime.ISOWeek() |
|
|
|
|
|
nextYearString := utils.IntToStr(nextYear) |
|
|
|
|
|
nextWeekString := utils.IntToStr(nextWeek) |
|
|
|
|
|
nextWeekIndex := es.GetAppointIndexFromAlias(nextYearString, nextWeekString) |
|
|
|
|
|
err = es2.CreateIndexIfNotExists(nextWeekIndex, md.EggEnergyUserEggScoreEsMapping) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
fmt.Println("EggEnergyAutomaticScoringCreateIndex_ERR_FailedToCreateNextWeekIndex:::::", err.Error()) |
|
|
|
|
|
} |
|
|
fmt.Println("------------------EggEnergyAutomaticScoring_end:finish automatic scoring------------------") |
|
|
fmt.Println("------------------EggEnergyAutomaticScoring_end:finish automatic scoring------------------") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |