Finish v1.43.02(467)

This commit is contained in:
Marco Elefante 2025-01-24 18:38:30 +01:00
commit 8b536eb0b0
6 changed files with 57 additions and 8 deletions

View File

@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
android { android {
def appVersionCode = 466 def appVersionCode = 467
def appVersionName = '1.43.01' def appVersionName = '1.43.02'
signingConfigs { signingConfigs {
release { release {

View File

@ -1,5 +1,7 @@
package it.integry.integrywmsnative.core.rest.consumers; package it.integry.integrywmsnative.core.rest.consumers;
import androidx.annotation.NonNull;
import com.annimon.stream.Stream; import com.annimon.stream.Stream;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
@ -98,6 +100,25 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
}); });
} }
public void findIfIsKit(MtbAart mtbAart, RunnableArgs<MtbAart> onComplete, RunnableArgs<Exception> onFailed){
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
articoloRESTConsumerService
.findIfIsKit(mtbAart)
.enqueue(new Callback<>() {
@Override
public void onResponse(@NonNull Call<ServiceRESTResponse<MtbAart>> call, @NonNull Response<ServiceRESTResponse<MtbAart>> response) {
analyzeAnswer(response, "findIfIsKit", (m) -> {
onComplete.run(response.body().getDto());
}, onFailed);
}
@Override
public void onFailure(@NonNull Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
onFailed.run(new Exception(t));
}
});
}
public void getByCodMarts(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) { public void getByCodMarts(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
getByCodMartsStatic(codMartToFind, onComplete, onFailed); getByCodMartsStatic(codMartToFind, onComplete, onFailed);

View File

@ -31,6 +31,9 @@ public interface ArticoloRESTConsumerService {
@POST("wms/articolo/searchByBarcode") @POST("wms/articolo/searchByBarcode")
Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> searchByBarcode(@Body() SearchArticoloByBarcodeRequestDTO searchArticoloByBarcodeRequest); Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> searchByBarcode(@Body() SearchArticoloByBarcodeRequestDTO searchArticoloByBarcodeRequest);
@POST("wms/articolo/findIfIsKit")
Call<ServiceRESTResponse<MtbAart>> findIfIsKit(@Body MtbAart mtbAart);
@POST("wms/articolo/retrieveByCodMart") @POST("wms/articolo/retrieveByCodMart")
Call<ServiceRESTResponse<List<MtbAart>>> getByCodMart(@Body RetrieveArticoloByCodMartRequestDTO retrieveArticoloByCodMartRequest); Call<ServiceRESTResponse<List<MtbAart>>> getByCodMart(@Body RetrieveArticoloByCodMartRequestDTO retrieveArticoloByCodMartRequest);

View File

@ -19,6 +19,9 @@ public class SitBollaAccettazioneDTO {
private BigDecimal qtaDaAccettare; private BigDecimal qtaDaAccettare;
private BigDecimal numCnfDaAccettare; private BigDecimal numCnfDaAccettare;
private boolean kit;
private boolean componente;
public int getNumDoc() { public int getNumDoc() {
return numDoc; return numDoc;
} }
@ -126,4 +129,20 @@ public class SitBollaAccettazioneDTO {
this.numCnfDaAccettare = numCnfDaAccettare; this.numCnfDaAccettare = numCnfDaAccettare;
return this; return this;
} }
public boolean isKit() {
return kit;
}
public void setKit(boolean kit) {
this.kit = kit;
}
public boolean isComponente() {
return componente;
}
public void setComponente(boolean componente) {
this.componente = componente;
}
} }

View File

@ -338,8 +338,14 @@ public class AccettazioneBollaPickingViewModel {
} }
private void loadMatchedRows(List<PickingObjectDTO> matchedRows, MtbAart mtbAart, PickDataDTO pickDataDTO) { private void loadMatchedRows(List<PickingObjectDTO> matchedRows, MtbAart mtbAart, PickDataDTO pickDataDTO) {
if (matchedRows == null || matchedRows.size() == 0) { if (matchedRows == null || matchedRows.isEmpty()) {
manageNoArtFound(mtbAart, pickDataDTO); this.mArticoloRESTConsumer.findIfIsKit(mtbAart, mtbAartFind -> {
if (mtbAartFind == null){
manageNoArtFound(mtbAart, pickDataDTO);
} else {
searchArtFromAnag(mtbAartFind, pickDataDTO, () -> {});
}
}, this::sendError);
} else if (matchedRows.size() == 1) { } else if (matchedRows.size() == 1) {
this.manageDispatchBollaRow(matchedRows.get(0)); this.manageDispatchBollaRow(matchedRows.get(0));
} else { } else {
@ -662,8 +668,8 @@ public class AccettazioneBollaPickingViewModel {
.setUntMis(pickingObjectDTO.getMtbAart().getUntMis()) .setUntMis(pickingObjectDTO.getMtbAart().getUntMis())
.setMtbAart(pickingObjectDTO.getMtbAart()); .setMtbAart(pickingObjectDTO.getMtbAart());
pickingObjectDTO.getWithdrawMtbColrs().add(insertedMtbColr); pickingObjectDTO.getWithdrawMtbColrs().add(0, insertedMtbColr);
mCurrentMtbColt.getMtbColr().add(insertedMtbColr); mCurrentMtbColt.getMtbColr().add(0, insertedMtbColr);
//Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei //Chiamato removeListFilter perché cosi mi cancella tutti i dati di pick temporanei
resetMatchedRows(); resetMatchedRows();

View File

@ -77,8 +77,8 @@ public class AccettazioneBollaPickingListAdapter extends SectionedRecyclerViewAd
Collections.sort(listaOrdinata, (a, b) -> { Collections.sort(listaOrdinata, (a, b) -> {
boolean condA = a.getQtaEvasa().subtract(a.getQtaTot()).floatValue() == 0; boolean condA = a.getQtaEvasa().floatValue() > 0;
boolean condB = b.getQtaEvasa().subtract(b.getQtaTot()).floatValue() == 0; boolean condB = b.getQtaEvasa().floatValue() > 0;
if (condA && !condB) { if (condA && !condB) {
return -1; return -1;