Fix warning partita scaduta e blocco per partita inattiva
This commit is contained in:
@@ -65,33 +65,31 @@ public class OrdiniUscitaElencoViewModel {
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
new Thread(() -> {
|
||||
Date loadingStartDate = new Date();
|
||||
Date loadingStartDate = new Date();
|
||||
|
||||
this.mOrdiniRESTConsumer.getOrdiniInevasi(this.mCurrentCodMdep, mCurrentGestioneOrd,
|
||||
ordiniLavorazione -> {
|
||||
this.mOrderList.postValue(Stream.of(ordiniLavorazione)
|
||||
.map(x -> {
|
||||
try {
|
||||
return OrdiniUscitaElencoDTO.fromParent(x);
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.toList());
|
||||
this.mOrdiniRESTConsumer.getOrdiniInevasi(this.mCurrentCodMdep, mCurrentGestioneOrd,
|
||||
ordiniLavorazione -> {
|
||||
this.mOrderList.postValue(Stream.of(ordiniLavorazione)
|
||||
.map(x -> {
|
||||
try {
|
||||
return OrdiniUscitaElencoDTO.fromParent(x);
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.toList());
|
||||
|
||||
long forcedDelaySecs = (new Date().getTime() - loadingStartDate.getTime()) / 1000;
|
||||
long forcedDelaySecs = (new Date().getTime() - loadingStartDate.getTime()) / 1000;
|
||||
|
||||
if (2 - forcedDelaySecs > 0) {
|
||||
try {
|
||||
Thread.sleep((2 - forcedDelaySecs) * 1000);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
if (2 - forcedDelaySecs > 0) {
|
||||
try {
|
||||
Thread.sleep((2 - forcedDelaySecs) * 1000);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
this.sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
}).start();
|
||||
this.sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -773,6 +773,8 @@ public class SpedizioneViewModel {
|
||||
MtbColt refMtbColt = matchedItem.getRefMtbColt();
|
||||
if (matchedItem.getMtbColts() != null && matchedItem.getMtbColts().size() == 1) {
|
||||
refMtbColt = matchedItem.getMtbColts().get(0);
|
||||
} else if(matchedItem.getTempPickData().getSourceMtbColt() != null){
|
||||
refMtbColt = matchedItem.getTempPickData().getSourceMtbColt();
|
||||
}
|
||||
MtbColr refMtbColr = refMtbColt != null ? refMtbColt.getMtbColr().get(0) : null;
|
||||
this.dispatchOrdineRow(matchedItem, refMtbColt, refMtbColr, refMtbColr == null);
|
||||
|
||||
Reference in New Issue
Block a user