#
vincentlu
2025-12-25 afb0ea87636819b4c668928a0e7b2648bb266255
#
1个文件已添加
1个文件已修改
32 ■■■■■ 已修改文件
zy-acs-manager/src/main/java/com/zy/acs/manager/core/scheduler/KernelScheduler.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/TransferStationHandler.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/core/scheduler/KernelScheduler.java
@@ -5,6 +5,7 @@
import com.zy.acs.manager.core.service.MainLockWrapService;
import com.zy.acs.manager.core.service.MainService;
import com.zy.acs.manager.core.service.TrafficService;
import com.zy.acs.manager.core.service.TransferStationHandler;
import com.zy.acs.manager.manager.entity.Bus;
import com.zy.acs.manager.manager.entity.Segment;
import com.zy.acs.manager.manager.entity.Task;
@@ -68,6 +69,8 @@
    private LocService locService;
    @Autowired
    private AgvModelService agvModelService;
    @Autowired
    private TransferStationHandler transferStationHandler;
    @Scheduled(cron = "0/1 * * * * ? ")
    private void startupBus() throws InterruptedException {
@@ -116,8 +119,10 @@
                            .eq(Segment::getState, SegmentStateType.WAITING.toString())
                    );
                    for (Segment segment : segments) {
                        long startTime = System.currentTimeMillis();
                        trafficService.trigger(segment);
//                        long startTime = System.currentTimeMillis();
                        if (!transferStationHandler.isSegDelayAtSta(segment)) {
                            trafficService.trigger(segment);
                        }
//                        log.info("traffic calculation spend {} ms", System.currentTimeMillis() - startTime);
                    }
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/TransferStationHandler.java
New file
@@ -0,0 +1,23 @@
package com.zy.acs.manager.core.service;
import com.zy.acs.manager.manager.entity.Segment;
import com.zy.acs.manager.manager.service.SegmentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class TransferStationHandler {
    @Autowired
    private SegmentService segmentService;
    public boolean isSegDelayAtSta(Segment segment) {
        return false;
    }
}