| | |
| | | import com.vincent.rsf.server.manager.service.impl.DeviceSiteServiceImpl; |
| | | import com.vincent.rsf.server.manager.service.impl.MatnrServiceImpl; |
| | | import com.vincent.rsf.server.manager.utils.LocManageUtil; |
| | | import com.vincent.rsf.server.manager.utils.WarehouseLocationRetrievalUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | 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)) { |
| | | boolean isItAvailable = new WarehouseLocationRetrievalUtil().queryPathIsItAvailableInArea(sta, area, waitPakinPda.getBarcode(), "in"); |
| | | // 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 (!isItAvailable) { |
| | | throw new CoolException("无可用路径!!"); |
| | | } |
| | | |
| | |
| | | } |
| | | String targetLoc = LocManageUtil.getTargetLoc(Long.parseLong(area)); |
| | | |
| | | taskService.generateAGVTasks(waitPakin, targetLoc, sta, deviceSite.getDeviceCode(),loginUserId); |
| | | taskService.generateAGVTasks(waitPakin, targetLoc, sta,loginUserId,area); |
| | | if (!basStation.getType().equals(0)){ |
| | | basStation.setUseStatus(LocStsType.LOC_STS_TYPE_R.type); |
| | | } |