| Line 592... |
Line 592... |
| 592 |
public ResponseEntity<?> accountReco(HttpServletRequest request, @RequestParam LocalDate closingDate, Model model) throws Exception {
|
592 |
public ResponseEntity<?> accountReco(HttpServletRequest request, @RequestParam LocalDate closingDate, Model model) throws Exception {
|
| 593 |
boolean isAdmin = roleManager.isAdmin(cookiesProcessor.getCookiesObject(request).getRoleIds());
|
593 |
boolean isAdmin = roleManager.isAdmin(cookiesProcessor.getCookiesObject(request).getRoleIds());
|
| 594 |
if (!isAdmin) {
|
594 |
if (!isAdmin) {
|
| 595 |
throw new ProfitMandiBusinessException("Unauthorised access", "PartnerId", "Permission Denied");
|
595 |
throw new ProfitMandiBusinessException("Unauthorised access", "PartnerId", "Permission Denied");
|
| 596 |
}
|
596 |
}
|
| 597 |
LocalDateTime closingDateTime = LocalDate.now().atStartOfDay().plusDays(1);
|
597 |
LocalDateTime closingDateTime = closingDate.plusDays(1).atStartOfDay();
|
| 598 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers();
|
598 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers();
|
| 599 |
Set<Integer> retailersSet = customRetailerMap.keySet();
|
599 |
Set<Integer> retailersSet = customRetailerMap.keySet();
|
| 600 |
|
600 |
|
| 601 |
Map<Integer, Float> closingPurchaseMap = orderRepository.selectOpeningAmount(closingDateTime, retailersSet);
|
601 |
Map<Integer, Float> closingPurchaseMap = orderRepository.selectOpeningAmount(closingDateTime, retailersSet);
|
| 602 |
|
602 |
|