| Line 100... |
Line 100... |
| 100 |
|
100 |
|
| 101 |
@RequestMapping(value = "/checkItemAvailability")
|
101 |
@RequestMapping(value = "/checkItemAvailability")
|
| 102 |
public String getItemAvailability(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.ITEM_ID) int itemId, Model model) throws ProfitMandiBusinessException{
|
102 |
public String getItemAvailability(HttpServletRequest request, @RequestParam(name = ProfitMandiConstants.ITEM_ID) int itemId, Model model) throws ProfitMandiBusinessException{
|
| 103 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
103 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 104 |
CustomCurrentInventorySnapshot customCurrentInventorySnapshot = inventoryService.checkItemAvailability(itemId, loginDetails.getFofoId());
|
104 |
CustomCurrentInventorySnapshot customCurrentInventorySnapshot = inventoryService.checkItemAvailability(itemId, loginDetails.getFofoId());
|
| 105 |
try {
|
- |
|
| 106 |
customCurrentInventorySnapshot.setIconUrl(Utils.getIconUrl(customCurrentInventorySnapshot.getCatalogItemId(), host, port, webapp));
|
105 |
customCurrentInventorySnapshot.setIconUrl(Utils.getIconUrl(customCurrentInventorySnapshot.getCatalogItemId(), host, port, webapp));
|
| 107 |
} catch (Exception e) {
|
- |
|
| 108 |
customCurrentInventorySnapshot.setIconUrl("");
|
- |
|
| 109 |
|
- |
|
| 110 |
}
|
- |
|
| 111 |
model.addAttribute("currentInventorySnapshot", new Gson().toJson(customCurrentInventorySnapshot));
|
106 |
model.addAttribute("currentInventorySnapshot", new Gson().toJson(customCurrentInventorySnapshot));
|
| 112 |
return "current-item-availability";
|
107 |
return "current-item-availability";
|
| 113 |
|
108 |
|
| 114 |
}
|
109 |
}
|
| 115 |
|
110 |
|