Subversion Repositories SmartDukaan

Rev

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

Rev 25168 Rev 25170
Line 31... Line 31...
31
import com.spice.profitmandi.common.model.ProfitMandiConstants;
31
import com.spice.profitmandi.common.model.ProfitMandiConstants;
32
import com.spice.profitmandi.dao.entity.fofo.FofoOrderItem;
32
import com.spice.profitmandi.dao.entity.fofo.FofoOrderItem;
33
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
33
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
34
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
34
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
35
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
35
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
-
 
36
import com.spice.profitmandi.dao.repository.catalog.TagListingRepository;
36
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
37
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
37
import com.spice.profitmandi.dao.repository.dtr.InsurancePolicyRepository;
38
import com.spice.profitmandi.dao.repository.dtr.InsurancePolicyRepository;
38
import com.spice.profitmandi.dao.repository.dtr.InsuranceProviderRepository;
39
import com.spice.profitmandi.dao.repository.dtr.InsuranceProviderRepository;
39
import com.spice.profitmandi.dao.repository.dtr.Mongo;
40
import com.spice.profitmandi.dao.repository.dtr.Mongo;
40
import com.spice.profitmandi.dao.repository.dtr.NotificationPanelRepository;
41
import com.spice.profitmandi.dao.repository.dtr.NotificationPanelRepository;
Line 169... Line 170...
169
	}
170
	}
170
 
171
 
171
	private List<BrandStockPrice> getBrandStockPrices(int fofoId) throws Exception {
172
	private List<BrandStockPrice> getBrandStockPrices(int fofoId) throws Exception {
172
		Map<String, BrandStockPrice> brandStockPricesMap = inventoryService.getBrandWiseStockValue(fofoId);
173
		Map<String, BrandStockPrice> brandStockPricesMap = inventoryService.getBrandWiseStockValue(fofoId);
173
		List<InventoryItemAgingModel> models = inventoryService.getItemAgingByInterval(fofoId, Arrays.asList(30));
174
		List<InventoryItemAgingModel> models = inventoryService.getItemAgingByInterval(fofoId, Arrays.asList(30));
-
 
175
		
174
 
176
		
175
		Map<String, Integer> brandWiseQty = models.stream()
177
		Map<String, Integer> brandWiseQty = models.stream()
176
				.filter(x -> ItemType.SERIALIZED.toString().equals(x.getItemType())  && x.getValues().get(1)!=null)
178
				.filter(x -> ItemType.SERIALIZED.toString().equals(x.getItemType())  && x.getValues().get(1)!=null)
177
				.collect(Collectors.groupingBy(x -> x.getBrand(), Collectors.summingInt(x -> 
179
				.collect(Collectors.groupingBy(x -> x.getBrand(), Collectors.summingInt(x -> 
178
				x.getValues().get(1).getQuantity())));
180
				x.getValues().get(1).getQuantity())));
179
		Map<String, Double> brandWiseValue = models.stream()
181
		Map<String, Double> brandWiseValue = models.stream()