Subversion Repositories SmartDukaan

Rev

Rev 35667 | Rev 35675 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35667 Rev 35673
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