From d0454f5c505181ee4f8fa1468eca458c5102ab12 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 25 十月 2024 13:57:30 +0800
Subject: [PATCH] #

---
 zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/LaneService.java |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/LaneService.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/LaneService.java
index 3b6c06d..cffcd15 100644
--- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/LaneService.java
+++ b/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) {

--
Gitblit v1.9.1