|  |  | 
 |  |  |  | 
 |  |  | import com.alibaba.fastjson.JSON; | 
 |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
 |  |  | import com.zy.acs.framework.common.Cools; | 
 |  |  | import com.zy.acs.framework.exception.CoolException; | 
 |  |  | import com.zy.acs.common.constant.RedisConstant; | 
 |  |  | import com.zy.acs.common.utils.RedisSupport; | 
 |  |  | import com.zy.acs.framework.common.Cools; | 
 |  |  | import com.zy.acs.framework.exception.CoolException; | 
 |  |  | import com.zy.acs.manager.core.domain.SortCodeDto; | 
 |  |  | import com.zy.acs.manager.core.service.astart.domain.DynamicNode; | 
 |  |  | import com.zy.acs.manager.manager.entity.Code; | 
 |  |  | import com.zy.acs.manager.manager.service.CodeService; | 
 |  |  | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  |  | 
 |  |  | import java.util.ArrayList; | 
 |  |  | import java.util.Comparator; | 
 |  |  | import java.util.List; | 
 |  |  | import java.util.Optional; | 
 |  |  | import java.util.stream.Collectors; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * Created by vincent on 6/6/2024 | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public List<String> queryCodeListFromDynamicNode(Integer lev, String nodeType) { | 
 |  |  |         List<String> nodes = new ArrayList<>(); | 
 |  |  |         if (Cools.isEmpty(nodeType)) { | 
 |  |  |             return nodes; | 
 |  |  |             return new ArrayList<>(); | 
 |  |  |         } | 
 |  |  |         lev = Optional.ofNullable(lev).orElse(MAP_DEFAULT_LEV); | 
 |  |  |  | 
 |  |  |         List<SortCodeDto> codeList = new ArrayList<>(); | 
 |  |  |         DynamicNode[][] dynamicMatrix = getDynamicMatrix(lev); | 
 |  |  |         String[][] codeMatrix = this.getCodeMatrix(lev); | 
 |  |  |         for (int i = 0; i < codeMatrix.length; i++) { | 
 |  |  |             for (int j = 0; j < codeMatrix[i].length; j++) { | 
 |  |  |                 if (nodeType.equals(dynamicMatrix[i][j].getVehicle())) { | 
 |  |  |                     nodes.add(codeMatrix[i][j]); | 
 |  |  |                 DynamicNode dynamicNode = dynamicMatrix[i][j]; | 
 |  |  |                 if (nodeType.equals(dynamicNode.getVehicle())) { | 
 |  |  |                     codeList.add(new SortCodeDto(codeMatrix[i][j], dynamicNode.getSerial())); | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         return nodes; | 
 |  |  |         codeList.sort(Comparator.comparingInt(SortCodeDto::getSerial)); | 
 |  |  |         return codeList.stream().map(SortCodeDto::getCode).collect(Collectors.toList()); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void modifyDynamicMatrix(Integer lev, List<String> codeList, String vehicle) { |