Subversion Repositories SmartDukaan

Rev

Rev 27424 | Rev 29234 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
22608 ashik.ali 1
package com.spice.profitmandi.service.scheme;
2
 
27877 amit.gupta 3
import java.time.LocalDate;
23019 ashik.ali 4
import java.time.LocalDateTime;
5
import java.util.List;
23752 govind 6
import java.util.Map;
23781 ashik.ali 7
import java.util.Set;
23019 ashik.ali 8
 
22608 ashik.ali 9
import org.springframework.stereotype.Service;
10
 
22653 ashik.ali 11
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
23019 ashik.ali 12
import com.spice.profitmandi.common.model.SchemeModel;
22653 ashik.ali 13
import com.spice.profitmandi.dao.entity.catalog.Scheme;
23968 amit.gupta 14
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
26332 amit.gupta 15
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
24264 amit.gupta 16
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
25503 amit.gupta 17
import com.spice.profitmandi.dao.model.CreateSchemeRequest;
22653 ashik.ali 18
 
22608 ashik.ali 19
@Service
20
public interface SchemeService {
22859 ashik.ali 21
	public void saveScheme(int creatorId, CreateSchemeRequest createSchemeRequest) throws ProfitMandiBusinessException;
26802 tejbeer 22
 
22859 ashik.ali 23
	public Scheme getSchemeById(int schemeId) throws ProfitMandiBusinessException;
26802 tejbeer 24
 
23019 ashik.ali 25
	public List<SchemeModel> getAllSchemeModels(LocalDateTime startDateTime, LocalDateTime endDateTime);
26802 tejbeer 26
 
22653 ashik.ali 27
	public void activeSchemeById(int schemeId) throws ProfitMandiBusinessException;
26802 tejbeer 28
 
25071 amit.gupta 29
	public void expireSchemeById(int schemeId, LocalDateTime expiryDate) throws ProfitMandiBusinessException;
26802 tejbeer 30
 
23365 ashik.ali 31
	public void processSchemeIn(int purchaseId, int retailerId) throws ProfitMandiBusinessException;
26802 tejbeer 32
 
23365 ashik.ali 33
	public void processSchemeOut(int fofoOrderId, int retailerId) throws ProfitMandiBusinessException;
26802 tejbeer 34
 
35
	// public void rollbackSchemeForInventoryItemId(int inventoryItemId);
36
	public void rollbackSchemes(List<Integer> inventoryItemIds, int rollbackReference, String rollbackReason)
37
			throws Exception;
38
 
39
	public Map<String, Object> getSchemes(Set<Integer> roleIds, int offset, int limit)
40
			throws ProfitMandiBusinessException;
41
 
42
	public List<Scheme> getPaginatedSchemes(Set<Integer> roleIds, int offset, int limit)
43
			throws ProfitMandiBusinessException;
44
 
45
	void reverseSchemes(List<InventoryItem> inventoryItems, int reversalReference, String reversalReason)
46
			throws ProfitMandiBusinessException;
47
 
24264 amit.gupta 48
	void reverseSchemes(List<InventoryItem> inventoryItems, int reversalReference, String reversalReason,
49
			SchemeType schemeType) throws ProfitMandiBusinessException;
26802 tejbeer 50
 
26332 amit.gupta 51
	public double getTotalMargin(int itemId, PartnerType partnerType, LocalDateTime localDateTime);
26802 tejbeer 52
 
26684 amit.gupta 53
	Map<Integer, Float> getItemSchemeCashBack();
26802 tejbeer 54
 
27877 amit.gupta 55
	public List<Scheme> selectSchemeByPartnerType(PartnerType partnerType, LocalDate onDate, int itemId, boolean isAdmin, int offset,
27424 tejbeer 56
			int limit) throws ProfitMandiBusinessException;
26802 tejbeer 57
 
58
	// void updateSchmesForModel(int catalogId) throws ProfitMandiBusinessException;
59
 
27877 amit.gupta 60
	public long selectSchemeCount(PartnerType partnerType, LocalDate onDate, int itemId, boolean isAdmin);
27395 amit.gupta 61
 
62
	void processActivation() throws ProfitMandiBusinessException;
22608 ashik.ali 63
}