| Line 513... |
Line 513... |
| 513 |
|
513 |
|
| 514 |
int itemsCount = 0;
|
514 |
int itemsCount = 0;
|
| 515 |
float totalCashback = 0;
|
515 |
float totalCashback = 0;
|
| 516 |
for (Map.Entry<CatalogSummaryModel, List<SchemeSummaryModel>> catalogSummaryModelListEntry : catalogSchemeSummaryMap.entrySet()) {
|
516 |
for (Map.Entry<CatalogSummaryModel, List<SchemeSummaryModel>> catalogSummaryModelListEntry : catalogSchemeSummaryMap.entrySet()) {
|
| 517 |
CatalogSummaryModel catalogSummaryModel = catalogSummaryModelListEntry.getKey();
|
517 |
CatalogSummaryModel catalogSummaryModel = catalogSummaryModelListEntry.getKey();
|
| 518 |
List<SchemeSummaryModel> schemeSummaryModels = catalogSummaryModelListEntry.getValue();
|
518 |
List<SchemeSummaryModel> schemeSummaryModels = catalogSummaryModelListEntry.getValue().stream().filter(x->x !=null).collect(Collectors.toList());
|
| 519 |
schemeSummaryModels.stream().filter(x -> x.getSchemeType().equals(SchemeType.IN)).forEach(x -> x.setProcess(true));
|
519 |
schemeSummaryModels.stream().filter(x -> x!=null && x.getSchemeType().equals(SchemeType.IN)).forEach(x -> x.setProcess(true));
|
| 520 |
if (schemeSummaryModels.stream().filter(x -> x.isProcess()).count() == 0) continue;
|
520 |
if (schemeSummaryModels.stream().filter(x -> x.isProcess()).count() == 0) continue;
|
| 521 |
List<InventoryItem> modelInventoryItems = catalogInventoryItemMap.get(catalogSummaryModel.getCatalogId());
|
521 |
List<InventoryItem> modelInventoryItems = catalogInventoryItemMap.get(catalogSummaryModel.getCatalogId());
|
| 522 |
for (InventoryItem inventoryItem : modelInventoryItems) {
|
522 |
for (InventoryItem inventoryItem : modelInventoryItems) {
|
| 523 |
float inventoryItemCashback = this.createSchemeInOut(schemeSummaryModels, inventoryItem, partnerType);
|
523 |
float inventoryItemCashback = this.createSchemeInOut(schemeSummaryModels, inventoryItem, partnerType);
|
| 524 |
if (inventoryItemCashback > 0) {
|
524 |
if (inventoryItemCashback > 0) {
|
| Line 751... |
Line 751... |
| 751 |
|
751 |
|
| 752 |
|
752 |
|
| 753 |
int count = 0;
|
753 |
int count = 0;
|
| 754 |
for (Map.Entry<CatalogSummaryModel, List<SchemeSummaryModel>> catalogSummaryModelListEntry : catalogSchemeSummaryMap.entrySet()) {
|
754 |
for (Map.Entry<CatalogSummaryModel, List<SchemeSummaryModel>> catalogSummaryModelListEntry : catalogSchemeSummaryMap.entrySet()) {
|
| 755 |
CatalogSummaryModel catalogSummaryModel = catalogSummaryModelListEntry.getKey();
|
755 |
CatalogSummaryModel catalogSummaryModel = catalogSummaryModelListEntry.getKey();
|
| 756 |
List<SchemeSummaryModel> schemeSummaryModels = catalogSummaryModelListEntry.getValue();
|
756 |
List<SchemeSummaryModel> schemeSummaryModels = catalogSummaryModelListEntry.getValue().stream().filter(x->x != null).collect(Collectors.toList());
|
| 757 |
List<SchemeType> allOutSchemeTypes = new ArrayList<>();
|
757 |
List<SchemeType> allOutSchemeTypes = new ArrayList<>();
|
| 758 |
allOutSchemeTypes.addAll(Arrays.asList(SchemeType.ACTIVATION, SchemeType.INVESTMENT, SchemeType.SPECIAL_SUPPORT, SchemeType.SELLOUT));
|
758 |
allOutSchemeTypes.addAll(Arrays.asList(SchemeType.ACTIVATION, SchemeType.INVESTMENT, SchemeType.SPECIAL_SUPPORT, SchemeType.SELLOUT));
|
| 759 |
allOutSchemeTypes.addAll(OUT_SCHEME_TYPES);
|
759 |
allOutSchemeTypes.addAll(OUT_SCHEME_TYPES);
|
| 760 |
schemeSummaryModels.stream().filter(x -> allOutSchemeTypes.contains(x.getSchemeType())).forEach(x -> x.setProcess(true));
|
760 |
schemeSummaryModels.stream().filter(x -> allOutSchemeTypes.contains(x.getSchemeType())).forEach(x -> x.setProcess(true));
|
| 761 |
if (schemeSummaryModels.stream().filter(x -> x.isProcess()).count() == 0) continue;
|
761 |
if (schemeSummaryModels.stream().filter(x -> x.isProcess()).count() == 0) continue;
|