#
luxiaotao1123
2024-11-04 6f5c384b7f838f35e3da4db129a57c76cd54d508
zy-acs-manager/src/main/java/com/zy/acs/manager/core/scheduler/MaintainScheduler.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zy.acs.common.enums.AgvStatusType;
import com.zy.acs.common.utils.RedisSupport;
import com.zy.acs.framework.common.DateUtils;
import com.zy.acs.manager.core.service.MainService;
import com.zy.acs.manager.manager.entity.*;
@@ -24,6 +25,8 @@
@Slf4j
@Component
public class MaintainScheduler {
    private final RedisSupport redis = RedisSupport.defaultRedisSupport;
    @Autowired
    private AgvService agvService;
@@ -122,6 +125,7 @@
                continue;
            }
            // the time between the latest task and now that be must more that 10 seconds
//            if (!Optional.ofNullable((Boolean) redis.getObject(RedisConstant.AGV_TO_STANDBY_FLAG, agv.getUuid())).orElse(false)) {
            Integer intervalOfAutoStandby = configService.getVal("intervalOfAutoStandby", Integer.class);
            if (null != intervalOfAutoStandby && intervalOfAutoStandby > 0) {
                Task latestTask = taskService.findLatestTask(agv.getId(), null);
@@ -130,6 +134,7 @@
                    if (seconds < intervalOfAutoStandby) { continue; }
                }
            }
//            }
            mainService.buildMinorTask(agv, agvDetail, TaskTypeType.TO_STANDBY, null);
        }