| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.time.StopWatch; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.*; |
| | |
| | | @Component("mapService") |
| | | public class MapService { |
| | | |
| | | @Value("${floyd.enable}") |
| | | private Boolean floydEnable; |
| | | @Autowired |
| | | private CodeService codeService; |
| | | @Autowired |
| | |
| | | * 寻址 ===>> Floyd |
| | | */ |
| | | public synchronized List<String> validFeasibility(Code startCode, Code endCode) { |
| | | if (!floydEnable) { |
| | | return Arrays.asList("00000001", "00000002", "00000003", "00000004", "00000005", "00000006"); |
| | | } |
| | | |
| | | int startIdx = floydNavigateService.codeIdx(startCode.getId()); |
| | | int endIdx = floydNavigateService.codeIdx(endCode.getId()); |