| Line 280... |
Line 280... |
| 280 |
}
|
280 |
}
|
| 281 |
}
|
281 |
}
|
| 282 |
|
282 |
|
| 283 |
@RequestMapping(value = "/vendorItem", method = RequestMethod.GET)
|
283 |
@RequestMapping(value = "/vendorItem", method = RequestMethod.GET)
|
| 284 |
public String getItemPricing(HttpServletRequest request, Model model, @RequestParam int vendorId,
|
284 |
public String getItemPricing(HttpServletRequest request, Model model, @RequestParam int vendorId,
|
| 285 |
@RequestParam String query) throws Throwable {
|
285 |
@RequestParam String query) throws Exception {
|
| 286 |
String query1 = query.toLowerCase();
|
286 |
String query1 = query.toLowerCase();
|
| 287 |
int itemId = 0;
|
287 |
int itemId = 0;
|
| 288 |
try {
|
288 |
try {
|
| 289 |
itemId = Integer.parseInt(query1);
|
289 |
itemId = Integer.parseInt(query1);
|
| 290 |
addVendorPricingIfMissing(itemId, vendorId);
|
290 |
addVendorPricingIfMissing(itemId, vendorId);
|
| 291 |
} catch (ProfitMandiBusinessException e) {
|
291 |
} catch (NumberFormatException e) {
|
| 292 |
LOGGER.info("Caught in the block - {}", e.getStackTrace());
|
292 |
LOGGER.info("Ignore number format exception");
|
| 293 |
// e.printStackTrace();
|
293 |
// e.printStackTrace();
|
| 294 |
}
|
294 |
}
|
| 295 |
LOGGER.info("Vendor Id - {}", vendorId);
|
295 |
LOGGER.info("Vendor Id - {}", vendorId);
|
| 296 |
List<ItemDescriptionModel> partnersItemDescription = warehouseService.getAllPartnerItemStringDescription(vendorId).parallelStream().filter(x -> x.getItemDescription().toLowerCase().matches(".*?" + query1 + ".*?")).collect(Collectors.toList());
|
296 |
List<ItemDescriptionModel> partnersItemDescription = warehouseService.getAllPartnerItemStringDescription(vendorId).parallelStream().filter(x -> x.getItemDescription().toLowerCase().matches(".*?" + query1 + ".*?")).collect(Collectors.toList());
|
| 297 |
LOGGER.info("partnersItemDescription" + partnersItemDescription);
|
297 |
LOGGER.info("partnersItemDescription" + partnersItemDescription);
|