Compare commits
46 Commits
v1.24.8(27
...
v1.26.3(28
| Author | SHA1 | Date | |
|---|---|---|---|
| 6539c9179e | |||
| f43a7acf35 | |||
| ca96bacde6 | |||
| d4c94b7ab9 | |||
| 0c9e607c33 | |||
| b5c6ce2aa5 | |||
| 66f58ea20d | |||
| d6979289e2 | |||
| 496387b5c6 | |||
| 6b0d75fc60 | |||
| 7d263699da | |||
| 63e4e4e791 | |||
| 98c260f621 | |||
| 1b57dc74cf | |||
| 4f140d0d58 | |||
| 0d021e6bad | |||
| 1a0af47613 | |||
| ead509bb32 | |||
| ddfde73f1e | |||
| 3de5a2320d | |||
| 5cb32a9a77 | |||
| ecbb4ac55c | |||
| 84e0561fff | |||
| 71bfbb2afc | |||
| 2cb563320b | |||
| f3837f35b0 | |||
| fa52b8e040 | |||
| c80b5a9160 | |||
| 65ac5590c7 | |||
| 3cee7f2a95 | |||
| 3034b49586 | |||
| 718ffb3124 | |||
| 7173c49561 | |||
| 4407f37f8c | |||
| 37a16f6292 | |||
| 83d9e0c5f7 | |||
| d2249e031a | |||
| 2522e67705 | |||
| 371514157c | |||
| de889045e6 | |||
| 6225ba8207 | |||
| 36c9319bce | |||
| d4d494218b | |||
| a3d6b11c69 | |||
| 852edf1b13 | |||
| 6806290d98 |
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 276
|
||||
def appVersionName = '1.24.8'
|
||||
def appVersionCode = 286
|
||||
def appVersionName = '1.26.3'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@@ -78,11 +78,11 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
dynamicFeatures = [":dynamic__base", ":dynamic_vgalimenti"]
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -113,6 +113,7 @@ dependencies {
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
@@ -164,6 +165,14 @@ dependencies {
|
||||
// testImplementation "org.junit.jupiter:junit-jupiter-api:5.8.1"
|
||||
// androidTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
||||
// androidTestImplementation 'org.testng:testng:7.4.0'
|
||||
|
||||
|
||||
//Bluetooth device manager
|
||||
implementation 'com.github.harry1453:android-bluetooth-serial:v1.1'
|
||||
|
||||
// RxJava is also required.
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
|
||||
<application
|
||||
android:name=".MainApplication"
|
||||
|
||||
@@ -19,7 +19,7 @@ import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
|
||||
@Database(entities = {ArticoloGriglia.class, Griglia.class, Ordine.class, ArticoloOrdine.class, SqlMtbColt.class, SqlMtbColr.class}, version = 8, exportSchema = false)
|
||||
@Database(entities = {ArticoloGriglia.class, Griglia.class, Ordine.class, ArticoloOrdine.class, SqlMtbColt.class, SqlMtbColr.class}, version = 9, exportSchema = false)
|
||||
@TypeConverters({
|
||||
DateConverter.class,
|
||||
BigDecimalConverter.class
|
||||
|
||||
@@ -6,7 +6,10 @@ import androidx.room.ForeignKey;
|
||||
import androidx.room.Index;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
|
||||
@@ -202,6 +205,14 @@ public class ArticoloGriglia {
|
||||
this.newNoPromo = newNoPromo;
|
||||
}
|
||||
|
||||
public String generateSystemNote() {
|
||||
HashMap<String, String> pairs = new HashMap<>();
|
||||
pairs.put("qta_proposta", String.valueOf(qtaProposta));
|
||||
pairs.put("giacenza", String.valueOf(giacenza));
|
||||
|
||||
return new JSONObject(pairs).toString();
|
||||
}
|
||||
|
||||
public ArticoloOrdine convertToArticoloOrdine(Ordine ordine) {
|
||||
ArticoloOrdine articolo = new ArticoloOrdine();
|
||||
|
||||
@@ -222,6 +233,7 @@ public class ArticoloGriglia {
|
||||
articolo.setQtaPrevistaVendita(BigDecimal.valueOf(this.getQtaPrevistaVendita()));
|
||||
articolo.setQtaProposta(BigDecimal.valueOf(this.getQtaProposta()));
|
||||
articolo.setNewNoPromo(this.isNewNoPromo());
|
||||
articolo.setSystemNote(generateSystemNote());
|
||||
|
||||
articolo.setQtaOrd(0);
|
||||
|
||||
|
||||
@@ -70,6 +70,9 @@ public class ArticoloOrdine {
|
||||
@ColumnInfo(name = "new_no_promo")
|
||||
private boolean newNoPromo;
|
||||
|
||||
@ColumnInfo(name = "system_note")
|
||||
private String systemNote;
|
||||
|
||||
@Ignore
|
||||
private int ggScadenza = 0;
|
||||
|
||||
@@ -266,4 +269,12 @@ public class ArticoloOrdine {
|
||||
this.bgTint = bgTint;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSystemNote() {
|
||||
return systemNote;
|
||||
}
|
||||
|
||||
public void setSystemNote(String systemNote) {
|
||||
this.systemNote = systemNote;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
public class BluetoothConnectionException extends Exception {
|
||||
|
||||
public BluetoothConnectionException(String btDeviceName, String btDeviceMac, Throwable th) {
|
||||
super("Impossibile collegarsi al dispositivo bluetooth: " + btDeviceName + " [" + btDeviceMac + "]. Riprovare.");
|
||||
initCause(th);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class InvalidConnectionException extends Exception {
|
||||
|
||||
|
||||
public InvalidConnectionException(String host, int port, Throwable cause) {
|
||||
super(String.format(Locale.ITALY, "Impossibile stabilire la connessione con il server (%s:%d)", host, port), cause);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,11 @@ import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public final class NoResultFromBarcodeException extends Exception {
|
||||
|
||||
public NoResultFromBarcodeException() {
|
||||
super(UtilityResources.getString(R.string.no_result_from_barcode));
|
||||
}
|
||||
|
||||
public NoResultFromBarcodeException(String barcode) {
|
||||
super(UtilityResources.getString(R.string.no_result_from_barcode) + " (" + barcode + ")");
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -55,37 +54,31 @@ public abstract class BaseFragment extends Fragment {
|
||||
}
|
||||
|
||||
public void onLoadingStarted() {
|
||||
BarcodeManager.disable();
|
||||
this.openProgress();
|
||||
}
|
||||
|
||||
public void onLoadingEnded() {
|
||||
this.closeProgress();
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
private void openProgress() {
|
||||
Log.d("PROGRESS DIALOG", "OPENED");
|
||||
new Thread(() -> {
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
||||
this.progressOpened = true;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
BarcodeManager.disable();
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
||||
this.progressOpened = true;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
Log.d("PROGRESS DIALOG", "CLOSED");
|
||||
new Thread(() -> {
|
||||
if (progressOpened) {
|
||||
this.progressOpened = false;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
BarcodeManager.enable();
|
||||
if (progressOpened) {
|
||||
this.progressOpened = false;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void onError(Exception ex) {
|
||||
|
||||
@@ -2,7 +2,7 @@ package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import androidx.databinding.Observable;
|
||||
|
||||
public abstract class OnGeneralChangedCallback extends Observable.OnPropertyChangedCallback implements Runnable{
|
||||
public abstract class OnGeneralChangedCallback extends Observable.OnPropertyChangedCallback implements Runnable {
|
||||
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
|
||||
@@ -21,13 +21,13 @@ public abstract class ExtendedSectionedRecyclerView<T, SH extends RecyclerView.V
|
||||
public ExtendedSectionedRecyclerView(ObservableArrayList<T> myDataset) {
|
||||
mDataset.addAll(myDataset);
|
||||
|
||||
myDataset.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||
myDataset.addOnListChangedCallback(new OnListGeneralChangedCallback<T>() {
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
public void onChanged(ObservableList<T> sender) {
|
||||
mDataset.clear();
|
||||
mDataset.addAll(sender);
|
||||
notifyDataSetChanged();
|
||||
notifyDataChanged();
|
||||
notifyDataSetChanged();
|
||||
checkIfEmpty();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package it.integry.integrywmsnative.core.report;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public enum ReportType {
|
||||
|
||||
@SerializedName("0")
|
||||
ETICHETTA_SSCC_ACCETTAZIONE(0),
|
||||
@SerializedName("1")
|
||||
ETICHETTA_SSCC_LAVORAZIONE(1),
|
||||
@SerializedName("2")
|
||||
ETICHETTA_SSCC_SPEDIZIONE(2),
|
||||
@SerializedName("3")
|
||||
WMS_SPEDIZIONE_ETICHETTE_SSCC_ORD(3),
|
||||
@SerializedName("4")
|
||||
WMS_SPEDIZIONE_PACKING_LIST_ORD(4),
|
||||
@SerializedName("5")
|
||||
STAMPA_LISTINI_VENDITA(5);
|
||||
|
||||
private final int value;
|
||||
|
||||
ReportType(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static ReportType from(Object value) {
|
||||
int castValue = (int) value;
|
||||
for (ReportType b : ReportType.values()) {
|
||||
if (b.value == castValue)
|
||||
return b;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public int getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import java.net.SocketTimeoutException;
|
||||
import java.util.HashMap;
|
||||
|
||||
import it.integry.integrywmsnative.core.exception.NoPrintersFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||
|
||||
/**
|
||||
* Created by GiuseppeS on 22/03/2018.
|
||||
@@ -15,12 +16,17 @@ public class CommonRESTException {
|
||||
private static String MESSAGE_KEY = "message";
|
||||
private static String EXCEPTION_KEY = "exception";
|
||||
|
||||
private static HashMap<String, HashMap<String, Object>> bindingExceptions = new HashMap() {{
|
||||
put("Printer not found", new HashMap<String, Object>(){{
|
||||
private static final HashMap<String, HashMap<String, Object>> bindingExceptions = new HashMap<>() {{
|
||||
put("Printer not found", new HashMap<>() {{
|
||||
put(MESSAGE_KEY, "Stampante non trovata");
|
||||
put(EXCEPTION_KEY, NoPrintersFoundException.class);
|
||||
}});
|
||||
|
||||
put("barcode non letto correttamente", new HashMap<>() {{
|
||||
put(MESSAGE_KEY, "Barcode non letto correttamente");
|
||||
put(EXCEPTION_KEY, NoResultFromBarcodeException.class);
|
||||
}});
|
||||
|
||||
|
||||
}};
|
||||
|
||||
@@ -42,13 +48,11 @@ public class CommonRESTException {
|
||||
|
||||
for(String key : bindingExceptions.keySet()) {
|
||||
if(message.contains(key)) {
|
||||
Class classType = (Class) bindingExceptions.get(key).get(EXCEPTION_KEY);
|
||||
Class<?> classType = (Class<?>) bindingExceptions.get(key).get(EXCEPTION_KEY);
|
||||
|
||||
try {
|
||||
return (Exception) classType.newInstance();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InstantiationException e) {
|
||||
} catch (IllegalAccessException | InstantiationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ public class RESTBuilder {
|
||||
return getService(service, SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true);
|
||||
|
||||
}
|
||||
|
||||
public static <T> T getService(final Class<T> service, int timeout) {
|
||||
return getService(service, SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true, true, timeout);
|
||||
|
||||
@@ -34,7 +35,7 @@ public class RESTBuilder {
|
||||
return getService(service, host, port, addInterceptors, addEmsApi, 30);
|
||||
}
|
||||
|
||||
public static <T> T getService(final Class<T> service, String host, int port, boolean addInterceptors, boolean addEmsApi, int timeout){
|
||||
public static <T> T getService(final Class<T> service, String host, int port, boolean addInterceptors, boolean addEmsApi, int timeout) {
|
||||
OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder();
|
||||
|
||||
clientBuilder.connectTimeout(timeout, TimeUnit.SECONDS);
|
||||
@@ -43,7 +44,7 @@ public class RESTBuilder {
|
||||
|
||||
clientBuilder.retryOnConnectionFailure(true);
|
||||
|
||||
if(addInterceptors) clientBuilder.addInterceptor(new HttpInterceptor());
|
||||
if (addInterceptors) clientBuilder.addInterceptor(new HttpInterceptor());
|
||||
|
||||
OkHttpClient client = clientBuilder.build();
|
||||
|
||||
@@ -62,4 +63,13 @@ public class RESTBuilder {
|
||||
|
||||
return retrofit.create(service);
|
||||
}
|
||||
|
||||
|
||||
public static String getDefaultHost() {
|
||||
return SettingsManager.i().getServer().getHost();
|
||||
}
|
||||
|
||||
public static int getDefaultPort() {
|
||||
return SettingsManager.i().getServer().getPort();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,14 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
MtbColt mtbColtToCreate = new MtbColt()
|
||||
.initDefaultFields(gestione);
|
||||
|
||||
Integer customNumCollo = UtilityBarcode.getNumColloFromULAnonima(barcode);
|
||||
Integer customNumCollo = null;
|
||||
|
||||
try {
|
||||
customNumCollo = UtilityBarcode.getNumColloFromULAnonima(barcode);
|
||||
} catch (Exception ex) {
|
||||
onFailed.run(ex);
|
||||
}
|
||||
|
||||
String customSerCollo = CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE;
|
||||
|
||||
if (customNumCollo != null) {
|
||||
|
||||
@@ -6,11 +6,11 @@ import java.util.List;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.StbGestSetup;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.GestSetupDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
@@ -35,18 +35,18 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
||||
public void onFailure(Call<ServiceRESTResponse<GestSetupDTO>> call, Throwable t) {
|
||||
Log.e("GestSetup", t.toString());
|
||||
// UtilityLogger.errorMe(new Exception(t));
|
||||
if(onFailed != null) onFailed.run(new Exception(t));
|
||||
if (onFailed != null) onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void getBooleanValue(String gestName, String sectionName, String keySection, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
getValueStatic(gestName, sectionName, keySection, value -> {
|
||||
if(value != null){
|
||||
if (value != null) {
|
||||
onComplete.run("S".equalsIgnoreCase(value.value));
|
||||
} else onComplete.run(false);
|
||||
}, ex -> {
|
||||
if(onFailed != null) onFailed.run(ex);
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -62,25 +62,25 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
||||
public void onFailure(Call<ServiceRESTResponse<GestSetupDTO>> call, Throwable t) {
|
||||
Log.e("PrintCollo", t.toString());
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
if(onFailed != null) onFailed.run(new Exception(t));
|
||||
if (onFailed != null) onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void getBooleanValue(String gestName, String sectionName, String keySection, String codMdep, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
getValueStatic(gestName, sectionName, keySection, codMdep, value -> {
|
||||
if(value != null){
|
||||
if (value != null) {
|
||||
onComplete.run("S".equalsIgnoreCase(value.value));
|
||||
} else onComplete.run(false);
|
||||
}, ex -> {
|
||||
if(onFailed != null) onFailed.run(ex);
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public static void getValues(List<StbGestSetup> stbGestSetupList, RunnableArgs<List<StbGestSetup>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
GestSetupRESTConsumerService service = RESTBuilder.getService(GestSetupRESTConsumerService.class);
|
||||
service.getGestSetupValues(stbGestSetupList).enqueue(new Callback<ServiceRESTResponse<List<StbGestSetup>>>() {
|
||||
service.getGestSetupValues(stbGestSetupList).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<List<StbGestSetup>>> call, Response<ServiceRESTResponse<List<StbGestSetup>>> response) {
|
||||
analyzeAnswer(response, "GestSetup", onComplete, onFailed);
|
||||
@@ -89,7 +89,7 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<StbGestSetup>>> call, Throwable t) {
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
if(onFailed != null) onFailed.run(new Exception(t));
|
||||
if (onFailed != null) onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -161,7 +161,15 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
|
||||
service.getArticoliFromOrdini(codMdep, getPickingListDTOs).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<List<SitArtOrdDTO>>> call, Response<ServiceRESTResponse<List<SitArtOrdDTO>>> response) {
|
||||
analyzeAnswer(response, "retrieveListaArticoliFromOrdiniUscita", onComplete, onFailed);
|
||||
analyzeAnswer(response, "retrieveListaArticoliFromOrdiniUscita", sitArtOrds -> {
|
||||
if (sitArtOrds != null) {
|
||||
for (SitArtOrdDTO sitArtOrd : sitArtOrds) {
|
||||
sitArtOrd.setCodMart(sitArtOrd.getCodMart().trim());
|
||||
}
|
||||
}
|
||||
|
||||
onComplete.run(sitArtOrds);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -189,7 +197,7 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
|
||||
" 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 +
|
||||
" WHERE " + whereCondGestione +
|
||||
" AND mtb_colt.segno = " + UtilityDB.valueToString(segno) + " " +
|
||||
" AND mtb_colt.data_doc IS NULL AND ";
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
.groupBy(ArticoloDTO::getCodMart)
|
||||
.forEach(entry -> {
|
||||
|
||||
if(entry.getValue().size() == 1) {
|
||||
if (entry.getValue().size() == 1) {
|
||||
listaArticoli.add(entry.getValue().get(0));
|
||||
} else {
|
||||
for (ArticoloDTO articolo : entry.getValue()) {
|
||||
@@ -93,7 +93,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
int i = 0;
|
||||
for (ArticoloOrdine art : articoli) {
|
||||
i++;
|
||||
artRows.add(convertArtToDTO(art,i));
|
||||
artRows.add(convertArtToDTO(art, i));
|
||||
}
|
||||
|
||||
ordineDTO.setChiaveGriglia(griglia.getCodAlis());
|
||||
@@ -109,9 +109,9 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
.enqueue(new Callback<List<ServiceRESTResponse<DtbOrdt>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<List<ServiceRESTResponse<DtbOrdt>>> call, Response<List<ServiceRESTResponse<DtbOrdt>>> response) {
|
||||
if (response.body() != null && response.body().size() > 0){
|
||||
analyzeListOfAnswers(response, "getArticoliListino", dtoList-> {
|
||||
if (dtoList.size() > 0){
|
||||
if (response.body() != null && response.body().size() > 0) {
|
||||
analyzeListOfAnswers(response, "getArticoliListino", dtoList -> {
|
||||
if (dtoList.size() > 0) {
|
||||
DtbOrdt dto = dtoList.get(0);
|
||||
ordine.setTransmitted(true);
|
||||
ordine.setTransmissionDate(UtilityDate.getDateInstance());
|
||||
@@ -120,7 +120,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
ordine.setCodMdep(dto.getCodMdep());
|
||||
ordine.setNumOrd(dto.getNumOrd());
|
||||
onSuccess.run(ordine);
|
||||
}else{
|
||||
} else {
|
||||
onFailed.run(new Exception("Nessun ordine generato"));
|
||||
}
|
||||
}, onFailed);
|
||||
@@ -128,7 +128,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<List<ServiceRESTResponse<DtbOrdt>>>call, Throwable t) {
|
||||
public void onFailure(Call<List<ServiceRESTResponse<DtbOrdt>>> call, Throwable t) {
|
||||
Log.e("saveOrdineTerminale_pv", t.toString());
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
onFailed.run(new Exception(t));
|
||||
@@ -136,7 +136,6 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private ArtDTO convertArtToDTO(ArticoloOrdine art, int rigaOrd) {
|
||||
@@ -147,6 +146,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
dto.setDescrizione(art.getDescrizione());
|
||||
dto.setDataInsD(art.getDataIns());
|
||||
dto.setUntMis(art.getUntMis());
|
||||
dto.setSystemNote(art.getSystemNote());
|
||||
dto.setQta(BigDecimal.valueOf(art.getQtaOrd()));
|
||||
dto.setQtaCnf(BigDecimal.valueOf(art.getQtaCnf()));
|
||||
dto.setColli(BigDecimal.ZERO);
|
||||
|
||||
@@ -9,13 +9,15 @@ import java.util.List;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.core.exception.NoPrintersFoundException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.DtbOrdt;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.report.ReportType;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.JasperDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.JasperPairDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ReportTypeDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
@@ -55,7 +57,7 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
public void printCollo(Type printerType, MtbColt testataColloToPrint, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
public void printCollo(MtbColt testataColloToPrint, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
// if (BuildConfig.DEBUG) {
|
||||
// onComplete.run();
|
||||
@@ -64,10 +66,7 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
|
||||
Call<ServiceRESTResponse<Object>> callable = null;
|
||||
if (printerType != null)
|
||||
callable = printerService.printCollo(printerType.toString(), testataColloToPrint);
|
||||
else
|
||||
callable = printerService.printCollo(testataColloToPrint);
|
||||
callable = printerService.printCollo(testataColloToPrint);
|
||||
|
||||
callable.enqueue(new Callback<>() {
|
||||
@Override
|
||||
@@ -119,4 +118,64 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
public void printReportType(ReportType reportType, String codMdep, String codAnag, HashMap<String, Object> params, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
ReportTypeDTO reportTypeDTO = new ReportTypeDTO();
|
||||
reportTypeDTO.setReportType(reportType);
|
||||
reportTypeDTO.setCodAnag(codAnag);
|
||||
reportTypeDTO.setCodMdep(codMdep);
|
||||
|
||||
Stream.of(params)
|
||||
.forEach(x -> reportTypeDTO.getParams().add(new JasperPairDTO(x.getKey(), x.getValue())));
|
||||
|
||||
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
|
||||
printerService
|
||||
.printReportType(reportTypeDTO)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||
analyzeAnswer(response, "printReportType", data -> {
|
||||
onComplete.run();
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
|
||||
if (t.getMessage().contains("Printer not found")) {
|
||||
onFailed.run(new NoPrintersFoundException());
|
||||
} else onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void printReportType(ReportType reportType, HashMap<String, Object> params, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
printReportType(reportType, null, null, params, onComplete, onFailed);
|
||||
}
|
||||
|
||||
public void printReportType(ReportType reportType, String codMdep, HashMap<String, Object> params, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
printReportType(reportType, codMdep, null, params, onComplete, onFailed);
|
||||
}
|
||||
|
||||
public void printClosedOrders(List<DtbOrdt> closedOrders, String codMdep, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class, 240);
|
||||
Call<ServiceRESTResponse<Object>> callable = printerService.printClosedOrders(codMdep, closedOrders);
|
||||
callable.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||
analyzeAnswer(response, "printCollo", data -> {
|
||||
onComplete.run();
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
|
||||
if (t.getMessage().contains("Printer not found")) {
|
||||
onFailed.run(new NoPrintersFoundException());
|
||||
} else onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,10 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.DtbOrdt;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.model.JasperDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ReportTypeDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
@@ -26,11 +28,9 @@ public interface PrinterRESTConsumerService {
|
||||
@Body JasperDTO jasperDTO
|
||||
);
|
||||
|
||||
|
||||
@POST("wms/printEtichettaSSCC")
|
||||
Call<ServiceRESTResponse<Object>> printCollo(
|
||||
@Query("printerType") String printerType,
|
||||
@Body MtbColt mtbColtToPrint
|
||||
@POST("printReportType")
|
||||
Call<ServiceRESTResponse<Object>> printReportType(
|
||||
@Body ReportTypeDTO reportTypeDTO
|
||||
);
|
||||
|
||||
@POST("wms/printEtichettaSSCC")
|
||||
@@ -38,4 +38,10 @@ public interface PrinterRESTConsumerService {
|
||||
@Body MtbColt mtbColtToPrint
|
||||
);
|
||||
|
||||
@POST("wms/printClosedOrders")
|
||||
Call<ServiceRESTResponse<Object>> printClosedOrders(
|
||||
@Query("codMdep") String codMdep,
|
||||
@Body List<DtbOrdt> closedOrders
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.lang.reflect.Type;
|
||||
import java.net.ConnectException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -23,6 +24,7 @@ import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidConnectionException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.Azienda;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
@@ -47,37 +49,43 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
|
||||
nativeSqlDTO.nativeSql = nativeSql;
|
||||
|
||||
SystemRESTConsumerService service = RESTBuilder.getService(SystemRESTConsumerService.class);
|
||||
service.processSql(nativeSqlDTO).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||
analyzeAnswer(response, "ProcessSql", o -> {
|
||||
Gson gson = new GsonBuilder()
|
||||
.registerTypeAdapter(Date.class, (JsonDeserializer) (json, typeOfT, context) -> {
|
||||
try {
|
||||
return UtilityDate.recognizeDate(json.getAsString());
|
||||
} catch (Exception e) {
|
||||
throw new JsonParseException(e);
|
||||
}
|
||||
})
|
||||
.create();
|
||||
service
|
||||
.processSql(nativeSqlDTO)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||
analyzeAnswer(response, "ProcessSql", o -> {
|
||||
Gson gson = new GsonBuilder()
|
||||
.registerTypeAdapter(Date.class, (JsonDeserializer<?>) (json, typeOfT, context) -> {
|
||||
try {
|
||||
return UtilityDate.recognizeDate(json.getAsString());
|
||||
} catch (Exception e) {
|
||||
throw new JsonParseException(e);
|
||||
}
|
||||
})
|
||||
.create();
|
||||
|
||||
|
||||
String json = gson.toJson(o);
|
||||
String json = gson.toJson(o);
|
||||
|
||||
InputStream ims = new ByteArrayInputStream(json.getBytes());
|
||||
Reader reader = new InputStreamReader(ims);
|
||||
T gsonObj = gson.fromJson(reader, clazz);
|
||||
InputStream ims = new ByteArrayInputStream(json.getBytes());
|
||||
Reader reader = new InputStreamReader(ims);
|
||||
T gsonObj = gson.fromJson(reader, clazz);
|
||||
|
||||
onComplete.run(gsonObj);
|
||||
}, onFailed);
|
||||
}
|
||||
onComplete.run(gsonObj);
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
|
||||
Logger.e(t, "ProcessSQL");
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
|
||||
Logger.e(t, "ProcessSQL");
|
||||
|
||||
if (t instanceof ConnectException)
|
||||
onFailed.run(new InvalidConnectionException(RESTBuilder.getDefaultHost(), RESTBuilder.getDefaultPort(), t));
|
||||
else
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import retrofit2.Response;
|
||||
|
||||
public class _BaseRESTConsumer {
|
||||
public abstract class _BaseRESTConsumer {
|
||||
|
||||
public static <T> void analyzeAnswer(Response<ServiceRESTResponse<T>> response, String logTitle, RunnableArgs<T> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
if (response.isSuccessful()) {
|
||||
@@ -31,7 +31,6 @@ public class _BaseRESTConsumer {
|
||||
}
|
||||
} else {
|
||||
Log.e(logTitle, response.body().getErrorMessage());
|
||||
// callback.onFailed(new Exception(response.body().getErrorMessage()));
|
||||
onFailed.run(CommonRESTException.tryRecognizeException(response.body().getErrorMessage()));
|
||||
}
|
||||
} else {
|
||||
@@ -67,7 +66,7 @@ public class _BaseRESTConsumer {
|
||||
}
|
||||
} else {
|
||||
Log.e(logTitle, response.body().getErrorMessage());
|
||||
onFailed.run(new Exception(response.body().getErrorMessage()));
|
||||
onFailed.run(CommonRESTException.tryRecognizeException(response.body().getErrorMessage()));
|
||||
}
|
||||
} else {
|
||||
Log.e(logTitle, response.message());
|
||||
@@ -77,7 +76,9 @@ public class _BaseRESTConsumer {
|
||||
if (response.code() == 404) {
|
||||
Log.e(logTitle, "Errore " + response.code() + ": risorsa non trovata");
|
||||
onFailed.run(new Exception("Errore " + response.code() + ": risorsa non trovata (" + logTitle + ")"));
|
||||
} else {
|
||||
} else if (response.code() == 550)
|
||||
onFailed.run(new NotValidLicenseException());
|
||||
else {
|
||||
Log.e(logTitle, "Status " + response.code() + ": " + response.message());
|
||||
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
||||
}
|
||||
@@ -114,7 +115,9 @@ public class _BaseRESTConsumer {
|
||||
if (responseList.code() == 404) {
|
||||
Log.e(logTitle, "Errore " + responseList.code() + ": risorsa non trovata");
|
||||
onFailed.run(new Exception("Errore " + responseList.code() + ": risorsa non trovata (" + logTitle + ")"));
|
||||
} else {
|
||||
} else if (responseList.code() == 550)
|
||||
onFailed.run(new NotValidLicenseException());
|
||||
else {
|
||||
Log.e(logTitle, "Status " + responseList.code() + ": " + responseList.message());
|
||||
onFailed.run(new Exception("Status " + responseList.code() + ": " + responseList.message()));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package it.integry.integrywmsnative.core.rest.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.report.ReportType;
|
||||
|
||||
public class ReportTypeDTO {
|
||||
|
||||
|
||||
private ReportType reportType;
|
||||
private String codAnag;
|
||||
private String codMdep;
|
||||
private List<JasperPairDTO> params = new ArrayList<>();
|
||||
|
||||
public List<JasperPairDTO> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public ReportTypeDTO setParams(List<JasperPairDTO> params) {
|
||||
this.params = params;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ReportType getReportType() {
|
||||
return reportType;
|
||||
}
|
||||
|
||||
public ReportTypeDTO setReportType(ReportType reportType) {
|
||||
this.reportType = reportType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodAnag() {
|
||||
return codAnag;
|
||||
}
|
||||
|
||||
public ReportTypeDTO setCodAnag(String codAnag) {
|
||||
this.codAnag = codAnag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMdep() {
|
||||
return codMdep;
|
||||
}
|
||||
|
||||
public ReportTypeDTO setCodMdep(String codMdep) {
|
||||
this.codMdep = codMdep;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,8 @@ public class DBSettingsModel {
|
||||
private boolean flagOrdinaArticoliOnScan;
|
||||
private String docInterniCheckFornitore;
|
||||
private String produzioneDefaultCodAnag;
|
||||
private String reportNameSpedizionChiudiOrdine;
|
||||
private boolean flagPrintPackingListOnOrderClose;
|
||||
private boolean flagPrintEtichetteOnOrderClose;
|
||||
private int onNumCnfInputChanged = 1;
|
||||
private boolean flagAccettazioneUseQtaOrd = false;
|
||||
private boolean flagPickLiberoAllowEmptyDest = false;
|
||||
@@ -281,12 +282,21 @@ public class DBSettingsModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getReportNameSpedizionChiudiOrdine() {
|
||||
return reportNameSpedizionChiudiOrdine;
|
||||
public boolean isFlagPrintPackingListOnOrderClose() {
|
||||
return flagPrintPackingListOnOrderClose;
|
||||
}
|
||||
|
||||
public DBSettingsModel setReportNameSpedizionChiudiOrdine(String reportNameSpedizionChiudiOrdine) {
|
||||
this.reportNameSpedizionChiudiOrdine = reportNameSpedizionChiudiOrdine;
|
||||
public DBSettingsModel setFlagPrintPackingListOnOrderClose(boolean flagPrintPackingListOnOrderClose) {
|
||||
this.flagPrintPackingListOnOrderClose = flagPrintPackingListOnOrderClose;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagPrintEtichetteOnOrderClose() {
|
||||
return flagPrintEtichetteOnOrderClose;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagPrintEtichetteOnOrderClose(boolean flagPrintEtichetteOnOrderClose) {
|
||||
this.flagPrintEtichetteOnOrderClose = flagPrintEtichetteOnOrderClose;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -336,7 +346,7 @@ public class DBSettingsModel {
|
||||
}
|
||||
|
||||
|
||||
public boolean getFlagOrdinaArticoliOnScan() {
|
||||
public boolean isFlagOrdinaArticoliOnScan() {
|
||||
return flagOrdinaArticoliOnScan;
|
||||
}
|
||||
|
||||
|
||||
@@ -273,7 +273,11 @@ public class SettingsManager {
|
||||
stbGestSetupList.add(new StbGestSetup()
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("REPORT_PACKING_LIST"));
|
||||
.setKeySection("FLAG_PRINT_PACKING_LIST_ON_CLOSE"));
|
||||
stbGestSetupList.add(new StbGestSetup()
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("FLAG_PRINT_ETICHETTE_ON_CLOSE"));
|
||||
stbGestSetupList.add(new StbGestSetup()
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
@@ -327,7 +331,8 @@ public class SettingsManager {
|
||||
dbSettingsModelIstance.setFlagSpedizioneEnableManualPick(getValueFromList(list, "SPEDIZIONE", "ENABLE_MANUAL_PICK", Boolean.class));
|
||||
dbSettingsModelIstance.setFlagSpedizioneEnableFakeGiacenza(getValueFromList(list, "SPEDIZIONE", "ENABLE_FAKE_GIACENZA", Boolean.class));
|
||||
dbSettingsModelIstance.setFlagSpedizioneCanSelectMultipleOrders(getValueFromList(list, "SPEDIZIONE", "FLAG_CAN_SELECT_MULTIPLE_ORDERS", Boolean.class));
|
||||
dbSettingsModelIstance.setReportNameSpedizionChiudiOrdine(getValueFromList(list, "SPEDIZIONE", "REPORT_PACKING_LIST", String.class));
|
||||
// dbSettingsModelIstance.setFlagPrintPackingListOnOrderClose(getValueFromList(list, "SPEDIZIONE", "FLAG_PRINT_PACKING_LIST_ON_CLOSE", Boolean.class));
|
||||
// dbSettingsModelIstance.setFlagPrintEtichetteOnOrderClose(getValueFromList(list, "SPEDIZIONE", "FLAG_PRINT_ETICHETTE_ON_CLOSE", Boolean.class));
|
||||
dbSettingsModelIstance.setFlagSpedizioneUseQtaOrd(getValueFromList(list, "SPEDIZIONE", "FLAG_USE_QTA_ORD", Boolean.class));
|
||||
dbSettingsModelIstance.setFlagOrdinaNuoviArticoliInGriglia(getValueFromList(list, "ORDINI_A", "ORDINA_NUOVI_ARTICOLI", Boolean.class));
|
||||
dbSettingsModelIstance.setDocInterniCheckFornitore(getValueFromList(list, "DOC_INTERNI", "CHECK_FORNITORE", String.class));
|
||||
@@ -344,8 +349,14 @@ public class SettingsManager {
|
||||
if (onNumCnfInputChanged != null) {
|
||||
dbSettingsModelIstance.setOnNumCnfInputChanged(onNumCnfInputChanged);
|
||||
}
|
||||
|
||||
if (onComplete != null) onComplete.run();
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
GestSetupRESTConsumer.getBooleanValue("PICKING", "SPEDIZIONE", "FLAG_PRINT_PACKING_LIST_ON_CLOSE", codMdep, (value) -> {
|
||||
dbSettingsModelIstance.setFlagPrintPackingListOnOrderClose(value);
|
||||
GestSetupRESTConsumer.getBooleanValue("PICKING", "SPEDIZIONE", "FLAG_PRINT_ETICHETTE_ON_CLOSE", codMdep, (gestSetupDTO) -> {
|
||||
dbSettingsModelIstance.setFlagPrintEtichetteOnOrderClose(value);
|
||||
if (onComplete != null) onComplete.run();
|
||||
}, onFailed);
|
||||
}, onFailed);
|
||||
}, onFailed);
|
||||
|
||||
}
|
||||
|
||||
@@ -3,16 +3,15 @@ package it.integry.integrywmsnative.core.utility;
|
||||
import android.Manifest;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import it.integry.integrywmsnative.SplashActivity;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
@@ -31,6 +30,11 @@ public class PermissionsHelper {
|
||||
if(Build.VERSION.SDK_INT >= 23) {
|
||||
//permissionsToAsk.add(Manifest.permission.REQUEST_INSTALL_PACKAGES);
|
||||
}
|
||||
if(Build.VERSION.SDK_INT >= 31) {
|
||||
permissionsToAsk.add(Manifest.permission.BLUETOOTH_CONNECT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
String[] permissionArray = new String[permissionsToAsk.size()];
|
||||
permissionsToAsk.toArray(permissionArray);
|
||||
|
||||
@@ -13,10 +13,10 @@ public class UtilityBarcode {
|
||||
|
||||
|
||||
public static boolean isBarcodeOrdineV(BarcodeScanDTO barcodeScanDTO) {
|
||||
return (isEan13(barcodeScanDTO) || isEtichetta128(barcodeScanDTO)) && barcodeScanDTO.getStringValue().startsWith("3");
|
||||
return (isEan13(barcodeScanDTO) || isEtichetta128(barcodeScanDTO)) && barcodeScanDTO.getStringValue().startsWith("3");
|
||||
}
|
||||
|
||||
public static boolean isEtichettaAnonima(BarcodeScanDTO barcodeScanDTO){
|
||||
public static boolean isEtichettaAnonima(BarcodeScanDTO barcodeScanDTO) {
|
||||
return barcodeScanDTO != null && barcodeScanDTO.getType() == BarcodeType.CODE128 && barcodeScanDTO.getStringValue().startsWith("U");
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class UtilityBarcode {
|
||||
return fullYear.equalsIgnoreCase("" + currentYear);
|
||||
}
|
||||
|
||||
public static boolean isEtichetta128(BarcodeScanDTO barcodeScanDTO){
|
||||
public static boolean isEtichetta128(BarcodeScanDTO barcodeScanDTO) {
|
||||
return barcodeScanDTO != null && (barcodeScanDTO.getType() == BarcodeType.CODE128 || barcodeScanDTO.getType() == BarcodeType.EAN128);
|
||||
}
|
||||
|
||||
@@ -42,12 +42,12 @@ public class UtilityBarcode {
|
||||
String barcode = barcodeScanDTO.getStringValue();
|
||||
boolean isPosizione = false;
|
||||
|
||||
if(SettingsManager.iDB().getAvailablePosizioni() != null) {
|
||||
if (SettingsManager.iDB().getAvailablePosizioni() != null) {
|
||||
Stream<MtbDepoPosizione> tmpStream = Stream.of(SettingsManager.iDB().getAvailablePosizioni())
|
||||
.filter(x -> x.getPosizione().equalsIgnoreCase(barcode) && (!enableCheckCodMdep || currentCodMdep.equalsIgnoreCase(x.getCodMdep())));
|
||||
|
||||
if(tmpStream.count() > 0){
|
||||
isPosizione = true;
|
||||
if (tmpStream.count() > 0) {
|
||||
isPosizione = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ public class UtilityBarcode {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static boolean isEanPeso(BarcodeScanDTO barcodeScanDTO) {
|
||||
return (isEtichetta128(barcodeScanDTO) || isEan13(barcodeScanDTO)) && barcodeScanDTO.getStringValue().startsWith("2");
|
||||
}
|
||||
@@ -81,31 +80,31 @@ public class UtilityBarcode {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static Integer getNumColloFromULAnonima(String barcode) {
|
||||
if(!UtilityString.isNullOrEmpty(barcode)) {
|
||||
public static Integer getNumColloFromULAnonima(String barcode) throws Exception {
|
||||
if (!UtilityString.isNullOrEmpty(barcode)) {
|
||||
barcode = barcode.trim();
|
||||
|
||||
return Integer.parseInt(barcode.substring(3));
|
||||
try {
|
||||
return Integer.parseInt(barcode.substring(3, 10));
|
||||
} catch (NumberFormatException nfex) {
|
||||
throw new Exception("Impossibile leggere il numero collo dal barcode: " + barcode);
|
||||
}
|
||||
} else
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static Integer getAnnoColloFromULAnonima(String barcode) {
|
||||
if(barcode != null){
|
||||
if (barcode != null) {
|
||||
return Integer.parseInt(barcode.substring(1, 3));
|
||||
} else
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String convertITF14toEAN13(String barcodeITF14) {
|
||||
String barcodeEAN13 = null;
|
||||
|
||||
if(barcodeITF14.length() == 14) {
|
||||
if (barcodeITF14.length() == 14) {
|
||||
barcodeEAN13 = barcodeITF14.substring(1, barcodeITF14.length() - 1).trim();
|
||||
barcodeEAN13 += getEAN13CheckDigit(barcodeEAN13);
|
||||
}
|
||||
@@ -116,7 +115,7 @@ public class UtilityBarcode {
|
||||
public static String convertITF14toNeutral(String barcodeITF14) {
|
||||
String barcodeNeutral = null;
|
||||
|
||||
if(barcodeITF14.length() == 14) {
|
||||
if (barcodeITF14.length() == 14) {
|
||||
barcodeNeutral = barcodeITF14.substring(1, barcodeITF14.length() - 1);
|
||||
}
|
||||
|
||||
@@ -124,10 +123,10 @@ public class UtilityBarcode {
|
||||
}
|
||||
|
||||
|
||||
private static String getEAN13CheckDigit(String ean) {
|
||||
private static String getEAN13CheckDigit(String ean) {
|
||||
|
||||
if (ean.length() != 12) {
|
||||
UtilityLogger.errorMe(new Exception("Please provide an input string of 12 chars. Current lenght: "+ean.length()));
|
||||
UtilityLogger.errorMe(new Exception("Please provide an input string of 12 chars. Current lenght: " + ean.length()));
|
||||
return null;
|
||||
}
|
||||
long tot = 0;
|
||||
@@ -135,7 +134,7 @@ public class UtilityBarcode {
|
||||
for (int i = 0; i < 12; i++) {
|
||||
tot = tot + (Long.parseLong(String.valueOf(ean.charAt(i))) * (i % 2 == 0 ? 1 : 3));
|
||||
}
|
||||
return tot % 10 == 0 ? "0" : "" + ( 10 - ( tot % 10));
|
||||
return tot % 10 == 0 ? "0" : "" + (10 - (tot % 10));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,14 +11,19 @@ import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidConnectionException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLUException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLUGestioneException;
|
||||
import it.integry.integrywmsnative.core.rest.CommonRESTException;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
|
||||
public class UtilityExceptions {
|
||||
|
||||
private static final Class<? extends Exception>[] FIREBASE_IGNORED_EXCEPTIONS = new Class[] {
|
||||
|
||||
private static final Class<?>[] FIREBASE_IGNORED_EXCEPTIONS = new Class[] {
|
||||
InvalidConnectionException.class,
|
||||
InvalidLUGestioneException.class,
|
||||
InvalidLUException.class
|
||||
};
|
||||
|
||||
public static void defaultException(Context context, Exception ex, DialogProgressView progressDialog) {
|
||||
|
||||
@@ -44,7 +44,6 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
@@ -303,7 +302,8 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
||||
|
||||
}
|
||||
|
||||
filterLayoutView.show(getSupportFragmentManager(), "TAG");
|
||||
if (!filterLayoutView.isAdded())
|
||||
filterLayoutView.show(getSupportFragmentManager(), "TAG");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -732,7 +732,6 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
||||
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
||||
Stream.of(mtbColts).map(x -> (MtbColt) x).toList(),
|
||||
input -> ((RecoverMtbColt) input).isFlagCanBeRecovered(),
|
||||
PrinterRESTConsumer.Type.SECONDARIA,
|
||||
ReportManager.getReportNameLUFromGestione(GestioneEnum.ACQUISTO));
|
||||
this.startActivityForResult(myIntent, PICK_UL_REQUEST);
|
||||
}
|
||||
@@ -827,19 +826,20 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
||||
.setCanLUBeClosed(true)
|
||||
.setCanOverflowOrderQuantity(canOverflowQuantity);
|
||||
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||
})
|
||||
.setOnAbort(() -> this.mViewModel.resetMatchedRows())
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||
})
|
||||
.setOnAbort(() -> this.mViewModel.resetMatchedRows())
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -221,10 +221,16 @@ public class AccettazionePickingViewModel {
|
||||
if (!UtilityBarcode.isEtichettaAnonimaOfCurrentYear(barcodeScanDTO.getStringValue())) {
|
||||
this.sendError(new NotCurrentYearLUException());
|
||||
} else {
|
||||
int numCollo = -1;
|
||||
|
||||
this.createNewLU(
|
||||
UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO.getStringValue()),
|
||||
CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, true, onComplete);
|
||||
try {
|
||||
numCollo = UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO.getStringValue());
|
||||
this.createNewLU(
|
||||
numCollo,
|
||||
CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, true, onComplete);
|
||||
} catch (Exception ex) {
|
||||
this.sendError(ex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.sendError(new AlreadyUsedAnonymousLabelException());
|
||||
@@ -837,7 +843,6 @@ public class AccettazionePickingViewModel {
|
||||
cloneMtbColt.setGestione(cloneMtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE ? GestioneEnum.PRODUZIONE : cloneMtbColt.getGestioneEnum());
|
||||
|
||||
this.mPrinterRESTConsumer.printCollo(
|
||||
PrinterRESTConsumer.Type.SECONDARIA,
|
||||
cloneMtbColt,
|
||||
() -> {
|
||||
this.sendLUSuccessfullyPrinted();
|
||||
|
||||
@@ -31,8 +31,8 @@ import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.databinding.FragmentDocInterniBinding;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoView;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoViewModel;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniEditFormActivity;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.ui.DocInterniListAdapter;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.ui.DocInterniListModel;
|
||||
@@ -81,8 +81,8 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
||||
mBinding.setLifecycleOwner(this);
|
||||
mBinding.setView(this);
|
||||
mBinding.setViewModel(mViewModel);
|
||||
mViewModel.mtbGrup.observe(getViewLifecycleOwner(),mtbGrup-> mViewModel.fetchProducts());
|
||||
mViewModel.dtbTipi.observe(getViewLifecycleOwner(),dtbTipi-> mViewModel.fetchDocuments());
|
||||
mViewModel.mtbGrup.observe(getViewLifecycleOwner(), mtbGrup -> mViewModel.fetchProducts());
|
||||
mViewModel.dtbTipi.observe(getViewLifecycleOwner(), dtbTipi -> mViewModel.fetchDocuments());
|
||||
this.initRecyclerView();
|
||||
|
||||
return mBinding.getRoot();
|
||||
@@ -91,9 +91,9 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
if (!this.mViewModel.hasDocDetails()){
|
||||
if (!this.mViewModel.hasDocDetails()) {
|
||||
mViewModel.init();
|
||||
}else{
|
||||
} else {
|
||||
this.mViewModel.fetchDocuments();
|
||||
}
|
||||
}
|
||||
@@ -115,30 +115,30 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
||||
|
||||
@Override
|
||||
public void onDocDetailsChanged(DialogSelectDocInfoViewModel selection) {
|
||||
if(selection.isInputValid()){
|
||||
if (selection.isInputValid()) {
|
||||
mViewModel.setSelectedDocDetails(selection);
|
||||
mBinding.mainFab.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
} else {
|
||||
mBinding.mainFab.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (selection.requiresFornitore()){
|
||||
if (selection.requiresFornitore()) {
|
||||
mBinding.codAnagContainer.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
} else {
|
||||
mBinding.codAnagContainer.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
if (selection.getSelectedGruppoArt() != null){
|
||||
if (selection.getSelectedGruppoArt() != null) {
|
||||
mBinding.mtbGrpContainer.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
} else {
|
||||
mBinding.mtbGrpContainer.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (selection.requiresDocData()){
|
||||
if (selection.requiresDocData()) {
|
||||
mBinding.docContainer.setVisibility(View.VISIBLE);
|
||||
mBinding.document.setText(Html.fromHtml(getString(R.string.doc_testata, String.valueOf(selection.getNumDoc()), UtilityDate.formatDate(selection.getDataDoc(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN))));
|
||||
}else{
|
||||
} else {
|
||||
mBinding.docContainer.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
||||
}
|
||||
|
||||
public void selectDocInfo() {
|
||||
if (this.dialogInitialized){
|
||||
if (this.dialogInitialized) {
|
||||
DialogSelectDocInfoView.newInstance(
|
||||
mDocInterniSetupDTO,
|
||||
this.mViewModel.dtbTipi.getValue(),
|
||||
@@ -201,6 +201,6 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
||||
|
||||
@Override
|
||||
public void onDocumentEditRequest(SqlMtbColt document, GrigliaAcquistiDTO arts) {
|
||||
requireActivity().startActivity(DocInterniEditFormActivity.newInstance(requireActivity(),document,arts));
|
||||
requireActivity().startActivity(DocInterniEditFormActivity.newInstance(requireActivity(), document, arts, mViewModel.getTipoDoc()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@ package it.integry.integrywmsnative.gest.contab_doc_interni;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -17,10 +15,10 @@ import it.integry.integrywmsnative.core.di.BindableInteger;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoViewModel;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GruppiArticoloDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipiDocDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.rest.DocInterniRESTConsumer;
|
||||
|
||||
@@ -91,7 +89,7 @@ public class DocInterniViewModel {
|
||||
this.numDoc.postValue(selection.getNumDoc());
|
||||
this.note.postValue(selection.getNote());
|
||||
|
||||
if (selection.getSelectedTipoDoc() != null ) {
|
||||
if (selection.getSelectedTipoDoc() != null) {
|
||||
this.dtbTipi.postValue(selection.getSelectedTipoDoc());
|
||||
}
|
||||
}
|
||||
@@ -114,11 +112,11 @@ public class DocInterniViewModel {
|
||||
this.sendOnLoadingStarted();
|
||||
String codAnag = null, codVdes = null;
|
||||
FornitoreDTO fornitore = this.fornitore.getValue();
|
||||
if (fornitore != null){
|
||||
if (fornitore != null) {
|
||||
codAnag = fornitore.getCodAnag();
|
||||
codVdes = fornitore.getCodVdes();
|
||||
}
|
||||
documentRepository.getLocalDocumentsByCodDtip(this.getCodDtip(), codAnag, codVdes, dataDoc.getValue(),numDoc.getValue(), list -> {
|
||||
documentRepository.getLocalDocumentsByCodDtip(this.getCodDtip(), codAnag, codVdes, dataDoc.getValue(), numDoc.getValue(), list -> {
|
||||
documentRepository.getNextNumCollo(nextNumCollo -> {
|
||||
this.mDocsList.postValue(list);
|
||||
this.setNextNumCollo(nextNumCollo);
|
||||
@@ -141,6 +139,13 @@ public class DocInterniViewModel {
|
||||
return this.dtbTipi.getValue().getCodDtip();
|
||||
}
|
||||
|
||||
public TipiDocDTO getTipoDoc() {
|
||||
if (this.dtbTipi.getValue() == null) {
|
||||
return null;
|
||||
}
|
||||
return this.dtbTipi.getValue();
|
||||
}
|
||||
|
||||
private String getCodMgrp() {
|
||||
if (this.mtbGrup.getValue() == null) {
|
||||
return null;
|
||||
@@ -168,10 +173,10 @@ public class DocInterniViewModel {
|
||||
document.setNumCollo(this.nextNumCollo);
|
||||
document.setGestione("L");
|
||||
document.setDataDoc(this.dataDoc.getValue());
|
||||
if (this.numDoc.getValue() != null){
|
||||
if (this.numDoc.getValue() != null) {
|
||||
document.setNumDoc(Integer.parseInt(this.numDoc.getValue()));
|
||||
}
|
||||
if (this.fornitore.getValue() != null){
|
||||
if (this.fornitore.getValue() != null) {
|
||||
document.setCodAnag(this.fornitore.getValue().getCodAnag());
|
||||
document.setCodVdes(this.fornitore.getValue().getCodVdes());
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public class DialogSelectDocInfoViewModel {
|
||||
selectedDocType.getGestione().equalsIgnoreCase("V") ? "V" : "A"
|
||||
);
|
||||
} else {
|
||||
return forn.getTipoAnag().equalsIgnoreCase("F") ;
|
||||
return forn.getTipoAnag().equalsIgnoreCase("F");
|
||||
}
|
||||
})
|
||||
.map(FornitoreDTO::getLabel).toList();
|
||||
@@ -148,8 +148,7 @@ public class DialogSelectDocInfoViewModel {
|
||||
public boolean requiresNote() {
|
||||
return this.getSelectedTipoDoc() != null &&
|
||||
this.getSelectedTipoDoc().getGestioneDoc().equals("P") &&
|
||||
this.getSelectedTipoDoc().getGestione().equals("L")
|
||||
;
|
||||
this.getSelectedTipoDoc().getGestione().equals("L");
|
||||
}
|
||||
|
||||
public boolean isInputValid() {
|
||||
@@ -161,12 +160,12 @@ public class DialogSelectDocInfoViewModel {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.requiresDocData() && (this.getDataDoc() == null || this.getNumDoc() == null)){
|
||||
if (this.requiresDocData() && (this.getDataDoc() == null || this.getNumDoc() == null)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (this.requiresNote() && (this.getNote() == null || this.getNote().length() <= 0) ){
|
||||
if (this.requiresNote() && (this.getNote() == null || this.getNote().length() <= 0)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -174,7 +173,7 @@ public class DialogSelectDocInfoViewModel {
|
||||
}
|
||||
|
||||
public boolean requiresDocData() {
|
||||
TipiDocDTO doc = this.getSelectedTipoDoc();
|
||||
TipiDocDTO doc = this.getSelectedTipoDoc();
|
||||
return doc != null && doc.getGestioneDoc().equalsIgnoreCase("P") && !doc.getGestione().equalsIgnoreCase("L");
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ public class TipiDocDTO {
|
||||
private String descrizione;
|
||||
private String gestione;
|
||||
private String gestioneDoc;
|
||||
private boolean requireNote = false;
|
||||
|
||||
public String getCodDtip() {
|
||||
return codDtip;
|
||||
@@ -38,7 +39,17 @@ public class TipiDocDTO {
|
||||
public void setGestioneDoc(String gestioneDoc) {
|
||||
this.gestioneDoc = gestioneDoc;
|
||||
}
|
||||
public String getLabel(){
|
||||
return this.codDtip +" - "+this.descrizione;
|
||||
|
||||
public String getLabel() {
|
||||
return this.codDtip + " - " + this.descrizione;
|
||||
}
|
||||
|
||||
public boolean isRequireNote() {
|
||||
return requireNote;
|
||||
}
|
||||
|
||||
public TipiDocDTO setRequireNote(boolean requireNote) {
|
||||
this.requireNote = requireNote;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.databinding.ActivityContabDocInterniEditBinding;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiChildDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipiDocDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsView;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.ui.DocumentRowsListAdapter;
|
||||
import it.integry.integrywmsnative.ui.FabMenuCustomAnimations;
|
||||
@@ -52,6 +53,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
|
||||
private static final String DATA_KEY_DOCUMENT = "document";
|
||||
private static final String DATA_KEY_PRODUCTS_LIST = "productsList";
|
||||
private static final String DATA_KEY_TIPO_DOC = "docType";
|
||||
|
||||
@Inject
|
||||
MtbColrRepository documentRowsRepository;
|
||||
@@ -75,13 +77,15 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
public BindableBoolean isDocumentExportable = new BindableBoolean(false);
|
||||
private final ObservableArrayList<SqlMtbColr> documentRowsObservableList = new ObservableArrayList<>();
|
||||
|
||||
public static Intent newInstance(Context context, SqlMtbColt document, GrigliaAcquistiDTO productList) {
|
||||
public static Intent newInstance(Context context, SqlMtbColt document, GrigliaAcquistiDTO productList, TipiDocDTO tipoDoc) {
|
||||
Intent myIntent = new Intent(context, DocInterniEditFormActivity.class);
|
||||
|
||||
String doc = DataCache.addItem(document);
|
||||
String productsKey = DataCache.addItem(productList);
|
||||
String docType = DataCache.addItem(tipoDoc);
|
||||
myIntent.putExtra(DATA_KEY_DOCUMENT, doc);
|
||||
myIntent.putExtra(DATA_KEY_PRODUCTS_LIST, productsKey);
|
||||
myIntent.putExtra(DATA_KEY_TIPO_DOC, docType);
|
||||
return myIntent;
|
||||
}
|
||||
|
||||
@@ -96,7 +100,14 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
SqlMtbColt document = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_DOCUMENT));
|
||||
GrigliaAcquistiDTO griglia = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_PRODUCTS_LIST));
|
||||
List<GrigliaAcquistiChildDTO> productList = griglia.getGrigliaAcquistiChild();
|
||||
this.initViewModel(document, productList);
|
||||
TipiDocDTO docType = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_TIPO_DOC));
|
||||
|
||||
this.initViewModel();
|
||||
this.viewModel.setDocument(document);
|
||||
this.viewModel.setProductsList(productList);
|
||||
this.viewModel.setTipoDoc(docType);
|
||||
|
||||
|
||||
this.initView();
|
||||
this.initBindables();
|
||||
this.initRecyclerView();
|
||||
@@ -137,12 +148,9 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
binding.bottomSheetMtbColrEdit.init(binding.bottomSheetMtbColrEdit, binding.bottomSheetMtbColrEditBackground);
|
||||
}
|
||||
|
||||
private void initViewModel(SqlMtbColt document, List<GrigliaAcquistiChildDTO> productList) {
|
||||
private void initViewModel() {
|
||||
this.viewModel.init();
|
||||
this.viewModel.setListeners(this);
|
||||
this.viewModel.setDocument(document);
|
||||
this.viewModel.setProductsList(productList);
|
||||
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
@@ -239,6 +247,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
.setCanOverflowOrderQuantity(false)
|
||||
.setCanLUBeClosed(false)
|
||||
.setNotesAllowed(true)
|
||||
.setNotesMandatory(this.viewModel.isNotesMandatory())
|
||||
.setDataScadMandatory(flagTracciabilita)
|
||||
.setCanPartitaMagBeChanged(flagTracciabilita)
|
||||
.setSuggestPartitaMag(data -> {
|
||||
@@ -249,13 +258,15 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
}
|
||||
return partitaMag;
|
||||
});
|
||||
dialogInputQuantityV2View.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
this.onLoadingStarted();
|
||||
this.viewModel.saveRow(row, resultDTO);
|
||||
})
|
||||
.setOnAbort(this::onLoadingEnded)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
|
||||
if (!dialogInputQuantityV2View.isAdded())
|
||||
dialogInputQuantityV2View.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
this.onLoadingStarted();
|
||||
this.viewModel.saveRow(row, resultDTO);
|
||||
})
|
||||
.setOnAbort(this::onLoadingEnded)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,6 +26,7 @@ import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ArtDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ColloDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiChildDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.SaveDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipiDocDTO;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.rest.DocInterniRESTConsumer;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2ResultDTO;
|
||||
|
||||
@@ -38,6 +39,7 @@ public class DocInterniEditFormViewModel {
|
||||
private final DocInterniRESTConsumer docInterniRESTConsumer;
|
||||
private DocInterniEditFormViewModel.Listener listener;
|
||||
private List<GrigliaAcquistiChildDTO> productsList;
|
||||
private TipiDocDTO tipoDoc;
|
||||
private boolean isCheckPartitaMag = false;
|
||||
private JSONObject checkFornitoreRules = null;
|
||||
public MutableLiveData<SqlMtbColt> document = new MutableLiveData<>();
|
||||
@@ -299,6 +301,15 @@ public class DocInterniEditFormViewModel {
|
||||
return Stream.of(productsList).filter(prod -> prod.codMart.equalsIgnoreCase(codMart)).findFirstOrElse(null);
|
||||
}
|
||||
|
||||
public DocInterniEditFormViewModel setTipoDoc(TipiDocDTO docType) {
|
||||
this.tipoDoc = docType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isNotesMandatory() {
|
||||
return this.tipoDoc != null && this.tipoDoc.isRequireNote();
|
||||
}
|
||||
|
||||
public interface Listener extends ILoadingListener {
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
@@ -45,16 +45,14 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
||||
public ObservableField<Boolean> recoverFabMenuVisible = new ObservableField<>(false);
|
||||
|
||||
private String mReportName;
|
||||
private PrinterRESTConsumer.Type mPrinterType;
|
||||
|
||||
private static class Key {
|
||||
private static final String MtbColtKey = "mtbColtKey";
|
||||
private static final String CanRecoverUL = "canRecoverUL";
|
||||
private static final String PrinterType = "printerType";
|
||||
private static final String ReportName = "reportName";
|
||||
}
|
||||
|
||||
public static Intent createIntent(Context context, MtbColt item, boolean canRecoverUl, PrinterRESTConsumer.Type printerType, String reportName) {
|
||||
public static Intent createIntent(Context context, MtbColt item, boolean canRecoverUl, String reportName) {
|
||||
Intent myIntent = new Intent(context, ContenutoBancaleActivity.class);
|
||||
|
||||
String keyMtbColt = DataCache.addItem(item);
|
||||
@@ -63,9 +61,6 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
||||
String keyCanRecoverUL = DataCache.addItem(canRecoverUl);
|
||||
myIntent.putExtra(Key.CanRecoverUL, keyCanRecoverUL);
|
||||
|
||||
String keyPrinterType = DataCache.addItem(printerType);
|
||||
myIntent.putExtra(Key.PrinterType, keyPrinterType);
|
||||
|
||||
String keyReportName = DataCache.addItem(reportName);
|
||||
myIntent.putExtra(Key.ReportName, keyReportName);
|
||||
|
||||
@@ -79,7 +74,6 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
||||
boolean canRecoverUL = DataCache.retrieveItem(getIntent().getStringExtra(Key.CanRecoverUL));
|
||||
mtbColt.set(DataCache.retrieveItem(getIntent().getStringExtra(Key.MtbColtKey)));
|
||||
mReportName = DataCache.retrieveItem(getIntent().getStringExtra(Key.ReportName));
|
||||
mPrinterType = DataCache.retrieveItem(getIntent().getStringExtra(Key.PrinterType));
|
||||
|
||||
bindings = DataBindingUtil.setContentView(this, R.layout.activity_contenuto_bancale);
|
||||
|
||||
@@ -97,7 +91,7 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
mViewModel.setListener(this);
|
||||
mViewModel.init(mtbColt.get(), mPrinterType, mReportName);
|
||||
mViewModel.init(mtbColt.get(), mReportName);
|
||||
|
||||
recoverFabMenuVisible.set(canRecoverUL);
|
||||
|
||||
@@ -143,7 +137,7 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
||||
this.bindings.contenutoBancaleFab.close(true);
|
||||
this.onLoadingStarted();
|
||||
try {
|
||||
this.mPrinterRESTConsumer.printCollo(mPrinterType, mtbColt.get(),
|
||||
this.mPrinterRESTConsumer.printCollo(mtbColt.get(),
|
||||
() -> {
|
||||
this.onLoadingEnded();
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import javax.inject.Inject;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.DepositoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
|
||||
public class ContenutoBancaleViewModel {
|
||||
|
||||
@@ -19,7 +18,7 @@ public class ContenutoBancaleViewModel {
|
||||
this.mDepositoRESTConsumer = depositoRESTConsumer;
|
||||
}
|
||||
|
||||
public void init(MtbColt mtbColt, PrinterRESTConsumer.Type printerType, String defaultReportName) {
|
||||
public void init(MtbColt mtbColt, String defaultReportName) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsWithReturn;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.databinding.ActivityListaBancaliBinding;
|
||||
import it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleActivity;
|
||||
import it.integry.integrywmsnative.gest.lista_bancali.ui.ListaColliMainListAdapter;
|
||||
@@ -30,7 +29,6 @@ public class ListaBancaliActivity extends BaseActivity implements ListaBancaliVi
|
||||
private static class Key {
|
||||
private static final String MtbColtsKey = "mtbColtsKey";
|
||||
private static final String CanRecoverUL = "canRecoverUL";
|
||||
private static final String PrinterType = "printerType";
|
||||
private static final String ReportName = "reportName";
|
||||
private static final String FlagOnlyResiduo = "flagOnlyResiduo";
|
||||
}
|
||||
@@ -43,7 +41,6 @@ public class ListaBancaliActivity extends BaseActivity implements ListaBancaliVi
|
||||
private final ObservableArrayList<MtbColt> mtbColts = new ObservableArrayList<>();
|
||||
|
||||
private RunnableArgsWithReturn<MtbColt, Boolean> mCanRecoverUl;
|
||||
private PrinterRESTConsumer.Type mPrinterType;
|
||||
private String mReportName;
|
||||
private boolean mFlagOnlyResiduo;
|
||||
|
||||
@@ -51,19 +48,19 @@ public class ListaBancaliActivity extends BaseActivity implements ListaBancaliVi
|
||||
|
||||
|
||||
|
||||
public static Intent createIntent(Context context, List<MtbColt> items, RunnableArgsWithReturn<MtbColt, Boolean> canRecoverUlAction, PrinterRESTConsumer.Type printerType, String reportName) {
|
||||
return createIntent(context, items, canRecoverUlAction, printerType, true, reportName);
|
||||
public static Intent createIntent(Context context, List<MtbColt> items, RunnableArgsWithReturn<MtbColt, Boolean> canRecoverUlAction, String reportName) {
|
||||
return createIntent(context, items, canRecoverUlAction, true, reportName);
|
||||
}
|
||||
|
||||
public static Intent createIntent(Context context, List<MtbColt> items, boolean canRecoverUl, PrinterRESTConsumer.Type printerType, boolean onlyResiduo) {
|
||||
return createIntent(context, items, input -> canRecoverUl, printerType, onlyResiduo);
|
||||
public static Intent createIntent(Context context, List<MtbColt> items, boolean canRecoverUl, boolean onlyResiduo) {
|
||||
return createIntent(context, items, input -> canRecoverUl, onlyResiduo);
|
||||
}
|
||||
|
||||
public static Intent createIntent(Context context, List<MtbColt> items, RunnableArgsWithReturn<MtbColt, Boolean> canRecoverUlAction, PrinterRESTConsumer.Type printerType, boolean onlyResiduo) {
|
||||
return createIntent(context, items, canRecoverUlAction, printerType, onlyResiduo, null);
|
||||
public static Intent createIntent(Context context, List<MtbColt> items, RunnableArgsWithReturn<MtbColt, Boolean> canRecoverUlAction, boolean onlyResiduo) {
|
||||
return createIntent(context, items, canRecoverUlAction, onlyResiduo, null);
|
||||
}
|
||||
|
||||
public static Intent createIntent(Context context, List<MtbColt> items, RunnableArgsWithReturn<MtbColt, Boolean> canRecoverUlAction, PrinterRESTConsumer.Type printerType, boolean onlyResiduo, String reportName) {
|
||||
public static Intent createIntent(Context context, List<MtbColt> items, RunnableArgsWithReturn<MtbColt, Boolean> canRecoverUlAction, boolean onlyResiduo, String reportName) {
|
||||
Intent myIntent = new Intent(context, ListaBancaliActivity.class);
|
||||
|
||||
String mtbColtsKey = DataCache.addItem(items);
|
||||
@@ -72,9 +69,6 @@ public class ListaBancaliActivity extends BaseActivity implements ListaBancaliVi
|
||||
String canRecoverULKey = DataCache.addItem(canRecoverUlAction);
|
||||
myIntent.putExtra(Key.CanRecoverUL, canRecoverULKey);
|
||||
|
||||
String printerTypeKey = DataCache.addItem(printerType);
|
||||
myIntent.putExtra(Key.PrinterType, printerTypeKey);
|
||||
|
||||
String flagOnlyResiduoKey = DataCache.addItem(onlyResiduo);
|
||||
myIntent.putExtra(Key.FlagOnlyResiduo, flagOnlyResiduoKey);
|
||||
|
||||
@@ -97,7 +91,6 @@ public class ListaBancaliActivity extends BaseActivity implements ListaBancaliVi
|
||||
|
||||
|
||||
mCanRecoverUl = DataCache.retrieveItem(getIntent().getStringExtra(Key.CanRecoverUL));
|
||||
mPrinterType = DataCache.retrieveItem(getIntent().getStringExtra(Key.PrinterType));
|
||||
mReportName = DataCache.retrieveItem(getIntent().getStringExtra(Key.ReportName));
|
||||
mFlagOnlyResiduo = DataCache.retrieveItem(getIntent().getStringExtra(Key.FlagOnlyResiduo));
|
||||
|
||||
@@ -138,7 +131,7 @@ public class ListaBancaliActivity extends BaseActivity implements ListaBancaliVi
|
||||
}
|
||||
|
||||
public void startContenutoBancaleActivity(MtbColt item){
|
||||
Intent myIntent = ContenutoBancaleActivity.createIntent(this, item, mCanRecoverUl.run(item), mPrinterType, mReportName);
|
||||
Intent myIntent = ContenutoBancaleActivity.createIntent(this, item, mCanRecoverUl.run(item), mReportName);
|
||||
startActivityForResult(myIntent, PICK_UL_REQUEST);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,10 +75,7 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
||||
}
|
||||
|
||||
public static MainFragment newInstance() {
|
||||
MainFragment fragment = new MainFragment();
|
||||
Bundle args = new Bundle();
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
return new MainFragment();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,6 +42,7 @@ 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.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.DepositoRESTConsumer;
|
||||
@@ -180,6 +181,8 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
for (Runnable onPreDestroy : mOnPreDestroyList) {
|
||||
onPreDestroy.run();
|
||||
}
|
||||
|
||||
mViewModel.setListener(null);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@@ -682,37 +685,38 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
break;
|
||||
}
|
||||
|
||||
filterLayoutView.show(requireActivity().getSupportFragmentManager(), "TAG");
|
||||
if (!filterLayoutView.isAdded())
|
||||
filterLayoutView.show(requireActivity().getSupportFragmentManager(), "TAG");
|
||||
}
|
||||
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.onLoadingStarted();
|
||||
|
||||
this.mViewModel.processBarcodeDTO(data, () -> {
|
||||
this.onLoadingEnded();
|
||||
});
|
||||
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||
};
|
||||
|
||||
private void refreshList(List<OrdiniUscitaElencoDTO> filteredList) {
|
||||
List<OrdiniUscitaElencoDTO> tmpList;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
List<OrdiniUscitaElencoDTO> tmpList;
|
||||
|
||||
if (filteredList != null) {
|
||||
tmpList = filteredList;
|
||||
} else if (mAppliedFilterViewModel != null) {
|
||||
mAppliedFilterViewModel.applyAllTests();
|
||||
tmpList = mAppliedFilterViewModel.getMutableFilteredOrderList().getValue();
|
||||
} else {
|
||||
tmpList = mViewModel.getOrderList().getValue();
|
||||
}
|
||||
if (filteredList != null) {
|
||||
tmpList = filteredList;
|
||||
} else if (mAppliedFilterViewModel != null) {
|
||||
mAppliedFilterViewModel.applyAllTests();
|
||||
tmpList = mAppliedFilterViewModel.getMutableFilteredOrderList().getValue();
|
||||
} else {
|
||||
tmpList = mViewModel.getOrderList().getValue();
|
||||
}
|
||||
|
||||
var list = convertDataModelToListModel(tmpList);
|
||||
var list = convertDataModelToListModel(tmpList);
|
||||
|
||||
this.mOrdiniInevasiMutableData.clear();
|
||||
this.mOrdiniInevasiMutableData.addAll(list);
|
||||
this.mOrdiniInevasiMutableData.clear();
|
||||
this.mOrdiniInevasiMutableData.addAll(list);
|
||||
|
||||
fabVisible.set(Stream.of(mOrdiniInevasiMutableData)
|
||||
.anyMatch(y -> y.getSelectedObservable().get()));
|
||||
fabVisible.set(Stream.of(mOrdiniInevasiMutableData)
|
||||
.anyMatch(y -> y.getSelectedObservable().get()));
|
||||
});
|
||||
}
|
||||
|
||||
private List<OrdiniUscitaElencoListModel> convertDataModelToListModel(List<OrdiniUscitaElencoDTO> dataList) {
|
||||
@@ -777,6 +781,17 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
this.mViewModel.loadPicking(selectedOrders, this.mAppliedFilterViewModel.getSelectedMtbGrup());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFilterNumOrderApplied(List<OrdiniUscitaElencoDTO> filteredOrder) {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
var numOrders = Stream.of(filteredOrder)
|
||||
.map(OrdineInevasoDTO::getNumOrd)
|
||||
.distinct()
|
||||
.toList();
|
||||
this.mAppliedFilterViewModel.setNumOrdFilter(numOrders);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOrderFiltered(List<OrdiniUscitaElencoDTO> filteredOrders) {
|
||||
refreshList(filteredOrders);
|
||||
|
||||
@@ -154,12 +154,15 @@ public class OrdiniUscitaElencoViewModel {
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
|
||||
RunnableArgs<List<OrdiniUscitaElencoDTO>> onBarcodeScanComplete = orderList -> {
|
||||
onComplete.run();
|
||||
this.sendOnOrderFiltered(orderList);
|
||||
onComplete.run();
|
||||
};
|
||||
|
||||
if (UtilityBarcode.isBarcodeOrdineV(barcodeScanDTO)) {
|
||||
this.executeEtichettaOrdineV(barcodeScanDTO.getStringValue(), onBarcodeScanComplete);
|
||||
this.executeEtichettaOrdineV(barcodeScanDTO.getStringValue(), foundOrder -> {
|
||||
this.sendOnFilterNumOrderApplied(foundOrder);
|
||||
onComplete.run();
|
||||
});
|
||||
} else if (UtilityBarcode.isEtichettaAnonima(barcodeScanDTO)) {
|
||||
this.executeEtichettaLU(barcodeScanDTO.getStringValue(), onBarcodeScanComplete);
|
||||
} else if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||
@@ -196,10 +199,11 @@ public class OrdiniUscitaElencoViewModel {
|
||||
final String finalGestione = gestione;
|
||||
final Date finalDate = date;
|
||||
|
||||
List<OrdiniUscitaElencoDTO> filteredOrders = Stream.of(mOrderList.getValue())
|
||||
.filter(x -> x.getNumOrd() == numOrd && x.getGestione().equalsIgnoreCase(finalGestione) && x.getDataOrdD().equals(finalDate)).toList();
|
||||
List<OrdiniUscitaElencoDTO> foundItem = Stream.of(mOrderList.getValue())
|
||||
.filter(x -> x.getNumOrd() == numOrd && x.getGestione().equalsIgnoreCase(finalGestione) && x.getDataOrdD().equals(finalDate))
|
||||
.toList();
|
||||
|
||||
onComplete.run(filteredOrders);
|
||||
onComplete.run(foundItem);
|
||||
}
|
||||
|
||||
|
||||
@@ -284,6 +288,10 @@ public class OrdiniUscitaElencoViewModel {
|
||||
if (this.mListener != null) mListener.onError(ex);
|
||||
}
|
||||
|
||||
private void sendOnFilterNumOrderApplied(List<OrdiniUscitaElencoDTO> filteredOrder) {
|
||||
if (this.mListener != null) mListener.onFilterNumOrderApplied(filteredOrder);
|
||||
}
|
||||
|
||||
private void sendOnOrderFiltered(List<OrdiniUscitaElencoDTO> filteredOrders) {
|
||||
if (this.mListener != null) mListener.onOrderFiltered(filteredOrders);
|
||||
}
|
||||
@@ -297,6 +305,8 @@ public class OrdiniUscitaElencoViewModel {
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
void onFilterNumOrderApplied(List<OrdiniUscitaElencoDTO> filteredOrder);
|
||||
|
||||
void onOrderFiltered(List<OrdiniUscitaElencoDTO> filteredOrders);
|
||||
|
||||
void onOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<MtbColt> alreadyRegisteredMtbColts);
|
||||
|
||||
@@ -337,20 +337,21 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
.setCanPartitaMagBeChanged(canPartitaMagBeChanged)
|
||||
.setCanLUBeClosed(canLUBeClosed);
|
||||
|
||||
mDialogInputQuantityV2View.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
mDialogInputQuantityV2View.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
|
||||
this.onLoadingStarted();
|
||||
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||
})
|
||||
.setOnAbort(this::onLoadingEnded)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
this.onLoadingStarted();
|
||||
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||
})
|
||||
.setOnAbort(this::onLoadingEnded)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -213,7 +213,7 @@ public class PickingLiberoViewModel {
|
||||
|
||||
if (posizione != null && posizione.isFlagMonoCollo()) {
|
||||
this.executePosizione(posizione, articolo, onComplete);
|
||||
} else if(mDefaultGestione == GestioneEnum.VENDITA){
|
||||
} else if (mDefaultGestione == GestioneEnum.VENDITA) {
|
||||
this.dispatchArt(articolo, ean128Model);
|
||||
onComplete.run();
|
||||
} else {
|
||||
@@ -626,7 +626,7 @@ public class PickingLiberoViewModel {
|
||||
UtilityString.equalsIgnoreCase(x.getCodCol(), mtbColrToUpdate.getCodCol()) &&
|
||||
UtilityString.equalsIgnoreCase(x.getCodTagl(), mtbColrToUpdate.getCodTagl()) &&
|
||||
UtilityString.equalsIgnoreCase(x.getPartitaMag(), mtbColrToUpdate.getPartitaMag()))
|
||||
.single();
|
||||
.findFirstOrElse(null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -318,23 +318,24 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
.setCanLUBeClosed(false)
|
||||
.setCanPartitaMagBeChanged(false);
|
||||
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
|
||||
this.onLoadingStarted();
|
||||
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||
})
|
||||
.setOnAbort(() -> {
|
||||
this.mViewmodel.resetMatchedRows();
|
||||
})
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
this.onLoadingStarted();
|
||||
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||
})
|
||||
.setOnAbort(() -> {
|
||||
this.mViewmodel.resetMatchedRows();
|
||||
})
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -218,7 +218,6 @@ public class PickingResiViewModel {
|
||||
private void singlePrint(MtbColt mtbColtToPrint, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
this.mPrinterRESTConsumer.printCollo(
|
||||
PrinterRESTConsumer.Type.PRIMARIA,
|
||||
mtbColtToPrint,
|
||||
onComplete, onFailed);
|
||||
|
||||
@@ -303,10 +302,16 @@ public class PickingResiViewModel {
|
||||
if (!UtilityBarcode.isEtichettaAnonimaOfCurrentYear(barcodeScanDTO.getStringValue())) {
|
||||
this.sendError(new NotCurrentYearLUException());
|
||||
} else {
|
||||
int numCollo = -1;
|
||||
|
||||
this.createNewLU(
|
||||
UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO.getStringValue()),
|
||||
CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, onComplete);
|
||||
try {
|
||||
numCollo = UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO.getStringValue());
|
||||
this.createNewLU(
|
||||
numCollo,
|
||||
CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, onComplete);
|
||||
} catch (Exception ex) {
|
||||
this.sendError(ex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
@@ -274,7 +274,8 @@ public class ProdOrdineProduzioneElencoFragment extends BaseFragment implements
|
||||
break;
|
||||
}
|
||||
|
||||
filterLayoutView.show(requireActivity().getSupportFragmentManager(), "TAG");
|
||||
if (!filterLayoutView.isAdded())
|
||||
filterLayoutView.show(requireActivity().getSupportFragmentManager(), "TAG");
|
||||
|
||||
}
|
||||
|
||||
@@ -382,8 +383,6 @@ public class ProdOrdineProduzioneElencoFragment extends BaseFragment implements
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void initJtbComtCache(Runnable onComplete) {
|
||||
var jtbComts = Stream.of(Objects.requireNonNull(this.mViewModel.getOrderList().getValue()))
|
||||
.flatMap(x -> Stream.of(x.getCodJcom()))
|
||||
|
||||
@@ -201,20 +201,22 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
||||
.setCanOverflowOrderQuantity(canOverflowOrderQuantity)
|
||||
.setCanLUBeClosed(canLUBeClosed);
|
||||
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
|
||||
this.mViewModel.onItemDispatched(item, pickedQuantityDTO, sourceMtbColt);
|
||||
})
|
||||
.setOnAbort(this::onLoadingEnded)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
this.mViewModel.onItemDispatched(item, pickedQuantityDTO, sourceMtbColt);
|
||||
})
|
||||
.setOnAbort(this::onLoadingEnded)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
else this.onLoadingEnded();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -291,7 +291,6 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
private void singlePrint(MtbColt mtbColtToPrint, Runnable onComplete, RunnableArgs<Exception> onAbort) {
|
||||
this.mPrinterRESTConsumer.printCollo(
|
||||
PrinterRESTConsumer.Type.PRIMARIA,
|
||||
mtbColtToPrint,
|
||||
onComplete, onAbort);
|
||||
|
||||
|
||||
@@ -117,10 +117,12 @@ public class ProdRientroMerceFragment extends BaseFragment implements ITitledFra
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
|
||||
for (Runnable onPreDestroy :
|
||||
mOnPreDestroyList) {
|
||||
for (Runnable onPreDestroy : mOnPreDestroyList) {
|
||||
onPreDestroy.run();
|
||||
}
|
||||
|
||||
mProdRientroMerceOrderDetailFragment.onDetach();
|
||||
mProdRientroMerceOrderListFragment.onDetach();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,8 +8,8 @@ import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||
import it.integry.integrywmsnative.gest.picking_resi.exceptions.DocumentsLoadException;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.exceptions.OrdersLoadException;
|
||||
|
||||
public class ProdRientroMerceViewModel {
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ProdRientroMerceViewModel {
|
||||
this.mMesRESTConsumer.getOrdiniLavorazione("I", null, ordiniLavorazioneList -> {
|
||||
this.mOrdiniLavorazioneAperti.postValue(ordiniLavorazioneList);
|
||||
this.sendOnLoadingEnded();
|
||||
}, ex -> this.sendError(new DocumentsLoadException(ex)));
|
||||
}, ex -> this.sendError(new OrdersLoadException(ex)));
|
||||
}
|
||||
|
||||
public MutableLiveData<List<OrdineLavorazioneDTO>> getOrdiniLavorazioneAperti() {
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail;
|
||||
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
@@ -12,10 +15,13 @@ import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableField;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
||||
import com.harrysoft.androidbluetoothserial.BluetoothSerialDevice;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
@@ -23,8 +29,11 @@ import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.exception.BluetoothConnectionException;
|
||||
import it.integry.integrywmsnative.core.expansion.AtomicBigDecimal;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
@@ -36,6 +45,7 @@ import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderDetailBinding;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdView;
|
||||
@@ -64,6 +74,9 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
|
||||
private RunnableArgs<MtbColt> onMtbColtClicked;
|
||||
|
||||
private BluetoothManager bluetoothManager;
|
||||
private BluetoothSerialDevice mConnectedBluetoothDevice;
|
||||
|
||||
|
||||
public ObservableField<BigDecimal> sumLUNumber = new ObservableField<>(BigDecimal.ZERO);
|
||||
public ObservableField<BigDecimal> sumColliNumber = new ObservableField<>(BigDecimal.ZERO);
|
||||
@@ -103,6 +116,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
this.mViewModel.mtbColtsOfOrder.observe(getViewLifecycleOwner(), this::refreshList);
|
||||
|
||||
this.initRecyclerView();
|
||||
this.initULScaleBluetoothConnection();
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
@@ -121,10 +135,52 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
|
||||
mBindings.mainList.setAdapter(mAdapter);
|
||||
mAdapter.setOnItemClickListener(item -> {
|
||||
if(this.onMtbColtClicked != null) this.onMtbColtClicked.run(item);
|
||||
if (this.onMtbColtClicked != null) this.onMtbColtClicked.run(item);
|
||||
});
|
||||
}
|
||||
|
||||
private void initULScaleBluetoothConnection() {
|
||||
bluetoothManager = BluetoothManager.getInstance();
|
||||
if (bluetoothManager == null) {
|
||||
// Bluetooth unavailable on this device :( tell the user
|
||||
Toast.makeText(requireActivity(), "Bluetooth not available.", Toast.LENGTH_LONG).show(); // Replace context with your context instance.
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext());
|
||||
var btMacAddress = sharedPreferences.getString(MainSettingsFragment.KEY_PALLET_BT_DEVICE, null);
|
||||
|
||||
if (btMacAddress == null) {
|
||||
Toast.makeText(requireActivity(), "Nessun dispositivo BLUETOOTH configurato nelle impostazioni.", Toast.LENGTH_LONG).show(); // Replace context with your context instance.
|
||||
return;
|
||||
}
|
||||
|
||||
var btName = Stream.of(bluetoothManager.getPairedDevicesList())
|
||||
.filter(x -> x.getAddress().equalsIgnoreCase(btMacAddress))
|
||||
.map(BluetoothDevice::getName)
|
||||
.findFirstOrElse(null);
|
||||
|
||||
var disposableBluetooth = bluetoothManager.openSerialDevice(btMacAddress)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(this::onConnected, x -> this.onError(new BluetoothConnectionException(btName, btMacAddress, x)));
|
||||
|
||||
}
|
||||
|
||||
private void onConnected(BluetoothSerialDevice connectedDevice) {
|
||||
Toast.makeText(requireActivity(), "Connesso a: " + connectedDevice.getMac(), Toast.LENGTH_LONG).show();
|
||||
mConnectedBluetoothDevice = connectedDevice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetach() {
|
||||
if (mConnectedBluetoothDevice != null)
|
||||
bluetoothManager.close();
|
||||
|
||||
super.onDetach();
|
||||
}
|
||||
|
||||
public void setOrder(OrdineLavorazioneDTO order) {
|
||||
currentOrder.postValue(order);
|
||||
mBindings.invalidateAll();
|
||||
@@ -134,7 +190,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
}
|
||||
|
||||
private void refreshList(List<MtbColt> mtbColts) {
|
||||
if(mtbColts != null) {
|
||||
if (mtbColts != null) {
|
||||
sumLUNumber.set(new BigDecimal(mtbColts.size()));
|
||||
|
||||
AtomicBigDecimal sumColli = new AtomicBigDecimal(BigDecimal.ZERO);
|
||||
@@ -186,7 +242,8 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
" AND (data_fine IS NULL OR last_step = id_step) " +
|
||||
"ORDER BY id_step DESC";
|
||||
|
||||
mSystemRESTConsumer.<List<DtbOrdSteps>>processSql(sql, new TypeToken<ArrayList<DtbOrdSteps>>() {}.getType(), dtbOrdStep -> {
|
||||
mSystemRESTConsumer.<List<DtbOrdSteps>>processSql(sql, new TypeToken<ArrayList<DtbOrdSteps>>() {
|
||||
}.getType(), dtbOrdStep -> {
|
||||
|
||||
this.onLoadingEnded();
|
||||
|
||||
@@ -203,7 +260,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
|
||||
|
||||
DialogInputLUProdView
|
||||
.newInstance(dialogInputLUProdDTO, resultDTO -> {
|
||||
.newInstance(mConnectedBluetoothDevice != null ? mConnectedBluetoothDevice.toSimpleDeviceInterface() : null, dialogInputLUProdDTO, resultDTO -> {
|
||||
ProdRientroMerceOrderDetailPickedQuantityDTO pickedQuantityDTO = new ProdRientroMerceOrderDetailPickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setPesoCollo(resultDTO.getPesoCollo())
|
||||
@@ -255,8 +312,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
default:
|
||||
return ContextCompat.getDrawable(requireActivity(), R.drawable.ic_clock_circle_outline_24dp);
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
return ContextCompat.getDrawable(requireActivity(), R.drawable.ic_clock_circle_outline_24dp);
|
||||
}
|
||||
|
||||
@@ -271,8 +327,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
default:
|
||||
return ContextCompat.getColor(requireActivity(), R.color.blue_800);
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
return ContextCompat.getColor(requireActivity(), R.color.blue_800);
|
||||
}
|
||||
|
||||
@@ -287,8 +342,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
default:
|
||||
return ContextCompat.getDrawable(requireActivity(), R.drawable.label_primary_text);
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
return ContextCompat.getDrawable(requireActivity(), R.drawable.label_primary_text);
|
||||
}
|
||||
|
||||
@@ -303,8 +357,7 @@ public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements
|
||||
default:
|
||||
return ContextCompat.getColor(requireActivity(), R.color.blue_800);
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
return ContextCompat.getColor(requireActivity(), R.color.blue_800);
|
||||
}
|
||||
}
|
||||
@@ -163,6 +163,7 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
articolo.setMerceDaRic(artGrid.getMerceDaRic());
|
||||
articolo.setNewNoPromo(artGrid.isNewNoPromo());
|
||||
articolo.setFlagQtaMultipla(artGrid.getFlagQtaMultipla());
|
||||
articolo.setSystemNote(artGrid.generateSystemNote());
|
||||
|
||||
onSuccess.run(articolo);
|
||||
} else {
|
||||
@@ -192,7 +193,7 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
}
|
||||
|
||||
private boolean isAutoOrderOnScan() {
|
||||
return SettingsManager.iDB().getFlagOrdinaNuoviArticoliInGriglia();
|
||||
return SettingsManager.iDB().isFlagOrdinaArticoliOnScan();
|
||||
}
|
||||
|
||||
private void getNewArticoli(int idGrigla, RunnableArgs<List<ArticoloGriglia>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
|
||||
@@ -28,6 +28,8 @@ public class ArtDTO {
|
||||
|
||||
private String dataScad;
|
||||
|
||||
private String systemNote;
|
||||
|
||||
public Integer getRigaOrd() {
|
||||
return rigaOrd;
|
||||
}
|
||||
@@ -63,6 +65,7 @@ public class ArtDTO {
|
||||
public String getDataIns() {
|
||||
return dataIns;
|
||||
}
|
||||
|
||||
public Date getDataInsD() {
|
||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataIns());
|
||||
}
|
||||
@@ -70,6 +73,7 @@ public class ArtDTO {
|
||||
public void setDataIns(String dataIns) {
|
||||
this.dataIns = dataIns;
|
||||
}
|
||||
|
||||
public void setDataInsD(Date dataIns) {
|
||||
setDataIns(UtilityDate.formatDate(dataIns, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH));
|
||||
}
|
||||
@@ -122,6 +126,7 @@ public class ArtDTO {
|
||||
public void setDataScad(String dataScad) {
|
||||
this.dataScad = dataScad;
|
||||
}
|
||||
|
||||
public Date getDataScadD() {
|
||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataScad());
|
||||
}
|
||||
@@ -130,5 +135,12 @@ public class ArtDTO {
|
||||
setDataScad(UtilityDate.formatDate(dataScad, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH));
|
||||
}
|
||||
|
||||
public String getSystemNote() {
|
||||
return systemNote;
|
||||
}
|
||||
|
||||
public ArtDTO setSystemNote(String systemNote) {
|
||||
this.systemNote = systemNote;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,23 +378,24 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
.setCanPartitaMagBeChanged(canPartitaMagBeChanged)
|
||||
.setCanLUBeClosed(canLUBeClosed);
|
||||
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
|
||||
this.onLoadingStarted();
|
||||
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||
})
|
||||
.setOnAbort(() -> {
|
||||
this.onLoadingEnded();
|
||||
})
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
this.onLoadingStarted();
|
||||
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||
})
|
||||
.setOnAbort(this::onLoadingEnded)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
|
||||
else this.onLoadingEnded();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -494,7 +494,7 @@ public class RettificaGiacenzeViewModel {
|
||||
onComplete.run();
|
||||
} else {
|
||||
|
||||
this.mPrinterRESTConsumer.printCollo(null, mCurrentMtbColt, () -> {
|
||||
this.mPrinterRESTConsumer.printCollo(mCurrentMtbColt, () -> {
|
||||
this.sendLUSuccessfullyPrinted();
|
||||
onComplete.run();
|
||||
}, ex -> this.sendLUPrintError(ex, onComplete));
|
||||
|
||||
@@ -1,20 +1,34 @@
|
||||
package it.integry.integrywmsnative.gest.settings;
|
||||
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class MainSettingsFragment extends PreferenceFragmentCompat implements ITitledFragment {
|
||||
public class MainSettingsFragment extends PreferenceFragmentCompat implements ITitledFragment, Preference.OnPreferenceChangeListener {
|
||||
|
||||
private final ArrayList<Runnable> onPreDestroyList = new ArrayList<>();
|
||||
|
||||
public static final String KEY_PALLET_BT_DEVICE = "pallet_scale_bt_device";
|
||||
|
||||
private Collection<BluetoothDevice> btPairedDevices;
|
||||
|
||||
@Override
|
||||
public void onCreateActionBar(AppCompatTextView titleText, Context context) {
|
||||
titleText.setText(context.getText(R.string.settings_category).toString());
|
||||
@@ -23,8 +37,52 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
setPreferencesFromResource(R.xml.app_preferences, rootKey);
|
||||
|
||||
var palletScaleBtDeviceListPref = (ListPreference) findPreference(KEY_PALLET_BT_DEVICE);
|
||||
setListPreferenceData(palletScaleBtDeviceListPref);
|
||||
palletScaleBtDeviceListPref.setOnPreferenceChangeListener(this);
|
||||
}
|
||||
|
||||
|
||||
protected void setListPreferenceData(ListPreference lp) {
|
||||
BluetoothManager bluetoothManager = BluetoothManager.getInstance();
|
||||
if (bluetoothManager == null) {
|
||||
// Bluetooth unavailable on this device :( tell the user
|
||||
Toast.makeText(requireActivity(), "Bluetooth not available", Toast.LENGTH_LONG).show(); // Replace context with your context instance.
|
||||
return;
|
||||
}
|
||||
|
||||
btPairedDevices = bluetoothManager.getPairedDevicesList();
|
||||
|
||||
if(!Stream.of(btPairedDevices).anyMatch(x -> x.getAddress().equalsIgnoreCase(lp.getValue()))) {
|
||||
lp.setValue(null);
|
||||
}
|
||||
|
||||
updatePalletBtDeviceSummary(lp, lp.getValue());
|
||||
|
||||
if (!btPairedDevices.isEmpty()) {
|
||||
CharSequence[] entries = new CharSequence[btPairedDevices.size()];
|
||||
Stream.of(btPairedDevices)
|
||||
.map(BluetoothDevice::getName)
|
||||
.toList()
|
||||
.toArray(entries);
|
||||
|
||||
CharSequence[] entryValues = new CharSequence[btPairedDevices.size()];
|
||||
Stream.of(btPairedDevices)
|
||||
.map(BluetoothDevice::getAddress)
|
||||
.toList()
|
||||
.toArray(entryValues);
|
||||
|
||||
lp.setEntries(entries);
|
||||
lp.setEntryValues(entryValues);
|
||||
} else {
|
||||
lp.setEntries(new CharSequence[0]);
|
||||
lp.setEntryValues(new CharSequence[0]);
|
||||
lp.setDialogMessage("Nessun dispositivo bluetooth associato. Associane uno dalle impostazioni bluetooth prima di procedere.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
onPreDestroyList.add(onPreDestroy);
|
||||
@@ -34,9 +92,34 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
|
||||
for (Runnable onPreDestroy :
|
||||
onPreDestroyList) {
|
||||
for (Runnable onPreDestroy : onPreDestroyList) {
|
||||
onPreDestroy.run();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(@NonNull Preference preference, Object newValue) {
|
||||
|
||||
final int idx;
|
||||
switch (preference.getKey()) {
|
||||
case KEY_PALLET_BT_DEVICE:
|
||||
final var palletScaleBtDeviceListPref = (ListPreference) preference;
|
||||
updatePalletBtDeviceSummary(palletScaleBtDeviceListPref, (String) newValue);
|
||||
break;
|
||||
|
||||
}
|
||||
// Set result so knows to refresh itself
|
||||
// getActivity().setResult(RESULT_OK);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private void updatePalletBtDeviceSummary(ListPreference listPref, String btDeviceAddress) {
|
||||
String btDeviceName = Stream.of(btPairedDevices)
|
||||
.filter(x -> x.getAddress().equalsIgnoreCase(btDeviceAddress))
|
||||
.map(BluetoothDevice::getName)
|
||||
.findFirstOrElse(UtilityResources.getString(R.string.pallet_scale_bt_device_selection_info));
|
||||
listPref.setSummary(btDeviceName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
@@ -44,7 +45,6 @@ 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.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
@@ -56,12 +56,12 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||
import it.integry.integrywmsnative.databinding.ActivitySpedizioneBinding;
|
||||
import it.integry.integrywmsnative.gest.lista_bancali.ListaBancaliActivity;
|
||||
import it.integry.integrywmsnative.gest.spedizione.ui.SpedizioneListAdapter;
|
||||
import it.integry.integrywmsnative.gest.spedizione.ui.SpedizioneListModel;
|
||||
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.BaseDialogRowInfoView;
|
||||
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.gest.spedizione.ui.SpedizioneListAdapter;
|
||||
import it.integry.integrywmsnative.gest.spedizione.ui.SpedizioneListModel;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
@@ -192,9 +192,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
this.initBarcodeReader();
|
||||
this.initRecyclerView();
|
||||
|
||||
|
||||
String reportNameSpedizioneChiudiOrdine = SettingsManager.iDB().getReportNameSpedizionChiudiOrdine();
|
||||
closeOrderButtonEnabled.set(!UtilityString.isNullOrEmpty(reportNameSpedizioneChiudiOrdine));
|
||||
closeOrderButtonEnabled.set(SettingsManager.iDB().isFlagPrintEtichetteOnOrderClose() || SettingsManager.iDB().isFlagPrintPackingListOnOrderClose());
|
||||
|
||||
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
@@ -204,7 +202,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
boolean shouldAskPesoLU = SettingsManager.iDB().isFlagAskPesoColloSpedizione();
|
||||
boolean useQtaOrd = SettingsManager.iDB().isFlagSpedizioneUseQtaOrd();
|
||||
|
||||
if (!mEnableFakeGiacenza) this.onLoadingStarted();
|
||||
mViewmodel.init(
|
||||
codMdep,
|
||||
!mEnableFakeGiacenza,
|
||||
@@ -214,7 +211,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
mSitArtOrd,
|
||||
mTestateOrdini,
|
||||
mColliRegistrati,
|
||||
reportNameSpedizioneChiudiOrdine,
|
||||
mGestioneCol, mSegnoCol, mDefaultCausaleUL,
|
||||
mEnableQuantityReset,
|
||||
useQtaOrd);
|
||||
@@ -669,7 +665,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
|
||||
ArrayList<MtbColt> createdMtbColts = this.mViewmodel.getCreatedMtbColts();
|
||||
|
||||
Intent myIntent = ListaBancaliActivity.createIntent(this, createdMtbColts, true, PrinterRESTConsumer.Type.PRIMARIA, false);
|
||||
Intent myIntent = ListaBancaliActivity.createIntent(this, createdMtbColts, true, false);
|
||||
this.startActivityForResult(myIntent, PICK_UL_REQUEST);
|
||||
}
|
||||
|
||||
@@ -696,7 +692,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
this.addExtraItemsEnabled.set(false);
|
||||
noLUPresent.set(true);
|
||||
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null);
|
||||
closeOrderButtonEnabled.set(!UtilityString.isNullOrEmpty(SettingsManager.iDB().getReportNameSpedizionChiudiOrdine()));
|
||||
closeOrderButtonEnabled.set(SettingsManager.iDB().isFlagPrintEtichetteOnOrderClose() || SettingsManager.iDB().isFlagPrintPackingListOnOrderClose());
|
||||
|
||||
if (this.mShouldCloseActivity) super.onBackPressed();
|
||||
}
|
||||
@@ -811,23 +807,25 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
.setCanLUBeClosed(true)
|
||||
.setCanPartitaMagBeChanged(canPartitaMagBeChanged);
|
||||
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
|
||||
this.onLoadingStarted();
|
||||
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||
})
|
||||
.setOnAbort(() -> {
|
||||
this.mViewmodel.resetMatchedRows();
|
||||
})
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
this.onLoadingStarted();
|
||||
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||
})
|
||||
.setOnAbort(() -> {
|
||||
this.mViewmodel.resetMatchedRows();
|
||||
})
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
else Toast.makeText(this, "Dialog già a video", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,6 @@ import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLUException;
|
||||
import it.integry.integrywmsnative.core.exception.NoArtsFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.NoLUFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.NoPrintersFoundException;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||
import it.integry.integrywmsnative.core.exception.ScannedPositionNotExistException;
|
||||
import it.integry.integrywmsnative.core.expansion.AtomicBigDecimal;
|
||||
@@ -37,6 +36,7 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILUBaseOp
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILUPrintListener;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||
import it.integry.integrywmsnative.core.model.DtbOrdt;
|
||||
import it.integry.integrywmsnative.core.model.FiltroOrdineDTO;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
@@ -45,6 +45,7 @@ import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.report.ReportType;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
@@ -55,6 +56,7 @@ import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
@@ -91,7 +93,6 @@ public class SpedizioneViewModel {
|
||||
private boolean mEnableCheckPartitaMag;
|
||||
private boolean mCanOverflowOrderQuantity;
|
||||
private boolean mShouldAskPesoLU;
|
||||
private String mReportNameSpedizioneChiudiOrdine;
|
||||
private boolean mIsNewLU;
|
||||
private boolean mEnableQuantityReset;
|
||||
private boolean mUseQtaOrd;
|
||||
@@ -133,7 +134,6 @@ public class SpedizioneViewModel {
|
||||
List<SitArtOrdDTO> pickingList,
|
||||
List<OrdineUscitaInevasoDTO> testateOrdini,
|
||||
List<MtbColt> colliRegistrati,
|
||||
String reportNameSpedizioneChiudiOrdine,
|
||||
GestioneEnum gestioneCol,
|
||||
int segnoCol,
|
||||
Integer defaultCausaleUL,
|
||||
@@ -148,7 +148,6 @@ public class SpedizioneViewModel {
|
||||
this.mEnableCheckPartitaMag = enableCheckPartitaMag;
|
||||
this.mCanOverflowOrderQuantity = canOverflowOrderQuantity;
|
||||
this.mShouldAskPesoLU = shouldAskPesoLU;
|
||||
this.mReportNameSpedizioneChiudiOrdine = reportNameSpedizioneChiudiOrdine;
|
||||
this.mDefaultCausaleOfUL = defaultCausaleUL;
|
||||
this.mEnableQuantityReset = enableQuantityReset;
|
||||
this.mUseQtaOrd = useQtaOrd;
|
||||
@@ -210,9 +209,9 @@ public class SpedizioneViewModel {
|
||||
.distinct()
|
||||
.toList();
|
||||
|
||||
if (foundGestioni != null && foundGestioni.size() > 1) {
|
||||
if (foundGestioni.size() > 1) {
|
||||
return;
|
||||
} else if (foundGestioni != null && foundGestioni.size() == 1) {
|
||||
} else if (foundGestioni.size() == 1) {
|
||||
mDefaultGestioneOfUL = foundGestioni.get(0);
|
||||
} else {
|
||||
mDefaultGestioneOfUL = GestioneEnum.VENDITA;
|
||||
@@ -511,10 +510,15 @@ public class SpedizioneViewModel {
|
||||
if (!UtilityBarcode.isEtichettaAnonimaOfCurrentYear(barcodeScanDTO.getStringValue())) {
|
||||
this.sendError(new NotCurrentYearLUException());
|
||||
} else {
|
||||
int numCollo = -1;
|
||||
|
||||
this.createNewLU(
|
||||
UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO.getStringValue()),
|
||||
CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, onComplete);
|
||||
try {
|
||||
numCollo = UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO.getStringValue());
|
||||
this.createNewLU(numCollo,
|
||||
CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, onComplete);
|
||||
} catch (Exception ex) {
|
||||
this.sendError(ex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1722,26 +1726,25 @@ public class SpedizioneViewModel {
|
||||
if (!shouldPrint) {
|
||||
onComplete.run();
|
||||
} else {
|
||||
cyclicPrint(PrinterRESTConsumer.Type.PRIMARIA, mtbColtsToPrint.iterator(), onComplete, ex -> this.sendLUPrintError(ex, onComplete));
|
||||
cyclicPrint(mtbColtsToPrint.iterator(), onComplete, ex -> this.sendLUPrintError(ex, onComplete));
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void cyclicPrint(PrinterRESTConsumer.Type printerType, @NotNull Iterator<MtbColt> sourceMtbColts, Runnable onComplete, RunnableArgs<Exception> onAbort) {
|
||||
private void cyclicPrint(@NotNull Iterator<MtbColt> sourceMtbColts, Runnable onComplete, RunnableArgs<Exception> onAbort) {
|
||||
if (sourceMtbColts.hasNext()) {
|
||||
singlePrint(printerType, sourceMtbColts.next(), () -> {
|
||||
cyclicPrint(printerType, sourceMtbColts, onComplete, onAbort);
|
||||
singlePrint(sourceMtbColts.next(), () -> {
|
||||
cyclicPrint(sourceMtbColts, onComplete, onAbort);
|
||||
}, onAbort);
|
||||
} else {
|
||||
onComplete.run();
|
||||
}
|
||||
}
|
||||
|
||||
private void singlePrint(PrinterRESTConsumer.Type printerType, MtbColt mtbColtToPrint, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
private void singlePrint(MtbColt mtbColtToPrint, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
this.mPrinterRESTConsumer.printCollo(
|
||||
printerType,
|
||||
mtbColtToPrint,
|
||||
onComplete,
|
||||
onFailed);
|
||||
@@ -1752,7 +1755,7 @@ public class SpedizioneViewModel {
|
||||
this.sendOnLoadingStarted();
|
||||
this.mCurrentMtbColt = mtbColt;
|
||||
mMtbColtSessionID = this.mColliDataRecoverService.startNewSession(mtbColt, mTestateOrdini);
|
||||
|
||||
|
||||
this.mCurrentMtbColt.generaFiltroOrdineFromDTO(mDefaultFiltroOrdine);
|
||||
|
||||
this.mColliMagazzinoRESTConsumer.saveCollo(this.mCurrentMtbColt, savedMtbColt -> {
|
||||
@@ -1849,49 +1852,76 @@ public class SpedizioneViewModel {
|
||||
|
||||
public void closeOrder() {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
Runnable onComplete = () -> this.sendOnLoadingEnded();
|
||||
|
||||
this.mPrinterRESTConsumer.getAvailablePrinters(mDefaultCodMdep, PrinterRESTConsumer.Type.PRIMARIA, printerList -> {
|
||||
|
||||
if (printerList == null || printerList.size() == 0) {
|
||||
this.sendError(new NoPrintersFoundException());
|
||||
onComplete.run();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
cyclicPrintPackingList(
|
||||
this.mTestateOrdini.iterator(),
|
||||
printerList.get(0),
|
||||
onComplete,
|
||||
ex -> this.sendLUPrintError(ex, onComplete));
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
if (SettingsManager.iDB().isFlagPrintEtichetteOnOrderClose() || SettingsManager.iDB().isFlagPrintPackingListOnOrderClose()) {
|
||||
printClosedOrders(this.mTestateOrdini, this::sendOnLoadingEnded, ex -> this.sendLUPrintError(ex, this::sendOnLoadingEnded));
|
||||
}
|
||||
}
|
||||
|
||||
private void cyclicPrintPackingList(@NotNull Iterator<OrdineUscitaInevasoDTO> sourceTestateOrdineVenditaIterator, String printerName, Runnable onComplete, RunnableArgs<Exception> onAbort) {
|
||||
private void printClosedOrders(List<OrdineUscitaInevasoDTO> listOrdiniInevasi, Runnable onSuccess, RunnableArgs<Exception> onAbort) {
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
List<DtbOrdt> closedOrders = Stream.of(listOrdiniInevasi).map(ord -> {
|
||||
DtbOrdt ordV = new DtbOrdt();
|
||||
ordV.setDataOrd(ord.getDataOrdS())
|
||||
.setNumOrd(ord.getNumOrd())
|
||||
.setGestione(ord.getGestione())
|
||||
.setCodAnag(ord.getCodAnagOrd());
|
||||
return ordV;
|
||||
}).toList();
|
||||
|
||||
this.mPrinterRESTConsumer.printClosedOrders(
|
||||
closedOrders,
|
||||
SettingsManager.i().getUserSession().getDepo().getCodMdep(),
|
||||
onSuccess,
|
||||
onAbort);
|
||||
}
|
||||
|
||||
private void cyclicPrintPackingList(@NotNull Iterator<OrdineUscitaInevasoDTO> sourceTestateOrdineVenditaIterator, Runnable onComplete, RunnableArgs<Exception> onAbort) {
|
||||
if (sourceTestateOrdineVenditaIterator.hasNext()) {
|
||||
singlePrintPackingList(sourceTestateOrdineVenditaIterator.next(), printerName, () -> {
|
||||
cyclicPrintPackingList(sourceTestateOrdineVenditaIterator, printerName, onComplete, onAbort);
|
||||
singlePrintPackingList(sourceTestateOrdineVenditaIterator.next(), () -> {
|
||||
cyclicPrintPackingList(sourceTestateOrdineVenditaIterator, onComplete, onAbort);
|
||||
}, onAbort);
|
||||
} else {
|
||||
onComplete.run();
|
||||
}
|
||||
}
|
||||
|
||||
private void singlePrintPackingList(OrdineUscitaInevasoDTO ordineUscitaInevasoDTO, String printerName, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
private void cyclicPrintListEtichette(@NotNull Iterator<OrdineUscitaInevasoDTO> sourceTestateOrdineVenditaIterator, Runnable onComplete, RunnableArgs<Exception> onAbort) {
|
||||
if (sourceTestateOrdineVenditaIterator.hasNext()) {
|
||||
singlePrintListEtichette(sourceTestateOrdineVenditaIterator.next(), () -> {
|
||||
cyclicPrintListEtichette(sourceTestateOrdineVenditaIterator, onComplete, onAbort);
|
||||
}, onAbort);
|
||||
} else {
|
||||
onComplete.run();
|
||||
}
|
||||
}
|
||||
|
||||
private void singlePrintPackingList(OrdineUscitaInevasoDTO ordineUscitaInevasoDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
params.put("gestione", ordineUscitaInevasoDTO.getGestione());
|
||||
params.put("num_ord", ordineUscitaInevasoDTO.getNumOrd());
|
||||
params.put("data_ord", UtilityDate.formatDate(ordineUscitaInevasoDTO.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_DASH));
|
||||
|
||||
this.mPrinterRESTConsumer.printReport(
|
||||
printerName,
|
||||
this.mReportNameSpedizioneChiudiOrdine,
|
||||
this.mPrinterRESTConsumer.printReportType(
|
||||
ReportType.WMS_SPEDIZIONE_PACKING_LIST_ORD,
|
||||
SettingsManager.i().getUserSession().getDepo().getCodMdep(),
|
||||
ordineUscitaInevasoDTO.getCodAnagOrd(),
|
||||
params,
|
||||
onComplete,
|
||||
onFailed);
|
||||
|
||||
}
|
||||
|
||||
private void singlePrintListEtichette(OrdineUscitaInevasoDTO ordineUscitaInevasoDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
params.put("gestione", ordineUscitaInevasoDTO.getGestione());
|
||||
params.put("num_ord", ordineUscitaInevasoDTO.getNumOrd());
|
||||
params.put("data_ord", UtilityDate.formatDate(ordineUscitaInevasoDTO.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_DASH));
|
||||
|
||||
this.mPrinterRESTConsumer.printReportType(
|
||||
ReportType.WMS_SPEDIZIONE_ETICHETTE_SSCC_ORD,
|
||||
SettingsManager.i().getUserSession().getDepo().getCodMdep(),
|
||||
ordineUscitaInevasoDTO.getCodAnagOrd(),
|
||||
params,
|
||||
1,
|
||||
onComplete,
|
||||
onFailed);
|
||||
|
||||
|
||||
@@ -203,24 +203,26 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
||||
.setCanPartitaMagBeChanged(canBatchLotBeChanged)
|
||||
.setCanLUBeClosed(false);
|
||||
|
||||
this.requireActivity().runOnUiThread(() -> {
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
this.requireActivity().runOnUiThread(() -> {
|
||||
mDialogInputQuantityV2View
|
||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||
.setNumCnf(resultDTO.getNumCnf())
|
||||
.setQtaCnf(resultDTO.getQtaCnf())
|
||||
.setQtaTot(resultDTO.getQtaTot())
|
||||
.setPartitaMag(resultDTO.getPartitaMag())
|
||||
.setDataScad(resultDTO.getDataScad());
|
||||
|
||||
onComplete.run(pickedQuantityDTO);
|
||||
onComplete.run(pickedQuantityDTO);
|
||||
|
||||
})
|
||||
.setOnAbort(this::onLoadingEnded)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
})
|
||||
.setOnAbort(this::onLoadingEnded)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
else this.onLoadingEnded();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class InvalidNotesException extends Exception {
|
||||
|
||||
public InvalidNotesException() {
|
||||
super(UtilityResources.getString(R.string.empty_notes_input_message));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,6 +22,7 @@ import androidx.fragment.app.DialogFragment;
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.android.material.textfield.TextInputLayout;
|
||||
import com.harrysoft.androidbluetoothserial.SimpleBluetoothDeviceInterface;
|
||||
import com.pedromassango.doubleclick.DoubleClick;
|
||||
import com.pedromassango.doubleclick.DoubleClickListener;
|
||||
|
||||
@@ -52,10 +53,13 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
@Inject
|
||||
DialogInputLUProdViewModel mViewModel;
|
||||
|
||||
private final SimpleBluetoothDeviceInterface mBluetoothDeviceInterface;
|
||||
private final DialogInputLUProdDTO mDialogInputLUProdDTO;
|
||||
private final RunnableArgs<DialogInputLUProdResultDTO> mOnComplete;
|
||||
private final Runnable mOnAbort;
|
||||
|
||||
public ObservableField<Boolean> enabledBluetoothDevice = new ObservableField<>();
|
||||
|
||||
public ObservableField<String> selectedMtbTcol = new ObservableField<>();
|
||||
public ObservableField<DialogInputLUProdTipoColloListModel> currentMtbTCol = new ObservableField<>();
|
||||
|
||||
@@ -87,13 +91,14 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
private DialogInputLUProdTipoColloAdapter codTcolArrayAdapter = null;
|
||||
private DialogInputLULineeProdAdapter lineeProdArrayAdapter = null;
|
||||
|
||||
public static DialogInputLUProdView newInstance(@NotNull DialogInputLUProdDTO dialogInputLUProdDTO, @NotNull RunnableArgs<DialogInputLUProdResultDTO> onComplete, @NotNull Runnable onAbort) {
|
||||
return new DialogInputLUProdView(dialogInputLUProdDTO, onComplete, onAbort);
|
||||
public static DialogInputLUProdView newInstance(SimpleBluetoothDeviceInterface bluetoothDeviceInterface, @NotNull DialogInputLUProdDTO dialogInputLUProdDTO, @NotNull RunnableArgs<DialogInputLUProdResultDTO> onComplete, @NotNull Runnable onAbort) {
|
||||
return new DialogInputLUProdView(bluetoothDeviceInterface, dialogInputLUProdDTO, onComplete, onAbort);
|
||||
}
|
||||
|
||||
private DialogInputLUProdView(@NotNull DialogInputLUProdDTO dialogInputLUProdDTO, @NotNull RunnableArgs<DialogInputLUProdResultDTO> onComplete, @NotNull Runnable onAbort) {
|
||||
private DialogInputLUProdView(SimpleBluetoothDeviceInterface bluetoothDeviceInterface, @NotNull DialogInputLUProdDTO dialogInputLUProdDTO, @NotNull RunnableArgs<DialogInputLUProdResultDTO> onComplete, @NotNull Runnable onAbort) {
|
||||
super();
|
||||
|
||||
this.mBluetoothDeviceInterface = bluetoothDeviceInterface;
|
||||
this.mDialogInputLUProdDTO = dialogInputLUProdDTO;
|
||||
this.mOnComplete = onComplete;
|
||||
this.mOnAbort = onAbort;
|
||||
@@ -104,7 +109,6 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setStyle(DialogFragment.STYLE_NORMAL, R.style.AppTheme_NewMaterial_Dialog_FullscreenDialog);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +146,13 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
super.onStart();
|
||||
this.init();
|
||||
|
||||
|
||||
if(mBluetoothDeviceInterface != null) {
|
||||
// Listen to bluetooth events
|
||||
mBluetoothDeviceInterface.setListeners(this::onMessageReceived, this::onMessageSent, x -> this.onError(new Exception(x)));
|
||||
enabledBluetoothDevice.set(true);
|
||||
}
|
||||
|
||||
this.mViewModel.setListener(this);
|
||||
this.mViewModel.init(mDialogInputLUProdDTO.getCodJfasParent());
|
||||
}
|
||||
@@ -166,7 +177,7 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
});
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.currentMtbTCol, (value) -> {
|
||||
this.currentTaraPed.set(value.getOriginalModel().getTaraKg());
|
||||
this.currentTaraPed.set(value.getOriginalModel().getPesoKg());
|
||||
});
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.selectedLineaProd, (value) -> {
|
||||
@@ -385,10 +396,37 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
this.onDataChanged();
|
||||
}
|
||||
|
||||
public void readWeightFromDevice() {
|
||||
// Toast.makeText(requireActivity(), "Leggo peso uaglio", Toast.LENGTH_SHORT).show();
|
||||
|
||||
// Let's send a message:
|
||||
mBluetoothDeviceInterface.sendMessage("GW\r");
|
||||
}
|
||||
|
||||
private void onMessageSent(String request) {
|
||||
// Toast.makeText(requireActivity(), "Aspitt nu mument", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
private void onMessageReceived(String response) {
|
||||
// Toast.makeText(requireActivity(), "Ne awa: " + response, Toast.LENGTH_SHORT).show();
|
||||
|
||||
String tmpResp = response.replace(".", "");
|
||||
|
||||
BigDecimal grossWeight = new BigDecimal(tmpResp.substring(2,7));
|
||||
BigDecimal netWeight = new BigDecimal(tmpResp.substring(8,13));
|
||||
|
||||
mViewModel.setPesoNetto(netWeight);
|
||||
mViewModel.setPesoLordo(grossWeight);
|
||||
}
|
||||
|
||||
|
||||
public void save() {
|
||||
if (this.mViewModel.validate()) {
|
||||
this.mOnComplete.run(this.mViewModel.getResult());
|
||||
|
||||
if(mBluetoothDeviceInterface != null)
|
||||
mBluetoothDeviceInterface.setListeners(null, null, null);
|
||||
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,8 +158,8 @@ public class DialogInputLUProdViewModel {
|
||||
this.mListener.onDataChanged();
|
||||
}
|
||||
|
||||
public void setPesoNetto(BigDecimal qtaTot) {
|
||||
this.internalPesoNetto = qtaTot;
|
||||
public void setPesoNetto(BigDecimal pesoNetto) {
|
||||
this.internalPesoNetto = pesoNetto;
|
||||
}
|
||||
|
||||
public void setTaraPed(BigDecimal taraPed) {
|
||||
|
||||
@@ -30,13 +30,14 @@ public class DialogInputQuantityV2DTO {
|
||||
private boolean canPartitaMagBeChanged = true;
|
||||
private boolean isDataScadMandatory = false;
|
||||
private boolean isNotesAllowed = false;
|
||||
private boolean isNotesMandatory = false;
|
||||
private boolean canLUBeClosed;
|
||||
private boolean saveOnImeDone = false;
|
||||
|
||||
private String partitaMag;
|
||||
private String note;
|
||||
private Date dataScad;
|
||||
private RunnableArgsWithReturn<DialogInputQuantityV2ViewModel,String> suggestPartitaMag;
|
||||
private RunnableArgsWithReturn<DialogInputQuantityV2ViewModel, String> suggestPartitaMag;
|
||||
|
||||
private boolean canOverflowOrderQuantity;
|
||||
|
||||
@@ -217,7 +218,7 @@ public class DialogInputQuantityV2DTO {
|
||||
}
|
||||
|
||||
public boolean isDataScadMandatory() {
|
||||
return isDataScadMandatory ;
|
||||
return isDataScadMandatory;
|
||||
}
|
||||
|
||||
public boolean isNotesAllowed() {
|
||||
@@ -229,6 +230,15 @@ public class DialogInputQuantityV2DTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isNotesMandatory() {
|
||||
return isNotesMandatory;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2DTO setNotesMandatory(boolean notesMandatory) {
|
||||
isNotesMandatory = notesMandatory;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RunnableArgsWithReturn<DialogInputQuantityV2ViewModel, String> getSuggestPartitaMag() {
|
||||
return suggestPartitaMag;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
|
||||
private DialogInputQuantityV2Binding mBindings;
|
||||
private boolean mEnableDataCallback = true;
|
||||
private boolean mObservablesInitated = false;
|
||||
|
||||
private int mBarcodeScannerIstanceID;
|
||||
private boolean mFirstStart = true;
|
||||
@@ -143,6 +144,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
.setQtaCnfAvailable(mDialogInputQuantityV2DTO.getQtaCnfAvailable())
|
||||
.setPartitaMag(mDialogInputQuantityV2DTO.getPartitaMag())
|
||||
.setNote(mDialogInputQuantityV2DTO.getNote())
|
||||
.setIsNoteMandatory(mDialogInputQuantityV2DTO.isNotesMandatory())
|
||||
.setSuggestPartitaMagRunnable(mDialogInputQuantityV2DTO.getSuggestPartitaMag())
|
||||
.setDataScad(mDialogInputQuantityV2DTO.getDataScad());
|
||||
|
||||
@@ -202,7 +204,6 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
|
||||
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||
if (mAbort) this.mOnAbort.run();
|
||||
super.onDismiss(dialog);
|
||||
@@ -223,7 +224,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
this.mViewModel.init(onNumCnfInputChanged);
|
||||
}
|
||||
|
||||
private void init() {
|
||||
private void initObservables() {
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.currentPartitaMag, (value) -> {
|
||||
if (this.mEnableDataCallback) {
|
||||
@@ -346,6 +347,14 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
}
|
||||
});
|
||||
|
||||
mObservablesInitated = true;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
|
||||
if (!mObservablesInitated) {
|
||||
initObservables();
|
||||
}
|
||||
//Init double taps
|
||||
this.mBindings.inputNumCnfText.setOnClickListener(new DoubleClick(new DoubleClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -18,6 +18,7 @@ import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.view.dialogs.exception.InvalidBatchLotException;
|
||||
import it.integry.integrywmsnative.view.dialogs.exception.InvalidExpireDateException;
|
||||
import it.integry.integrywmsnative.view.dialogs.exception.InvalidNotesException;
|
||||
import it.integry.integrywmsnative.view.dialogs.exception.InvalidQtaCnfQuantityException;
|
||||
import it.integry.integrywmsnative.view.dialogs.exception.InvalidQuantityException;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.OverflowNumCnfAvailableQuantityException;
|
||||
@@ -50,6 +51,7 @@ public class DialogInputQuantityV2ViewModel {
|
||||
|
||||
public Boolean shouldAskDataScad;
|
||||
public Boolean shouldShowDataScad;
|
||||
public Boolean isNoteMandatory;
|
||||
|
||||
private BigDecimal initialNumCnf;
|
||||
private BigDecimal initialQtaCnf;
|
||||
@@ -403,7 +405,8 @@ public class DialogInputQuantityV2ViewModel {
|
||||
this.mListener.onError(new InvalidQtaCnfQuantityException());
|
||||
return false;
|
||||
|
||||
} else if (mtbAart.get().isFlagTracciabilitaBoolean() && UtilityString.isNullOrEmpty(internalPartitaMag)) {
|
||||
}
|
||||
if (mtbAart.get().isFlagTracciabilitaBoolean() && UtilityString.isNullOrEmpty(internalPartitaMag)) {
|
||||
if (suggestPartitaMagRunnable != null) {
|
||||
internalPartitaMag = suggestPartitaMagRunnable.run(this);
|
||||
if (internalPartitaMag == null) {
|
||||
@@ -415,38 +418,45 @@ public class DialogInputQuantityV2ViewModel {
|
||||
return false;
|
||||
}
|
||||
|
||||
} else if (this.shouldAskDataScad && UtilityString.isNullOrEmpty(internalPartitaMag)) {
|
||||
}
|
||||
if (this.shouldAskDataScad && UtilityString.isNullOrEmpty(internalPartitaMag)) {
|
||||
|
||||
this.mListener.onError(new InvalidBatchLotException());
|
||||
return false;
|
||||
|
||||
} else if (this.shouldAskDataScad && this.internalDataScad == null) {
|
||||
}
|
||||
if (this.shouldAskDataScad && this.internalDataScad == null) {
|
||||
|
||||
this.mListener.onError(new InvalidExpireDateException());
|
||||
return false;
|
||||
|
||||
} else if (!this.canOverflowOrderQuantity && UtilityBigDecimal.greaterThan(this.internalQtaTot, this.totalQtaOrd) &&
|
||||
}
|
||||
if (!this.canOverflowOrderQuantity && UtilityBigDecimal.greaterThan(this.internalQtaTot, this.totalQtaOrd) &&
|
||||
this.mtbAart.get().isFlagQtaCnfFissaBoolean()) {
|
||||
|
||||
this.mListener.onError(new OverflowQtaTotOrderedQuantityException());
|
||||
return false;
|
||||
|
||||
} else if (!this.canOverflowOrderQuantity && UtilityBigDecimal.greaterThan(this.internalNumCnf, this.totalNumCnfOrd)) {
|
||||
}
|
||||
if (!this.canOverflowOrderQuantity && UtilityBigDecimal.greaterThan(this.internalNumCnf, this.totalNumCnfOrd)) {
|
||||
|
||||
this.mListener.onError(new OverflowNumCnfOrderedQuantityException());
|
||||
return false;
|
||||
|
||||
} else if (UtilityBigDecimal.greaterThan(this.internalQtaTot, this.totalQtaAvailable)) {
|
||||
}
|
||||
if (UtilityBigDecimal.greaterThan(this.internalQtaTot, this.totalQtaAvailable)) {
|
||||
|
||||
this.mListener.onError(new OverflowQtaTotAvailableQuantityException());
|
||||
return false;
|
||||
|
||||
} else if (UtilityBigDecimal.greaterThan(this.internalNumCnf, this.totalNumCnfAvailable)) {
|
||||
}
|
||||
if (UtilityBigDecimal.greaterThan(this.internalNumCnf, this.totalNumCnfAvailable)) {
|
||||
|
||||
this.mListener.onError(new OverflowNumCnfAvailableQuantityException());
|
||||
return false;
|
||||
|
||||
} else if (this.internalNumCnf == null || this.internalQtaCnf == null || this.internalQtaTot == null ||
|
||||
}
|
||||
if (this.internalNumCnf == null || this.internalQtaCnf == null || this.internalQtaTot == null ||
|
||||
UtilityBigDecimal.equalsOrLowerThan(this.internalNumCnf, BigDecimal.ZERO) ||
|
||||
UtilityBigDecimal.equalsOrLowerThan(this.internalQtaCnf, BigDecimal.ZERO) ||
|
||||
UtilityBigDecimal.equalsOrLowerThan(this.internalQtaTot, BigDecimal.ZERO)) {
|
||||
@@ -455,6 +465,10 @@ public class DialogInputQuantityV2ViewModel {
|
||||
return false;
|
||||
|
||||
}
|
||||
if (this.isNoteMandatory() && (this.internalNote == null || this.internalNote.length() <= 0)) {
|
||||
this.mListener.onError(new InvalidNotesException());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(this.internalPartitaMag))
|
||||
this.internalPartitaMag = this.internalPartitaMag.toUpperCase();
|
||||
@@ -486,6 +500,14 @@ public class DialogInputQuantityV2ViewModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean isNoteMandatory() {
|
||||
return isNoteMandatory;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2ViewModel setIsNoteMandatory(Boolean noteMandatory) {
|
||||
isNoteMandatory = noteMandatory;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbAart getMtbAart() {
|
||||
return this.mtbAart.get();
|
||||
|
||||
@@ -110,7 +110,7 @@ public class DialogScanArtView extends BaseDialogFragment implements DialogScanA
|
||||
|
||||
var filteredMtbColrList = mtbColrList;
|
||||
|
||||
if (mtbAart != null) {
|
||||
if (mtbAart != null && filteredMtbColrList != null) {
|
||||
filteredMtbColrList = Stream.of(filteredMtbColrList)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(mtbAart.getCodMart()))
|
||||
.toList();
|
||||
|
||||
BIN
app/src/main/res/drawable/ic_scale.png
Normal file
BIN
app/src/main/res/drawable/ic_scale.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 889 B |
@@ -65,6 +65,18 @@
|
||||
android:src="@drawable/ic_erase_96"
|
||||
android:tint="@android:color/white" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/read_weight_form_device"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="end"
|
||||
android:adjustViewBounds="true"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:onClick="@{() -> view.readWeightFromDevice()}"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_scale"
|
||||
android:tint="@android:color/white" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
|
||||
@@ -52,6 +52,18 @@
|
||||
android:onClick="@{() -> view.resetValues()}"
|
||||
android:tint="@android:color/white"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/read_weight_form_device"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="end"
|
||||
android:adjustViewBounds="true"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:onClick="@{() -> view.readWeightFromDevice()}"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_scale"
|
||||
android:tint="@android:color/white" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
<string name="reset">Resetta</string>
|
||||
<string name="dispatched_abbr">Evasi</string>
|
||||
<string name="logistic_unit">UL</string>
|
||||
<string name="pallet_scale">Bilancia UL</string>
|
||||
<string name="pallet_scale_bt_device_selection_title">Dispositivo bluetooth</string>
|
||||
<string name="pallet_scale_bt_device_selection_info">Seleziona un dispositivo bluetooth già associato</string>
|
||||
|
||||
<string name="permission_request_message">Questi permessi sono necessari al funzionamento dell\'app</string>
|
||||
<string name="picking_not_available">Picking non disponibile</string>
|
||||
@@ -175,6 +178,7 @@
|
||||
<string name="invalid_production_line_error_message"><![CDATA[<b>Linea di produzione</b> non valida]]></string>
|
||||
<string name="expire_date_error_message"><![CDATA[La <b>data di scadenza</b> inserita non è valida]]></string>
|
||||
<string name="batch_lot_error_message"><![CDATA[Il <b>lotto</b> inserito non è valido]]></string>
|
||||
<string name="empty_notes_input_message"><![CDATA[Il <b>campo note</b> deve essere compilato per il modulo corrente.]]></string>
|
||||
<string name="settings_category">Impostazioni</string>
|
||||
<string name="check_box_preference_title">Check box</string>
|
||||
<string name="check_box_preference_summary">This is a regular preference</string>
|
||||
|
||||
@@ -81,6 +81,9 @@
|
||||
<string name="dialog_input_peso_lu_description">Insert info about LU TYPE and NET / GROSS weight</string>
|
||||
<string name="info">Info</string>
|
||||
<string name="lu_info">LU\'s info</string>
|
||||
<string name="pallet_scale">Pallet scale</string>
|
||||
<string name="pallet_scale_bt_device_selection_title">Bluetooth device</string>
|
||||
<string name="pallet_scale_bt_device_selection_info">Please select a paired bluetooth device</string>
|
||||
|
||||
<string name="action_continue">Continue</string>
|
||||
|
||||
@@ -175,6 +178,7 @@
|
||||
<string name="invalid_production_line_error_message"><![CDATA[Invalid <b>production line</b>]]></string>
|
||||
<string name="expire_date_error_message"><![CDATA[The inserted <b>expire date</b> is not valid, please check it.]]></string>
|
||||
<string name="batch_lot_error_message"><![CDATA[The inserted <b>batch lot</b> is not valid, please check it.]]></string>
|
||||
<string name="empty_notes_input_message"><![CDATA[The <b>notes field</b> requires to be filled in for the current form.]]></string>
|
||||
<string name="settings_category">Settings</string>
|
||||
<string name="check_box_preference_title">Check box</string>
|
||||
<string name="check_box_preference_summary">This is a regular preference</string>
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
<androidx.preference.PreferenceScreen
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<androidx.preference.PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
app:title="@string/accettazione_title_fragment"/>
|
||||
app:title="@string/accettazione_title_fragment"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="picking_ingresso_enable_sec_unt_mis"
|
||||
app:title="Abilita seconda unità di misura"
|
||||
app:defaultValue="true"/>
|
||||
<SwitchPreferenceCompat
|
||||
app:iconSpaceReserved="false"
|
||||
app:defaultValue="true"
|
||||
app:key="picking_ingresso_enable_sec_unt_mis"
|
||||
app:singleLineTitle="false"
|
||||
app:title="Abilita seconda unità di misura" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
app:title="@string/vendita_title_fragment"/>
|
||||
app:title="@string/vendita_title_fragment"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="picking_uscita_enable_quantity_reset"
|
||||
app:title="Resetta le quantità ad ogni Chiudi UL"
|
||||
app:defaultValue="true"/>
|
||||
<SwitchPreferenceCompat
|
||||
app:iconSpaceReserved="false"
|
||||
app:defaultValue="true"
|
||||
app:singleLineTitle="false"
|
||||
app:key="picking_uscita_enable_quantity_reset"
|
||||
app:title="Resetta le quantità ad ogni Chiudi UL" />
|
||||
|
||||
<!-- <Preference-->
|
||||
<!-- app:key="feedback"-->
|
||||
<!-- app:title="Send feedback"-->
|
||||
<!-- app:summary="Report technical issues or suggest new features"/>-->
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
app:title="@string/pallet_scale"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<!-- <ListPreference-->
|
||||
<!-- app:key="check_in_printer"-->
|
||||
<!-- app:title="@string/check_in_printer"-->
|
||||
<!-- app:summary="%s"-->
|
||||
<!-- app:entries="@array/printerTypes"-->
|
||||
<!-- app:entryValues="@array/printerTypes"-->
|
||||
<!-- app:defaultValue="0" />-->
|
||||
<ListPreference
|
||||
app:iconSpaceReserved="false"
|
||||
app:dialogTitle="@string/pallet_scale"
|
||||
app:key="pallet_scale_bt_device"
|
||||
app:summary="@string/pallet_scale_bt_device_selection_info"
|
||||
app:title="@string/pallet_scale_bt_device_selection_title" />
|
||||
|
||||
<!-- <ListPreference-->
|
||||
<!-- app:key="check_out_printer"-->
|
||||
<!-- app:title="@string/check_out_printer"-->
|
||||
<!-- app:summary="%s"-->
|
||||
<!-- app:entries="@array/printerTypes"-->
|
||||
<!-- app:entryValues="@array/printerTypes"-->
|
||||
<!-- app:defaultValue="0" />-->
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
@@ -22,11 +22,11 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -10,7 +10,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||
classpath 'com.android.tools.build:gradle:7.1.3'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.google.gms:google-services:4.3.10'
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
BIN
ext_sources/ICONS/icons8-bilancia-96.png
Normal file
BIN
ext_sources/ICONS/icons8-bilancia-96.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 889 B |
@@ -22,10 +22,10 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -22,10 +22,10 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -21,10 +21,10 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -21,10 +21,10 @@ android {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
Reference in New Issue
Block a user