| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasShuttle; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.service.BasShuttleService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.model.NavigateNode; |
| | |
| | | private NavigateUtils navigateUtils; |
| | | @Autowired |
| | | private ConfigService configService; |
| | | @Autowired |
| | | private BasShuttleService basShuttleService; |
| | | |
| | | /** |
| | | * 调度车辆-调度指定穿梭车 |
| | |
| | | * 调度车辆 |
| | | */ |
| | | public boolean dispatchShuttle(Integer wrkNo, String locNo) { |
| | | //检测目标库位组是否存在小车,如存在小车则直接指定该车 |
| | | WrkMast wrkMast = wrkMastService.selectByWorkNo(wrkNo); |
| | | if (wrkMast != null) { |
| | | String targetLocNo = wrkMast.getIoType() < 100 ? wrkMast.getLocNo() : wrkMast.getSourceLocNo(); |
| | | List<String> groupLoc = Utils.getGroupLoc(targetLocNo); |
| | | Integer groupShuttleNo = Utils.checkGroupLocHasShuttle(groupLoc); |
| | | if (groupShuttleNo != null) { |
| | | //存在小车,直接调度该车 |
| | | return shuttleMoveGenerate(wrkNo, locNo, groupShuttleNo); |
| | | } |
| | | } |
| | | |
| | | ArrayList<ShuttleThread> sameLev = new ArrayList<>();//相同楼层的穿梭车 |
| | | ArrayList<ShuttleThread> diffLev = new ArrayList<>();//不同楼层的穿梭车 |
| | | |
| | |
| | | continue;//小车忙碌中 |
| | | } |
| | | |
| | | BasShuttle basShuttle = basShuttleService.selectOne(new EntityWrapper<BasShuttle>().eq("shuttle_no", shuttle.getId())); |
| | | if (basShuttle != null) { |
| | | if (basShuttle.getStatus() == 0) { |
| | | continue;//小车被禁用 |
| | | } |
| | | } |
| | | |
| | | int currentLev = Utils.getLev(shuttleProtocol.getCurrentLocNo());//小车当前层高 |
| | | String currentLocNo = shuttleProtocol.getCurrentLocNo();//小车当前库位号 |
| | | |