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