Browse Source

优化在库订单导出细节

single_db
Diss 1 year ago
parent
commit
5e90432039
  1. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

21
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -165,19 +165,36 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
List<DistributionStockArticleEntity> list = baseMapper.exportDistributionStockArticle(paramMap, idArr);
List<DistributionStockArticleExcel> excelList = new ArrayList<>();
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.getHandQuantity() != null) {
distributionStockArticleVO.getIncomingNum() != null) {
distributionStockArticleVO.setUnreceivedQuantity(
distributionStockArticleVO.getTotalNumber() - distributionStockArticleVO.getHandQuantity()
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;
}

Loading…
Cancel
Save