Subversion Repositories SmartDukaan

Rev

Rev 36103 | 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
 
22653 ashik.ali 3
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
23019 ashik.ali 4
import com.spice.profitmandi.common.model.SchemeModel;
22653 ashik.ali 5
import com.spice.profitmandi.dao.entity.catalog.Scheme;
23968 amit.gupta 6
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
26332 amit.gupta 7
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
36397 amit 8
import com.spice.profitmandi.dao.entity.fofo.SchemeItem;
24264 amit.gupta 9
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
25503 amit.gupta 10
import com.spice.profitmandi.dao.model.CreateSchemeRequest;
30121 amit.gupta 11
import org.springframework.stereotype.Service;
22653 ashik.ali 12
 
30121 amit.gupta 13
import java.time.LocalDate;
14
import java.time.LocalDateTime;
15
import java.util.List;
16
import java.util.Map;
17
import java.util.Set;
18
 
22608 ashik.ali 19
@Service
20
public interface SchemeService {
34221 tejus.loha 21
    List<String> getBlockedImeis();
26802 tejbeer 22
 
34221 tejus.loha 23
    public void saveScheme(int creatorId, CreateSchemeRequest createSchemeRequest) throws ProfitMandiBusinessException;
24
 
22859 ashik.ali 25
	public Scheme getSchemeById(int schemeId) throws ProfitMandiBusinessException;
26802 tejbeer 26
 
33248 ranu 27
    public List<SchemeModel> getAllSchemeModels(LocalDateTime startDateTime, LocalDateTime endDateTime) throws ProfitMandiBusinessException;
26802 tejbeer 28
 
22653 ashik.ali 29
	public void activeSchemeById(int schemeId) throws ProfitMandiBusinessException;
26802 tejbeer 30
 
34568 vikas.jang 31
	public void activeSchemeByIds(List<Scheme> schemeIds) throws ProfitMandiBusinessException;
32
 
35252 aman 33
	public void expireSchemeByIds(List<Scheme> schemeIds) throws ProfitMandiBusinessException;
34
 
25071 amit.gupta 35
	public void expireSchemeById(int schemeId, LocalDateTime expiryDate) throws ProfitMandiBusinessException;
26802 tejbeer 36
 
35060 amit 37
    void sendCombinedSchemesNotification(List<Scheme> schemes) throws ProfitMandiBusinessException;
26802 tejbeer 38
 
35060 amit 39
    public void processSchemeIn(int purchaseId, int retailerId) throws ProfitMandiBusinessException;
40
 
30454 amit.gupta 41
	public float processSchemeOut(int fofoOrderId, int retailerId) throws ProfitMandiBusinessException;
26802 tejbeer 42
 
30463 amit.gupta 43
	float getSpecialSupportAmount(float supportAmount, PartnerType partnerType, LocalDate onDate, int catalogId) throws ProfitMandiBusinessException;
44
 
30572 amit.gupta 45
	float getSpecialSupportAmount(float supportAmount, PartnerType partnerType, LocalDate onDate, int catalogId, float taxRate) throws ProfitMandiBusinessException;
46
 
26802 tejbeer 47
	// public void rollbackSchemeForInventoryItemId(int inventoryItemId);
33614 amit.gupta 48
	public void rollbackSchemes(List<Integer> inventoryItemIds, String rollbackReason)
26802 tejbeer 49
			throws Exception;
50
 
36103 amit 51
	public void restoreSchemes(List<Integer> inventoryItemIds, String debitNoteNumber)
52
			throws Exception;
53
 
26802 tejbeer 54
	public Map<String, Object> getSchemes(Set<Integer> roleIds, int offset, int limit)
55
			throws ProfitMandiBusinessException;
56
 
57
	public List<Scheme> getPaginatedSchemes(Set<Integer> roleIds, int offset, int limit)
58
			throws ProfitMandiBusinessException;
59
 
60
	void reverseSchemes(List<InventoryItem> inventoryItems, int reversalReference, String reversalReason)
61
			throws ProfitMandiBusinessException;
62
 
24264 amit.gupta 63
	void reverseSchemes(List<InventoryItem> inventoryItems, int reversalReference, String reversalReason,
30454 amit.gupta 64
						List<SchemeType> schemeTypes) throws ProfitMandiBusinessException;
26802 tejbeer 65
 
34709 amit.gupta 66
	//void processPartialCD(String invoiceNumber) throws ProfitMandiBusinessException;
67
 
68
	//void processNoCD(String invoiceNumber) throws ProfitMandiBusinessException;
69
 
32309 amit.gupta 70
	Scheme getStaticScheme(int fofoId) throws ProfitMandiBusinessException;
71
 
27877 amit.gupta 72
	public List<Scheme> selectSchemeByPartnerType(PartnerType partnerType, LocalDate onDate, int itemId, boolean isAdmin, int offset,
30454 amit.gupta 73
												  int limit) throws ProfitMandiBusinessException;
26802 tejbeer 74
 
30454 amit.gupta 75
	List<Scheme> selectPercentageScheme(PartnerType partnerType, LocalDate onDate, int catalogId,
76
										boolean isAdmin, int offset, int limit) throws ProfitMandiBusinessException;
77
 
27395 amit.gupta 78
	void processActivation() throws ProfitMandiBusinessException;
30454 amit.gupta 79
 
34317 amit.gupta 80
	//public static List<SchemeType> OUT_SCHEME_TYPES = Arrays.asList(SchemeType.CATEGORY, SchemeType.HYGEINE, SchemeType.OUT, SchemeType.TERTIARY);
30897 amit.gupta 81
 
82
	void processActivatedImeisForSchemes() throws ProfitMandiBusinessException;
31170 amit.gupta 83
 
35629 amit 84
	void rejectActivatedSchemeIds(List<Integer> schemeIds) throws ProfitMandiBusinessException;
85
 
33248 ranu 86
    Map<Integer, Float> getCatalogSchemeCashBack(int fofoId, List<Integer> catalogIds) throws ProfitMandiBusinessException;
32972 amit.gupta 87
 
31170 amit.gupta 88
	List<Scheme> selectSchemeByPartnerTypeFofoId(PartnerType partnerType, LocalDate onDate, int catalogId,
89
												 int fofoId, int offset, int limit) throws ProfitMandiBusinessException;
32309 amit.gupta 90
 
33432 amit.gupta 91
	void processSchemeIn(List<InventoryItem> approvedList) throws ProfitMandiBusinessException;
34709 amit.gupta 92
 
93
	//void processFullCD(String invoiceNumber) throws ProfitMandiBusinessException;
36397 amit 94
 
95
	void updateSchemeItemWindow(long schemeItemId, LocalDateTime startDate, LocalDateTime endDate, int updatedBy) throws ProfitMandiBusinessException;
96
 
97
	SchemeItem addSchemeItemWithDates(int schemeId, int catalogId, LocalDateTime startDate, LocalDateTime endDate, int createdBy) throws ProfitMandiBusinessException;
98
 
99
	List<SchemeItem> clampSchemeItems(int schemeId, LocalDateTime newStart, LocalDateTime newEnd, int updatedBy) throws ProfitMandiBusinessException;
22608 ashik.ali 100
}