Subversion Repositories SmartDukaan

Rev

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

Rev 36578 Rev 36958
Line 1... Line 1...
1
package com.spice.profitmandi.service.transaction;
1
package com.spice.profitmandi.service.transaction;
2
 
2
 
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.Order;
5
import com.spice.profitmandi.dao.entity.transaction.LoanSummary;
6
import com.spice.profitmandi.dao.entity.transaction.LoanSummary;
6
import com.spice.profitmandi.dao.entity.transaction.SDCreditRequirement;
7
import com.spice.profitmandi.dao.entity.transaction.SDCreditRequirement;
7
import com.spice.profitmandi.dao.entity.transaction.StateWiseLoanSummary;
8
import com.spice.profitmandi.dao.entity.transaction.StateWiseLoanSummary;
8
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
9
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
9
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
10
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
Line 63... Line 64...
63
 
64
 
64
    void checkLoans();
65
    void checkLoans();
65
 
66
 
66
    void createLoanForBilling(int transactionId, double invoiceAmount, String invoiceNumber) throws ProfitMandiBusinessException;
67
    void createLoanForBilling(int transactionId, double invoiceAmount, String invoiceNumber) throws ProfitMandiBusinessException;
67
 
68
 
-
 
69
    void createLoanForBilling(int transactionId, double invoiceAmount, String invoiceNumber, List<FlagshipUnit> flagshipUnits) throws ProfitMandiBusinessException;
-
 
70
 
-
 
71
    /** One flagship credit unit = one physical device (IMEI) and its credit amount. */
-
 
72
    List<FlagshipUnit> computeFlagshipUnits(List<Order> billedOrders);
-
 
73
 
-
 
74
    final class FlagshipUnit {
-
 
75
        private final String imei;
-
 
76
        private final double amount;
-
 
77
 
-
 
78
        public FlagshipUnit(String imei, double amount) {
-
 
79
            this.imei = imei;
-
 
80
            this.amount = amount;
-
 
81
        }
-
 
82
 
-
 
83
        public String getImei() { return imei; }
-
 
84
        public double getAmount() { return amount; }
-
 
85
    }
-
 
86
 
68
    void convertExpiredFlagshipCredits() throws ProfitMandiBusinessException;
87
    void convertExpiredFlagshipCredits() throws ProfitMandiBusinessException;
69
 
88
 
70
    void convertFlagshipCreditToLoan(Loan flagshipLimit, String trigger, String modelName) throws ProfitMandiBusinessException;
89
    void convertFlagshipCreditToLoan(Loan flagshipLimit, String trigger, String modelName) throws ProfitMandiBusinessException;
71
 
90
 
72
    boolean hasActiveFlagshipLimits(int fofoId);
91
    boolean hasActiveFlagshipLimits(int fofoId);
73
 
92
 
74
    java.util.Set<Integer> getActiveFlagshipCatalogIds(java.util.List<Integer> catalogIds);
93
    java.util.Set<Integer> getActiveFlagshipCatalogIds(java.util.List<Integer> catalogIds);
75
 
94
 
76
    java.util.Set<Integer> getActiveFlagshipCatalogIds(java.util.List<Integer> catalogIds, java.time.LocalDate asOfDate);
95
    java.util.Set<Integer> getActiveFlagshipCatalogIds(java.util.List<Integer> catalogIds, java.time.LocalDate asOfDate);
77
 
96
 
78
    void convertFlagshipOnSale(int fofoId, java.util.Set<Integer> soldCatalogIds) throws ProfitMandiBusinessException;
97
    void convertFlagshipOnSale(int fofoId, java.util.Set<String> soldImeis) throws ProfitMandiBusinessException;
79
 
98
 
80
	void settleBlockedLoan(int transactionId, double amountToRelease) throws ProfitMandiBusinessException;
99
	void settleBlockedLoan(int transactionId, double amountToRelease) throws ProfitMandiBusinessException;
81
 
100
 
82
	void increaseBlockedLimit(int transactionId, int fofoId, double amount) throws ProfitMandiBusinessException;
101
	void increaseBlockedLimit(int transactionId, int fofoId, double amount) throws ProfitMandiBusinessException;
83
 
102