| | |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | |
| | | |
| | | // @PostMapping("/out/pakout/preview/auth") |
| | | // public R pakoutPreview(@RequestBody List<Long> ids) { |
| | | // if (Cools.isEmpty(ids)) { |
| | | // return R.parse(BaseRes.PARAM); |
| | | // } |
| | | // List<OrderDetl> orderDetls = orderDetlService.selectBatchIds(ids); |
| | | // Set<DetlDto> detlDtos = new HashSet<>(); |
| | | // for (OrderDetl orderDetl : orderDetls) { |
| | | // if (DetlDto.hasList(detlDtos, orderDetl)) { |
| | | // DetlDto detlDto = DetlDto.find(detlDtos, orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | // assert detlDto != null; |
| | | // detlDto.setAnfme(detlDto.getAnfme() + orderDetl.getAnfme()); |
| | | // } else { |
| | | // detlDtos.add(new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getAnfme())); |
| | | // } |
| | | // } |
| | | // List<LocDto> locDtos = new ArrayList<>(); |
| | | // for (DetlDto detlDto : detlDtos) { |
| | | // double issued = Optional.ofNullable(detlDto.getAnfme()).orElse(0.0D) ; |
| | | // List<LocDetl> locDetls = locDetlService.queryStock(detlDto.getMatnr(), detlDto.getBatch(), null); |
| | | // for (LocDetl locDetl : locDetls) { |
| | | // if (issued > 0) { |
| | | // locDtos.add(new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(), issued>=locDetl.getAnfme()?locDetl.getAnfme():issued)); |
| | | // // 剩余待出数量递减 |
| | | // issued = issued - locDetl.getAnfme(); |
| | | // } else { |
| | | // break; |
| | | // } |
| | | // } |
| | | // } |
| | | // return R.ok().add(locDtos); |
| | | // } |
| | | |
| | | @PostMapping("/out/pakout/preview/auth") |
| | | @ManagerAuth |
| | | public R pakoutPreview(@RequestBody List<Long> ids) { |