Merge branch 'feature/RefactoringGestioneColli' into master-beta
This commit is contained in:
@@ -3,7 +3,7 @@ package it.integry.integrywmsnative.core.model.dto;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
|
||||
public class AlreadyRegisteredUDCDTO {
|
||||
public class AlreadyRegisteredUlDTO {
|
||||
|
||||
private MtbColt mtbColt;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class AlreadyRegisteredUDCDTO {
|
||||
return mtbColt;
|
||||
}
|
||||
|
||||
public AlreadyRegisteredUDCDTO setMtbColt(MtbColt mtbColt) {
|
||||
public AlreadyRegisteredUlDTO setMtbColt(MtbColt mtbColt) {
|
||||
this.mtbColt = mtbColt;
|
||||
return this;
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public class AlreadyRegisteredUDCDTO {
|
||||
return canBeRecovered;
|
||||
}
|
||||
|
||||
public AlreadyRegisteredUDCDTO setCanBeRecovered(boolean canBeRecovered) {
|
||||
public AlreadyRegisteredUlDTO setCanBeRecovered(boolean canBeRecovered) {
|
||||
this.canBeRecovered = canBeRecovered;
|
||||
return this;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package it.integry.integrywmsnative.core.model.key;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
public class MtbColtKey {
|
||||
|
||||
private final String gestione;
|
||||
private final String serCollo;
|
||||
private final LocalDate dataCollo;
|
||||
private final Integer numCollo;
|
||||
|
||||
public MtbColtKey(String gestione, String serCollo, LocalDate dataCollo, Integer numCollo) {
|
||||
this.gestione = gestione;
|
||||
this.serCollo = serCollo;
|
||||
this.dataCollo = dataCollo;
|
||||
this.numCollo = numCollo;
|
||||
}
|
||||
|
||||
public String getGestione() {
|
||||
return gestione;
|
||||
}
|
||||
|
||||
public String getSerCollo() {
|
||||
return serCollo;
|
||||
}
|
||||
|
||||
public LocalDate getDataCollo() {
|
||||
return dataCollo;
|
||||
}
|
||||
|
||||
public Integer getNumCollo() {
|
||||
return numCollo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
MtbColtKey that = (MtbColtKey) o;
|
||||
return Objects.equals(dataCollo, that.dataCollo) &&
|
||||
Objects.equals(gestione, that.gestione) &&
|
||||
Objects.equals(numCollo, that.numCollo) &&
|
||||
Objects.equals(serCollo, that.serCollo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(dataCollo, gestione, numCollo, serCollo);
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,9 @@ public class DocumentRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
public void createDocFromColli(LoadColliDTO loadColliDTO, RunnableArgs<DtbDoct> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
DocumentiRESTConsumerService documentiRESTConsumerService = restBuilder.getService(DocumentiRESTConsumerService.class);
|
||||
documentiRESTConsumerService.createDocFromColli(loadColliDTO).enqueue(new ManagedErrorCallback<>() {
|
||||
documentiRESTConsumerService
|
||||
.createDocFromColli(loadColliDTO)
|
||||
.enqueue(new ManagedErrorCallback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<DtbDoct>> call, Response<ServiceRESTResponse<DtbDoct>> response) {
|
||||
analyzeAnswer(response, "createDocFromColli", onComplete, onFailed);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
@@ -9,6 +10,7 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.materiali.RecuperaMaterialiRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.materiali.VersaMaterialiRequestDTO;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULRestDTO;
|
||||
|
||||
@Singleton
|
||||
public class MaterialiRESTConsumer extends _BaseRESTConsumer {
|
||||
@@ -21,6 +23,28 @@ public class MaterialiRESTConsumer extends _BaseRESTConsumer {
|
||||
this.executorService = executorService;
|
||||
}
|
||||
|
||||
public List<HistoryVersamentoProdULRestDTO> makeSynchronousRetrieveLastVersamentiRequest(String codJfas) throws Exception {
|
||||
var materialiRESTConsumerService = restBuilder.getService(MaterialiRESTConsumerService.class);
|
||||
|
||||
var response = materialiRESTConsumerService.retrieveLastVersamenti(codJfas)
|
||||
.execute();
|
||||
|
||||
|
||||
var data = analyzeAnswer(response, "retrieveLastVersamenti");
|
||||
return data;
|
||||
}
|
||||
|
||||
public void makeRetrieveLastVersamentiRequest(String codJfas, final RunnableArgs<List<HistoryVersamentoProdULRestDTO>> onComplete, final RunnableArgs<Exception> onFailed) {
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
var response = makeSynchronousRetrieveLastVersamentiRequest(codJfas);
|
||||
if (onComplete != null) onComplete.run(response);
|
||||
} catch (Exception ex) {
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public MtbColt makeSynchronousRecuperaRequest(RecuperaMaterialiRequestDTO request) throws Exception {
|
||||
var materialiRESTConsumerService = restBuilder.getService(MaterialiRESTConsumerService.class);
|
||||
|
||||
|
||||
@@ -1,19 +1,27 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.materiali.RecuperaMaterialiRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.materiali.RecuperaMaterialiResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.materiali.VersaMaterialiRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.materiali.VersaMaterialiResponseDTO;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULRestDTO;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface MaterialiRESTConsumerService {
|
||||
|
||||
@POST("wms/materiali/versa")
|
||||
Call<ServiceRESTResponse<VersaMaterialiResponseDTO>> versa(@Body VersaMaterialiRequestDTO request);
|
||||
|
||||
@GET("wms/materiali/retrieveLastVersamenti")
|
||||
Call<ServiceRESTResponse<List<HistoryVersamentoProdULRestDTO>>> retrieveLastVersamenti(@Query("codJfas") String codJfas);
|
||||
|
||||
@POST("wms/materiali/recupera")
|
||||
Call<ServiceRESTResponse<RecuperaMaterialiResponseDTO>> recupera(@Body RecuperaMaterialiRequestDTO request);
|
||||
|
||||
|
||||
@@ -4,11 +4,8 @@ import androidx.annotation.NonNull;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
@@ -21,6 +18,7 @@ import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.handler.ManagedErrorCallback;
|
||||
@@ -28,8 +26,7 @@ import it.integry.integrywmsnative.core.rest.model.GetPickingListDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.RetrieveAlreadyRegisteredUdsRequestDTO;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||
import retrofit2.Call;
|
||||
@@ -180,44 +177,27 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
public void getBancaliGiaRegistrati(List<OrdineInevasoDTO> orders, GestioneEnum gestione, int segno, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
String whereCondGestione = "";
|
||||
public List<AlreadyRegisteredUlDTO> getBancaliGiaRegistratiSynchronized(List<? extends OrdineInevasoDTO> orders, int segno) throws Exception {
|
||||
OrdiniRESTConsumerService service = restBuilder.getService(OrdiniRESTConsumerService.class);
|
||||
|
||||
if (gestione != null) {
|
||||
whereCondGestione = "mtb_colt.gestione = " + UtilityDB.valueToString(gestione.getText()) + " ";
|
||||
} else {
|
||||
whereCondGestione = "(mtb_colt.gestione = 'V' OR mtb_colt.gestione = 'L') ";
|
||||
var request = new RetrieveAlreadyRegisteredUdsRequestDTO()
|
||||
.setOrdini(orders)
|
||||
.setSegno(segno);
|
||||
|
||||
var response = service.retrieveAlreadyRegisteredUDS(request)
|
||||
.execute();
|
||||
var data = analyzeAnswer(response, "getBancaliGiaRegistrati");
|
||||
return data == null ? new ArrayList<>() : data.getUdsList();
|
||||
}
|
||||
|
||||
String baseSql = "SELECT DISTINCT mtb_colt.* " +
|
||||
"FROM mtb_colt " +
|
||||
" INNER JOIN mtb_colr ON " +
|
||||
" mtb_colt.gestione = mtb_colr.gestione " +
|
||||
" AND mtb_colt.ser_collo = mtb_colr.ser_collo " +
|
||||
" AND mtb_colt.data_collo = mtb_colr.data_collo " +
|
||||
" AND mtb_colt.num_collo = mtb_colr.num_collo " +
|
||||
" WHERE " + whereCondGestione +
|
||||
" AND mtb_colt.segno = " + UtilityDB.valueToString(segno) + " " +
|
||||
" AND mtb_colt.data_doc IS NULL AND ";
|
||||
|
||||
List<HashMap<String, Object>> whereCondMapList = new ArrayList<>();
|
||||
for (OrdineInevasoDTO ordineInevaso : orders) {
|
||||
HashMap<String, Object> whereCondMap = new HashMap<>();
|
||||
whereCondMap.put("mtb_colr.data_ord", ordineInevaso.getDataOrdD());
|
||||
whereCondMap.put("mtb_colr.num_ord", ordineInevaso.getNumOrd());
|
||||
whereCondMap.put("mtb_colr.gestione", ordineInevaso.getGestione());
|
||||
|
||||
whereCondMapList.add(whereCondMap);
|
||||
}
|
||||
|
||||
baseSql += "(" + UtilityQuery.concatFieldListInWhereCond(whereCondMapList) + ")";
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {
|
||||
}.getType();
|
||||
this.mSystemRESTConsumer.<List<MtbColt>>processSql(baseSql, typeOfObjectsList, value -> {
|
||||
if (onComplete != null) onComplete.run(value);
|
||||
}, ex -> {
|
||||
public void getBancaliGiaRegistrati(List<OrdineInevasoDTO> orders, int segno, RunnableArgs<List<AlreadyRegisteredUlDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
var result = getBancaliGiaRegistratiSynchronized(orders, segno);
|
||||
if (onComplete != null) onComplete.run(result);
|
||||
} catch (Exception ex) {
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import java.util.List;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.RetrieveAlreadyRegisteredUdsRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.RetrieveAlreadyRegisteredUdsResponseDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.GetPickingListDTO;
|
||||
import retrofit2.Call;
|
||||
@@ -23,4 +25,7 @@ public interface OrdiniRESTConsumerService {
|
||||
|
||||
@GET("SM2GetOrdiniVenditaInevasi")
|
||||
Call<ServiceRESTResponse<List<OrdineUscitaInevasoDTO>>> getOrdiniInevasi(@Query("codMdep") String codMdep, @Query("gestione") String gestione);
|
||||
|
||||
@POST("wms/spedizione/retrieveAlreadyRegisteredUDS")
|
||||
Call<ServiceRESTResponse<RetrieveAlreadyRegisteredUdsResponseDTO>> retrieveAlreadyRegisteredUDS(@Body RetrieveAlreadyRegisteredUdsRequestDTO request);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.key.MtbColtKey;
|
||||
|
||||
public class RecuperaMaterialiRequestDTO {
|
||||
|
||||
@@ -14,18 +14,17 @@ public class RecuperaMaterialiRequestDTO {
|
||||
private BigDecimal qtaCnf;
|
||||
private BigDecimal qtaTot;
|
||||
|
||||
private int numCollo;
|
||||
private LocalDate dataCollo;
|
||||
private String gestione;
|
||||
private String serCollo;
|
||||
private MtbColtKey movementScarico;
|
||||
|
||||
private int numColloRif;
|
||||
private LocalDate dataColloRif;
|
||||
private String gestioneRif;
|
||||
private String serColloRif;
|
||||
private String barcodeUlScarico;
|
||||
private String codMdepScarico;
|
||||
private String posizioneScarico;
|
||||
|
||||
private List<Ordine> ordini;
|
||||
private MtbColt mtbColtCarico;
|
||||
|
||||
private String barcodeUlCarico;
|
||||
private String codMdepCarico;
|
||||
private String posizioneCarico;
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
@@ -72,75 +71,39 @@ public class RecuperaMaterialiRequestDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getNumCollo() {
|
||||
return numCollo;
|
||||
public MtbColtKey getMovementScarico() {
|
||||
return movementScarico;
|
||||
}
|
||||
|
||||
public RecuperaMaterialiRequestDTO setNumCollo(int numCollo) {
|
||||
this.numCollo = numCollo;
|
||||
public RecuperaMaterialiRequestDTO setMovementScarico(MtbColtKey movementScarico) {
|
||||
this.movementScarico = movementScarico;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LocalDate getDataCollo() {
|
||||
return dataCollo;
|
||||
public String getBarcodeUlScarico() {
|
||||
return barcodeUlScarico;
|
||||
}
|
||||
|
||||
public RecuperaMaterialiRequestDTO setDataCollo(LocalDate dataCollo) {
|
||||
this.dataCollo = dataCollo;
|
||||
public RecuperaMaterialiRequestDTO setBarcodeUlScarico(String barcodeUlScarico) {
|
||||
this.barcodeUlScarico = barcodeUlScarico;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGestione() {
|
||||
return gestione;
|
||||
public String getCodMdepScarico() {
|
||||
return codMdepScarico;
|
||||
}
|
||||
|
||||
public RecuperaMaterialiRequestDTO setGestione(String gestione) {
|
||||
this.gestione = gestione;
|
||||
public RecuperaMaterialiRequestDTO setCodMdepScarico(String codMdepScarico) {
|
||||
this.codMdepScarico = codMdepScarico;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSerCollo() {
|
||||
return serCollo;
|
||||
public String getPosizioneScarico() {
|
||||
return posizioneScarico;
|
||||
}
|
||||
|
||||
public RecuperaMaterialiRequestDTO setSerCollo(String serCollo) {
|
||||
this.serCollo = serCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getNumColloRif() {
|
||||
return numColloRif;
|
||||
}
|
||||
|
||||
public RecuperaMaterialiRequestDTO setNumColloRif(int numColloRif) {
|
||||
this.numColloRif = numColloRif;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LocalDate getDataColloRif() {
|
||||
return dataColloRif;
|
||||
}
|
||||
|
||||
public RecuperaMaterialiRequestDTO setDataColloRif(LocalDate dataColloRif) {
|
||||
this.dataColloRif = dataColloRif;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGestioneRif() {
|
||||
return gestioneRif;
|
||||
}
|
||||
|
||||
public RecuperaMaterialiRequestDTO setGestioneRif(String gestioneRif) {
|
||||
this.gestioneRif = gestioneRif;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSerColloRif() {
|
||||
return serColloRif;
|
||||
}
|
||||
|
||||
public RecuperaMaterialiRequestDTO setSerColloRif(String serColloRif) {
|
||||
this.serColloRif = serColloRif;
|
||||
public RecuperaMaterialiRequestDTO setPosizioneScarico(String posizioneScarico) {
|
||||
this.posizioneScarico = posizioneScarico;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -153,12 +116,30 @@ public class RecuperaMaterialiRequestDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbColt getMtbColtCarico() {
|
||||
return mtbColtCarico;
|
||||
public String getBarcodeUlCarico() {
|
||||
return barcodeUlCarico;
|
||||
}
|
||||
|
||||
public RecuperaMaterialiRequestDTO setMtbColtCarico(MtbColt mtbColtCarico) {
|
||||
this.mtbColtCarico = mtbColtCarico;
|
||||
public RecuperaMaterialiRequestDTO setBarcodeUlCarico(String barcodeUlCarico) {
|
||||
this.barcodeUlCarico = barcodeUlCarico;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMdepCarico() {
|
||||
return codMdepCarico;
|
||||
}
|
||||
|
||||
public RecuperaMaterialiRequestDTO setCodMdepCarico(String codMdepCarico) {
|
||||
this.codMdepCarico = codMdepCarico;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPosizioneCarico() {
|
||||
return posizioneCarico;
|
||||
}
|
||||
|
||||
public RecuperaMaterialiRequestDTO setPosizioneCarico(String posizioneCarico) {
|
||||
this.posizioneCarico = posizioneCarico;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
|
||||
|
||||
public class RetrieveAlreadyRegisteredUdsRequestDTO {
|
||||
|
||||
private List<? extends OrdineInevasoDTO> ordini;
|
||||
private int segno;
|
||||
|
||||
public List<? extends OrdineInevasoDTO> getOrdini() {
|
||||
return ordini;
|
||||
}
|
||||
|
||||
public RetrieveAlreadyRegisteredUdsRequestDTO setOrdini(List<? extends OrdineInevasoDTO> ordini) {
|
||||
this.ordini = ordini;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getSegno() {
|
||||
return segno;
|
||||
}
|
||||
|
||||
public RetrieveAlreadyRegisteredUdsRequestDTO setSegno(int segno) {
|
||||
this.segno = segno;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
|
||||
public class RetrieveAlreadyRegisteredUdsResponseDTO {
|
||||
|
||||
private List<AlreadyRegisteredUlDTO> udsList;
|
||||
|
||||
public List<AlreadyRegisteredUlDTO> getUdsList() {
|
||||
return udsList;
|
||||
}
|
||||
|
||||
public RetrieveAlreadyRegisteredUdsResponseDTO setUdsList(List<AlreadyRegisteredUlDTO> udsList) {
|
||||
this.udsList = udsList;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||
@@ -453,12 +453,12 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
public void startListaBancaliRegistratiActivity(List<AlreadyRegisteredUDCDTO> mtbColts) {
|
||||
public void startListaBancaliRegistratiActivity(List<AlreadyRegisteredUlDTO> mtbColts) {
|
||||
|
||||
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
||||
|
||||
Stream.of(mtbColts)
|
||||
.map(AlreadyRegisteredUDCDTO::getMtbColt)
|
||||
.map(AlreadyRegisteredUlDTO::getMtbColt)
|
||||
.toList(),
|
||||
|
||||
input -> Stream.of(mtbColts)
|
||||
|
||||
@@ -30,7 +30,7 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingL
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
@@ -160,7 +160,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
}
|
||||
|
||||
|
||||
public void retrieveExistentLU(RunnableArgs<List<AlreadyRegisteredUDCDTO>> onComplete) {
|
||||
public void retrieveExistentLU(RunnableArgs<List<AlreadyRegisteredUlDTO>> onComplete) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
this.mAccettazioneBollaPickingRESTConsumer.retrieveAlreadyRegisteredUDC(this.mBolle, mtbColtList -> {
|
||||
|
||||
@@ -2,17 +2,17 @@ package it.integry.integrywmsnative.gest.accettazione_bolla_picking.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
|
||||
public class RetrieveAlreadyRegisteredULAccettazioneBollaResponseDTO {
|
||||
|
||||
private List<AlreadyRegisteredUDCDTO> udcList;
|
||||
private List<AlreadyRegisteredUlDTO> udcList;
|
||||
|
||||
public List<AlreadyRegisteredUDCDTO> getUdcList() {
|
||||
public List<AlreadyRegisteredUlDTO> getUdcList() {
|
||||
return udcList;
|
||||
}
|
||||
|
||||
public RetrieveAlreadyRegisteredULAccettazioneBollaResponseDTO setUdcList(List<AlreadyRegisteredUDCDTO> udcList) {
|
||||
public RetrieveAlreadyRegisteredULAccettazioneBollaResponseDTO setUdcList(List<AlreadyRegisteredUlDTO> udcList) {
|
||||
this.udcList = udcList;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.handler.ManagedErrorCallback;
|
||||
@@ -32,7 +32,7 @@ public class AccettazioneBollaPickingRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
|
||||
|
||||
public void retrieveAlreadyRegisteredUDC(List<TestataBollaAccettazioneDTO> bolle, RunnableArgs<List<AlreadyRegisteredUDCDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
public void retrieveAlreadyRegisteredUDC(List<TestataBollaAccettazioneDTO> bolle, RunnableArgs<List<AlreadyRegisteredUlDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
AccettazioneBollaPickingRESTConsumerService service = restBuilder.getService(AccettazioneBollaPickingRESTConsumerService.class);
|
||||
|
||||
var request = new RetrieveAlreadyRegisteredULAccettazioneBollaRequestDTO()
|
||||
|
||||
@@ -46,7 +46,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||
@@ -370,7 +370,7 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
|
||||
private void refreshList() {
|
||||
|
||||
handler.post(() -> {
|
||||
runOnUiThread(() -> {
|
||||
List<PickingObjectDTO> tmpList;
|
||||
|
||||
if (mAppliedFilterViewModel != null) {
|
||||
@@ -691,18 +691,20 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
public void startListaBancaliRegistratiActivity(List<AlreadyRegisteredUDCDTO> mtbColts) {
|
||||
public void startListaBancaliRegistratiActivity(List<AlreadyRegisteredUlDTO> mtbColts) {
|
||||
|
||||
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
||||
|
||||
mtbColts.stream().map(AlreadyRegisteredUDCDTO::getMtbColt).collect(Collectors.toList()),
|
||||
mtbColts.stream()
|
||||
.map(AlreadyRegisteredUlDTO::getMtbColt)
|
||||
.collect(Collectors.toList()),
|
||||
|
||||
input -> mtbColts.stream()
|
||||
.filter(x -> Objects.equals(x.getMtbColt().getBarcodeUl(), input.getBarcodeUl()))
|
||||
.findFirst().get()
|
||||
.isCanBeRecovered(),
|
||||
.filter(x -> x.getMtbColt().equals(input))
|
||||
.findFirst()
|
||||
.map(AlreadyRegisteredUlDTO::isCanBeRecovered)
|
||||
.orElse(false),
|
||||
|
||||
false,
|
||||
ReportManager.getReportNameLUFromGestione(GestioneEnum.ACQUISTO));
|
||||
|
||||
this.startActivityForResult(myIntent, PICK_UL_REQUEST);
|
||||
@@ -777,7 +779,7 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
|
||||
@Override
|
||||
public void onWarning(String warningText, Runnable action) {
|
||||
this.handler.post(() -> {
|
||||
this.runOnUiThread(() -> {
|
||||
this.onLoadingEnded();
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString(Html.fromHtml(warningText)), null, action)
|
||||
@@ -792,7 +794,7 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO).setOnComplete(resultDTO -> {
|
||||
if (resultDTO == null || resultDTO.isAborted()) {
|
||||
if (resultDTO == null) {
|
||||
this.mViewModel.resetMatchedRows();
|
||||
return;
|
||||
}
|
||||
@@ -805,7 +807,7 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
|
||||
@Override
|
||||
public void onRowSaved() {
|
||||
handler.post(() -> {
|
||||
runOnUiThread(() -> {
|
||||
Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT)
|
||||
.setBackgroundTint(getResources().getColor(R.color.green_500))
|
||||
.show();
|
||||
@@ -814,7 +816,7 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
|
||||
@Override
|
||||
public void onFilterCodMartApplied(String codMartToFilter) {
|
||||
handler.post(() -> {
|
||||
runOnUiThread(() -> {
|
||||
var codMarts = new ArrayList<String>();
|
||||
codMarts.add(codMartToFilter);
|
||||
|
||||
@@ -824,7 +826,7 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
|
||||
@Override
|
||||
public void onFilterPosizioneApplied(String posizioneToFilter) {
|
||||
handler.post(() -> {
|
||||
runOnUiThread(() -> {
|
||||
var posizioni = new ArrayList<String>();
|
||||
posizioni.add(posizioneToFilter);
|
||||
|
||||
@@ -835,7 +837,7 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
@Override
|
||||
public void onULVersata(VersamentoAutomaticoULResponseDTO versamentoAutomaticoULResponseDTO, Runnable onComplete) {
|
||||
|
||||
handler.post(() -> {
|
||||
runOnUiThread(() -> {
|
||||
DialogVersamentoAutomaticoULDoneView.newInstance(versamentoAutomaticoULResponseDTO, onComplete).show(getSupportFragmentManager(), "tag");
|
||||
});
|
||||
|
||||
@@ -843,7 +845,7 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
|
||||
@Override
|
||||
public void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
||||
handler.post(() -> {
|
||||
runOnUiThread(() -> {
|
||||
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text), null, () -> onComplete.run(true), () -> onComplete.run(false)).show(getSupportFragmentManager(), "tag");
|
||||
});
|
||||
@@ -851,7 +853,7 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
|
||||
@Override
|
||||
public void onLUOpened(MtbColt mtbColt) {
|
||||
handler.post(() -> {
|
||||
runOnUiThread(() -> {
|
||||
noLUPresent.set(false);
|
||||
Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT)
|
||||
.setBackgroundTint(getResources().getColor(R.color.green_500))
|
||||
@@ -863,13 +865,11 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
|
||||
@Override
|
||||
public void onLUClosed() {
|
||||
handler.post(() -> {
|
||||
noLUPresent.set(true);
|
||||
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null);
|
||||
this.refreshList();
|
||||
|
||||
if (this.mShouldCloseActivity) super.onBackPressed();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -32,7 +32,7 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingL
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
@@ -198,7 +198,7 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
return mPickingList;
|
||||
}
|
||||
|
||||
public void retrieveExistentLU(RunnableArgs<List<AlreadyRegisteredUDCDTO>> onComplete) {
|
||||
public void retrieveExistentLU(RunnableArgs<List<AlreadyRegisteredUlDTO>> onComplete) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
this.mAccettazioneOrdiniPickingRESTConsumer.getBancaliGiaRegistrati(this.mOrders, mtbColtList -> {
|
||||
|
||||
@@ -2,17 +2,17 @@ package it.integry.integrywmsnative.gest.accettazione_ordini_picking.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
|
||||
public class RetrieveAlreadyRegisteredULAccettazioneOrdineResponseDTO {
|
||||
|
||||
private List<AlreadyRegisteredUDCDTO> udcList;
|
||||
private List<AlreadyRegisteredUlDTO> udcList;
|
||||
|
||||
public List<AlreadyRegisteredUDCDTO> getUdcList() {
|
||||
public List<AlreadyRegisteredUlDTO> getUdcList() {
|
||||
return udcList;
|
||||
}
|
||||
|
||||
public RetrieveAlreadyRegisteredULAccettazioneOrdineResponseDTO setUdcList(List<AlreadyRegisteredUDCDTO> udcList) {
|
||||
public RetrieveAlreadyRegisteredULAccettazioneOrdineResponseDTO setUdcList(List<AlreadyRegisteredUlDTO> udcList) {
|
||||
this.udcList = udcList;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||
@@ -33,7 +33,7 @@ public class AccettazioneOrdiniPickingRESTConsumer extends _BaseRESTConsumer {
|
||||
this.systemRestConsumer = systemRESTConsumer;
|
||||
}
|
||||
|
||||
public void getBancaliGiaRegistrati(List<OrdineAccettazioneInevasoDTO> ordiniToShow, RunnableArgs<List<AlreadyRegisteredUDCDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
public void getBancaliGiaRegistrati(List<OrdineAccettazioneInevasoDTO> ordiniToShow, RunnableArgs<List<AlreadyRegisteredUlDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
AccettazioneOrdiniPickingRESTConsumerService service = restBuilder.getService(AccettazioneOrdiniPickingRESTConsumerService.class);
|
||||
|
||||
var request = new RetrieveAlreadyRegisteredULAccettazioneOrdineRequestDTO()
|
||||
|
||||
@@ -43,10 +43,10 @@ import it.integry.integrywmsnative.core.interfaces.ISelectAllFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.model.JtbComt;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepo;
|
||||
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.CommessaRESTConsumer;
|
||||
@@ -842,7 +842,7 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<MtbColt> alreadyRegisteredMtbColts) {
|
||||
public void onOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<AlreadyRegisteredUlDTO> alreadyRegisteredMtbColts) {
|
||||
List<String> codMarts = Stream.of(sitArts)
|
||||
.distinctBy(SitArtOrdDTO::getCodMart)
|
||||
.map(SitArtOrdDTO::getCodMart)
|
||||
@@ -862,7 +862,6 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
() -> SpedizioneActivity.startActivity(getActivity(),
|
||||
sitArts,
|
||||
orders,
|
||||
alreadyRegisteredMtbColts,
|
||||
mCurrentGestioneCol,
|
||||
mCurrentSegnoCol,
|
||||
MtbColr.Causale.DEFAULT,
|
||||
|
||||
@@ -23,9 +23,9 @@ import it.integry.integrywmsnative.core.exception.NoOrderFoundException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.DtbOrdt;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
@@ -146,8 +146,7 @@ public class OrdiniUscitaElencoViewModel {
|
||||
List<SitArtOrdDTO> finalSitArts = sitArts;
|
||||
|
||||
this.mOrdiniRESTConsumer.getBancaliGiaRegistrati(
|
||||
Stream.of(selectedOrdersBase).map(x -> (OrdineInevasoDTO) x).toList(),
|
||||
mCurrentGestioneCol,
|
||||
selectedOrdersBase.stream().map(x -> (OrdineInevasoDTO) x).collect(Collectors.toList()),
|
||||
mCurrentSegnoCol,
|
||||
mtbColtList -> {
|
||||
this.sendOnOrdersDispatched(selectedOrdersBase, finalSitArts, mtbColtList);
|
||||
@@ -303,7 +302,7 @@ public class OrdiniUscitaElencoViewModel {
|
||||
if (this.mListener != null) mListener.onOrderFiltered(filteredOrders);
|
||||
}
|
||||
|
||||
private void sendOnOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<MtbColt> alreadyRegisteredMtbColts) {
|
||||
private void sendOnOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<AlreadyRegisteredUlDTO> alreadyRegisteredMtbColts) {
|
||||
if (this.mListener != null)
|
||||
mListener.onOrdersDispatched(orders, sitArts, alreadyRegisteredMtbColts);
|
||||
}
|
||||
@@ -316,7 +315,7 @@ public class OrdiniUscitaElencoViewModel {
|
||||
|
||||
void onOrderFiltered(List<OrdiniUscitaElencoDTO> filteredOrders);
|
||||
|
||||
void onOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<MtbColt> alreadyRegisteredMtbColts);
|
||||
void onOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<AlreadyRegisteredUlDTO> alreadyRegisteredMtbColts);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -446,7 +446,6 @@ public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITi
|
||||
SpedizioneActivity.startActivity(getActivity(),
|
||||
sitArtOrdDTOS,
|
||||
new ArrayList<>(),
|
||||
new ArrayList<>(),
|
||||
GestioneEnum.LAVORAZIONE,
|
||||
+1,
|
||||
MtbColr.Causale.VERSAMENTO,
|
||||
|
||||
@@ -16,6 +16,8 @@ import com.annimon.stream.Stream;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@@ -26,7 +28,6 @@ import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
@@ -122,7 +123,13 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
BarcodeManager.removeCallback(mBarcodeScannerInstanceID);
|
||||
}
|
||||
});
|
||||
|
||||
mViewModel.init(codJfas);
|
||||
mViewModel.refreshData();
|
||||
|
||||
mBinding.swiperefresh.setOnRefreshListener(() -> {
|
||||
mViewModel.refreshData();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -206,7 +213,6 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
|
||||
.setCodMart(x.getCodMart())
|
||||
.setDescrizione(x.getDescrizioneArt())
|
||||
.setNumCollo(x.getNumColloRif())
|
||||
.setPartitaMag(x.getPartitaMag())
|
||||
.setCodJcom(x.getCodJcom())
|
||||
.setQtaVersata(x.getQtaCol())
|
||||
@@ -269,9 +275,25 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLURequest(boolean canLUBeCreated, boolean shouldCheckIfDocExist, RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
DialogScanOrCreateLUView.newInstance(canLUBeCreated, shouldCheckIfDocExist, true, onComplete)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
public DialogScanOrCreateLUView.Result onLURequest(boolean canLUBeCreated, boolean shouldCheckIfDocExist) {
|
||||
AtomicReference<DialogScanOrCreateLUView.Result> result = new AtomicReference<>();
|
||||
CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
|
||||
handler.post(() -> {
|
||||
DialogScanOrCreateLUView.newInstance(canLUBeCreated, shouldCheckIfDocExist, true, data -> {
|
||||
result.set(data);
|
||||
countDownLatch.countDown();
|
||||
})
|
||||
.show(requireActivity().getSupportFragmentManager(), "dialog-scan-or-create-lu");
|
||||
});
|
||||
|
||||
try {
|
||||
countDownLatch.await();
|
||||
} catch (InterruptedException e) {
|
||||
this.onError(e);
|
||||
}
|
||||
|
||||
return result.get();
|
||||
}
|
||||
|
||||
|
||||
@@ -303,4 +325,18 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
DialogCommon.showDataSaved(requireActivity(), this::popMe);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataRefreshStarted() {
|
||||
handler.post(() -> {
|
||||
mBinding.swiperefresh.setRefreshing(true);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataRefreshEnded() {
|
||||
handler.post(() -> {
|
||||
mBinding.swiperefresh.setRefreshing(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,15 +8,14 @@ import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MaterialiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.rest.ProdRecuperoMaterialeRESTConsumer;
|
||||
|
||||
@Module(subcomponents = ProdRecuperoMaterialeComponent.class)
|
||||
public class ProdRecuperoMaterialeModule {
|
||||
|
||||
@Provides
|
||||
ProdRecuperoMaterialeRESTConsumer providesProdRecuperMaterialeRESTConsumer(SystemRESTConsumer systemRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
return new ProdRecuperoMaterialeRESTConsumer(systemRESTConsumer, articoloRESTConsumer);
|
||||
ProdRecuperoMaterialeRESTConsumer providesProdRecuperMaterialeRESTConsumer(MaterialiRESTConsumer materialiRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
return new ProdRecuperoMaterialeRESTConsumer(articoloRESTConsumer, materialiRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
||||
@@ -13,10 +13,10 @@ import javax.inject.Inject;
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.core.exception.NoLUFoundException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.key.MtbColtKey;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MaterialiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
@@ -26,6 +26,7 @@ import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULDTO;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.rest.ProdRecuperoMaterialeRESTConsumer;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView;
|
||||
|
||||
public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
@@ -39,6 +40,8 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
private String mCodJfas;
|
||||
|
||||
|
||||
@Inject
|
||||
public ProdRecuperoMaterialeViewModel(ProdRecuperoMaterialeRESTConsumer prodRecuperoMaterialeRESTConsumer,
|
||||
@@ -54,18 +57,21 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
}
|
||||
|
||||
public void init(String codJfas) {
|
||||
this.sendOnLoadingStarted();
|
||||
this.mCodJfas = codJfas;
|
||||
}
|
||||
|
||||
public void refreshData() {
|
||||
this.sendOnDataRefreshStarted();
|
||||
|
||||
this.mExecutorService.execute(() -> {
|
||||
try {
|
||||
List<HistoryVersamentoProdULDTO> lastUlVersate = mProdRecuperoMaterialeRESTConsumer.loadLastULVersateSynchronized(codJfas);
|
||||
List<HistoryVersamentoProdULDTO> lastUlVersate = mProdRecuperoMaterialeRESTConsumer.loadLastULVersateSynchronized(mCodJfas);
|
||||
this.mUlList.postValue(lastUlVersate);
|
||||
this.sendOnLoadingEnded();
|
||||
this.sendOnDataRefreshEnded();
|
||||
} catch (Exception e) {
|
||||
this.sendError(e);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO data) {
|
||||
@@ -99,10 +105,7 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
private HistoryVersamentoProdULDTO getHistoryElementFromMtbColt(MtbColt mtbColt) {
|
||||
List<HistoryVersamentoProdULDTO> filteredItems = this.mUlList.getValue().stream()
|
||||
.filter(x -> Objects.equals(x.getNumColloRif(), mtbColt.getNumCollo()) &&
|
||||
x.getDataColloRif().equals(mtbColt.getDataColloLD()) &&
|
||||
x.getSerColloRif().equalsIgnoreCase(mtbColt.getSerCollo()) &&
|
||||
x.getGestioneRif().equalsIgnoreCase(mtbColt.getGestione()))
|
||||
.filter(x -> Objects.equals(x.getBarcodeUlIn(), mtbColt.getBarcodeUl()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (!filteredItems.isEmpty()) {
|
||||
@@ -142,9 +145,20 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
public void onItemDispatched(HistoryVersamentoProdULDTO item, PickedQuantityDTO pickedQuantityDTO, MtbColt sourceMtbColt) {
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
RunnableArgss<MtbColt, Boolean> saveRunnable = (mtbColt, createdLU) -> {
|
||||
mExecutorService.execute(() -> {
|
||||
MtbColt mtbColt = sourceMtbColt;
|
||||
|
||||
if (sourceMtbColt == null) {
|
||||
DialogScanOrCreateLUView.Result result = this.sendOnLURequest(true, true);
|
||||
if (result != null && !result.isAborted()) {
|
||||
mtbColt = result.getMtbColt();
|
||||
} else {
|
||||
this.sendOnLoadingEnded();
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
List<RecuperaMaterialiRequestDTO.Ordine> ordiniRequest = item.getOrdini().stream()
|
||||
.map(x -> new RecuperaMaterialiRequestDTO.Ordine()
|
||||
@@ -157,37 +171,35 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
.setNumCnf(x.getNumCnf()))
|
||||
.collect(Collectors.toUnmodifiableList());
|
||||
|
||||
MtbColtKey movementScaricoKey = new MtbColtKey(item.getGestione(), item.getSerCollo(), item.getDataCollo(), item.getNumCollo());
|
||||
|
||||
RecuperaMaterialiRequestDTO request = new RecuperaMaterialiRequestDTO()
|
||||
.setCodMart(item.getCodMart())
|
||||
.setPartitaMag(item.getPartitaMag())
|
||||
.setDataCollo(item.getDataCollo())
|
||||
.setSerCollo(item.getSerCollo())
|
||||
.setNumCollo(item.getNumCollo())
|
||||
.setGestione(item.getGestione())
|
||||
.setMovementScarico(movementScaricoKey)
|
||||
.setQtaTot(pickedQuantityDTO.getQtaTot())
|
||||
.setNumCnf(pickedQuantityDTO.getNumCnf())
|
||||
.setQtaCnf(pickedQuantityDTO.getQtaCnf())
|
||||
.setDataColloRif(item.getDataColloRif())
|
||||
.setSerColloRif(item.getSerColloRif())
|
||||
.setGestioneRif(item.getGestioneRif())
|
||||
.setNumColloRif(item.getNumColloRif())
|
||||
|
||||
.setBarcodeUlScarico(item.getBarcodeUlOut())
|
||||
.setCodMdepScarico(item.getCodMdepOut())
|
||||
.setPosizioneScarico(item.getPosizioneOut())
|
||||
|
||||
.setBarcodeUlCarico(mtbColt.getBarcodeUl())
|
||||
.setCodMdepCarico(mtbColt.getCodMdep())
|
||||
.setPosizioneCarico(mtbColt.getPosizione())
|
||||
|
||||
.setOrdini(ordiniRequest);
|
||||
|
||||
if (mtbColt != null) {
|
||||
request.setMtbColtCarico(mtbColt);
|
||||
} else {
|
||||
request.setMtbColtCarico(sourceMtbColt);
|
||||
}
|
||||
|
||||
//se mtbColt != sourceMtbColt allora devo stampare
|
||||
|
||||
this.mMaterialiRESTConsumer.makeRecuperaRequest(request, updatedMtbColt -> {
|
||||
try {
|
||||
var updatedMtbColt = this.mMaterialiRESTConsumer.makeSynchronousRecuperaRequest(request);
|
||||
this.refreshData();
|
||||
this.sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
};
|
||||
} catch (Exception e) {
|
||||
this.sendError(e);
|
||||
}
|
||||
});
|
||||
|
||||
if (sourceMtbColt != null) saveRunnable.run(sourceMtbColt, false);
|
||||
else this.sendOnLURequest(true, false, saveRunnable);
|
||||
}
|
||||
|
||||
|
||||
@@ -213,6 +225,14 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
private void sendOnDataRefreshStarted() {
|
||||
if (this.mListener != null) mListener.onDataRefreshStarted();
|
||||
}
|
||||
|
||||
private void sendOnDataRefreshEnded() {
|
||||
if (this.mListener != null) mListener.onDataRefreshEnded();
|
||||
}
|
||||
|
||||
private void sendOnLoadingStarted() {
|
||||
if (this.mListener != null) mListener.onLoadingStarted();
|
||||
}
|
||||
@@ -241,9 +261,11 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
mListener.onItemDispatched(item, sourceMtbColt, mtbAart, initialNumCnf, initialQtaCnf, initialQtaTot, totalQtaAvailable, totalNumCnfAvailable, qtaCnfAvailable, partitaMag, canOverflowOrderQuantity, canLUBeClosed);
|
||||
}
|
||||
|
||||
private void sendOnLURequest(boolean canLUBeCreated, boolean shouldCheckIfDocExist, RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
private DialogScanOrCreateLUView.Result sendOnLURequest(boolean canLUBeCreated, boolean shouldCheckIfDocExist) {
|
||||
if (this.mListener != null)
|
||||
mListener.onLURequest(canLUBeCreated, shouldCheckIfDocExist, onComplete);
|
||||
return mListener.onLURequest(canLUBeCreated, shouldCheckIfDocExist);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void sendOnLUPrintError(Exception ex, Runnable onComplete) {
|
||||
@@ -276,13 +298,17 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
boolean canOverflowOrderQuantity,
|
||||
boolean canLUBeClosed);
|
||||
|
||||
void onLURequest(boolean canLUBeCreated, boolean shouldCheckIfDocExist, RunnableArgss<MtbColt, Boolean> onComplete);
|
||||
DialogScanOrCreateLUView.Result onLURequest(boolean canLUBeCreated, boolean shouldCheckIfDocExist);
|
||||
|
||||
void onLUPrintError(Exception ex, Runnable onComplete);
|
||||
|
||||
void onNoLUFound(Runnable onComplete);
|
||||
|
||||
void onDataSaved();
|
||||
|
||||
void onDataRefreshStarted();
|
||||
|
||||
void onDataRefreshEnded();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package it.integry.integrywmsnative.gest.prod_recupero_materiale.dto;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
@@ -13,7 +14,7 @@ public class HistoryVersamentoProdULDTO {
|
||||
private LocalDate dataCollo;
|
||||
private String serCollo;
|
||||
private Integer numCollo;
|
||||
private String segno;
|
||||
private Integer segno;
|
||||
private String codMart;
|
||||
private String codCol;
|
||||
private String codTagl;
|
||||
@@ -24,13 +25,16 @@ public class HistoryVersamentoProdULDTO {
|
||||
private BigDecimal numCnf;
|
||||
private String partitaMag;
|
||||
private String codJcom;
|
||||
private String datetimeRow;
|
||||
private LocalDateTime datetimeRow;
|
||||
private String descrizioneArt;
|
||||
private String untMis;
|
||||
private String gestioneRif;
|
||||
private LocalDate dataColloRif;
|
||||
private String serColloRif;
|
||||
private Integer numColloRif;
|
||||
|
||||
private String barcodeUlOut;
|
||||
private String codMdepOut;
|
||||
private String posizioneOut;
|
||||
private String barcodeUlIn;
|
||||
private String codMdepIn;
|
||||
private String posizioneIn;
|
||||
|
||||
private List<HistoryVersamentoProdULDTO.OrdineDto> ordini;
|
||||
|
||||
@@ -81,11 +85,11 @@ public class HistoryVersamentoProdULDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSegno() {
|
||||
public Integer getSegno() {
|
||||
return segno;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULDTO setSegno(String segno) {
|
||||
public HistoryVersamentoProdULDTO setSegno(Integer segno) {
|
||||
this.segno = segno;
|
||||
return this;
|
||||
}
|
||||
@@ -171,11 +175,11 @@ public class HistoryVersamentoProdULDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDatetimeRow() {
|
||||
public LocalDateTime getDatetimeRow() {
|
||||
return datetimeRow;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULDTO setDatetimeRow(String datetimeRow) {
|
||||
public HistoryVersamentoProdULDTO setDatetimeRow(LocalDateTime datetimeRow) {
|
||||
this.datetimeRow = datetimeRow;
|
||||
return this;
|
||||
}
|
||||
@@ -198,39 +202,57 @@ public class HistoryVersamentoProdULDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGestioneRif() {
|
||||
return gestioneRif;
|
||||
public String getBarcodeUlOut() {
|
||||
return barcodeUlOut;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULDTO setGestioneRif(String gestioneRif) {
|
||||
this.gestioneRif = gestioneRif;
|
||||
public HistoryVersamentoProdULDTO setBarcodeUlOut(String barcodeUlOut) {
|
||||
this.barcodeUlOut = barcodeUlOut;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LocalDate getDataColloRif() {
|
||||
return dataColloRif;
|
||||
public String getCodMdepOut() {
|
||||
return codMdepOut;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULDTO setDataColloRif(LocalDate dataColloRif) {
|
||||
this.dataColloRif = dataColloRif;
|
||||
public HistoryVersamentoProdULDTO setCodMdepOut(String codMdepOut) {
|
||||
this.codMdepOut = codMdepOut;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSerColloRif() {
|
||||
return serColloRif;
|
||||
public String getPosizioneOut() {
|
||||
return posizioneOut;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULDTO setSerColloRif(String serColloRif) {
|
||||
this.serColloRif = serColloRif;
|
||||
public HistoryVersamentoProdULDTO setPosizioneOut(String posizioneOut) {
|
||||
this.posizioneOut = posizioneOut;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getNumColloRif() {
|
||||
return numColloRif;
|
||||
public String getBarcodeUlIn() {
|
||||
return barcodeUlIn;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULDTO setNumColloRif(Integer numColloRif) {
|
||||
this.numColloRif = numColloRif;
|
||||
public HistoryVersamentoProdULDTO setBarcodeUlIn(String barcodeUlIn) {
|
||||
this.barcodeUlIn = barcodeUlIn;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMdepIn() {
|
||||
return codMdepIn;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULDTO setCodMdepIn(String codMdepIn) {
|
||||
this.codMdepIn = codMdepIn;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPosizioneIn() {
|
||||
return posizioneIn;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULDTO setPosizioneIn(String posizioneIn) {
|
||||
this.posizioneIn = posizioneIn;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.gest.prod_recupero_materiale.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class HistoryVersamentoProdULRestDTO {
|
||||
|
||||
@@ -10,7 +11,7 @@ public class HistoryVersamentoProdULRestDTO {
|
||||
private LocalDate dataCollo;
|
||||
private String serCollo;
|
||||
private Integer numCollo;
|
||||
private String segno;
|
||||
private Integer segno;
|
||||
private String codMart;
|
||||
private String codCol;
|
||||
private String codTagl;
|
||||
@@ -21,13 +22,16 @@ public class HistoryVersamentoProdULRestDTO {
|
||||
private BigDecimal numCnf;
|
||||
private String partitaMag;
|
||||
private String codJcom;
|
||||
private String datetimeRow;
|
||||
private LocalDateTime datetimeRow;
|
||||
private String descrizioneArt;
|
||||
private String untMis;
|
||||
private String gestioneRif;
|
||||
private LocalDate dataColloRif;
|
||||
private String serColloRif;
|
||||
private Integer numColloRif;
|
||||
|
||||
private String barcodeUlOut;
|
||||
private String codMdepOut;
|
||||
private String posizioneOut;
|
||||
private String barcodeUlIn;
|
||||
private String codMdepIn;
|
||||
private String posizioneIn;
|
||||
|
||||
private Integer numOrd;
|
||||
private LocalDate dataOrd;
|
||||
@@ -80,11 +84,11 @@ public class HistoryVersamentoProdULRestDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSegno() {
|
||||
public Integer getSegno() {
|
||||
return segno;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setSegno(String segno) {
|
||||
public HistoryVersamentoProdULRestDTO setSegno(Integer segno) {
|
||||
this.segno = segno;
|
||||
return this;
|
||||
}
|
||||
@@ -179,11 +183,11 @@ public class HistoryVersamentoProdULRestDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDatetimeRow() {
|
||||
public LocalDateTime getDatetimeRow() {
|
||||
return datetimeRow;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setDatetimeRow(String datetimeRow) {
|
||||
public HistoryVersamentoProdULRestDTO setDatetimeRow(LocalDateTime datetimeRow) {
|
||||
this.datetimeRow = datetimeRow;
|
||||
return this;
|
||||
}
|
||||
@@ -206,42 +210,6 @@ public class HistoryVersamentoProdULRestDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGestioneRif() {
|
||||
return gestioneRif;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setGestioneRif(String gestioneRif) {
|
||||
this.gestioneRif = gestioneRif;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LocalDate getDataColloRif() {
|
||||
return dataColloRif;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setDataColloRif(LocalDate dataColloRif) {
|
||||
this.dataColloRif = dataColloRif;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSerColloRif() {
|
||||
return serColloRif;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setSerColloRif(String serColloRif) {
|
||||
this.serColloRif = serColloRif;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getNumColloRif() {
|
||||
return numColloRif;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setNumColloRif(Integer numColloRif) {
|
||||
this.numColloRif = numColloRif;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getNumOrd() {
|
||||
return numOrd;
|
||||
}
|
||||
@@ -277,4 +245,58 @@ public class HistoryVersamentoProdULRestDTO {
|
||||
this.gestioneOrd = gestioneOrd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBarcodeUlOut() {
|
||||
return barcodeUlOut;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setBarcodeUlOut(String barcodeUlOut) {
|
||||
this.barcodeUlOut = barcodeUlOut;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMdepOut() {
|
||||
return codMdepOut;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setCodMdepOut(String codMdepOut) {
|
||||
this.codMdepOut = codMdepOut;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPosizioneOut() {
|
||||
return posizioneOut;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setPosizioneOut(String posizioneOut) {
|
||||
this.posizioneOut = posizioneOut;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBarcodeUlIn() {
|
||||
return barcodeUlIn;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setBarcodeUlIn(String barcodeUlIn) {
|
||||
this.barcodeUlIn = barcodeUlIn;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMdepIn() {
|
||||
return codMdepIn;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setCodMdepIn(String codMdepIn) {
|
||||
this.codMdepIn = codMdepIn;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPosizioneIn() {
|
||||
return posizioneIn;
|
||||
}
|
||||
|
||||
public HistoryVersamentoProdULRestDTO setPosizioneIn(String posizioneIn) {
|
||||
this.posizioneIn = posizioneIn;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package it.integry.integrywmsnative.gest.prod_recupero_materiale.rest;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -14,22 +12,18 @@ import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MaterialiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULDTO;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.dto.HistoryVersamentoProdULRestDTO;
|
||||
|
||||
@Singleton
|
||||
public class ProdRecuperoMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
private final SystemRESTConsumer mSystemRESTConsumer;
|
||||
private final ArticoloRESTConsumer mArticoloRESTConsumer;
|
||||
private final MaterialiRESTConsumer mMaterialiRESTConsumer;
|
||||
|
||||
public ProdRecuperoMaterialeRESTConsumer(SystemRESTConsumer systemRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
this.mSystemRESTConsumer = systemRESTConsumer;
|
||||
public ProdRecuperoMaterialeRESTConsumer(ArticoloRESTConsumer articoloRESTConsumer, MaterialiRESTConsumer materialiRESTConsumer) {
|
||||
this.mMaterialiRESTConsumer = materialiRESTConsumer;
|
||||
this.mArticoloRESTConsumer = articoloRESTConsumer;
|
||||
}
|
||||
|
||||
@@ -39,158 +33,7 @@ public class ProdRecuperoMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
|
||||
public List<HistoryVersamentoProdULDTO> loadLastULVersateSynchronized(String codJfas) throws Exception {
|
||||
|
||||
String sql = "WITH ul_list AS ( " +
|
||||
" SELECT jtb_fasi.cod_jfas, " +
|
||||
" jtb_fasi.descrizione AS descrizione_fase, " +
|
||||
" mtb_colr.gestione, " +
|
||||
" mtb_colr.data_collo, " +
|
||||
" mtb_colr.num_collo, " +
|
||||
" mtb_colr.ser_collo, " +
|
||||
" mtb_colr.cod_mart, " +
|
||||
" mtb_colr.cod_col, " +
|
||||
" mtb_colr.cod_tagl, " +
|
||||
" SUM(mtb_colr.qta_col) AS qta_col, " +
|
||||
" mtb_colr.qta_cnf AS qta_cnf, " +
|
||||
" SUM(mtb_colr.num_cnf) AS num_cnf, " +
|
||||
" mtb_colr.partita_mag, " +
|
||||
" mtb_colr.cod_jcom, " +
|
||||
" mtb_colr.num_collo_rif, " +
|
||||
" mtb_colr.data_collo_rif, " +
|
||||
" mtb_colr.ser_collo_rif, " +
|
||||
" mtb_colr.gestione_rif, " +
|
||||
" mtb_colt.segno, " +
|
||||
" ISNULL(mtb_aart.descrizione_estesa, mtb_aart.descrizione) AS descrizione_art, " +
|
||||
" mtb_aart.unt_mis, " +
|
||||
" MAX(datetime_row) AS datetime_row, " +
|
||||
" mtb_colr.num_ord, " +
|
||||
" mtb_colr.data_ord, " +
|
||||
" mtb_colr.gestione as gestione_ord, " +
|
||||
" mtb_colr.riga_ord, " +
|
||||
" dtb_ord_steps.hr_num as hr, " +
|
||||
" CONVERT(INTEGER, ROUND((CAST(dtb_ord_steps.hr_num AS DECIMAL(20, 5)) / " +
|
||||
" SUM(dtb_ord_steps.hr_num) OVER (PARTITION BY mtb_colr.num_collo)) * 100, " +
|
||||
" SUM(CASE WHEN dtb_ord_steps.hr_num > 0 then dtb_ord_steps.hr_num else 1 end) OVER (PARTITION BY mtb_colr.num_collo)) * 100, " +
|
||||
" 0) as percentage_hr " +
|
||||
" FROM mtb_colr " +
|
||||
" INNER JOIN mtb_colt ON mtb_colr.num_collo = mtb_colt.num_collo " +
|
||||
" AND mtb_colr.data_collo = mtb_colt.data_collo " +
|
||||
" AND mtb_colr.ser_collo = mtb_colt.ser_collo " +
|
||||
" AND mtb_colr.gestione = mtb_colt.gestione " +
|
||||
" " + (SettingsManager.iDB().isFlagVersamentoDirettoProduzione() ? "INNER" : "LEFT OUTER") + " join dtb_ord_steps ON dtb_ord_steps.data_ord = mtb_colr.data_ord " +
|
||||
" AND dtb_ord_steps.gestione = mtb_colr.gestione " +
|
||||
" AND dtb_ord_steps.num_ord = mtb_colr.num_ord " +
|
||||
" AND dtb_ord_steps.data_iniz is not null " +
|
||||
" AND dtb_ord_steps.data_fine is null " +
|
||||
" INNER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart " +
|
||||
" LEFT OUTER JOIN jtb_fasi ON mtb_colt.cod_jfas = jtb_fasi.cod_jfas " +
|
||||
" WHERE jtb_fasi.cod_jfas IS NOT NULL " +
|
||||
(UtilityString.isNullOrEmpty(codJfas) ? "" : " AND jtb_fasi.cod_jfas = " + UtilityDB.valueToString(codJfas)) +
|
||||
" AND segno = -1 " +
|
||||
" AND mtb_colr.data_collo > DATEADD(DAY, -5, GETDATE()) " +
|
||||
" GROUP BY jtb_fasi.cod_jfas, " +
|
||||
" jtb_fasi.descrizione, " +
|
||||
" mtb_colr.gestione, " +
|
||||
" mtb_colr.data_collo, " +
|
||||
" mtb_colr.num_collo, " +
|
||||
" mtb_colr.ser_collo, " +
|
||||
" mtb_colr.qta_cnf, " +
|
||||
" mtb_colr.cod_mart, " +
|
||||
" mtb_colr.cod_col, " +
|
||||
" mtb_colr.cod_tagl, " +
|
||||
" mtb_colr.ser_collo, " +
|
||||
" mtb_colr.partita_mag, " +
|
||||
" mtb_colr.cod_jcom, " +
|
||||
" mtb_aart.descrizione_estesa, " +
|
||||
" mtb_aart.descrizione, " +
|
||||
" mtb_aart.unt_mis, " +
|
||||
" mtb_colr.num_collo_rif, " +
|
||||
" mtb_colr.data_collo_rif, " +
|
||||
" mtb_colr.ser_collo_rif, " +
|
||||
" mtb_colr.gestione_rif, " +
|
||||
" mtb_colt.segno, " +
|
||||
" mtb_colr.num_ord, " +
|
||||
" mtb_colr.data_ord, " +
|
||||
" mtb_colr.gestione, " +
|
||||
" mtb_colr.riga_ord, " +
|
||||
" dtb_ord_steps.hr_num " +
|
||||
" HAVING SUM(mtb_colr.qta_col) > 0 " +
|
||||
"), max_ul AS ( " +
|
||||
" SELECT " +
|
||||
" cod_jfas, " +
|
||||
" descrizione_fase, " +
|
||||
" gestione, " +
|
||||
" cod_mart, " +
|
||||
" cod_col, " +
|
||||
" cod_tagl, " +
|
||||
" ser_collo, " +
|
||||
" partita_mag, " +
|
||||
" cod_jcom, " +
|
||||
" descrizione_art, " +
|
||||
" unt_mis, " +
|
||||
" num_collo_rif, " +
|
||||
" data_collo_rif, " +
|
||||
" ser_collo_rif, " +
|
||||
" gestione_rif, " +
|
||||
" segno, " +
|
||||
" num_ord, " +
|
||||
" data_ord, " +
|
||||
" gestione_ord, " +
|
||||
" riga_ord, " +
|
||||
" hr, " +
|
||||
" MAX (datetime_row) as max_datetime_row " +
|
||||
" FROM ul_list " +
|
||||
" GROUP BY cod_jfas, " +
|
||||
" descrizione_fase, " +
|
||||
" gestione, " +
|
||||
" cod_mart, " +
|
||||
" cod_col, " +
|
||||
" cod_tagl, " +
|
||||
" ser_collo, " +
|
||||
" partita_mag, " +
|
||||
" cod_jcom, " +
|
||||
" descrizione_art, " +
|
||||
" unt_mis, " +
|
||||
" num_collo_rif, " +
|
||||
" data_collo_rif, " +
|
||||
" ser_collo_rif, " +
|
||||
" gestione_rif, " +
|
||||
" segno, " +
|
||||
" num_ord, " +
|
||||
" data_ord, " +
|
||||
" gestione_ord, " +
|
||||
" riga_ord, " +
|
||||
" hr " +
|
||||
") " +
|
||||
" " +
|
||||
"SELECT ul_list.* FROM max_ul " +
|
||||
"LEFT OUTER JOIN ul_list ON " +
|
||||
" ISNULL(max_ul.cod_jfas, '') = ISNULL(ul_list.cod_jfas, '') AND " +
|
||||
" ISNULL(max_ul.descrizione_fase, '') = ISNULL(ul_list.descrizione_fase, '') AND " +
|
||||
" ISNULL(max_ul.gestione, '') = ISNULL(ul_list.gestione, '') AND " +
|
||||
" ISNULL(max_ul.cod_mart, '') = ISNULL(ul_list.cod_mart, '') AND " +
|
||||
" ISNULL(max_ul.cod_col, '') = ISNULL(ul_list.cod_col, '') AND " +
|
||||
" ISNULL(max_ul.cod_tagl, '') = ISNULL(ul_list.cod_tagl, '') AND " +
|
||||
" ISNULL(max_ul.ser_collo, '') = ISNULL(ul_list.ser_collo, '') AND " +
|
||||
" ISNULL(max_ul.partita_mag, '') = ISNULL(ul_list.partita_mag, '') AND " +
|
||||
" ISNULL(max_ul.cod_jcom, '') = ISNULL(ul_list.cod_jcom, '') AND " +
|
||||
" ISNULL(max_ul.descrizione_art, '') = ISNULL(ul_list.descrizione_art, '') AND " +
|
||||
" ISNULL(max_ul.unt_mis, '') = ISNULL(ul_list.unt_mis, '') AND " +
|
||||
" ISNULL(max_ul.num_collo_rif, '') = ISNULL(ul_list.num_collo_rif, '') AND " +
|
||||
" ISNULL(max_ul.data_collo_rif, '') = ISNULL(ul_list.data_collo_rif, '') AND " +
|
||||
" ISNULL(max_ul.ser_collo_rif, '') = ISNULL(ul_list.ser_collo_rif, '') AND " +
|
||||
" ISNULL(max_ul.gestione_rif, '') = ISNULL(ul_list.gestione_rif, '') AND " +
|
||||
" ISNULL(max_ul.segno, '') = ISNULL(ul_list.segno, '') AND " +
|
||||
" ISNULL(max_ul.num_ord, '') = ISNULL(ul_list.num_ord, '') AND " +
|
||||
" ISNULL(max_ul.data_ord, '') = ISNULL(ul_list.data_ord, '') AND " +
|
||||
" ISNULL(max_ul.gestione_ord, '') = ISNULL(ul_list.gestione_ord, '') AND " +
|
||||
" ISNULL(max_ul.riga_ord, '') = ISNULL(ul_list.riga_ord, '') AND " +
|
||||
" ISNULL(max_ul.hr, '') = ISNULL(ul_list.hr, '') AND " +
|
||||
" max_ul.max_datetime_row = ul_list.datetime_row";
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<HistoryVersamentoProdULRestDTO>>() {
|
||||
}.getType();
|
||||
var ulList = this.mSystemRESTConsumer.<ArrayList<HistoryVersamentoProdULRestDTO>>processSqlSynchronized(sql, typeOfObjectsList);
|
||||
var ulList = mMaterialiRESTConsumer.makeSynchronousRetrieveLastVersamentiRequest(codJfas);
|
||||
|
||||
if (ulList == null) {
|
||||
return null;
|
||||
@@ -206,10 +49,7 @@ public class ProdRecuperoMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
hashMap.put("ser_collo", x.getSerCollo());
|
||||
hashMap.put("num_collo", x.getNumCollo());
|
||||
hashMap.put("cod_mart", x.getCodMart());
|
||||
hashMap.put("gestione_rif", x.getGestioneRif());
|
||||
hashMap.put("data_collo_rif", x.getDataColloRif());
|
||||
hashMap.put("ser_collo_rif", x.getSerColloRif());
|
||||
hashMap.put("num_collo_rif", x.getNumColloRif());
|
||||
hashMap.put("barcode_ul_out", x.getBarcodeUlOut());
|
||||
|
||||
return hashMap;
|
||||
})
|
||||
@@ -251,21 +91,23 @@ public class ProdRecuperoMaterialeRESTConsumer extends _BaseRESTConsumer {
|
||||
.setCodJcom(restDTO.getCodJcom())
|
||||
.setDatetimeRow(restDTO.getDatetimeRow())
|
||||
.setUntMis(restDTO.getUntMis())
|
||||
.setGestioneRif(restDTO.getGestioneRif())
|
||||
.setDataColloRif(restDTO.getDataColloRif())
|
||||
.setSerColloRif(restDTO.getSerColloRif())
|
||||
.setNumColloRif(restDTO.getNumColloRif())
|
||||
.setBarcodeUlOut(restDTO.getBarcodeUlOut())
|
||||
.setCodMdepOut(restDTO.getCodMdepOut())
|
||||
.setPosizioneOut(restDTO.getPosizioneOut())
|
||||
.setBarcodeUlIn(restDTO.getBarcodeUlIn())
|
||||
.setCodMdepIn(restDTO.getCodMdepIn())
|
||||
.setPosizioneIn(restDTO.getPosizioneIn())
|
||||
.setOrdini(ordineList));
|
||||
|
||||
});
|
||||
|
||||
|
||||
if (!newUlList.isEmpty()) {
|
||||
List<String> codMarts = Stream.of(newUlList)
|
||||
List<String> codMarts = newUlList.stream()
|
||||
.map(HistoryVersamentoProdULDTO::getCodMart)
|
||||
.withoutNulls()
|
||||
.filter(Objects::nonNull)
|
||||
.distinct()
|
||||
.toList();
|
||||
.collect(Collectors.toUnmodifiableList());
|
||||
|
||||
var arts = this.mArticoloRESTConsumer.getByCodMartsSynchronized(codMarts);
|
||||
|
||||
|
||||
@@ -98,7 +98,6 @@ public class HistoryULsListAdapter extends ExtendedSectionedRecyclerView<History
|
||||
|
||||
holder.binding.codMart.setText(ul.getCodMart());
|
||||
holder.binding.descrizione.setText(ul.getDescrizione());
|
||||
holder.binding.numCollo.setText(String.valueOf(ul.getNumCollo()));
|
||||
|
||||
holder.binding.partitaMagContainer.setVisibility(UtilityString.isNullOrEmpty(ul.getPartitaMag()) ? View.GONE : View.VISIBLE);
|
||||
holder.binding.partitaMag.setText(ul.getPartitaMag());
|
||||
|
||||
@@ -8,7 +8,6 @@ public class HistoryULsListModel {
|
||||
|
||||
private String groupTitle;
|
||||
|
||||
private int numCollo;
|
||||
private String codMart;
|
||||
private String descrizione;
|
||||
private String partitaMag;
|
||||
@@ -28,15 +27,6 @@ public class HistoryULsListModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getNumCollo() {
|
||||
return numCollo;
|
||||
}
|
||||
|
||||
public HistoryULsListModel setNumCollo(int numCollo) {
|
||||
this.numCollo = numCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import javax.inject.Inject;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.databinding.FragmentProdVersamentoMaterialeInBufferBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
@@ -68,8 +69,10 @@ public class ProdVersamentoMaterialeInBufferFragment extends BaseFragment implem
|
||||
|
||||
|
||||
private void openLU() {
|
||||
DialogScanOrCreateLUView.newInstance(false, false, true, false, true, (mtbColt, created) -> {
|
||||
if (mtbColt == null) {
|
||||
DialogScanOrCreateLUView.newInstance(false, false, true, false, true, scanOrCreateResult -> {
|
||||
MtbColt mtbColt = scanOrCreateResult.getMtbColt();
|
||||
|
||||
if (scanOrCreateResult.isAborted() || scanOrCreateResult.getMtbColt() == null) {
|
||||
popMe();
|
||||
} else if ((mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO ||
|
||||
mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE ||
|
||||
|
||||
@@ -334,12 +334,12 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
DialogScanOrCreateLUView.newInstance(enableCreation, checkIfDocumentExists, warnOnOpeningVendita, (mtbColt, created) -> {
|
||||
if (mtbColt == null) {
|
||||
public void onLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgs<DialogScanOrCreateLUView.Result> onComplete) {
|
||||
DialogScanOrCreateLUView.newInstance(enableCreation, checkIfDocumentExists, warnOnOpeningVendita, scanOrCreateResult -> {
|
||||
if (scanOrCreateResult.isAborted() || scanOrCreateResult.getMtbColt() == null) {
|
||||
popMe();
|
||||
} else {
|
||||
onComplete.run(mtbColt, created);
|
||||
onComplete.run(scanOrCreateResult);
|
||||
}
|
||||
}).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ import it.integry.integrywmsnative.gest.rettifica_giacenze.rest.RettificaGiacenz
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGException;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView;
|
||||
|
||||
public class RettificaGiacenzeViewModel {
|
||||
|
||||
@@ -96,11 +97,11 @@ public class RettificaGiacenzeViewModel {
|
||||
this.sendOnLUOpenRequest(mDefaultGestione == null || mDefaultGestione != GestioneEnum.VENDITA,
|
||||
mDefaultGestione != null && mDefaultGestione == GestioneEnum.VENDITA,
|
||||
mDefaultGestione == null || mDefaultGestione != GestioneEnum.VENDITA,
|
||||
(mtbColt, created) -> {
|
||||
this.mCurrentMtbColt = mtbColt;
|
||||
this.mIsCreatedLU = created;
|
||||
result -> {
|
||||
this.mCurrentMtbColt = result.getMtbColt();
|
||||
this.mIsCreatedLU = result.isNewLU();
|
||||
|
||||
this.sendLUOpened(mtbColt);
|
||||
this.sendLUOpened(result.getMtbColt());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -627,7 +628,7 @@ public class RettificaGiacenzeViewModel {
|
||||
if (this.mListener != null) mListener.onArtListLoaded(artList, onArtChoosed);
|
||||
}
|
||||
|
||||
private void sendOnLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
private void sendOnLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgs<DialogScanOrCreateLUView.Result> onComplete) {
|
||||
if (this.mListener != null)
|
||||
mListener.onLUOpenRequest(enableCreation, checkIfDocumentExists, warnOnOpeningVendita, onComplete);
|
||||
}
|
||||
@@ -717,7 +718,7 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed);
|
||||
|
||||
void onLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgss<MtbColt, Boolean> onComplete);
|
||||
void onLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgs<DialogScanOrCreateLUView.Result> onComplete);
|
||||
|
||||
void onLUOpened(MtbColt mtbColt);
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@@ -50,8 +51,10 @@ import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
@@ -120,7 +123,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
|
||||
private ArrayList<SitArtOrdDTO> mSitArtOrd;
|
||||
private ArrayList<OrdineUscitaInevasoDTO> mTestateOrdini;
|
||||
private ArrayList<MtbColt> mColliRegistrati;
|
||||
private ArrayList<AlreadyRegisteredUlDTO> mColliRegistrati;
|
||||
private GestioneEnum mGestioneCol;
|
||||
private int mSegnoCol;
|
||||
private Integer mDefaultCausaleUL;
|
||||
@@ -135,7 +138,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
public static void startActivity(Context context,
|
||||
List<SitArtOrdDTO> ordini,
|
||||
List<OrdineUscitaInevasoDTO> selectedOrders,
|
||||
List<MtbColt> mtbColtList,
|
||||
GestioneEnum gestioneCol,
|
||||
int segnoCol,
|
||||
Integer defaultCausaleUL,
|
||||
@@ -149,9 +151,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
String keyTestateOrdini = DataCache.addItem(selectedOrders);
|
||||
myIntent.putExtra("keyTestateOrdini", keyTestateOrdini);
|
||||
|
||||
String keyColliRegistrati = DataCache.addItem(mtbColtList);
|
||||
myIntent.putExtra("keyColliRegistrati", keyColliRegistrati);
|
||||
|
||||
String keyGestioneCol = DataCache.addItem(gestioneCol);
|
||||
myIntent.putExtra("keyGestioneCol", keyGestioneCol);
|
||||
|
||||
@@ -176,7 +175,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
|
||||
mSitArtOrd = DataCache.retrieveItem(getIntent().getStringExtra("keyPickingList"));
|
||||
mTestateOrdini = DataCache.retrieveItem(getIntent().getStringExtra("keyTestateOrdini"));
|
||||
mColliRegistrati = DataCache.retrieveItem(getIntent().getStringExtra("keyColliRegistrati"));
|
||||
mGestioneCol = DataCache.retrieveItem(getIntent().getStringExtra("keyGestioneCol"));
|
||||
mSegnoCol = DataCache.retrieveItem(getIntent().getStringExtra("keySegnoCol"));
|
||||
mDefaultCausaleUL = DataCache.retrieveItem(getIntent().getStringExtra("keyDefaultCausaleCol"));
|
||||
@@ -229,7 +227,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
canOverflowOrderQuantity,
|
||||
mSitArtOrd,
|
||||
mTestateOrdini,
|
||||
mColliRegistrati,
|
||||
mGestioneCol, mSegnoCol, mDefaultCausaleUL,
|
||||
mEnableQuantityReset,
|
||||
useQtaOrd,
|
||||
@@ -830,14 +827,36 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
}
|
||||
|
||||
public void showCreatedUL() {
|
||||
handler.post(() -> {
|
||||
this.fabPopupMenu.dismiss();
|
||||
|
||||
ArrayList<MtbColt> createdMtbColts = this.mViewmodel.getCreatedMtbColts();
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
ArrayList<AlreadyRegisteredUlDTO> createdMtbColts = this.mViewmodel.getCreatedMtbColts();
|
||||
|
||||
handler.post(() -> {
|
||||
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
||||
|
||||
createdMtbColts.stream()
|
||||
.map(AlreadyRegisteredUlDTO::getMtbColt)
|
||||
.collect(Collectors.toList()),
|
||||
|
||||
input -> createdMtbColts.stream()
|
||||
.filter(x -> x.getMtbColt().equals(input))
|
||||
.findFirst()
|
||||
.map(AlreadyRegisteredUlDTO::isCanBeRecovered)
|
||||
.orElse(false),
|
||||
|
||||
false,
|
||||
|
||||
ReportManager.getReportNameLUFromGestione(GestioneEnum.ACQUISTO));
|
||||
|
||||
|
||||
Intent myIntent = ListaBancaliActivity.createIntent(this, createdMtbColts, true, false);
|
||||
this.startActivityForResult(myIntent, PICK_UL_REQUEST);
|
||||
});
|
||||
} catch (Exception e) {
|
||||
onError(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1097,18 +1116,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
}
|
||||
|
||||
return resultPrintPackingList.get();
|
||||
//
|
||||
// boolean printPackingList = resultPrintPackingList.get();
|
||||
// printOrderCloseDTO.setFlagPrintPackingList(printPackingList);
|
||||
//
|
||||
// if (SettingsManager.iDB().isFlagPrintEtichetteOnOrderClose()) {
|
||||
// var shouldPrintSSCCResult = this.askShouldPrintSSCC(printOrderCloseDTO);
|
||||
//
|
||||
// printOrderCloseDTO.setFlagPrintSSCC(shouldPrintSSCCResult.isFlagPrintSSCC());
|
||||
// printOrderCloseDTO.setFlagSkipPrintedSSCC(shouldPrintSSCCResult.isFlagSkipPrintedSSCC());
|
||||
// }
|
||||
//
|
||||
// return printOrderCloseDTO;
|
||||
}
|
||||
|
||||
public DialogPrintOrderSSCCListView.Result askShouldPrintSSCC(PrintOrderCloseDTO printOrderCloseDTO) {
|
||||
|
||||
@@ -50,6 +50,7 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||
import it.integry.integrywmsnative.core.model.VtbVett;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
@@ -108,7 +109,6 @@ public class SpedizioneViewModel {
|
||||
private List<OrdineUscitaInevasoDTO> mTestateOrdini;
|
||||
private MutableLiveData<List<PickingObjectDTO>> mPickingList = new MutableLiveData<>();
|
||||
private MutableLiveData<Boolean> mFilterApplied = new MutableLiveData<>(false);
|
||||
private List<MtbColt> mColliRegistrati = new ArrayList<>();
|
||||
private List<MtbPartitaMag> mPartitaMagList = new ArrayList<>();
|
||||
|
||||
private Listener mListener;
|
||||
@@ -188,12 +188,11 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
|
||||
|
||||
public void init(String codMdep, boolean enableGiacenza, boolean enableCheckPartitaMag, boolean shouldAskPesoLU, boolean canOverflowOrderQuantity, List<SitArtOrdDTO> pickingList, List<OrdineUscitaInevasoDTO> testateOrdini, List<MtbColt> colliRegistrati, GestioneEnum gestioneCol, int segnoCol, Integer defaultCausaleUL, boolean enableQuantityReset, boolean useQtaOrd, boolean useColliPedana) {
|
||||
public void init(String codMdep, boolean enableGiacenza, boolean enableCheckPartitaMag, boolean shouldAskPesoLU, boolean canOverflowOrderQuantity, List<SitArtOrdDTO> pickingList, List<OrdineUscitaInevasoDTO> testateOrdini, GestioneEnum gestioneCol, int segnoCol, Integer defaultCausaleUL, boolean enableQuantityReset, boolean useQtaOrd, boolean useColliPedana) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
this.mDefaultCodMdep = codMdep;
|
||||
this.mTestateOrdini = testateOrdini;
|
||||
this.mColliRegistrati = colliRegistrati;
|
||||
this.mEnableGiacenza = enableGiacenza;
|
||||
this.mEnableCheckPartitaMag = enableCheckPartitaMag;
|
||||
this.mCanOverflowOrderQuantity = canOverflowOrderQuantity;
|
||||
@@ -1772,10 +1771,6 @@ public class SpedizioneViewModel {
|
||||
|
||||
this.askPrint((shouldPrint && SettingsManager.iDB().isFlagPrintEtichetteOnLUClose()), filledMtbColts);
|
||||
|
||||
filledMtbColts.stream()
|
||||
.filter(x -> !this.mColliRegistrati.contains(x))
|
||||
.forEach(x -> this.mColliRegistrati.add(x));
|
||||
|
||||
postCloseOperations(filledMtbColts);
|
||||
|
||||
this.mIsNewLU = false;
|
||||
@@ -2196,8 +2191,8 @@ public class SpedizioneViewModel {
|
||||
return mPartitaMagList;
|
||||
}
|
||||
|
||||
public ArrayList<MtbColt> getCreatedMtbColts() {
|
||||
return (ArrayList<MtbColt>) this.mColliRegistrati;
|
||||
public ArrayList<AlreadyRegisteredUlDTO> getCreatedMtbColts() throws Exception {
|
||||
return (ArrayList<AlreadyRegisteredUlDTO>) this.mOrdiniRestConsumerService.getBancaliGiaRegistratiSynchronized(mTestateOrdini, mDefaultSegnoCol);
|
||||
}
|
||||
|
||||
public VtbVett getDefaultVettore() {
|
||||
@@ -2205,6 +2200,19 @@ public class SpedizioneViewModel {
|
||||
}
|
||||
|
||||
void createDocs() {
|
||||
executorService.execute(() -> {
|
||||
List<MtbColt> registeredUds = null;
|
||||
|
||||
try {
|
||||
var alreadyCreatedUds = getCreatedMtbColts();
|
||||
registeredUds = alreadyCreatedUds.stream()
|
||||
.map(AlreadyRegisteredUlDTO::getMtbColt)
|
||||
.collect(Collectors.toList());
|
||||
} catch (Exception e) {
|
||||
sendError(e);
|
||||
return;
|
||||
}
|
||||
|
||||
var loadCollidto = new LoadColliDTO();
|
||||
|
||||
var codAnag = mTestateOrdini.stream()
|
||||
@@ -2214,13 +2222,14 @@ public class SpedizioneViewModel {
|
||||
.findFirst()
|
||||
.get();
|
||||
|
||||
var codVdes = mTestateOrdini.stream().map(OrdineUscitaInevasoDTO::getCodVdes)
|
||||
var codVdes = mTestateOrdini.stream()
|
||||
.map(OrdineUscitaInevasoDTO::getCodVdes)
|
||||
.filter(Objects::nonNull)
|
||||
.distinct()
|
||||
.findFirst()
|
||||
.get();
|
||||
|
||||
loadCollidto.setColli(getCreatedMtbColts());
|
||||
loadCollidto.setColli(registeredUds);
|
||||
loadCollidto.setCodDtip(SettingsManager.iDB().getCodDtipOrdTrasfV());
|
||||
loadCollidto.setCodMdep(mDefaultCodMdep);
|
||||
loadCollidto.setCodAnag(codAnag);
|
||||
@@ -2229,6 +2238,7 @@ public class SpedizioneViewModel {
|
||||
loadCollidto.setGestione("L");
|
||||
|
||||
this.mDocumentRESTConsumer.createDocFromColli(loadCollidto, doc -> this.sendOnOrderClosed(), this::sendError);
|
||||
});
|
||||
}
|
||||
|
||||
private Integer sendInputDuplicate() {
|
||||
|
||||
@@ -108,8 +108,10 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
||||
|
||||
|
||||
public void openLU() {
|
||||
DialogScanOrCreateLUView.newInstance(true, false, true, false, true, (mtbColt, created) -> {
|
||||
if (mtbColt == null) {
|
||||
DialogScanOrCreateLUView.newInstance(true, false, true, false, true, scanOrCreateResult -> {
|
||||
var mtbColt = scanOrCreateResult.getMtbColt();
|
||||
|
||||
if (scanOrCreateResult.isAborted() || scanOrCreateResult.getMtbColt() == null) {
|
||||
((IPoppableActivity) getActivity()).pop();
|
||||
} else if ((mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE) && mtbColt.getSegno().equals(+1)) {
|
||||
this.mViewModel.getCurrentMtbColt().postValue(mtbColt);
|
||||
@@ -177,7 +179,7 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
||||
handler.post(() -> {
|
||||
DialogChooseArtsFromMtbColrList
|
||||
.newInstance(mtbColrList, data -> {
|
||||
if(data == null || data.isEmpty()) {
|
||||
if (data == null || data.isEmpty()) {
|
||||
onAbort.run();
|
||||
} else onComplete.run(data);
|
||||
}, onAbort)
|
||||
@@ -218,7 +220,7 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete(resultDTO -> {
|
||||
|
||||
if(resultDTO == null || resultDTO.isAborted()) {
|
||||
if (resultDTO == null || resultDTO.isAborted()) {
|
||||
this.onLoadingEnded();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.databinding.DialogScanOrCreateLuBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
@@ -37,7 +36,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
private DialogScanOrCreateLuBinding mBindings;
|
||||
private int mBarcodeScannerInstanceID;
|
||||
|
||||
private final RunnableArgss<MtbColt, Boolean> mOnComplete;
|
||||
private final RunnableArgs<Result> mOnComplete;
|
||||
private MtbColt openedMtbColt;
|
||||
|
||||
private final boolean mShouldCheckResiduo;
|
||||
@@ -49,19 +48,19 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
private final BindableBoolean creationEnabled = new BindableBoolean();
|
||||
|
||||
|
||||
public static DialogScanOrCreateLUView newInstance(@NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
public static DialogScanOrCreateLUView newInstance(@NotNull RunnableArgs<Result> onComplete) {
|
||||
return new DialogScanOrCreateLUView(false, true, true, true, true, onComplete);
|
||||
}
|
||||
|
||||
public static DialogScanOrCreateLUView newInstance(boolean enableCreation, boolean shouldCheckIfExistDoc, boolean warnOnOpeningVendita, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
public static DialogScanOrCreateLUView newInstance(boolean enableCreation, boolean shouldCheckIfExistDoc, boolean warnOnOpeningVendita, @NotNull RunnableArgs<Result> onComplete) {
|
||||
return new DialogScanOrCreateLUView(false, enableCreation, true, shouldCheckIfExistDoc, warnOnOpeningVendita, onComplete);
|
||||
}
|
||||
|
||||
public static DialogScanOrCreateLUView newInstance(boolean enableBasket, boolean enableCreation, boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean warnOnOpeningVendita, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
public static DialogScanOrCreateLUView newInstance(boolean enableBasket, boolean enableCreation, boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean warnOnOpeningVendita, @NotNull RunnableArgs<Result> onComplete) {
|
||||
return new DialogScanOrCreateLUView(enableBasket, enableCreation, checkResiduo, shouldCheckIfExistDoc, warnOnOpeningVendita, onComplete);
|
||||
}
|
||||
|
||||
private DialogScanOrCreateLUView(boolean enableBasket, boolean enableCreation, boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean warnOnOpeningVendita, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||
private DialogScanOrCreateLUView(boolean enableBasket, boolean enableCreation, boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean warnOnOpeningVendita, @NotNull RunnableArgs<Result> onComplete) {
|
||||
super();
|
||||
mShouldCheckResiduo = checkResiduo;
|
||||
mShouldCheckIfExistDoc = shouldCheckIfExistDoc;
|
||||
@@ -126,7 +125,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
BarcodeManager.removeCallback(mBarcodeScannerInstanceID);
|
||||
if (openedMtbColt == null) {
|
||||
mOnComplete.run(null, false);
|
||||
mOnComplete.run(Result.aborted());
|
||||
}
|
||||
super.onDismiss(dialog);
|
||||
}
|
||||
@@ -144,9 +143,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessfull = data -> {
|
||||
this.onLoadingStarted();
|
||||
|
||||
this.mViewModel.processBarcodeDTO(data, () -> {
|
||||
this.onLoadingEnded();
|
||||
});
|
||||
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||
};
|
||||
|
||||
|
||||
@@ -172,9 +169,43 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
@Override
|
||||
public void onLUOpened(MtbColt mtbColt, boolean created) {
|
||||
this.openedMtbColt = mtbColt;
|
||||
mOnComplete.run(mtbColt, created);
|
||||
mOnComplete.run(Result.completed(mtbColt, created));
|
||||
|
||||
dismiss();
|
||||
}
|
||||
|
||||
|
||||
public static class Result {
|
||||
private final MtbColt mtbColt;
|
||||
private final boolean newLU;
|
||||
private boolean aborted = false;
|
||||
|
||||
private Result(MtbColt mtbColt, boolean isNewLU) {
|
||||
this.mtbColt = mtbColt;
|
||||
this.newLU = isNewLU;
|
||||
}
|
||||
|
||||
public static Result completed(MtbColt mtbColt, boolean isNewLU) {
|
||||
return new Result(mtbColt, isNewLU);
|
||||
}
|
||||
|
||||
public static Result aborted() {
|
||||
Result result = new Result(null, false);
|
||||
result.aborted = true;
|
||||
return result;
|
||||
}
|
||||
|
||||
public MtbColt getMtbColt() {
|
||||
return mtbColt;
|
||||
}
|
||||
|
||||
public boolean isNewLU() {
|
||||
return newLU;
|
||||
}
|
||||
|
||||
public boolean isAborted() {
|
||||
return aborted;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:fab="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:fab="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
@@ -18,13 +18,21 @@
|
||||
tools:context=".gest.prod_recupero_materiale.ProdRecuperoMaterialeFragment">
|
||||
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swiperefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:background="@android:color/white"
|
||||
android:id="@+id/prod_recupero_materiale_main_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/prod_recupero_materiale_list_item"/>
|
||||
tools:listitem="@layout/prod_recupero_materiale_list_item" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/empty_view"
|
||||
|
||||
@@ -8,33 +8,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="-8dp"
|
||||
android:text="@string/logistic_unit" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/num_collo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="22" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user