| | |
| | | if (StringUtils.isEmpty(accountSalesCollection.getCollectionNumber())) { |
| | | accountSalesCollection.setCollectionNumber(genAccountSalesCollectionNo()); |
| | | } |
| | | String stockOutRecordIds = accountSalesCollection.getStockOutRecordIds(); |
| | | if (stockOutRecordIds != null && !stockOutRecordIds.isEmpty()) { |
| | | List<Long> ids = Arrays.stream(stockOutRecordIds.split(",")) |
| | | .map(Long::valueOf) |
| | | .toList(); |
| | | if (accountSalesCollectionMapper.existsByStockOutRecordId(ids)){ |
| | | throw new ServiceException("存在重复的出库单"); |
| | | } |
| | | } |
| | | // String stockOutRecordIds = accountSalesCollection.getStockOutRecordIds(); |
| | | // if (stockOutRecordIds != null && !stockOutRecordIds.isEmpty()) { |
| | | // List<Long> ids = Arrays.stream(stockOutRecordIds.split(",")) |
| | | // .map(Long::valueOf) |
| | | // .toList(); |
| | | // if (accountSalesCollectionMapper.existsByStockOutRecordId(ids)){ |
| | | // throw new ServiceException("存在重复的出库单"); |
| | | // } |
| | | // } |
| | | return save(accountSalesCollection); |
| | | } |
| | | |