Revert "Rimossa troncatura dell'ITF-14"
This reverts commit 7555e3d90f0bcfb70e1e68c7ed00bd98f187868c.
This commit is contained in:
parent
7555e3d90f
commit
7163d91c53
@ -319,12 +319,17 @@ public class AccettazionePickingViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {
|
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {
|
||||||
|
if (barcodeProd.length() == 14) {
|
||||||
|
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||||
|
}
|
||||||
|
|
||||||
|
String finalBarcodeProd = barcodeProd;
|
||||||
this.mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
this.mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||||
|
|
||||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||||
this.searchArtFromAnag(mtbAartList.get(0), pickData, onComplete);
|
this.searchArtFromAnag(mtbAartList.get(0), pickData, onComplete);
|
||||||
} else {
|
} else {
|
||||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||||
}
|
}
|
||||||
|
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
|||||||
@ -200,6 +200,12 @@ public class PickingLiberoViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadArticolo(String barcodeProd, Ean128Model ean128Model, Runnable onComplete) {
|
private void loadArticolo(String barcodeProd, Ean128Model ean128Model, Runnable onComplete) {
|
||||||
|
if (barcodeProd.length() == 14) {
|
||||||
|
// barcodeProd = UtilityBarcode.convertITF14toNeutral(barcodeProd);
|
||||||
|
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||||
|
}
|
||||||
|
|
||||||
|
String finalBarcodeProd = barcodeProd;
|
||||||
mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||||
MtbAart articolo = mtbAartList.get(0);
|
MtbAart articolo = mtbAartList.get(0);
|
||||||
@ -211,11 +217,11 @@ public class PickingLiberoViewModel {
|
|||||||
this.dispatchArt(articolo, ean128Model);
|
this.dispatchArt(articolo, ean128Model);
|
||||||
onComplete.run();
|
onComplete.run();
|
||||||
} else {
|
} else {
|
||||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||||
}
|
}
|
||||||
|
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
|||||||
@ -149,13 +149,18 @@ public class RettificaGiacenzeViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {
|
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {
|
||||||
|
if (barcodeProd.length() == 14) {
|
||||||
|
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||||
|
}
|
||||||
|
|
||||||
|
String finalBarcodeProd = barcodeProd;
|
||||||
this.mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
this.mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
|
|
||||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||||
this.dispatchArt(mtbAartList.get(0), pickData);
|
this.dispatchArt(mtbAartList.get(0), pickData);
|
||||||
} else {
|
} else {
|
||||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||||
}
|
}
|
||||||
|
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
|||||||
@ -564,6 +564,11 @@ public class SpedizioneViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {
|
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {
|
||||||
|
if (barcodeProd.length() == 14) {
|
||||||
|
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||||
|
}
|
||||||
|
|
||||||
|
String finalBarcodeProd = barcodeProd;
|
||||||
this.mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
this.mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||||
|
|
||||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||||
@ -573,7 +578,7 @@ public class SpedizioneViewModel {
|
|||||||
mListener.onChooseArtRequest(mtbAartList, art -> this.searchArtFromAnag(art, pickData, onComplete));
|
mListener.onChooseArtRequest(mtbAartList, art -> this.searchArtFromAnag(art, pickData, onComplete));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||||
}
|
}
|
||||||
|
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
|||||||
@ -308,10 +308,15 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
|||||||
|
|
||||||
|
|
||||||
private void loadArticolo(String barcodeProd, Ean128Model ean128Model) {
|
private void loadArticolo(String barcodeProd, Ean128Model ean128Model) {
|
||||||
|
if (barcodeProd.length() == 14) {
|
||||||
|
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||||
|
}
|
||||||
|
|
||||||
|
String finalBarcodeProd = barcodeProd;
|
||||||
this.articoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
this.articoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||||
|
|
||||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||||
this.mBindings.mainSearch.setQuery(barcodeProd, false);
|
this.mBindings.mainSearch.setQuery(finalBarcodeProd, false);
|
||||||
|
|
||||||
this.searchArtInList(mtbAartList.get(0), ean128Model);
|
this.searchArtInList(mtbAartList.get(0), ean128Model);
|
||||||
|
|
||||||
|
|||||||
@ -149,6 +149,11 @@ public class DialogScanArtViewModel {
|
|||||||
|
|
||||||
|
|
||||||
private void loadArticolo(@NotNull String barcodeProd, Ean128Model ean128Model, RunnableArgssss<DialogConsts.Results, MtbAart, Ean128Model, List<MtbColr>> onComplete) {
|
private void loadArticolo(@NotNull String barcodeProd, Ean128Model ean128Model, RunnableArgssss<DialogConsts.Results, MtbAart, Ean128Model, List<MtbColr>> onComplete) {
|
||||||
|
if (barcodeProd.length() == 14) {
|
||||||
|
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||||
|
}
|
||||||
|
|
||||||
|
String finalBarcodeProd = barcodeProd;
|
||||||
this.mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
this.mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||||
|
|
||||||
@ -160,11 +165,11 @@ public class DialogScanArtViewModel {
|
|||||||
} else if (!mForceOnlyUL) {
|
} else if (!mForceOnlyUL) {
|
||||||
onComplete.run(DialogConsts.Results.YES, mtbAartList.get(0), ean128Model, null);
|
onComplete.run(DialogConsts.Results.YES, mtbAartList.get(0), ean128Model, null);
|
||||||
} else {
|
} else {
|
||||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||||
}
|
}
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user