| | |
| | | import com.vincent.rsf.server.manager.enums.TaskStsType; |
| | | import com.vincent.rsf.server.manager.enums.TaskType; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.vincent.rsf.server.manager.utils.WarehouseLocationRetrievalUtil; |
| | | import com.vincent.rsf.server.system.constant.GlobalConfigCode; |
| | | import com.vincent.rsf.server.system.entity.Config; |
| | | import com.vincent.rsf.server.system.service.ConfigService; |
| | |
| | | }); |
| | | List<BasStation> stations = stationService.list(new LambdaQueryWrapper<BasStation>() |
| | | .eq(BasStation::getStatus, 1) |
| | | .eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_O.type)); |
| | | ); |
| | | // .eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | List<String> stationNames = stations.stream().map(BasStation::getStationName).collect(Collectors.toList()); |
| | | if (Cools.isEmpty(stations)) { |
| | | throw new CoolException("无可用站点!!"); |
| | | } |
| | | DeviceSite deviceSite = deviceSiteService.getOne(new LambdaQueryWrapper<DeviceSite>() |
| | | .in(DeviceSite::getSite, stationNames) |
| | | .eq(DeviceSite::getType, TaskType.TASK_TYPE_CHECK_OUT.type).last("limit 1")); |
| | | if (Cools.isEmpty(deviceSite)) { |
| | | throw new CoolException("无可用路径!!"); |
| | | for (String stationName : stationNames) { |
| | | boolean isItAvailable = new WarehouseLocationRetrievalUtil().queryPathIsItAvailableOutArea(loc.getAreaId(), stationName, loc.getBarcode(), TaskType.TASK_TYPE_CHECK_OUT.type); |
| | | if (!isItAvailable) { |
| | | continue; |
| | | } |
| | | //生成盘点任务参数 |
| | | LocToTaskParams locToTaskParams = new LocToTaskParams(); |
| | | locToTaskParams.setType(Constants.TASK_TYPE_OUT_CHECK) |
| | | .setItems(locItems) |
| | | .setSiteNo(deviceSite.getSite()) |
| | | .setSiteNo(stationName) |
| | | .setOrgLoc(loc.getCode()); |
| | | |
| | | List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getTargSite, deviceSite.getSite())); |
| | | List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>().eq(Task::getTargSite, stationName)); |
| | | if (!tasks.isEmpty()) { |
| | | continue; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 入库 应该根据工作档回去 |
| | | // this.runStaToLoc(locGroupList, staGroupList, staTaskMemo); |