zy-acs-manager/src/main/java/com/zy/acs/manager/core/scheduler/GuaranteeScheduler.java
@@ -6,6 +6,7 @@ import com.zy.acs.manager.manager.enums.StatusType; import com.zy.acs.manager.manager.service.GuaranteeService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.support.CronExpression; @@ -18,19 +19,15 @@ @Component public class GuaranteeScheduler { private final GuaranteeService guaranteeService; private final GuaranteeRuntimeService guaranteeRuntimeService; @Autowired private GuaranteeService guaranteeService; @Autowired private GuaranteeRuntimeService guaranteeRuntimeService; @Value("${guarantee.scheduler.enabled:true}") private boolean enabled; @Value("${guarantee.scheduler.default-lead-minutes:60}") private int defaultLeadMinutes; public GuaranteeScheduler(GuaranteeService guaranteeService, GuaranteeRuntimeService guaranteeRuntimeService) { this.guaranteeService = guaranteeService; this.guaranteeRuntimeService = guaranteeRuntimeService; } @Scheduled(cron = "0/15 * * * * ?") public void drive() { zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/GuaranteeRuntimeService.java
@@ -25,21 +25,14 @@ @Autowired private SegmentService segmentService; private final AgvService agvService; private final AgvDetailService agvDetailService; private final TaskService taskService; private final MainLockWrapService mainLockWrapService; public GuaranteeRuntimeService(AgvService agvService, AgvDetailService agvDetailService, TaskService taskService, MainLockWrapService mainLockWrapService) { this.agvService = agvService; this.agvDetailService = agvDetailService; this.taskService = taskService; this.mainLockWrapService = mainLockWrapService; } @Autowired private AgvService agvService; @Autowired private AgvDetailService agvDetailService; @Autowired private TaskService taskService; @Autowired private MainLockWrapService mainLockWrapService; public void prepare(Guarantee plan, LocalDateTime targetTime) { int requiredCount = plan.getRequiredCount() == null ? 0 : plan.getRequiredCount();