|
|
|
@ -165,19 +165,36 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
|
|
|
|
|
List<DistributionStockArticleEntity> list = baseMapper.exportDistributionStockArticle(paramMap, idArr); |
|
|
|
|
List<DistributionStockArticleExcel> 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; |
|
|
|
|
} |
|
|
|
|