| | |
| | | */ |
| | | @Synchronized |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void generateOutTask(List<OrderOutItemDto> itemParams, Long loginUserId, Wave wave) throws Exception { |
| | | public synchronized void generateOutTask(List<OrderOutItemDto> itemParams, Long loginUserId, Wave wave) throws Exception { |
| | | Map<Long, List<OrderOutItemDto>> listMap = itemParams.stream().collect(Collectors.groupingBy(OrderOutItemDto::getLocId)); |
| | | listMap.keySet().forEach(id -> { |
| | | // double sum = listMap.get(id).stream().mapToDouble(OrderOutItemDto::getAnfme).sum(); |
| | |
| | | } catch (Exception e) { |
| | | throw new CoolException("出库任务生成失败!"); |
| | | } |
| | | |
| | | //添加300毫秒间隔 |
| | | try { |
| | | Thread.sleep(300); |
| | | } catch (InterruptedException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | |
| | | // for (OrderOutItemDto itemDto : itemParams) { |