|
|
@@ -179,6 +179,7 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
|
|
|
Integer assignNumber = 0;
|
|
|
// 去重后的数据
|
|
|
List<ReleaseProductByBatch> uniqueBatchList = releaseProductByBatchDao.findByRelbatchidAndReleaseCodeNot(userUU, batch, failCode);
|
|
|
+ System.out.println("处理后数据大小: " + uniqueBatchList.size());
|
|
|
if (!CollectionUtils.isEmpty(uniqueBatchList)) {
|
|
|
assignNumber = assignBatch(uniqueBatchList);
|
|
|
}
|
|
|
@@ -338,6 +339,7 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
|
|
|
*/
|
|
|
private Integer assignBatch(List<ReleaseProductByBatch> uniqueBatchList) {
|
|
|
Set<Long> idSet = getProductIdSet(uniqueBatchList);
|
|
|
+ System.out.println("获取的物料id数量: " + idSet.size());
|
|
|
if (CollectionUtils.isNotEmpty(idSet)) {
|
|
|
HashMap<String, Object> params = new HashMap<>(5);
|
|
|
ModelMap data = new ModelMap();
|
|
|
@@ -367,8 +369,7 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
|
|
|
List<String> productCodeList = new ArrayList<>();
|
|
|
Set<Long> idSet = new HashSet<>();
|
|
|
List<ReleaseProductByBatch> batchList = new ArrayList<>();
|
|
|
- System.setProperty("java.util.concurrent.ForkJoinPool.common.parallelism", "100");
|
|
|
- uniqueBatchList.parallelStream().forEach(batch -> {
|
|
|
+ uniqueBatchList.forEach(batch -> {
|
|
|
if (null != batch.getProductid()) {
|
|
|
idSet.add(batch.getProductid());
|
|
|
} else {
|
|
|
@@ -383,8 +384,9 @@ public class PurchaseProductServiceImpl implements PurchaseProductService {
|
|
|
// 新增到物料库
|
|
|
productService.saveByJdbcTemplate(batchList);
|
|
|
List<com.uas.platform.b2c.prod.commodity.model.Product> productList = productService.findProductIdAndProdnumsByProdNums(productCodeList);
|
|
|
+ System.out.println("根据编号查询物料: " + productList.size());
|
|
|
List<ProductPrivate> privateList = new ArrayList<>();
|
|
|
- productList.parallelStream().forEach(product -> {
|
|
|
+ productList.forEach(product -> {
|
|
|
ProductPrivate productPrivate = new ProductPrivate(product.getId());
|
|
|
productPrivate.setAttach(product.getAttachment());
|
|
|
privateList.add(productPrivate);
|