Subversion Repositories SmartDukaan

Rev

Rev 35191 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.service.inventory;

import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
import com.spice.profitmandi.common.model.BrandStockPrice;
import com.spice.profitmandi.common.model.CustomCurrentInventorySnapshot;
import com.spice.profitmandi.common.model.InventoryItemAgingModel;
import com.spice.profitmandi.common.model.ItemDescriptionModel;
import com.spice.profitmandi.dao.entity.catalog.Category;
import com.spice.profitmandi.dao.entity.fofo.CustomerReturnItem;
import com.spice.profitmandi.dao.entity.fofo.DebitNote;
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
import com.spice.profitmandi.dao.entity.fofo.PurchaseReturnItem;
import in.shop2020.model.v1.user.ItemQuantity;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.Set;

@Service
public interface InventoryService {
    public Map<Integer, String> getItemIdDescriptionMap(Set<Integer> itemIds) throws ProfitMandiBusinessException;

        public Map<Integer, String> getCatalogItemDescriptionMap(String brand, int categoryId);

        public Set<String> getAllTagListingBrands();

        public Set<String> getAllTagListingBrands(int categoryId);

        @Cacheable(value = "catalog.categories", cacheManager = "thirtyMinsTimeOutCacheManager")
    List<Category> getAllCategories() throws ProfitMandiBusinessException;

    public Map<Integer, String> getModelDescriptionMap(String brand) throws ProfitMandiBusinessException;

        public Map<Integer, String> getModelDescriptionMap(Set<String> brands) throws Exception;

        public Map<Integer, String> getModelDescriptionMap(int categoryId, List<String> brands) throws Exception;

    public Map<String, Object> getCurrentInventorySnapshot(int fofoId, int offset, int limit, String searchTerm) throws ProfitMandiBusinessException;

        public Map<String, Object> getBadInventorySnapshot(int fofoId, int offset, int limit, String searchTerm);

        public Map<String, Object> getPaginatedCurrentInventorySnapshot(int fofoId, int offset, int limit,
                                                                    String searchTerm) throws ProfitMandiBusinessException;

        public Map<String, Object> getCatalog(int fofoId, int offset, int limit, String searchTerm, int catalogItemId,
                                                                                  String brand, boolean accesories) throws ProfitMandiBusinessException;

        public Map<String, Object> getPaginatedCatalog(int fofoId, int offset, int limit, String searchTerm, int itemId,
                        String brand, boolean accesories) throws ProfitMandiBusinessException;

        public CustomCurrentInventorySnapshot checkItemAvailability(int itemId, int fofoId)
                        throws ProfitMandiBusinessException;

        public Map<String, Object> getGrnHistory(int fofoId, LocalDateTime startTime, LocalDateTime endTime, int offset,
                        int limit, String purchaseReference, String searchType) throws ProfitMandiBusinessException;

        public Map<String, Object> getPaginatedGrnHistory(int fofoId, LocalDateTime startTime, LocalDateTime endTime,
                        int offset, int limit) throws ProfitMandiBusinessException;

        public Map<String, Object> getGrnHistoryDetail(int fofoId, int purchaseId, String host, int port, String webapp)
                        throws ProfitMandiBusinessException;

        public Map<String, Object> getGrnHistoryDetail(int fofoId, String purchaseReference, String host, int port,
                        String webapp) throws ProfitMandiBusinessException;

        public List<InventoryItemAgingModel> getItemAgingByInterval(int fofoId, List<Integer> intervals)
                        throws ProfitMandiBusinessException;

        public Map<String, Object> getPaginatedItemAgingByInterval(int fofoId, List<Integer> intervals,
                        String searchContent, int offset, int limit) throws ProfitMandiBusinessException;

        public Map<String, Object> addToCart(String cartJson, int fofoId) throws ProfitMandiBusinessException;

        public Map<String, Object> validateCart(String cartJson, int fofoId) throws ProfitMandiBusinessException;

        public void saleReturnInventoryItem(CustomerReturnItem customerReturnItem) throws ProfitMandiBusinessException;

        public Map<String, BrandStockPrice> getBrandWiseStockValue(int fofoId);

        public void returnInventory(PurchaseReturnItem purchaseReturnItem);

        // public void returnInventoryItems(List<InventoryItem> inventoryItems,
        // DebitNote debitNote);
        public void returnItems(DebitNote debitNote) throws Exception;

        public void restoreReturnedItems(DebitNote debitNote) throws Exception;

        public List<ItemQuantity> getPartnerStockOnDate(LocalDate stockDate);

        float getTotalAmountInStock(int fofoId);

        List<InventoryItem> getInventoryInStock();

        List<InventoryItem> getInventoryInStock(int fofoId, int itemId);

        List<InventoryItem> getInventoryInStock(int fofoId, int itemId, LocalDateTime date);

        List<InventoryItem> getInventoryInStock(int itemId, LocalDateTime date);

        public void updatePriceDrop(List<InventoryItem> inventoryItems, float amount);

    public Map<Integer, String> getCatalogIdDescriptionMap(Set<Integer> catalogIds) throws ProfitMandiBusinessException;

        public void rollbackInventory(int inventoryItemId, int rollbackQuantity, int orderId);

    double getActivatedStockAmount(int fofoId) throws ProfitMandiBusinessException;

        public List<ItemDescriptionModel> getAllPartnerItemStringDescription(boolean anyColor);

        public void addActivatedImeis(Map<String, LocalDateTime> imeisActivationMap);

        public void addActivatedImeis(Map<String, LocalDateTime> imeisActivationMap, int authId);

        Map<Integer, List<InventoryItemAgingModel>> getItemAgingByInterval(List<Integer> intervals)
                        throws ProfitMandiBusinessException;

        void getItemAvailabilityAndIndent() throws Exception;

        public Map<Integer, AvailabilityModel> getStoreAndOurStock(int storeId, List<Integer> itemIds);
}