Subversion Repositories SmartDukaan

Rev

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

Rev 29234 Rev 30121
Line 1... Line 1...
1
package com.spice.profitmandi.service.scheme;
1
package com.spice.profitmandi.service.scheme;
2
 
2
 
3
import java.time.LocalDate;
-
 
4
import java.time.LocalDateTime;
-
 
5
import java.util.Arrays;
-
 
6
import java.util.List;
-
 
7
import java.util.Map;
-
 
8
import java.util.Set;
-
 
9
 
-
 
10
import org.springframework.stereotype.Service;
-
 
11
 
-
 
12
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
3
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
13
import com.spice.profitmandi.common.model.SchemeModel;
4
import com.spice.profitmandi.common.model.SchemeModel;
14
import com.spice.profitmandi.dao.entity.catalog.Scheme;
5
import com.spice.profitmandi.dao.entity.catalog.Scheme;
15
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
6
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
16
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
7
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
17
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
8
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
18
import com.spice.profitmandi.dao.model.CreateSchemeRequest;
9
import com.spice.profitmandi.dao.model.CreateSchemeRequest;
-
 
10
import org.springframework.stereotype.Service;
-
 
11
 
-
 
12
import java.time.LocalDate;
-
 
13
import java.time.LocalDateTime;
-
 
14
import java.util.Arrays;
-
 
15
import java.util.List;
-
 
16
import java.util.Map;
-
 
17
import java.util.Set;
19
 
18
 
20
@Service
19
@Service
21
public interface SchemeService {
20
public interface SchemeService {
22
	public void saveScheme(int creatorId, CreateSchemeRequest createSchemeRequest) throws ProfitMandiBusinessException;
21
	public void saveScheme(int creatorId, CreateSchemeRequest createSchemeRequest) throws ProfitMandiBusinessException;
23
 
22
 
Line 49... Line 48...
49
	void reverseSchemes(List<InventoryItem> inventoryItems, int reversalReference, String reversalReason,
48
	void reverseSchemes(List<InventoryItem> inventoryItems, int reversalReference, String reversalReason,
50
			List<SchemeType> schemeTypes) throws ProfitMandiBusinessException;
49
			List<SchemeType> schemeTypes) throws ProfitMandiBusinessException;
51
 
50
 
52
	public double getTotalMargin(int itemId, PartnerType partnerType, LocalDateTime localDateTime);
51
	public double getTotalMargin(int itemId, PartnerType partnerType, LocalDateTime localDateTime);
53
 
52
 
54
	Map<Integer, Float> getItemSchemeCashBack();
53
	Map<Integer, Float> getCatalogSchemeCashBack();
55
 
54
 
56
	public List<Scheme> selectSchemeByPartnerType(PartnerType partnerType, LocalDate onDate, int itemId, boolean isAdmin, int offset,
55
	public List<Scheme> selectSchemeByPartnerType(PartnerType partnerType, LocalDate onDate, int itemId, boolean isAdmin, int offset,
57
			int limit) throws ProfitMandiBusinessException;
56
			int limit) throws ProfitMandiBusinessException;
58
 
57
 
59
	// void updateSchmesForModel(int catalogId) throws ProfitMandiBusinessException;
-
 
60
 
-
 
61
	public long selectSchemeCount(PartnerType partnerType, LocalDate onDate, int itemId, boolean isAdmin);
-
 
62
 
-
 
63
	void processActivation() throws ProfitMandiBusinessException;
58
	void processActivation() throws ProfitMandiBusinessException;
64
	
59
	
65
	public static final List<SchemeType> OUT_SCHEME_TYPES = Arrays.asList(SchemeType.CATEGORY, SchemeType.HYGEINE, SchemeType.OUT, SchemeType.TERTIARY);
60
	public static final List<SchemeType> OUT_SCHEME_TYPES = Arrays.asList(SchemeType.CATEGORY, SchemeType.HYGEINE, SchemeType.OUT, SchemeType.TERTIARY);
66
}
61
}