| Line 254... |
Line 254... |
| 254 |
}
|
254 |
}
|
| 255 |
model.addAttribute("response1", mvcResponseSender.createResponseString(pm));
|
255 |
model.addAttribute("response1", mvcResponseSender.createResponseString(pm));
|
| 256 |
return "response";
|
256 |
return "response";
|
| 257 |
}
|
257 |
}
|
| 258 |
|
258 |
|
| - |
|
259 |
/**
|
| - |
|
260 |
* Shared partner item typeahead. Feeds price drop, warehouse purchase (PO),
|
| - |
|
261 |
* catalog-item, combo and prebooking.
|
| - |
|
262 |
*
|
| - |
|
263 |
* <p>{@code activeOnly} selects the basis: false (default) is the historical
|
| - |
|
264 |
* whole-catalogue list, kept for screens that inspect or edit existing
|
| - |
|
265 |
* records; true restricts to items with a live tag_listing, which is what
|
| - |
|
266 |
* creation screens send so a delisted SKU cannot be picked.
|
| - |
|
267 |
*/
|
| 259 |
@RequestMapping(value = "/item", method = RequestMethod.GET)
|
268 |
@RequestMapping(value = "/item", method = RequestMethod.GET)
|
| 260 |
public String getItemPricing(HttpServletRequest request, Model model, @RequestParam String query,
|
269 |
public String getItemPricing(HttpServletRequest request, Model model, @RequestParam String query,
|
| 261 |
@RequestParam boolean anyColor) throws Throwable {
|
270 |
@RequestParam boolean anyColor,
|
| - |
|
271 |
@RequestParam(required = false, defaultValue = "false") boolean activeOnly)
|
| - |
|
272 |
throws Throwable {
|
| 262 |
String query1 = query.toLowerCase();
|
273 |
String query1 = query.toLowerCase();
|
| 263 |
|
274 |
|
| 264 |
List<ItemDescriptionModel> partnersItemDescription = inventoryService
|
275 |
List<ItemDescriptionModel> partnersItemDescription = inventoryService
|
| 265 |
.getAllPartnerItemStringDescription(anyColor).parallelStream()
|
276 |
.getAllPartnerItemStringDescription(anyColor, activeOnly).parallelStream()
|
| 266 |
.filter(x -> x.getItemDescription().toLowerCase().matches(".*?" + query1 + ".*?"))
|
277 |
.filter(x -> x.getItemDescription().toLowerCase().matches(".*?" + query1 + ".*?"))
|
| 267 |
.collect(Collectors.toList());
|
278 |
.collect(Collectors.toList());
|
| 268 |
LOGGER.info("partnersItemDescription" + partnersItemDescription);
|
279 |
LOGGER.info("partnersItemDescription" + partnersItemDescription);
|
| 269 |
|
280 |
|
| 270 |
model.addAttribute("response1", mvcResponseSender.createResponseString(partnersItemDescription));
|
281 |
model.addAttribute("response1", mvcResponseSender.createResponseString(partnersItemDescription));
|