| | |
| | | String sta = waitPakinPda.getStaNo(); |
| | | String area = waitPakinPda.getArea(); |
| | | if (Cools.isEmpty(sta)) { |
| | | throw new CoolException("接驳位条码不能为空"); |
| | | throw new CoolException("起点不能为空"); |
| | | } |
| | | if (Cools.isEmpty(area)) { |
| | | throw new CoolException("目标库区不能为空"); |
| | | } |
| | | |
| | | DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>() |
| | | .eq(DeviceSite::getSite, sta) |
| | | .eq(DeviceSite::getAreaIdEnd, Long.parseLong(area)) |
| | | .eq(DeviceSite::getType, TaskType.TASK_TYPE_IN.type).last("limit 1")); |
| | | if (Cools.isEmpty(deviceSite)) { |
| | | throw new CoolException("无可用路径!!"); |
| | | } |
| | | |
| | | BasStation basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>() |
| | | .eq(BasStation::getStationName, sta) |
| | | .eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_F.type) |
| | | ); |
| | | if (Cools.isEmpty(basStation)) { |
| | | throw new CoolException("未找到接驳站点信息,请检查站点状态"); |
| | | throw new CoolException("未找到起点站点信息,请检查站点状态"); |
| | | } |
| | | if (Cools.isEmpty(basStation.getBarcode())) { |
| | | throw new CoolException("数据错误,接驳站无条码信息"); |
| | |
| | | throw new CoolException("未找到组托数据,请检查状态"); |
| | | } |
| | | String targetLoc = LocManageUtil.getTargetLoc(Long.parseLong(area)); |
| | | |
| | | DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>() |
| | | .eq(DeviceSite::getSite, sta) |
| | | .eq(DeviceSite::getAreaIdEnd, Long.parseLong(area)) |
| | | .eq(DeviceSite::getType, TaskType.TASK_TYPE_IN.type).last("limit 1")); |
| | | if (Cools.isEmpty(deviceSite)) { |
| | | throw new CoolException("无可用路径!!"); |
| | | } |
| | | |
| | | taskService.generateAGVTasks(waitPakin, targetLoc, sta, deviceSite.getTarget(),loginUserId); |
| | | |