| | |
| | | import com.zy.acs.manager.manager.service.RouteService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.event.EventListener; |
| | | import org.springframework.boot.context.event.ApplicationReadyEvent; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | |
| | | turnMatrix[i][j] = TurnNodeType.STRAIGHT.val; |
| | | break; |
| | | case 2: |
| | | String firstCode = neighborCodeList.get(0); assert !Cools.isEmpty(firstCode); |
| | | String secondCode = neighborCodeList.get(1); assert !Cools.isEmpty(secondCode); |
| | | String firstCode = neighborCodeList.get(0); |
| | | assert !Cools.isEmpty(firstCode); |
| | | String secondCode = neighborCodeList.get(1); |
| | | assert !Cools.isEmpty(secondCode); |
| | | |
| | | int[] firstIdx = this.getCodeMatrixIdx(lev, firstCode); |
| | | int[] secondIdx = this.getCodeMatrixIdx(lev, secondCode); |
| | | |
| | | if (firstIdx == null) { |
| | | throw new CoolException("不存在点位:" + firstCode); |
| | | } |
| | | if (secondIdx == null) { |
| | | throw new CoolException("不存在点位:" + secondCode); |
| | | } |
| | | |
| | | if (firstIdx[0] != secondIdx[0] && firstIdx[1] != secondIdx[1]) { |
| | | turnMatrix[i][j] = TurnNodeType.TURN.val; |
| | |
| | | |
| | | return turnMatrix; |
| | | } |
| | | |
| | | |
| | | |
| | | public synchronized int[][] initMapMatrix(Integer lev) { |
| | | log.info("There is initializing Map Matrix......"); |
| | |
| | | for (Code code : codeList) { |
| | | Double x = code.getX(); |
| | | Double y = code.getY(); |
| | | if (null == x || null == y) { continue; } |
| | | if (null == x || null == y) { |
| | | continue; |
| | | } |
| | | if (!xIdxList.contains(x)) { |
| | | xIdxList.add(x); |
| | | } |