Commit 5e83414e authored by Rob Tomsick's avatar Rob Tomsick

Nevermind, barcode search is handled in search ctrl.

parent 0658d99f
......@@ -248,29 +248,7 @@ implements DictionaryService
public List<Product>
findByBarcode(Barcode<?> barcode, int limit)
{
if (! (barcode instanceof UPCA))
{
return Collections.emptyList();
}
final UPCA upc = (UPCA) barcode;
final List<NDC> ndcs =
Stream.of(NDC.possibleNDCs(upc))
/* strip packaging code */
.map(ndc -> new NDC(ndc.labelerCode(), ndc.productCode()))
.collect(Collectors.toList());
List<UUID> ids =
this.ctx.select(field(name("id"), UUID.class))
.from(D_TABLE)
.where(field(name("ndc"), String.class)
.in(ndcs.stream()
.map(String :: valueOf)
.collect(Collectors.toList())))
.fetch(field(name("id"), UUID.class));
return this.loadProducts(ids);
return Collections.emptyList();
}
private final List<Product>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment