#
luxiaotao1123
2024-11-04 1fd685f39652223583e7f1a7044b8b7d6fb7f799
#
1个文件已修改
14 ■■■■ 已修改文件
zy-acs-manager/src/main/java/com/zy/acs/manager/core/scheduler/MaintainScheduler.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/core/scheduler/MaintainScheduler.java
@@ -81,8 +81,8 @@
    }
//    @Scheduled(cron = "0/30 * * * * ? ")
    @Scheduled(cron = "0 */2 * * * ? ")
    @Scheduled(cron = "0/1 * * * * ? ")
//    @Scheduled(cron = "0 */2 * * * ? ")
    private synchronized void autoStandby(){
        if (!configService.getVal("automaticStandbyPosition", Boolean.class)) { return; }
@@ -121,13 +121,13 @@
            )) {
                continue;
            }
            // the time between the latest task and now that be must more that 20 minutes
            // the time between the latest task and now that be must more that 10 seconds
            Integer intervalOfAutoStandby = configService.getVal("intervalOfAutoStandby", Integer.class);
            if (null != intervalOfAutoStandby && intervalOfAutoStandby > 0) {
                Task latestTask = taskService.findLatestTask(agv.getId(), TaskStsType.COMPLETE);
                if (null != latestTask && !latestTask.getTaskType().equals(TaskTypeType.TO_CHARGE.val())) {
                    long minutes = DateUtils.diffToMinute(latestTask.getUpdateTime(), new Date());
                    if (minutes < intervalOfAutoStandby) { continue; }
                Task latestTask = taskService.findLatestTask(agv.getId(), null);
                if (null != latestTask) {
                    long seconds = DateUtils.diffToSeconds(latestTask.getUpdateTime(), new Date());
                    if (seconds < intervalOfAutoStandby) { continue; }
                }
            }