作者 郑周

1. 优化时间计算

... ... @@ -191,7 +191,7 @@ func (rs *EvaluationProjectService) UpdateTemplate(in *command.UpdateProjectTemp
endLocal := task.TimeEnd.Local()
// 在当前时间之前,则计算下一个周期时间
if startLocal.Before(now) {
if startLocal.Before(nowO) {
nextTime := utils.NextTime(nowO, startLocal, task.KpiCycle)
task.NextSentAt = &nextTime
} else {
... ... @@ -486,7 +486,7 @@ func (rs *EvaluationProjectService) Activate(in *command.ActivateProjectCommand)
endLocal := task.TimeEnd.Local()
// 在当前时间之前,则计算下一个周期时间
if startLocal.Before(now) {
if startLocal.Before(nowO) {
nextTime := utils.NextTime(nowO, startLocal, node.KpiCycle)
task.NextSentAt = &nextTime
} else {
... ...