| Line 323... |
Line 323... |
| 323 |
@RequestMapping(value = "/getPricing", method = RequestMethod.GET)
|
323 |
@RequestMapping(value = "/getPricing", method = RequestMethod.GET)
|
| 324 |
public String getPricing(HttpServletRequest request, @RequestParam int vendorId, @RequestParam int itemId, @RequestParam LocalDate onDate, Model model) throws Exception {
|
324 |
public String getPricing(HttpServletRequest request, @RequestParam int vendorId, @RequestParam int itemId, @RequestParam LocalDate onDate, Model model) throws Exception {
|
| 325 |
List<Integer> checkRequiredCategoryId = Arrays.asList(10006, 10010);
|
325 |
List<Integer> checkRequiredCategoryId = Arrays.asList(10006, 10010);
|
| 326 |
List<String> checkRequiredCategoryGroup = Arrays.asList("Handset", "Tablets");
|
326 |
List<String> checkRequiredCategoryGroup = Arrays.asList("Handset", "Tablets");
|
| 327 |
Item item = itemRepository.selectById(itemId);
|
327 |
Item item = itemRepository.selectById(itemId);
|
| - |
|
328 |
List<String> brandsIgnoreToCheckCategory = Arrays.asList("Dummy", "Live Demo");
|
| - |
|
329 |
if (!brandsIgnoreToCheckCategory.contains(item.getBrand())) {
|
| 328 |
if (checkRequiredCategoryId.contains(item.getCategoryId()) || checkRequiredCategoryGroup.contains(item.getProductGroup())) {
|
330 |
if (checkRequiredCategoryId.contains(item.getCategoryId()) || checkRequiredCategoryGroup.contains(item.getProductGroup())) {
|
| 329 |
CategorisedCatalog categorisedCatalog = categorisedCatalogRepository.getCurrentCatalogMovement(item.getCatalogItemId());
|
331 |
CategorisedCatalog categorisedCatalog = categorisedCatalogRepository.getCurrentCatalogMovement(item.getCatalogItemId());
|
| 330 |
if (categorisedCatalog == null || categorisedCatalog.getStatus().getValue().isEmpty()) {
|
332 |
if (categorisedCatalog == null || categorisedCatalog.getStatus().getValue().isEmpty()) {
|
| 331 |
model.addAttribute("response1", mvcResponseSender.createResponseString(false));
|
333 |
model.addAttribute("response1", mvcResponseSender.createResponseString(false));
|
| 332 |
return "response";
|
334 |
return "response";
|
| - |
|
335 |
}
|
| 333 |
}
|
336 |
}
|
| 334 |
}
|
337 |
}
|
| 335 |
VendorPriceCircularModel vendorPriceCircularModel = vendorCatalogPricingLogRepository.getVendorPriceOnDate(vendorId, item.getCatalogItemId(), onDate);
|
338 |
VendorPriceCircularModel vendorPriceCircularModel = vendorCatalogPricingLogRepository.getVendorPriceOnDate(vendorId, item.getCatalogItemId(), onDate);
|
| 336 |
LOGGER.info("vendorCatalogPricing {}", vendorPriceCircularModel);
|
339 |
LOGGER.info("vendorCatalogPricing {}", vendorPriceCircularModel);
|
| 337 |
model.addAttribute("response1", mvcResponseSender.createResponseString(vendorPriceCircularModel));
|
340 |
model.addAttribute("response1", mvcResponseSender.createResponseString(vendorPriceCircularModel));
|