| | |
| | | import org.springframework.boot.context.event.ApplicationReadyEvent; |
| | | import org.springframework.context.event.EventListener; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zy.acs.common.utils.News; |
| | | |
| | | import java.security.MessageDigest; |
| | | import java.security.NoSuchAlgorithmException; |
| | |
| | | stopWatch.start(); |
| | | this.initLaneData(); |
| | | stopWatch.stop(); |
| | | log.info("the rcs system calculated lane data which has spend {} millisecond......", stopWatch.getTime()); |
| | | News.info("the rcs system calculated lane data which has spend {} millisecond......", stopWatch.getTime()); |
| | | |
| | | if (!Cools.isEmpty(this.laneDtoList)) { |
| | | laneService.batchSaveByLaneDtoList(null, this.laneDtoList); |
| | |
| | | } |
| | | |
| | | private void initLaneData() { |
| | | log.info("the rcs system is starting to initialize lane data..."); |
| | | News.info("the rcs system is starting to initialize lane data..."); |
| | | |
| | | List<Code> codeList = codeService.list(new LambdaQueryWrapper<Code>().eq(Code::getStatus, StatusType.ENABLE.val)); |
| | | |
| | |
| | | |
| | | this.generateLaneHash(); |
| | | |
| | | log.info("the lane data initialization has been completed in rcs system."); |
| | | News.info("the lane data initialization has been completed in rcs system."); |
| | | } |
| | | |
| | | private void fillAdjacencyCodeMap(List<Code> codeList) { |
| | |
| | | try { |
| | | md = MessageDigest.getInstance("SHA-256"); |
| | | } catch (NoSuchAlgorithmException e) { |
| | | log.error("generateDigest", e); |
| | | News.error("generateDigest", e); |
| | | throw new RuntimeException(e); |
| | | } |
| | | String combined = list.stream().sorted().collect(Collectors.joining(",")); |
| | |
| | | } |
| | | |
| | | public void generateLaneCodeIdx(Integer lev) { |
| | | log.info("There is initializing Lane CodeIdxMap......"); |
| | | News.info("There is initializing Lane CodeIdxMap......"); |
| | | if (Cools.isEmpty(this.laneDtoList)) { |
| | | return; |
| | | } |