diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index deb186be4..7a8ed85a5 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -165,19 +165,36 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl list = baseMapper.exportDistributionStockArticle(paramMap, idArr); List excelList = new ArrayList<>(); - list.parallelStream().forEach(li -> { - li.setCreateUserName(userClient.userInfoById(li.getCreateUser()).getData().getName()); - DistributionStockArticleVO distributionStockArticleVO = DistributionStockArticleWrapper.build().entityVO(li); - DistributionStockArticleExcel excel = new DistributionStockArticleExcel(); - if (distributionStockArticleVO.getTotalNumber() != null && - distributionStockArticleVO.getHandQuantity() != null) { - distributionStockArticleVO.setUnreceivedQuantity( - distributionStockArticleVO.getTotalNumber() - distributionStockArticleVO.getHandQuantity() - ); - } - BeanUtil.copyProperties(distributionStockArticleVO,excel); - excelList.add(excel); - }); + if (list.size()>61){ + list.parallelStream().forEach(li -> { + li.setCreateUserName(userClient.userInfoById(li.getCreateUser()).getData().getName()); + DistributionStockArticleVO distributionStockArticleVO = DistributionStockArticleWrapper.build().entityVO(li); + DistributionStockArticleExcel excel = new DistributionStockArticleExcel(); + if (distributionStockArticleVO.getTotalNumber() != null && + distributionStockArticleVO.getIncomingNum() != null) { + distributionStockArticleVO.setUnreceivedQuantity( + distributionStockArticleVO.getTotalNumber() - distributionStockArticleVO.getIncomingNum() + ); + } + BeanUtil.copyProperties(distributionStockArticleVO,excel); + excelList.add(excel); + }); + }else { + list.forEach(li -> { + li.setCreateUserName(userClient.userInfoById(li.getCreateUser()).getData().getName()); + DistributionStockArticleVO distributionStockArticleVO = DistributionStockArticleWrapper.build().entityVO(li); + DistributionStockArticleExcel excel = new DistributionStockArticleExcel(); + if (distributionStockArticleVO.getTotalNumber() != null && + distributionStockArticleVO.getIncomingNum() != null) { + distributionStockArticleVO.setUnreceivedQuantity( + distributionStockArticleVO.getTotalNumber() - distributionStockArticleVO.getIncomingNum() + ); + } + BeanUtil.copyProperties(distributionStockArticleVO,excel); + excelList.add(excel); + }); + } + return excelList; }