in rettifica cerca per codice articolo se code128

This commit is contained in:
Valerio Castellana 2022-10-12 12:13:16 +02:00
parent 46e438e0e9
commit 8134a64a43
2 changed files with 5 additions and 3 deletions

View File

@ -20,7 +20,7 @@ public class BarcodeRESTConsumer extends _BaseRESTConsumer {
IBarcodeCustomization barcodeCustomization = ClassRouter.getInstance(ClassRouter.PATH.BARCODE_CUSTOMIZATION);
if(barcodeCustomization != null && barcodeCustomization.shouldForceToEan13(barcodeObj.getStringValue())){
if (barcodeCustomization != null && barcodeCustomization.shouldForceToEan13(barcodeObj.getStringValue())) {
Ean128Model ean128Model = new Ean128Model();
ean128Model.Gtin = barcodeObj.getStringValue();
onComplete.run(ean128Model);
@ -30,7 +30,7 @@ public class BarcodeRESTConsumer extends _BaseRESTConsumer {
String ean128 = barcodeObj.getStringValue().replaceAll("" + ((char) 29), "|");
BarcodeRESTConsumerService barcodeRESTConsumerService = RESTBuilder.getService(BarcodeRESTConsumerService.class);
barcodeRESTConsumerService.decodeEan128(ean128).enqueue(new Callback<ServiceRESTResponse<Ean128Model>>() {
barcodeRESTConsumerService.decodeEan128(ean128).enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<Ean128Model>> call, Response<ServiceRESTResponse<Ean128Model>> response) {
analyzeAnswer(response, "DecodeEan128", onComplete, onFailed);

View File

@ -145,7 +145,9 @@ public class RettificaGiacenzeViewModel {
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
onComplete.run();
}
}, this::sendError);
}, (e) -> {
this.searchArtInt(barcodeScanDTO.getStringValue(), onComplete);
});
}
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {