|  |  |  | 
|---|
|  |  |  | import com.zy.asrs.service.impl.MainServiceImpl; | 
|---|
|  |  |  | import com.zy.common.model.NavigateNode; | 
|---|
|  |  |  | import com.zy.common.model.enums.NavigationMapType; | 
|---|
|  |  |  | import com.zy.common.service.CommonService; | 
|---|
|  |  |  | import com.zy.common.utils.NavigateMapData; | 
|---|
|  |  |  | import com.zy.common.utils.NavigatePositionConvert; | 
|---|
|  |  |  | import com.zy.common.utils.NavigateUtils; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //检测穿梭车行走路径,是否存在其他小车,如有其他小车则进行调离 | 
|---|
|  |  |  | public static boolean checkShuttlePath(List<NavigateNode> nodes, Integer shuttleId) { | 
|---|
|  |  |  | boolean flag = false; | 
|---|
|  |  |  | boolean flag = false; | 
|---|
|  |  |  | int shuttleX = -1; | 
|---|
|  |  |  | int shuttleY = -1; | 
|---|
|  |  |  | int shuttleZ = -1; | 
|---|
|  |  |  | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ShuttleProtocol shuttleProtocol = currentShuttleThread.getShuttleProtocol(); | 
|---|
|  |  |  | if (!shuttleProtocol.isIdle()) { | 
|---|
|  |  |  | return false;//被调度的小车处于工作状态,禁止触发避让任务 | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //搜索一条没有小车的空巷道,并调度小车 | 
|---|
|  |  |  | ShuttleAssignCommand assignCommand = Utils.searchEmptyGroupToMoveShuttle(shuttleZ, shuttleId, currentShuttleThread, null);//shuttleId搜索时需要排除的车辆id,currentShuttleThread是需要被调度的车辆线程 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | public static ShuttleAssignCommand searchEmptyGroupToMoveShuttle(int z, Integer currentShuttleId, ShuttleThread shuttleThread, String startLocNo) { | 
|---|
|  |  |  | LocMastService locMastService = SpringUtils.getBean(LocMastService.class); | 
|---|
|  |  |  | MainServiceImpl mainServiceImpl = SpringUtils.getBean(MainServiceImpl.class); | 
|---|
|  |  |  | CommonService commonService = SpringUtils.getBean(CommonService.class); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (shuttleThread == null) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | 
|---|
|  |  |  | //创建分配命令 | 
|---|
|  |  |  | ShuttleAssignCommand assignCommand = new ShuttleAssignCommand(); | 
|---|
|  |  |  | assignCommand.setShuttleNo(shuttleProtocol.getShuttleNo());//四向穿梭车号 | 
|---|
|  |  |  | assignCommand.setTaskNo((short) 9998);//任务号 | 
|---|
|  |  |  | assignCommand.setTaskMode(ShuttleTaskModeType.MOVE_LOC_NO.id.shortValue());//移动到目标库位 | 
|---|
|  |  |  | assignCommand.setTaskNo((short) commonService.getWorkNo(7));//任务号 | 
|---|
|  |  |  | assignCommand.setTaskMode(ShuttleTaskModeType.AVOID.id.shortValue());//避让任务 | 
|---|
|  |  |  | assignCommand.setSourceLocNo(startLocNo);//源库位 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //分配目标库位 | 
|---|