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.sendOnLoadingStarted();
this.mProdFabbisognoLineeProdRESTConsumer.loadFabbisogno(ordini, codMdep, jtbFasi -> { this.mProdFabbisognoLineeProdRESTConsumer.loadFabbisogno(ordini, codMdep, jtbFasi -> {
if (jtbFasi != null) { if (jtbFasi == null) jtbFasi = new ArrayList<>();
Stream.of(jtbFasi)
.forEach(x -> { Stream.of(jtbFasi)
x.setDataInizio(dataInizio); .forEach(x -> {
x.setDataFine(dataFine); x.setDataInizio(dataInizio);
}); x.setDataFine(dataFine);
this.sendOnLoadingEnded(); });
onComplete.run(jtbFasi);
} else { this.sendOnLoadingEnded();
this.mListener.onError(new NoOrdersScheduledException()); onComplete.run(jtbFasi);
}
}, this::sendError); }, this::sendError);
} }

View File

@ -1269,6 +1269,9 @@ public class SpedizioneViewModel {
} }
public void createNewLU(Integer customNumCollo, String customSerCollo, Runnable onComplete) { 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) final List<CreateUDSRequestOrderDTO> orders = Stream.of(this.mTestateOrdini)
.map(x -> new CreateUDSRequestOrderDTO() .map(x -> new CreateUDSRequestOrderDTO()
.setDataCons(x.getDataConsD() != null ? UtilityDate.toLocalDate(x.getDataConsD()) : null) .setDataCons(x.getDataConsD() != null ? UtilityDate.toLocalDate(x.getDataConsD()) : null)
@ -1282,6 +1285,7 @@ public class SpedizioneViewModel {
.setSegno(mDefaultSegnoCol) .setSegno(mDefaultSegnoCol)
.setNumCollo(customNumCollo) .setNumCollo(customNumCollo)
.setSerCollo(customSerCollo) .setSerCollo(customSerCollo)
.setCausaleCollo(causaleCollo)
.setOrders(orders); .setOrders(orders);
this.mColliScaricoRESTConsumer.createUDS(createUDSRequestDTO, createdUDS -> { this.mColliScaricoRESTConsumer.createUDS(createUDSRequestDTO, createdUDS -> {
@ -1517,7 +1521,7 @@ public class SpedizioneViewModel {
//.setPrintSSCC(shouldPrint) //.setPrintSSCC(shouldPrint)
.setOrderCodMdep(codMdep); .setOrderCodMdep(codMdep);
this.mColliSpedizioneRESTConsumer.closeUDS(closeUDSRequestDto, closeResponse -> { this.mColliScaricoRESTConsumer.closeUDS(closeUDSRequestDto, closeResponse -> {
onComplete.run(closeResponse.getGeneratedMtbColts()); onComplete.run(closeResponse.getGeneratedMtbColts());
}, this::sendError); }, this::sendError);