| | |
| | | |
| | | |
| | | @PostMapping("/out/pakout/orderDetlIds/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "response.order_detail_ids_query") |
| | | public R pakoutOrderDetlIds(@RequestParam Long orderId) throws InterruptedException { |
| | | Thread.sleep(200); |
| | | return R.ok().add(orderDetlService.selectByOrderId(orderId).stream().map(OrderDetl::getId).distinct().collect(Collectors.toList())); |
| | | R r = R.ok(); |
| | | r.put("data",orderDetlService.selectByOrderId(orderId).stream().map(OrderDetl::getId).distinct().collect(Collectors.toList())); |
| | | return r; |
| | | } |
| | | |
| | | @PostMapping("/out/pakout/preview/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "response.order_preview") |
| | | public R pakoutPreview(@RequestBody List<Long> ids) { |
| | | if (Cools.isEmpty(ids)) { |
| | | return R.parse(BaseRes.PARAM); |
| | |
| | | locDtos.add(locDto); |
| | | } |
| | | } |
| | | return R.ok().add(locDtos); |
| | | R r = R.ok(); |
| | | r.put("data",locDtos); |
| | | return r; |
| | | } |
| | | |
| | | @PostMapping("/out/pakout/auth") |
| | | @ManagerAuth(memo = "订单出库") |
| | | @ManagerAuth(memo = "response.order_outbound") |
| | | public synchronized R pakout(@RequestBody List<LocDto> locDtos) throws InterruptedException { |
| | | if (Cools.isEmpty(locDtos)) { |
| | | return R.parse(BaseRes.PARAM); |
| | |
| | | } |
| | | } |
| | | if (lack) { |
| | | return R.error("库存不足"); |
| | | return R.error("response.stock_insufficient"); |
| | | } |
| | | |
| | | Thread.sleep(1000L); |
| | |
| | | BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo()); |
| | | workService.stockOut(staNo, taskDto, getUserId()); |
| | | } |
| | | return R.ok(); |
| | | return R.ok("response.outbound_start_success"); |
| | | } |
| | | |
| | | } |