#
luxiaotao1123
2024-10-25 d0454f5c505181ee4f8fa1468eca458c5102ab12
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/LaneService.java
@@ -7,6 +7,7 @@
import com.zy.acs.manager.manager.entity.Code;
import com.zy.acs.manager.manager.service.CodeService;
import com.zy.acs.manager.manager.service.RouteService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -17,10 +18,11 @@
/**
 * Created by vincent on 10/25/2024
 */
@Slf4j
@Service
public class LaneService {
    public boolean isInitialized = Boolean.FALSE;
    private boolean initialized = Boolean.FALSE;
    private final List<Lane> lanes = new ArrayList<>();
@@ -33,8 +35,12 @@
    @Autowired
    private SnowflakeIdWorker snowflakeIdWorker;
    public Boolean isInitialized() {
        return this.initialized;
    }
    public List<String> getLanePoints(String codeData) {
        if (Cools.isEmpty(codeData) || !this.isInitialized) {
        if (Cools.isEmpty(codeData) || !this.initialized) {
            return null;
        }
        for (Lane lane : this.lanes) {
@@ -47,6 +53,7 @@
    @PostConstruct
    public synchronized void init() {
        log.info("the rcs system is starting to initialze lane data...");
        List<Code> codeList = codeService.list(new LambdaQueryWrapper<Code>().eq(Code::getStatus, 1));
        this.fillAdjacencyCodeMap(codeList);
@@ -59,7 +66,8 @@
        this.filterLanesWithFewPoints();
        this.isInitialized = Boolean.TRUE;
        this.initialized = Boolean.TRUE;
        log.info("the lane data initialzation has been completed in rcs system.");
    }
    private void fillAdjacencyCodeMap(List<Code> codeList) {