| Line 654... |
Line 654... |
| 654 |
System.out.println("Invoice Number - " + invoiceNumber);
|
654 |
System.out.println("Invoice Number - " + invoiceNumber);
|
| 655 |
FofoOrder fofoOrder = fofoOrderRepository.selectByInvoiceNumber(invoiceNumber);
|
655 |
FofoOrder fofoOrder = fofoOrderRepository.selectByInvoiceNumber(invoiceNumber);
|
| 656 |
schemeService.processSchemeOut(fofoOrder.getId(), fofoOrder.getFofoId());
|
656 |
schemeService.processSchemeOut(fofoOrder.getId(), fofoOrder.getFofoId());
|
| 657 |
}
|
657 |
}
|
| 658 |
}
|
658 |
}
|
| - |
|
659 |
|
| - |
|
660 |
public void processSchemeIn(List<String> invoiceNumbers) throws Exception {
|
| - |
|
661 |
for(String invoiceNumber : invoiceNumbers) {
|
| - |
|
662 |
System.out.println("Invoice Number - " + invoiceNumber);
|
| - |
|
663 |
Purchase purchase = purchaseRepository.selectByPurchaseReference(invoiceNumber);
|
| - |
|
664 |
schemeService.processSchemeIn(purchase.getId(), purchase.getFofoId());
|
| - |
|
665 |
}
|
| - |
|
666 |
}
|
| 659 |
|
667 |
|
| 660 |
public void processScheme(int offset, int durationDays, boolean dryRun) throws Exception {
|
668 |
public void processScheme(int offset, int durationDays, boolean dryRun) throws Exception {
|
| 661 |
LocalDateTime startDate = LocalDateTime.of(LocalDate.now(), LocalTime.MIDNIGHT).minusDays(offset);
|
669 |
LocalDateTime startDate = LocalDateTime.of(LocalDate.now(), LocalTime.MIDNIGHT).minusDays(offset);
|
| 662 |
LocalDateTime endDate = startDate.plusDays(durationDays);
|
670 |
LocalDateTime endDate = startDate.plusDays(durationDays);
|
| 663 |
processScheme(startDate, endDate, dryRun);
|
671 |
processScheme(startDate, endDate, dryRun);
|