Subversion Repositories SmartDukaan

Rev

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

Rev 31328 Rev 31332
Line 39... Line 39...
39
import com.spice.profitmandi.dao.enumuration.auth.CollectionRemark;
39
import com.spice.profitmandi.dao.enumuration.auth.CollectionRemark;
40
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
40
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
41
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
41
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
42
import com.spice.profitmandi.dao.enumuration.dtr.RefferalStatus;
42
import com.spice.profitmandi.dao.enumuration.dtr.RefferalStatus;
43
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
43
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
-
 
44
import com.spice.profitmandi.dao.enumuration.fofo.PaymentStatus;
44
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
45
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
45
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
46
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
46
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
47
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
47
import com.spice.profitmandi.dao.enumuration.transaction.PriceDropImeiStatus;
48
import com.spice.profitmandi.dao.enumuration.transaction.PriceDropImeiStatus;
48
import com.spice.profitmandi.dao.model.PartnerDetailModel;
49
import com.spice.profitmandi.dao.model.PartnerDetailModel;
Line 61... Line 62...
61
import com.spice.profitmandi.dao.repository.user.AddressRepository;
62
import com.spice.profitmandi.dao.repository.user.AddressRepository;
62
import com.spice.profitmandi.dao.repository.user.UserRepository;
63
import com.spice.profitmandi.dao.repository.user.UserRepository;
63
import com.spice.profitmandi.service.NotificationService;
64
import com.spice.profitmandi.service.NotificationService;
64
import com.spice.profitmandi.service.PartnerInvestmentService;
65
import com.spice.profitmandi.service.PartnerInvestmentService;
65
import com.spice.profitmandi.service.PartnerStatsService;
66
import com.spice.profitmandi.service.PartnerStatsService;
-
 
67
import com.spice.profitmandi.service.integrations.CCAvenuePaymentService;
66
import com.spice.profitmandi.service.integrations.RazorpayPaymentService;
68
import com.spice.profitmandi.service.integrations.RazorpayPaymentService;
67
import com.spice.profitmandi.service.integrations.bharti.model.BAGInsuranceModel;
69
import com.spice.profitmandi.service.integrations.bharti.model.BAGInsuranceModel;
68
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
70
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
69
import com.spice.profitmandi.service.inventory.InventoryService;
71
import com.spice.profitmandi.service.inventory.InventoryService;
70
import com.spice.profitmandi.service.inventory.SaholicInventoryService;
72
import com.spice.profitmandi.service.inventory.SaholicInventoryService;
Line 1876... Line 1878...
1876
		 * subject); this.sendMailOfHtmlFormat("amit.gupta@smartdukaan.com",
1878
		 * subject); this.sendMailOfHtmlFormat("amit.gupta@smartdukaan.com",
1877
		 * statewiseSaleReport, cc, "Statewise" + subject);
1879
		 * statewiseSaleReport, cc, "Statewise" + subject);
1878
		 */
1880
		 */
1879
	}
1881
	}
1880
 
1882
 
-
 
1883
 
-
 
1884
 
1881
	public void checkRazorPayPaymentStatus() throws Exception {
1885
	public void checkRazorPayPaymentStatus() throws Exception {
1882
		List<PendingOrder> pendingOrder = pendingOrderRepository
1886
		List<PendingOrder> pendingOrder = pendingOrderRepository
1883
				.selectAllByStatus(com.spice.profitmandi.dao.enumuration.transaction.OrderStatus.PENDING);
1887
				.selectAllByStatus(com.spice.profitmandi.dao.enumuration.transaction.OrderStatus.PENDING);
1884
 
1888
 
1885
		for (PendingOrder po : pendingOrder) {
1889
		for (PendingOrder po : pendingOrder) {
Line 3549... Line 3553...
3549
			}
3553
			}
3550
		}
3554
		}
3551
 
3555
 
3552
	}
3556
	}
3553
 
3557
 
-
 
3558
	@Autowired
-
 
3559
	FofoPaymentRepository fofoPaymentRepository;
-
 
3560
 
-
 
3561
	@Autowired
-
 
3562
	CCAvenuePaymentService ccAvenuePaymentService;
-
 
3563
	public void settleCCAvePayments() throws Exception {
-
 
3564
		List<FofoPayment> fofoPayments = fofoPaymentRepository.selectAllByGatewayStatus(Gateway.CCAVENUE, PaymentStatus.INIT).stream()
-
 
3565
				.filter(x->x.getCreateTimestamp().isBefore(LocalDateTime.now().minusMinutes(30l))).collect(Collectors.toList());
-
 
3566
		for (FofoPayment fofoPayment : fofoPayments) {
-
 
3567
			ccAvenuePaymentService.updatePayment(fofoPayment);
-
 
3568
		}
-
 
3569
	}
-
 
3570
 
3554
	private void calculateInterest(Loan loan, Map<LoanReferenceType, Double> loanStatusAmount, int loanStatementId)
3571
	private void calculateInterest(Loan loan, Map<LoanReferenceType, Double> loanStatusAmount, int loanStatementId)
3555
			throws ProfitMandiBusinessException {
3572
			throws ProfitMandiBusinessException {
3556
		LoanStatement loanStatement = loanStatementRepository.selectById(loanStatementId);
3573
		LoanStatement loanStatement = loanStatementRepository.selectById(loanStatementId);
3557
 
3574
 
3558
		if (loanStatement.getLoanId() == loan.getId()) {
3575
		if (loanStatement.getLoanId() == loan.getId()) {