Finish v1.32.05(345)
This commit is contained in:
commit
0cdbbc096c
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 344
|
def appVersionCode = 345
|
||||||
def appVersionName = '1.32.04'
|
def appVersionName = '1.32.05'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -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.CreateUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
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.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.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
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
|
@Override
|
||||||
public void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
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.CreateUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
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.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.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||||
@ -35,6 +37,9 @@ public interface ColliLavorazioneRESTConsumerService {
|
|||||||
@POST("wms/lavorazione/insertUDSRow")
|
@POST("wms/lavorazione/insertUDSRow")
|
||||||
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/editUDSRow")
|
||||||
|
Call<ServiceRESTResponse<EditUDSRowResponseDTO>> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/deleteUDSRow")
|
@POST("wms/lavorazione/deleteUDSRow")
|
||||||
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
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.CreateUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
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.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.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
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) {
|
public void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
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.CreateUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
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.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.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||||
@ -35,6 +37,9 @@ public interface ColliSpedizioneRESTConsumerService {
|
|||||||
@POST("wms/spedizione/insertUDSRow")
|
@POST("wms/spedizione/insertUDSRow")
|
||||||
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/editUDSRow")
|
||||||
|
Call<ServiceRESTResponse<EditUDSRowResponseDTO>> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
|
||||||
|
|
||||||
@POST("wms/spedizione/deleteUDSRow")
|
@POST("wms/spedizione/deleteUDSRow")
|
||||||
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
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.CreateUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
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.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.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
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 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);
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -20,7 +20,6 @@ import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
|||||||
import it.integry.integrywmsnative.core.CommonConst;
|
import it.integry.integrywmsnative.core.CommonConst;
|
||||||
import it.integry.integrywmsnative.core.exception.AlreadyUsedAnonymousLabelException;
|
import it.integry.integrywmsnative.core.exception.AlreadyUsedAnonymousLabelException;
|
||||||
import it.integry.integrywmsnative.core.exception.InvalidLUMultiGestioneException;
|
import it.integry.integrywmsnative.core.exception.InvalidLUMultiGestioneException;
|
||||||
import it.integry.integrywmsnative.core.exception.InvalidOrderTypeException;
|
|
||||||
import it.integry.integrywmsnative.core.exception.LUScanNotGrantedException;
|
import it.integry.integrywmsnative.core.exception.LUScanNotGrantedException;
|
||||||
import it.integry.integrywmsnative.core.exception.NoArtsFoundException;
|
import it.integry.integrywmsnative.core.exception.NoArtsFoundException;
|
||||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||||
@ -126,18 +125,13 @@ public class AccettazionePickingViewModel {
|
|||||||
.distinctBy(x -> x)
|
.distinctBy(x -> x)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
if (foundGestioni != null) {
|
if (foundGestioni.size() == 1) {
|
||||||
|
if (isOrdTrasf && (foundGestioni.get(0) == GestioneEnum.PRODUZIONE || foundGestioni.get(0) == GestioneEnum.LAVORAZIONE)) {
|
||||||
if (foundGestioni.size() == 1) {
|
defaultGestioneOfUL = GestioneEnum.ACQUISTO;
|
||||||
if (isOrdTrasf && (foundGestioni.get(0) == GestioneEnum.PRODUZIONE || foundGestioni.get(0) == GestioneEnum.LAVORAZIONE)) {
|
} else
|
||||||
defaultGestioneOfUL = GestioneEnum.ACQUISTO;
|
defaultGestioneOfUL = foundGestioni.get(0) == GestioneEnum.PRODUZIONE ? GestioneEnum.LAVORAZIONE : foundGestioni.get(0);
|
||||||
} else
|
|
||||||
defaultGestioneOfUL = foundGestioni.get(0) == GestioneEnum.PRODUZIONE ? GestioneEnum.LAVORAZIONE : foundGestioni.get(0);
|
|
||||||
} else {
|
|
||||||
this.sendError(new InvalidLUMultiGestioneException());
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.sendError(new InvalidOrderTypeException());
|
this.sendError(new InvalidLUMultiGestioneException());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,24 +32,19 @@ public class ProdOrdineProduzioneElencoViewModel {
|
|||||||
this.codMdep = codMdep;
|
this.codMdep = codMdep;
|
||||||
|
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
new Thread(() -> {
|
|
||||||
|
|
||||||
mProdOrdineProduzioneRESTConsumer.getOrdiniInevasi(codMdep, orderList -> {
|
mProdOrdineProduzioneRESTConsumer.getOrdiniInevasi(codMdep, orderList -> {
|
||||||
this.mOrderList.setValue(orderList);
|
this.mOrderList.setValue(orderList);
|
||||||
|
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
|
||||||
}).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void loadPicking(List<OrdineAccettazioneInevasoDTO> selectedOrders) {
|
public void loadPicking(List<OrdineAccettazioneInevasoDTO> selectedOrders) {
|
||||||
|
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
new Thread(() -> {
|
|
||||||
|
|
||||||
this.mProdOrdineProduzioneRESTConsumer.retrievePickingListNew(selectedOrders, sitArtOrds -> {
|
this.mProdOrdineProduzioneRESTConsumer.retrievePickingListNew(selectedOrders, sitArtOrds -> {
|
||||||
|
|
||||||
this.sendOnOrdersDispatched(selectedOrders, sitArtOrds);
|
this.sendOnOrdersDispatched(selectedOrders, sitArtOrds);
|
||||||
@ -57,8 +52,6 @@ public class ProdOrdineProduzioneElencoViewModel {
|
|||||||
|
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
|
||||||
}).start();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -474,9 +474,7 @@ public class RettificaGiacenzeViewModel {
|
|||||||
|
|
||||||
this.sendLUPositionChangeRequest((shouldChangePosition, mtbDepoPosizione) -> {
|
this.sendLUPositionChangeRequest((shouldChangePosition, mtbDepoPosizione) -> {
|
||||||
if (shouldChangePosition) {
|
if (shouldChangePosition) {
|
||||||
this.savePosizione(mtbDepoPosizione, () -> {
|
this.savePosizione(mtbDepoPosizione, onComplete);
|
||||||
onComplete.run();
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
onComplete.run();
|
onComplete.run();
|
||||||
}
|
}
|
||||||
@ -484,7 +482,7 @@ public class RettificaGiacenzeViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void createDoc(MtbColt mtbColt, Runnable onComplete) {
|
private void createDoc(MtbColt mtbColt, Runnable onComplete) {
|
||||||
if (mtbColt.getGestioneEnum() != GestioneEnum.VENDITA && mtbColt.getSegno() != -1) {
|
if (!(mtbColt.getGestioneEnum() == GestioneEnum.VENDITA && mtbColt.getSegno() == -1)) {
|
||||||
onComplete.run();
|
onComplete.run();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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.CreateUDSRequestOrderDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
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.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.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
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) {
|
public void saveNewRow(PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||||
this.sendOnLoadingStarted();
|
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
|
//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 &&
|
final MtbColr mtbColrToDispatch = pickingObjectDTO.getTempPickData() != null &&
|
||||||
pickingObjectDTO.getTempPickData().getSourceMtbColt() != null &&
|
pickingObjectDTO.getTempPickData().getSourceMtbColt() != null &&
|
||||||
@ -1240,40 +1229,6 @@ public class SpedizioneViewModel {
|
|||||||
pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().size() > 0 ?
|
pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().size() > 0 ?
|
||||||
pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().get(0) : null;
|
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;
|
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)
|
//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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var clonedSourceMtbColr = (MtbColr) mtbColrToDispatch.clone();
|
||||||
|
clonedSourceMtbColr.setMtbPartitaMag(null)
|
||||||
|
.setMtbAart(null);
|
||||||
|
|
||||||
|
var clonedTargetMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
||||||
|
clonedTargetMtbColt.setMtbColr(null);
|
||||||
|
|
||||||
var insertUDSRowRequestDto = new InsertUDSRowRequestDTO()
|
var insertUDSRowRequestDto = new InsertUDSRowRequestDTO()
|
||||||
.setSourceMtbColr(mtbColrToDispatch)
|
.setSourceMtbColr(clonedSourceMtbColr)
|
||||||
.setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
.setCodMart(pickingObjectDTO.getMtbAart().getCodMart())
|
||||||
.setQtaTot(qtaTot)
|
.setQtaTot(qtaTot)
|
||||||
.setQtaCnf(qtaCnf)
|
.setQtaCnf(qtaCnf)
|
||||||
.setNumCnf(numCnf)
|
.setNumCnf(numCnf)
|
||||||
.setPartitaMag(partitaMag)
|
.setPartitaMag(partitaMag)
|
||||||
.setTargetMtbColt(mCurrentMtbColt);
|
.setTargetMtbColt(clonedTargetMtbColt);
|
||||||
|
|
||||||
if (dataScad != null)
|
if (dataScad != null)
|
||||||
insertUDSRowRequestDto
|
insertUDSRowRequestDto
|
||||||
@ -1341,89 +1302,91 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
}, this::sendError);
|
}, 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) {
|
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, Date dataScad, boolean shouldCloseLU) {
|
||||||
|
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
MtbColt mtbColt = new MtbColt().setNumCollo(mtbColrToUpdate.getNumCollo()).setDataCollo(mtbColrToUpdate.getDataColloS()).setSerCollo(mtbColrToUpdate.getSerCollo()).setGestione(mtbColrToUpdate.getGestione()).setMtbColr(new ObservableArrayList<>());
|
MtbColr mtbColrClone = (MtbColr) mtbColrToUpdate.clone();
|
||||||
mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
mtbColrClone.setMtbAart(null)
|
||||||
|
.setMtbPartitaMag(null);
|
||||||
|
|
||||||
final MtbColr mtbColr = (MtbColr) mtbColrToUpdate.clone();
|
var editUDSRowRequest = new EditUDSRowRequestDTO()
|
||||||
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT);
|
.setSourceMtbColr(mtbColrClone)
|
||||||
mtbColr.setRiga(null).setPesoLordoKg(null).setPesoNettoKg(null).setNumCnf(numCnf.subtract(mtbColrToUpdate.getNumCnf())).setQtaCnf(qtaCnf).setQtaCol(qtaTot.subtract(mtbColrToUpdate.getQtaCol())).setPartitaMag(partitaMag).setDataScadPartita(dataScad);
|
.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) -> {
|
Optional<PickingObjectDTO> pickingObjectDTO = Stream.of(this.mPickingList.getValue())
|
||||||
|
.filter(x -> Stream.of(x.getWithdrawMtbColrs())
|
||||||
mtbColr.setNumCnf(numCnf).setQtaCnf(qtaCnf).setQtaCol(qtaTot);
|
.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()) {
|
if (pickingObjectDTO.isPresent()) {
|
||||||
pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToUpdate);
|
pickingObjectDTO.get().getWithdrawMtbColrs().remove(mtbColrToUpdate);
|
||||||
pickingObjectDTO.get().getWithdrawMtbColrs().add(mtbColr);
|
pickingObjectDTO.get().getWithdrawMtbColrs().add(mtbColrToUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
||||||
this.mCurrentMtbColt.getMtbColr().add(mtbColr);
|
this.mCurrentMtbColt.getMtbColr().add(mtbColrToUpdate);
|
||||||
|
|
||||||
this.resetMatchedRows();
|
this.resetMatchedRows();
|
||||||
this.sendOnRowSaved();
|
this.sendOnRowSaved();
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
}, this::sendError);
|
}, 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) {
|
private void closeLU(RunnableArgs<List<MtbColt>> onComplete) {
|
||||||
|
var clonedLuToClose = (MtbColt) this.mCurrentMtbColt.clone();
|
||||||
|
clonedLuToClose.setMtbColr(null);
|
||||||
|
|
||||||
var closeUDSRequestDto = new CloseUDSRequestDTO()
|
var closeUDSRequestDto = new CloseUDSRequestDTO()
|
||||||
.setMtbColt(this.mCurrentMtbColt)
|
.setMtbColt(clonedLuToClose)
|
||||||
//.setPrintSSCC(shouldPrint)
|
//.setPrintSSCC(shouldPrint)
|
||||||
.setOrderCodMdep(mTestateOrdini.get(0).getCodMdep());
|
.setOrderCodMdep(mTestateOrdini.get(0).getCodMdep());
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
kotlin_version = '1.8.0'
|
kotlin_version = '1.8.0'
|
||||||
agp_version = '8.1.0-alpha07'
|
agp_version = '8.1.0-alpha08'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user