Completata distribuzione custom per VG
118
.idea/assetWizardSettings.xml
generated
@ -3,6 +3,124 @@
|
|||||||
<component name="WizardSettings">
|
<component name="WizardSettings">
|
||||||
<option name="children">
|
<option name="children">
|
||||||
<map>
|
<map>
|
||||||
|
<entry key="imageWizard">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="children">
|
||||||
|
<map>
|
||||||
|
<entry key="imageAssetPanel">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="children">
|
||||||
|
<map>
|
||||||
|
<entry key="actionbar">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="children">
|
||||||
|
<map>
|
||||||
|
<entry key="clipArt">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="values">
|
||||||
|
<map>
|
||||||
|
<entry key="color" value="000000" />
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
<option name="values">
|
||||||
|
<map>
|
||||||
|
<entry key="theme" value="HOLO_DARK" />
|
||||||
|
<entry key="themeColor" value="ffffff" />
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="launcher">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="children">
|
||||||
|
<map>
|
||||||
|
<entry key="foregroundImage">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="values">
|
||||||
|
<map>
|
||||||
|
<entry key="color" value="000000" />
|
||||||
|
<entry key="trimmed" value="true" />
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
<option name="values">
|
||||||
|
<map>
|
||||||
|
<entry key="backgroundAssetType" value="COLOR" />
|
||||||
|
<entry key="backgroundColor" value="ffffff" />
|
||||||
|
<entry key="foregroundImage" value="C:\Work\Prod_Android\WMS_Native\ext_sources\RoundLogoWithText.png" />
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="launcherLegacy">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="children">
|
||||||
|
<map>
|
||||||
|
<entry key="clipArt">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="values">
|
||||||
|
<map>
|
||||||
|
<entry key="color" value="000000" />
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
<entry key="notification">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="children">
|
||||||
|
<map>
|
||||||
|
<entry key="clipArt">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="values">
|
||||||
|
<map>
|
||||||
|
<entry key="color" value="000000" />
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="vectorWizard">
|
<entry key="vectorWizard">
|
||||||
<value>
|
<value>
|
||||||
<PersistentState>
|
<PersistentState>
|
||||||
|
|||||||
BIN
.idea/caches/build_file_checksums.ser
generated
272
app/build.gradle
@ -1,153 +1,153 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
maven { url 'https://maven.fabric.io/public' }
|
maven { url 'https://maven.fabric.io/public' }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'io.fabric.tools:gradle:1.27.0'
|
classpath 'io.fabric.tools:gradle:1.27.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'com.google.firebase.firebase-perf'
|
apply plugin: 'com.google.firebase.firebase-perf'
|
||||||
apply plugin: 'io.fabric'
|
apply plugin: 'io.fabric'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-android-extensions'
|
apply plugin: 'kotlin-android-extensions'
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 35
|
def appVersionCode = 35
|
||||||
def appVersionName = '1.0.32'
|
def appVersionName = '1.0.32'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
keyAlias 'wms key'
|
keyAlias 'wms key'
|
||||||
keyPassword 'inpmiy'
|
keyPassword 'inpmiy'
|
||||||
storeFile file('Integry.jks')
|
storeFile file('Integry.jks')
|
||||||
storePassword 'inpmiy'
|
storePassword 'inpmiy'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
applicationVariants.all { variant ->
|
applicationVariants.all { variant ->
|
||||||
variant.outputs.all { output ->
|
variant.outputs.all { output ->
|
||||||
output.outputFileName = "android-release_v2.apk"
|
output.outputFileName = "android-release_v2.apk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileSdkVersion 28
|
compileSdkVersion 28
|
||||||
buildToolsVersion '28.0.3'
|
buildToolsVersion '28.0.3'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "it.integry.integrywmsnative"
|
applicationId "it.integry.integrywmsnative"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode appVersionCode
|
versionCode appVersionCode
|
||||||
versionName appVersionName
|
versionName appVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dataBinding {
|
dataBinding {
|
||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
targetCompatibility 1.8
|
targetCompatibility 1.8
|
||||||
sourceCompatibility 1.8
|
sourceCompatibility 1.8
|
||||||
}
|
}
|
||||||
productFlavors {
|
productFlavors {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
build {
|
build {
|
||||||
doLast {
|
doLast {
|
||||||
delete "$projectDir/build/outputs/apk/release/version_v2.txt"
|
delete "$projectDir/build/outputs/apk/release/version_v2.txt"
|
||||||
file("$projectDir/build/outputs/apk/release/version_v2.txt").text = appVersionCode + '\n' + appVersionName
|
file("$projectDir/build/outputs/apk/release/version_v2.txt").text = appVersionCode + '\n' + appVersionName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
tasks.withType(JavaCompile.class) {
|
tasks.withType(JavaCompile.class) {
|
||||||
options.compilerArgs << "-Xmaxerrs" << "10000"
|
options.compilerArgs << "-Xmaxerrs" << "10000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
lintOptions {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
|
|
||||||
dynamicFeatures = [":dynamic_vgalimenti"]
|
dynamicFeatures = [":dynamic__base"]
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1', {
|
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1', {
|
||||||
exclude group: 'com.android.support', module: 'support-annotations'
|
exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
})
|
})
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
implementation 'com.orhanobut:logger:2.2.0'
|
implementation 'com.orhanobut:logger:2.2.0'
|
||||||
implementation 'com.google.firebase:firebase-core:16.0.7'
|
implementation 'com.google.firebase:firebase-core:16.0.7'
|
||||||
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
||||||
implementation 'com.google.firebase:firebase-perf:16.2.3'
|
implementation 'com.google.firebase:firebase-perf:16.2.3'
|
||||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
|
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
|
||||||
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
|
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation 'com.google.android.material:material:1.1.0-alpha03'
|
implementation 'com.google.android.material:material:1.1.0-alpha03'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha02'
|
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha02'
|
||||||
implementation 'androidx.preference:preference:1.1.0-alpha02'
|
implementation 'androidx.preference:preference:1.1.0-alpha02'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
|
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||||
implementation 'com.squareup.retrofit2:converter-gson:2.0.0'
|
implementation 'com.squareup.retrofit2:converter-gson:2.0.0'
|
||||||
implementation 'com.annimon:stream:1.2.1'
|
implementation 'com.annimon:stream:1.2.1'
|
||||||
implementation 'androidx.lifecycle:lifecycle-runtime:2.0.0'
|
implementation 'androidx.lifecycle:lifecycle-runtime:2.0.0'
|
||||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
||||||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.0.0'
|
implementation 'androidx.lifecycle:lifecycle-common-java8:2.0.0'
|
||||||
kapt "androidx.lifecycle:lifecycle-compiler:2.0.0"
|
kapt "androidx.lifecycle:lifecycle-compiler:2.0.0"
|
||||||
implementation 'com.danielpuiu:ghostfish:2.0.0'
|
implementation 'com.danielpuiu:ghostfish:2.0.0'
|
||||||
annotationProcessor "com.danielpuiu:ghostfish-compiler:2.0.0"
|
annotationProcessor "com.danielpuiu:ghostfish-compiler:2.0.0"
|
||||||
//MVVM
|
//MVVM
|
||||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
||||||
annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.0.0"
|
annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.0.0"
|
||||||
implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1'
|
implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1'
|
||||||
implementation 'com.jakewharton.rxbinding2:rxbinding-support-v4:2.1.1'
|
implementation 'com.jakewharton.rxbinding2:rxbinding-support-v4:2.1.1'
|
||||||
implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.1.1'
|
implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.1.1'
|
||||||
implementation 'com.jakewharton.rxbinding2:rxbinding-design:2.1.1'
|
implementation 'com.jakewharton.rxbinding2:rxbinding-design:2.1.1'
|
||||||
implementation 'com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:2.1.1'
|
implementation 'com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:2.1.1'
|
||||||
implementation 'com.jakewharton:butterknife:10.0.0'
|
implementation 'com.jakewharton:butterknife:10.0.0'
|
||||||
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
|
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
|
||||||
implementation 'br.com.zbra:android-linq:1.1.0'
|
implementation 'br.com.zbra:android-linq:1.1.0'
|
||||||
//FAB
|
//FAB
|
||||||
implementation 'com.github.clans:fab:1.6.4'
|
implementation 'com.github.clans:fab:1.6.4'
|
||||||
//CUSTOM VIEWS
|
//CUSTOM VIEWS
|
||||||
implementation 'com.github.NaimishTrivedi:FBToast:1.0'
|
implementation 'com.github.NaimishTrivedi:FBToast:1.0'
|
||||||
implementation 'de.hdodenhof:circleimageview:2.2.0'
|
implementation 'de.hdodenhof:circleimageview:2.2.0'
|
||||||
implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
|
implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
|
||||||
implementation 'com.github.frankiesardo:linearlistview:1.0.1@aar'
|
implementation 'com.github.frankiesardo:linearlistview:1.0.1@aar'
|
||||||
implementation 'com.github.andrefrsousa:SuperBottomSheet:1.2.1@aar'
|
implementation 'com.github.andrefrsousa:SuperBottomSheet:1.2.1@aar'
|
||||||
implementation 'com.fede987:status-bar-alert:1.0.1'
|
implementation 'com.fede987:status-bar-alert:1.0.1'
|
||||||
implementation 'com.fxn769:stash:1.2'
|
implementation 'com.fxn769:stash:1.2'
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
implementation project(':waterfall_toolbar')
|
implementation project(':waterfall_toolbar')
|
||||||
implementation 'com.mikhaellopez:lazydatepicker:1.0.0'
|
implementation 'com.mikhaellopez:lazydatepicker:1.0.0'
|
||||||
implementation 'com.github.demoNo:AutoScrollViewPager:v1.0.2'
|
implementation 'com.github.demoNo:AutoScrollViewPager:v1.0.2'
|
||||||
//AppUpdate
|
//AppUpdate
|
||||||
implementation 'com.github.javiersantos:AppUpdater:2.7'
|
implementation 'com.github.javiersantos:AppUpdater:2.7'
|
||||||
//Barcode
|
//Barcode
|
||||||
implementation project(':pointmobilescannerlibrary')
|
implementation project(':pointmobilescannerlibrary')
|
||||||
implementation project(path: ':barcode_base_library')
|
implementation project(path: ':barcode_base_library')
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url 'https://maven.fabric.io/public' }
|
maven { url 'https://maven.fabric.io/public' }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,9 +12,9 @@
|
|||||||
android:name=".MainApplication"
|
android:name=".MainApplication"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
android:icon="@drawable/integry_round_icon"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@drawable/integry_round_icon"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
|
|||||||
BIN
app/src/main/ic_launcher-web.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
@ -21,7 +21,6 @@ import android.view.View;
|
|||||||
|
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
import it.integry.integrywmsnative.core.REST.watcher.ServerStatusChecker;
|
import it.integry.integrywmsnative.core.REST.watcher.ServerStatusChecker;
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseRouter;
|
|
||||||
import it.integry.integrywmsnative.core.interfaces.IFilterableFragment;
|
import it.integry.integrywmsnative.core.interfaces.IFilterableFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
|
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
|
||||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||||
|
|||||||
@ -39,6 +39,8 @@ public class RESTBuilder {
|
|||||||
clientBuilder.readTimeout(timeout, TimeUnit.SECONDS);
|
clientBuilder.readTimeout(timeout, TimeUnit.SECONDS);
|
||||||
clientBuilder.writeTimeout(timeout, TimeUnit.SECONDS);
|
clientBuilder.writeTimeout(timeout, TimeUnit.SECONDS);
|
||||||
|
|
||||||
|
clientBuilder.retryOnConnectionFailure(true);
|
||||||
|
|
||||||
if(addInterceptors) clientBuilder.addInterceptor(new HttpInterceptor());
|
if(addInterceptors) clientBuilder.addInterceptor(new HttpInterceptor());
|
||||||
|
|
||||||
OkHttpClient client = clientBuilder.build();
|
OkHttpClient client = clientBuilder.build();
|
||||||
|
|||||||
@ -1,95 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.util.Pair;
|
|
||||||
|
|
||||||
import com.orhanobut.logger.Logger;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.exceptions.MethodParameterTypeNotMatchException;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.exceptions.MethodParamsCountException;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.exceptions.MethodPathAlreadyDeclaredException;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.exceptions.MethodPathNotRegisteredException;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
|
||||||
|
|
||||||
public class BaseRouter {
|
|
||||||
|
|
||||||
public enum PATH {
|
|
||||||
DISTRIBUZIONE_COLLO_V
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Context context;
|
|
||||||
|
|
||||||
private static List<Pair<PATH, MethodDTO>> mRoutePaths = new ArrayList<>();
|
|
||||||
|
|
||||||
public static void init(Context context) {
|
|
||||||
BaseRouter.context = context;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean checkIfMethodExists(PATH path) {
|
|
||||||
boolean methodAlreadyDeclared = false;
|
|
||||||
|
|
||||||
for(int i = 0; i < mRoutePaths.size() && !methodAlreadyDeclared; i++) {
|
|
||||||
if(mRoutePaths.get(i).first == path) methodAlreadyDeclared = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return methodAlreadyDeclared;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static int getMethodIndex(PATH path) {
|
|
||||||
for(int i = 0; i < mRoutePaths.size(); i++) {
|
|
||||||
if(mRoutePaths.get(i).first == path) return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void registerPath(PATH path, MethodDTO method) throws MethodPathAlreadyDeclaredException {
|
|
||||||
if(checkIfMethodExists(path)) {
|
|
||||||
throw new MethodPathAlreadyDeclaredException(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
mRoutePaths.add(new Pair<>(path, method));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void deregisterPath(PATH path) {
|
|
||||||
if(checkIfMethodExists(path)) {
|
|
||||||
mRoutePaths.remove(getMethodIndex(path));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static void invokePath(PATH path, Object... params) {
|
|
||||||
try {
|
|
||||||
|
|
||||||
if (!checkIfMethodExists(path)) {
|
|
||||||
throw new MethodPathNotRegisteredException(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
MethodDTO methodDTO = mRoutePaths.get(getMethodIndex(path)).second;
|
|
||||||
|
|
||||||
Class[] methodParameters = methodDTO.getMethod().getParameterTypes();
|
|
||||||
|
|
||||||
if (methodParameters.length != params.length) {
|
|
||||||
throw new MethodParamsCountException(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < params.length; i++) {
|
|
||||||
if (params[i] != null && params[i].getClass() != methodParameters[i] && methodParameters[i].cast(params[i]) == null) {
|
|
||||||
throw new MethodParameterTypeNotMatchException(path, params[i].getClass().getCanonicalName(), methodParameters[i].getCanonicalName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final Object newInstance = methodDTO.getMethod().getDeclaringClass().newInstance();
|
|
||||||
|
|
||||||
methodDTO.getMethod().invoke(newInstance, params);
|
|
||||||
|
|
||||||
} catch (Exception ex) {
|
|
||||||
UtilityExceptions.defaultException(context, ex, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,80 @@
|
|||||||
|
package it.integry.integrywmsnative.core.class_router;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.Pair;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
|
|
||||||
|
public class ClassRouter {
|
||||||
|
|
||||||
|
public enum PATH {
|
||||||
|
FILTRO_ORDINI_VENDITA,
|
||||||
|
ORDINI_VENDITA
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Context context;
|
||||||
|
|
||||||
|
private static List<Pair<PATH, Class>> mRouteClasses = new ArrayList<>();
|
||||||
|
|
||||||
|
public static void init(Context context) {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
mRouteClasses.add(new Pair<>(path, clazz));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void deregisterPath(PATH path) {
|
||||||
|
if(checkIClassExists(path)) {
|
||||||
|
mRouteClasses.remove(getClassIndex(path));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static <T> T getIstance(PATH path) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
if (!checkIClassExists(path)) {
|
||||||
|
//throw new MethodPathNotRegisteredException(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
Class clazz = mRouteClasses.get(getClassIndex(path)).second;
|
||||||
|
|
||||||
|
return (T)clazz.newInstance();
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
UtilityExceptions.defaultException(context, ex, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,29 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router;
|
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
|
|
||||||
public class MethodDTO {
|
|
||||||
|
|
||||||
private Method method;
|
|
||||||
|
|
||||||
public Method getMethod() {
|
|
||||||
return method;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MethodDTO setMethod(Method method) {
|
|
||||||
this.method = method;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static MethodDTO fromName(Class clazz, String methodName) {
|
|
||||||
Method[] methods = clazz.getMethods();
|
|
||||||
for (Method m : methods) {
|
|
||||||
if (methodName.equals(m.getName())) {
|
|
||||||
return new MethodDTO().setMethod(m);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.exceptions;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseRouter;
|
|
||||||
|
|
||||||
public class MethodParameterTypeNotMatchException extends Exception{
|
|
||||||
|
|
||||||
public MethodParameterTypeNotMatchException(BaseRouter.PATH path, String type1, String type2) {
|
|
||||||
super(String.format("The given parameter (%s) to %s don't match the required type %s", type1, path.toString(), type2));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.exceptions;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseRouter;
|
|
||||||
|
|
||||||
public class MethodParamsCountException extends Exception {
|
|
||||||
|
|
||||||
public MethodParamsCountException(BaseRouter.PATH path) {
|
|
||||||
super(String.format("Given parameters to path %s do not match the real method declaration", path.toString()));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.exceptions;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseRouter;
|
|
||||||
|
|
||||||
public class MethodPathAlreadyDeclaredException extends Exception {
|
|
||||||
|
|
||||||
public MethodPathAlreadyDeclaredException(BaseRouter.PATH path) {
|
|
||||||
|
|
||||||
super(String.format("Method %s is already declared in this scope", path.toString()));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.exceptions;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseRouter;
|
|
||||||
|
|
||||||
public class MethodPathNotRegisteredException extends Exception{
|
|
||||||
|
|
||||||
public MethodPathNotRegisteredException(BaseRouter.PATH path){
|
|
||||||
super(String.format("Method path %s isn't registered at the moment. Please call BaseRouter.registerPath before call invoke.", path.toString()));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package it.integry.integrywmsnative.core.class_router.interfaces;
|
||||||
|
|
||||||
|
public interface IFiltroOrdiniVendita {
|
||||||
|
|
||||||
|
boolean shoudShowCodMdepFilter();
|
||||||
|
|
||||||
|
}
|
||||||
@ -6,9 +6,10 @@ import java.util.List;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaGroupedInevasoDTO;
|
||||||
|
|
||||||
public interface IOrdiniVendita {
|
public interface IOrdiniVendita {
|
||||||
|
|
||||||
void distribuisciCollo(ProgressDialog progress, MtbColt mtbColt, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed);
|
void distribuisciCollo(ProgressDialog progress, MtbColt mtbColt, List<OrdineVenditaGroupedInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,14 +2,11 @@ package it.integry.integrywmsnative.core.context;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import com.orhanobut.logger.Logger;
|
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseRouter;
|
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
||||||
@ -41,7 +38,7 @@ public class MainContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initReflections() {
|
private void initReflections() {
|
||||||
BaseRouter.init(mContext);
|
ClassRouter.init(mContext);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String initMethod = "init";
|
String initMethod = "init";
|
||||||
|
|||||||
@ -35,6 +35,7 @@ import it.integry.integrywmsnative.core.interfaces.IFilterableFragment;
|
|||||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.ISelectAllFragment;
|
import it.integry.integrywmsnative.core.interfaces.ISelectAllFragment;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||||
@ -211,6 +212,7 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IS
|
|||||||
rigaOrdine
|
rigaOrdine
|
||||||
.setData(ord.getDataOrdS())
|
.setData(ord.getDataOrdS())
|
||||||
.setNumero(ord.getNumOrd())
|
.setNumero(ord.getNumOrd())
|
||||||
|
.setCodMdep(ord.getCodMdep())
|
||||||
.setCodAnagOrd(ord.getCodAnagOrd())
|
.setCodAnagOrd(ord.getCodAnagOrd())
|
||||||
.setCodAnagClie(groupedOrdine.codAnagClie)
|
.setCodAnagClie(groupedOrdine.codAnagClie)
|
||||||
.setRagSocOrd(ord.getRagSocOrd())
|
.setRagSocOrd(ord.getRagSocOrd())
|
||||||
@ -328,47 +330,53 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IS
|
|||||||
final ProgressDialog progress = ProgressDialog.show(getActivity(), getText(R.string.waiting),
|
final ProgressDialog progress = ProgressDialog.show(getActivity(), getText(R.string.waiting),
|
||||||
getText(R.string.loading) + " ...", true);
|
getText(R.string.loading) + " ...", true);
|
||||||
|
|
||||||
mHelper.retrievePickingList(barcodes, dataCons, new VenditaHelper.ILoadPickingListCallback() {
|
|
||||||
@Override
|
final String finalDataCons = dataCons;
|
||||||
public void onLoadSuccess(final List<PickingObjectDTO> ordini) {
|
checkSelectedOrders(selectedOrders, () -> {
|
||||||
|
|
||||||
|
mHelper.retrievePickingList(barcodes, finalDataCons, new VenditaHelper.ILoadPickingListCallback() {
|
||||||
|
@Override
|
||||||
|
public void onLoadSuccess(final List<PickingObjectDTO> ordini) {
|
||||||
|
|
||||||
|
mHelper.getBancaliVenditaGiaRegistrati(selectedOrders, mtbColtList -> {
|
||||||
|
|
||||||
|
progress.dismiss();
|
||||||
|
|
||||||
|
List<String> codMarts = Stream.of(ordini)
|
||||||
|
.distinctBy(PickingObjectDTO::getCodMart)
|
||||||
|
.map(PickingObjectDTO::getCodMart)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
int alreadyRegisteredUL = mtbColtList.size();
|
||||||
|
|
||||||
|
|
||||||
mHelper.getBancaliVenditaGiaRegistrati(selectedOrders, mtbColtList -> {
|
|
||||||
|
|
||||||
progress.dismiss();
|
|
||||||
|
|
||||||
List<String> codMarts = Stream.of(ordini)
|
DialogSimpleMessageHelper.makeInfoDialog(getActivity(),
|
||||||
.distinctBy(PickingObjectDTO::getCodMart)
|
getText(R.string.orders).toString(),
|
||||||
.map(PickingObjectDTO::getCodMart)
|
Html.fromHtml(String.format(getActivity().getResources().getQuantityString(R.plurals.loaded_orders_message, barcodes.size()), barcodes.size())
|
||||||
.toList();
|
+ "<br />" +
|
||||||
|
"<b>" + codMarts.size() + "</b> " + getActivity().getResources().getQuantityString(R.plurals.available_articles, codMarts.size())
|
||||||
|
+ "<br />" +
|
||||||
|
"<b>" + alreadyRegisteredUL + "</b> " + getActivity().getResources().getQuantityString(R.plurals.already_registered_lu, alreadyRegisteredUL)),
|
||||||
|
null,
|
||||||
|
() -> startVenditaActivity(ordini, selectedOrders, mtbColtList)
|
||||||
|
).show();
|
||||||
|
|
||||||
int alreadyRegisteredUL = mtbColtList.size();
|
}, ex -> UtilityExceptions.defaultException(getActivity(), ex, progress));
|
||||||
|
|
||||||
DialogSimpleMessageHelper.makeInfoDialog(getActivity(),
|
}
|
||||||
getText(R.string.orders).toString(),
|
|
||||||
Html.fromHtml(String.format(getActivity().getResources().getQuantityString(R.plurals.loaded_orders_message, barcodes.size()), barcodes.size())
|
|
||||||
+ "<br />" +
|
|
||||||
"<b>" + codMarts.size() + "</b> " + getActivity().getResources().getQuantityString(R.plurals.available_articles, codMarts.size())
|
|
||||||
+ "<br />" +
|
|
||||||
"<b>" + alreadyRegisteredUL + "</b> " + getActivity().getResources().getQuantityString(R.plurals.already_registered_lu, alreadyRegisteredUL)),
|
|
||||||
null,
|
|
||||||
() -> {
|
|
||||||
|
|
||||||
startVenditaActivity(ordini, selectedOrders, mtbColtList);
|
@Override
|
||||||
|
public void onLoadFail(Exception ex) {
|
||||||
|
UtilityExceptions.defaultException(getActivity(), ex, progress);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}).show();
|
|
||||||
|
|
||||||
}, ex -> UtilityExceptions.defaultException(getActivity(), ex, progress));
|
}, () -> {
|
||||||
|
progress.dismiss();
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onLoadFail(Exception ex) {
|
|
||||||
UtilityExceptions.defaultException(getActivity(), ex, progress);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -411,8 +419,45 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IS
|
|||||||
}).show();
|
}).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startVenditaActivity(List<PickingObjectDTO> ordini, List<OrdineVenditaGroupedInevasoDTO> selectedOrders, List<MtbColt> mtbColtList) {
|
private void checkSelectedOrders(List<OrdineVenditaGroupedInevasoDTO> selectedOrders, Runnable onComplete, Runnable onFailed) {
|
||||||
|
if(selectedOrders != null && selectedOrders.size() > 0) {
|
||||||
|
List<OrdineVenditaGroupedInevasoDTO.Ordine> flatOrderArray = new ArrayList<>();
|
||||||
|
|
||||||
|
Stream.of(selectedOrders).forEach(x -> flatOrderArray.addAll(x.ordini));
|
||||||
|
|
||||||
|
//Definizione della gestione collo di default
|
||||||
|
List<GestioneEnum> foundGestioni = Stream.of(flatOrderArray)
|
||||||
|
.map(OrdineVenditaGroupedInevasoDTO.Ordine::getGestioneEnum)
|
||||||
|
.withoutNulls()
|
||||||
|
.distinctBy(x -> x)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
if (foundGestioni != null && foundGestioni.size() > 1) {
|
||||||
|
DialogSimpleMessageHelper.makeErrorDialog(getContext(), new SpannableString(getString(R.string.error_multiple_gest_ordv)), null, () -> {
|
||||||
|
onFailed.run();
|
||||||
|
}).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Definizione del deposito di default
|
||||||
|
List<String> foundCodMdep = Stream.of(flatOrderArray)
|
||||||
|
.map(OrdineVenditaGroupedInevasoDTO.Ordine::getCodMdep)
|
||||||
|
.withoutNulls()
|
||||||
|
.distinctBy(x -> x)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
if (foundCodMdep != null && foundCodMdep.size() > 1) {
|
||||||
|
DialogSimpleMessageHelper.makeErrorDialog(getContext(), new SpannableString(getString(R.string.error_multiple_cod_mdep_ordv)), null, () -> {
|
||||||
|
onFailed.run();
|
||||||
|
}).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onComplete.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startVenditaActivity(List<PickingObjectDTO> ordini, List<OrdineVenditaGroupedInevasoDTO> selectedOrders, List<MtbColt> mtbColtList) {
|
||||||
Intent myIntent = new Intent(getActivity(), VenditaOrdineInevasoActivity.class);
|
Intent myIntent = new Intent(getActivity(), VenditaOrdineInevasoActivity.class);
|
||||||
|
|
||||||
String keyPickingList = DataCache.addItem(ordini);
|
String keyPickingList = DataCache.addItem(ordini);
|
||||||
@ -425,9 +470,5 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IS
|
|||||||
myIntent.putExtra("keyColliRegistrati", keyColliRegistrati);
|
myIntent.putExtra("keyColliRegistrati", keyColliRegistrati);
|
||||||
|
|
||||||
getActivity().startActivity(myIntent);
|
getActivity().startActivity(myIntent);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import android.content.Context;
|
|||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
|
||||||
@ -18,6 +19,8 @@ import java.util.GregorianCalendar;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
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.interfaces.IFiltroOrdiniVendita;
|
||||||
import it.integry.integrywmsnative.core.di.BindableString;
|
import it.integry.integrywmsnative.core.di.BindableString;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
@ -37,6 +40,7 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
private List<OrdineVenditaInevasoDTO> currentOrderList;
|
private List<OrdineVenditaInevasoDTO> currentOrderList;
|
||||||
private List<OrdineVenditaInevasoDTO> currentFilteredOrderList;
|
private List<OrdineVenditaInevasoDTO> currentFilteredOrderList;
|
||||||
|
|
||||||
|
private Predicate<OrdineVenditaInevasoDTO> currentDepositoPredicate = null;
|
||||||
private Predicate<OrdineVenditaInevasoDTO> currentNumOrdsPredicate = null;
|
private Predicate<OrdineVenditaInevasoDTO> currentNumOrdsPredicate = null;
|
||||||
private Predicate<OrdineVenditaInevasoDTO> currentClientePredicate = null;
|
private Predicate<OrdineVenditaInevasoDTO> currentClientePredicate = null;
|
||||||
private Predicate<OrdineVenditaInevasoDTO> currentDataConsPredicate = null;
|
private Predicate<OrdineVenditaInevasoDTO> currentDataConsPredicate = null;
|
||||||
@ -100,7 +104,7 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void resetAll(DialogVenditaFiltroAvanzatoViewModel viewModel) {
|
private void resetAll(DialogVenditaFiltroAvanzatoViewModel viewModel) {
|
||||||
viewModel.numOrds.set(null);
|
viewModel.deposito.set(null);
|
||||||
viewModel.numOrds.set(null);
|
viewModel.numOrds.set(null);
|
||||||
viewModel.cliente.set(null);
|
viewModel.cliente.set(null);
|
||||||
viewModel.dataConsegna.set(null);
|
viewModel.dataConsegna.set(null);
|
||||||
@ -110,6 +114,7 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initView(DialogVenditaFiltroAvanzatoBinding bindings, DialogVenditaFiltroAvanzatoViewModel viewModel) {
|
private void initView(DialogVenditaFiltroAvanzatoBinding bindings, DialogVenditaFiltroAvanzatoViewModel viewModel) {
|
||||||
|
IFiltroOrdiniVendita filtroOrdiniVendita = ClassRouter.getIstance(ClassRouter.PATH.FILTRO_ORDINI_VENDITA);
|
||||||
|
|
||||||
bindings.inputDataCons.setOnClickListener(view -> {
|
bindings.inputDataCons.setOnClickListener(view -> {
|
||||||
Calendar c = Calendar.getInstance();
|
Calendar c = Calendar.getInstance();
|
||||||
@ -132,6 +137,22 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
datePickerDialog.show();
|
datePickerDialog.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
bindings.inputCodMdep.setVisibility(filtroOrdiniVendita.shoudShowCodMdepFilter() ? View.VISIBLE : View.GONE);
|
||||||
|
bindings.inputCodMdep.setOnClickListener(view -> {
|
||||||
|
|
||||||
|
AlertDialog.Builder builderSingle = new AlertDialog.Builder(currentContext);
|
||||||
|
builderSingle.setTitle(R.string.deposit);
|
||||||
|
|
||||||
|
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter(currentContext, android.R.layout.select_dialog_singlechoice);
|
||||||
|
arrayAdapter.addAll(getAvailableCodMdeps());
|
||||||
|
|
||||||
|
builderSingle.setAdapter(arrayAdapter, (dialogInterface, i) -> {
|
||||||
|
viewModel.deposito.set(arrayAdapter.getItem(i));
|
||||||
|
});
|
||||||
|
builderSingle.show();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
bindings.inputTermCons.setOnClickListener(view -> {
|
bindings.inputTermCons.setOnClickListener(view -> {
|
||||||
|
|
||||||
AlertDialog.Builder builderSingle = new AlertDialog.Builder(currentContext);
|
AlertDialog.Builder builderSingle = new AlertDialog.Builder(currentContext);
|
||||||
@ -187,7 +208,6 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
BindableString.registerListener(viewModel.numOrds, value -> {
|
BindableString.registerListener(viewModel.numOrds, value -> {
|
||||||
if(UtilityString.isNullOrEmpty(value)) currentNumOrdsPredicate = null;
|
if(UtilityString.isNullOrEmpty(value)) currentNumOrdsPredicate = null;
|
||||||
else {
|
else {
|
||||||
//String numOrdTrimmed = value.replaceAll(" ", "");
|
|
||||||
String[] numOrdsSplitted = value.split("[,\\ ]");
|
String[] numOrdsSplitted = value.split("[,\\ ]");
|
||||||
|
|
||||||
|
|
||||||
@ -226,6 +246,18 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
viewModel.cliente.refresh();
|
viewModel.cliente.refresh();
|
||||||
|
|
||||||
|
|
||||||
|
BindableString.resetListeners(viewModel.deposito);
|
||||||
|
BindableString.registerListener(viewModel.deposito, value -> {
|
||||||
|
if(UtilityString.isNullOrEmpty(value)) currentDepositoPredicate = null;
|
||||||
|
else {
|
||||||
|
currentDepositoPredicate = o -> o.getCodMdep().toLowerCase().contains(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!firstInit) refreshList();
|
||||||
|
});
|
||||||
|
viewModel.deposito.refresh();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BindableString.resetListeners(viewModel.dataConsegna);
|
BindableString.resetListeners(viewModel.dataConsegna);
|
||||||
@ -284,8 +316,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableTermCons() {
|
private List<String> getAvailableCodMdeps() {
|
||||||
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null){
|
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else {
|
} else {
|
||||||
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
@ -294,7 +326,28 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
(currentClientePredicate == null || (currentClientePredicate != null && currentClientePredicate.test(x))) &&
|
(currentClientePredicate == null || (currentClientePredicate != null && currentClientePredicate.test(x))) &&
|
||||||
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
||||||
(currentVettorePredicate == null || (currentVettorePredicate != null && currentVettorePredicate.test(x))) &&
|
(currentVettorePredicate == null || (currentVettorePredicate != null && currentVettorePredicate.test(x))) &&
|
||||||
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate != null && currentAutomezzoPredicate.test(x)))
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate != null && currentAutomezzoPredicate.test(x))) &&
|
||||||
|
(currentTermConsPredicate == null || (currentTermConsPredicate != null && currentTermConsPredicate.test(x)))
|
||||||
|
);
|
||||||
|
|
||||||
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Stream.of(currentFilteredOrderList).map(OrdineVenditaInevasoDTO::getCodMdep).distinct().withoutNulls().toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> getAvailableTermCons() {
|
||||||
|
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentDepositoPredicate == null){
|
||||||
|
currentFilteredOrderList = currentOrderList;
|
||||||
|
} else {
|
||||||
|
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
|
.filter(x ->
|
||||||
|
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
||||||
|
(currentClientePredicate == null || (currentClientePredicate != null && currentClientePredicate.test(x))) &&
|
||||||
|
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
||||||
|
(currentVettorePredicate == null || (currentVettorePredicate != null && currentVettorePredicate.test(x))) &&
|
||||||
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate != null && currentAutomezzoPredicate.test(x))) &&
|
||||||
|
(currentDepositoPredicate == null || (currentDepositoPredicate != null && currentDepositoPredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
@ -304,16 +357,17 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableVettori() {
|
private List<String> getAvailableVettori() {
|
||||||
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentAutomezzoPredicate == null){
|
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentAutomezzoPredicate == null && currentDepositoPredicate == null){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else {
|
} else {
|
||||||
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
.filter(x ->
|
.filter(x ->
|
||||||
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
||||||
(currentClientePredicate == null || (currentClientePredicate != null && currentClientePredicate.test(x))) &&
|
(currentClientePredicate == null || (currentClientePredicate != null && currentClientePredicate.test(x))) &&
|
||||||
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
||||||
(currentTermConsPredicate == null || (currentTermConsPredicate != null && currentTermConsPredicate.test(x))) &&
|
(currentTermConsPredicate == null || (currentTermConsPredicate != null && currentTermConsPredicate.test(x))) &&
|
||||||
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate != null && currentAutomezzoPredicate .test(x)))
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate != null && currentAutomezzoPredicate .test(x))) &&
|
||||||
|
(currentDepositoPredicate == null || (currentDepositoPredicate != null && currentDepositoPredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
@ -323,16 +377,17 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableAutomezzi() {
|
private List<String> getAvailableAutomezzi() {
|
||||||
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentVettorePredicate == null){
|
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentVettorePredicate == null && currentDepositoPredicate == null){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else {
|
} else {
|
||||||
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
.filter(x ->
|
.filter(x ->
|
||||||
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate != null && currentNumOrdsPredicate.test(x))) &&
|
||||||
(currentClientePredicate == null || (currentClientePredicate != null && currentClientePredicate.test(x))) &&
|
(currentClientePredicate == null || (currentClientePredicate != null && currentClientePredicate.test(x))) &&
|
||||||
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
||||||
(currentTermConsPredicate == null || (currentTermConsPredicate != null && currentTermConsPredicate.test(x))) &&
|
(currentTermConsPredicate == null || (currentTermConsPredicate != null && currentTermConsPredicate.test(x))) &&
|
||||||
(currentVettorePredicate == null || (currentVettorePredicate != null && currentVettorePredicate.test(x)))
|
(currentVettorePredicate == null || (currentVettorePredicate != null && currentVettorePredicate.test(x))) &&
|
||||||
|
(currentDepositoPredicate == null || (currentDepositoPredicate != null && currentDepositoPredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
@ -343,7 +398,7 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
|
|
||||||
private void refreshList() {
|
private void refreshList() {
|
||||||
|
|
||||||
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentVettorePredicate == null && currentAutomezzoPredicate == null){
|
if(currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentVettorePredicate == null && currentAutomezzoPredicate == null && currentDepositoPredicate == null){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else {
|
} else {
|
||||||
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdineVenditaInevasoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
@ -353,7 +408,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
(currentDataConsPredicate == null || (currentDataConsPredicate != null && currentDataConsPredicate.test(x))) &&
|
||||||
(currentTermConsPredicate == null || (currentTermConsPredicate != null && currentTermConsPredicate.test(x))) &&
|
(currentTermConsPredicate == null || (currentTermConsPredicate != null && currentTermConsPredicate.test(x))) &&
|
||||||
(currentVettorePredicate == null || (currentVettorePredicate != null && currentVettorePredicate.test(x))) &&
|
(currentVettorePredicate == null || (currentVettorePredicate != null && currentVettorePredicate.test(x))) &&
|
||||||
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate != null && currentAutomezzoPredicate.test(x)))
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate != null && currentAutomezzoPredicate.test(x))) &&
|
||||||
|
(currentDepositoPredicate == null || (currentDepositoPredicate != null && currentDepositoPredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import it.integry.integrywmsnative.core.di.BindableString;
|
|||||||
|
|
||||||
public class DialogVenditaFiltroAvanzatoViewModel {
|
public class DialogVenditaFiltroAvanzatoViewModel {
|
||||||
|
|
||||||
|
public BindableString deposito = new BindableString();
|
||||||
public BindableString numOrds = new BindableString();
|
public BindableString numOrds = new BindableString();
|
||||||
public BindableString cliente = new BindableString();
|
public BindableString cliente = new BindableString();
|
||||||
public BindableString dataConsegna = new BindableString();
|
public BindableString dataConsegna = new BindableString();
|
||||||
|
|||||||
@ -26,6 +26,7 @@ public class OrdineVenditaGroupedInevasoDTO implements Cloneable, Serializable,
|
|||||||
public static class Ordine implements Parcelable{
|
public static class Ordine implements Parcelable{
|
||||||
private String data;
|
private String data;
|
||||||
private int numero;
|
private int numero;
|
||||||
|
private String codMdep;
|
||||||
private String codAnagOrd = "";
|
private String codAnagOrd = "";
|
||||||
private String ragSocOrd = "";
|
private String ragSocOrd = "";
|
||||||
private Float pesoTotale;
|
private Float pesoTotale;
|
||||||
@ -76,6 +77,15 @@ public class OrdineVenditaGroupedInevasoDTO implements Cloneable, Serializable,
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCodMdep() {
|
||||||
|
return codMdep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Ordine setCodMdep(String codMdep) {
|
||||||
|
this.codMdep = codMdep;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCodAnagOrd() {
|
public String getCodAnagOrd() {
|
||||||
return codAnagOrd;
|
return codAnagOrd;
|
||||||
}
|
}
|
||||||
@ -217,6 +227,7 @@ public class OrdineVenditaGroupedInevasoDTO implements Cloneable, Serializable,
|
|||||||
}
|
}
|
||||||
gestione = in.readString();
|
gestione = in.readString();
|
||||||
colliRiservati = in.readInt();
|
colliRiservati = in.readInt();
|
||||||
|
codMdep = in.readString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -248,6 +259,7 @@ public class OrdineVenditaGroupedInevasoDTO implements Cloneable, Serializable,
|
|||||||
}
|
}
|
||||||
dest.writeString(gestione);
|
dest.writeString(gestione);
|
||||||
dest.writeInt(colliRiservati);
|
dest.writeInt(colliRiservati);
|
||||||
|
dest.writeString(codMdep);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
|
|||||||
@ -18,6 +18,7 @@ public class OrdineVenditaInevasoDTO implements Parcelable {
|
|||||||
private String listino;
|
private String listino;
|
||||||
private String termCons;
|
private String termCons;
|
||||||
private String codAuto;
|
private String codAuto;
|
||||||
|
private String codMdep;
|
||||||
private String descrizioneAuto;
|
private String descrizioneAuto;
|
||||||
private String codVvet;
|
private String codVvet;
|
||||||
private String descrizioneVettore;
|
private String descrizioneVettore;
|
||||||
@ -57,6 +58,7 @@ public class OrdineVenditaInevasoDTO implements Parcelable {
|
|||||||
listino = in.readString();
|
listino = in.readString();
|
||||||
termCons = in.readString();
|
termCons = in.readString();
|
||||||
codAuto = in.readString();
|
codAuto = in.readString();
|
||||||
|
codMdep = in.readString();
|
||||||
descrizioneAuto = in.readString();
|
descrizioneAuto = in.readString();
|
||||||
codVvet = in.readString();
|
codVvet = in.readString();
|
||||||
descrizioneVettore = in.readString();
|
descrizioneVettore = in.readString();
|
||||||
@ -102,6 +104,7 @@ public class OrdineVenditaInevasoDTO implements Parcelable {
|
|||||||
dest.writeString(listino);
|
dest.writeString(listino);
|
||||||
dest.writeString(termCons);
|
dest.writeString(termCons);
|
||||||
dest.writeString(codAuto);
|
dest.writeString(codAuto);
|
||||||
|
dest.writeString(codMdep);
|
||||||
dest.writeString(descrizioneAuto);
|
dest.writeString(descrizioneAuto);
|
||||||
dest.writeString(codVvet);
|
dest.writeString(codVvet);
|
||||||
dest.writeString(descrizioneVettore);
|
dest.writeString(descrizioneVettore);
|
||||||
@ -212,6 +215,15 @@ public class OrdineVenditaInevasoDTO implements Parcelable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCodMdep() {
|
||||||
|
return codMdep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrdineVenditaInevasoDTO setCodMdep(String codMdep) {
|
||||||
|
this.codMdep = codMdep;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDescrizioneAuto() {
|
public String getDescrizioneAuto() {
|
||||||
return descrizioneAuto;
|
return descrizioneAuto;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,9 +26,9 @@ import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsume
|
|||||||
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.PosizioneRESTonsumer;
|
import it.integry.integrywmsnative.core.REST.consumers.PosizioneRESTonsumer;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.REST.consumers.PrinterRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.REST.model.DistribuzioneColloDTO;
|
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseRouter;
|
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
||||||
|
import it.integry.integrywmsnative.core.class_router.interfaces.IOrdiniVendita;
|
||||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecover;
|
import it.integry.integrywmsnative.core.data_recover.ColliDataRecover;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||||
@ -51,7 +51,6 @@ import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.VenditaOrdineInev
|
|||||||
import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.core.VenditaOrdineInevasoHelper;
|
import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.core.VenditaOrdineInevasoHelper;
|
||||||
import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.core.MainListOrdineVenditaInevasoAdapter;
|
import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.core.MainListOrdineVenditaInevasoAdapter;
|
||||||
import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.core.interfaces.IOnOrdineVenditaRowDispatched;
|
import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.core.interfaces.IOnOrdineVenditaRowDispatched;
|
||||||
import it.integry.integrywmsnative.ui.StatusBarAlert;
|
|
||||||
import it.integry.integrywmsnative.view.bottomsheet.interfaces.IOnColloClosedCallback;
|
import it.integry.integrywmsnative.view.bottomsheet.interfaces.IOnColloClosedCallback;
|
||||||
import it.integry.integrywmsnative.view.bottomsheet.viewmodel.ArticoliInColloBottomSheetViewModel;
|
import it.integry.integrywmsnative.view.bottomsheet.viewmodel.ArticoliInColloBottomSheetViewModel;
|
||||||
|
|
||||||
@ -77,6 +76,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
private MainListOrdineVenditaInevasoAdapter mAdapter;
|
private MainListOrdineVenditaInevasoAdapter mAdapter;
|
||||||
|
|
||||||
private GestioneEnum defaultGestioneOfUL = null;
|
private GestioneEnum defaultGestioneOfUL = null;
|
||||||
|
private String defaultCodMdepOfUL = null;
|
||||||
private List<FiltroOrdineDTO> defaultFiltroOrdine = new ArrayList<>();
|
private List<FiltroOrdineDTO> defaultFiltroOrdine = new ArrayList<>();
|
||||||
private String defaultCodAnagOfUL = null;
|
private String defaultCodAnagOfUL = null;
|
||||||
private String defaultRifOrdOfUL = null;
|
private String defaultRifOrdOfUL = null;
|
||||||
@ -151,11 +151,9 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
if(foundGestioni != null && foundGestioni.size() > 1){
|
if(foundGestioni != null && foundGestioni.size() > 1){
|
||||||
DialogSimpleMessageHelper.makeErrorDialog(mActivity, new SpannableString("Impossibile caricare ordini di diverse gestioni"), null, () -> {
|
DialogSimpleMessageHelper.makeErrorDialog(mActivity, new SpannableString(mActivity.getString(R.string.error_multiple_gest_ordv)), null, () -> {
|
||||||
mActivity.finish();
|
mActivity.finish();
|
||||||
}).show();
|
}).show();
|
||||||
// UtilityExceptions.defaultException(mActivity, new Exception("Impossibile caricare ordini di diverse gestioni"));
|
|
||||||
// mActivity.finish();
|
|
||||||
return;
|
return;
|
||||||
} else if(foundGestioni != null && foundGestioni.size() == 1){
|
} else if(foundGestioni != null && foundGestioni.size() == 1){
|
||||||
defaultGestioneOfUL = foundGestioni.get(0);
|
defaultGestioneOfUL = foundGestioni.get(0);
|
||||||
@ -163,6 +161,24 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
defaultGestioneOfUL = GestioneEnum.VENDITA;
|
defaultGestioneOfUL = GestioneEnum.VENDITA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Definizione del deposito di default
|
||||||
|
List<String> foundCodMdep = Stream.of(flatOrderArray)
|
||||||
|
.map(OrdineVenditaGroupedInevasoDTO.Ordine::getCodMdep)
|
||||||
|
.withoutNulls()
|
||||||
|
.distinctBy(x -> x)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
// if(foundCodMdep != null && foundCodMdep.size() > 1){
|
||||||
|
// DialogSimpleMessageHelper.makeErrorDialog(mActivity, new SpannableString(mActivity.getString(R.string.error_multiple_cod_mdep_ordv)), null, () -> {
|
||||||
|
// mActivity.finish();
|
||||||
|
// }).show();
|
||||||
|
// return;
|
||||||
|
// } else if(foundCodMdep != null && foundCodMdep.size() == 1){
|
||||||
|
// defaultCodMdepOfUL = foundCodMdep.get(0);
|
||||||
|
// } else {
|
||||||
|
defaultCodMdepOfUL = SettingsManager.i().userSession.depo.getCodMdep();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Definizione del filtro ordine da applicare a tutti i colli generati
|
//Definizione del filtro ordine da applicare a tutti i colli generati
|
||||||
@ -718,6 +734,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
.setNumOrd(defaultNumOrdOfUL)
|
.setNumOrd(defaultNumOrdOfUL)
|
||||||
.setDataOrdD(defaultDataOrdOfUL)
|
.setDataOrdD(defaultDataOrdOfUL)
|
||||||
.setCodAnag(defaultCodAnagOfUL)
|
.setCodAnag(defaultCodAnagOfUL)
|
||||||
|
.setCodMdep(defaultCodMdepOfUL)
|
||||||
.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
|
|
||||||
if(customNumCollo != null) {
|
if(customNumCollo != null) {
|
||||||
@ -826,23 +843,14 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
|
|
||||||
MtbColt cloneMtbColt = (MtbColt) mArticoliInColloBottomSheetViewModel.mtbColt.get().clone();
|
MtbColt cloneMtbColt = (MtbColt) mArticoliInColloBottomSheetViewModel.mtbColt.get().clone();
|
||||||
|
|
||||||
RunnableArgs<List<MtbColt>> tmpOnComplete = mtbColts -> {
|
IOrdiniVendita ordiniVendita = ClassRouter.getIstance(ClassRouter.PATH.ORDINI_VENDITA);
|
||||||
|
|
||||||
|
ordiniVendita.distribuisciCollo(progress, cloneMtbColt, mTestateOrdini, mtbColts -> {
|
||||||
if(mtbColtSessionID != null) ColliDataRecover.closeSession(mtbColtSessionID);
|
if(mtbColtSessionID != null) ColliDataRecover.closeSession(mtbColtSessionID);
|
||||||
onComplete.run(mtbColts);
|
onComplete.run(mtbColts);
|
||||||
};
|
}, ex -> {
|
||||||
|
|
||||||
RunnableArgs<Exception> tmpOnFailed = ex -> {
|
|
||||||
UtilityExceptions.defaultException(mActivity, ex, progress);
|
UtilityExceptions.defaultException(mActivity, ex, progress);
|
||||||
};
|
});
|
||||||
|
|
||||||
BaseRouter.invokePath(BaseRouter.PATH.DISTRIBUZIONE_COLLO_V, progress, cloneMtbColt, tmpOnComplete, tmpOnFailed);
|
|
||||||
|
|
||||||
// ColliMagazzinoRESTConsumer.distribuisciCollo(cloneMtbColt, SettingsManager.iDB().getDefaultCriterioDistribuzione(),
|
|
||||||
// mtbColts -> {
|
|
||||||
// if(mtbColtSessionID != null) ColliDataRecover.closeSession(mtbColtSessionID);
|
|
||||||
// onComplete.run(mtbColts);
|
|
||||||
// },
|
|
||||||
// ex -> UtilityExceptions.defaultException(mActivity, ex, progress));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void printCollo(ProgressDialog progress, List<MtbColt> mtbColtsToPrint) {
|
private void printCollo(ProgressDialog progress, List<MtbColt> mtbColtsToPrint) {
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
android:id="@+id/drawer_layout"
|
android:id="@+id/drawer_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/full_white"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
tools:openDrawer="start">
|
tools:openDrawer="start">
|
||||||
|
|
||||||
|
|||||||
@ -179,6 +179,7 @@
|
|||||||
android:visibility="@{viewmodel.isFabVisible ? View.VISIBLE : View.GONE}"
|
android:visibility="@{viewmodel.isFabVisible ? View.VISIBLE : View.GONE}"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
||||||
fab:menu_animationDelayPerItem="50"
|
fab:menu_animationDelayPerItem="50"
|
||||||
fab:menu_backgroundColor="@color/white_bg_alpha"
|
fab:menu_backgroundColor="@color/white_bg_alpha"
|
||||||
fab:menu_buttonSpacing="0dp"
|
fab:menu_buttonSpacing="0dp"
|
||||||
|
|||||||
@ -31,6 +31,23 @@
|
|||||||
android:layout_marginBottom="12dp"/>
|
android:layout_marginBottom="12dp"/>
|
||||||
|
|
||||||
|
|
||||||
|
<!--<com.google.android.material.textfield.TextInputLayout-->
|
||||||
|
<!--android:layout_width="match_parent"-->
|
||||||
|
<!--android:layout_height="wrap_content"-->
|
||||||
|
<!--app:hintTextAppearance="@style/hint_text">-->
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_cod_mdep"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:hint="@string/deposit"
|
||||||
|
android:focusable="false"
|
||||||
|
app:binding="@{viewmodel.deposito}"/>
|
||||||
|
|
||||||
|
<!--</com.google.android.material.textfield.TextInputLayout>-->
|
||||||
|
|
||||||
<!--<com.google.android.material.textfield.TextInputLayout-->
|
<!--<com.google.android.material.textfield.TextInputLayout-->
|
||||||
<!--android:layout_width="match_parent"-->
|
<!--android:layout_width="match_parent"-->
|
||||||
<!--android:layout_height="wrap_content"-->
|
<!--android:layout_height="wrap_content"-->
|
||||||
|
|||||||
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
|
</adaptive-icon>
|
||||||
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
|
</adaptive-icon>
|
||||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 6.9 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.4 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 16 KiB |
@ -157,6 +157,7 @@
|
|||||||
<string name="ship_date">Data consegna</string>
|
<string name="ship_date">Data consegna</string>
|
||||||
<string name="terms_of_delivery">Termini di consegna</string>
|
<string name="terms_of_delivery">Termini di consegna</string>
|
||||||
<string name="vehicle">Automezzo</string>
|
<string name="vehicle">Automezzo</string>
|
||||||
|
<string name="deposit">Deposito</string>
|
||||||
<string name="carrier">Vettore</string>
|
<string name="carrier">Vettore</string>
|
||||||
|
|
||||||
<string name="no_items_found_message">Nessun articolo trovato</string>
|
<string name="no_items_found_message">Nessun articolo trovato</string>
|
||||||
@ -177,6 +178,8 @@
|
|||||||
<string name="free_picking_suggestion_1">Per iniziare clicca sul + in basso a destra</string>
|
<string name="free_picking_suggestion_1">Per iniziare clicca sul + in basso a destra</string>
|
||||||
<string name="free_picking_suggestion_2">Scansiona un articolo per iniziare</string>
|
<string name="free_picking_suggestion_2">Scansiona un articolo per iniziare</string>
|
||||||
<string name="free_picking_title_fragment">Picking libero</string>
|
<string name="free_picking_title_fragment">Picking libero</string>
|
||||||
|
<string name="error_multiple_gest_ordv">Impossibile caricare ordini di diverse <b>gestioni</b></string>
|
||||||
|
<string name="error_multiple_cod_mdep_ordv">Impossibile caricare ordini di diversi <b>depositi</b></string>
|
||||||
|
|
||||||
<string name="recovering_data">Recupero dati</string>
|
<string name="recovering_data">Recupero dati</string>
|
||||||
<string name="wait_a_moment">Attendi qualche istante</string>
|
<string name="wait_a_moment">Attendi qualche istante</string>
|
||||||
|
|||||||
4
app/src/main/res/values/ic_launcher_background.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ic_launcher_background">#FFFFFF</color>
|
||||||
|
</resources>
|
||||||
@ -163,6 +163,7 @@
|
|||||||
<string name="ship_date">Ship date</string>
|
<string name="ship_date">Ship date</string>
|
||||||
<string name="terms_of_delivery">Terms of delivery</string>
|
<string name="terms_of_delivery">Terms of delivery</string>
|
||||||
<string name="vehicle">Vehicle</string>
|
<string name="vehicle">Vehicle</string>
|
||||||
|
<string name="deposit">Deposit</string>
|
||||||
<string name="carrier">Carrier</string>
|
<string name="carrier">Carrier</string>
|
||||||
|
|
||||||
<string name="no_items_found_message">No items found</string>
|
<string name="no_items_found_message">No items found</string>
|
||||||
@ -179,10 +180,12 @@
|
|||||||
<string name="free_picking">Free Picking</string>
|
<string name="free_picking">Free Picking</string>
|
||||||
<string name="free_picking_suggestion_1">Please press + button to start with picking</string>
|
<string name="free_picking_suggestion_1">Please press + button to start with picking</string>
|
||||||
<string name="free_picking_suggestion_2">Scan an item to start</string>
|
<string name="free_picking_suggestion_2">Scan an item to start</string>
|
||||||
|
<string name="error_multiple_gest_ordv">Can\'t load orders of different type</string>
|
||||||
|
<string name="error_multiple_cod_mdep_ordv">Can\'t load orders of different deposits</string>
|
||||||
|
|
||||||
<string name="recovering_data">Recovering data</string>
|
<string name="recovering_data">Recovering data</string>
|
||||||
<string name="wait_a_moment">Wait a moment</string>
|
<string name="wait_a_moment">Wait a moment</string>
|
||||||
<string name="title_dynamic_vgalimenti">Personalizzazione VGAlimenti</string>
|
<string name="title_dynamic_vgalimenti">VGAlimenti customization</string>
|
||||||
<string name="title_dynamic__base">Azienda Base</string>
|
<string name="title_dynamic__base">Base customization</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
build_azienda.bat _base
|
call build_azienda.bat _base
|
||||||
build_azienda.bat vgalimenti
|
call build_azienda.bat vgalimenti
|
||||||
@ -3,10 +3,10 @@ package it.integry.wms.dynamic_customization;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseRouter;
|
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
||||||
import it.integry.integrywmsnative.core.class_router.MethodDTO;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.exceptions.MethodPathAlreadyDeclaredException;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
|
import it.integry.wms.dynamic_customization.extensions.FiltroOrdiniVendita;
|
||||||
|
import it.integry.wms.dynamic_customization.extensions.OrdiniVendita;
|
||||||
|
|
||||||
public class DynamicContext {
|
public class DynamicContext {
|
||||||
|
|
||||||
@ -14,7 +14,8 @@ public class DynamicContext {
|
|||||||
Log.d("DynamicContext", "Caricamento personalizzazioni per Azienda BASE");
|
Log.d("DynamicContext", "Caricamento personalizzazioni per Azienda BASE");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
BaseRouter.registerPath(BaseRouter.PATH.DISTRIBUZIONE_COLLO_V, MethodDTO.fromName(OrdiniVendita.class, "distribuisciCollo"));
|
ClassRouter.registerPath(ClassRouter.PATH.FILTRO_ORDINI_VENDITA, FiltroOrdiniVendita.class);
|
||||||
|
ClassRouter.registerPath(ClassRouter.PATH.ORDINI_VENDITA, OrdiniVendita.class);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
UtilityExceptions.defaultException(context, ex);
|
UtilityExceptions.defaultException(context, ex);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,11 @@
|
|||||||
|
package it.integry.wms.dynamic_customization.extensions;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.class_router.interfaces.IFiltroOrdiniVendita;
|
||||||
|
|
||||||
|
public class FiltroOrdiniVendita implements IFiltroOrdiniVendita {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shoudShowCodMdepFilter() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package it.integry.wms.dynamic_customization;
|
package it.integry.wms.dynamic_customization.extensions;
|
||||||
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
|
|
||||||
@ -10,12 +10,13 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
|||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.IOrdiniVendita;
|
import it.integry.integrywmsnative.core.class_router.interfaces.IOrdiniVendita;
|
||||||
|
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaGroupedInevasoDTO;
|
||||||
|
|
||||||
public class OrdiniVendita implements IOrdiniVendita {
|
public class OrdiniVendita implements IOrdiniVendita {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void distribuisciCollo(ProgressDialog progress, MtbColt mtbColt, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void distribuisciCollo(ProgressDialog progress, MtbColt mtbColt, List<OrdineVenditaGroupedInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
UtilityToast.showToast("Avviato metodo in BaseFeature");
|
UtilityToast.showToast("Avviato metodo in BaseFeature");
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumer.distribuisciCollo(mtbColt, SettingsManager.iDB().getDefaultCriterioDistribuzione(),
|
ColliMagazzinoRESTConsumer.distribuisciCollo(mtbColt, SettingsManager.iDB().getDefaultCriterioDistribuzione(),
|
||||||
@ -3,13 +3,10 @@ package it.integry.wms.dynamic_customization;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.BaseRouter;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.MethodDTO;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.exceptions.MethodPathAlreadyDeclaredException;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
import it.integry.wms.dynamic_customization.extensions.FiltroOrdiniVendita;
|
||||||
|
import it.integry.wms.dynamic_customization.extensions.OrdiniVendita;
|
||||||
|
|
||||||
public class DynamicContext {
|
public class DynamicContext {
|
||||||
|
|
||||||
@ -17,7 +14,8 @@ public class DynamicContext {
|
|||||||
Log.d("DynamicContext", "Caricamento personalizzazioni per VGAlimenti");
|
Log.d("DynamicContext", "Caricamento personalizzazioni per VGAlimenti");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
BaseRouter.registerPath(BaseRouter.PATH.DISTRIBUZIONE_COLLO_V, MethodDTO.fromName(OrdiniVendita.class, "distribuisciCollo"));
|
ClassRouter.registerPath(ClassRouter.PATH.FILTRO_ORDINI_VENDITA, FiltroOrdiniVendita.class);
|
||||||
|
ClassRouter.registerPath(ClassRouter.PATH.ORDINI_VENDITA, OrdiniVendita.class);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
UtilityExceptions.defaultException(context, ex);
|
UtilityExceptions.defaultException(context, ex);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,27 +0,0 @@
|
|||||||
package it.integry.wms.dynamic_customization;
|
|
||||||
|
|
||||||
import android.app.ProgressDialog;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.IOrdiniVendita;
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
|
||||||
|
|
||||||
public class OrdiniVendita implements IOrdiniVendita {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void distribuisciCollo(ProgressDialog progress, MtbColt mtbColt, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
UtilityToast.showToast("Avviato metodo in VGAlimentiFeature");
|
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumer.distribuisciCollo(mtbColt, SettingsManager.iDB().getDefaultCriterioDistribuzione(),
|
|
||||||
onComplete,
|
|
||||||
onFailed);
|
|
||||||
|
|
||||||
|
|
||||||
UtilityToast.showToast("CUMBIAAA");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.wms.dynamic_customization.extensions;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.class_router.interfaces.IFiltroOrdiniVendita;
|
||||||
|
|
||||||
|
public class FiltroOrdiniVendita implements IFiltroOrdiniVendita {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shoudShowCodMdepFilter() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
package it.integry.wms.dynamic_customization.extensions;
|
||||||
|
|
||||||
|
import android.app.ProgressDialog;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.REST.model.DistribuzioneColloDTO;
|
||||||
|
import it.integry.integrywmsnative.core.class_router.interfaces.IOrdiniVendita;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaGroupedInevasoDTO;
|
||||||
|
|
||||||
|
public class OrdiniVendita implements IOrdiniVendita {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void distribuisciCollo(ProgressDialog progress, MtbColt mtbColt, List<OrdineVenditaGroupedInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
String codMdepOrder = testateOrdini.get(0).ordini.get(0).getCodMdep();
|
||||||
|
|
||||||
|
//Se il deposito del collo è diverso dal deposito dell'utente allora sto "evadendo" la merce per una vendita presente
|
||||||
|
//su un altro deposito
|
||||||
|
if(!UtilityString.isNullOrEmpty(codMdepOrder) &&
|
||||||
|
!codMdepOrder.equalsIgnoreCase(SettingsManager.i().userSession.depo.getCodMdep())) {
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumer.distribuisciCollo(mtbColt,
|
||||||
|
DistribuzioneColloDTO.CriterioDistribuzione.UPDATE,
|
||||||
|
onComplete,
|
||||||
|
onFailed);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumer.distribuisciCollo(mtbColt,
|
||||||
|
SettingsManager.iDB().getDefaultCriterioDistribuzione(),
|
||||||
|
onComplete,
|
||||||
|
onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
ext_sources/RoundLogoWithText.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
27
ext_sources/RoundLogoWithText.svg
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 23.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#FF9900;}
|
||||||
|
.st1{fill:#EC0200;}
|
||||||
|
.st2{fill:#349933;}
|
||||||
|
.st3{fill:#0199CB;}
|
||||||
|
.st4{fill:none;}
|
||||||
|
.st5{font-family:'HandelGothicBT-Regular';}
|
||||||
|
.st6{font-size:126px;}
|
||||||
|
.st7{letter-spacing:-5;}
|
||||||
|
</style>
|
||||||
|
<g>
|
||||||
|
<path class="st0" d="M443.6,222.35C427.8,132.93,349.71,65,255.76,65c-23.88,0-46.73,4.39-67.8,12.4l14.34,36.4
|
||||||
|
c16.04-5.81,33.35-8.98,51.4-8.98c74.13,0,135.77,53.43,148.53,123.87L443.6,222.35z"/>
|
||||||
|
<path class="st1" d="M250.88,446.45c1.62,0.04,3.25,0.06,4.88,0.06c105.35,0,190.76-85.41,190.76-190.76c0-3.32-0.09-6.62-0.25-9.9
|
||||||
|
l-41.84,1.45c0.15,2.8,0.23,5.63,0.23,8.47c0,83.37-69.55,150.94-152.92,150.94L250.88,446.45"/>
|
||||||
|
<path class="st2" d="M126.14,395.71c26.02,24.11,58.77,41.05,95.11,47.69l6.61-38.87c-28.78-4.96-55.35-18.7-76.09-37.5
|
||||||
|
L126.14,395.71"/>
|
||||||
|
<path class="st3" d="M160.64,90.37C103.48,123.32,65,185.04,65,255.76c0,45.27,15.77,86.86,42.12,119.57l29.71-23.99
|
||||||
|
c-21.3-26.03-34.09-59.3-34.09-95.56c0-56.37,30.9-105.53,76.69-131.45L160.64,90.37"/>
|
||||||
|
</g>
|
||||||
|
<rect x="113.4" y="205" class="st4" width="357.88" height="141.31"/>
|
||||||
|
<text transform="matrix(1 0 0 1 113.4048 295.4663)" class="st5 st6 st7">wms</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |