Fix null point in approvvigionamento linee
This commit is contained in:
parent
b6bd8d5e01
commit
1c9f4de437
@ -0,0 +1,11 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class NoOrdersScheduledException extends Exception {
|
||||
|
||||
public NoOrdersScheduledException() {
|
||||
super(UtilityResources.getString(R.string.no_orders_scheduled));
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ import com.annimon.stream.Stream;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.exception.NoOrdersScheduledException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.dto.ProdFabbisognoLineeProdDTO;
|
||||
@ -29,13 +30,17 @@ public class ProdFabbisognoLineeProdViewModel {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
this.mProdFabbisognoLineeProdRESTConsumer.loadFabbisogno(startDate, endDate, codMdep, jtbFasi -> {
|
||||
if (jtbFasi != null) Stream.of(jtbFasi)
|
||||
.forEach(x -> x
|
||||
.setDataInizio(startDate)
|
||||
.setDataFine(endDate));
|
||||
if (jtbFasi != null){
|
||||
Stream.of(jtbFasi)
|
||||
.forEach(x -> x
|
||||
.setDataInizio(startDate)
|
||||
.setDataFine(endDate));
|
||||
|
||||
this.sendOnLoadingEnded();
|
||||
onComplete.run(jtbFasi);
|
||||
this.sendOnLoadingEnded();
|
||||
onComplete.run(jtbFasi);
|
||||
}else{
|
||||
this.mListener.onError(new NoOrdersScheduledException());
|
||||
}
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
@ -215,6 +215,7 @@
|
||||
<string name="no_item_to_pick_text">Nessun articolo da prelevare</string>
|
||||
<string name="no_docs_to_show_text">Nessun documento da mostrare</string>
|
||||
<string name="no_orders_to_pick_text">Nessun ordine da evadere</string>
|
||||
<string name="no_orders_scheduled">Nessun ordine programmato sulla linea per il periodo selezionato</string>
|
||||
<string name="no_available_order_on_line">Nessun ordine compatibile</string>
|
||||
<string name="no_item_text">Nessun articolo</string>
|
||||
<string name="no_item_in_recupera_materiale">Nessuna UL versata in produzione</string>
|
||||
|
||||
@ -219,6 +219,7 @@
|
||||
<string name="no_item_to_pick_text">No items to pick</string>
|
||||
<string name="no_docs_to_show_text">No documents to show</string>
|
||||
<string name="no_orders_to_pick_text">No orders to dispatch</string>
|
||||
<string name="no_orders_scheduled">No orders scheduled on the line for the selected period: </string>
|
||||
<string name="no_inventory_available_text">No inventory available</string>
|
||||
|
||||
<string name="no_available_order_on_line">no compatible orders found</string>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user