Fix per fabbisogno linee
This commit is contained in:
parent
0ae1ac87d5
commit
707c852377
@ -70,17 +70,16 @@ public class ProdFabbisognoLineeProdViewModel {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
this.mProdFabbisognoLineeProdRESTConsumer.loadFabbisogno(ordini, codMdep, jtbFasi -> {
|
||||
if (jtbFasi != null) {
|
||||
Stream.of(jtbFasi)
|
||||
.forEach(x -> {
|
||||
x.setDataInizio(dataInizio);
|
||||
x.setDataFine(dataFine);
|
||||
});
|
||||
this.sendOnLoadingEnded();
|
||||
onComplete.run(jtbFasi);
|
||||
} else {
|
||||
this.mListener.onError(new NoOrdersScheduledException());
|
||||
}
|
||||
if (jtbFasi == null) jtbFasi = new ArrayList<>();
|
||||
|
||||
Stream.of(jtbFasi)
|
||||
.forEach(x -> {
|
||||
x.setDataInizio(dataInizio);
|
||||
x.setDataFine(dataFine);
|
||||
});
|
||||
|
||||
this.sendOnLoadingEnded();
|
||||
onComplete.run(jtbFasi);
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
@ -1269,6 +1269,9 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
|
||||
public void createNewLU(Integer customNumCollo, String customSerCollo, Runnable onComplete) {
|
||||
int causaleCollo = 0;
|
||||
if (mDefaultGestioneOfUL == GestioneEnum.LAVORAZIONE && mDefaultSegnoCol == +1) causaleCollo = 1;
|
||||
|
||||
final List<CreateUDSRequestOrderDTO> orders = Stream.of(this.mTestateOrdini)
|
||||
.map(x -> new CreateUDSRequestOrderDTO()
|
||||
.setDataCons(x.getDataConsD() != null ? UtilityDate.toLocalDate(x.getDataConsD()) : null)
|
||||
@ -1282,6 +1285,7 @@ public class SpedizioneViewModel {
|
||||
.setSegno(mDefaultSegnoCol)
|
||||
.setNumCollo(customNumCollo)
|
||||
.setSerCollo(customSerCollo)
|
||||
.setCausaleCollo(causaleCollo)
|
||||
.setOrders(orders);
|
||||
|
||||
this.mColliScaricoRESTConsumer.createUDS(createUDSRequestDTO, createdUDS -> {
|
||||
@ -1517,7 +1521,7 @@ public class SpedizioneViewModel {
|
||||
//.setPrintSSCC(shouldPrint)
|
||||
.setOrderCodMdep(codMdep);
|
||||
|
||||
this.mColliSpedizioneRESTConsumer.closeUDS(closeUDSRequestDto, closeResponse -> {
|
||||
this.mColliScaricoRESTConsumer.closeUDS(closeUDSRequestDto, closeResponse -> {
|
||||
onComplete.run(closeResponse.getGeneratedMtbColts());
|
||||
}, this::sendError);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user