| | |
| | | import com.vincent.rsf.server.manager.enums.*; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.vincent.rsf.server.manager.utils.LocManageUtil; |
| | | import com.vincent.rsf.server.manager.utils.WarehouseLocationRetrievalUtil; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | | import com.vincent.rsf.server.system.utils.SerialRuleUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | // throw new CoolException("未找到所属库区信息"); |
| | | } |
| | | |
| | | DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>() |
| | | .eq(DeviceSite::getSite, station.getStationName()) |
| | | .eq(DeviceSite::getAreaIdEnd, warehouseArea.getId()) |
| | | .eq(DeviceSite::getType, TaskType.TASK_TYPE_EMPTY_IN.type).last("limit 1")); |
| | | if (Cools.isEmpty(deviceSite)) { |
| | | boolean isItAvailable = new WarehouseLocationRetrievalUtil().queryPathIsItAvailableInArea(station.getStationName(), warehouseArea.getId(), param.getContainerNo(), TaskType.TASK_TYPE_EMPTY_IN.type); |
| | | // DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>() |
| | | // .eq(DeviceSite::getSite, ) |
| | | // .eq(DeviceSite::getAreaIdEnd,) |
| | | // .eq(DeviceSite::getType, TaskType.TASK_TYPE_EMPTY_IN.type).last("limit 1")); |
| | | // if (Cools.isEmpty(deviceSite)) { |
| | | // errorBuilder.append("无可用路径"); |
| | | // continue; |
| | | // throw new CoolException("无可用路径!!"); |
| | | // } |
| | | if (!isItAvailable){ |
| | | errorBuilder.append("无可用路径"); |
| | | continue; |
| | | // throw new CoolException("无可用路径!!"); |
| | | |
| | | } |
| | | |
| | | // BasContainer container = basContainerService.getOne(new LambdaUpdateWrapper<BasContainer>() |
| | |
| | | if (StringUtils.isBlank(ruleCode)) { |
| | | throw new CoolException("编码错误:请确认编码「SYS_TASK_CODE」是否已生成!!"); |
| | | } |
| | | String stationName = null; |
| | | if (Cools.isEmpty(deviceSite.getDeviceCode())) { |
| | | stationName = station.getStationName(); |
| | | } else { |
| | | BasStation stationCode = basStationService.getById(deviceSite.getDeviceCode()); |
| | | stationName = stationCode.getStationName(); |
| | | if (Cools.isEmpty(stationCode)) { |
| | | stationName = station.getStationName(); |
| | | } |
| | | } |
| | | String stationName = station.getStationName(); |
| | | Task task = new Task(); |
| | | task.setTaskCode(ruleCode) |
| | | .setTaskStatus(TaskStsType.MISSION_INITIAL.id) |