|  |  | 
 |  |  | 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.boot.context.event.ApplicationReadyEvent; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  |  | 
 |  |  | import java.util.*; | 
 |  |  |  | 
 |  |  | 
 |  |  |  * Created by vincent on 6/6/2024 | 
 |  |  |  */ | 
 |  |  | @Slf4j | 
 |  |  | @Service | 
 |  |  | public class MapDataDispatcher { | 
 |  |  |  | 
 |  |  |     public static final Integer MAP_DEFAULT_LEV = 1; | 
 |  |  | 
 |  |  |  | 
 |  |  |     public Map<String, Boolean> routeCdaMap = new HashMap<>(); | 
 |  |  |  | 
 |  |  |     private final CodeService codeService; | 
 |  |  |     @Autowired | 
 |  |  |     private CodeService codeService; | 
 |  |  |  | 
 |  |  |     private final RouteService routeService; | 
 |  |  |     @Autowired | 
 |  |  |     private RouteService routeService; | 
 |  |  |  | 
 |  |  |     public MapDataDispatcher(CodeService codeService, RouteService routeService) { | 
 |  |  |         this.codeService = codeService; | 
 |  |  |         this.routeService = routeService; | 
 |  |  |     @EventListener(ApplicationReadyEvent.class) | 
 |  |  |     public void init() { | 
 |  |  |         String[][] codeMatrix = this.getCodeMatrix(null); | 
 |  |  |         this.initRouteMap(null); | 
 |  |  |         if (codeMatrix.length > 0) { | 
 |  |  |             this.getMapMatrix(null, null); | 
 |  |  |             this.getTurnMatrix(null); | 
 |  |  |             this.getCdaMatrix(null); | 
 |  |  |             this.getDynamicMatrix(null); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public String[][] getWaveMatrix(Integer lev) { |