| | |
| | | @Autowired |
| | | private StaDescService staDescService; |
| | | |
| | | @RequestMapping("/locMerge/out/start") |
| | | @ManagerAuth(memo = "并板出库") |
| | | public R locMergeOutStart(@RequestBody StockOutParam param) { |
| | | workService.locMergeOut(param, getUserId()); |
| | | return R.ok("出库启动成功"); |
| | | } |
| | | |
| | | @RequestMapping("/available/put/site") |
| | | @ManagerAuth() |
| | | public R availablePutSite(){ |
| | |
| | | |
| | | void turnMatLocDetl(EmptyPlateOutParam param, Long userId); |
| | | |
| | | /** |
| | | * 并板出库 |
| | | */ |
| | | void locMergeOut(StockOutParam param, Long userId); |
| | | } |
| | |
| | | ioType = dto.isAll() ? 101 : 103; |
| | | } else if (ioWorkType.equals(IoWorkType.CHECK_OUT)) { |
| | | ioType = 107; |
| | | }else if (ioWorkType.equals(IoWorkType.MERGE_OUT)) { |
| | | ioType = 104; |
| | | } |
| | | assert ioType != null; |
| | | // 获取库位 |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void locMergeOut(StockOutParam param, Long userId) { |
| | | // 目标站点状态检测 |
| | | BasDevp staNo = basDevpService.checkSiteStatus(param.getOutSite()); |
| | | // 获取库位明细 |
| | | List<LocDetlDto> locDetlDtos = new ArrayList<>(); |
| | | for (StockOutParam.LocDetl paramLocDetl : param.getLocDetls()) { |
| | | if (!Cools.isEmpty(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getCount())) { |
| | | LocDetl one = locDetlService.selectItem(paramLocDetl.getLocNo(), paramLocDetl.getMatnr(), paramLocDetl.getBatch()); |
| | | if (null != one) locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount())); |
| | | } |
| | | } |
| | | if (!locDetlDtos.isEmpty()) { |
| | | // 启动出库开始 107.盘点出库 |
| | | stockOut(staNo, locDetlDtos, IoWorkType.MERGE_OUT, userId); |
| | | } else { |
| | | throw new CoolException("库位物料不存在"); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | ALL_OUT, |
| | | PICK_OUT, |
| | | CHECK_OUT, |
| | | MERGE_OUT, |
| | | ; |
| | | |
| | | } |