| Line 816... |
Line 816... |
| 816 |
if (ordersMap == null) continue;
|
816 |
if (ordersMap == null) continue;
|
| 817 |
|
817 |
|
| 818 |
List<FofoOrderItem> fofoOrderItems = ordersMap.get(fofoId);
|
818 |
List<FofoOrderItem> fofoOrderItems = ordersMap.get(fofoId);
|
| 819 |
if (fofoOrderItems == null || fofoOrderItems.isEmpty()) continue;
|
819 |
if (fofoOrderItems == null || fofoOrderItems.isEmpty()) continue;
|
| 820 |
|
820 |
|
| 821 |
int totalQty = fofoOrderItems.stream().collect(Collectors.summingInt(x -> (x.getQuantity())));
|
821 |
int totalQty = fofoOrderItems.stream().filter(x -> createOfferRequest.isWithinRange(x.getCreateTimestamp())).collect(Collectors.summingInt(x -> (x.getQuantity())));
|
| 822 |
int totalValue = fofoOrderItems.stream().collect(Collectors.summingInt(x -> Math.round(x.getDp()) * (x.getQuantity())));
|
822 |
int totalValue = fofoOrderItems.stream().filter(x -> createOfferRequest.isWithinRange(x.getCreateTimestamp())).collect(Collectors.summingInt(x -> Math.round(x.getDp()) * (x.getQuantity())));
|
| 823 |
int eligibleQty = totalQty;
|
823 |
int eligibleQty = totalQty;
|
| 824 |
int eligibleValue = totalValue;
|
824 |
int eligibleValue = totalValue;
|
| 825 |
criteriaQtyAmountModel.setQty(totalQty);
|
825 |
criteriaQtyAmountModel.setQty(totalQty);
|
| 826 |
criteriaQtyAmountModel.setAmount(totalValue);
|
826 |
criteriaQtyAmountModel.setAmount(totalValue);
|
| 827 |
|
827 |
|