Subversion Repositories SmartDukaan

Rev

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

Rev 33631 Rev 33638
Line 74... Line 74...
74
import com.spice.profitmandi.dao.service.solr.FofoSolr;
74
import com.spice.profitmandi.dao.service.solr.FofoSolr;
75
import com.spice.profitmandi.service.*;
75
import com.spice.profitmandi.service.*;
76
import com.spice.profitmandi.service.integrations.CCAvenuePaymentService;
76
import com.spice.profitmandi.service.integrations.CCAvenuePaymentService;
77
import com.spice.profitmandi.service.integrations.RazorpayPaymentService;
77
import com.spice.profitmandi.service.integrations.RazorpayPaymentService;
78
import com.spice.profitmandi.service.integrations.bharti.model.BAGInsuranceModel;
78
import com.spice.profitmandi.service.integrations.bharti.model.BAGInsuranceModel;
-
 
79
import com.spice.profitmandi.service.integrations.gstpro.GstProAuthService;
79
import com.spice.profitmandi.service.integrations.psismart.PsiSmartService;
80
import com.spice.profitmandi.service.integrations.psismart.PsiSmartService;
80
import com.spice.profitmandi.service.integrations.smartping.SmartPingService;
81
import com.spice.profitmandi.service.integrations.smartping.SmartPingService;
81
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
82
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
82
import com.spice.profitmandi.service.inventory.*;
83
import com.spice.profitmandi.service.inventory.*;
83
import com.spice.profitmandi.service.offers.OfferService;
84
import com.spice.profitmandi.service.offers.OfferService;
Line 118... Line 119...
118
import org.springframework.beans.factory.annotation.Autowired;
119
import org.springframework.beans.factory.annotation.Autowired;
119
import org.springframework.beans.factory.annotation.Qualifier;
120
import org.springframework.beans.factory.annotation.Qualifier;
120
import org.springframework.beans.factory.annotation.Value;
121
import org.springframework.beans.factory.annotation.Value;
121
import org.springframework.core.io.ByteArrayResource;
122
import org.springframework.core.io.ByteArrayResource;
122
import org.springframework.core.io.InputStreamSource;
123
import org.springframework.core.io.InputStreamSource;
-
 
124
import org.springframework.data.redis.cache.RedisCacheManager;
123
import org.springframework.mail.javamail.JavaMailSender;
125
import org.springframework.mail.javamail.JavaMailSender;
124
import org.springframework.mail.javamail.MimeMessageHelper;
126
import org.springframework.mail.javamail.MimeMessageHelper;
125
import org.springframework.stereotype.Component;
127
import org.springframework.stereotype.Component;
126
import org.springframework.transaction.annotation.Transactional;
128
import org.springframework.transaction.annotation.Transactional;
127
 
129
 
Line 1031... Line 1033...
1031
    GenericRepository genericRepository;
1033
    GenericRepository genericRepository;
1032
 
1034
 
1033
    @Autowired
1035
    @Autowired
1034
    PriceCircularService priceCircularService;
1036
    PriceCircularService priceCircularService;
1035
 
1037
 
-
 
1038
    @Autowired
-
 
1039
    RedisCacheManager redisFortnightlyCacheManage;
-
 
1040
 
-
 
1041
    @Autowired
-
 
1042
    GstProAuthService gstProAuthService;
1036
    public void test() throws Exception {
1043
    public void test() throws Exception {
-
 
1044
        System.out.println(gstProAuthService.getAuthToken("34AACCC1596Q002"));
-
 
1045
        //redisFortnightlyCacheManage.getCache("gstAuthToken").evict("34AACCC1596Q002");
1037
//        LocalDate startDate = LocalDate.of(2024, Month.MAY, 1);
1046
//        LocalDate startDate = LocalDate.of(2024, Month.MAY, 1);
1038
//        List<PriceDropIMEI> priceDropIMEIList = priceDropIMEIRepository.selectAllByCreditedBetween(startDate.atStartOfDay(), startDate.plusMonths(1).atTime(Utils.MAX_TIME));
1047
//        List<PriceDropIMEI> priceDropIMEIList = priceDropIMEIRepository.selectAllByCreditedBetween(startDate.atStartOfDay(), startDate.plusMonths(1).atTime(Utils.MAX_TIME));
1039
//        Set<Integer> inventoryItemIds = priceDropIMEIList.stream().map(x -> x.getInventoryItemId()).collect(Collectors.toSet());
1048
//        Set<Integer> inventoryItemIds = priceDropIMEIList.stream().map(x -> x.getInventoryItemId()).collect(Collectors.toSet());
1040
//        List<InventoryItem> inventoryItems = inventoryItemRepository.selectByIds(inventoryItemIds);
1049
//        List<InventoryItem> inventoryItems = inventoryItemRepository.selectByIds(inventoryItemIds);
1041
//        List<String> headers = Arrays.asList("FofoId", "Serial Number", "Original DP", "DP(Inc PDs)", "PDs credited", "Fixed amount", "Discount", "Percentage Amount", "Margins Calc.", "Margins credited", "SoldOut");
1050
//        List<String> headers = Arrays.asList("FofoId", "Serial Number", "Original DP", "DP(Inc PDs)", "PDs credited", "Fixed amount", "Discount", "Percentage Amount", "Margins Calc.", "Margins credited", "SoldOut");
Line 3773... Line 3782...
3773
                if (interestAmount == null) {
3782
                if (interestAmount == null) {
3774
                    interestAmount = (double) 0;
3783
                    interestAmount = (double) 0;
3775
                }
3784
                }
3776
                double principalAmount = loanStatusAmount.get(LoanReferenceType.PRINCIPAL);
3785
                double principalAmount = loanStatusAmount.get(LoanReferenceType.PRINCIPAL);
3777
                //if it can be settled
3786
                //if it can be settled
3778
                if (userWallet.getAmount() >= 100 || userWallet.getAmount() > Math.abs(interestAmount + principalAmount)) {
3787
                if (userWallet.getAmount() >= 50 || userWallet.getAmount() > Math.abs(interestAmount + principalAmount)) {
3779
                    double paidAmount = 0;
3788
                    double paidAmount = 0;
3780
                    if (userWallet.getAmount() > Math.abs(interestAmount)) {
3789
                    if (userWallet.getAmount() > Math.abs(interestAmount)) {
3781
 
3790
 
3782
                        LOGGER.info("interestAmount b {}", interestAmount);
3791
                        LOGGER.info("interestAmount b {}", interestAmount);
3783
 
3792