Subversion Repositories SmartDukaan

Rev

Rev 35823 | Rev 35878 | 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
 
34288 ranu 53
	List<Loan> getDefaultLoanWithoutLimit();
54
 
31399 tejbeer 55
	public List<Loan> getDueDateCrossLoan();
56
 
35110 ranu 57
	public List<Loan> getAllActiveLoan();
58
 
30936 tejbeer 59
	public boolean isDefaultLoan(int loanId, LocalDate time);
31020 tejbeer 60
 
32172 jai.hind 61
 
62
		LoanSummary getLoanSummary();
33419 amit.gupta 63
 
35316 ranu 64
	Map<String, StateWiseLoanSummary> getLoanSummaryStateWise() throws ProfitMandiBusinessException;
65
 
33419 amit.gupta 66
    void checkLoans();
33663 amit.gupta 67
 
68
    void createLoanForBilling(int transactionId, double invoiceAmount, String invoiceNumber) throws ProfitMandiBusinessException;
69
 
34731 amit.gupta 70
	void settleBlockedLoan(int transactionId, double amountToRelease) throws ProfitMandiBusinessException;
33663 amit.gupta 71
 
33900 amit.gupta 72
	Loan getLimitFromTransactionId(int transactionId) throws ProfitMandiBusinessException;
73
 
33663 amit.gupta 74
	double settleLoan(Loan loan) throws ProfitMandiBusinessException;
33903 amit.gupta 75
 
35295 amit 76
	void resetHardLimit() throws ProfitMandiBusinessException;
34731 amit.gupta 77
 
35394 amit 78
	void releaseBlockedLimit(Loan blockedLoan, double limitToRelease) throws ProfitMandiBusinessException;
35131 amit 79
 
35811 amit 80
	CreditSummary getCreditSummary(int fofoId);
81
 
82
	CreditSummary getCreditSummaryForOrder(int fofoId, double orderAmount) throws ProfitMandiBusinessException;
83
 
84
	Map<Integer, BulkCreditSummary> getCreditSummaryBulk();
35823 amit 85
 
86
	double getAvailableFreshMoney(int fofoId) throws ProfitMandiBusinessException;
30859 tejbeer 87
}