Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Giuseppe Scorrano 2024-01-23 18:19:11 +01:00
commit d64bc584f0
2 changed files with 15 additions and 12 deletions

View File

@ -70,17 +70,16 @@ public class ProdFabbisognoLineeProdViewModel {
this.sendOnLoadingStarted();
this.mProdFabbisognoLineeProdRESTConsumer.loadFabbisogno(ordini, codMdep, jtbFasi -> {
if (jtbFasi != null) {
if (jtbFasi == null) jtbFasi = new ArrayList<>();
Stream.of(jtbFasi)
.forEach(x -> {
x.setDataInizio(dataInizio);
x.setDataFine(dataFine);
});
this.sendOnLoadingEnded();
onComplete.run(jtbFasi);
} else {
this.mListener.onError(new NoOrdersScheduledException());
}
}, this::sendError);
}

View File

@ -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);