| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.common.model.NavigateNode; |
| | | import com.zy.common.model.enums.NavigationMapType; |
| | | import com.zy.common.utils.NavigatePositionConvert; |
| | |
| | | return list; |
| | | } |
| | | |
| | | //检测楼层是否有穿梭车 |
| | | //检测楼层是否有可用穿梭车 |
| | | public static boolean checkLevHasShuttle(Integer lev) { |
| | | SlaveProperties slaveProperties = SpringUtils.getBean(SlaveProperties.class); |
| | | WrkMastService wrkMastService = SpringUtils.getBean(WrkMastService.class); |
| | | for (ShuttleSlave shuttle : slaveProperties.getShuttle()) { |
| | | //获取四向穿梭车线程 |
| | | ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttle.getId()); |
| | |
| | | continue; |
| | | } |
| | | |
| | | //小车正在充电 |
| | | if (shuttleThread.isCharging()) { |
| | | continue; |
| | | } |
| | | |
| | | //小车有充电任务 |
| | | WrkMast chargeWorking = wrkMastService.selectChargeWorking(shuttleProtocol.getShuttleNo()); |
| | | if (chargeWorking != null) {//已有充电任务 |
| | | continue; |
| | | } |
| | | |
| | | //小车处于故障状态 |
| | | if (shuttleThread.isFault()) { |
| | | continue; |
| | | } |
| | | |
| | | if (lev == Utils.getLev(currentLocNo)) { |
| | | return true;//指定楼层有穿梭车 |
| | | } |