...
|
...
|
@@ -176,7 +176,8 @@ func (rs *EvaluationProjectService) UpdateTemplate(in *command.UpdateProjectTemp |
|
|
}
|
|
|
|
|
|
now := time.Now().Local()
|
|
|
nowO := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.Local) // 当前时间0点0分0秒时刻
|
|
|
year, month, day := now.Date()
|
|
|
nowO := time.Date(year, month, day, 0, 0, 0, 0, time.Local) // 当前时间0点0分0秒时刻
|
|
|
|
|
|
for i := range tasks {
|
|
|
task := tasks[i]
|
...
|
...
|
@@ -191,7 +192,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 {
|
...
|
...
|
@@ -460,7 +461,8 @@ func (rs *EvaluationProjectService) Activate(in *command.ActivateProjectCommand) |
|
|
}
|
|
|
|
|
|
now := time.Now().Local()
|
|
|
nowO := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.Local) // 当前时间0点0分0秒时刻
|
|
|
year, month, day := now.Date()
|
|
|
nowO := time.Date(year, month, day, 0, 0, 0, 0, time.Local) // 当前时间0点0分0秒时刻
|
|
|
|
|
|
for i := range project.Template.LinkNodes {
|
|
|
node := project.Template.LinkNodes[i]
|
...
|
...
|
@@ -486,7 +488,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 {
|
...
|
...
|
|