| Line 523... |
Line 523... |
| 523 |
});
|
523 |
});
|
| 524 |
model.addAttribute("inventoryItems", inventoryItems);
|
524 |
model.addAttribute("inventoryItems", inventoryItems);
|
| 525 |
return "activated-imeis";
|
525 |
return "activated-imeis";
|
| 526 |
}
|
526 |
}
|
| 527 |
|
527 |
|
| - |
|
528 |
@RequestMapping(value = "/agedAppleImeis")
|
| - |
|
529 |
public String agedAppleImeis(HttpServletRequest request, Model model) throws ProfitMandiBusinessException {
|
| - |
|
530 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| - |
|
531 |
|
| - |
|
532 |
LocalDateTime beforeDate = LocalDate.now().atStartOfDay()
|
| - |
|
533 |
.minusDays(ProfitMandiConstants.AGED_STOCK_APPLE_DAYS);
|
| - |
|
534 |
List<InventoryItem> inventoryItems =
|
| - |
|
535 |
inventoryItemRepository.selectAgedAppleStock(loginDetails.getFofoId(), beforeDate);
|
| - |
|
536 |
inventoryItems.stream().forEach(x -> {
|
| - |
|
537 |
try {
|
| - |
|
538 |
x.setItem(itemRepository.selectById(x.getItemId()));
|
| - |
|
539 |
} catch (Exception e) {
|
| - |
|
540 |
e.printStackTrace();
|
| - |
|
541 |
}
|
| - |
|
542 |
});
|
| - |
|
543 |
model.addAttribute("inventoryItems", inventoryItems);
|
| - |
|
544 |
model.addAttribute("agedDays", ProfitMandiConstants.AGED_STOCK_APPLE_DAYS);
|
| - |
|
545 |
return "aged-apple-imeis";
|
| - |
|
546 |
}
|
| - |
|
547 |
|
| 528 |
@RequestMapping(value = "/activated-imeis-grn-pending")
|
548 |
@RequestMapping(value = "/activated-imeis-grn-pending")
|
| 529 |
public String activatedImeisGrnPending(HttpServletRequest request, Model model) throws ProfitMandiBusinessException {
|
549 |
public String activatedImeisGrnPending(HttpServletRequest request, Model model) throws ProfitMandiBusinessException {
|
| 530 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
550 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 531 |
|
551 |
|
| 532 |
List<Order> openOrders = orderRepository.selectGrnTimestampNull(loginDetails.getFofoId(), Arrays.asList(OrderStatus.DELIVERY_SUCCESS));
|
552 |
List<Order> openOrders = orderRepository.selectGrnTimestampNull(loginDetails.getFofoId(), Arrays.asList(OrderStatus.DELIVERY_SUCCESS));
|