Subversion Repositories SmartDukaan

Rev

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

Rev 35482 Rev 35483
Line 235... Line 235...
235
        List<PartnerType> partnerTypes = Arrays.asList(PartnerType.values());
235
        List<PartnerType> partnerTypes = Arrays.asList(PartnerType.values());
236
 
236
 
237
        for (PartnerType partnerType : partnerTypes) {
237
        for (PartnerType partnerType : partnerTypes) {
238
 
238
 
239
            float count = fofoIdAndallValues.entrySet().stream()
239
            float count = fofoIdAndallValues.entrySet().stream()
240
                    .filter(x -> x.getValue() != null)
-
 
241
                    .filter(x -> {
-
 
242
                        PartnerType pt = x.getValue().getPartnerType();
240
                    .filter(x -> x.getValue() != null && x.getValue().getPartnerType().equals(partnerType)).count();
243
                        if (pt == null) {
-
 
244
                            pt = PartnerType.NEW; // Default to Rising Star
-
 
245
                        }
-
 
246
                        return pt.equals(partnerType);
-
 
247
                    }).count();
-
 
248
 
241
 
249
            partnerTypeCount.put(partnerType.toString(), count);
242
            partnerTypeCount.put(partnerType.toString(), count);
250
 
243
 
251
        }
244
        }
252
 
245