Subversion Repositories SmartDukaan

Rev

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

Rev 35094 Rev 35102
Line 1125... Line 1125...
1125
        });
1125
        });
1126
 
1126
 
1127
    }
1127
    }
1128
 
1128
 
1129
    public void test() throws Exception {
1129
    public void test() throws Exception {
-
 
1130
        purSaleService.moreThen10DaysEgedStockReport();
-
 
1131
        //System.out.println(schemeService.testRedis(1, 2L));
-
 
1132
        //System.out.println(schemeService.testRedis(1, null));
1130
       // abmReportSender.sendAbmSmartCartReport();
1133
       // abmReportSender.sendAbmSmartCartReport();
1131
            //this.sendOverDueReport();
1134
            //this.sendOverDueReport();
1132
        /*List<Integer> orderIds = Arrays.asList(1929879,1932372,1932377,1932386,1932396,1935221,1935563,1935564,1945144,1955256,1955271,1955294,1961255,1961256,1972821,1972823,1972824,1972825,1972826,1974250,1974252,1974253,1974254,1974255,1974256,1974242,1974244,1974245,1974246,1974247,1974248,1976610,1978095,1978136,1978130,1978174,1978156,1978158,1978167,1978169,1978160,1978179,1978175,1978180,1978201,1978200,1978202,1978192,1978198,1978207,1978204,1978457,1979781,1979783,1979784,1979787,1982412,1982413,1986531,1986532,1986533,1991006,1991628,1991629,2016001,2018921,2042948,2047031,2058500,2058522,2058519,2058520,2058546,2058559,2058568,2058575,2058574,2058598,2058594,2058618,2058633,2066491,2067110,2067113,2067118,2067120,2067123,2067132,2067125,2067127,2069974,2069970,2069976,2069985,2069987);
1135
        /*List<Integer> orderIds = Arrays.asList(1929879,1932372,1932377,1932386,1932396,1935221,1935563,1935564,1945144,1955256,1955271,1955294,1961255,1961256,1972821,1972823,1972824,1972825,1972826,1974250,1974252,1974253,1974254,1974255,1974256,1974242,1974244,1974245,1974246,1974247,1974248,1976610,1978095,1978136,1978130,1978174,1978156,1978158,1978167,1978169,1978160,1978179,1978175,1978180,1978201,1978200,1978202,1978192,1978198,1978207,1978204,1978457,1979781,1979783,1979784,1979787,1982412,1982413,1986531,1986532,1986533,1991006,1991628,1991629,2016001,2018921,2042948,2047031,2058500,2058522,2058519,2058520,2058546,2058559,2058568,2058575,2058574,2058598,2058594,2058618,2058633,2066491,2067110,2067113,2067118,2067120,2067123,2067132,2067125,2067127,2069974,2069970,2069976,2069985,2069987);
1133
        for (Integer orderId : orderIds) {
1136
        for (Integer orderId : orderIds) {
1134
            System.out.println("Refund Started - " + orderId);
1137
            System.out.println("Refund Started - " + orderId);
1135
            orderRepository.refundOrder(orderId, "vinay.p", "Long awaited cancellation", OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
1138
            orderRepository.refundOrder(orderId, "vinay.p", "Long awaited cancellation", OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
1136
            System.out.println("Refund Ended");
1139
            System.out.println("Refund Ended");
1137
        }*/
1140
        }*/
1138
        //System.out.println(warehouseSupplierInvoiceRepository.selectWarehouseItemAgeing(LocalDateTime.now().minusDays(10), LocalDateTime.now(), null, 0, null));
1141
        //System.out.println(warehouseSupplierInvoiceRepository.selectWarehouseItemAgeing(LocalDateTime.now().minusDays(10), LocalDateTime.now(), null, 0, null));
1139
        //purSaleService.moreThen10DaysEgedStockReport();
1142
        /*Offer offer = offerRepository.selectById(6820);
-
 
1143
        offerService.sendWhatsapp(offer, Arrays.asList(175140233),"https://images.smartdukaan.com/uploads/campaigns/image2025-09-24/offer-6820.png");*/
1140
        List<String> invoices = Arrays.asList("NSDLNOI16527","NSDLNOI16366", "NSDLNOI16394", "NSDLNOI16460");
1144
        /*List<String> invoices = Arrays.asList("NSDLNOI16527","NSDLNOI16366", "NSDLNOI16394", "NSDLNOI16460");
1141
        List<Loan> loans = new ArrayList<>();
1145
        List<Loan> loans = new ArrayList<>();
1142
        for (String invoice : invoices) {
1146
        for (String invoice : invoices) {
1143
            loans.add(loanRepository.selectLoanByInvoice(invoice));
1147
            loans.add(loanRepository.selectLoanByInvoice(invoice));
1144
        }
1148
        }
1145
        loans.stream().sorted(Comparator.comparing(x->x.getCreatedOn())).forEach(x-> {
1149
        loans.stream().sorted(Comparator.comparing(x->x.getCreatedOn())).forEach(x-> {
1146
            try {
1150
            try {
1147
                sdCreditService.settleLoan(x);
1151
                sdCreditService.settleLoan(x);
1148
            } catch (ProfitMandiBusinessException e) {
1152
            } catch (ProfitMandiBusinessException e) {
1149
                throw new RuntimeException(e);
1153
                throw new RuntimeException(e);
1150
            }
1154
            }
1151
        });
1155
        });*/
1152
        //Utils.sendMailWithAttachments(googleMailSender, new String[]{"amit.gupta@smartdukaan.com"}, null, "DTDC AWb", "PFA");*/
1156
        //Utils.sendMailWithAttachments(googleMailSender, new String[]{"amit.gupta@smartdukaan.com"}, null, "DTDC AWb", "PFA");*/
1153
    }
1157
    }
1154
 
1158
 
1155
    @Autowired
1159
    @Autowired
1156
    LoanTransactionRepository loanTransactionRepository;
1160
    LoanTransactionRepository loanTransactionRepository;