Subversion Repositories SmartDukaan

Rev

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

Rev 34307 Rev 34308
Line 3... Line 3...
3
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
3
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
4
import com.spice.profitmandi.dao.entity.transaction.Loan;
4
import com.spice.profitmandi.dao.entity.transaction.Loan;
5
import com.spice.profitmandi.dao.entity.transaction.Transaction;
5
import com.spice.profitmandi.dao.entity.transaction.Transaction;
6
import com.spice.profitmandi.dao.repository.transaction.LoanRepository;
6
import com.spice.profitmandi.dao.repository.transaction.LoanRepository;
7
import com.spice.profitmandi.dao.repository.transaction.TransactionRepository;
7
import com.spice.profitmandi.dao.repository.transaction.TransactionRepository;
-
 
8
import com.spice.profitmandi.service.transaction.SDCreditService;
8
import org.apache.logging.log4j.LogManager;
9
import org.apache.logging.log4j.LogManager;
9
import org.apache.logging.log4j.Logger;
10
import org.apache.logging.log4j.Logger;
10
import org.springframework.beans.factory.annotation.Autowired;
11
import org.springframework.beans.factory.annotation.Autowired;
11
import org.springframework.beans.factory.annotation.Value;
12
import org.springframework.beans.factory.annotation.Value;
12
import org.springframework.stereotype.Component;
13
import org.springframework.stereotype.Component;
Line 26... Line 27...
26
    TransactionRepository transactionRepository;
27
    TransactionRepository transactionRepository;
27
 
28
 
28
    @Autowired
29
    @Autowired
29
    LoanRepository loanRepository;
30
    LoanRepository loanRepository;
30
 
31
 
-
 
32
    @Autowired
-
 
33
    SDCreditService sdCreditService;
-
 
34
 
31
    public void test(List<Integer> loanIds) throws Exception {
35
    public void test(List<Integer> loanIds) throws Exception {
32
        System.out.println("test start");
36
        System.out.println("test start");
33
        this.findLoanTransactionMapingAccordingLoan(loanIds);
37
        this.findLoanTransactionMapingAccordingLoan(loanIds);
34
        System.out.println("test end");
38
        System.out.println("test end");
35
 
39
 
36
    }
40
    }
37
 
41
 
-
 
42
    public void createLoanForBillingByTransactionIdAndInvoiceNumber(int transactionId, double invoiceAmount, String invoiceNumber) throws Exception {
-
 
43
        sdCreditService.createLoanForBilling(transactionId, invoiceAmount, invoiceNumber);
-
 
44
 
-
 
45
    }
-
 
46
 
38
 
47
 
39
 
48
 
40
    public Map<Integer,Integer> findLoanTransactionMapingAccordingLoan(List<Integer> loanIds) throws ProfitMandiBusinessException {
49
    public Map<Integer,Integer> findLoanTransactionMapingAccordingLoan(List<Integer> loanIds) throws ProfitMandiBusinessException {
41
 
50
 
42
        Map<Integer, Integer> transactionLoanMap = new HashMap<>();
51
        Map<Integer, Integer> transactionLoanMap = new HashMap<>();