Subversion Repositories SmartDukaan

Rev

Rev 34661 | Rev 34731 | 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;
7
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
30859 tejbeer 8
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
9
import com.spice.profitmandi.dao.model.SDCreditResponseOut;
34288 ranu 10
import org.springframework.stereotype.Service;
30859 tejbeer 11
 
34288 ranu 12
import java.math.BigDecimal;
13
import java.time.LocalDate;
14
import java.time.LocalDateTime;
15
import java.util.List;
16
import java.util.Map;
17
 
30859 tejbeer 18
@Service
19
public interface SDCreditService {
20
 
33297 amit.gupta 21
	void fundWallet(int fofoId) throws ProfitMandiBusinessException;
22
 
33339 amit.gupta 23
	//This will create loan irrespective of sanctions and increases the overall ultization
33696 amit.gupta 24
	Loan createLoan(int fofoId, double creditAmountRequired, int freeDays, String creditReason) throws ProfitMandiBusinessException;
33339 amit.gupta 25
 
34661 ranu 26
	BlockLoanIdSanctionId createSDDirectOrder(int userId, double amountRequired, int freeCreditDays)
30859 tejbeer 27
			throws ProfitMandiBusinessException;
28
 
31518 amit.gupta 29
	BigDecimal getAvailableAmount(int fofoId);
30859 tejbeer 30
 
31518 amit.gupta 31
	long getUtilizationAmount(int fofoId);
30859 tejbeer 32
 
31518 amit.gupta 33
	void createLoanStatement(LoanReferenceType interest, BigDecimal interestAccrued, int fofoId, int loanId,
30859 tejbeer 34
			String description, LocalDateTime businessDate);
35
 
31518 amit.gupta 36
	void addInterest(LocalDate from, LocalDate to, Loan loan, Map<LoanReferenceType, Double> loanStatusAmount);
30859 tejbeer 37
 
34453 amit.gupta 38
	SDCreditResponseOut sdDirectService(int retailerId) throws ProfitMandiBusinessException;
30859 tejbeer 39
 
31518 amit.gupta 40
	CreditRisk getCurrentRisk(SDCreditRequirement sdCreditRequirement, LocalDateTime firstBillingDate);
30936 tejbeer 41
 
31518 amit.gupta 42
	boolean isDefaultPartner(int fofoId);
30936 tejbeer 43
 
31518 amit.gupta 44
	void updateRisk();
30936 tejbeer 45
 
34727 amit.gupta 46
	List<Loan> getDefaultLoans();
30936 tejbeer 47
 
34288 ranu 48
	List<Loan> getDefaultLoanWithoutLimit();
49
 
31399 tejbeer 50
	public List<Loan> getDueDateCrossLoan();
51
 
30936 tejbeer 52
	public boolean isDefaultLoan(int loanId, LocalDate time);
31020 tejbeer 53
 
32172 jai.hind 54
 
55
		LoanSummary getLoanSummary();
33419 amit.gupta 56
 
57
    void checkLoans();
33663 amit.gupta 58
 
59
    void createLoanForBilling(int transactionId, double invoiceAmount, String invoiceNumber) throws ProfitMandiBusinessException;
60
 
33696 amit.gupta 61
	void settleBlockedLoan(int transactionId) throws ProfitMandiBusinessException;
33663 amit.gupta 62
 
33900 amit.gupta 63
	Loan getLimitFromTransactionId(int transactionId) throws ProfitMandiBusinessException;
64
 
33663 amit.gupta 65
	double settleLoan(Loan loan) throws ProfitMandiBusinessException;
33903 amit.gupta 66
 
67
	void resetHardLimit();
30859 tejbeer 68
}