...
|
...
|
@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
...
|
...
|
@@ -44,8 +45,11 @@ public class StorageUpdateTimeLogicService { |
|
|
return new ArrayList<StorageUpdateTime>();
|
|
|
}
|
|
|
List<ProductTiming> productTimings = productTimingService.selectBySkns(productSkns);
|
|
|
Map<Integer,Integer> outSaleTimeMap = productTimings.stream().parallel().collect(Collectors.toMap(ProductTiming::getProductSkn, ProductTiming::getOutSaleTime));
|
|
|
List<Product> products =productService.selectListByIds(productIds);
|
|
|
Map<Integer,Integer> outSaleTimeMap = new HashMap<>();
|
|
|
if(!CollectionUtils.isEmpty(storageUpdateTimes)){
|
|
|
outSaleTimeMap = productTimings.stream().parallel().collect(Collectors.toMap(ProductTiming::getProductSkn, ProductTiming::getOutSaleTime));
|
|
|
}
|
|
|
List<Product> products =productService.selectListByIds(productIds);
|
|
|
Map<Integer,Integer> sknMap = products.stream().parallel().collect(Collectors.toMap(Product::getId, Product::getErpProductId));
|
|
|
for (StorageUpdateTime storageUpdateTime : storageUpdateTimes) {
|
|
|
Integer outSaleTime = outSaleTimeMap.get(sknMap.get(storageUpdateTime.getProductId()));
|
...
|
...
|
|