Rimossa parte delle dynamic feature
This commit is contained in:
2
.idea/runConfigurations/app_base.xml
generated
2
.idea/runConfigurations/app_base.xml
generated
@@ -14,6 +14,8 @@
|
|||||||
<option name="MODE" value="default_activity" />
|
<option name="MODE" value="default_activity" />
|
||||||
<option name="CLEAR_LOGCAT" value="true" />
|
<option name="CLEAR_LOGCAT" value="true" />
|
||||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
||||||
|
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
|
||||||
|
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||||
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
|
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
|
||||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||||
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||||
|
|||||||
2
.idea/runConfigurations/app_vglimenti.xml
generated
2
.idea/runConfigurations/app_vglimenti.xml
generated
@@ -14,6 +14,8 @@
|
|||||||
<option name="MODE" value="default_activity" />
|
<option name="MODE" value="default_activity" />
|
||||||
<option name="CLEAR_LOGCAT" value="true" />
|
<option name="CLEAR_LOGCAT" value="true" />
|
||||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
||||||
|
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
|
||||||
|
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||||
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
|
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
|
||||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||||
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||||
|
|||||||
@@ -86,9 +86,6 @@ android {
|
|||||||
options.compilerArgs << "-Xmaxerrs" << "10000"
|
options.compilerArgs << "-Xmaxerrs" << "10000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dynamicFeatures = [":dynamic__base", ":dynamic_vgalimenti"]
|
|
||||||
lint {
|
lint {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityHashMap;
|
|
||||||
|
|
||||||
public class BaseCustomConfiguration implements ICustomConfiguration {
|
|
||||||
|
|
||||||
|
|
||||||
public static class Keys {
|
|
||||||
public static int FLAG_SHOW_COD_FORN_IN_SPEDIZIONE = 1;
|
|
||||||
public static int CUSTOM_DYNAMIC_VERSION_PATH = 2;
|
|
||||||
public static int FLAG_SPEDIZIONE_GROUP_BY_GRP_MERC = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected HashMap<Integer, Object> configurations = new HashMap<>() {{
|
|
||||||
put(Keys.FLAG_SHOW_COD_FORN_IN_SPEDIZIONE, true);
|
|
||||||
put(Keys.FLAG_SPEDIZIONE_GROUP_BY_GRP_MERC, false);
|
|
||||||
}};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> T getConfig(int key) {
|
|
||||||
return UtilityHashMap.getValue(configurations, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.util.Pair;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ClassRouter {
|
|
||||||
|
|
||||||
public enum PATH {
|
|
||||||
CUSTOM_CONFIGURATION,
|
|
||||||
BARCODE_CUSTOMIZATION
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Context context;
|
|
||||||
|
|
||||||
private static List<Pair<PATH, Object>> mRouteClasses = new ArrayList<>();
|
|
||||||
|
|
||||||
public static void init() {
|
|
||||||
// ClassRouter.context = context;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean checkIClassExists(PATH path) {
|
|
||||||
boolean methodAlreadyDeclared = false;
|
|
||||||
|
|
||||||
for(int i = 0; i < mRouteClasses.size() && !methodAlreadyDeclared; i++) {
|
|
||||||
if(mRouteClasses.get(i).first == path) methodAlreadyDeclared = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return methodAlreadyDeclared;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private static int getClassIndex(PATH path) {
|
|
||||||
for(int i = 0; i < mRouteClasses.size(); i++) {
|
|
||||||
if(mRouteClasses.get(i).first == path) return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void registerPath(PATH path, Class clazz) {
|
|
||||||
if(checkIClassExists(path)) {
|
|
||||||
//throw new MethodPathAlreadyDeclaredException(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
mRouteClasses.add(new Pair<>(path, clazz.newInstance()));
|
|
||||||
} catch (IllegalAccessException | InstantiationException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void deregisterPath(PATH path) {
|
|
||||||
if(checkIClassExists(path)) {
|
|
||||||
mRouteClasses.remove(getClassIndex(path));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static <T> T getInstance(PATH path) {
|
|
||||||
try {
|
|
||||||
|
|
||||||
if (!checkIClassExists(path)) {
|
|
||||||
// throw new MethodPathNotRegisteredException(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
Object instance = mRouteClasses.get(getClassIndex(path)).second;
|
|
||||||
|
|
||||||
return (T)instance;
|
|
||||||
|
|
||||||
} catch (Exception ex) {
|
|
||||||
// UtilityExceptions.defaultException(null, ex, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.exceptions;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
|
||||||
|
|
||||||
public class MethodPathNotRegisteredException extends Exception {
|
|
||||||
|
|
||||||
public MethodPathNotRegisteredException(ClassRouter.PATH path) {
|
|
||||||
super(String.format("Path %s is not registered", path.toString()));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.interfaces;
|
|
||||||
|
|
||||||
public interface IBarcodeCustomization {
|
|
||||||
|
|
||||||
boolean shouldForceToEan13(String barcode);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.interfaces;
|
|
||||||
|
|
||||||
public interface ICustomConfiguration {
|
|
||||||
|
|
||||||
<T>T getConfig(int key);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.interfaces;
|
|
||||||
|
|
||||||
public interface IFiltroOrdiniVendita {
|
|
||||||
|
|
||||||
boolean shoudShowCodMdepFilter();
|
|
||||||
|
|
||||||
boolean shoudShowIdViaggioFilter();
|
|
||||||
|
|
||||||
boolean shoudShowAgenteFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.interfaces;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
|
||||||
|
|
||||||
public interface OrdiniVenditaInterface {
|
|
||||||
|
|
||||||
boolean isTrasfOrder(List<OrdineUscitaInevasoDTO> testateOrdini);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -6,13 +6,11 @@ import android.text.SpannableString;
|
|||||||
import android.text.Spanned;
|
import android.text.Spanned;
|
||||||
import android.text.SpannedString;
|
import android.text.SpannedString;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.net.ConnectException;
|
import java.net.ConnectException;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
|
||||||
import it.integry.integrywmsnative.core.data_store.db.AppDatabase;
|
import it.integry.integrywmsnative.core.data_store.db.AppDatabase;
|
||||||
import it.integry.integrywmsnative.core.menu.MenuService;
|
import it.integry.integrywmsnative.core.menu.MenuService;
|
||||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||||
@@ -44,8 +42,7 @@ public class MainContext {
|
|||||||
|
|
||||||
this.initDBData(() -> {
|
this.initDBData(() -> {
|
||||||
this.initMenu(() -> {
|
this.initMenu(() -> {
|
||||||
|
|
||||||
this.initReflections();
|
|
||||||
if (mListener != null) mListener.onContextInitialized();
|
if (mListener != null) mListener.onContextInitialized();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -103,30 +100,6 @@ public class MainContext {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initReflections() {
|
|
||||||
ClassRouter.init();
|
|
||||||
|
|
||||||
try {
|
|
||||||
String initMethod = "init";
|
|
||||||
|
|
||||||
Class dynamicContextClass = Class.forName("it.integry.wms.dynamic_customization.DynamicContext");
|
|
||||||
|
|
||||||
Method[] methods = dynamicContextClass.getMethods();
|
|
||||||
for (Method m : methods) {
|
|
||||||
if (initMethod.equals(m.getName())) {
|
|
||||||
// for static methods we can use null as instance of class
|
|
||||||
final Object newInstance = dynamicContextClass.newInstance();
|
|
||||||
|
|
||||||
m.invoke(newInstance, applicationContext);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
// UtilityExceptions.defaultException(mContext, e, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public MainContext setListener(Listener listener) {
|
public MainContext setListener(Listener listener) {
|
||||||
this.mListener = listener;
|
this.mListener = listener;
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
|||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.IBarcodeCustomization;
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||||
@@ -18,15 +16,6 @@ public class BarcodeRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
public void decodeEan128(BarcodeScanDTO barcodeObj, RunnableArgs<Ean128Model> onComplete, RunnableArgs<Exception> onFailed) {
|
public void decodeEan128(BarcodeScanDTO barcodeObj, RunnableArgs<Ean128Model> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
IBarcodeCustomization barcodeCustomization = ClassRouter.getInstance(ClassRouter.PATH.BARCODE_CUSTOMIZATION);
|
|
||||||
|
|
||||||
if (barcodeCustomization != null && barcodeCustomization.shouldForceToEan13(barcodeObj.getStringValue())) {
|
|
||||||
Ean128Model ean128Model = new Ean128Model();
|
|
||||||
ean128Model.Gtin = barcodeObj.getStringValue();
|
|
||||||
onComplete.run(ean128Model);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String ean128 = barcodeObj.getStringValue().replaceAll("" + ((char) 29), "|");
|
String ean128 = barcodeObj.getStringValue().replaceAll("" + ((char) 29), "|");
|
||||||
|
|
||||||
BarcodeRESTConsumerService barcodeRESTConsumerService = RESTBuilder.getService(BarcodeRESTConsumerService.class);
|
BarcodeRESTConsumerService barcodeRESTConsumerService = RESTBuilder.getService(BarcodeRESTConsumerService.class);
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ public class DBSettingsModel {
|
|||||||
private String codDtipOrdTrasfV;
|
private String codDtipOrdTrasfV;
|
||||||
private boolean notifyLotStatus = false;
|
private boolean notifyLotStatus = false;
|
||||||
|
|
||||||
|
private boolean groupShippingByCommodityGroup = true;
|
||||||
|
private boolean showCodFornSpedizione = true;
|
||||||
|
|
||||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||||
return flagSpedizioneEnableFakeGiacenza;
|
return flagSpedizioneEnableFakeGiacenza;
|
||||||
}
|
}
|
||||||
@@ -386,4 +389,22 @@ public class DBSettingsModel {
|
|||||||
this.notifyLotStatus = notifyLotStatus;
|
this.notifyLotStatus = notifyLotStatus;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isGroupShippingByCommodityGroup() {
|
||||||
|
return groupShippingByCommodityGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setGroupShippingByCommodityGroup(boolean groupShippingByCommodityGroup) {
|
||||||
|
this.groupShippingByCommodityGroup = groupShippingByCommodityGroup;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isShowCodFornSpedizione() {
|
||||||
|
return showCodFornSpedizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setShowCodFornSpedizione(boolean showCodFornSpedizione) {
|
||||||
|
this.showCodFornSpedizione = showCodFornSpedizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -341,6 +341,14 @@ public class SettingsManager {
|
|||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_NOTIFICA_STATO_PARTITA"));
|
.setKeySection("FLAG_NOTIFICA_STATO_PARTITA"));
|
||||||
|
stbGestSetupList.add(new StbGestSetup()
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("SPEDIZIONE")
|
||||||
|
.setKeySection("FLAG_SHOW_COD_FORN"));
|
||||||
|
stbGestSetupList.add(new StbGestSetup()
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("SPEDIZIONE")
|
||||||
|
.setKeySection("FLAG_GROUP_BY_GRP_MERC"));
|
||||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||||
|
|
||||||
mGestSetupRESTConsumer.getValues(codMdep, stbGestSetupList, list -> {
|
mGestSetupRESTConsumer.getValues(codMdep, stbGestSetupList, list -> {
|
||||||
@@ -372,6 +380,8 @@ public class SettingsManager {
|
|||||||
dbSettingsModelIstance.setFilterFornitoreProd(getValueFromList(list, "PRODUZIONE", "FILTER_FORNTIORE_PROD", String.class));
|
dbSettingsModelIstance.setFilterFornitoreProd(getValueFromList(list, "PRODUZIONE", "FILTER_FORNTIORE_PROD", String.class));
|
||||||
dbSettingsModelIstance.setCodDtipOrdTrasfV(getValueFromList(list, "SPEDIZIONE", "COD_DTIP_ORD_TRASF", String.class));
|
dbSettingsModelIstance.setCodDtipOrdTrasfV(getValueFromList(list, "SPEDIZIONE", "COD_DTIP_ORD_TRASF", String.class));
|
||||||
dbSettingsModelIstance.setNotifyLotStatus(getValueFromList(list, "SPEDIZIONE", "FLAG_NOTIFICA_STATO_PARTITA", Boolean.class));
|
dbSettingsModelIstance.setNotifyLotStatus(getValueFromList(list, "SPEDIZIONE", "FLAG_NOTIFICA_STATO_PARTITA", Boolean.class));
|
||||||
|
dbSettingsModelIstance.setShowCodFornSpedizione(getValueFromList(list, "SPEDIZIONE", "FLAG_SHOW_COD_FORN", Boolean.class, Boolean.TRUE));
|
||||||
|
dbSettingsModelIstance.setGroupShippingByCommodityGroup(getValueFromList(list, "SPEDIZIONE", "FLAG_GROUP_BY_GRP_MERC", Boolean.class, Boolean.FALSE));
|
||||||
|
|
||||||
String notePerdita = getValueFromList(list, "DOC_INTERNI", "NOTE_PERDITA", String.class);
|
String notePerdita = getValueFromList(list, "DOC_INTERNI", "NOTE_PERDITA", String.class);
|
||||||
if (notePerdita != null)
|
if (notePerdita != null)
|
||||||
@@ -392,6 +402,10 @@ public class SettingsManager {
|
|||||||
|
|
||||||
|
|
||||||
public static <T> T getValueFromList(List<StbGestSetup> stbGestSetupList, String section, String keySectionName, Class<T> clazz) {
|
public static <T> T getValueFromList(List<StbGestSetup> stbGestSetupList, String section, String keySectionName, Class<T> clazz) {
|
||||||
|
return getValueFromList(stbGestSetupList, section, keySectionName, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> T getValueFromList(List<StbGestSetup> stbGestSetupList, String section, String keySectionName, Class<T> clazz, T defaultValue) {
|
||||||
|
|
||||||
StbGestSetup value = Stream.of(stbGestSetupList)
|
StbGestSetup value = Stream.of(stbGestSetupList)
|
||||||
.filter(x -> x.getSection().equalsIgnoreCase(section) && x.getKeySection().equalsIgnoreCase(keySectionName))
|
.filter(x -> x.getSection().equalsIgnoreCase(section) && x.getKeySection().equalsIgnoreCase(keySectionName))
|
||||||
@@ -403,7 +417,7 @@ public class SettingsManager {
|
|||||||
return clazz.cast("S".equalsIgnoreCase(value.getValue()));
|
return clazz.cast("S".equalsIgnoreCase(value.getValue()));
|
||||||
} else if (clazz == Integer.class && value.getValue() != null) {
|
} else if (clazz == Integer.class && value.getValue() != null) {
|
||||||
return clazz.cast(Integer.parseInt(value.getValue()));
|
return clazz.cast(Integer.parseInt(value.getValue()));
|
||||||
} else return null;
|
} else return defaultValue;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ import java.io.File;
|
|||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseCustomConfiguration;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.FileDownloader;
|
import it.integry.integrywmsnative.core.utility.FileDownloader;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||||
@@ -30,19 +27,9 @@ public class UpdatesManager {
|
|||||||
public void init(AppCompatActivity activityContext) {
|
public void init(AppCompatActivity activityContext) {
|
||||||
this.mContext = activityContext;
|
this.mContext = activityContext;
|
||||||
|
|
||||||
String suffix;
|
|
||||||
ICustomConfiguration customConfiguration = ClassRouter.getInstance(ClassRouter.PATH.CUSTOM_CONFIGURATION);
|
|
||||||
try {
|
|
||||||
suffix = customConfiguration.getConfig(BaseCustomConfiguration.Keys.CUSTOM_DYNAMIC_VERSION_PATH);
|
|
||||||
if (suffix == null) {
|
|
||||||
suffix = "";
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
suffix = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
String currentVersionUrl = "http://" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "/ems-api/wms/currentVersion";
|
String currentVersionUrl = "http://" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "/ems-api/wms/currentVersion";
|
||||||
String currentDownloadUrl = "http://" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "/ems-api/wms/android-release" + suffix + ".apk";
|
String currentDownloadUrl = "http://" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "/ems-api/wms/android-release.apk";
|
||||||
|
|
||||||
|
|
||||||
AppUpdater appUpdater = new AppUpdater(mContext)
|
AppUpdater appUpdater = new AppUpdater(mContext)
|
||||||
|
|||||||
@@ -27,10 +27,8 @@ import javax.inject.Inject;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.MainApplication;
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.configs.BaseMenuConfiguration;
|
import it.integry.integrywmsnative.core.class_router.configs.BaseMenuConfiguration;
|
||||||
import it.integry.integrywmsnative.core.class_router.configs.MenuConfiguration;
|
import it.integry.integrywmsnative.core.class_router.configs.MenuConfiguration;
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
|
||||||
import it.integry.integrywmsnative.core.context.MainContext;
|
import it.integry.integrywmsnative.core.context.MainContext;
|
||||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||||
@@ -241,7 +239,6 @@ public class MainActivity extends BaseActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
private MenuConfiguration.MenuItem getMenuItem(@IdRes int menuId) {
|
private MenuConfiguration.MenuItem getMenuItem(@IdRes int menuId) {
|
||||||
ICustomConfiguration customConfiguration = ClassRouter.getInstance(ClassRouter.PATH.CUSTOM_CONFIGURATION);
|
|
||||||
BaseMenuConfiguration menuConfiguration = new MenuConfiguration();
|
BaseMenuConfiguration menuConfiguration = new MenuConfiguration();
|
||||||
List<MenuConfiguration.MenuGroup> menuGroups = menuConfiguration.getGroups();
|
List<MenuConfiguration.MenuGroup> menuGroups = menuConfiguration.getGroups();
|
||||||
|
|
||||||
|
|||||||
@@ -27,10 +27,8 @@ import javax.inject.Inject;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.MainApplication;
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.configs.BaseMenuConfiguration;
|
import it.integry.integrywmsnative.core.class_router.configs.BaseMenuConfiguration;
|
||||||
import it.integry.integrywmsnative.core.class_router.configs.MenuConfiguration;
|
import it.integry.integrywmsnative.core.class_router.configs.MenuConfiguration;
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.OrdiniVenditaInterface;
|
|
||||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverDTO;
|
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverDTO;
|
||||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
|||||||
@@ -29,9 +29,6 @@ import it.integry.integrywmsnative.MainApplication;
|
|||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseCustomConfiguration;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
|
||||||
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
import it.integry.integrywmsnative.core.expansion.AtomicBigDecimal;
|
import it.integry.integrywmsnative.core.expansion.AtomicBigDecimal;
|
||||||
@@ -178,10 +175,9 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
|
|
||||||
setSupportActionBar(mBindings.toolbar);
|
setSupportActionBar(mBindings.toolbar);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
ICustomConfiguration customConfiguration = ClassRouter.getInstance(ClassRouter.PATH.CUSTOM_CONFIGURATION);
|
mFlagShowCodForn = SettingsManager.iDB().isShowCodFornSpedizione();
|
||||||
mFlagShowCodForn = customConfiguration != null ? customConfiguration.getConfig(BaseCustomConfiguration.Keys.FLAG_SHOW_COD_FORN_IN_SPEDIZIONE) : true;
|
mDivideByGrpMerc = SettingsManager.iDB().isGroupShippingByCommodityGroup();
|
||||||
mDivideByGrpMerc = customConfiguration != null ? customConfiguration.getConfig(BaseCustomConfiguration.Keys.FLAG_SPEDIZIONE_GROUP_BY_GRP_MERC) : false;
|
|
||||||
|
|
||||||
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
|
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
mEnableQuantityReset = sharedPreferences.getBoolean("picking_uscita_enable_quantity_reset", true);
|
mEnableQuantityReset = sharedPreferences.getBoolean("picking_uscita_enable_quantity_reset", true);
|
||||||
|
|||||||
124
build.gradle
124
build.gradle
@@ -44,128 +44,4 @@ task clean(type: Delete) {
|
|||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|
||||||
task buildBase() {
|
|
||||||
doFirst {
|
|
||||||
copy {
|
|
||||||
from 'dynamic__base/src/main/java/it/integry'
|
|
||||||
into 'app/src/main/java/it/integry'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependsOn "app:build"
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
copy {
|
|
||||||
from 'app/build/outputs/apk/release'
|
|
||||||
into 'dist/release/_base'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task buildFrudis() {
|
|
||||||
doFirst {
|
|
||||||
copy {
|
|
||||||
from 'dynamic_frudis/src/main/java/it/integry'
|
|
||||||
into 'app/src/main/java/it/integry'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependsOn "app:build"
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
copy {
|
|
||||||
from 'app/build/outputs/apk/release'
|
|
||||||
into 'dist/release/frudis'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task buildGramm() {
|
|
||||||
doFirst {
|
|
||||||
copy {
|
|
||||||
from 'dynamic_gramm/src/main/java/it/integry'
|
|
||||||
into 'app/src/main/java/it/integry'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependsOn "app:build"
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
copy {
|
|
||||||
from 'app/build/outputs/apk/release'
|
|
||||||
into 'dist/release/gramm'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task buildIme() {
|
|
||||||
doFirst {
|
|
||||||
copy {
|
|
||||||
from 'dynamic_ime/src/main/java/it/integry'
|
|
||||||
into 'app/src/main/java/it/integry'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependsOn "app:build"
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
copy {
|
|
||||||
from 'app/build/outputs/apk/release'
|
|
||||||
into 'dist/release/ime'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task buildSaporiVeriPV() {
|
|
||||||
doFirst {
|
|
||||||
copy {
|
|
||||||
from 'dynamic_saporiveri_pv/src/main/java/it/integry'
|
|
||||||
into 'app/src/main/java/it/integry'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependsOn "app:build"
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
copy {
|
|
||||||
from 'app/build/outputs/apk/release'
|
|
||||||
into 'dist/release/saporiveri_pv'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task buildSaporiVeri() {
|
|
||||||
doFirst {
|
|
||||||
copy {
|
|
||||||
from 'dynamic_saporiveri/src/main/java/it/integry'
|
|
||||||
into 'app/src/main/java/it/integry'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependsOn "app:build"
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
copy {
|
|
||||||
from 'app/build/outputs/apk/release'
|
|
||||||
into 'dist/release/saporiveri'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task buildVGAlimenti() {
|
|
||||||
doFirst {
|
|
||||||
copy {
|
|
||||||
from 'dynamic_vgalimenti/src/main/java/it/integry'
|
|
||||||
into 'app/src/main/java/it/integry'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependsOn "app:build"
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
copy {
|
|
||||||
from 'app/build/outputs/apk/release'
|
|
||||||
into 'dist/release/vgalimenti'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
call build_azienda.bat _base
|
|
||||||
call build_azienda.bat vgalimenti
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
@echo off
|
|
||||||
|
|
||||||
SET nome_azienda=%1
|
|
||||||
|
|
||||||
XCOPY dynamic_%nome_azienda%\src\main\java\it\integry app\src\main\java\it\integry\ /E /Y
|
|
||||||
CALL gradlew app:build --stacktrace
|
|
||||||
|
|
||||||
RMDIR app\src\main\java\it\integry\wms\ /S /Q
|
|
||||||
|
|
||||||
MKDIR dist
|
|
||||||
MKDIR dist\release
|
|
||||||
MKDIR dist\release\%nome_azienda%
|
|
||||||
|
|
||||||
MOVE app\build\outputs\apk\release\*.apk dist\release\%nome_azienda%\
|
|
||||||
MOVE app\build\outputs\apk\release\*.txt dist\release\%nome_azienda%\
|
|
||||||
1
dynamic__base/.gitignore
vendored
1
dynamic__base/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
/build
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.android.dynamic-feature'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion 33
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion 21
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
|
||||||
}
|
|
||||||
lint {
|
|
||||||
abortOnError false
|
|
||||||
}
|
|
||||||
namespace 'it.integry.wms.dynamic__base'
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
||||||
implementation project(':app')
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:dist="http://schemas.android.com/apk/distribution">
|
|
||||||
|
|
||||||
<dist:module
|
|
||||||
dist:instant="false"
|
|
||||||
dist:onDemand="false"
|
|
||||||
dist:title="@string/title_dynamic__base">
|
|
||||||
<dist:fusing dist:include="true" />
|
|
||||||
</dist:module>
|
|
||||||
</manifest>
|
|
||||||
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package it.integry.wms.dynamic_customization;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
|
||||||
import it.integry.wms.dynamic_customization.extensions.CustomConfiguration;
|
|
||||||
|
|
||||||
public class DynamicContext {
|
|
||||||
|
|
||||||
public void init(Context context) {
|
|
||||||
Log.d("DynamicContext", "Caricamento personalizzazioni per Azienda BASE");
|
|
||||||
|
|
||||||
try {
|
|
||||||
ClassRouter.registerPath(ClassRouter.PATH.CUSTOM_CONFIGURATION, CustomConfiguration.class);
|
|
||||||
} catch (Exception ex) {
|
|
||||||
UtilityExceptions.defaultException(context, ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.d("DynamicContext", "Caricamento personalizzazioni per Azienda BASE COMPLETATO");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package it.integry.wms.dynamic_customization.extensions;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseCustomConfiguration;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
|
||||||
|
|
||||||
public class CustomConfiguration extends BaseCustomConfiguration implements ICustomConfiguration {
|
|
||||||
|
|
||||||
public CustomConfiguration() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
1
dynamic_vgalimenti/.gitignore
vendored
1
dynamic_vgalimenti/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
/build
|
|
||||||
Binary file not shown.
@@ -1,23 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.android.dynamic-feature'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion 31
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion 21
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
|
||||||
}
|
|
||||||
namespace 'it.integry.wms.dynamic_customization'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
||||||
implementation project(':app')
|
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.6.0'
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:dist="http://schemas.android.com/apk/distribution">
|
|
||||||
|
|
||||||
<dist:module
|
|
||||||
dist:instant="false"
|
|
||||||
dist:onDemand="false"
|
|
||||||
dist:title="@string/title_dynamic_vgalimenti">
|
|
||||||
<dist:fusing dist:include="true" />
|
|
||||||
</dist:module>
|
|
||||||
</manifest>
|
|
||||||
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
package it.integry.wms.dynamic_customization;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
|
||||||
import it.integry.wms.dynamic_customization.extensions.CustomConfiguration;
|
|
||||||
|
|
||||||
public class DynamicContext {
|
|
||||||
|
|
||||||
public void init(Context context) {
|
|
||||||
Log.d("DynamicContext", "Caricamento personalizzazioni per VGAlimenti");
|
|
||||||
|
|
||||||
try {
|
|
||||||
ClassRouter.registerPath(ClassRouter.PATH.CUSTOM_CONFIGURATION, CustomConfiguration.class);
|
|
||||||
} catch (Exception ex) {
|
|
||||||
UtilityExceptions.defaultException(context, ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.d("DynamicContext", "Caricamento personalizzazioni per VGAlimenti COMPLETATO");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package it.integry.wms.dynamic_customization.extensions;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseCustomConfiguration;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
|
||||||
|
|
||||||
public class CustomConfiguration extends BaseCustomConfiguration implements ICustomConfiguration {
|
|
||||||
|
|
||||||
public CustomConfiguration() {
|
|
||||||
configurations.put(Keys.FLAG_SHOW_COD_FORN_IN_SPEDIZIONE, false);
|
|
||||||
configurations.put(Keys.FLAG_SPEDIZIONE_GROUP_BY_GRP_MERC, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
include ':app', ':pointmobilescannerlibrary', ':dynamic_vgalimenti', ':dynamic__base', ':zebrascannerlibrary', ':honeywellsdk', ':honeywellscannerlibrary', ':keyobardemulatorscannerlibrary', ':barcode_base_android_library'
|
include ':app', ':pointmobilescannerlibrary', ':zebrascannerlibrary', ':honeywellsdk', ':honeywellscannerlibrary', ':keyobardemulatorscannerlibrary', ':barcode_base_android_library'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user