Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
30859 tejbeer 1
package com.spice.profitmandi.service.transaction;
2
 
3
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
4
import com.spice.profitmandi.dao.entity.transaction.Loan;
34288 ranu 5
import com.spice.profitmandi.dao.entity.transaction.LoanSummary;
30936 tejbeer 6
import com.spice.profitmandi.dao.entity.transaction.SDCreditRequirement;
35316 ranu 7
import com.spice.profitmandi.dao.entity.transaction.StateWiseLoanSummary;
30936 tejbeer 8
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
30859 tejbeer 9
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
10
import com.spice.profitmandi.dao.model.SDCreditResponseOut;
11
 
35811 amit 12
import com.spice.profitmandi.dao.model.BulkCreditSummary;
13
import com.spice.profitmandi.dao.model.CreditSummary;
14
 
34288 ranu 15
import java.math.BigDecimal;
16
import java.time.LocalDate;
17
import java.time.LocalDateTime;
18
import java.util.List;
19
import java.util.Map;
20
 
35131 amit 21
 
30859 tejbeer 22
public interface SDCreditService {
23
 
33297 amit.gupta 24
	void fundWallet(int fofoId) throws ProfitMandiBusinessException;
25
 
34731 amit.gupta 26
	void fundWallet(int fofoId, double amountToFund, String reasonToFund) throws ProfitMandiBusinessException;
27
 
33339 amit.gupta 28
	//This will create loan irrespective of sanctions and increases the overall ultization
33696 amit.gupta 29
	Loan createLoan(int fofoId, double creditAmountRequired, int freeDays, String creditReason) throws ProfitMandiBusinessException;
33339 amit.gupta 30
 
34661 ranu 31
	BlockLoanIdSanctionId createSDDirectOrder(int userId, double amountRequired, int freeCreditDays)
30859 tejbeer 32
			throws ProfitMandiBusinessException;
33
 
31518 amit.gupta 34
	BigDecimal getAvailableAmount(int fofoId);
30859 tejbeer 35
 
35394 amit 36
	BigDecimal getUtilizationAmount(int fofoId);
30859 tejbeer 37
 
31518 amit.gupta 38
	void createLoanStatement(LoanReferenceType interest, BigDecimal interestAccrued, int fofoId, int loanId,
30859 tejbeer 39
			String description, LocalDateTime businessDate);
40
 
31518 amit.gupta 41
	void addInterest(LocalDate from, LocalDate to, Loan loan, Map<LoanReferenceType, Double> loanStatusAmount);
30859 tejbeer 42
 
34453 amit.gupta 43
	SDCreditResponseOut sdDirectService(int retailerId) throws ProfitMandiBusinessException;
30859 tejbeer 44
 
31518 amit.gupta 45
	CreditRisk getCurrentRisk(SDCreditRequirement sdCreditRequirement, LocalDateTime firstBillingDate);
30936 tejbeer 46
 
31518 amit.gupta 47
	boolean isDefaultPartner(int fofoId);
30936 tejbeer 48
 
31518 amit.gupta 49
	void updateRisk();
30936 tejbeer 50
 
34727 amit.gupta 51
	List<Loan> getDefaultLoans();
30936 tejbeer 52
 
31399 tejbeer 53
	public List<Loan> getDueDateCrossLoan();
54
 
35110 ranu 55
	public List<Loan> getAllActiveLoan();
56
 
30936 tejbeer 57
	public boolean isDefaultLoan(int loanId, LocalDate time);
31020 tejbeer 58
 
32172 jai.hind 59
 
60
		LoanSummary getLoanSummary();
33419 amit.gupta 61
 
35316 ranu 62
	Map<String, StateWiseLoanSummary> getLoanSummaryStateWise() throws ProfitMandiBusinessException;
63
 
33419 amit.gupta 64
    void checkLoans();
33663 amit.gupta 65
 
66
    void createLoanForBilling(int transactionId, double invoiceAmount, String invoiceNumber) throws ProfitMandiBusinessException;
67
 
36557 amit 68
    void convertExpiredFlagshipCredits() throws ProfitMandiBusinessException;
69
 
70
    void convertFlagshipCreditToLoan(Loan flagshipLimit, String trigger, String modelName) throws ProfitMandiBusinessException;
71
 
36560 amit 72
    boolean hasActiveFlagshipLimits(int fofoId);
73
 
36562 amit 74
    java.util.Set<Integer> getActiveFlagshipCatalogIds(java.util.List<Integer> catalogIds);
75
 
36560 amit 76
    void convertFlagshipOnSale(int fofoId, java.util.Set<Integer> soldFlagshipCatalogIds) throws ProfitMandiBusinessException;
77
 
34731 amit.gupta 78
	void settleBlockedLoan(int transactionId, double amountToRelease) throws ProfitMandiBusinessException;
33663 amit.gupta 79
 
35955 amit 80
	void increaseBlockedLimit(int transactionId, int fofoId, double amount) throws ProfitMandiBusinessException;
81
 
33900 amit.gupta 82
	Loan getLimitFromTransactionId(int transactionId) throws ProfitMandiBusinessException;
83
 
33663 amit.gupta 84
	double settleLoan(Loan loan) throws ProfitMandiBusinessException;
33903 amit.gupta 85
 
35295 amit 86
	void resetHardLimit() throws ProfitMandiBusinessException;
34731 amit.gupta 87
 
35394 amit 88
	void releaseBlockedLimit(Loan blockedLoan, double limitToRelease) throws ProfitMandiBusinessException;
35131 amit 89
 
35811 amit 90
	CreditSummary getCreditSummary(int fofoId);
91
 
92
	CreditSummary getCreditSummaryForOrder(int fofoId, double orderAmount) throws ProfitMandiBusinessException;
93
 
94
	Map<Integer, BulkCreditSummary> getCreditSummaryBulk();
35823 amit 95
 
96
	double getAvailableFreshMoney(int fofoId) throws ProfitMandiBusinessException;
30859 tejbeer 97
}