diff --git a/app/hdl/institutional_management/egg_energy/hdl_egg_point.go b/app/hdl/institutional_management/egg_energy/hdl_egg_point.go index 36f673e..018aa06 100644 --- a/app/hdl/institutional_management/egg_energy/hdl_egg_point.go +++ b/app/hdl/institutional_management/egg_energy/hdl_egg_point.go @@ -10,6 +10,7 @@ import ( "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" "code.fnuoos.com/EggPlanet/egg_models.git/src/model" md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/md" + es2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/utils/es" "code.fnuoos.com/go_rely_warehouse/zyos_go_es.git/es" "fmt" "github.com/gin-gonic/gin" @@ -251,7 +252,8 @@ func UserEggFlow(c *gin.Context) { var esIndexName string if req.Year == "" && req.Week == "" { - esIndexName, _ = es.GetLatestIndexFromAlias(md2.EggEnergyUserEggScoreEsAlias) + esIndex := es2.GetLatestEffectiveIndexFromAlias(time.Now()) + esIndexName = md2.EggEnergyUserEggScoreEsAlias + "_" + esIndex resp.Year, resp.Week = egg_energy.GetYearsAndWeekStr(esIndexName) } else { esIndexName = md2.EggEnergyUserEggScoreEsAlias + "_" + req.Year + req.Week