|  |  | 
 |  |  | package com.zy.common.utils; | 
 |  |  |  | 
 |  |  | import com.baomidou.mybatisplus.mapper.EntityWrapper; | 
 |  |  | import com.core.common.SpringUtils; | 
 |  |  | import com.zy.asrs.entity.BasDevp; | 
 |  |  | import com.zy.asrs.entity.LocMast; | 
 |  |  | import com.zy.asrs.service.BasDevpService; | 
 |  |  | import com.zy.asrs.service.LocMastService; | 
 |  |  | import com.zy.asrs.utils.Utils; | 
 |  |  | import com.zy.common.model.NavigateNode; | 
 |  |  | 
 |  |  |  */ | 
 |  |  | public class NavigatePositionConvert { | 
 |  |  |  | 
 |  |  |     public static String xyToPosition(int x, int y, int z) { | 
 |  |  |         String locNo = Utils.getLocNo(x, y, z); | 
 |  |  |  | 
 |  |  |         //库位号转小车二维码 | 
 |  |  |         LocMastService locMastService = SpringUtils.getBean(LocMastService.class); | 
 |  |  |         LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() | 
 |  |  |                 .eq("loc_no", locNo) | 
 |  |  |                 .eq("status", 1)); | 
 |  |  |         if (locMast == null) { | 
 |  |  |             return null; | 
 |  |  |         } | 
 |  |  |         return locMast.getQrCodeValue(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     //小车条形码转路径算法节点 | 
 |  |  |     public static NavigateNode codeToNode(String code) { | 
 |  |  |         LocMastService locMastService = SpringUtils.getBean(LocMastService.class); | 
 |  |  |         LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() | 
 |  |  |                 .eq("qr_code_value", code) | 
 |  |  |                 .eq("status", 1)); | 
 |  |  |         if (locMast == null) { | 
 |  |  |             return null; | 
 |  |  |         } | 
 |  |  |         NavigateNode node = new NavigateNode(locMast.getRow1(), locMast.getBay1()); | 
 |  |  |         node.setZ(locMast.getLev1()); | 
 |  |  |         return node; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     //坐标编号转xy轴 | 
 |  |  |     public static int[] positionToXY(String position) { | 
 |  |  |         int col = Integer.parseInt(position.substring(0, 2)); |