From 8b6a262a56942a1a5764526f315029f1cd410ede Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 16 四月 2024 11:31:09 +0800 Subject: [PATCH] 开始生产去掉时间未到限制 --- api/v1/task.go | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/v1/task.go b/api/v1/task.go index 53a2bce..6e3c295 100644 --- a/api/v1/task.go +++ b/api/v1/task.go @@ -105,13 +105,12 @@ return taskResponse.Tasks[i].Channel < taskResponse.Tasks[i].Channel }) - nowTs := time.Now().Unix() flagMap := make(map[int32]struct{}, 0) for _, task := range taskResponse.Tasks { if task.Procedure.Status != model.ProcedureStatusWaitProcess { continue } - if _, ok := flagMap[task.Channel]; !ok && !service.TaskFlagGet(conf.Conf.CurrentDeviceID, task.Channel) && task.Procedure.StartTime <= nowTs { + if _, ok := flagMap[task.Channel]; !ok && !service.TaskFlagGet(conf.Conf.CurrentDeviceID, task.Channel) { task.CanStarted = true flagMap[task.Channel] = struct{}{} } @@ -510,10 +509,9 @@ return } - nowTs := time.Now().Unix() flagMap := make(map[int32]struct{}, 0) for _, task := range taskResponse.Tasks { - if _, ok := flagMap[task.Channel]; !ok && !service.TaskFlagGet(conf.Conf.CurrentDeviceID, task.Channel) && task.Procedure.StartTime <= nowTs { + if _, ok := flagMap[task.Channel]; !ok && !service.TaskFlagGet(conf.Conf.CurrentDeviceID, task.Channel) { task.CanStarted = true flagMap[task.Channel] = struct{}{} } -- Gitblit v1.8.0