Fix su tara non presente in anagrafica articolo. Cambiato servizio di retrieve by codMart.
This commit is contained in:
parent
f5ad8e8b64
commit
4ba1b847e7
@ -152,7 +152,7 @@ dependencies {
|
||||
implementation 'com.github.pedromassango:doubleClick:3.0'
|
||||
|
||||
//SQLite ROOM
|
||||
def room_version = "2.5.2"
|
||||
def room_version = "2.6.1"
|
||||
|
||||
implementation "androidx.room:room-runtime:$room_version"
|
||||
annotationProcessor "androidx.room:room-compiler:$room_version"
|
||||
|
||||
@ -78,14 +78,12 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
.setCodMarts(codMarts))
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
||||
onComplete.run(response.body().getEntityList());
|
||||
}, onFailed);
|
||||
public void onResponse(Call<ServiceRESTResponse<List<MtbAart>>> call, Response<ServiceRESTResponse<List<MtbAart>>> response) {
|
||||
analyzeAnswer(response, "getByCodMart", onComplete, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
|
||||
public void onFailure(Call<ServiceRESTResponse<List<MtbAart>>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
@ -112,28 +110,11 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
public void getByCodMart(String codMartToFind, RunnableArgs<MtbAart> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
articoloRESTConsumer.getByCodMart(
|
||||
new RetrieveArticoloByCodMartRequestDTO()
|
||||
.setCodMarts(Collections.singletonList(codMartToFind)))
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
||||
if (response.body().getEntityList() != null && !response.body().getEntityList().isEmpty()) {
|
||||
onComplete.run(response.body().getEntityList().get(0));
|
||||
} else onComplete.run(null);
|
||||
|
||||
getByCodMarts(Collections.singletonList(codMartToFind), artList -> {
|
||||
onComplete.run(artList != null && !artList.isEmpty() ? artList.get(0) : null);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void getArtsGroups(List<String> groupsToFind, RunnableArgs<List<MtbGrup>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
var whereCondMap = Stream.of(groupsToFind)
|
||||
|
||||
@ -21,7 +21,7 @@ public interface ArticoloRESTConsumerService {
|
||||
Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> searchByBarcode(@Body() SearchArticoloByBarcodeRequestDTO searchArticoloByBarcodeRequest);
|
||||
|
||||
@POST("wms/articolo/retrieveByCodMart")
|
||||
Call<ServiceRESTResponse<MtbAart>> getByCodMart(@Body RetrieveArticoloByCodMartRequestDTO retrieveArticoloByCodMartRequest);
|
||||
Call<ServiceRESTResponse<List<MtbAart>>> getByCodMart(@Body RetrieveArticoloByCodMartRequestDTO retrieveArticoloByCodMartRequest);
|
||||
|
||||
@POST("wms/articolo/updateBarcodeImballo")
|
||||
Call<ServiceRESTResponse<Void>> updateBarcodeImballo(@Body UpdateBarcodeImballoRequestDTO updateBarcodeImballoRequest);
|
||||
|
||||
@ -16,8 +16,6 @@ public class SitBollaAccettazioneDTO {
|
||||
private BigDecimal qtaDoc;
|
||||
private BigDecimal qtaCnfDoc;
|
||||
private BigDecimal numCnfDoc;
|
||||
private BigDecimal qtaAccettata;
|
||||
private BigDecimal numCnfAccettata;
|
||||
private BigDecimal qtaDaAccettare;
|
||||
private BigDecimal numCnfDaAccettare;
|
||||
|
||||
@ -111,24 +109,6 @@ public class SitBollaAccettazioneDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaAccettata() {
|
||||
return qtaAccettata;
|
||||
}
|
||||
|
||||
public SitBollaAccettazioneDTO setQtaAccettata(BigDecimal qtaAccettata) {
|
||||
this.qtaAccettata = qtaAccettata;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getNumCnfAccettata() {
|
||||
return numCnfAccettata;
|
||||
}
|
||||
|
||||
public SitBollaAccettazioneDTO setNumCnfAccettata(BigDecimal numCnfAccettata) {
|
||||
this.numCnfAccettata = numCnfAccettata;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaDaAccettare() {
|
||||
return qtaDaAccettare;
|
||||
}
|
||||
|
||||
@ -103,7 +103,8 @@ public class BottomSheetFragmentLUContentView extends BottomSheetFragmentBaseVie
|
||||
List<MtbColr> mtbColrs = mViewModel.getObservableMtbColt().get().getMtbColr();
|
||||
mBinding.textviewArtCounter.setText(String.valueOf(mtbColrs.size()));
|
||||
mBinding.textviewArtDescription.setText(mContext.getResources().getQuantityString(R.plurals.articles, mtbColrs.size()));
|
||||
mViewModel.calcPesi();
|
||||
|
||||
mViewModel.refreshPesi();
|
||||
}
|
||||
|
||||
public BottomSheetFragmentLUContentView setListener(Listener listener) {
|
||||
|
||||
@ -41,7 +41,7 @@ public class BottomSheetFragmentLUContentViewModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public void calcPesi() {
|
||||
public void refreshPesi() {
|
||||
MtbColt collo = this.mtbColt.get();
|
||||
if (collo == null) return;
|
||||
|
||||
@ -52,7 +52,7 @@ public class BottomSheetFragmentLUContentViewModel {
|
||||
for (MtbColr mtbColr : collo.getMtbColr()) {
|
||||
MtbAart articolo = mtbColr.getMtbAart();
|
||||
|
||||
if (articolo == null || articolo.getPesoKg() == null)
|
||||
if (articolo == null || articolo.getPesoKg() == null || articolo.getTaraKg() == null)
|
||||
continue;
|
||||
|
||||
BigDecimal pesoRiga = articolo.isFlagQtaCnfFissaBoolean() ? mtbColr.getNumCnf().multiply(articolo.getPesoKg()) : mtbColr.getQtaCol();
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
buildscript {
|
||||
ext {
|
||||
kotlin_version = '1.9.0'
|
||||
agp_version = '8.1.4'
|
||||
agp_version = '8.2.0'
|
||||
}
|
||||
|
||||
repositories {
|
||||
@ -13,7 +13,7 @@ buildscript {
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:$agp_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.google.gms:google-services:4.3.15'
|
||||
classpath 'com.google.gms:google-services:4.4.0'
|
||||
|
||||
classpath 'com.google.firebase:perf-plugin:1.4.2'
|
||||
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
#Mon Feb 13 15:14:43 CET 2023
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user