Finish v1.40.30(447)
This commit is contained in:
commit
a771335ff1
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 445
|
def appVersionCode = 447
|
||||||
def appVersionName = '1.40.28'
|
def appVersionName = '1.40.30'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -51,9 +51,9 @@ public class DocumentRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkFrumaDocument(String fornitore, String numDoc, String dataDoc, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
public void checkDocument(String fornitore, String numDoc, String dataDoc, String tipoDoc, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
var inventarioRESTConsumerService = RESTBuilder.getService(DocumentiRESTConsumerService.class);
|
var inventarioRESTConsumerService = RESTBuilder.getService(DocumentiRESTConsumerService.class);
|
||||||
inventarioRESTConsumerService.checkFrumaDoc(fornitore, numDoc, dataDoc)
|
inventarioRESTConsumerService.checkDocument(fornitore, numDoc,tipoDoc, dataDoc)
|
||||||
.enqueue(new Callback<>() {
|
.enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(@NonNull Call<ServiceRESTResponse<Boolean>> call, @NonNull Response<ServiceRESTResponse<Boolean>> response) {
|
public void onResponse(@NonNull Call<ServiceRESTResponse<Boolean>> call, @NonNull Response<ServiceRESTResponse<Boolean>> response) {
|
||||||
|
|||||||
@ -21,10 +21,11 @@ public interface DocumentiRESTConsumerService {
|
|||||||
@POST("createDocFromColli")
|
@POST("createDocFromColli")
|
||||||
Call<ServiceRESTResponse<DtbDoct>> createDocFromColli(@Body LoadColliDTO listColli);
|
Call<ServiceRESTResponse<DtbDoct>> createDocFromColli(@Body LoadColliDTO listColli);
|
||||||
|
|
||||||
@GET("wms/documento/checkFruma")
|
@GET("wms/documento/checkDoc")
|
||||||
Call<ServiceRESTResponse<Boolean>> checkFrumaDoc(
|
Call<ServiceRESTResponse<Boolean>> checkDocument(
|
||||||
@Query("fornitore") String fornitore,
|
@Query("fornitore") String fornitore,
|
||||||
@Query("numDoc") String numDoc,
|
@Query("numDoc") String numDoc,
|
||||||
|
@Query("tipoDoc") String tipoDoc,
|
||||||
@Query("dataDoc") String dataDoc);
|
@Query("dataDoc") String dataDoc);
|
||||||
|
|
||||||
@GET("wms/documento/arts")
|
@GET("wms/documento/arts")
|
||||||
|
|||||||
@ -76,13 +76,12 @@ public class DBSettingsModel {
|
|||||||
private boolean flagProduzioneShowInfo = false;
|
private boolean flagProduzioneShowInfo = false;
|
||||||
private boolean flagAccettazioneBollaUseQtaOrd = true;
|
private boolean flagAccettazioneBollaUseQtaOrd = true;
|
||||||
private boolean flagWarningNewPartitaMag = false;
|
private boolean flagWarningNewPartitaMag = false;
|
||||||
|
|
||||||
private boolean flagTracciamentoImballiCaricoEnabled = false;
|
private boolean flagTracciamentoImballiCaricoEnabled = false;
|
||||||
private boolean flagTracciamentoImballiScaricoEnabled = false;
|
private boolean flagTracciamentoImballiScaricoEnabled = false;
|
||||||
private boolean flagPickingLiberoEnableScanArt = false;
|
private boolean flagPickingLiberoEnableScanArt = false;
|
||||||
private boolean flagAskDuplicateUDSSpedizione = false;
|
private boolean flagAskDuplicateUDSSpedizione = false;
|
||||||
|
|
||||||
private boolean suggestDataScad = false;
|
private boolean suggestDataScad = false;
|
||||||
|
private String docInterniRequestNumDoc;
|
||||||
|
|
||||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||||
return flagSpedizioneEnableFakeGiacenza;
|
return flagSpedizioneEnableFakeGiacenza;
|
||||||
@ -695,4 +694,13 @@ public class DBSettingsModel {
|
|||||||
this.suggestDataScad = suggestDataScad;
|
this.suggestDataScad = suggestDataScad;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDocInterniRequestNumDoc() {
|
||||||
|
return docInterniRequestNumDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setDocInterniRequestNumDoc(String docInterniRequestNumDoc) {
|
||||||
|
this.docInterniRequestNumDoc = docInterniRequestNumDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -557,6 +557,12 @@ public class SettingsManager {
|
|||||||
dbSettingsModelIstance.setFlagTracciamentoImballiScaricoEnabled(!UtilityString.isNullOrEmpty(data));
|
dbSettingsModelIstance.setFlagTracciamentoImballiScaricoEnabled(!UtilityString.isNullOrEmpty(data));
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||||
|
.setGestName("PVM")
|
||||||
|
.setSection("DOC_INTERNI")
|
||||||
|
.setKeySection("REQUEST_NUM_DOC")
|
||||||
|
.setSetter(dbSettingsModelIstance::setDocInterniRequestNumDoc));
|
||||||
|
|
||||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -105,31 +105,34 @@ public class DocInterniViewModel {
|
|||||||
this.numDoc = selection.getNumDoc() != null ? selection.getNumDoc().toString() : null;
|
this.numDoc = selection.getNumDoc() != null ? selection.getNumDoc().toString() : null;
|
||||||
this.note = selection.getNote();
|
this.note = selection.getNote();
|
||||||
|
|
||||||
if (dtbTipi.getCodDtip().equalsIgnoreCase("FRUMA")) {
|
String codAnag = null;
|
||||||
documentRESTConsumer.checkFrumaDocument(
|
if (fornitore != null){
|
||||||
fornitore.getCodAnag(),
|
codAnag = fornitore.getCodAnag();
|
||||||
numDoc,
|
|
||||||
UtilityDate.formatDate(dataDoc, "yyyy/MM/dd"),
|
|
||||||
data -> {
|
|
||||||
if (!data) {
|
|
||||||
this.sendWarning(UtilityResources.getString(R.string.no_doc_found_message), this::init);
|
|
||||||
} else {
|
|
||||||
action.run();
|
|
||||||
this.sendOnLoadingStarted();
|
|
||||||
fetchProducts(() -> {
|
|
||||||
fetchDocuments(this::sendOnLoadingEnded);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
this::sendError
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
action.run();
|
|
||||||
this.sendOnLoadingStarted();
|
|
||||||
fetchProducts(() -> {
|
|
||||||
fetchDocuments(this::sendOnLoadingEnded);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String codDtip = null;
|
||||||
|
if (dtbTipi != null){
|
||||||
|
codDtip = dtbTipi.getCodDtip();
|
||||||
|
}
|
||||||
|
|
||||||
|
documentRESTConsumer.checkDocument(
|
||||||
|
codAnag,
|
||||||
|
numDoc,
|
||||||
|
UtilityDate.formatDate(dataDoc, "yyyy/MM/dd"),
|
||||||
|
codDtip,
|
||||||
|
data -> {
|
||||||
|
if (!data) {
|
||||||
|
this.sendWarning("Documento di riferimento non trovato!", this::init);
|
||||||
|
} else {
|
||||||
|
action.run();
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
fetchProducts(() -> {
|
||||||
|
fetchDocuments(this::sendOnLoadingEnded);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
this::sendError
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fetchProducts(Runnable onComplete) {
|
public void fetchProducts(Runnable onComplete) {
|
||||||
|
|||||||
@ -3,10 +3,13 @@ package it.integry.integrywmsnative.gest.contab_doc_interni.dialog;
|
|||||||
import androidx.lifecycle.MutableLiveData;
|
import androidx.lifecycle.MutableLiveData;
|
||||||
import androidx.lifecycle.ViewModel;
|
import androidx.lifecycle.ViewModel;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.DocumentRequiredException;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.DocumentRequiredException;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.FornitoreRequiredException;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.FornitoreRequiredException;
|
||||||
@ -33,9 +36,11 @@ public class DialogSelectDocInfoViewModel extends ViewModel {
|
|||||||
private final MutableLiveData<Boolean> noteRequired = new MutableLiveData<>(false);
|
private final MutableLiveData<Boolean> noteRequired = new MutableLiveData<>(false);
|
||||||
|
|
||||||
public DialogSelectDocInfoViewModel() {
|
public DialogSelectDocInfoViewModel() {
|
||||||
|
List<String> requestNumDocList = Arrays.asList(SettingsManager.iDB().getDocInterniRequestNumDoc().split("\\|"));
|
||||||
|
|
||||||
tipoDoc.observeForever(val -> fornitoreRequired.postValue(val != null && (val.getGestioneDoc().equals("T") || val.getGestioneDoc().equals("A") || (val.getGestioneDoc().equals("P") && !val.getGestione().equals("L")))));
|
tipoDoc.observeForever(val -> fornitoreRequired.postValue(val != null && (val.getGestioneDoc().equals("T") || val.getGestioneDoc().equals("A") || (val.getGestioneDoc().equals("P") && !val.getGestione().equals("L")))));
|
||||||
|
|
||||||
tipoDoc.observeForever(val -> documentRequired.postValue(val != null && val.getGestioneDoc().equalsIgnoreCase("P") && !val.getGestione().equalsIgnoreCase("L")));
|
tipoDoc.observeForever(val -> documentRequired.postValue(val != null && (val.getGestioneDoc().equalsIgnoreCase("P") && !val.getGestione().equalsIgnoreCase("L")) || requestNumDocList.contains(Objects.requireNonNull(val).getCodDtip())));
|
||||||
|
|
||||||
tipoDoc.observeForever(val -> noteRequired.postValue(val != null && val.getGestioneDoc().equals("P") && val.getGestione().equals("L")));
|
tipoDoc.observeForever(val -> noteRequired.postValue(val != null && val.getGestioneDoc().equals("P") && val.getGestione().equals("L")));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import androidx.preference.PreferenceFragmentCompat;
|
|||||||
import androidx.sqlite.db.SimpleSQLiteQuery;
|
import androidx.sqlite.db.SimpleSQLiteQuery;
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
|
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||||
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@ -26,7 +27,9 @@ import java.io.FileInputStream;
|
|||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
@ -236,9 +239,10 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
File logFilePath = appContext.getLogFilePath();
|
File logFilePath = appContext.getLogFilePath();
|
||||||
var files = logFilePath.listFiles();
|
var files = logFilePath.listFiles();
|
||||||
|
|
||||||
var fileToShare = Stream.of(files)
|
var fileToShare = Arrays.stream(files)
|
||||||
.sortBy(x -> -1 * x.lastModified())
|
.sorted(Comparator.reverseOrder())
|
||||||
.findFirstOrElse(null);
|
.findFirst()
|
||||||
|
.orElse(null);
|
||||||
try {
|
try {
|
||||||
List<MailAttachmentDTO> attachmentDTOList = new ArrayList<>();
|
List<MailAttachmentDTO> attachmentDTOList = new ArrayList<>();
|
||||||
|
|
||||||
@ -294,6 +298,8 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
||||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
FirebaseCrashlytics.getInstance().recordException(ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user