| Line 208... |
Line 208... |
| 208 |
model.addAttribute("vendorPricingStatus", VendorCatalogPricingStatus.values());
|
208 |
model.addAttribute("vendorPricingStatus", VendorCatalogPricingStatus.values());
|
| 209 |
|
209 |
|
| 210 |
return "vendor-catalog-pricing-request";
|
210 |
return "vendor-catalog-pricing-request";
|
| 211 |
}
|
211 |
}
|
| 212 |
|
212 |
|
| - |
|
213 |
@RequestMapping(value = "/vendorCatalogPricingPendingRequests", method = RequestMethod.GET)
|
| - |
|
214 |
public String vendorCatalogPricingPendingRequests(HttpServletRequest request, Model model) throws Exception {
|
| - |
|
215 |
return "vendor-catalog-pricing-pending-request";
|
| - |
|
216 |
}
|
| - |
|
217 |
|
| - |
|
218 |
@RequestMapping(value = "/datewiseVendorCatalogPricingPendingRequests", method = RequestMethod.GET)
|
| - |
|
219 |
public String datewiseVendorCatalogPricingPendingRequests(HttpServletRequest request, @RequestParam LocalDateTime startDate, @RequestParam LocalDateTime endDate, Model model) throws Exception {
|
| - |
|
220 |
List<VendorCatalogPricingLog> vendorCatalogPricingRequests = vendorCatalogPricingLogRepository.selectByDate(startDate, endDate);
|
| - |
|
221 |
Map<Integer, AuthUser> authUserMap = authRepository.selectAllActiveUser().stream().collect(Collectors.toMap(x -> x.getId(), x -> x));
|
| - |
|
222 |
LOGGER.info("vendorCatalogPricingRequests {}", vendorCatalogPricingRequests);
|
| - |
|
223 |
model.addAttribute("vendorCatalogPricingRequests", vendorCatalogPricingRequests);
|
| - |
|
224 |
if (!vendorCatalogPricingRequests.isEmpty()) {
|
| - |
|
225 |
Set<Integer> catalogIds = vendorCatalogPricingRequests.stream().map(x -> x.getCatalogId()).collect(Collectors.toSet());
|
| - |
|
226 |
Map<Integer, List<Item>> itemMap = itemRepository.selectAllByCatalogIds(catalogIds).stream().collect(Collectors.groupingBy(x -> x.getCatalogItemId()));
|
| - |
|
227 |
model.addAttribute("itemMap", itemMap);
|
| - |
|
228 |
}
|
| - |
|
229 |
Map<Integer, Vendor> vendorMap = vendorRepository.selectAll().stream().collect(Collectors.toMap(x -> x.getId(), x -> x));
|
| - |
|
230 |
model.addAttribute("authMap", authUserMap);
|
| - |
|
231 |
model.addAttribute("vendorMap", vendorMap);
|
| - |
|
232 |
model.addAttribute("vendorPricingStatus", VendorCatalogPricingStatus.values());
|
| - |
|
233 |
|
| - |
|
234 |
return "vendor-catalog-pricing-pending-request-table";
|
| - |
|
235 |
}
|
| - |
|
236 |
|
| 213 |
@RequestMapping(value = "/verifyVendorCatalogPricingRequest", method = RequestMethod.POST)
|
237 |
@RequestMapping(value = "/verifyVendorCatalogPricingRequest", method = RequestMethod.POST)
|
| 214 |
public String verifyVendorCatalogPricingRequest(HttpServletRequest request, @RequestParam int id, @RequestParam VendorCatalogPricingStatus status, Model model) throws Exception {
|
238 |
public String verifyVendorCatalogPricingRequest(HttpServletRequest request, @RequestParam int id, @RequestParam VendorCatalogPricingStatus status, Model model) throws Exception {
|
| 215 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
239 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 216 |
AuthUser authUser = authRepository.selectByEmailOrMobile(loginDetails.getEmailId());
|
240 |
AuthUser authUser = authRepository.selectByEmailOrMobile(loginDetails.getEmailId());
|
| 217 |
|
241 |
|