| | |
| | | @PostMapping("/pakin/loc/v1") |
| | | @ResponseBody |
| | | public synchronized R getLocNo(@RequestBody SearchLocParam param) { |
| | | log.info("收到WCS入库接口请求====>>入参:{}", param); |
| | | |
| | | if(param.getBarcode().contains("-") || param.getBarcode().contains("gsl")){ |
| | | log.info("收到WCS入库接口请求====>>入参:{}", param); |
| | | } |
| | | if (Cools.isEmpty(param.getSourceStaNo())) { |
| | | return R.error("源站编号不能为空"); |
| | | } |
| | |
| | | // dto1.setTaskPri((int) Math.round(wrkMast1.getIoPri())); |
| | | return R.ok(dto1); |
| | | } |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("io_type", 1)); |
| | | if (!Cools.isEmpty(wrkMasts) && wrkMasts.size() > 1) { |
| | | return R.error("限行"); |
| | | } |
| | | // List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("io_type", 1)); |
| | | // if (!Cools.isEmpty(wrkMasts) && wrkMasts.size() > 10) { |
| | | // return R.error("限行"); |
| | | // } |
| | | waitPakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", param.getBarcode())); |
| | | if (Cools.isEmpty(waitPakins)) { |
| | | return R.error("请先添加入库通知档"); |
| | |
| | | BasDevp sourceStaNo = basDevpService.checkSiteStatus(param.getSourceStaNo(), true); |
| | | sourceStaNo.setLocType1(param.getLocType1()); |
| | | LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo); |
| | | if (waitPakins.get(0).getMatnr().equals("emptyPallet")) { |
| | | locTypeDto.setLocType2((short) 1); |
| | | } |
| | | |
| | | StartupDto dto = startupFullPutStore(param.getSourceStaNo(), param.getBarcode(), locTypeDto, waitPakins, param.getRow()); |
| | | StartupDto dto = startupFullPutStore(param.getSourceStaNo(), param.getBarcode(), locTypeDto, waitPakins); |
| | | log.info("WCS入库接口返参:{},托盘码:{}", dto, param.getBarcode()); |
| | | return R.ok().add(dto); |
| | | } |
| | |
| | | StartupDto dto = null; |
| | | switch (param.getIoType()) { |
| | | case 1://满托盘入库 |
| | | dto = startupFullPutStoreAgv(param.getSourceStaNo(), param.getBarcode(), locTypeDto, param.getOutArea(), 1); |
| | | break; |
| | | case 10://空托盘入库 |
| | | dto = startupFullPutStoreAgv(param.getSourceStaNo(), param.getBarcode(), locTypeDto, param.getOutArea()); |
| | | dto = startupFullPutStoreAgv(param.getSourceStaNo(), param.getBarcode(), locTypeDto, param.getOutArea(), 10); |
| | | break; |
| | | // dto = emptyPlateIn(param.getSourceStaNo(), locTypeDto, param.getBarcode()); |
| | | // break; |
| | |
| | | * 全板入库AGV |
| | | */ |
| | | @Transactional |
| | | public StartupDto startupFullPutStoreAgv(Integer devpNo, String barcode, LocTypeDto locTypeDto, Integer outArea) { |
| | | public StartupDto startupFullPutStoreAgv(Integer devpNo, String barcode, LocTypeDto locTypeDto, Integer outArea, Integer staDescId) { |
| | | // 源站点状态检测 |
| | | // BasDevp sourceStaNo = basDevpService.checkSiteStatus(devpNo, true); |
| | | // 检索库位 |
| | | FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(); |
| | | findLocNoAttributeVo.setOutArea(outArea); |
| | | // FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(waitPakins.get(0)); |
| | | StartupDto dto = commonService.getLocNo(1, devpNo, findLocNoAttributeVo, locTypeDto); |
| | | StartupDto dto = commonService.getLocNo(staDescId, devpNo, findLocNoAttributeVo, locTypeDto); |
| | | // 更新目标库位状态 |
| | | Date now = new Date(); |
| | | if (dto == null) { |
| | |
| | | * 全板入库 |
| | | */ |
| | | @Transactional |
| | | public StartupDto startupFullPutStore(Integer devpNo, String barcode, LocTypeDto locTypeDto, List<WaitPakin> waitPakins, List<Integer> recommendRows) { |
| | | public StartupDto startupFullPutStore(Integer devpNo, String barcode, LocTypeDto locTypeDto, List<WaitPakin> waitPakins) { |
| | | // 源站点状态检测 |
| | | BasDevp sourceStaNo = basDevpService.checkSiteStatus(devpNo, true); |
| | | // 检索库位 |
| | |
| | | List<String> batchs = waitPakins.stream().map(WaitPakin::getBatch).distinct().collect(Collectors.toList()); |
| | | FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(matnrs.get(0), batchs.get(0)); |
| | | // FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(waitPakins.get(0)); |
| | | StartupDto dto = commonService.getLocNo(1, devpNo, findLocNoAttributeVo, locTypeDto, recommendRows); |
| | | // 满板入库统一按库位排号(row_lastno)的 currentRow/crn_qty 轮询,不参考 WCS 透传的推荐排。 |
| | | StartupDto dto = commonService.getLocNo(1, devpNo, findLocNoAttributeVo, locTypeDto); |
| | | int workNo = dto.getWorkNo(); |
| | | Date now = new Date(); |
| | | // 生成工作档 |