Implementato nuovo servizio di modifica righe UDS (rimossa processEntity)
This commit is contained in:
parent
165568b7e3
commit
72773deaf1
@ -15,6 +15,8 @@ import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||
@ -137,6 +139,23 @@ public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements C
|
||||
});
|
||||
}
|
||||
|
||||
public void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||
|
||||
colliLavorazioneRESTConsumerService.editUDSRow(editUDSRowRequestDTO)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<EditUDSRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDSRowResponseDTO>> response) {
|
||||
analyzeAnswer(response, "lavorazione/editUDSRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<EditUDSRowResponseDTO>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||
|
||||
@ -8,6 +8,8 @@ import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||
@ -35,6 +37,9 @@ public interface ColliLavorazioneRESTConsumerService {
|
||||
@POST("wms/lavorazione/insertUDSRow")
|
||||
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||
|
||||
@POST("wms/lavorazione/editUDSRow")
|
||||
Call<ServiceRESTResponse<EditUDSRowResponseDTO>> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
|
||||
|
||||
@POST("wms/lavorazione/deleteUDSRow")
|
||||
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
||||
|
||||
|
||||
@ -15,6 +15,8 @@ import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||
@ -133,6 +135,23 @@ public class ColliSpedizioneRESTConsumer extends _BaseRESTConsumer implements Co
|
||||
});
|
||||
}
|
||||
|
||||
public void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||
|
||||
colliSpedizioneRESTConsumerService.editUDSRow(editUDSRowRequestDTO)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<EditUDSRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDSRowResponseDTO>> response) {
|
||||
analyzeAnswer(response, "spedizione/editUDSRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<EditUDSRowResponseDTO>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||
|
||||
|
||||
@ -8,6 +8,8 @@ import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||
@ -35,6 +37,9 @@ public interface ColliSpedizioneRESTConsumerService {
|
||||
@POST("wms/spedizione/insertUDSRow")
|
||||
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||
|
||||
@POST("wms/spedizione/editUDSRow")
|
||||
Call<ServiceRESTResponse<EditUDSRowResponseDTO>> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
|
||||
|
||||
@POST("wms/spedizione/deleteUDSRow")
|
||||
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||
|
||||
@ -26,5 +27,7 @@ public interface ColliScaricoRESTConsumerInterface {
|
||||
|
||||
void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||
|
||||
void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||
|
||||
void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed);
|
||||
}
|
||||
|
||||
@ -0,0 +1,50 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
|
||||
public class EditUDSRowRequestDTO {
|
||||
|
||||
private MtbColr sourceMtbColr;
|
||||
private BigDecimal newQtaTot;
|
||||
private BigDecimal newQtaCnf;
|
||||
private BigDecimal newNumCnf;
|
||||
|
||||
|
||||
public MtbColr getSourceMtbColr() {
|
||||
return sourceMtbColr;
|
||||
}
|
||||
|
||||
public EditUDSRowRequestDTO setSourceMtbColr(MtbColr sourceMtbColr) {
|
||||
this.sourceMtbColr = sourceMtbColr;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNewQtaTot() {
|
||||
return newQtaTot;
|
||||
}
|
||||
|
||||
public EditUDSRowRequestDTO setNewQtaTot(BigDecimal newQtaTot) {
|
||||
this.newQtaTot = newQtaTot;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNewQtaCnf() {
|
||||
return newQtaCnf;
|
||||
}
|
||||
|
||||
public EditUDSRowRequestDTO setNewQtaCnf(BigDecimal newQtaCnf) {
|
||||
this.newQtaCnf = newQtaCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNewNumCnf() {
|
||||
return newNumCnf;
|
||||
}
|
||||
|
||||
public EditUDSRowRequestDTO setNewNumCnf(BigDecimal newNumCnf) {
|
||||
this.newNumCnf = newNumCnf;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
|
||||
public class EditUDSRowResponseDTO {
|
||||
private MtbColr savedMtbColr;
|
||||
|
||||
public MtbColr getSavedMtbColr() {
|
||||
return savedMtbColr;
|
||||
}
|
||||
|
||||
public EditUDSRowResponseDTO setSavedMtbColr(MtbColr savedMtbColr) {
|
||||
this.savedMtbColr = savedMtbColr;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -69,6 +69,7 @@ import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestOrderDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
@ -1221,18 +1222,6 @@ public class SpedizioneViewModel {
|
||||
public void saveNewRow(PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
|
||||
// final MtbColr mtbColr = new MtbColr()
|
||||
// .setCausale(mDefaultCausaleOfUL)
|
||||
// .setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
||||
// .setPartitaMag(partitaMag)
|
||||
// .setDataScadPartita(dataScad)
|
||||
// .setQtaCol(qtaTot)
|
||||
// .setQtaCnf(qtaCnf)
|
||||
// .setNumCnf(numCnf)
|
||||
// .setDescrizione(pickingObjectDTO.getMtbAart().getDescrizioneEstesa())
|
||||
// .setDatetimeRow(UtilityDate.getDateInstance());
|
||||
|
||||
//TODO: Al posto di prelevare la prima riga bisognerebbe controllare se c'è ne una che corrisponde con la partita richiesta
|
||||
final MtbColr mtbColrToDispatch = pickingObjectDTO.getTempPickData() != null &&
|
||||
pickingObjectDTO.getTempPickData().getSourceMtbColt() != null &&
|
||||
@ -1240,40 +1229,6 @@ public class SpedizioneViewModel {
|
||||
pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().size() > 0 ?
|
||||
pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().get(0) : null;
|
||||
|
||||
|
||||
// if (mtbColrToDispatch != null) {
|
||||
// if (UtilityString.isNullOrEmpty(mCurrentMtbColt.getCodTcol()))
|
||||
// mCurrentMtbColt.setCodTcol(UtilityString.empty2null(pickingObjectDTO.getTempPickData().getSourceMtbColt().getCodTcol()));
|
||||
//
|
||||
// mtbColr.setCodJcom(UtilityString.empty2null(mtbColrToDispatch.getCodJcom()))
|
||||
// .setSerColloRif(UtilityString.empty2null(mtbColrToDispatch.getSerCollo()))
|
||||
// .setNumColloRif(mtbColrToDispatch.getNumCollo())
|
||||
// .setGestioneRif(UtilityString.empty2null(mtbColrToDispatch.getGestione()))
|
||||
// .setDataColloRif(UtilityString.empty2null(mtbColrToDispatch.getDataColloS()));
|
||||
//
|
||||
//
|
||||
// if (mtbColrToDispatch.getPesoNettoKg() != null) {
|
||||
// //Proporzione
|
||||
// BigDecimal pesoNettoKg = UtilityBigDecimal.divide(UtilityBigDecimal.multiply(qtaTot, mtbColrToDispatch.getPesoNettoKg()), mtbColrToDispatch.getQtaCol());
|
||||
// mtbColr.setPesoNettoKg(pesoNettoKg);
|
||||
// }
|
||||
//
|
||||
// if (mtbColrToDispatch.getPesoLordoKg() != null) {
|
||||
// //Proporzione
|
||||
// BigDecimal pesoLordoKg = UtilityBigDecimal.divide(UtilityBigDecimal.multiply(qtaTot, mtbColrToDispatch.getPesoLordoKg()), mtbColrToDispatch.getQtaCol());
|
||||
// mtbColr.setPesoLordoKg(pesoLordoKg);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||
//
|
||||
// MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||
// cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
||||
//
|
||||
// cloneMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||
// cloneMtbColt.getMtbColr().add((MtbColr) mtbColr.clone());
|
||||
|
||||
|
||||
boolean shouldPrint = !shouldCloseLU || mCurrentMtbColt.getMtbColr().size() != 0;
|
||||
|
||||
//Se è l'unico articolo del collo (controllo se è uguale a 0 perché ancora non è stato aggiunto nella lista delle righe)
|
||||
@ -1285,15 +1240,21 @@ public class SpedizioneViewModel {
|
||||
return;
|
||||
}
|
||||
|
||||
var clonedSourceMtbColr = (MtbColr) mtbColrToDispatch.clone();
|
||||
clonedSourceMtbColr.setMtbPartitaMag(null)
|
||||
.setMtbAart(null);
|
||||
|
||||
var clonedTargetMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||
clonedTargetMtbColt.setMtbColr(null);
|
||||
|
||||
var insertUDSRowRequestDto = new InsertUDSRowRequestDTO()
|
||||
.setSourceMtbColr(mtbColrToDispatch)
|
||||
.setSourceMtbColr(clonedSourceMtbColr)
|
||||
.setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
||||
.setQtaTot(qtaTot)
|
||||
.setQtaCnf(qtaCnf)
|
||||
.setNumCnf(numCnf)
|
||||
.setPartitaMag(partitaMag)
|
||||
.setTargetMtbColt(mCurrentMtbColt);
|
||||
.setTargetMtbColt(clonedTargetMtbColt);
|
||||
|
||||
if (dataScad != null)
|
||||
insertUDSRowRequestDto
|
||||
@ -1341,89 +1302,91 @@ public class SpedizioneViewModel {
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
|
||||
// boolean finalShouldPrint = shouldPrint;
|
||||
// mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, value -> {
|
||||
//
|
||||
// mtbColr
|
||||
// .setDataCollo(value.getDataColloS())
|
||||
// .setNumCollo(value.getNumCollo())
|
||||
// .setGestione(value.getGestione())
|
||||
// .setSerCollo(value.getSerCollo())
|
||||
// .setRiga(value.getMtbColr().get(value.getMtbColr().size() - 1).getRiga())
|
||||
// .setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
|
||||
// .setMtbAart(pickingObjectDTO.getMtbAart());
|
||||
//
|
||||
//
|
||||
// if (mEnableGiacenza) {
|
||||
// MtbColr refMtbColr = new MtbColr()
|
||||
// .setCodMart(mtbColr.getCodMart())
|
||||
// .setPartitaMag(mtbColr.getPartitaMag())
|
||||
// .setCodTagl(mtbColr.getCodTagl())
|
||||
// .setCodCol(mtbColr.getCodCol());
|
||||
//
|
||||
// if (refMtbColt != null) {
|
||||
//
|
||||
// MtbColr originalRefMtbColr = refMtbColt.getMtbColr() != null && refMtbColt.getMtbColr().size() > 0 ? refMtbColt.getMtbColr().get(0) : null;
|
||||
//
|
||||
// if (originalRefMtbColr != null) {
|
||||
// refMtbColr.setId(originalRefMtbColr.getId());
|
||||
// }
|
||||
//
|
||||
// refMtbColr.setNumCollo(refMtbColt.getNumCollo())
|
||||
// .setDataCollo(refMtbColt.getDataColloS())
|
||||
// .setSerCollo(refMtbColt.getSerCollo())
|
||||
// .setGestione(refMtbColt.getGestione());
|
||||
// }
|
||||
// mtbColr.setRefMtbColr(refMtbColr);
|
||||
// }
|
||||
//
|
||||
// pickingObjectDTO.getWithdrawMtbColrs().add(mtbColr);
|
||||
// mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// //Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei
|
||||
// resetMatchedRows();
|
||||
//
|
||||
// this.sendOnRowSaved();
|
||||
// this.sendOnLoadingEnded();
|
||||
//
|
||||
// if (shouldCloseLU) requestCloseLU(finalShouldPrint);
|
||||
// }, this::sendError);
|
||||
|
||||
}
|
||||
|
||||
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
MtbColt mtbColt = new MtbColt().setNumCollo(mtbColrToUpdate.getNumCollo()).setDataCollo(mtbColrToUpdate.getDataColloS()).setSerCollo(mtbColrToUpdate.getSerCollo()).setGestione(mtbColrToUpdate.getGestione()).setMtbColr(new ObservableArrayList<>());
|
||||
mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
MtbColr mtbColrClone = (MtbColr) mtbColrToUpdate.clone();
|
||||
mtbColrClone.setMtbAart(null)
|
||||
.setMtbPartitaMag(null);
|
||||
|
||||
final MtbColr mtbColr = (MtbColr) mtbColrToUpdate.clone();
|
||||
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
mtbColr.setRiga(null).setPesoLordoKg(null).setPesoNettoKg(null).setNumCnf(numCnf.subtract(mtbColrToUpdate.getNumCnf())).setQtaCnf(qtaCnf).setQtaCol(qtaTot.subtract(mtbColrToUpdate.getQtaCol())).setPartitaMag(partitaMag).setDataScadPartita(dataScad);
|
||||
var editUDSRowRequest = new EditUDSRowRequestDTO()
|
||||
.setSourceMtbColr(mtbColrClone)
|
||||
.setNewNumCnf(numCnf)
|
||||
.setNewQtaCnf(qtaCnf)
|
||||
.setNewQtaTot(qtaTot);
|
||||
|
||||
mtbColt.getMtbColr().add(mtbColr);
|
||||
this.mColliScaricoRESTConsumer.editUDSRow(editUDSRowRequest, savedMtbColr -> {
|
||||
mtbColrToUpdate.setNumCnf(savedMtbColr.getNumCnf())
|
||||
.setQtaCnf(savedMtbColr.getQtaCnf())
|
||||
.setQtaCol(savedMtbColr.getQtaCol());
|
||||
|
||||
this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
||||
|
||||
mtbColr.setNumCnf(numCnf).setQtaCnf(qtaCnf).setQtaCol(qtaTot);
|
||||
|
||||
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue()).filter(x -> Stream.of(x.getWithdrawMtbColrs()).anyMatch(y -> y == mtbColrToUpdate)).findSingle();
|
||||
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue())
|
||||
.filter(x -> Stream.of(x.getWithdrawMtbColrs())
|
||||
.anyMatch(y -> y == mtbColrToUpdate)).findSingle();
|
||||
|
||||
if (pickingObjectDTO.isPresent()) {
|
||||
pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToUpdate);
|
||||
pickingObjectDTO.get().getWithdrawMtbColrs().add(mtbColr);
|
||||
pickingObjectDTO.get().getWithdrawMtbColrs().add(mtbColrToUpdate);
|
||||
}
|
||||
|
||||
this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
||||
this.mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
this.mCurrentMtbColt.getMtbColr().add(mtbColrToUpdate);
|
||||
|
||||
this.resetMatchedRows();
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
|
||||
|
||||
// MtbColt mtbColt = new MtbColt()
|
||||
// .setNumCollo(mtbColrToUpdate.getNumCollo())
|
||||
// .setDataCollo(mtbColrToUpdate.getDataColloS())
|
||||
// .setSerCollo(mtbColrToUpdate.getSerCollo())
|
||||
// .setGestione(mtbColrToUpdate.getGestione())
|
||||
// .setMtbColr(new ObservableArrayList<>());
|
||||
// mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
//
|
||||
// final MtbColr mtbColr = (MtbColr) mtbColrToUpdate.clone();
|
||||
// mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
// mtbColr.setRiga(null)
|
||||
// .setPesoLordoKg(null)
|
||||
// .setPesoNettoKg(null)
|
||||
// .setNumCnf(numCnf.subtract(mtbColrToUpdate.getNumCnf()))
|
||||
// .setQtaCnf(qtaCnf)
|
||||
// .setQtaCol(qtaTot.subtract(mtbColrToUpdate.getQtaCol()))
|
||||
// .setPartitaMag(partitaMag)
|
||||
// .setDataScadPartita(dataScad);
|
||||
//
|
||||
// mtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
||||
//
|
||||
// mtbColr
|
||||
// .setNumCnf(numCnf)
|
||||
// .setQtaCnf(qtaCnf)
|
||||
// .setQtaCol(qtaTot);
|
||||
//
|
||||
// Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue())
|
||||
// .filter(x -> Stream.of(x.getWithdrawMtbColrs())
|
||||
// .anyMatch(y -> y == mtbColrToUpdate)).findSingle();
|
||||
//
|
||||
// if (pickingObjectDTO.isPresent()) {
|
||||
// pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToUpdate);
|
||||
// pickingObjectDTO.get().getWithdrawMtbColrs().add(mtbColr);
|
||||
// }
|
||||
//
|
||||
// this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
||||
// this.mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// this.resetMatchedRows();
|
||||
// this.sendOnRowSaved();
|
||||
// this.sendOnLoadingEnded();
|
||||
//
|
||||
// }, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
@ -1511,8 +1474,11 @@ public class SpedizioneViewModel {
|
||||
|
||||
|
||||
private void closeLU(RunnableArgs<List<MtbColt>> onComplete) {
|
||||
var clonedLuToClose = (MtbColt) this.mCurrentMtbColt.clone();
|
||||
clonedLuToClose.setMtbColr(null);
|
||||
|
||||
var closeUDSRequestDto = new CloseUDSRequestDTO()
|
||||
.setMtbColt(this.mCurrentMtbColt)
|
||||
.setMtbColt(clonedLuToClose)
|
||||
//.setPrintSSCC(shouldPrint)
|
||||
.setOrderCodMdep(mTestateOrdini.get(0).getCodMdep());
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
buildscript {
|
||||
ext {
|
||||
kotlin_version = '1.8.0'
|
||||
agp_version = '8.1.0-alpha07'
|
||||
agp_version = '8.1.0-alpha08'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user