Subversion Repositories SmartDukaan

Rev

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

Rev 35053 Rev 35056
Line 1134... Line 1134...
1134
            System.out.println("Refund Started - " + orderId);
1134
            System.out.println("Refund Started - " + orderId);
1135
            orderRepository.refundOrder(orderId, "vinay.p", "Long awaited cancellation", OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
1135
            orderRepository.refundOrder(orderId, "vinay.p", "Long awaited cancellation", OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
1136
            System.out.println("Refund Ended");
1136
            System.out.println("Refund Ended");
1137
        }*/
1137
        }*/
1138
        //System.out.println(warehouseSupplierInvoiceRepository.selectWarehouseItemAgeing(LocalDateTime.now().minusDays(10), LocalDateTime.now(), null, 0, null));
1138
        //System.out.println(warehouseSupplierInvoiceRepository.selectWarehouseItemAgeing(LocalDateTime.now().minusDays(10), LocalDateTime.now(), null, 0, null));
1139
        purSaleService.moreThen10DaysEgedStockReport();
1139
        //purSaleService.moreThen10DaysEgedStockReport();
-
 
1140
        List<String> invoices = Arrays.asList("NSDLNOI16527","NSDLNOI16366", "NSDLNOI16394", "NSDLNOI16460");
-
 
1141
        List<Loan> loans = new ArrayList<>();
-
 
1142
        for (String invoice : invoices) {
-
 
1143
            loans.add(loanRepository.selectLoanByInvoice(invoice));
-
 
1144
        }
-
 
1145
        loans.stream().sorted(Comparator.comparing(x->x.getCreatedOn())).forEach(x-> {
-
 
1146
            try {
-
 
1147
                sdCreditService.settleLoan(x);
-
 
1148
            } catch (ProfitMandiBusinessException e) {
-
 
1149
                throw new RuntimeException(e);
-
 
1150
            }
-
 
1151
        });
1140
        //Utils.sendMailWithAttachments(googleMailSender, new String[]{"amit.gupta@smartdukaan.com"}, null, "DTDC AWb", "PFA");*/
1152
        //Utils.sendMailWithAttachments(googleMailSender, new String[]{"amit.gupta@smartdukaan.com"}, null, "DTDC AWb", "PFA");*/
1141
    }
1153
    }
1142
 
1154
 
1143
    @Autowired
1155
    @Autowired
1144
    LoanTransactionRepository loanTransactionRepository;
1156
    LoanTransactionRepository loanTransactionRepository;