| | |
| | | import com.vincent.rsf.server.api.entity.params.CallForEmptyContainersParam; |
| | | import com.vincent.rsf.server.api.entity.params.ContainerWaveParam; |
| | | import com.vincent.rsf.server.api.service.PdaOutStockService; |
| | | import com.vincent.rsf.server.common.constant.Constants; |
| | | import com.vincent.rsf.server.manager.controller.params.LocToTaskParams; |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.enums.AsnExceStatus; |
| | | import com.vincent.rsf.server.manager.enums.StationTypeEnum; |
| | | import com.vincent.rsf.server.manager.enums.TaskStsType; |
| | | import com.vincent.rsf.server.manager.enums.*; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.vincent.rsf.server.manager.service.impl.BasContainerServiceImpl; |
| | | import lombok.Synchronized; |
| | |
| | | private LocService locService; |
| | | @Autowired |
| | | private BasContainerServiceImpl basContainerService; |
| | | @Autowired |
| | | private LocItemService locItemService; |
| | | |
| | | @Override |
| | | public R getOutStockTaskItem(String barcode) { |
| | |
| | | if (Cools.isEmpty(basContainer)){ |
| | | throw new CoolException("未查询到相关容器规则"); |
| | | } |
| | | String barcodeType = "barcode REGEXP "+basContainer.getCodeType(); |
| | | String barcodeType = "barcode REGEXP '"+basContainer.getCodeType()+"'"; |
| | | //容器类型查询 起点 |
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .apply(barcodeType) |
| | | .eq(Loc::getDeleted, 0) |
| | | .eq(Loc::getStatus, 1) |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_D.type) |
| | | .in(Loc::getAreaId, areaList) |
| | | .eq(Loc::getUseStatus, "O") |
| | | .orderByDesc(Loc::getId) |
| | | .last("LIMIT 1"), |
| | | false); |
| | |
| | | if (Cools.isEmpty(loc)){ |
| | | throw new CoolException("未查询到符合条件的托盘"); |
| | | } |
| | | // if (basStation.getType().equals(StationTypeEnum.STATION_TYPE_MUTI.type)) { |
| | | // //光电站点: |
| | | // Long area = basStation.getArea(); |
| | | // //是否需要转非光电站点 |
| | | // //立库出库==》结束 |
| | | // //AGV==》立库==》结束 |
| | | // } else { |
| | | // //非光电站点 |
| | | // //是否需要转光电站点 |
| | | // //AGV==》结束 |
| | | // //立库出库==》AGV==》结束 |
| | | // |
| | | // } |
| | | |
| | | return R.ok().add(loc); |
| | | //生成盘点任务参数 |
| | | LocToTaskParams locToTaskParams = new LocToTaskParams(); |
| | | locToTaskParams.setType(Constants.TASK_TYPE_OUT_STOCK_EMPTY) |
| | | .setSiteNo(basStation.getStationName()) |
| | | .setOrgLoc(loc.getId().toString()); |
| | | try{ |
| | | locItemService.generateTaskEmpty(TaskResouceType.TASK_RESOUCE_STOCK_TYPE.val,locToTaskParams,loginUserId); |
| | | } catch (Exception e){ |
| | | throw new CoolException(e.getMessage()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |