zhangqian
2024-04-16 8b6a262a56942a1a5764526f315029f1cd410ede
开始生产去掉时间未到限制
1个文件已修改
6 ■■■■■ 已修改文件
api/v1/task.go 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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{}{}
        }