Compare commits
210 Commits
v1.32.21(3
...
v1.36.09(4
| Author | SHA1 | Date | |
|---|---|---|---|
| 4863b31bb6 | |||
| 8411b0fc17 | |||
| 946d3e6593 | |||
| 0bdc3a0638 | |||
| 49782755bc | |||
| 2c5fb3ba48 | |||
| bf732a1182 | |||
| a73ecc1e81 | |||
| 818351f1d0 | |||
| 27577d10cf | |||
| 09dd2ef31e | |||
| 86507d41c7 | |||
| ea6585152c | |||
| 01d7e433b5 | |||
| 185288b221 | |||
| ba35a6b32d | |||
| 04838ce08f | |||
| 7c936bc387 | |||
| 6c30400aa9 | |||
| 03aa2b17ac | |||
| 8c24f5f025 | |||
| 7f9524e0b2 | |||
| e6b50ef7da | |||
| 2275db39b3 | |||
| 3a3680b2b2 | |||
| 2189acce5a | |||
| 4a4e290a9c | |||
| 1d92759653 | |||
| bc9f4121ef | |||
| cc54c6decb | |||
| c592ba0795 | |||
| 09d009bcc5 | |||
| 95bc3031df | |||
| 0aca5df3fe | |||
| 2ce2b8b25c | |||
| bea30a5400 | |||
| ebc0d22e9f | |||
| d520e18a30 | |||
| 19122ed637 | |||
| 138500a16f | |||
| 8d93da11b1 | |||
| 9db04fcd02 | |||
| 70b2fbd47b | |||
| 9361d786b4 | |||
| c7db59b70f | |||
| 1008e2aece | |||
| d2703fd495 | |||
| 68f576fb93 | |||
| 69758da7e2 | |||
| b832a593f4 | |||
| c115a6f9f1 | |||
| 35210db708 | |||
| 51728a8103 | |||
| 3961721241 | |||
| 5d5ca02c16 | |||
| be8739c167 | |||
| 8c6b19a064 | |||
| 8751b7c698 | |||
| 42b16975d6 | |||
| 23da1b3e94 | |||
| d003a0322e | |||
| 1e129d1ea9 | |||
| a7dbe55ad2 | |||
| 99f21b19f1 | |||
| eeb06e105e | |||
| 5988667944 | |||
| 77e3d00bef | |||
| 4b475ef1e5 | |||
| 1ec0611e2a | |||
| bd81385cac | |||
| 6dbcdb0475 | |||
| e1fddc8682 | |||
| a046f736b0 | |||
| 696ea31d7d | |||
| 3d9e33464a | |||
| ab74a9cbad | |||
| d56dcc0ed2 | |||
| 7e73aceeb7 | |||
| d63c80d6b7 | |||
| bc9016cf93 | |||
| ff128a1de2 | |||
| fa6ad5a150 | |||
| a8aaf69c57 | |||
| 9c86598f03 | |||
| 031cbc8d0a | |||
| df63fbe4af | |||
| 1372e831f7 | |||
| c31700d9cb | |||
| e6ecebd49a | |||
| dfec2f2bd3 | |||
| 3d425b6b02 | |||
| 318a8f645e | |||
| 8ec314044f | |||
| 2965b18a5f | |||
| 24f6341ff6 | |||
| 589a179a1b | |||
| afc2aef691 | |||
| 19e4a14c95 | |||
| 8237466adf | |||
| 3c1471ee8d | |||
| 099d5fa54d | |||
| 8b04f3e696 | |||
| 04ef20c69a | |||
| d08ec43d29 | |||
| 64e5200912 | |||
| 9e79653769 | |||
| 1fee2c901a | |||
| 3713bb5e49 | |||
| fdeb98b82a | |||
| 3e68dd2d36 | |||
| 1a964d7a97 | |||
| 43df6fc9f5 | |||
| 10f7ecd79b | |||
| 9a60b1ff86 | |||
| 386d51ffd7 | |||
| d3804a4601 | |||
| 04720c1d97 | |||
| 0826aa0445 | |||
| 7ceb51a54b | |||
| e8351ca75b | |||
| f8ceb1fb2d | |||
| 4ef49f3523 | |||
| 21ed15a2ea | |||
| aacec1dfde | |||
| ac7e0443a6 | |||
| 4bbb0d5cbb | |||
| 05c28d62d8 | |||
| bf2ac81ab8 | |||
| 17a78ef044 | |||
| 3c78c2787a | |||
| c7358b536e | |||
| 4f9fe14f7e | |||
| 0934765176 | |||
| b7d3cb18b9 | |||
| 227c67dc23 | |||
| da3c9eae6e | |||
| bf37a1acaf | |||
| 2a8974e9c6 | |||
| c34d7dc777 | |||
| 461a2f705e | |||
| 705dd96a0e | |||
| 10128a1bae | |||
| 54d40ca06e | |||
| e4aa2d19d9 | |||
| 6251c0f1ac | |||
| 3caed63b7f | |||
| 75bc046cf5 | |||
| 97d27b047d | |||
| 44e00f4f98 | |||
| 81b053ee06 | |||
| f1b5a7ec1b | |||
| 2d4211d329 | |||
| c5ba78eeda | |||
| 1faaef7062 | |||
| 762c5fd5b5 | |||
| 9af5970ec7 | |||
| 3a5836ba4b | |||
| 72b0e29ae6 | |||
| e0cc802b62 | |||
| 2d4d9cef4e | |||
| 4a8a21b970 | |||
| 5103a53c11 | |||
| 11c4cba70c | |||
| b1dba20973 | |||
| 920c22083b | |||
| f9230ac341 | |||
| 6344c4b77d | |||
| d4c111dedc | |||
| 65dda1d5c0 | |||
| 4a7406fda1 | |||
| ef17e7a0c7 | |||
| c45850555e | |||
| 303690eed2 | |||
| ae62b26edf | |||
| 2e39754c20 | |||
| 0ae6bbcd96 | |||
| 529455931d | |||
| 46d0510ed8 | |||
| b02e12d76e | |||
| c6bbde2b67 | |||
| cfbb27a67b | |||
| 35283fc11b | |||
| c3d62f88b4 | |||
| fc8469bf07 | |||
| 400f1440db | |||
| ad12e7e65b | |||
| a63e3817b5 | |||
| cbd772bf7e | |||
| e90bd46a42 | |||
| 96bd5d516c | |||
| d9306e13c2 | |||
| fc80baeaee | |||
| c0b49b68f7 | |||
| 73242bc208 | |||
| d4b60a51bd | |||
| 1bc687c79a | |||
| 3a6b0949d4 | |||
| bfc03a4ef9 | |||
| 4dfa796790 | |||
| f0db805c84 | |||
| 0cc742e103 | |||
| d01319c417 | |||
| c0b9496041 | |||
| d4e7832f80 | |||
| cb4f9e68f5 | |||
| ac4a5b1d34 | |||
| 39ebc9d367 | |||
| 7ef0299282 | |||
| 6a998d6605 | |||
| 9eb4b0a621 |
10
.idea/deploymentTargetDropDown.xml
generated
Normal file
10
.idea/deploymentTargetDropDown.xml
generated
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetDropDown">
|
||||||
|
<value>
|
||||||
|
<entry key="app">
|
||||||
|
<State />
|
||||||
|
</entry>
|
||||||
|
</value>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
2
.idea/kotlinc.xml
generated
2
.idea/kotlinc.xml
generated
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="KotlinJpsPluginSettings">
|
<component name="KotlinJpsPluginSettings">
|
||||||
<option name="version" value="1.8.0" />
|
<option name="version" value="1.9.0" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
10
.idea/migrations.xml
generated
Normal file
10
.idea/migrations.xml
generated
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectMigrations">
|
||||||
|
<option name="MigrateToGradleLocalJavaHome">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
12
.idea/runConfigurations/app.xml
generated
12
.idea/runConfigurations/app.xml
generated
@@ -9,7 +9,6 @@
|
|||||||
<option name="ALL_USERS" value="false" />
|
<option name="ALL_USERS" value="false" />
|
||||||
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||||
<option name="CLEAR_APP_STORAGE" value="false" />
|
<option name="CLEAR_APP_STORAGE" value="false" />
|
||||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS.dynamic__base,WMS.dynamic_vgalimenti" />
|
|
||||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||||
<option name="MODE" value="default_activity" />
|
<option name="MODE" value="default_activity" />
|
||||||
<option name="CLEAR_LOGCAT" value="false" />
|
<option name="CLEAR_LOGCAT" value="false" />
|
||||||
@@ -25,6 +24,8 @@
|
|||||||
<option name="WORKING_DIR" value="" />
|
<option name="WORKING_DIR" value="" />
|
||||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||||
|
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
|
||||||
|
<option name="DEBUG_SANDBOX_SDK" value="false" />
|
||||||
</Auto>
|
</Auto>
|
||||||
<Hybrid>
|
<Hybrid>
|
||||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||||
@@ -32,14 +33,21 @@
|
|||||||
<option name="WORKING_DIR" value="" />
|
<option name="WORKING_DIR" value="" />
|
||||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||||
|
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
|
||||||
|
<option name="DEBUG_SANDBOX_SDK" value="false" />
|
||||||
</Hybrid>
|
</Hybrid>
|
||||||
<Java />
|
<Java>
|
||||||
|
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
|
||||||
|
<option name="DEBUG_SANDBOX_SDK" value="false" />
|
||||||
|
</Java>
|
||||||
<Native>
|
<Native>
|
||||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||||
<option name="SHOW_STATIC_VARS" value="true" />
|
<option name="SHOW_STATIC_VARS" value="true" />
|
||||||
<option name="WORKING_DIR" value="" />
|
<option name="WORKING_DIR" value="" />
|
||||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||||
|
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
|
||||||
|
<option name="DEBUG_SANDBOX_SDK" value="false" />
|
||||||
</Native>
|
</Native>
|
||||||
<Profilers>
|
<Profilers>
|
||||||
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 361
|
def appVersionCode = 402
|
||||||
def appVersionName = '1.32.21'
|
def appVersionName = '1.36.09'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
@@ -31,12 +31,10 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileSdkVersion 33
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "it.integry.integrywmsnative"
|
applicationId "it.integry.integrywmsnative"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 33
|
targetSdkVersion 34
|
||||||
versionCode appVersionCode
|
versionCode appVersionCode
|
||||||
versionName appVersionName
|
versionName appVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
@@ -65,8 +63,8 @@ android {
|
|||||||
android.buildFeatures.buildConfig true
|
android.buildFeatures.buildConfig true
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
coreLibraryDesugaringEnabled true
|
coreLibraryDesugaringEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,12 +88,11 @@ android {
|
|||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
namespace 'it.integry.integrywmsnative'
|
namespace 'it.integry.integrywmsnative'
|
||||||
|
compileSdk 34
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.2'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||||
exclude group: 'com.android.support', module: 'support-annotations'
|
exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
@@ -111,32 +108,32 @@ dependencies {
|
|||||||
implementation 'com.google.firebase:firebase-core'
|
implementation 'com.google.firebase:firebase-core'
|
||||||
implementation 'com.google.firebase:firebase-crashlytics'
|
implementation 'com.google.firebase:firebase-crashlytics'
|
||||||
implementation 'com.google.firebase:firebase-perf'
|
implementation 'com.google.firebase:firebase-perf'
|
||||||
implementation 'com.google.android.gms:play-services-basement:18.1.0'
|
implementation 'com.google.android.gms:play-services-basement:18.2.0'
|
||||||
|
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||||
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.8.0'
|
implementation 'com.google.android.material:material:1.10.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
||||||
|
|
||||||
implementation('androidx.preference:preference-ktx:1.2.0') {
|
implementation('androidx.preference:preference-ktx:1.2.1') {
|
||||||
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel'
|
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel'
|
||||||
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
|
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
|
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||||
implementation 'com.annimon:stream:1.2.2'
|
implementation 'com.annimon:stream:1.2.2'
|
||||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
|
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
|
||||||
// implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
// implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||||
implementation 'org.apache.commons:commons-text:1.9'
|
implementation 'org.apache.commons:commons-text:1.9'
|
||||||
|
|
||||||
//MVVM
|
//MVVM
|
||||||
def dagger2_version = '2.40.1'
|
def dagger2_version = '2.46.1'
|
||||||
api "com.google.dagger:dagger:$dagger2_version"
|
api "com.google.dagger:dagger:$dagger2_version"
|
||||||
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
||||||
api "com.google.dagger:dagger-android:$dagger2_version"
|
api "com.google.dagger:dagger-android:$dagger2_version"
|
||||||
@@ -155,12 +152,11 @@ dependencies {
|
|||||||
implementation 'com.github.pedromassango:doubleClick:3.0'
|
implementation 'com.github.pedromassango:doubleClick:3.0'
|
||||||
|
|
||||||
//SQLite ROOM
|
//SQLite ROOM
|
||||||
def room_version = "2.5.0"
|
def room_version = "2.5.2"
|
||||||
|
|
||||||
implementation "androidx.room:room-runtime:$room_version"
|
implementation "androidx.room:room-runtime:$room_version"
|
||||||
annotationProcessor "androidx.room:room-compiler:$room_version"
|
annotationProcessor "androidx.room:room-compiler:$room_version"
|
||||||
implementation "androidx.room:room-rxjava3:$room_version"
|
implementation "androidx.room:room-rxjava3:$room_version"
|
||||||
androidTestImplementation "androidx.room:room-testing:2.5.0"
|
|
||||||
|
|
||||||
//AppUpdate
|
//AppUpdate
|
||||||
implementation 'com.github.javiersantos:AppUpdater:2.7'
|
implementation 'com.github.javiersantos:AppUpdater:2.7'
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -71,7 +71,7 @@
|
|||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden" />
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.accettazione_picking.AccettazionePickingActivity"
|
android:name=".gest.accettazione_ordini_picking.AccettazioneOrdiniPickingActivity"
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing"
|
android:windowSoftInputMode="adjustNothing"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden" />
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
@@ -108,6 +108,11 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".gest.accettazione_bolla_picking.AccettazioneBollaPickingActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/Light" />
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name=".core.update.GenericFileProvider"
|
android:name=".core.update.GenericFileProvider"
|
||||||
android:authorities="${applicationId}.core.update.GenericFileProvider"
|
android:authorities="${applicationId}.core.update.GenericFileProvider"
|
||||||
|
|||||||
@@ -11,10 +11,14 @@ import it.integry.integrywmsnative.core.expansion.BaseDialogFragmentComponent;
|
|||||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragmentModule;
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragmentModule;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseFragmentComponent;
|
import it.integry.integrywmsnative.core.expansion.BaseFragmentComponent;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseFragmentModule;
|
import it.integry.integrywmsnative.core.expansion.BaseFragmentModule;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneComponent;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.MainAccettazioneBollaElencoComponent;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneModule;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.MainAccettazioneBollaElencoModule;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.AccettazionePickingComponent;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.AccettazioneBollaPickingComponent;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.AccettazionePickingModule;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.AccettazioneBollaPickingModule;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_ordini_elenco.MainAccettazioneOrdiniElencoComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_ordini_elenco.MainAccettazioneOrdiniElencoModule;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_ordini_picking.AccettazioneOrdiniPickingComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_ordini_picking.AccettazioneOrdiniPickingModule;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniComponent;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniComponent;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniModule;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniModule;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoComponent;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoComponent;
|
||||||
@@ -65,6 +69,8 @@ import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceCompo
|
|||||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.ProdRientroMerceOrderDetailComponent;
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.ProdRientroMerceOrderDetailComponent;
|
||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeComponent;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeComponent;
|
||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeModule;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeModule;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale_su_mag_prossimita.ProdVersamentoMaterialeInBufferComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale_su_mag_prossimita.ProdVersamentoMaterialeInBufferModule;
|
||||||
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditComponent;
|
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditComponent;
|
||||||
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditModule;
|
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditModule;
|
||||||
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.dialog.edit_articolo.DialogEditArticoloComponent;
|
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.dialog.edit_articolo.DialogEditArticoloComponent;
|
||||||
@@ -98,17 +104,26 @@ import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetM
|
|||||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalModule;
|
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteComponent;
|
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteModule;
|
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_linea_prod.DialogAskLineaProdComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_linea_prod.DialogAskLineaProdModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_unknown_barcode_notes.DialogAskUnknownBarcodeNotesComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_unknown_barcode_notes.DialogAskUnknownBarcodeNotesModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.bind_product_barcode_with_package.DialogBindProductBarcodeWithPackageComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.bind_product_barcode_with_package.DialogBindProductBarcodeWithPackageModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromMtbAartListComponent;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromMtbAartListComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromMtbAartListModule;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromMtbAartListModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListComponent;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListModule;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotComponent;
|
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotModule;
|
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialogComponent;
|
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdComponent;
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdModule;
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUComponent;
|
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUModule;
|
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_to_return.DialogInputQuantityToReturnComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_to_return.DialogInputQuantityToReturnModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Component;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Component;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Module;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Module;
|
||||||
import it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCComponent;
|
import it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCComponent;
|
||||||
@@ -130,7 +145,7 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
|||||||
LoginModule.class,
|
LoginModule.class,
|
||||||
MainActivityModule.class,
|
MainActivityModule.class,
|
||||||
MainFragmentModule.class,
|
MainFragmentModule.class,
|
||||||
MainAccettazioneModule.class,
|
MainAccettazioneOrdiniElencoModule.class,
|
||||||
ListaBancaliModule.class,
|
ListaBancaliModule.class,
|
||||||
ContenutoBancaleModule.class,
|
ContenutoBancaleModule.class,
|
||||||
PVOrdiniAcquistoGrigliaModule.class,
|
PVOrdiniAcquistoGrigliaModule.class,
|
||||||
@@ -139,7 +154,7 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
|||||||
RettificaGiacenzeModule.class,
|
RettificaGiacenzeModule.class,
|
||||||
ElencoInventariModule.class,
|
ElencoInventariModule.class,
|
||||||
SpedizioneModule.class,
|
SpedizioneModule.class,
|
||||||
AccettazionePickingModule.class,
|
AccettazioneOrdiniPickingModule.class,
|
||||||
UltimeConsegneClienteModule.class,
|
UltimeConsegneClienteModule.class,
|
||||||
UltimiArriviFornitoreModule.class,
|
UltimiArriviFornitoreModule.class,
|
||||||
PickingResiModule.class,
|
PickingResiModule.class,
|
||||||
@@ -177,7 +192,15 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
|||||||
DialogChooseArtsFromMtbAartListModule.class,
|
DialogChooseArtsFromMtbAartListModule.class,
|
||||||
MainSettingsModule.class,
|
MainSettingsModule.class,
|
||||||
DialogInfoSituazioneArticoloModule.class,
|
DialogInfoSituazioneArticoloModule.class,
|
||||||
DialogSelectArtToOrderModule.class
|
DialogSelectArtToOrderModule.class,
|
||||||
|
MainAccettazioneBollaElencoModule.class,
|
||||||
|
AccettazioneBollaPickingModule.class,
|
||||||
|
DialogBindProductBarcodeWithPackageModule.class,
|
||||||
|
DialogAskUnknownBarcodeNotesModule.class,
|
||||||
|
ProdVersamentoMaterialeInBufferModule.class,
|
||||||
|
DialogInputQuantityToReturnModule.class,
|
||||||
|
DialogInfoAggiuntiveLUModule.class,
|
||||||
|
DialogAskLineaProdModule.class
|
||||||
})
|
})
|
||||||
public interface MainApplicationComponent {
|
public interface MainApplicationComponent {
|
||||||
|
|
||||||
@@ -195,7 +218,7 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
MainFragmentComponent.Factory mainFragmentComponent();
|
MainFragmentComponent.Factory mainFragmentComponent();
|
||||||
|
|
||||||
MainAccettazioneComponent.Factory mainAccettazioneComponent();
|
MainAccettazioneOrdiniElencoComponent.Factory mainAccettazioneOrdiniComponent();
|
||||||
|
|
||||||
ListaBancaliComponent.Factory listaBancaliComponent();
|
ListaBancaliComponent.Factory listaBancaliComponent();
|
||||||
|
|
||||||
@@ -213,7 +236,7 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
SpedizioneComponent.Factory spedizioneComponent();
|
SpedizioneComponent.Factory spedizioneComponent();
|
||||||
|
|
||||||
AccettazionePickingComponent.Factory accettazionePickingComponent();
|
AccettazioneOrdiniPickingComponent.Factory accettazionePickingComponent();
|
||||||
|
|
||||||
UltimeConsegneClienteComponent.Factory ultimeConsegneClienteComponent();
|
UltimeConsegneClienteComponent.Factory ultimeConsegneClienteComponent();
|
||||||
|
|
||||||
@@ -263,8 +286,6 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
DocInterniEditFormComponent.Factory docInterniEditFormComponent();
|
DocInterniEditFormComponent.Factory docInterniEditFormComponent();
|
||||||
|
|
||||||
InfoAggiuntiveLUDialogComponent.Factory infoAggiuntiveLUDialogComponent();
|
|
||||||
|
|
||||||
DialogEditArticoloComponent.Factory dialogEditArticoloComponent();
|
DialogEditArticoloComponent.Factory dialogEditArticoloComponent();
|
||||||
|
|
||||||
DialogPrintOrderSSCCListComponent.Factory dialogPrintOrderSSCCListComponent();
|
DialogPrintOrderSSCCListComponent.Factory dialogPrintOrderSSCCListComponent();
|
||||||
@@ -299,6 +320,22 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
DialogSelectArtToOrderComponent.Factory dialogSelectArtToOrderNewComponent();
|
DialogSelectArtToOrderComponent.Factory dialogSelectArtToOrderNewComponent();
|
||||||
|
|
||||||
|
MainAccettazioneBollaElencoComponent.Factory mainAccettazioneBollaElencoComponent();
|
||||||
|
|
||||||
|
AccettazioneBollaPickingComponent.Factory accettazioneBollaPickingComponent();
|
||||||
|
|
||||||
|
DialogBindProductBarcodeWithPackageComponent.Factory dialogBindProductBarcodeWithPackageComponent();
|
||||||
|
|
||||||
|
DialogAskUnknownBarcodeNotesComponent.Factory dialogAskUnknownBarcodeNotesComponent();
|
||||||
|
|
||||||
|
ProdVersamentoMaterialeInBufferComponent.Factory prodVersamentoMaterialeInBufferComponent();
|
||||||
|
|
||||||
|
DialogInputQuantityToReturnComponent.Factory dialogInputQuantityToReturnComponent();
|
||||||
|
|
||||||
|
DialogInfoAggiuntiveLUComponent.Factory dialogInfoAggiuntiveLUComponent();
|
||||||
|
|
||||||
|
DialogAskLineaProdComponent.Factory dialogAskLineaProdComponent();
|
||||||
|
|
||||||
void inject(MainApplication mainApplication);
|
void inject(MainApplication mainApplication);
|
||||||
|
|
||||||
void inject(AppContext mainApplication);
|
void inject(AppContext mainApplication);
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package it.integry.integrywmsnative;
|
|||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
|
||||||
|
|
||||||
import androidx.core.os.HandlerCompat;
|
import androidx.core.os.HandlerCompat;
|
||||||
|
|
||||||
@@ -22,6 +21,7 @@ import it.integry.integrywmsnative.core.menu.MenuService;
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.AziendaRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.AziendaRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliAccettazioneRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliLavorazioneRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliLavorazioneRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsumer;
|
||||||
@@ -32,6 +32,7 @@ import it.integry.integrywmsnative.core.rest.consumers.EntityRESTConsumer;
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoAutomaticoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoAutomaticoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoBufferRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||||
@@ -72,7 +73,7 @@ public class MainApplicationModule {
|
|||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
public Handler providesMainThreadHandler() {
|
public Handler providesMainThreadHandler() {
|
||||||
return HandlerCompat.createAsync(Looper.getMainLooper());
|
return HandlerCompat.createAsync(mApplication.getApplicationContext().getMainLooper());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@@ -89,8 +90,8 @@ public class MainApplicationModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
MainContext providesMainContextNew(MenuService menuService, AppDatabase appDatabase) {
|
MainContext providesMainContextNew(MenuService menuService, AppDatabase appDatabase, SystemRESTConsumer systemRESTConsumer) {
|
||||||
return new MainContext(mApplication.getApplicationContext(), menuService, appDatabase);
|
return new MainContext(mApplication.getApplicationContext(), menuService, appDatabase, systemRESTConsumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@@ -181,8 +182,11 @@ public class MainApplicationModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
ColliMagazzinoRESTConsumer provideColliMagazzinoRESTConsumer(SystemRESTConsumer systemRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer, EntityRESTConsumer entityRESTConsumer) {
|
ColliMagazzinoRESTConsumer provideColliMagazzinoRESTConsumer(SystemRESTConsumer systemRESTConsumer,
|
||||||
return new ColliMagazzinoRESTConsumer(systemRESTConsumer, articoloRESTConsumer, entityRESTConsumer);
|
ArticoloRESTConsumer articoloRESTConsumer,
|
||||||
|
EntityRESTConsumer entityRESTConsumer,
|
||||||
|
SettingsManager settingsManager) {
|
||||||
|
return new ColliMagazzinoRESTConsumer(systemRESTConsumer, articoloRESTConsumer, entityRESTConsumer, settingsManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@@ -257,6 +261,12 @@ public class MainApplicationModule {
|
|||||||
return new DocumentRESTConsumer();
|
return new DocumentRESTConsumer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
ColliAccettazioneRESTConsumer provideColliAccettazioneRESTConsumer() {
|
||||||
|
return new ColliAccettazioneRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
ColliSpedizioneRESTConsumer provideColliSpedizioneRESTConsumer() {
|
ColliSpedizioneRESTConsumer provideColliSpedizioneRESTConsumer() {
|
||||||
@@ -265,8 +275,8 @@ public class MainApplicationModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
ColliLavorazioneRESTConsumer provideColliLavorazioneRESTConsumer() {
|
ColliLavorazioneRESTConsumer provideColliLavorazioneRESTConsumer(SettingsManager settingsManager) {
|
||||||
return new ColliLavorazioneRESTConsumer();
|
return new ColliLavorazioneRESTConsumer(settingsManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@@ -275,4 +285,10 @@ public class MainApplicationModule {
|
|||||||
return new MagazzinoAutomaticoRESTConsumer();
|
return new MagazzinoAutomaticoRESTConsumer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
MagazzinoBufferRESTConsumer provideMagazzinoBufferRESTConsumer() {
|
||||||
|
return new MagazzinoBufferRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ package it.integry.integrywmsnative.core.class_router.configs;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneFragment;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.MainAccettazioneBollaElencoFragment;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_ordini_elenco.MainAccettazioneOrdiniElencoFragment;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniFragment;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniFragment;
|
||||||
import it.integry.integrywmsnative.gest.inventario.ElencoInventariFragment;
|
import it.integry.integrywmsnative.gest.inventario.ElencoInventariFragment;
|
||||||
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.OrdiniUscitaElencoFragment;
|
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.OrdiniUscitaElencoFragment;
|
||||||
@@ -13,6 +15,7 @@ import it.integry.integrywmsnative.gest.prod_linee_produzione.ProdLineeProduzion
|
|||||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.ProdRecuperoMaterialeFragment;
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.ProdRecuperoMaterialeFragment;
|
||||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceFragment;
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceFragment;
|
||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeFragment;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeFragment;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale_su_mag_prossimita.ProdVersamentoMaterialeInBufferFragment;
|
||||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaFragment;
|
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaFragment;
|
||||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeFragment;
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeFragment;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.info_situazione_articolo.DialogInfoSituazioneArticoloView;
|
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.info_situazione_articolo.DialogInfoSituazioneArticoloView;
|
||||||
@@ -35,10 +38,18 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_accettazione)
|
.setID(R.id.nav_accettazione)
|
||||||
.setCodMenu("MG044")
|
.setCodMenu("MG044")
|
||||||
.setTitleText(R.string.accettazione_title_fragment)
|
.setTitleText(R.string.accettazione_ordine_title_fragment)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_accettazione)
|
.setTitleIcon(R.drawable.ic_dashboard_accettazione_ordini)
|
||||||
.setDrawerIcon(R.drawable.ic_black_download)
|
.setDrawerIcon(R.drawable.ic_black_download)
|
||||||
.setFragmentFactory(MainAccettazioneFragment::newInstance))
|
.setFragmentFactory(MainAccettazioneOrdiniElencoFragment::newInstance))
|
||||||
|
|
||||||
|
.addItem(new MenuItem()
|
||||||
|
.setID(R.id.nav_accettazione_bolle)
|
||||||
|
.setCodMenu("MG065")
|
||||||
|
.setTitleText(R.string.accettazione_bolle_title_fragment)
|
||||||
|
.setTitleIcon(R.drawable.ic_dashboard_accettazione_bolle)
|
||||||
|
.setDrawerIcon(R.drawable.ic_black_download)
|
||||||
|
.setFragmentFactory(MainAccettazioneBollaElencoFragment::newInstance))
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_resi_fornitore)
|
.setID(R.id.nav_resi_fornitore)
|
||||||
@@ -75,7 +86,7 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.setTitleText(R.string.free_picking)
|
.setTitleText(R.string.free_picking)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_picking_libero)
|
.setTitleIcon(R.drawable.ic_dashboard_picking_libero)
|
||||||
.setDrawerIcon(R.drawable.ic_black_barcode_scanner)
|
.setDrawerIcon(R.drawable.ic_black_barcode_scanner)
|
||||||
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(GestioneEnum.VENDITA)))
|
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(GestioneEnum.VENDITA, SettingsManager.iDB().isFlagAskClienteInPickingLibero(), false)))
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_resi_cliente)
|
.setID(R.id.nav_resi_cliente)
|
||||||
@@ -111,7 +122,7 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.setTitleText(R.string.free_lav_picking)
|
.setTitleText(R.string.free_lav_picking)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_prod_picking_libero)
|
.setTitleIcon(R.drawable.ic_dashboard_prod_picking_libero)
|
||||||
.setDrawerIcon(R.drawable.ic_black_barcode_scanner)
|
.setDrawerIcon(R.drawable.ic_black_barcode_scanner)
|
||||||
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(GestioneEnum.LAVORAZIONE)))
|
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(GestioneEnum.LAVORAZIONE, SettingsManager.iDB().isFlagAskClienteInPickingLibero(), false)))
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_prod_posizionamento_da_ord)
|
.setID(R.id.nav_prod_posizionamento_da_ord)
|
||||||
@@ -152,6 +163,14 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.setTitleIcon(R.drawable.ic_production_line)
|
.setTitleIcon(R.drawable.ic_production_line)
|
||||||
.setDrawerIcon(R.drawable.ic_production_line)
|
.setDrawerIcon(R.drawable.ic_production_line)
|
||||||
.setFragmentFactory(ProdLineeProduzioneFragment::newInstance))
|
.setFragmentFactory(ProdLineeProduzioneFragment::newInstance))
|
||||||
|
|
||||||
|
.addItem(new MenuItem()
|
||||||
|
.setID(R.id.nav_prod_versamento_materiale_in_buffer)
|
||||||
|
.setCodMenu("MG066")
|
||||||
|
.setTitleText(R.string.prod_versamento_materiale_in_buffer_title_fragment)
|
||||||
|
.setTitleIcon(R.drawable.ic_dashboard_prod_versamento_materiale)
|
||||||
|
.setDrawerIcon(R.drawable.ic_black_external)
|
||||||
|
.setFragmentFactory(ProdVersamentoMaterialeInBufferFragment::newInstance))
|
||||||
).addGroup(
|
).addGroup(
|
||||||
new MenuGroup()
|
new MenuGroup()
|
||||||
.setGroupText(R.string.internal_handling)
|
.setGroupText(R.string.internal_handling)
|
||||||
@@ -201,7 +220,7 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.setID(it.integry.integrywmsnative.R.id.nav_pv_doc_interni)
|
.setID(it.integry.integrywmsnative.R.id.nav_pv_doc_interni)
|
||||||
.setTitleText(it.integry.integrywmsnative.R.string.doc_interni)
|
.setTitleText(it.integry.integrywmsnative.R.string.doc_interni)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_contab_doc_interni)
|
.setTitleIcon(R.drawable.ic_dashboard_contab_doc_interni)
|
||||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_contab_doc_interni)
|
.setDrawerIcon(R.drawable.ic_documents_outline)
|
||||||
.setFragmentFactory(DocInterniFragment::newInstance))
|
.setFragmentFactory(DocInterniFragment::newInstance))
|
||||||
|
|
||||||
// .addItem(new MenuItem()
|
// .addItem(new MenuItem()
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import android.text.SpannableString;
|
|||||||
import android.text.Spanned;
|
import android.text.Spanned;
|
||||||
import android.text.SpannedString;
|
import android.text.SpannedString;
|
||||||
|
|
||||||
|
import com.google.firebase.installations.FirebaseInstallations;
|
||||||
|
|
||||||
import java.net.ConnectException;
|
import java.net.ConnectException;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
@@ -13,6 +15,7 @@ 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.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.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityThread;
|
import it.integry.integrywmsnative.core.utility.UtilityThread;
|
||||||
@@ -23,13 +26,15 @@ public class MainContext {
|
|||||||
private final Context applicationContext;
|
private final Context applicationContext;
|
||||||
private final MenuService menuService;
|
private final MenuService menuService;
|
||||||
private final AppDatabase appDatabase;
|
private final AppDatabase appDatabase;
|
||||||
|
private final SystemRESTConsumer systemRESTConsumer;
|
||||||
|
|
||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
|
|
||||||
public MainContext(Context applicationContext, MenuService menuService, AppDatabase appDatabase) {
|
public MainContext(Context applicationContext, MenuService menuService, AppDatabase appDatabase, SystemRESTConsumer systemRESTConsumer) {
|
||||||
this.applicationContext = applicationContext;
|
this.applicationContext = applicationContext;
|
||||||
this.menuService = menuService;
|
this.menuService = menuService;
|
||||||
this.appDatabase = appDatabase;
|
this.appDatabase = appDatabase;
|
||||||
|
this.systemRESTConsumer = systemRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
@@ -40,18 +45,40 @@ public class MainContext {
|
|||||||
exception.printStackTrace();
|
exception.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.initDeviceId(() -> {
|
||||||
this.initDBData(() -> {
|
this.initDBData(() -> {
|
||||||
this.initMenu(() -> {
|
this.initMenu(() -> {
|
||||||
|
|
||||||
if (mListener != null) mListener.onContextInitialized();
|
if (mListener != null) mListener.onContextInitialized();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
this.initServerStatusChecker();
|
this.initServerStatusChecker();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void initDeviceId(Runnable onComplete) {
|
||||||
|
if (SettingsManager.i().getUserSession().getDeviceId() != null) {
|
||||||
|
onComplete.run();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FirebaseInstallations.getInstance().getId().addOnCompleteListener(fid -> {
|
||||||
|
SettingsManager.i().getUserSession().setDeviceId(fid.getResult());
|
||||||
|
SettingsManager.update();
|
||||||
|
|
||||||
|
systemRESTConsumer.registerDevice(onComplete, ex -> {
|
||||||
|
if (mListener != null) mListener.onError(new SpannedString(ex.getMessage()));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void logout(Runnable onLoggedOut) {
|
public void logout(Runnable onLoggedOut) {
|
||||||
menuService.invalidateCache();
|
menuService.invalidateCache();
|
||||||
UtilityThread.executeParallel(() -> {
|
UtilityThread.executeParallel(() -> {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import it.integry.integrywmsnative.core.data_store.db.dao.InventarioRowDao;
|
|||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||||
@@ -40,7 +41,7 @@ import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
|||||||
InventarioRoomDTO.class,
|
InventarioRoomDTO.class,
|
||||||
InventarioRowRoomDTO.class
|
InventarioRowRoomDTO.class
|
||||||
},
|
},
|
||||||
version = 16)
|
version = 17)
|
||||||
@TypeConverters({
|
@TypeConverters({
|
||||||
DateConverter.class,
|
DateConverter.class,
|
||||||
BigDecimalConverter.class,
|
BigDecimalConverter.class,
|
||||||
@@ -68,13 +69,16 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
.addMigrations(MIGRATION_12_13)
|
.addMigrations(MIGRATION_12_13)
|
||||||
.addMigrations(MIGRATION_13_14)
|
.addMigrations(MIGRATION_13_14)
|
||||||
.addMigrations(MIGRATION_14_15)
|
.addMigrations(MIGRATION_14_15)
|
||||||
.addMigrations(MIGRATION_15_16);
|
.addMigrations(MIGRATION_15_16)
|
||||||
|
.addMigrations(MIGRATION_16_17);
|
||||||
|
|
||||||
sInstance = builder.build();
|
sInstance = builder.build();
|
||||||
}
|
}
|
||||||
return sInstance;
|
return sInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract RawDao rawDao();
|
||||||
|
|
||||||
public abstract ArticoloGrigliaDao articoloGrigliaDao();
|
public abstract ArticoloGrigliaDao articoloGrigliaDao();
|
||||||
|
|
||||||
public abstract GrigliaDao grigliaDao();
|
public abstract GrigliaDao grigliaDao();
|
||||||
@@ -92,6 +96,7 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
public abstract InventarioRowDao inventarioRowDao();
|
public abstract InventarioRowDao inventarioRowDao();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static final Migration MIGRATION_10_11 = new Migration(10, 11) {
|
static final Migration MIGRATION_10_11 = new Migration(10, 11) {
|
||||||
@Override
|
@Override
|
||||||
public void migrate(SupportSQLiteDatabase database) {
|
public void migrate(SupportSQLiteDatabase database) {
|
||||||
@@ -161,4 +166,20 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
static final Migration MIGRATION_16_17 = new Migration(16, 17) {
|
||||||
|
@Override
|
||||||
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
|
database.execSQL("ALTER TABLE inventario_rows RENAME TO _inventario_rows_old;");
|
||||||
|
database.execSQL("DROP INDEX index_inventario_rows__id;");
|
||||||
|
database.execSQL("DROP INDEX index_inventario_rows_parent_id;");
|
||||||
|
|
||||||
|
database.execSQL("CREATE TABLE inventario_rows (_id INTEGER PRIMARY KEY AUTOINCREMENT, parent_id INTEGER, cod_mart TEXT, partita_mag TEXT, descrizione TEXT, qta REAL NOT NULL DEFAULT 0, num_cnf REAL NOT NULL DEFAULT 0, qta_cnf REAL NOT NULL DEFAULT 0, unt_mis TEXT NOT NULL DEFAULT '0', data_ora_inv INTEGER, scan_cod_barre TEXT, zona TEXT, remote_sync_date INTEGER, FOREIGN KEY(parent_id) REFERENCES inventari(_id) ON UPDATE NO ACTION ON DELETE CASCADE);");
|
||||||
|
|
||||||
|
database.execSQL("INSERT INTO inventario_rows SELECT * FROM _inventario_rows_old;");
|
||||||
|
|
||||||
|
database.execSQL("CREATE INDEX index_inventario_rows__id ON inventario_rows (_id);");
|
||||||
|
database.execSQL("CREATE INDEX index_inventario_rows_parent_id ON inventario_rows (parent_id)");
|
||||||
|
database.execSQL("DROP TABLE _inventario_rows_old;");
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import it.integry.integrywmsnative.core.data_store.db.dao.InventarioRowDao;
|
|||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGrigliaRepository;
|
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGrigliaRepository;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaRepository;
|
import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaRepository;
|
||||||
@@ -53,7 +54,11 @@ public class RoomModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
@Provides
|
||||||
|
RawDao providesRawDao(AppDatabase appDatabase) {
|
||||||
|
return appDatabase.rawDao();
|
||||||
|
}
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
@Provides
|
@Provides
|
||||||
@@ -104,12 +109,6 @@ public class RoomModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
@Provides
|
@Provides
|
||||||
InventarioRowMapper providesInventarioRowMapper() {
|
InventarioRowMapper providesInventarioRowMapper() {
|
||||||
@@ -123,62 +122,50 @@ public class RoomModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
InventarioLocalDataSource providesInventarioLocalDataSource(ExecutorService executorService, InventarioDao inventarioDao) {
|
InventarioLocalDataSource providesInventarioLocalDataSource(ExecutorService executorService, InventarioDao inventarioDao) {
|
||||||
return new InventarioLocalDataSource(executorService, inventarioDao);
|
return new InventarioLocalDataSource(executorService, inventarioDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
InventarioRowLocalDataSource providesInventarioRowLocalDataSource(ExecutorService executorService, InventarioRowDao inventarioRowDao) {
|
InventarioRowLocalDataSource providesInventarioRowLocalDataSource(ExecutorService executorService, InventarioRowDao inventarioRowDao) {
|
||||||
return new InventarioRowLocalDataSource(executorService, inventarioRowDao);
|
return new InventarioRowLocalDataSource(executorService, inventarioRowDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
ArticoloGrigliaRepository providesArticoloGrigliaRepository(ExecutorService executorService, Handler handler, ArticoloGrigliaDao articoloGrigliaDao) {
|
ArticoloGrigliaRepository providesArticoloGrigliaRepository(ExecutorService executorService, Handler handler, ArticoloGrigliaDao articoloGrigliaDao) {
|
||||||
return new ArticoliGrigliaDataSource(executorService, handler, articoloGrigliaDao);
|
return new ArticoliGrigliaDataSource(executorService, handler, articoloGrigliaDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
ArticoliOrdineRepository providesArticoliOrdineRepository(ExecutorService executorService, Handler handler, ArticoloOrdineDao articoloOrdineDao) {
|
ArticoliOrdineRepository providesArticoliOrdineRepository(ExecutorService executorService, Handler handler, ArticoloOrdineDao articoloOrdineDao) {
|
||||||
return new ArticoliOrdineDataSource(executorService, handler, articoloOrdineDao);
|
return new ArticoliOrdineDataSource(executorService, handler, articoloOrdineDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
GrigliaRepository providesGrigliaRepository(ExecutorService executorService, Handler handler, GrigliaDao grigliaDao) {
|
GrigliaRepository providesGrigliaRepository(ExecutorService executorService, Handler handler, GrigliaDao grigliaDao) {
|
||||||
return new GrigliaDataSource(executorService, handler, grigliaDao);
|
return new GrigliaDataSource(executorService, handler, grigliaDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
OrdineRepository providesOrdineRepository(ExecutorService executorService, Handler handler, OrdineDao ordineDao) {
|
OrdineRepository providesOrdineRepository(ExecutorService executorService, Handler handler, OrdineDao ordineDao) {
|
||||||
return new OrdineDataSource(executorService, handler, ordineDao);
|
return new OrdineDataSource(executorService, handler, ordineDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
MtbColtRepository providesMtbColtRepository(ExecutorService executorService, Handler handler, MtbColtDao mtbColtDao) {
|
MtbColtRepository providesMtbColtRepository(ExecutorService executorService, Handler handler, MtbColtDao mtbColtDao) {
|
||||||
return new SqlMtbColtDataSource(executorService, handler, mtbColtDao);
|
return new SqlMtbColtDataSource(executorService, handler, mtbColtDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
MtbColrDataSource providesMtbColrRepository(ExecutorService executorService, Handler handler, MtbColrDao mtbColrDao) {
|
MtbColrDataSource providesMtbColrRepository(ExecutorService executorService, Handler handler, MtbColrDao mtbColrDao) {
|
||||||
return new SqlMtbColrDataSource(executorService, handler, mtbColrDao);
|
return new SqlMtbColrDataSource(executorService, handler, mtbColrDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
InventarioRepository providesInventarioRepository(ExecutorService executorService, Handler handler,
|
InventarioRepository providesInventarioRepository(ExecutorService executorService, Handler handler,
|
||||||
InventarioLocalDataSource inventarioLocalDataSource,
|
InventarioLocalDataSource inventarioLocalDataSource,
|
||||||
@@ -187,7 +174,6 @@ public class RoomModule {
|
|||||||
return new InventarioRepository(inventarioLocalDataSource, inventarioRESTConsumer, inventarioMapper, handler, executorService);
|
return new InventarioRepository(inventarioLocalDataSource, inventarioRESTConsumer, inventarioMapper, handler, executorService);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
InventarioRowRepository providesInventarioRowRepository(ExecutorService executorService, Handler handler,
|
InventarioRowRepository providesInventarioRowRepository(ExecutorService executorService, Handler handler,
|
||||||
InventarioRowLocalDataSource inventarioRowLocalDataSource,
|
InventarioRowLocalDataSource inventarioRowLocalDataSource,
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||||
|
|
||||||
|
import androidx.room.Dao;
|
||||||
|
import androidx.room.RawQuery;
|
||||||
|
import androidx.sqlite.db.SupportSQLiteQuery;
|
||||||
|
|
||||||
|
@Dao
|
||||||
|
public interface RawDao {
|
||||||
|
|
||||||
|
@RawQuery
|
||||||
|
int vacuumDb(SupportSQLiteQuery supportSQLiteQuery);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -239,15 +239,15 @@ public class ArticoloOrdine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getQtaCnfPrevistaVendita() {
|
public BigDecimal getQtaCnfPrevistaVendita() {
|
||||||
return qtaPrevistaVendita.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaPrevistaVendita.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
return qtaPrevistaVendita == null || qtaPrevistaVendita.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaPrevistaVendita.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getQtaCnfProposta() {
|
public BigDecimal getQtaCnfProposta() {
|
||||||
return qtaProposta.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaProposta.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
return qtaProposta == null || qtaProposta.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaProposta.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getQtaCnfGiacenza() {
|
public BigDecimal getQtaCnfGiacenza() {
|
||||||
return giacenza.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : giacenza.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
return giacenza == null || giacenza.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : giacenza.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNewNoPromo() {
|
public boolean isNewNoPromo() {
|
||||||
@@ -259,7 +259,7 @@ public class ArticoloOrdine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public float getCnfDaRic() {
|
public float getCnfDaRic() {
|
||||||
return qtaCnf > 0.f ? merceDaRic * qtaCnf : 0;
|
return qtaCnf > 0.f ? merceDaRic / qtaCnf : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int checkQtaProposta() {
|
public int checkQtaProposta() {
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityModelInte
|
|||||||
@ForeignKey(
|
@ForeignKey(
|
||||||
entity = InventarioRoomDTO.class,
|
entity = InventarioRoomDTO.class,
|
||||||
parentColumns = {BaseSyncDTO.Columns.ID},
|
parentColumns = {BaseSyncDTO.Columns.ID},
|
||||||
childColumns = {InventarioRowRoomDTO.Columns.PARENT_ID}
|
childColumns = {InventarioRowRoomDTO.Columns.PARENT_ID},
|
||||||
|
onDelete = ForeignKey.CASCADE
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import androidx.room.ForeignKey;
|
|||||||
import androidx.room.Index;
|
import androidx.room.Index;
|
||||||
import androidx.room.PrimaryKey;
|
import androidx.room.PrimaryKey;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Entity(
|
@Entity(
|
||||||
@@ -138,7 +138,7 @@ public class SqlMtbColr {
|
|||||||
@ColumnInfo(name = "unt_mis")
|
@ColumnInfo(name = "unt_mis")
|
||||||
private String untMis;
|
private String untMis;
|
||||||
@ColumnInfo(name = "data_scad")
|
@ColumnInfo(name = "data_scad")
|
||||||
private Date dataScad;
|
private LocalDate dataScad;
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
@@ -428,11 +428,11 @@ public class SqlMtbColr {
|
|||||||
this.descrizione = descrizione;
|
this.descrizione = descrizione;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataScad() {
|
public LocalDate getDataScad() {
|
||||||
return dataScad;
|
return dataScad;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDataScad(Date dataScad) {
|
public void setDataScad(LocalDate dataScad) {
|
||||||
this.dataScad = dataScad;
|
this.dataScad = dataScad;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|||||||
import it.integry.integrywmsnative.core.mapper.InventarioMapper;
|
import it.integry.integrywmsnative.core.mapper.InventarioMapper;
|
||||||
import it.integry.integrywmsnative.core.model.MtbInvent;
|
import it.integry.integrywmsnative.core.model.MtbInvent;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.InventarioRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.InventarioRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLiveData;
|
import it.integry.integrywmsnative.core.utility.UtilityLiveData;
|
||||||
|
|
||||||
public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioRoomDTO, InventarioMapper, InventarioLocalDataSource, InventarioRESTConsumer> {
|
public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioRoomDTO, InventarioMapper, InventarioLocalDataSource, InventarioRESTConsumer> {
|
||||||
@@ -62,16 +63,20 @@ public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioR
|
|||||||
try {
|
try {
|
||||||
var startRetrieve = new Date();
|
var startRetrieve = new Date();
|
||||||
var remoteData = remoteDataSource.makeSynchronousRetrieveRequest();
|
var remoteData = remoteDataSource.makeSynchronousRetrieveRequest();
|
||||||
Log.d("Timing [INVENTORIES RETRIEVE]", ((new Date().getTime() - startRetrieve.getTime()) / 1000) + " secs");
|
Log.d("Time INVENTORY RETRIEVE", ((new Date().getTime() - startRetrieve.getTime()) / 1000) + " secs");
|
||||||
|
|
||||||
if (remoteData == null) remoteData = new ArrayList<>();
|
if (remoteData == null) remoteData = new ArrayList<>();
|
||||||
|
|
||||||
resolveFetch(remoteData, internalLiveData.getValue(),
|
List<MtbInvent> finalRemoteData = remoteData;
|
||||||
|
|
||||||
|
resolveFetch(finalRemoteData, internalLiveData.getValue(),
|
||||||
(remoteItem, localItem) -> Objects.equals(remoteItem.getIdInventario(), localItem.getIdInventario()),
|
(remoteItem, localItem) -> Objects.equals(remoteItem.getIdInventario(), localItem.getIdInventario()),
|
||||||
(remoteItem, localItem) -> {
|
(remoteItem, localItem) -> {
|
||||||
remoteItem.setRemoteSyncDate(localItem.getRemoteSyncDate());
|
remoteItem.setRemoteSyncDate(localItem.getRemoteSyncDate());
|
||||||
remoteItem.setNew(false);
|
remoteItem.setNew(false);
|
||||||
}, onComplete, onError);
|
}, () -> handler.post(onComplete), ex -> handler.post(() -> onError.run(ex)),
|
||||||
|
SettingsManager.iDB().isFlagIsInventarioCacheEnabled());
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
onError.run(e);
|
onError.run(e);
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ public abstract class _BaseRepository<
|
|||||||
RunnableArgssWithReturn<B, B, Boolean> keyComparator,
|
RunnableArgssWithReturn<B, B, Boolean> keyComparator,
|
||||||
RunnableArgss<B, B> dataCopy,
|
RunnableArgss<B, B> dataCopy,
|
||||||
Runnable onComplete,
|
Runnable onComplete,
|
||||||
RunnableArgs<Exception> onError) {
|
RunnableArgs<Exception> onError,
|
||||||
|
boolean isCacheEnabled) {
|
||||||
List<B> finalRemoteData = dataMapper.mapRestsToRooms(remoteData);
|
List<B> finalRemoteData = dataMapper.mapRestsToRooms(remoteData);
|
||||||
|
|
||||||
if (localData == null) localData = new ArrayList<>();
|
if (localData == null) localData = new ArrayList<>();
|
||||||
@@ -53,12 +54,14 @@ public abstract class _BaseRepository<
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var dataToUpdate = finalRemoteData.stream()
|
var dataToUpdate = finalRemoteData.stream()
|
||||||
.filter(x -> x.getId() != null && finalLocalData.stream().noneMatch(x::equals))
|
.filter(x -> x.getId() != null && finalLocalData.stream().noneMatch(x::equals))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
var dataToDelete = finalLocalData.stream()
|
var dataToDelete = finalLocalData.stream()
|
||||||
.filter(x -> x.isSyncronized() && finalRemoteData.stream().noneMatch(y -> keyComparator.run(y, x)))
|
.filter(x -> (!isCacheEnabled || x.isSyncronized()) && finalRemoteData.stream().noneMatch(y -> keyComparator.run(y, x)))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
var dataToInsert = finalRemoteData.stream()
|
var dataToInsert = finalRemoteData.stream()
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import androidx.databinding.BindingAdapter;
|
|||||||
import androidx.databinding.BindingConversion;
|
import androidx.databinding.BindingConversion;
|
||||||
import androidx.databinding.Observable;
|
import androidx.databinding.Observable;
|
||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
import androidx.lifecycle.MutableLiveData;
|
|
||||||
|
|
||||||
import com.google.android.material.datepicker.MaterialDatePicker;
|
import com.google.android.material.datepicker.MaterialDatePicker;
|
||||||
import com.google.android.material.textfield.TextInputEditText;
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
@@ -33,6 +32,7 @@ import com.google.android.material.textfield.TextInputLayout;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.text.DecimalFormatSymbols;
|
import java.text.DecimalFormatSymbols;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@@ -457,8 +457,8 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
|
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
|
||||||
public static void bindEditTextDate(EditText view, final ObservableField<Date> observableDate, BaseDialogFragment parentFragment, boolean warningOnOldDates) {
|
public static void bindEditTextDate(EditText view, final ObservableField<LocalDate> observableDate, BaseDialogFragment parentFragment, boolean warningOnOldDates) {
|
||||||
Pair<ObservableField<Date>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
Pair<ObservableField<LocalDate>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
if (pair == null || pair.first != observableDate) {
|
if (pair == null || pair.first != observableDate) {
|
||||||
if (pair != null) {
|
if (pair != null) {
|
||||||
view.removeTextChangedListener(pair.second);
|
view.removeTextChangedListener(pair.second);
|
||||||
@@ -473,37 +473,33 @@ public class Converters {
|
|||||||
|
|
||||||
RunnableArgs<View> onClick = v -> {
|
RunnableArgs<View> onClick = v -> {
|
||||||
// Get Current Date
|
// Get Current Date
|
||||||
Calendar c = UtilityDate.getCalendarInstance();
|
LocalDate selectedDate = observableDate.get() != null ? observableDate.get() : UtilityDate.getNow();
|
||||||
|
|
||||||
if (observableDate.get() != null) {
|
|
||||||
c.setTime(observableDate.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var datePicker =
|
var datePicker =
|
||||||
MaterialDatePicker.Builder.datePicker()
|
MaterialDatePicker.Builder.datePicker()
|
||||||
.setSelection(c.getTimeInMillis())
|
.setSelection(UtilityDate.localDateToMillisTime(selectedDate))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
datePicker.addOnDismissListener(dialog -> {
|
datePicker.addOnDismissListener(dialog -> {
|
||||||
if(datePicker.getSelection() != null) {
|
if(datePicker.getSelection() != null) {
|
||||||
var timeInMillis = datePicker.getSelection();
|
var selectedTimeInMillis = datePicker.getSelection();
|
||||||
|
var nowTime = UtilityDate.millisTimeToLocalDate(selectedTimeInMillis, null);
|
||||||
|
|
||||||
var calendar = UtilityDate.getCalendarInstance();
|
|
||||||
calendar.setTimeInMillis(timeInMillis);
|
|
||||||
|
|
||||||
if (parentFragment != null && warningOnOldDates && calendar.before(UtilityDate.getCalendarInstance())) {
|
if (parentFragment != null && warningOnOldDates && nowTime.isBefore(UtilityDate.getNow())) {
|
||||||
DialogSimpleMessageView
|
DialogSimpleMessageView
|
||||||
.makeWarningDialog(new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
.makeWarningDialog(new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
||||||
view.setText(UtilityDate.formatDate(calendar.getTime(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
view.setText(UtilityDate.formatDate(nowTime, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
observableDate.set(calendar.getTime());
|
observableDate.set(nowTime);
|
||||||
}, () -> {
|
}, () -> {
|
||||||
|
|
||||||
})
|
})
|
||||||
.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
||||||
} else {
|
} else {
|
||||||
view.setText(UtilityDate.formatDate(calendar.getTime(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
view.setText(UtilityDate.formatDate(nowTime, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
observableDate.set(calendar.getTime());
|
observableDate.set(nowTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -522,7 +518,7 @@ public class Converters {
|
|||||||
((TextInputLayout) view.getParent().getParent()).setOnClickListener(onClick::run);
|
((TextInputLayout) view.getParent().getParent()).setOnClickListener(onClick::run);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Date newValue = observableDate.get();
|
var newValue = observableDate.get();
|
||||||
view.setText(UtilityDate.formatDate(newValue, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
view.setText(UtilityDate.formatDate(newValue, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.integrywmsnative.core.exception;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public class GridNotSelectedException extends Exception {
|
||||||
|
|
||||||
|
public GridNotSelectedException() {
|
||||||
|
super(UtilityResources.getString(R.string.grid_not_selected));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.core.exception;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public class InvalidLineaProdBarcodeException extends Exception {
|
||||||
|
|
||||||
|
public InvalidLineaProdBarcodeException() {
|
||||||
|
super(UtilityResources.getString(R.string.no_result_from_linea_prod_barcode));
|
||||||
|
}
|
||||||
|
|
||||||
|
public InvalidLineaProdBarcodeException(String barcode) {
|
||||||
|
super(UtilityResources.getString(R.string.no_result_from_linea_prod_barcode) + " (" + barcode + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -49,7 +49,7 @@ public class BaseActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||||
this.progressOpened = true;
|
this.progressOpened = true;
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
this.mCurrentProgress.show(getSupportFragmentManager(), "tag");
|
this.mCurrentProgress.show(getSupportFragmentManager(), "tag");
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class BaseDialogFragment extends DialogFragment implements DialogInterfac
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||||
this.progressOpened = true;
|
this.progressOpened = true;
|
||||||
requireActivity().runOnUiThread(() -> {
|
requireActivity().runOnUiThread(() -> {
|
||||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public abstract class BaseFragment extends Fragment {
|
|||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||||
this.progressOpened = true;
|
this.progressOpened = true;
|
||||||
executorService.execute(() -> {
|
executorService.execute(() -> {
|
||||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
@@ -141,7 +142,7 @@ public class DtbDocr {
|
|||||||
|
|
||||||
private MtbAart mtbAart;
|
private MtbAart mtbAart;
|
||||||
|
|
||||||
private String dataScadPartitaMag;
|
private LocalDate dataScadPartitaMag;
|
||||||
|
|
||||||
public String getCodAnag() {
|
public String getCodAnag() {
|
||||||
return codAnag;
|
return codAnag;
|
||||||
@@ -741,15 +742,12 @@ public class DtbDocr {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataScadPartitaMag() {
|
public LocalDate getDataScadPartitaMag() {
|
||||||
return dataScadPartitaMag;
|
return dataScadPartitaMag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataScadPartitaMagD() {
|
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataScadPartitaMag());
|
|
||||||
}
|
|
||||||
|
|
||||||
public DtbDocr setDataScadPartitaMag(String dataScadPartitaMag) {
|
public DtbDocr setDataScadPartitaMag(LocalDate dataScadPartitaMag) {
|
||||||
this.dataScadPartitaMag = dataScadPartitaMag;
|
this.dataScadPartitaMag = dataScadPartitaMag;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -865,4 +865,262 @@ public class MtbAart extends EntityBase {
|
|||||||
public MtbUntMis getFirstUntMis() {
|
public MtbUntMis getFirstUntMis() {
|
||||||
return getMtbUntMis() != null && !getMtbUntMis().isEmpty() ? getMtbUntMis().get(0) : null;
|
return getMtbUntMis() != null && !getMtbUntMis().isEmpty() ? getMtbUntMis().get(0) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
|
MtbAart mtbAart = (MtbAart) o;
|
||||||
|
|
||||||
|
if (!getCodMart().equals(mtbAart.getCodMart())) return false;
|
||||||
|
if (getDescrizione() != null ? !getDescrizione().equals(mtbAart.getDescrizione()) : mtbAart.getDescrizione() != null)
|
||||||
|
return false;
|
||||||
|
if (getUntMis() != null ? !getUntMis().equals(mtbAart.getUntMis()) : mtbAart.getUntMis() != null)
|
||||||
|
return false;
|
||||||
|
if (getBarCode() != null ? !getBarCode().equals(mtbAart.getBarCode()) : mtbAart.getBarCode() != null)
|
||||||
|
return false;
|
||||||
|
if (getPesoKg() != null ? !getPesoKg().equals(mtbAart.getPesoKg()) : mtbAart.getPesoKg() != null)
|
||||||
|
return false;
|
||||||
|
if (getQtaCnf() != null ? !getQtaCnf().equals(mtbAart.getQtaCnf()) : mtbAart.getQtaCnf() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodAliq() != null ? !getCodAliq().equals(mtbAart.getCodAliq()) : mtbAart.getCodAliq() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodScoArt() != null ? !getCodScoArt().equals(mtbAart.getCodScoArt()) : mtbAart.getCodScoArt() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodTcolUi() != null ? !getCodTcolUi().equals(mtbAart.getCodTcolUi()) : mtbAart.getCodTcolUi() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodTcolUl() != null ? !getCodTcolUl().equals(mtbAart.getCodTcolUl()) : mtbAart.getCodTcolUl() != null)
|
||||||
|
return false;
|
||||||
|
if (getArticoloComposto() != null ? !getArticoloComposto().equals(mtbAart.getArticoloComposto()) : mtbAart.getArticoloComposto() != null)
|
||||||
|
return false;
|
||||||
|
if (getEsposizioneComp() != null ? !getEsposizioneComp().equals(mtbAart.getEsposizioneComp()) : mtbAart.getEsposizioneComp() != null)
|
||||||
|
return false;
|
||||||
|
if (getDescrizioneEstesa() != null ? !getDescrizioneEstesa().equals(mtbAart.getDescrizioneEstesa()) : mtbAart.getDescrizioneEstesa() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodUltForn() != null ? !getCodUltForn().equals(mtbAart.getCodUltForn()) : mtbAart.getCodUltForn() != null)
|
||||||
|
return false;
|
||||||
|
if (getDataUltCar() != null ? !getDataUltCar().equals(mtbAart.getDataUltCar()) : mtbAart.getDataUltCar() != null)
|
||||||
|
return false;
|
||||||
|
if (getValUltCar() != null ? !getValUltCar().equals(mtbAart.getValUltCar()) : mtbAart.getValUltCar() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodUltClie() != null ? !getCodUltClie().equals(mtbAart.getCodUltClie()) : mtbAart.getCodUltClie() != null)
|
||||||
|
return false;
|
||||||
|
if (getDataUltScar() != null ? !getDataUltScar().equals(mtbAart.getDataUltScar()) : mtbAart.getDataUltScar() != null)
|
||||||
|
return false;
|
||||||
|
if (getValUltScar() != null ? !getValUltScar().equals(mtbAart.getValUltScar()) : mtbAart.getValUltScar() != null)
|
||||||
|
return false;
|
||||||
|
if (getTipoCodice() != null ? !getTipoCodice().equals(mtbAart.getTipoCodice()) : mtbAart.getTipoCodice() != null)
|
||||||
|
return false;
|
||||||
|
if (getNote() != null ? !getNote().equals(mtbAart.getNote()) : mtbAart.getNote() != null)
|
||||||
|
return false;
|
||||||
|
if (getPosizione() != null ? !getPosizione().equals(mtbAart.getPosizione()) : mtbAart.getPosizione() != null)
|
||||||
|
return false;
|
||||||
|
if (getColliPedana() != null ? !getColliPedana().equals(mtbAart.getColliPedana()) : mtbAart.getColliPedana() != null)
|
||||||
|
return false;
|
||||||
|
if (getUntMis2() != null ? !getUntMis2().equals(mtbAart.getUntMis2()) : mtbAart.getUntMis2() != null)
|
||||||
|
return false;
|
||||||
|
if (getRapConv2() != null ? !getRapConv2().equals(mtbAart.getRapConv2()) : mtbAart.getRapConv2() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagInclListino() != null ? !getFlagInclListino().equals(mtbAart.getFlagInclListino()) : mtbAart.getFlagInclListino() != null)
|
||||||
|
return false;
|
||||||
|
if (getUntMis3() != null ? !getUntMis3().equals(mtbAart.getUntMis3()) : mtbAart.getUntMis3() != null)
|
||||||
|
return false;
|
||||||
|
if (getRapConv3() != null ? !getRapConv3().equals(mtbAart.getRapConv3()) : mtbAart.getRapConv3() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMartStat() != null ? !getCodMartStat().equals(mtbAart.getCodMartStat()) : mtbAart.getCodMartStat() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMcon() != null ? !getCodMcon().equals(mtbAart.getCodMcon()) : mtbAart.getCodMcon() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMgrp() != null ? !getCodMgrp().equals(mtbAart.getCodMgrp()) : mtbAart.getCodMgrp() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMsfa() != null ? !getCodMsfa().equals(mtbAart.getCodMsfa()) : mtbAart.getCodMsfa() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMsgr() != null ? !getCodMsgr().equals(mtbAart.getCodMsgr()) : mtbAart.getCodMsgr() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMstp() != null ? !getCodMstp().equals(mtbAart.getCodMstp()) : mtbAart.getCodMstp() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMtip() != null ? !getCodMtip().equals(mtbAart.getCodMtip()) : mtbAart.getCodMtip() != null)
|
||||||
|
return false;
|
||||||
|
if (getDescrizioneStat() != null ? !getDescrizioneStat().equals(mtbAart.getDescrizioneStat()) : mtbAart.getDescrizioneStat() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagStato() != null ? !getFlagStato().equals(mtbAart.getFlagStato()) : mtbAart.getFlagStato() != null)
|
||||||
|
return false;
|
||||||
|
if (getCambioDiviCar() != null ? !getCambioDiviCar().equals(mtbAart.getCambioDiviCar()) : mtbAart.getCambioDiviCar() != null)
|
||||||
|
return false;
|
||||||
|
if (getCambioDiviScar() != null ? !getCambioDiviScar().equals(mtbAart.getCambioDiviScar()) : mtbAart.getCambioDiviScar() != null)
|
||||||
|
return false;
|
||||||
|
if (getGgScadPartita() != null ? !getGgScadPartita().equals(mtbAart.getGgScadPartita()) : mtbAart.getGgScadPartita() != null)
|
||||||
|
return false;
|
||||||
|
if (getVolumeMc() != null ? !getVolumeMc().equals(mtbAart.getVolumeMc()) : mtbAart.getVolumeMc() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagEsponiPrz() != null ? !getFlagEsponiPrz().equals(mtbAart.getFlagEsponiPrz()) : mtbAart.getFlagEsponiPrz() != null)
|
||||||
|
return false;
|
||||||
|
if (getDataUltVar() != null ? !getDataUltVar().equals(mtbAart.getDataUltVar()) : mtbAart.getDataUltVar() != null)
|
||||||
|
return false;
|
||||||
|
if (getPercSfrido() != null ? !getPercSfrido().equals(mtbAart.getPercSfrido()) : mtbAart.getPercSfrido() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodBarreImb() != null ? !getCodBarreImb().equals(mtbAart.getCodBarreImb()) : mtbAart.getCodBarreImb() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagCalcPrz() != null ? !getFlagCalcPrz().equals(mtbAart.getFlagCalcPrz()) : mtbAart.getFlagCalcPrz() != null)
|
||||||
|
return false;
|
||||||
|
if (getEsposizioneCompAcq() != null ? !getEsposizioneCompAcq().equals(mtbAart.getEsposizioneCompAcq()) : mtbAart.getEsposizioneCompAcq() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagCalcPrzAcq() != null ? !getFlagCalcPrzAcq().equals(mtbAart.getFlagCalcPrzAcq()) : mtbAart.getFlagCalcPrzAcq() != null)
|
||||||
|
return false;
|
||||||
|
if (getDiacod() != null ? !getDiacod().equals(mtbAart.getDiacod()) : mtbAart.getDiacod() != null)
|
||||||
|
return false;
|
||||||
|
if (getPlu() != null ? !getPlu().equals(mtbAart.getPlu()) : mtbAart.getPlu() != null)
|
||||||
|
return false;
|
||||||
|
if (getPartIvaProd() != null ? !getPartIvaProd().equals(mtbAart.getPartIvaProd()) : mtbAart.getPartIvaProd() != null)
|
||||||
|
return false;
|
||||||
|
if (getRagSocProd() != null ? !getRagSocProd().equals(mtbAart.getRagSocProd()) : mtbAart.getRagSocProd() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagRapConvVariabile() != null ? !getFlagRapConvVariabile().equals(mtbAart.getFlagRapConvVariabile()) : mtbAart.getFlagRapConvVariabile() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagMovArtMag() != null ? !getFlagMovArtMag().equals(mtbAart.getFlagMovArtMag()) : mtbAart.getFlagMovArtMag() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagTracciabilita() != null ? !getFlagTracciabilita().equals(mtbAart.getFlagTracciabilita()) : mtbAart.getFlagTracciabilita() != null)
|
||||||
|
return false;
|
||||||
|
if (getTaraKg() != null ? !getTaraKg().equals(mtbAart.getTaraKg()) : mtbAart.getTaraKg() != null)
|
||||||
|
return false;
|
||||||
|
if (getColliStrato() != null ? !getColliStrato().equals(mtbAart.getColliStrato()) : mtbAart.getColliStrato() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagQtaCnfFissa() != null ? !getFlagQtaCnfFissa().equals(mtbAart.getFlagQtaCnfFissa()) : mtbAart.getFlagQtaCnfFissa() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagColliPedanaFisso() != null ? !getFlagColliPedanaFisso().equals(mtbAart.getFlagColliPedanaFisso()) : mtbAart.getFlagColliPedanaFisso() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodCconCosti() != null ? !getCodCconCosti().equals(mtbAart.getCodCconCosti()) : mtbAart.getCodCconCosti() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodCconRicavi() != null ? !getCodCconRicavi().equals(mtbAart.getCodCconRicavi()) : mtbAart.getCodCconRicavi() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodDgrpArt() != null ? !getCodDgrpArt().equals(mtbAart.getCodDgrpArt()) : mtbAart.getCodDgrpArt() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodDiviCar() != null ? !getCodDiviCar().equals(mtbAart.getCodDiviCar()) : mtbAart.getCodDiviCar() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodDiviScar() != null ? !getCodDiviScar().equals(mtbAart.getCodDiviScar()) : mtbAart.getCodDiviScar() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrCat() != null ? !getCodEcrCat().equals(mtbAart.getCodEcrCat()) : mtbAart.getCodEcrCat() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrMcat() != null ? !getCodEcrMcat().equals(mtbAart.getCodEcrMcat()) : mtbAart.getCodEcrMcat() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrRep() != null ? !getCodEcrRep().equals(mtbAart.getCodEcrRep()) : mtbAart.getCodEcrRep() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrStipo() != null ? !getCodEcrStipo().equals(mtbAart.getCodEcrStipo()) : mtbAart.getCodEcrStipo() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrTipo() != null ? !getCodEcrTipo().equals(mtbAart.getCodEcrTipo()) : mtbAart.getCodEcrTipo() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodGrpBolla() != null ? !getCodGrpBolla().equals(mtbAart.getCodGrpBolla()) : mtbAart.getCodGrpBolla() != null)
|
||||||
|
return false;
|
||||||
|
if (getIngredienti() != null ? !getIngredienti().equals(mtbAart.getIngredienti()) : mtbAart.getIngredienti() != null)
|
||||||
|
return false;
|
||||||
|
if (getIdArtEqui() != null ? !getIdArtEqui().equals(mtbAart.getIdArtEqui()) : mtbAart.getIdArtEqui() != null)
|
||||||
|
return false;
|
||||||
|
if (getDescrCassa() != null ? !getDescrCassa().equals(mtbAart.getDescrCassa()) : mtbAart.getDescrCassa() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodNcIntracee() != null ? !getCodNcIntracee().equals(mtbAart.getCodNcIntracee()) : mtbAart.getCodNcIntracee() != null)
|
||||||
|
return false;
|
||||||
|
if (getMarchio() != null ? !getMarchio().equals(mtbAart.getMarchio()) : mtbAart.getMarchio() != null)
|
||||||
|
return false;
|
||||||
|
if (getSezione() != null ? !getSezione().equals(mtbAart.getSezione()) : mtbAart.getSezione() != null)
|
||||||
|
return false;
|
||||||
|
if (getUntMisRifPeso() != mtbAart.getUntMisRifPeso()) return false;
|
||||||
|
if (getQtaEsistente() != null ? !getQtaEsistente().equals(mtbAart.getQtaEsistente()) : mtbAart.getQtaEsistente() != null)
|
||||||
|
return false;
|
||||||
|
if (getQtaImpegnata() != null ? !getQtaImpegnata().equals(mtbAart.getQtaImpegnata()) : mtbAart.getQtaImpegnata() != null)
|
||||||
|
return false;
|
||||||
|
if (getNumCnfEsistente() != null ? !getNumCnfEsistente().equals(mtbAart.getNumCnfEsistente()) : mtbAart.getNumCnfEsistente() != null)
|
||||||
|
return false;
|
||||||
|
if (getNumCnfImpegnata() != null ? !getNumCnfImpegnata().equals(mtbAart.getNumCnfImpegnata()) : mtbAart.getNumCnfImpegnata() != null)
|
||||||
|
return false;
|
||||||
|
return getMtbUntMis() != null ? getMtbUntMis().equals(mtbAart.getMtbUntMis()) : mtbAart.getMtbUntMis() == null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = getCodMart().hashCode();
|
||||||
|
result = 31 * result + (getDescrizione() != null ? getDescrizione().hashCode() : 0);
|
||||||
|
result = 31 * result + (getUntMis() != null ? getUntMis().hashCode() : 0);
|
||||||
|
result = 31 * result + (getBarCode() != null ? getBarCode().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPesoKg() != null ? getPesoKg().hashCode() : 0);
|
||||||
|
result = 31 * result + (getQtaCnf() != null ? getQtaCnf().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodAliq() != null ? getCodAliq().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodScoArt() != null ? getCodScoArt().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodTcolUi() != null ? getCodTcolUi().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodTcolUl() != null ? getCodTcolUl().hashCode() : 0);
|
||||||
|
result = 31 * result + (getArticoloComposto() != null ? getArticoloComposto().hashCode() : 0);
|
||||||
|
result = 31 * result + (getEsposizioneComp() != null ? getEsposizioneComp().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDescrizioneEstesa() != null ? getDescrizioneEstesa().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodUltForn() != null ? getCodUltForn().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDataUltCar() != null ? getDataUltCar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getValUltCar() != null ? getValUltCar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodUltClie() != null ? getCodUltClie().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDataUltScar() != null ? getDataUltScar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getValUltScar() != null ? getValUltScar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getTipoCodice() != null ? getTipoCodice().hashCode() : 0);
|
||||||
|
result = 31 * result + (getNote() != null ? getNote().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPosizione() != null ? getPosizione().hashCode() : 0);
|
||||||
|
result = 31 * result + (getColliPedana() != null ? getColliPedana().hashCode() : 0);
|
||||||
|
result = 31 * result + (getUntMis2() != null ? getUntMis2().hashCode() : 0);
|
||||||
|
result = 31 * result + (getRapConv2() != null ? getRapConv2().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagInclListino() != null ? getFlagInclListino().hashCode() : 0);
|
||||||
|
result = 31 * result + (getUntMis3() != null ? getUntMis3().hashCode() : 0);
|
||||||
|
result = 31 * result + (getRapConv3() != null ? getRapConv3().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMartStat() != null ? getCodMartStat().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMcon() != null ? getCodMcon().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMgrp() != null ? getCodMgrp().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMsfa() != null ? getCodMsfa().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMsgr() != null ? getCodMsgr().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMstp() != null ? getCodMstp().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMtip() != null ? getCodMtip().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDescrizioneStat() != null ? getDescrizioneStat().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagStato() != null ? getFlagStato().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCambioDiviCar() != null ? getCambioDiviCar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCambioDiviScar() != null ? getCambioDiviScar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getGgScadPartita() != null ? getGgScadPartita().hashCode() : 0);
|
||||||
|
result = 31 * result + (getVolumeMc() != null ? getVolumeMc().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagEsponiPrz() != null ? getFlagEsponiPrz().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDataUltVar() != null ? getDataUltVar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPercSfrido() != null ? getPercSfrido().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodBarreImb() != null ? getCodBarreImb().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagCalcPrz() != null ? getFlagCalcPrz().hashCode() : 0);
|
||||||
|
result = 31 * result + (getEsposizioneCompAcq() != null ? getEsposizioneCompAcq().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagCalcPrzAcq() != null ? getFlagCalcPrzAcq().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDiacod() != null ? getDiacod().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPlu() != null ? getPlu().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPartIvaProd() != null ? getPartIvaProd().hashCode() : 0);
|
||||||
|
result = 31 * result + (getRagSocProd() != null ? getRagSocProd().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagRapConvVariabile() != null ? getFlagRapConvVariabile().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagMovArtMag() != null ? getFlagMovArtMag().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagTracciabilita() != null ? getFlagTracciabilita().hashCode() : 0);
|
||||||
|
result = 31 * result + (getTaraKg() != null ? getTaraKg().hashCode() : 0);
|
||||||
|
result = 31 * result + (getColliStrato() != null ? getColliStrato().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagQtaCnfFissa() != null ? getFlagQtaCnfFissa().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagColliPedanaFisso() != null ? getFlagColliPedanaFisso().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodCconCosti() != null ? getCodCconCosti().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodCconRicavi() != null ? getCodCconRicavi().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodDgrpArt() != null ? getCodDgrpArt().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodDiviCar() != null ? getCodDiviCar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodDiviScar() != null ? getCodDiviScar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrCat() != null ? getCodEcrCat().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrMcat() != null ? getCodEcrMcat().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrRep() != null ? getCodEcrRep().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrStipo() != null ? getCodEcrStipo().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrTipo() != null ? getCodEcrTipo().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodGrpBolla() != null ? getCodGrpBolla().hashCode() : 0);
|
||||||
|
result = 31 * result + (getIngredienti() != null ? getIngredienti().hashCode() : 0);
|
||||||
|
result = 31 * result + (getIdArtEqui() != null ? getIdArtEqui().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDescrCassa() != null ? getDescrCassa().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodNcIntracee() != null ? getCodNcIntracee().hashCode() : 0);
|
||||||
|
result = 31 * result + (getMarchio() != null ? getMarchio().hashCode() : 0);
|
||||||
|
result = 31 * result + (getSezione() != null ? getSezione().hashCode() : 0);
|
||||||
|
result = 31 * result + (getUntMisRifPeso() != null ? getUntMisRifPeso().hashCode() : 0);
|
||||||
|
result = 31 * result + (getQtaEsistente() != null ? getQtaEsistente().hashCode() : 0);
|
||||||
|
result = 31 * result + (getQtaImpegnata() != null ? getQtaImpegnata().hashCode() : 0);
|
||||||
|
result = 31 * result + (getNumCnfEsistente() != null ? getNumCnfEsistente().hashCode() : 0);
|
||||||
|
result = 31 * result + (getNumCnfImpegnata() != null ? getNumCnfImpegnata().hashCode() : 0);
|
||||||
|
result = 31 * result + (getMtbUntMis() != null ? getMtbUntMis().hashCode() : 0);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
|
||||||
|
|
||||||
public class MtbAartWithFornitore extends MtbAart {
|
|
||||||
|
|
||||||
private String codArtFor;
|
|
||||||
|
|
||||||
public String getCodArtFor() {
|
|
||||||
return codArtFor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbAartWithFornitore setCodArtFor(String codArtFor) {
|
|
||||||
this.codArtFor = codArtFor;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
@@ -36,7 +37,7 @@ public class MtbColr extends EntityBase {
|
|||||||
private BigDecimal numCnf;
|
private BigDecimal numCnf;
|
||||||
private String insPartitaMag;
|
private String insPartitaMag;
|
||||||
private String mtbPartitaMag_descrizione;
|
private String mtbPartitaMag_descrizione;
|
||||||
private String dataScadPartita;
|
private LocalDate dataScadPartita;
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
private String untMis;
|
private String untMis;
|
||||||
private Integer causale;
|
private Integer causale;
|
||||||
@@ -361,25 +362,15 @@ public class MtbColr extends EntityBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getDataScadPartitaS() {
|
public LocalDate getDataScadPartita() {
|
||||||
return dataScadPartita;
|
return dataScadPartita;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataScadPartitaD() {
|
public MtbColr setDataScadPartita(LocalDate dataScadPartita) {
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataScadPartitaS());
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbColr setDataScadPartita(String dataScadPartita) {
|
|
||||||
this.dataScadPartita = dataScadPartita;
|
this.dataScadPartita = dataScadPartita;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbColr setDataScadPartita(Date dataScadPartita) {
|
|
||||||
this.dataScadPartita = UtilityDate.formatDate(dataScadPartita, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String getDescrizione() {
|
public String getDescrizione() {
|
||||||
return descrizione;
|
return descrizione;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,30 +97,22 @@ public class MtbColt extends EntityBase {
|
|||||||
|
|
||||||
String codAnagToUse = null;
|
String codAnagToUse = null;
|
||||||
switch (gestioneEnum) {
|
switch (gestioneEnum) {
|
||||||
case ACQUISTO:
|
case ACQUISTO, LAVORAZIONE, PRODUZIONE -> {
|
||||||
case LAVORAZIONE:
|
|
||||||
case PRODUZIONE:
|
|
||||||
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
|
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
|
||||||
|
|
||||||
Optional<InternalCodAnagsDTO> optCodAnagForn = Stream.of(SettingsManager.iDB().getInternalCodAnags())
|
Optional<InternalCodAnagsDTO> optCodAnagForn = Stream.of(SettingsManager.iDB().getInternalCodAnags())
|
||||||
.filter(InternalCodAnagsDTO::isFornitore)
|
.filter(InternalCodAnagsDTO::isFornitore)
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
||||||
if (optCodAnagForn.isEmpty()) break;
|
if (optCodAnagForn.isEmpty()) break;
|
||||||
|
|
||||||
codAnagToUse = optCodAnagForn.get().getCodAnag();
|
codAnagToUse = optCodAnagForn.get().getCodAnag();
|
||||||
break;
|
}
|
||||||
case VENDITA:
|
case VENDITA -> {
|
||||||
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
|
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
|
||||||
|
|
||||||
Optional<InternalCodAnagsDTO> optCodAnagClie = Stream.of(SettingsManager.iDB().getInternalCodAnags())
|
Optional<InternalCodAnagsDTO> optCodAnagClie = Stream.of(SettingsManager.iDB().getInternalCodAnags())
|
||||||
.filter(InternalCodAnagsDTO::isCliente)
|
.filter(InternalCodAnagsDTO::isCliente)
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
||||||
if (optCodAnagClie.isEmpty()) break;
|
if (optCodAnagClie.isEmpty()) break;
|
||||||
|
|
||||||
codAnagToUse = optCodAnagClie.get().getCodAnag();
|
codAnagToUse = optCodAnagClie.get().getCodAnag();
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setCodAnag(codAnagToUse);
|
setCodAnag(codAnagToUse);
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
|
||||||
|
|
||||||
public class MtbPartitaMag extends EntityBase{
|
public class MtbPartitaMag extends EntityBase{
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
|
||||||
private String partitaMag;
|
private String partitaMag;
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
private String dataIns;
|
private LocalDateTime dataIns;
|
||||||
private String dataScad;
|
private LocalDate dataScad;
|
||||||
private Integer scelta;
|
private Integer scelta;
|
||||||
private BigDecimal costoUntUmMag;
|
private BigDecimal costoUntUmMag;
|
||||||
private BigDecimal valUntUmMag;
|
private BigDecimal valUntUmMag;
|
||||||
@@ -62,33 +61,24 @@ public class MtbPartitaMag extends EntityBase{
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataIns() {
|
public LocalDateTime getDataIns() {
|
||||||
return dataIns;
|
return dataIns;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbPartitaMag setDataIns(String dataIns) {
|
public MtbPartitaMag setDataIns(LocalDateTime dataIns) {
|
||||||
this.dataIns = dataIns;
|
this.dataIns = dataIns;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataScadS() {
|
public LocalDate getDataScad() {
|
||||||
return dataScad;
|
return dataScad;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataScadD() {
|
public MtbPartitaMag setDataScad(LocalDate dataScad) {
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataScadS());
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbPartitaMag setDataScad(String dataScad) {
|
|
||||||
this.dataScad = dataScad;
|
this.dataScad = dataScad;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbPartitaMag setDataScad(Date dataScad) {
|
|
||||||
this.dataScad = UtilityDate.formatDate(dataScad, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getScelta() {
|
public Integer getScelta() {
|
||||||
return scelta;
|
return scelta;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ public class MvwSitArtUdcDetInventario {
|
|||||||
private String codJfas;
|
private String codJfas;
|
||||||
private MtbAart mtbAart;
|
private MtbAart mtbAart;
|
||||||
|
|
||||||
|
|
||||||
public String getGestione() {
|
public String getGestione() {
|
||||||
return gestione;
|
return gestione;
|
||||||
}
|
}
|
||||||
@@ -283,7 +282,6 @@ public class MvwSitArtUdcDetInventario {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public MtbColr toMtbColr() {
|
public MtbColr toMtbColr() {
|
||||||
return new MtbColr()
|
return new MtbColr()
|
||||||
.setCodJcom(getCodJcom())
|
.setCodJcom(getCodJcom())
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model.dto;
|
||||||
|
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class AlreadyRegisteredUDCDTO {
|
||||||
|
|
||||||
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
|
private boolean canBeRecovered;
|
||||||
|
|
||||||
|
public MtbColt getMtbColt() {
|
||||||
|
return mtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlreadyRegisteredUDCDTO setMtbColt(MtbColt mtbColt) {
|
||||||
|
this.mtbColt = mtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCanBeRecovered() {
|
||||||
|
return canBeRecovered;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlreadyRegisteredUDCDTO setCanBeRecovered(boolean canBeRecovered) {
|
||||||
|
this.canBeRecovered = canBeRecovered;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -54,7 +54,7 @@ public class PickDataDTO {
|
|||||||
if (!UtilityString.isNullOrEmpty(partitaMag)) {
|
if (!UtilityString.isNullOrEmpty(partitaMag)) {
|
||||||
MtbPartitaMag mtbPartitaMag = new MtbPartitaMag()
|
MtbPartitaMag mtbPartitaMag = new MtbPartitaMag()
|
||||||
.setPartitaMag(partitaMag)
|
.setPartitaMag(partitaMag)
|
||||||
.setDataScad(UtilityDate.recognizeDateWithExceptionHandler(dataScad));
|
.setDataScad(UtilityDate.recognizeLocalDateWithExceptionHandler(dataScad));
|
||||||
|
|
||||||
manualPickDTO.setMtbPartitaMag(mtbPartitaMag);
|
manualPickDTO.setMtbPartitaMag(mtbPartitaMag);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ public class HttpInterceptor implements Interceptor {
|
|||||||
final String PROFILE_DB = SettingsManager.i().getUserSession() == null ? null : SettingsManager.i().getUserSession().getProfileDB();
|
final String PROFILE_DB = SettingsManager.i().getUserSession() == null ? null : SettingsManager.i().getUserSession().getProfileDB();
|
||||||
final String USERNAME = SettingsManager.i().getUser().getUsername();
|
final String USERNAME = SettingsManager.i().getUser().getUsername();
|
||||||
final String PASSWORD = SettingsManager.i().getUser().getPassword();
|
final String PASSWORD = SettingsManager.i().getUser().getPassword();
|
||||||
|
final String DEVICE_ID = SettingsManager.i().getUserSession().getDeviceId();
|
||||||
|
|
||||||
final Request request = chain.request();
|
final Request request = chain.request();
|
||||||
final HttpUrl url = request.url().newBuilder()
|
final HttpUrl url = request.url().newBuilder()
|
||||||
@@ -36,6 +37,7 @@ public class HttpInterceptor implements Interceptor {
|
|||||||
.addHeader("Accept", "*/*")
|
.addHeader("Accept", "*/*")
|
||||||
.addHeader("username", USERNAME != null ? USERNAME : "")
|
.addHeader("username", USERNAME != null ? USERNAME : "")
|
||||||
.addHeader("password", PASSWORD != null ? PASSWORD : "")
|
.addHeader("password", PASSWORD != null ? PASSWORD : "")
|
||||||
|
.addHeader("device_id", DEVICE_ID != null ? DEVICE_ID : "")
|
||||||
.url(url).build();
|
.url(url).build();
|
||||||
|
|
||||||
return chain.proceed(newRequest);
|
return chain.proceed(newRequest);
|
||||||
|
|||||||
@@ -1,24 +1,17 @@
|
|||||||
package it.integry.integrywmsnative.core.rest;
|
package it.integry.integrywmsnative.core.rest;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
|
||||||
|
|
||||||
import java.lang.reflect.Modifier;
|
|
||||||
import java.security.KeyManagementException;
|
import java.security.KeyManagementException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
import javax.net.ssl.TrustManager;
|
import javax.net.ssl.TrustManager;
|
||||||
import javax.net.ssl.X509TrustManager;
|
import javax.net.ssl.X509TrustManager;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.rest.deserializer.LocalDateDeserializer;
|
|
||||||
import it.integry.integrywmsnative.core.rest.deserializer.LocalDateTimeDeserializer;
|
|
||||||
import it.integry.integrywmsnative.core.rest.serializer.LocalDateSerializer;
|
|
||||||
import it.integry.integrywmsnative.core.rest.serializer.LocalDateTimeSerializer;
|
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityGson;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import retrofit2.Retrofit;
|
import retrofit2.Retrofit;
|
||||||
import retrofit2.converter.gson.GsonConverterFactory;
|
import retrofit2.converter.gson.GsonConverterFactory;
|
||||||
@@ -63,17 +56,10 @@ public class RESTBuilder {
|
|||||||
|
|
||||||
OkHttpClient client = clientBuilder.build();
|
OkHttpClient client = clientBuilder.build();
|
||||||
|
|
||||||
String endpoint = protocol + "://" + host + ":" + port + "/" + (addEmsApi ? "ems-api/" : "");
|
String endpoint = protocol + "://" + host + (port > 0 ? ":" + port : "") + "/" + (addEmsApi ? "ems-api/" : "");
|
||||||
|
|
||||||
|
|
||||||
Gson gson = new GsonBuilder()
|
Gson gson = UtilityGson.createObject();
|
||||||
.setDateFormat("dd/MM/yyyy HH:mm:ss")
|
|
||||||
.excludeFieldsWithModifiers(Modifier.TRANSIENT)
|
|
||||||
.registerTypeAdapter(LocalDate.class, new LocalDateDeserializer())
|
|
||||||
.registerTypeAdapter(LocalDate.class, new LocalDateSerializer())
|
|
||||||
.registerTypeAdapter(LocalDateTime.class, new LocalDateTimeDeserializer())
|
|
||||||
.registerTypeAdapter(LocalDateTime.class, new LocalDateTimeSerializer())
|
|
||||||
.create();
|
|
||||||
|
|
||||||
Retrofit retrofit = new Retrofit.Builder().addConverterFactory(GsonConverterFactory.create(gson)).baseUrl(endpoint).client(client).build();
|
Retrofit retrofit = new Retrofit.Builder().addConverterFactory(GsonConverterFactory.create(gson)).baseUrl(endpoint).client(client).build();
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
import com.annimon.stream.Collectors;
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -14,9 +14,14 @@ import javax.inject.Singleton;
|
|||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbGrup;
|
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCodMartRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.UpdateBarcodeImballoRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
@@ -31,20 +36,25 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
this.systemRESTConsumer = systemRESTConsumer;
|
this.systemRESTConsumer = systemRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getByBarcodeProd(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void searchByBarcode(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
articoloRESTConsumerService.getByBarcodeProd(barcodeProd).enqueue(new Callback<>() {
|
|
||||||
|
var request = new SearchArticoloByBarcodeRequestDTO()
|
||||||
|
.setBarcode(barcodeProd)
|
||||||
|
.setOnlyActive(true);
|
||||||
|
|
||||||
|
articoloRESTConsumerService
|
||||||
|
.searchByBarcode(request)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
public void onResponse(Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> call, Response<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> response) {
|
||||||
analyzeAnswer(response, "getByBarcodeProd", (m) -> {
|
analyzeAnswer(response, "searchByBarcode", (m) -> {
|
||||||
List<MtbAart> aartList = response.body().getEntityList();
|
onComplete.run(response.body().getDto().getArts());
|
||||||
aartList = aartList != null ? Stream.of(aartList).filter(x -> x.getFlagStato().equalsIgnoreCase("A")).toList() : null;
|
|
||||||
onComplete.run(aartList);
|
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> call, Throwable t) {
|
||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -57,12 +67,16 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
public static void getByCodMartsStatic(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void getByCodMartsStatic(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
String joinedCods = Stream.of(codMartToFind)
|
var codMarts = Stream.of(codMartToFind)
|
||||||
.collect(Collectors.joining(","));
|
.withoutNulls()
|
||||||
|
.distinct().toList();
|
||||||
|
|
||||||
|
|
||||||
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
articoloRESTConsumer.getByCodMart(joinedCods).enqueue(new Callback<>() {
|
articoloRESTConsumer
|
||||||
|
.getByCodMart(new RetrieveArticoloByCodMartRequestDTO()
|
||||||
|
.setCodMarts(codMarts))
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
analyzeAnswer(response, "getByCodMart", (m) -> {
|
||||||
@@ -99,7 +113,10 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void getByCodMart(String codMartToFind, RunnableArgs<MtbAart> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getByCodMart(String codMartToFind, RunnableArgs<MtbAart> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
articoloRESTConsumer.getByCodMart(codMartToFind).enqueue(new Callback<>() {
|
articoloRESTConsumer.getByCodMart(
|
||||||
|
new RetrieveArticoloByCodMartRequestDTO()
|
||||||
|
.setCodMarts(Collections.singletonList(codMartToFind)))
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
analyzeAnswer(response, "getByCodMart", (m) -> {
|
||||||
@@ -131,8 +148,80 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbGrup>>() {
|
Type typeOfObjectsList = new TypeToken<ArrayList<MtbGrup>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
this.systemRESTConsumer.processSql("SELECT * FROM mtb_grup " + whereCond, typeOfObjectsList, onComplete, onFailed);
|
|
||||||
|
|
||||||
|
this.systemRESTConsumer.processSql("SELECT * FROM mtb_grup " + whereCond, typeOfObjectsList, onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void getUntMisArts(List<String> inputUntMis, RunnableArgs<List<MtbUntMis>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
List<HashMap<String, Object>> whereCondList = Stream.of(inputUntMis)
|
||||||
|
.distinct()
|
||||||
|
.withoutNulls()
|
||||||
|
.map(x -> {
|
||||||
|
HashMap<String, Object> data = new HashMap<>();
|
||||||
|
data.put("unt_mis", x);
|
||||||
|
return data;
|
||||||
|
})
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
var whereCond = whereCondList.isEmpty() ? "" : " WHERE " + UtilityQuery.concatFieldListInWhereCond(whereCondList);
|
||||||
|
|
||||||
|
Type typeOfObjectsList = new TypeToken<ArrayList<MtbUntMis>>() {
|
||||||
|
}.getType();
|
||||||
|
this.systemRESTConsumer.processSql("SELECT * FROM mtb_unt_mis " + whereCond, typeOfObjectsList, onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fillMtbAartsWithMtbUntMis(List<MtbAart> inputMtbAart, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
var inputUntMis = new ArrayList<String>();
|
||||||
|
|
||||||
|
if (inputMtbAart != null && !inputMtbAart.isEmpty()) {
|
||||||
|
inputUntMis.addAll(Stream.of(inputMtbAart)
|
||||||
|
.map(MtbAart::getUntMis)
|
||||||
|
.withoutNulls()
|
||||||
|
.distinct()
|
||||||
|
.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (inputUntMis.isEmpty()) {
|
||||||
|
onComplete.run(inputMtbAart);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
getUntMisArts(inputUntMis, mtbUntMiss -> {
|
||||||
|
for (var item : inputMtbAart) {
|
||||||
|
var mtbUntMis = Stream.of(mtbUntMiss).filter(x -> x.getUntMis().equalsIgnoreCase(item.getUntMis()))
|
||||||
|
.findFirstOrElse(null);
|
||||||
|
|
||||||
|
if (mtbUntMis != null)
|
||||||
|
item.setMtbUntMis(Collections.singletonList(mtbUntMis));
|
||||||
|
}
|
||||||
|
|
||||||
|
onComplete.run(inputMtbAart);
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void updateBarcodeImballo(String codMart, String newBarcodeImballo, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
|
|
||||||
|
var request = new UpdateBarcodeImballoRequestDTO()
|
||||||
|
.setCodMart(codMart)
|
||||||
|
.setNewBarcodeImballo(newBarcodeImballo);
|
||||||
|
|
||||||
|
articoloRESTConsumerService
|
||||||
|
.updateBarcodeImballo(request)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "updateBarcodeImballo", m -> {
|
||||||
|
onComplete.run();
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,19 +5,26 @@ import java.util.List;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCodMartRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.UpdateBarcodeImballoRequestDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.GET;
|
import retrofit2.http.GET;
|
||||||
import retrofit2.http.POST;
|
import retrofit2.http.POST;
|
||||||
import retrofit2.http.Query;
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
public interface ArticoloRESTConsumerService {
|
public interface ArticoloRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("wms/articolo/searchByBarcode")
|
||||||
|
Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> searchByBarcode(@Body() SearchArticoloByBarcodeRequestDTO searchArticoloByBarcodeRequest);
|
||||||
|
|
||||||
@POST("SM2getArticoloByBarcode")
|
@POST("wms/articolo/retrieveByCodMart")
|
||||||
Call<ServiceRESTResponse<MtbAart>> getByBarcodeProd(@Query("barcode") String barcodeProd);
|
Call<ServiceRESTResponse<MtbAart>> getByCodMart(@Body RetrieveArticoloByCodMartRequestDTO retrieveArticoloByCodMartRequest);
|
||||||
|
|
||||||
@GET("SM2getArticoloByCodMart")
|
@POST("wms/articolo/updateBarcodeImballo")
|
||||||
Call<ServiceRESTResponse<MtbAart>> getByCodMart(@Query("codMart") String barcodeProd);
|
Call<ServiceRESTResponse<Void>> updateBarcodeImballo(@Body UpdateBarcodeImballoRequestDTO updateBarcodeImballoRequest);
|
||||||
|
|
||||||
@GET("getProductLotStatus")
|
@GET("getProductLotStatus")
|
||||||
Call<ServiceRESTResponse<List<StatoArticoloDTO>>> getStatoPartita(@Query("codMart") String codMart, @Query("partitaMag") String partitaMag);
|
Call<ServiceRESTResponse<List<StatoArticoloDTO>>> getStatoPartita(@Query("codMart") String codMart, @Query("partitaMag") String partitaMag);
|
||||||
|
|||||||
@@ -0,0 +1,117 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliCaricoRESTConsumerInterface;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class ColliAccettazioneRESTConsumer extends _BaseRESTConsumer implements ColliCaricoRESTConsumerInterface {
|
||||||
|
|
||||||
|
public void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.createUDC(createUDCRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Response<ServiceRESTResponse<CreateUDCResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/createUDC", data -> onComplete.run(data.getMtbColt()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs<CloseUDCResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.closeUDC(closeUDCRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Response<ServiceRESTResponse<CloseUDCResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/closeUDC", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.insertUDCRow(insertUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Response<ServiceRESTResponse<InsertUDCRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/insertUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.editUDCRow(editUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDCRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/editUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.deleteUDCRow(deleteUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/deleteUDCRow", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface ColliAccettazioneRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("wms/accettazione/createUDC")
|
||||||
|
Call<ServiceRESTResponse<CreateUDCResponseDTO>> createUDC(@Body CreateUDCRequestDTO createUDCRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/accettazione/closeUDC")
|
||||||
|
Call<ServiceRESTResponse<CloseUDCResponseDTO>> closeUDC(@Body CloseUDCRequestDTO closeUDCRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/accettazione/insertUDCRow")
|
||||||
|
Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> insertUDCRow(@Body InsertUDCRowRequestDTO insertUDCRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/accettazione/editUDCRow")
|
||||||
|
Call<ServiceRESTResponse<EditUDCRowResponseDTO>> editUDCRow(@Body EditUDCRowRequestDTO editUDCRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/accettazione/deleteUDCRow")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUDCRow(@Body DeleteUDCRowRequestDTO deleteUDCRowRequestDTO);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,33 +1,124 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliCaricoRESTConsumerInterface;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliScaricoRESTConsumerInterface;
|
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliScaricoRESTConsumerInterface;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSFromArtRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements ColliScaricoRESTConsumerInterface {
|
public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements ColliCaricoRESTConsumerInterface, ColliScaricoRESTConsumerInterface {
|
||||||
|
|
||||||
|
|
||||||
|
private final SettingsManager settingsManager;
|
||||||
|
|
||||||
|
public ColliLavorazioneRESTConsumer(SettingsManager settingsManager) {
|
||||||
|
this.settingsManager = settingsManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.createUDC(createUDCRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Response<ServiceRESTResponse<CreateUDCResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/createUDC", data -> onComplete.run(data.getMtbColt()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs<CloseUDCResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.closeUDC(closeUDCRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Response<ServiceRESTResponse<CloseUDCResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/closeUDC", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.insertUDCRow(insertUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Response<ServiceRESTResponse<InsertUDCRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/insertUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.editUDCRow(editUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDCRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/editUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void createUDS(CreateUDSRequestDTO createUDSRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void createUDS(CreateUDSRequestDTO createUDSRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
@@ -64,63 +155,6 @@ public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements C
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void canUDSBeDeleted(CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
|
||||||
|
|
||||||
colliLavorazioneRESTConsumerService.canUDSBeDeleted(canUDSBeDeletedRequestDTO)
|
|
||||||
.enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Boolean>> call, Response<ServiceRESTResponse<Boolean>> response) {
|
|
||||||
analyzeAnswer(response, "lavorazione/canUDSBeDeleted", onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Boolean>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deleteUDS(DeleteUDSRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
|
||||||
|
|
||||||
colliLavorazioneRESTConsumerService.deleteUDS(deleteUDSRequestDTO)
|
|
||||||
.enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
|
||||||
analyzeAnswer(response, "lavorazione/deleteUDS", Void -> onComplete.run(), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void printUDS(PrintUDSRequestDTO printUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
|
||||||
|
|
||||||
colliLavorazioneRESTConsumerService.printUDS(printUDSRequestDTO)
|
|
||||||
.enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
|
||||||
analyzeAnswer(response, "lavorazione/printUDS", Void -> onComplete.run(), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
@@ -174,4 +208,60 @@ public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements C
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.deleteUDCRow(deleteUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/deleteUDCRow", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void createColloScaricoDaArticolo(MtbAart mtbAart,
|
||||||
|
String partitaMag,
|
||||||
|
MtbDepoPosizione posizione,
|
||||||
|
BigDecimal qta, BigDecimal qtaCnf, BigDecimal numCnf,
|
||||||
|
BigDecimal pesoNettoKg, BigDecimal pesoLordoKg,
|
||||||
|
Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
CreateUDSFromArtRequestDTO createUDSFromArtRequestDTO = new CreateUDSFromArtRequestDTO()
|
||||||
|
.setCodMart(mtbAart.getCodMart())
|
||||||
|
.setCodMdep(settingsManager.getSettings().getUserSession().getDepo().getCodMdep())
|
||||||
|
.setPartitaMag(partitaMag)
|
||||||
|
.setPosizione(posizione != null ? posizione.getPosizione() : null)
|
||||||
|
.setQta(qta)
|
||||||
|
.setQtaCnf(qtaCnf)
|
||||||
|
.setNumCnf(numCnf)
|
||||||
|
.setPesoLordoKg(pesoLordoKg)
|
||||||
|
.setPesoNettoKg(pesoNettoKg);
|
||||||
|
|
||||||
|
if (posizione != null && posizione.isFlagLineaProduzione()) {
|
||||||
|
createUDSFromArtRequestDTO
|
||||||
|
.setCodJfas(posizione.getPosizione());
|
||||||
|
}
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.createUDSFromArt(createUDSFromArtRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/createUDSFromArt", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,46 +1,62 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSFromArtRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.POST;
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
public interface ColliLavorazioneRESTConsumerService {
|
public interface ColliLavorazioneRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/createUDC")
|
||||||
|
Call<ServiceRESTResponse<CreateUDCResponseDTO>> createUDC(@Body CreateUDCRequestDTO createUDCRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/createUDS")
|
@POST("wms/lavorazione/createUDS")
|
||||||
Call<ServiceRESTResponse<CreateUDSResponseDTO>> createUDS(@Body CreateUDSRequestDTO createUDSRequestDTO);
|
Call<ServiceRESTResponse<CreateUDSResponseDTO>> createUDS(@Body CreateUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/closeUDC")
|
||||||
|
Call<ServiceRESTResponse<CloseUDCResponseDTO>> closeUDC(@Body CloseUDCRequestDTO createUDCRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/closeUDS")
|
@POST("wms/lavorazione/closeUDS")
|
||||||
Call<ServiceRESTResponse<CloseUDSResponseDTO>> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
|
Call<ServiceRESTResponse<CloseUDSResponseDTO>> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/canUDSBeDeleted")
|
@POST("wms/lavorazione/insertUDCRow")
|
||||||
Call<ServiceRESTResponse<Boolean>> canUDSBeDeleted(@Body CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO);
|
Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> insertUDCRow(@Body InsertUDCRowRequestDTO insertUDCRowRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/deleteUDS")
|
|
||||||
Call<ServiceRESTResponse<Void>> deleteUDS(@Body DeleteUDSRequestDTO deleteUDSRequestDTO);
|
|
||||||
|
|
||||||
@POST("wms/lavorazione/printUDS")
|
|
||||||
Call<ServiceRESTResponse<Void>> printUDS(@Body PrintUDSRequestDTO printUDSRequestDTO);
|
|
||||||
|
|
||||||
@POST("wms/lavorazione/insertUDSRow")
|
@POST("wms/lavorazione/insertUDSRow")
|
||||||
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/editUDCRow")
|
||||||
|
Call<ServiceRESTResponse<EditUDCRowResponseDTO>> editUDCRow(@Body EditUDCRowRequestDTO editUDCRowRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/editUDSRow")
|
@POST("wms/lavorazione/editUDSRow")
|
||||||
Call<ServiceRESTResponse<EditUDSRowResponseDTO>> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
|
Call<ServiceRESTResponse<EditUDSRowResponseDTO>> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
|
||||||
|
|
||||||
@POST("wms/lavorazione/deleteUDSRow")
|
@POST("wms/lavorazione/deleteUDSRow")
|
||||||
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/deleteUDCRow")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUDCRow(@Body DeleteUDCRowRequestDTO deleteUDCRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/createUDSFromArt")
|
||||||
|
Call<ServiceRESTResponse<Void>> createUDSFromArt(@Body CreateUDSFromArtRequestDTO createUDSFromArtRequestDTO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
@@ -47,18 +50,23 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
private final SystemRESTConsumer mSystemRESTConsumer;
|
private final SystemRESTConsumer mSystemRESTConsumer;
|
||||||
private final ArticoloRESTConsumer mArticoloRESTConsumer;
|
private final ArticoloRESTConsumer mArticoloRESTConsumer;
|
||||||
private final EntityRESTConsumer mEntityRESTConsumer;
|
private final EntityRESTConsumer mEntityRESTConsumer;
|
||||||
|
private final SettingsManager mSettingsManager;
|
||||||
|
|
||||||
public ColliMagazzinoRESTConsumer(SystemRESTConsumer systemRESTConsumer,
|
public ColliMagazzinoRESTConsumer(SystemRESTConsumer systemRESTConsumer,
|
||||||
ArticoloRESTConsumer articoloRESTConsumer,
|
ArticoloRESTConsumer articoloRESTConsumer,
|
||||||
EntityRESTConsumer entityRESTConsumer) {
|
EntityRESTConsumer entityRESTConsumer,
|
||||||
|
SettingsManager settingsManager) {
|
||||||
this.mSystemRESTConsumer = systemRESTConsumer;
|
this.mSystemRESTConsumer = systemRESTConsumer;
|
||||||
this.mArticoloRESTConsumer = articoloRESTConsumer;
|
this.mArticoloRESTConsumer = articoloRESTConsumer;
|
||||||
this.mEntityRESTConsumer = entityRESTConsumer;
|
this.mEntityRESTConsumer = entityRESTConsumer;
|
||||||
|
this.mSettingsManager = settingsManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveCollo(MtbColt mtbColtToSave, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void saveCollo(MtbColt mtbColtToSave, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
MtbColt mtbColtToSaveClone = (MtbColt) mtbColtToSave.clone();
|
MtbColt mtbColtToSaveClone = (MtbColt) mtbColtToSave.clone();
|
||||||
mtbColtToSave.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
mtbColtToSaveClone.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
|
mtbColtToSaveClone.setOnlyPkMaster(false);
|
||||||
|
|
||||||
|
|
||||||
mtbColtToSaveClone.setMtbColr(new ObservableArrayList<>());
|
mtbColtToSaveClone.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
@@ -166,6 +174,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
saveCollo(newMtbColt, onComplete, onFailed);
|
saveCollo(newMtbColt, onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void createColliScaricoDaOrdineLavorazione(MtbColt sourceMtbColt, MtbColr sourceMtbColr, MtbDepoPosizione posizione, List<OrdineLavorazioneDTO> ordini, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void createColliScaricoDaOrdineLavorazione(MtbColt sourceMtbColt, MtbColr sourceMtbColr, MtbDepoPosizione posizione, List<OrdineLavorazioneDTO> ordini, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
MtbColt newMtbColt = new MtbColt()
|
MtbColt newMtbColt = new MtbColt()
|
||||||
@@ -269,14 +278,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
saveCollo(mtbColtToCreate, onComplete, onFailed);
|
saveCollo(mtbColtToCreate, onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteCollo(MtbColt mtbColtToDelete, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
|
|
||||||
mtbColtToDelete.setOperation(CommonModelConsts.OPERATION.DELETE);
|
|
||||||
|
|
||||||
saveCollo(mtbColtToDelete, value -> {
|
|
||||||
if (onComplete != null) onComplete.run();
|
|
||||||
}, onFailed);
|
|
||||||
}
|
|
||||||
public void getBySSCC(String ssccString, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getBySSCC(String ssccString, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
colliMagazzinoRESTConsumerService.getColloByBarcode(ssccString, onlyResiduo, throwExcIfNull).enqueue(new Callback<>() {
|
colliMagazzinoRESTConsumerService.getColloByBarcode(ssccString, onlyResiduo, throwExcIfNull).enqueue(new Callback<>() {
|
||||||
@@ -305,6 +306,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void fillMtbAartsOfMtbColts(List<MtbColt> mtbColts, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void fillMtbAartsOfMtbColts(List<MtbColt> mtbColts, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
fillMtbAartsOfMtbColtsStatic(mtbColts, onComplete, onFailed);
|
fillMtbAartsOfMtbColtsStatic(mtbColts, onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void fillMtbAartsOfMtbColtsStatic(List<MtbColt> mtbColts, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void fillMtbAartsOfMtbColtsStatic(List<MtbColt> mtbColts, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
List<String> codMarts = new ArrayList<>();
|
List<String> codMarts = new ArrayList<>();
|
||||||
|
|
||||||
@@ -449,52 +451,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void canLUBeDeleted(MtbColt mtbColt, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
|
|
||||||
HashMap<String, Object> params = new HashMap<>();
|
|
||||||
params.put("mtb_colt.gestione", mtbColt.getGestione());
|
|
||||||
params.put("mtb_colt.ser_collo", mtbColt.getSerCollo());
|
|
||||||
params.put("mtb_colt.num_collo", mtbColt.getNumCollo());
|
|
||||||
params.put("mtb_colt.data_collo", mtbColt.getDataColloD());
|
|
||||||
|
|
||||||
String whereCond = UtilityQuery.concatFieldsInWhereCond(params);
|
|
||||||
|
|
||||||
|
|
||||||
String query = "SELECT mtb_colt.* " +
|
|
||||||
"FROM mtb_colt " +
|
|
||||||
"LEFT OUTER JOIN " +
|
|
||||||
" (SELECT gestione, " +
|
|
||||||
" data_collo, " +
|
|
||||||
" num_collo, " +
|
|
||||||
" ser_collo, " +
|
|
||||||
" cod_mart, " +
|
|
||||||
" cod_col, " +
|
|
||||||
" cod_tagl, " +
|
|
||||||
" partita_mag, " +
|
|
||||||
" SUM(qta_col) sum_qta_col " +
|
|
||||||
" FROM mtb_colr " +
|
|
||||||
" GROUP BY gestione, " +
|
|
||||||
" data_collo, " +
|
|
||||||
" num_collo, " +
|
|
||||||
" ser_collo, " +
|
|
||||||
" cod_mart, " +
|
|
||||||
" cod_col, " +
|
|
||||||
" cod_tagl, " +
|
|
||||||
" partita_mag) sum_mtb_colr ON mtb_colt.gestione = sum_mtb_colr.gestione " +
|
|
||||||
"AND mtb_colt.num_collo = sum_mtb_colr.num_collo " +
|
|
||||||
"AND mtb_colt.data_collo = sum_mtb_colr.data_collo " +
|
|
||||||
"AND mtb_colt.ser_collo = sum_mtb_colr.ser_collo " +
|
|
||||||
"AND sum_mtb_colr.sum_qta_col > 0 " +
|
|
||||||
"WHERE sum_mtb_colr.num_collo IS NULL " +
|
|
||||||
" AND " + whereCond;
|
|
||||||
|
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {
|
|
||||||
}.getType();
|
|
||||||
this.mSystemRESTConsumer.<ArrayList<MtbColt>>processSql(query, typeOfObjectsList, data -> {
|
|
||||||
onComplete.run(data != null && data.size() > 0);
|
|
||||||
}, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void retrieveBasketColli(RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void retrieveBasketColli(RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
@@ -698,4 +654,64 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
onComplete.run(data.get(0));
|
onComplete.run(data.get(0));
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void canULBeDeleted(MtbColt mtbColt, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
CanULBeDeletedRequestDTO canULBeDeletedRequestDTO = new CanULBeDeletedRequestDTO()
|
||||||
|
.setMtbColt(mtbColt);
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliMagazzinoRESTConsumerService.canULBeDeleted(canULBeDeletedRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Boolean>> call, Response<ServiceRESTResponse<Boolean>> response) {
|
||||||
|
analyzeAnswer(response, "generic/canULBeDeleted", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Boolean>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteUL(DeleteULRequestDTO deleteULRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliMagazzinoRESTConsumerService.deleteUL(deleteULRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "generic/deleteUL", Void -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printUL(PrintULRequestDTO printULRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliMagazzinoRESTConsumerService.printUL(printULRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "generic/printUL", Void -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintULRequestDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.GET;
|
import retrofit2.http.GET;
|
||||||
@@ -43,4 +46,14 @@ public interface ColliMagazzinoRESTConsumerService {
|
|||||||
@POST("wms/confirmGiacenzaUL")
|
@POST("wms/confirmGiacenzaUL")
|
||||||
Call<ServiceRESTResponse<Object>> confirmGiacenzaUL(@Body MtbColt mtbColt);
|
Call<ServiceRESTResponse<Object>> confirmGiacenzaUL(@Body MtbColt mtbColt);
|
||||||
|
|
||||||
|
|
||||||
|
@POST("wms/generic/canULBeDeleted")
|
||||||
|
Call<ServiceRESTResponse<Boolean>> canULBeDeleted(@Body CanULBeDeletedRequestDTO canULBeDeletedRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/generic/deleteUL")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUL(@Body DeleteULRequestDTO deleteULRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/generic/printUL")
|
||||||
|
Call<ServiceRESTResponse<Void>> printUL(@Body PrintULRequestDTO printULRequestDTO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,18 +8,15 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
|||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliScaricoRESTConsumerInterface;
|
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliScaricoRESTConsumerInterface;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
@@ -64,60 +61,6 @@ public class ColliSpedizioneRESTConsumer extends _BaseRESTConsumer implements Co
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void canUDSBeDeleted(CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
|
||||||
|
|
||||||
colliSpedizioneRESTConsumerService.canUDSBeDeleted(canUDSBeDeletedRequestDTO)
|
|
||||||
.enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Boolean>> call, Response<ServiceRESTResponse<Boolean>> response) {
|
|
||||||
analyzeAnswer(response, "spedizione/canUDSBeDeleted", onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Boolean>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void deleteUDS(DeleteUDSRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
|
||||||
|
|
||||||
colliSpedizioneRESTConsumerService.deleteUDS(deleteUDSRequestDTO)
|
|
||||||
.enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
|
||||||
analyzeAnswer(response, "spedizione/deleteUDS", Void -> onComplete.run(), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void printUDS(PrintUDSRequestDTO printUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
|
||||||
|
|
||||||
colliSpedizioneRESTConsumerService.printUDS(printUDSRequestDTO)
|
|
||||||
.enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
|
||||||
analyzeAnswer(response, "spedizione/printUDS", Void -> onComplete.run(), onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintULRequestDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.POST;
|
import retrofit2.http.POST;
|
||||||
@@ -25,14 +23,8 @@ public interface ColliSpedizioneRESTConsumerService {
|
|||||||
@POST("wms/spedizione/closeUDS")
|
@POST("wms/spedizione/closeUDS")
|
||||||
Call<ServiceRESTResponse<CloseUDSResponseDTO>> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
|
Call<ServiceRESTResponse<CloseUDSResponseDTO>> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
@POST("wms/spedizione/canUDSBeDeleted")
|
|
||||||
Call<ServiceRESTResponse<Boolean>> canUDSBeDeleted(@Body CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO);
|
|
||||||
|
|
||||||
@POST("wms/spedizione/deleteUDS")
|
|
||||||
Call<ServiceRESTResponse<Void>> deleteUDS(@Body DeleteUDSRequestDTO deleteUDSRequestDTO);
|
|
||||||
|
|
||||||
@POST("wms/spedizione/printUDS")
|
@POST("wms/spedizione/printUDS")
|
||||||
Call<ServiceRESTResponse<Void>> printUDS(@Body PrintUDSRequestDTO printUDSRequestDTO);
|
Call<ServiceRESTResponse<Void>> printUDS(@Body PrintULRequestDTO printULRequestDTO);
|
||||||
|
|
||||||
@POST("wms/spedizione/insertUDSRow")
|
@POST("wms/spedizione/insertUDSRow")
|
||||||
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import javax.inject.Singleton;
|
|||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.JtbComt;
|
import it.integry.integrywmsnative.core.model.JtbComt;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class CommessaRESTConsumer extends _BaseRESTConsumer {
|
public class CommessaRESTConsumer extends _BaseRESTConsumer {
|
||||||
@@ -26,6 +27,8 @@ public class CommessaRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
public void getJtbComts(List<String> itemsToFind, RunnableArgs<List<JtbComt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getJtbComts(List<String> itemsToFind, RunnableArgs<List<JtbComt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
var whereCondMap = Stream.of(itemsToFind)
|
var whereCondMap = Stream.of(itemsToFind)
|
||||||
|
.withoutNulls()
|
||||||
|
.filter(x -> !UtilityString.isNullOrEmpty(x))
|
||||||
.map(x -> {
|
.map(x -> {
|
||||||
HashMap<String, Object> vars = new HashMap<>();
|
HashMap<String, Object> vars = new HashMap<>();
|
||||||
vars.put("cod_jcom", x);
|
vars.put("cod_jcom", x);
|
||||||
@@ -33,6 +36,11 @@ public class CommessaRESTConsumer extends _BaseRESTConsumer {
|
|||||||
})
|
})
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
|
if(whereCondMap.isEmpty()) {
|
||||||
|
onComplete.run(new ArrayList<>());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var whereCond = " WHERE " + UtilityQuery.concatFieldListInWhereCond(whereCondMap);
|
var whereCond = " WHERE " + UtilityQuery.concatFieldListInWhereCond(whereCondMap);
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<JtbComt>>() {}.getType();
|
Type typeOfObjectsList = new TypeToken<ArrayList<JtbComt>>() {}.getType();
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import it.integry.integrywmsnative.core.model.EntityBase;
|
|||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.EsitoType;
|
import it.integry.integrywmsnative.core.rest.model.EsitoType;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityGson;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
@@ -83,7 +84,7 @@ public class EntityRESTConsumer extends _BaseRESTConsumer {
|
|||||||
if (response.body() != null) {
|
if (response.body() != null) {
|
||||||
|
|
||||||
ArrayList<T> responseList = new ArrayList<>();
|
ArrayList<T> responseList = new ArrayList<>();
|
||||||
Gson gson = new Gson();
|
Gson gson = UtilityGson.createObject();
|
||||||
// Type typeOfObjectsList = new TypeToken<T>() {}.getType();
|
// Type typeOfObjectsList = new TypeToken<T>() {}.getType();
|
||||||
|
|
||||||
for (ServiceRESTResponse<JsonObject> jsonSingleObject : response.body()) {
|
for (ServiceRESTResponse<JsonObject> jsonSingleObject : response.body()) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
@@ -11,6 +12,7 @@ import it.integry.integrywmsnative.core.model.StbGestSetup;
|
|||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.GestSetupDTO;
|
import it.integry.integrywmsnative.core.rest.model.GestSetupDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.settings.StbGestSetupReader;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
@@ -76,12 +78,25 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void getValues(String codMdep, List<StbGestSetup> stbGestSetupList, RunnableArgs<List<StbGestSetup>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getValues(String codMdep, List<StbGestSetupReader> stbGestSetupList, RunnableArgs<List<StbGestSetupReader>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
var stbGestSetups = stbGestSetupList.stream().map(x -> (StbGestSetup) x).collect(Collectors.toList());
|
||||||
|
|
||||||
GestSetupRESTConsumerService service = RESTBuilder.getService(GestSetupRESTConsumerService.class);
|
GestSetupRESTConsumerService service = RESTBuilder.getService(GestSetupRESTConsumerService.class);
|
||||||
service.getGestSetupValues(codMdep, stbGestSetupList).enqueue(new Callback<>() {
|
service.getGestSetupValues(codMdep, stbGestSetups).enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<List<StbGestSetup>>> call, Response<ServiceRESTResponse<List<StbGestSetup>>> response) {
|
public void onResponse(Call<ServiceRESTResponse<List<StbGestSetup>>> call, Response<ServiceRESTResponse<List<StbGestSetup>>> response) {
|
||||||
analyzeAnswer(response, "GestSetup", onComplete, onFailed);
|
analyzeAnswer(response, "GestSetup", data -> {
|
||||||
|
|
||||||
|
for (StbGestSetup stbGestSetup : data) {
|
||||||
|
stbGestSetupList.stream().filter(x -> stbGestSetup.getGestName().equalsIgnoreCase(x.getGestName()) &&
|
||||||
|
stbGestSetup.getSection().equalsIgnoreCase(x.getSection()) &&
|
||||||
|
stbGestSetup.getKeySection().equalsIgnoreCase(x.getKeySection()))
|
||||||
|
.findFirst()
|
||||||
|
.ifPresent(x -> x.setValue(stbGestSetup.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
onComplete.run(stbGestSetupList);
|
||||||
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
|||||||
import com.annimon.stream.Optional;
|
import com.annimon.stream.Optional;
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
@@ -13,6 +14,7 @@ import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
|||||||
import it.integry.integrywmsnative.core.model.MvwSitArtUdcDetInventario;
|
import it.integry.integrywmsnative.core.model.MvwSitArtUdcDetInventario;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.giacenza.InstantItemSituationIncomingItemDto;
|
||||||
import it.integry.integrywmsnative.core.rest.model.giacenza.InstantItemSituationResponseDto;
|
import it.integry.integrywmsnative.core.rest.model.giacenza.InstantItemSituationResponseDto;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@@ -120,7 +122,10 @@ public class GiacenzaRESTConsumer extends _BaseRESTConsumer {
|
|||||||
.enqueue(new Callback<>() {
|
.enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<InstantItemSituationResponseDto>> call, Response<ServiceRESTResponse<InstantItemSituationResponseDto>> response) {
|
public void onResponse(Call<ServiceRESTResponse<InstantItemSituationResponseDto>> call, Response<ServiceRESTResponse<InstantItemSituationResponseDto>> response) {
|
||||||
analyzeAnswer(response, "getInstantItemSituation", onComplete, onFailed);
|
analyzeAnswer(response, "getInstantItemSituation", data -> {
|
||||||
|
|
||||||
|
fillInstantItemSituationWithMtbAarts(data, onComplete, onFailed);
|
||||||
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -130,5 +135,54 @@ public class GiacenzaRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void fillInstantItemSituationWithMtbAarts(InstantItemSituationResponseDto data, RunnableArgs<InstantItemSituationResponseDto> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
var inputCodMarts = new ArrayList<String>();
|
||||||
|
|
||||||
|
if (data.getIncomingItems() != null && !data.getIncomingItems().isEmpty()) {
|
||||||
|
inputCodMarts.addAll(Stream.of(data.getIncomingItems())
|
||||||
|
.map(InstantItemSituationIncomingItemDto::getCodMart)
|
||||||
|
.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.getAvailableItems() != null && !data.getAvailableItems().isEmpty()) {
|
||||||
|
inputCodMarts.addAll(Stream.of(data.getAvailableItems())
|
||||||
|
.map(MvwSitArtUdcDetInventario::getCodMart)
|
||||||
|
.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (inputCodMarts.isEmpty()) {
|
||||||
|
onComplete.run(data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mArticoloRESTConsumer.getByCodMarts(inputCodMarts, mtbAarts -> {
|
||||||
|
|
||||||
|
mArticoloRESTConsumer.fillMtbAartsWithMtbUntMis(mtbAarts, newMtbAarts -> {
|
||||||
|
if (data.getIncomingItems() != null && !data.getIncomingItems().isEmpty()) {
|
||||||
|
for (var item : data.getIncomingItems()) {
|
||||||
|
var mtbAart = Stream.of(newMtbAarts).filter(x -> x.getCodMart().equalsIgnoreCase(item.getCodMart()))
|
||||||
|
.findFirstOrElse(null);
|
||||||
|
|
||||||
|
if (mtbAart != null)
|
||||||
|
item.setMtbAart(mtbAart);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.getAvailableItems() != null && !data.getAvailableItems().isEmpty()) {
|
||||||
|
for (var item : data.getAvailableItems()) {
|
||||||
|
var mtbAart = Stream.of(newMtbAarts).filter(x -> x.getCodMart().equalsIgnoreCase(item.getCodMart()))
|
||||||
|
.findFirstOrElse(null);
|
||||||
|
|
||||||
|
if (mtbAart != null)
|
||||||
|
item.setMtbAart(mtbAart);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onComplete.run(data);
|
||||||
|
}, onFailed);
|
||||||
|
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class InventarioRESTConsumer extends _BaseRESTConsumer {
|
|||||||
var request = new InsertInventarioRequestDTO()
|
var request = new InsertInventarioRequestDTO()
|
||||||
.setMtbInvent(inventarioToInsert);
|
.setMtbInvent(inventarioToInsert);
|
||||||
|
|
||||||
var inventarioRESTConsumerService = RESTBuilder.getService(InventarioRESTConsumerService.class, 120);
|
var inventarioRESTConsumerService = RESTBuilder.getService(InventarioRESTConsumerService.class, 300);
|
||||||
inventarioRESTConsumerService
|
inventarioRESTConsumerService
|
||||||
.insert(inventarioToInsert.getIdInventario(), request)
|
.insert(inventarioToInsert.getIdInventario(), request)
|
||||||
.enqueue(new Callback<>() {
|
.enqueue(new Callback<>() {
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.magazzino_buffer.MagazzinoBufferVersamentoMaterialeCloseRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.magazzino_buffer.MagazzinoBufferVersamentoMaterialeRequestDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class MagazzinoBufferRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
|
public void isVersamentoStarted(MtbDepoPosizione posizione, MagazzinoBufferVersamentoMaterialeRequestDTO magazzinoBufferVersamentoMaterialeRequestDTO, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
MagazzinoBufferRESTConsumerService magazzinoBufferRESTConsumerService = RESTBuilder.getService(MagazzinoBufferRESTConsumerService.class);
|
||||||
|
magazzinoBufferRESTConsumerService.isVersamentoStarted(posizione.getPosizione(), magazzinoBufferVersamentoMaterialeRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Boolean>> call, Response<ServiceRESTResponse<Boolean>> response) {
|
||||||
|
analyzeAnswer(response, "magazzino-buffer/isVersamentoStarted", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Boolean>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startVersamentoMateriale(MtbDepoPosizione posizione, MagazzinoBufferVersamentoMaterialeRequestDTO magazzinoBufferVersamentoMaterialeRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
MagazzinoBufferRESTConsumerService magazzinoBufferRESTConsumerService = RESTBuilder.getService(MagazzinoBufferRESTConsumerService.class);
|
||||||
|
magazzinoBufferRESTConsumerService.startVersamentoMateriale(posizione.getPosizione(), magazzinoBufferVersamentoMaterialeRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "magazzino-buffer/startVersamentoMateriale", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void endVersamentoMateriale(MtbDepoPosizione posizione, MagazzinoBufferVersamentoMaterialeCloseRequestDTO magazzinoBufferVersamentoMaterialeCloseRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
MagazzinoBufferRESTConsumerService magazzinoBufferRESTConsumerService = RESTBuilder.getService(MagazzinoBufferRESTConsumerService.class);
|
||||||
|
magazzinoBufferRESTConsumerService.endVersamentoMateriale(posizione.getPosizione(), magazzinoBufferVersamentoMaterialeCloseRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "magazzino-buffer/endVersamentoMateriale", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.magazzino_buffer.MagazzinoBufferVersamentoMaterialeCloseRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.magazzino_buffer.MagazzinoBufferVersamentoMaterialeRequestDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
import retrofit2.http.Path;
|
||||||
|
|
||||||
|
public interface MagazzinoBufferRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("wms/magazzino-buffer/{posizione}/isVersamentoStarted")
|
||||||
|
Call<ServiceRESTResponse<Boolean>> isVersamentoStarted(
|
||||||
|
@Path("posizione") String posizione,
|
||||||
|
@Body MagazzinoBufferVersamentoMaterialeRequestDTO magazzinoBufferVersamentoMaterialeRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/magazzino-buffer/{posizione}/startVersamentoMateriale")
|
||||||
|
Call<ServiceRESTResponse<Void>> startVersamentoMateriale(
|
||||||
|
@Path("posizione") String posizione,
|
||||||
|
@Body MagazzinoBufferVersamentoMaterialeRequestDTO magazzinoBufferVersamentoMaterialeRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/magazzino-buffer/{posizione}/endVersamentoMateriale")
|
||||||
|
Call<ServiceRESTResponse<Void>> endVersamentoMateriale(
|
||||||
|
@Path("posizione") String posizione,
|
||||||
|
@Body MagazzinoBufferVersamentoMaterialeCloseRequestDTO magazzinoBufferVersamentoMaterialeCloseRequestDTO);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -61,7 +61,10 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
|
|||||||
.filter(x -> !UtilityString.isNullOrEmpty(x.getPartitaMag()))
|
.filter(x -> !UtilityString.isNullOrEmpty(x.getPartitaMag()))
|
||||||
.forEach(x -> {
|
.forEach(x -> {
|
||||||
|
|
||||||
if (!Stream.of(batchLotsToSearch).anyMatch(batchLotToSearch -> batchLotToSearch.getCodMart().equalsIgnoreCase(x.getCodMart()) && batchLotToSearch.getPartitaMag().equalsIgnoreCase(x.getPartitaMag()))) {
|
if (!Stream.of(batchLotsToSearch)
|
||||||
|
.anyMatch(batchLotToSearch ->
|
||||||
|
batchLotToSearch.getCodMart().equalsIgnoreCase(x.getCodMart()) &&
|
||||||
|
batchLotToSearch.getPartitaMag().equalsIgnoreCase(x.getPartitaMag()))) {
|
||||||
MtbPartitaMag mtbPartitaMag = new MtbPartitaMag()
|
MtbPartitaMag mtbPartitaMag = new MtbPartitaMag()
|
||||||
.setCodMart(x.getCodMart())
|
.setCodMart(x.getCodMart())
|
||||||
.setPartitaMag(x.getPartitaMag());
|
.setPartitaMag(x.getPartitaMag());
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.NativeSqlRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.NativeSqlRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.system.RegisterDeviceRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
@@ -39,6 +40,27 @@ import retrofit2.Response;
|
|||||||
@Singleton
|
@Singleton
|
||||||
public class SystemRESTConsumer extends _BaseRESTConsumer {
|
public class SystemRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
|
|
||||||
|
public void registerDevice(final Runnable onSuccess, final RunnableArgs<Exception> onFailed) {
|
||||||
|
RegisterDeviceRequestDTO registerDeviceRequestDTO = new RegisterDeviceRequestDTO()
|
||||||
|
.setApp("WMS");
|
||||||
|
|
||||||
|
SystemRESTConsumerService systemRESTConsumerService = RESTBuilder.getService(SystemRESTConsumerService.class);
|
||||||
|
systemRESTConsumerService.registerDevice(registerDeviceRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "device/register", Void -> onSuccess.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public <T> void processSql(String nativeSql, final Type clazz, final RunnableArgs<T> onComplete, final RunnableArgs<Exception> onFailed) {
|
public <T> void processSql(String nativeSql, final Type clazz, final RunnableArgs<T> onComplete, final RunnableArgs<Exception> onFailed) {
|
||||||
NativeSqlRequestDTO nativeSqlDTO = new NativeSqlRequestDTO();
|
NativeSqlRequestDTO nativeSqlDTO = new NativeSqlRequestDTO();
|
||||||
nativeSqlDTO.nativeSql = nativeSql;
|
nativeSqlDTO.nativeSql = nativeSql;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.NativeSqlRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.NativeSqlRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.system.RegisterDeviceRequestDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.GET;
|
import retrofit2.http.GET;
|
||||||
@@ -14,6 +15,9 @@ import retrofit2.http.Query;
|
|||||||
|
|
||||||
public interface SystemRESTConsumerService {
|
public interface SystemRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("device/register")
|
||||||
|
Call<ServiceRESTResponse<Void>> registerDevice(@Body RegisterDeviceRequestDTO registerDeviceRequestDTO);
|
||||||
|
|
||||||
@POST("processSql")
|
@POST("processSql")
|
||||||
Call<ServiceRESTResponse<Object>> processSql(@Body NativeSqlRequestDTO nativeSqlDTO);
|
Call<ServiceRESTResponse<Object>> processSql(@Body NativeSqlRequestDTO nativeSqlDTO);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers.interfaces;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
||||||
|
|
||||||
|
public interface ColliCaricoRESTConsumerInterface {
|
||||||
|
|
||||||
|
void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs<CloseUDCResponseDTO> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
|
void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
}
|
||||||
@@ -3,15 +3,12 @@ package it.integry.integrywmsnative.core.rest.consumers.interfaces;
|
|||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CanUDSBeDeletedRequestDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRequestDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.PrintUDSRequestDTO;
|
|
||||||
|
|
||||||
public interface ColliScaricoRESTConsumerInterface {
|
public interface ColliScaricoRESTConsumerInterface {
|
||||||
|
|
||||||
@@ -19,12 +16,6 @@ public interface ColliScaricoRESTConsumerInterface {
|
|||||||
|
|
||||||
void closeUDS(CloseUDSRequestDTO closeUDSRequestDTO, RunnableArgs<CloseUDSResponseDTO> onComplete, RunnableArgs<Exception> onFailed);
|
void closeUDS(CloseUDSRequestDTO closeUDSRequestDTO, RunnableArgs<CloseUDSResponseDTO> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
void canUDSBeDeleted(CanUDSBeDeletedRequestDTO canUDSBeDeletedRequestDTO, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed);
|
|
||||||
|
|
||||||
void deleteUDS(DeleteUDSRequestDTO deleteUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed);
|
|
||||||
|
|
||||||
void printUDS(PrintUDSRequestDTO printUDSRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed);
|
|
||||||
|
|
||||||
void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|
||||||
void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed);
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ public class Ean128Model {
|
|||||||
public String InternalPart;
|
public String InternalPart;
|
||||||
|
|
||||||
///<summary>Informazioni interne</summary>
|
///<summary>Informazioni interne</summary>
|
||||||
public String Internal1;
|
public String Internal1; //USED FOR COD_MART
|
||||||
|
|
||||||
///<summary>Informazioni interne</summary>
|
///<summary>Informazioni interne</summary>
|
||||||
public String Internal2;
|
public String Internal2;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public class SitArtOrdDTO {
|
|||||||
private String descrizioneMsfa;
|
private String descrizioneMsfa;
|
||||||
private String untord;
|
private String untord;
|
||||||
private BigDecimal qtaOmg;
|
private BigDecimal qtaOmg;
|
||||||
|
private BigDecimal qtaArrivo;
|
||||||
|
|
||||||
private final HashMap<String, Object> extraInfo = new HashMap<>();
|
private final HashMap<String, Object> extraInfo = new HashMap<>();
|
||||||
|
|
||||||
@@ -232,4 +233,13 @@ public class SitArtOrdDTO {
|
|||||||
this.qtaOmg = qtaOmg;
|
this.qtaOmg = qtaOmg;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaArrivo() {
|
||||||
|
return qtaArrivo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitArtOrdDTO setQtaArrivo(BigDecimal qtaArrivo) {
|
||||||
|
this.qtaArrivo = qtaArrivo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.articolo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RetrieveArticoloByCodMartRequestDTO {
|
||||||
|
|
||||||
|
private List<String> codMarts;
|
||||||
|
|
||||||
|
public List<String> getCodMarts() {
|
||||||
|
return codMarts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RetrieveArticoloByCodMartRequestDTO setCodMarts(List<String> codMarts) {
|
||||||
|
this.codMarts = codMarts;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.articolo;
|
||||||
|
|
||||||
|
public class SearchArticoloByBarcodeRequestDTO {
|
||||||
|
|
||||||
|
private String barcode;
|
||||||
|
private boolean onlyActive;
|
||||||
|
|
||||||
|
public String getBarcode() {
|
||||||
|
return barcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByBarcodeRequestDTO setBarcode(String barcode) {
|
||||||
|
this.barcode = barcode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOnlyActive() {
|
||||||
|
return onlyActive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByBarcodeRequestDTO setOnlyActive(boolean onlyActive) {
|
||||||
|
this.onlyActive = onlyActive;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.articolo;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
|
||||||
|
public class SearchArticoloByBarcodeResponseDTO {
|
||||||
|
|
||||||
|
private List<MtbAart> arts;
|
||||||
|
|
||||||
|
public List<MtbAart> getArts() {
|
||||||
|
return arts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchArticoloByBarcodeResponseDTO setArts(List<MtbAart> arts) {
|
||||||
|
this.arts = arts;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.articolo;
|
||||||
|
|
||||||
|
public class UpdateBarcodeImballoRequestDTO {
|
||||||
|
|
||||||
|
private String codMart;
|
||||||
|
|
||||||
|
private String newBarcodeImballo;
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UpdateBarcodeImballoRequestDTO setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewBarcodeImballo() {
|
||||||
|
return newBarcodeImballo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UpdateBarcodeImballoRequestDTO setNewBarcodeImballo(String newBarcodeImballo) {
|
||||||
|
this.newBarcodeImballo = newBarcodeImballo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,8 @@ package it.integry.integrywmsnative.core.rest.model.giacenza;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
|
||||||
public class InstantItemSituationIncomingItemDto {
|
public class InstantItemSituationIncomingItemDto {
|
||||||
|
|
||||||
private BigDecimal qtaOrd;
|
private BigDecimal qtaOrd;
|
||||||
@@ -21,6 +23,7 @@ public class InstantItemSituationIncomingItemDto {
|
|||||||
private String codJcom;
|
private String codJcom;
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
private String untMis;
|
private String untMis;
|
||||||
|
private MtbAart mtbAart;
|
||||||
|
|
||||||
public BigDecimal getQtaOrd() {
|
public BigDecimal getQtaOrd() {
|
||||||
return qtaOrd;
|
return qtaOrd;
|
||||||
@@ -85,4 +88,13 @@ public class InstantItemSituationIncomingItemDto {
|
|||||||
public String getUntMis() {
|
public String getUntMis() {
|
||||||
return untMis;
|
return untMis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MtbAart getMtbAart() {
|
||||||
|
return mtbAart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InstantItemSituationIncomingItemDto setMtbAart(MtbAart mtbAart) {
|
||||||
|
this.mtbAart = mtbAart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.magazzino_buffer;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class MagazzinoBufferVersamentoMaterialeCloseRequestDTO {
|
||||||
|
|
||||||
|
private MtbColt inputMtbColt;
|
||||||
|
private BigDecimal qtaTotDaScaricare;
|
||||||
|
private BigDecimal numCnfDaScaricare;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public MtbColt getInputMtbColt() {
|
||||||
|
return inputMtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoBufferVersamentoMaterialeCloseRequestDTO setInputMtbColt(MtbColt inputMtbColt) {
|
||||||
|
this.inputMtbColt = inputMtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaTotDaScaricare() {
|
||||||
|
return qtaTotDaScaricare;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoBufferVersamentoMaterialeCloseRequestDTO setQtaTotDaScaricare(BigDecimal qtaTotDaScaricare) {
|
||||||
|
this.qtaTotDaScaricare = qtaTotDaScaricare;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnfDaScaricare() {
|
||||||
|
return numCnfDaScaricare;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoBufferVersamentoMaterialeCloseRequestDTO setNumCnfDaScaricare(BigDecimal numCnfDaScaricare) {
|
||||||
|
this.numCnfDaScaricare = numCnfDaScaricare;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.magazzino_buffer;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class MagazzinoBufferVersamentoMaterialeRequestDTO {
|
||||||
|
|
||||||
|
private MtbColt inputMtbColt;
|
||||||
|
|
||||||
|
|
||||||
|
public MtbColt getInputMtbColt() {
|
||||||
|
return inputMtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagazzinoBufferVersamentoMaterialeRequestDTO setInputMtbColt(MtbColt inputMtbColt) {
|
||||||
|
this.inputMtbColt = inputMtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.system;
|
||||||
|
|
||||||
|
public class RegisterDeviceRequestDTO {
|
||||||
|
|
||||||
|
private String app;
|
||||||
|
|
||||||
|
public String getApp() {
|
||||||
|
return app;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RegisterDeviceRequestDTO setApp(String app) {
|
||||||
|
this.app = app;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.udc;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class CloseUDCRequestDTO {
|
||||||
|
|
||||||
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
|
|
||||||
|
public MtbColt getMtbColt() {
|
||||||
|
return mtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CloseUDCRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||||
|
this.mtbColt = mtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.udc;
|
||||||
|
|
||||||
|
public class CloseUDCResponseDTO {
|
||||||
|
|
||||||
|
private boolean saved;
|
||||||
|
private boolean deleted;
|
||||||
|
|
||||||
|
public boolean isSaved() {
|
||||||
|
return saved;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CloseUDCResponseDTO setSaved(boolean saved) {
|
||||||
|
this.saved = saved;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDeleted() {
|
||||||
|
return deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CloseUDCResponseDTO setDeleted(boolean deleted) {
|
||||||
|
this.deleted = deleted;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.udc;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class CreateUDCRequestDTO {
|
||||||
|
|
||||||
|
private String codMdep;
|
||||||
|
private Integer numCollo;
|
||||||
|
private String serCollo;
|
||||||
|
private String codAnag;
|
||||||
|
private String codTcol;
|
||||||
|
|
||||||
|
private String annotazioni;
|
||||||
|
|
||||||
|
private List<CreateUDCRequestOrderDTO> orders;
|
||||||
|
|
||||||
|
|
||||||
|
public String getCodMdep() {
|
||||||
|
return codMdep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCRequestDTO setCodMdep(String codMdep) {
|
||||||
|
this.codMdep = codMdep;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumCollo() {
|
||||||
|
return numCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCRequestDTO setNumCollo(Integer numCollo) {
|
||||||
|
this.numCollo = numCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerCollo() {
|
||||||
|
return serCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCRequestDTO setSerCollo(String serCollo) {
|
||||||
|
this.serCollo = serCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodAnag() {
|
||||||
|
return codAnag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCRequestDTO setCodAnag(String codAnag) {
|
||||||
|
this.codAnag = codAnag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodTcol() {
|
||||||
|
return codTcol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCRequestDTO setCodTcol(String codTcol) {
|
||||||
|
this.codTcol = codTcol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAnnotazioni() {
|
||||||
|
return annotazioni;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCRequestDTO setAnnotazioni(String annotazioni) {
|
||||||
|
this.annotazioni = annotazioni;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CreateUDCRequestOrderDTO> getOrders() {
|
||||||
|
return orders;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCRequestDTO setOrders(List<CreateUDCRequestOrderDTO> orders) {
|
||||||
|
this.orders = orders;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.udc;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
public class CreateUDCRequestOrderDTO {
|
||||||
|
|
||||||
|
|
||||||
|
private String gestione;
|
||||||
|
private LocalDate dataOrd;
|
||||||
|
private LocalDate dataCons;
|
||||||
|
private int numOrd;
|
||||||
|
|
||||||
|
|
||||||
|
public String getGestione() {
|
||||||
|
return gestione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCRequestOrderDTO setGestione(String gestione) {
|
||||||
|
this.gestione = gestione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataOrd() {
|
||||||
|
return dataOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCRequestOrderDTO setDataOrd(LocalDate dataOrd) {
|
||||||
|
this.dataOrd = dataOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataCons() {
|
||||||
|
return dataCons;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCRequestOrderDTO setDataCons(LocalDate dataCons) {
|
||||||
|
this.dataCons = dataCons;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNumOrd() {
|
||||||
|
return numOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCRequestOrderDTO setNumOrd(int numOrd) {
|
||||||
|
this.numOrd = numOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.udc;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class CreateUDCResponseDTO {
|
||||||
|
|
||||||
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
|
public MtbColt getMtbColt() {
|
||||||
|
return mtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDCResponseDTO setMtbColt(MtbColt mtbColt) {
|
||||||
|
this.mtbColt = mtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.udc;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
|
||||||
|
public class DeleteUDCRowRequestDTO {
|
||||||
|
|
||||||
|
private MtbColr mtbColrToDelete;
|
||||||
|
|
||||||
|
public MtbColr getMtbColrToDelete() {
|
||||||
|
return mtbColrToDelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeleteUDCRowRequestDTO setMtbColrToDelete(MtbColr mtbColrToDelete) {
|
||||||
|
this.mtbColrToDelete = mtbColrToDelete;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.udc;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
|
||||||
|
public class EditUDCRowRequestDTO {
|
||||||
|
private MtbColr sourceMtbColr;
|
||||||
|
|
||||||
|
private BigDecimal newQtaTot;
|
||||||
|
private BigDecimal newQtaCnf;
|
||||||
|
private BigDecimal newNumCnf;
|
||||||
|
private String newPartitaMag;
|
||||||
|
private LocalDate newDataScad;
|
||||||
|
|
||||||
|
public MtbColr getSourceMtbColr() {
|
||||||
|
return sourceMtbColr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EditUDCRowRequestDTO setSourceMtbColr(MtbColr sourceMtbColr) {
|
||||||
|
this.sourceMtbColr = sourceMtbColr;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNewQtaTot() {
|
||||||
|
return newQtaTot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EditUDCRowRequestDTO setNewQtaTot(BigDecimal newQtaTot) {
|
||||||
|
this.newQtaTot = newQtaTot;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNewQtaCnf() {
|
||||||
|
return newQtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EditUDCRowRequestDTO setNewQtaCnf(BigDecimal newQtaCnf) {
|
||||||
|
this.newQtaCnf = newQtaCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNewNumCnf() {
|
||||||
|
return newNumCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EditUDCRowRequestDTO setNewNumCnf(BigDecimal newNumCnf) {
|
||||||
|
this.newNumCnf = newNumCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewPartitaMag() {
|
||||||
|
return newPartitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EditUDCRowRequestDTO setNewPartitaMag(String newPartitaMag) {
|
||||||
|
this.newPartitaMag = newPartitaMag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getNewDataScad() {
|
||||||
|
return newDataScad;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EditUDCRowRequestDTO setNewDataScad(LocalDate newDataScad) {
|
||||||
|
this.newDataScad = newDataScad;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.udc;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
|
||||||
|
public class EditUDCRowResponseDTO {
|
||||||
|
private MtbColr savedMtbColr;
|
||||||
|
|
||||||
|
public MtbColr getSavedMtbColr() {
|
||||||
|
return savedMtbColr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EditUDCRowResponseDTO setSavedMtbColr(MtbColr savedMtbColr) {
|
||||||
|
this.savedMtbColr = savedMtbColr;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@ package it.integry.integrywmsnative.core.rest.model.uds;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
public class CanUDSBeDeletedRequestDTO {
|
public class CanULBeDeletedRequestDTO {
|
||||||
|
|
||||||
|
|
||||||
private MtbColt mtbColt;
|
private MtbColt mtbColt;
|
||||||
@@ -11,7 +11,7 @@ public class CanUDSBeDeletedRequestDTO {
|
|||||||
return mtbColt;
|
return mtbColt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CanUDSBeDeletedRequestDTO setMtbColt(MtbColt mtbColt) {
|
public CanULBeDeletedRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||||
this.mtbColt = mtbColt;
|
this.mtbColt = mtbColt;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class CreateUDSFromArtRequestDTO {
|
||||||
|
|
||||||
|
private String codMart;
|
||||||
|
private String partitaMag;
|
||||||
|
private String codMdep;
|
||||||
|
private String posizione;
|
||||||
|
private String codJfas;
|
||||||
|
private BigDecimal qta;
|
||||||
|
private BigDecimal qtaCnf;
|
||||||
|
private BigDecimal numCnf;
|
||||||
|
private BigDecimal pesoNettoKg;
|
||||||
|
private BigDecimal pesoLordoKg;
|
||||||
|
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSFromArtRequestDTO setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSFromArtRequestDTO setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMdep() {
|
||||||
|
return codMdep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSFromArtRequestDTO setCodMdep(String codMdep) {
|
||||||
|
this.codMdep = codMdep;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPosizione() {
|
||||||
|
return posizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSFromArtRequestDTO setPosizione(String posizione) {
|
||||||
|
this.posizione = posizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJfas() {
|
||||||
|
return codJfas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSFromArtRequestDTO setCodJfas(String codJfas) {
|
||||||
|
this.codJfas = codJfas;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQta() {
|
||||||
|
return qta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSFromArtRequestDTO setQta(BigDecimal qta) {
|
||||||
|
this.qta = qta;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnf() {
|
||||||
|
return qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSFromArtRequestDTO setQtaCnf(BigDecimal qtaCnf) {
|
||||||
|
this.qtaCnf = qtaCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnf() {
|
||||||
|
return numCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSFromArtRequestDTO setNumCnf(BigDecimal numCnf) {
|
||||||
|
this.numCnf = numCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoNettoKg() {
|
||||||
|
return pesoNettoKg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSFromArtRequestDTO setPesoNettoKg(BigDecimal pesoNettoKg) {
|
||||||
|
this.pesoNettoKg = pesoNettoKg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoLordoKg() {
|
||||||
|
return pesoLordoKg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSFromArtRequestDTO setPesoLordoKg(BigDecimal pesoLordoKg) {
|
||||||
|
this.pesoLordoKg = pesoLordoKg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,7 +10,11 @@ public class CreateUDSRequestDTO {
|
|||||||
private Integer numCollo;
|
private Integer numCollo;
|
||||||
private String serCollo;
|
private String serCollo;
|
||||||
private int causaleCollo;
|
private int causaleCollo;
|
||||||
|
private String codJfas;
|
||||||
|
private String codAnag;
|
||||||
|
private String codVdes;
|
||||||
|
private String rifOrd;
|
||||||
|
private boolean orderRequired;
|
||||||
private List<CreateUDSRequestOrderDTO> orders;
|
private List<CreateUDSRequestOrderDTO> orders;
|
||||||
|
|
||||||
public String getCodMdep() {
|
public String getCodMdep() {
|
||||||
@@ -67,6 +71,51 @@ public class CreateUDSRequestDTO {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCodJfas() {
|
||||||
|
return codJfas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestDTO setCodJfas(String codJfas) {
|
||||||
|
this.codJfas = codJfas;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodAnag() {
|
||||||
|
return codAnag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestDTO setCodAnag(String codAnag) {
|
||||||
|
this.codAnag = codAnag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodVdes() {
|
||||||
|
return codVdes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestDTO setCodVdes(String codVdes) {
|
||||||
|
this.codVdes = codVdes;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRifOrd() {
|
||||||
|
return rifOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestDTO setRifOrd(String rifOrd) {
|
||||||
|
this.rifOrd = rifOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOrderRequired() {
|
||||||
|
return orderRequired;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CreateUDSRequestDTO setOrderRequired(boolean orderRequired) {
|
||||||
|
this.orderRequired = orderRequired;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public List<CreateUDSRequestOrderDTO> getOrders() {
|
public List<CreateUDSRequestOrderDTO> getOrders() {
|
||||||
return orders;
|
return orders;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package it.integry.integrywmsnative.core.rest.model.uds;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
public class DeleteUDSRequestDTO {
|
public class DeleteULRequestDTO {
|
||||||
|
|
||||||
private MtbColt mtbColt;
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ public class DeleteUDSRequestDTO {
|
|||||||
return mtbColt;
|
return mtbColt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeleteUDSRequestDTO setMtbColt(MtbColt mtbColt) {
|
public DeleteULRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||||
this.mtbColt = mtbColt;
|
this.mtbColt = mtbColt;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class InsertUDCRowRequestDTO {
|
||||||
|
private MtbColt targetMtbColt;
|
||||||
|
|
||||||
|
private String codMart;
|
||||||
|
private String descrizione;
|
||||||
|
private String barcode;
|
||||||
|
private BigDecimal qtaTot;
|
||||||
|
private BigDecimal qtaCnf;
|
||||||
|
private BigDecimal numCnf;
|
||||||
|
private String partitaMag;
|
||||||
|
private LocalDate dataScad;
|
||||||
|
private String codJcom;
|
||||||
|
private String gestioneRif;
|
||||||
|
|
||||||
|
private LocalDate dataOrd;
|
||||||
|
private Integer numOrd;
|
||||||
|
private Integer rigaOrd;
|
||||||
|
|
||||||
|
private LocalDate dataDoc;
|
||||||
|
private Integer numDoc;
|
||||||
|
private String serDoc;
|
||||||
|
private String codDtip;
|
||||||
|
|
||||||
|
|
||||||
|
public MtbColt getTargetMtbColt() {
|
||||||
|
return targetMtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setTargetMtbColt(MtbColt targetMtbColt) {
|
||||||
|
this.targetMtbColt = targetMtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizione() {
|
||||||
|
return descrizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setDescrizione(String descrizione) {
|
||||||
|
this.descrizione = descrizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBarcode() {
|
||||||
|
return barcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setBarcode(String barcode) {
|
||||||
|
this.barcode = barcode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaTot() {
|
||||||
|
return qtaTot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setQtaTot(BigDecimal qtaTot) {
|
||||||
|
this.qtaTot = qtaTot;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnf() {
|
||||||
|
return qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setQtaCnf(BigDecimal qtaCnf) {
|
||||||
|
this.qtaCnf = qtaCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnf() {
|
||||||
|
return numCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setNumCnf(BigDecimal numCnf) {
|
||||||
|
this.numCnf = numCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataScad() {
|
||||||
|
return dataScad;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setDataScad(LocalDate dataScad) {
|
||||||
|
this.dataScad = dataScad;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJcom() {
|
||||||
|
return codJcom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setCodJcom(String codJcom) {
|
||||||
|
this.codJcom = codJcom;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGestioneRif() {
|
||||||
|
return gestioneRif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setGestioneRif(String gestioneRif) {
|
||||||
|
this.gestioneRif = gestioneRif;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataOrd() {
|
||||||
|
return dataOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setDataOrd(LocalDate dataOrd) {
|
||||||
|
this.dataOrd = dataOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumOrd() {
|
||||||
|
return numOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setNumOrd(Integer numOrd) {
|
||||||
|
this.numOrd = numOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRigaOrd() {
|
||||||
|
return rigaOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setRigaOrd(Integer rigaOrd) {
|
||||||
|
this.rigaOrd = rigaOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataDoc() {
|
||||||
|
return dataDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setDataDoc(LocalDate dataDoc) {
|
||||||
|
this.dataDoc = dataDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumDoc() {
|
||||||
|
return numDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setNumDoc(Integer numDoc) {
|
||||||
|
this.numDoc = numDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerDoc() {
|
||||||
|
return serDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setSerDoc(String serDoc) {
|
||||||
|
this.serDoc = serDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodDtip() {
|
||||||
|
return codDtip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InsertUDCRowRequestDTO setCodDtip(String codDtip) {
|
||||||
|
this.codDtip = codDtip;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
|
||||||
|
public class InsertUDCRowResponseDTO {
|
||||||
|
|
||||||
|
private MtbColr savedMtbColr;
|
||||||
|
|
||||||
|
public MtbColr getSavedMtbColr() {
|
||||||
|
return savedMtbColr;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.model.uds;
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
public class PrintUDSRequestDTO {
|
public class PrintULRequestDTO {
|
||||||
|
|
||||||
private List<MtbColt> mtbColts;
|
private List<MtbColt> mtbColts;
|
||||||
|
|
||||||
@@ -12,8 +13,14 @@ public class PrintUDSRequestDTO {
|
|||||||
return mtbColts;
|
return mtbColts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrintUDSRequestDTO setMtbColts(List<MtbColt> mtbColts) {
|
public PrintULRequestDTO setMtbColts(List<MtbColt> mtbColts) {
|
||||||
this.mtbColts = mtbColts;
|
this.mtbColts = mtbColts;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PrintULRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||||
|
this.mtbColts = new ArrayList<>(1);
|
||||||
|
this.mtbColts.add(mtbColt);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -39,10 +39,12 @@ public class DBSettingsModel {
|
|||||||
private boolean flagOrdinaNuoviArticoliInGriglia;
|
private boolean flagOrdinaNuoviArticoliInGriglia;
|
||||||
private boolean flagOrdinaArticoliOnScan;
|
private boolean flagOrdinaArticoliOnScan;
|
||||||
private boolean flagConsentiFuoriPianoLogistico;
|
private boolean flagConsentiFuoriPianoLogistico;
|
||||||
|
private boolean flagConsentiOrdineSenzaGriglia;
|
||||||
private String docInterniCheckFornitore;
|
private String docInterniCheckFornitore;
|
||||||
private String produzioneDefaultCodAnag;
|
private String produzioneDefaultCodAnag;
|
||||||
private boolean flagPrintPackingListOnOrderClose;
|
private boolean flagPrintPackingListOnOrderClose;
|
||||||
private boolean flagPrintEtichetteOnOrderClose;
|
private boolean flagPrintEtichetteOnOrderClose;
|
||||||
|
private boolean flagPrintEtichetteOnLUClose;
|
||||||
private int onNumCnfInputChanged = 1;
|
private int onNumCnfInputChanged = 1;
|
||||||
private int onQtaTotInputChanged = 1;
|
private int onQtaTotInputChanged = 1;
|
||||||
private boolean flagAccettazioneUseQtaOrd = false;
|
private boolean flagAccettazioneUseQtaOrd = false;
|
||||||
@@ -56,6 +58,18 @@ public class DBSettingsModel {
|
|||||||
private boolean showCodFornSpedizione = true;
|
private boolean showCodFornSpedizione = true;
|
||||||
private boolean flagCanCreateInventario = true;
|
private boolean flagCanCreateInventario = true;
|
||||||
private boolean flagCanAddUnknownItemsInventario = true;
|
private boolean flagCanAddUnknownItemsInventario = true;
|
||||||
|
private boolean flagShouldAskToCreateOrUpdateRowInventario = false;
|
||||||
|
private String commessaMagazzino;
|
||||||
|
private boolean flagGeneraDocumentoSpedizione = false;
|
||||||
|
private boolean flagIsInventarioCacheEnabled = false;
|
||||||
|
private boolean flagAskPrintUlAccettazioneBolla = false;
|
||||||
|
private boolean flagAskTipoColloAccettazioneBolla = false;
|
||||||
|
private boolean flagAskVersamentoAutomaticoAccettazioneBolla = false;
|
||||||
|
private boolean flagCanAddUnknownItemsAccettazioneBolla = false;
|
||||||
|
private boolean flagCanAddUnknownBarcodesAccettazioneBolla = false;
|
||||||
|
private boolean flagEnableFastPickAccettazioneBolla = false;
|
||||||
|
private boolean flagDisableMandatoryTracciabilitaAccettazioneBolla = false;
|
||||||
|
private boolean flagOverflowQuantityWarning = false;
|
||||||
|
|
||||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||||
return flagSpedizioneEnableFakeGiacenza;
|
return flagSpedizioneEnableFakeGiacenza;
|
||||||
@@ -282,6 +296,15 @@ public class DBSettingsModel {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isFlagPrintEtichetteOnLUClose() {
|
||||||
|
return flagPrintEtichetteOnLUClose;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagPrintEtichetteOnLUClose(boolean flagPrintEtichetteOnLUClose) {
|
||||||
|
this.flagPrintEtichetteOnLUClose = flagPrintEtichetteOnLUClose;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public int getOnNumCnfInputChanged() {
|
public int getOnNumCnfInputChanged() {
|
||||||
return onNumCnfInputChanged;
|
return onNumCnfInputChanged;
|
||||||
}
|
}
|
||||||
@@ -418,6 +441,15 @@ public class DBSettingsModel {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isFlagShouldAskToCreateOrUpdateRowInventario() {
|
||||||
|
return flagShouldAskToCreateOrUpdateRowInventario;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagShouldAskToCreateOrUpdateRowInventario(boolean flagShouldAskToCreateOrUpdateRowInventario) {
|
||||||
|
this.flagShouldAskToCreateOrUpdateRowInventario = flagShouldAskToCreateOrUpdateRowInventario;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isFlagConsentiFuoriPianoLogistico() {
|
public boolean isFlagConsentiFuoriPianoLogistico() {
|
||||||
return flagConsentiFuoriPianoLogistico;
|
return flagConsentiFuoriPianoLogistico;
|
||||||
}
|
}
|
||||||
@@ -426,4 +458,112 @@ public class DBSettingsModel {
|
|||||||
this.flagConsentiFuoriPianoLogistico = flagConsentiFuoriPianoLogistico;
|
this.flagConsentiFuoriPianoLogistico = flagConsentiFuoriPianoLogistico;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isFlagConsentiOrdineSenzaGriglia() {
|
||||||
|
return flagConsentiOrdineSenzaGriglia;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagConsentiOrdineSenzaGriglia(boolean flagConsentiOrdineSenzaGriglia) {
|
||||||
|
this.flagConsentiOrdineSenzaGriglia = flagConsentiOrdineSenzaGriglia;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCommessaMagazzino() {
|
||||||
|
return commessaMagazzino;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setCommessaMagazzino(String commessaMagazzino) {
|
||||||
|
this.commessaMagazzino = commessaMagazzino;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagGeneraDocumentoSpedizione() {
|
||||||
|
return flagGeneraDocumentoSpedizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagGeneraDocumentoSpedizione(boolean flagGeneraDocumentoSpedizione) {
|
||||||
|
this.flagGeneraDocumentoSpedizione = flagGeneraDocumentoSpedizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagIsInventarioCacheEnabled() {
|
||||||
|
return flagIsInventarioCacheEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagIsInventarioCacheEnabled(boolean flagIsInventarioCacheEnabled) {
|
||||||
|
this.flagIsInventarioCacheEnabled = flagIsInventarioCacheEnabled;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagAskPrintUlAccettazioneBolla() {
|
||||||
|
return flagAskPrintUlAccettazioneBolla;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagAskPrintUlAccettazioneBolla(boolean flagAskPrintUlAccettazioneBolla) {
|
||||||
|
this.flagAskPrintUlAccettazioneBolla = flagAskPrintUlAccettazioneBolla;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagAskTipoColloAccettazioneBolla() {
|
||||||
|
return flagAskTipoColloAccettazioneBolla;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagAskTipoColloAccettazioneBolla(boolean flagAskTipoColloAccettazioneBolla) {
|
||||||
|
this.flagAskTipoColloAccettazioneBolla = flagAskTipoColloAccettazioneBolla;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagAskVersamentoAutomaticoAccettazioneBolla() {
|
||||||
|
return flagAskVersamentoAutomaticoAccettazioneBolla;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagAskVersamentoAutomaticoAccettazioneBolla(boolean flagAskVersamentoAutomaticoAccettazioneBolla) {
|
||||||
|
this.flagAskVersamentoAutomaticoAccettazioneBolla = flagAskVersamentoAutomaticoAccettazioneBolla;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagCanAddUnknownItemsAccettazioneBolla() {
|
||||||
|
return flagCanAddUnknownItemsAccettazioneBolla;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagCanAddUnknownItemsAccettazioneBolla(boolean flagCanAddUnknownItemsAccettazioneBolla) {
|
||||||
|
this.flagCanAddUnknownItemsAccettazioneBolla = flagCanAddUnknownItemsAccettazioneBolla;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagCanAddUnknownBarcodesAccettazioneBolla() {
|
||||||
|
return flagCanAddUnknownBarcodesAccettazioneBolla;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagCanAddUnknownBarcodesAccettazioneBolla(boolean flagCanAddUnknownBarcodesAccettazioneBolla) {
|
||||||
|
this.flagCanAddUnknownBarcodesAccettazioneBolla = flagCanAddUnknownBarcodesAccettazioneBolla;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagEnableFastPickAccettazioneBolla() {
|
||||||
|
return flagEnableFastPickAccettazioneBolla;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagEnableFastPickAccettazioneBolla(boolean flagEnableFastPickAccettazioneBolla) {
|
||||||
|
this.flagEnableFastPickAccettazioneBolla = flagEnableFastPickAccettazioneBolla;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagDisableMandatoryTracciabilitaAccettazioneBolla() {
|
||||||
|
return flagDisableMandatoryTracciabilitaAccettazioneBolla;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagDisableMandatoryTracciabilitaAccettazioneBolla(boolean flagDisableMandatoryTracciabilitaAccettazioneBolla) {
|
||||||
|
this.flagDisableMandatoryTracciabilitaAccettazioneBolla = flagDisableMandatoryTracciabilitaAccettazioneBolla;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagOverflowQuantityWarning() {
|
||||||
|
return flagOverflowQuantityWarning;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagOverflowQuantityWarning(boolean flagOverflowQuantityWarning) {
|
||||||
|
this.flagOverflowQuantityWarning = flagOverflowQuantityWarning;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package it.integry.integrywmsnative.core.settings;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
|
||||||
import com.google.firebase.perf.metrics.Trace;
|
import com.google.firebase.perf.metrics.Trace;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
@@ -15,8 +14,8 @@ import java.util.List;
|
|||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.CommonConst;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.StbGestSetup;
|
|
||||||
import it.integry.integrywmsnative.core.model.dto.InternalCodAnagsDTO;
|
import it.integry.integrywmsnative.core.model.dto.InternalCodAnagsDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.AziendaRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.AziendaRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
||||||
@@ -61,9 +60,6 @@ public class SettingsManager {
|
|||||||
settingsModelIstance = new SettingsModel();
|
settingsModelIstance = new SettingsModel();
|
||||||
|
|
||||||
settingsModelIstance.setServer(new SettingsModel.Server());
|
settingsModelIstance.setServer(new SettingsModel.Server());
|
||||||
//settingsModelIstance.user = new SettingsModel.User();
|
|
||||||
//settingsModelIstance.userSession = new SettingsModel.UserSession();
|
|
||||||
|
|
||||||
firstStart = true;
|
firstStart = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,241 +205,310 @@ public class SettingsManager {
|
|||||||
|
|
||||||
private static void loadGestSetupValues(Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
private static void loadGestSetupValues(Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
List<StbGestSetup> stbGestSetupList = new ArrayList<>();
|
List<StbGestSetupReader> stbGestSetupReaderList = new ArrayList<>();
|
||||||
|
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SETUP")
|
.setSection("SETUP")
|
||||||
.setKeySection("ENABLE_CHECK_PARTITA_MAG_PICKING_V"));
|
.setKeySection("ENABLE_CHECK_PARTITA_MAG_PICKING_V")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setEnableCheckPartitaMagCheckPickingV));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SETUP")
|
.setSection("SETUP")
|
||||||
.setKeySection("FLAG_MULTI_CLIENTE_ORD_VENDITA"));
|
.setKeySection("FLAG_MULTI_CLIENTE_ORD_VENDITA")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagMultiClienteOrdV));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SETUP")
|
.setSection("SETUP")
|
||||||
.setKeySection("FLAG_USE_COD_ANAG_AZIENDALE"));
|
.setKeySection("FLAG_USE_COD_ANAG_AZIENDALE")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagUseCodAnagAziendale));
|
||||||
.setGestName("PICKING")
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setSection("SETUP")
|
|
||||||
.setKeySection("DEFAULT_CRITERIO_DISTRIBUZIONE"));
|
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("PICKING_LIBERO")
|
.setSection("PICKING_LIBERO")
|
||||||
.setKeySection("FLAG_ASK_CLIENTE"));
|
.setKeySection("FLAG_ASK_CLIENTE")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagAskClienteInPickingLibero));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("PICKING_LIBERO")
|
.setSection("PICKING_LIBERO")
|
||||||
.setKeySection("FLAG_ALLOW_EMPTY_CLIENTE"));
|
.setKeySection("FLAG_ALLOW_EMPTY_CLIENTE")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagPickLiberoAllowEmptyCliente));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_CAN_ADD_EXTRA_ITEMS"));
|
.setKeySection("FLAG_CAN_ADD_EXTRA_ITEMS")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagCanAddExtraItemSpedizione));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("ACCETTAZIONE")
|
.setSection("ACCETTAZIONE")
|
||||||
.setKeySection("FLAG_AUTO_OPEN_NEW_UL"));
|
.setKeySection("FLAG_AUTO_OPEN_NEW_UL")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagCanAutoOpenNewULAccettazione));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_CAN_ADD_EXTRA_QUANTITY"));
|
.setKeySection("FLAG_CAN_ADD_EXTRA_QUANTITY")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagCanAddExtraQuantitySpedizione));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("ENABLE_CHECK_DEPOSITO"));
|
.setKeySection("ENABLE_CHECK_DEPOSITO")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagEnableCheckDepositoSpedizione));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SETUP")
|
.setSection("SETUP")
|
||||||
.setKeySection("FLAG_FORCE_ALL_TO_COLLI"));
|
.setKeySection("FLAG_FORCE_ALL_TO_COLLI")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagForceAllToColli));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SETUP")
|
.setSection("SETUP")
|
||||||
.setKeySection("FLAG_ASK_PESO_COLLO"));
|
.setKeySection("FLAG_ASK_PESO_COLLO")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagAskPesoColloSpedizione));
|
||||||
.setGestName("PICKING")
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setSection("SPEDIZIONE")
|
|
||||||
.setKeySection("FLAG_USE_NEW_PICKING_LIST"));
|
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("PRODUZIONE")
|
.setSection("PRODUZIONE")
|
||||||
.setKeySection("FLAG_VERSAMENTO_DIRETTO"));
|
.setKeySection("FLAG_VERSAMENTO_DIRETTO")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagVersamentoDirettoProduzione));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("PRODUZIONE")
|
.setSection("PRODUZIONE")
|
||||||
.setKeySection("FILTER_FORNTIORE_PROD"));
|
.setKeySection("FILTER_FORNTIORE_PROD")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFilterFornitoreProd));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("ENABLE_MANUAL_PICK"));
|
.setKeySection("ENABLE_MANUAL_PICK")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagSpedizioneEnableManualPick));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("ENABLE_FAKE_GIACENZA"));
|
.setKeySection("ENABLE_FAKE_GIACENZA")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagSpedizioneEnableFakeGiacenza));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_CAN_SELECT_MULTIPLE_ORDERS"));
|
.setKeySection("FLAG_CAN_SELECT_MULTIPLE_ORDERS")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagSpedizioneCanSelectMultipleOrders));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_USE_QTA_ORD"));
|
.setKeySection("FLAG_USE_QTA_ORD")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagSpedizioneUseQtaOrd));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Integer.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SETUP")
|
.setSection("SETUP")
|
||||||
.setKeySection("ON_NUM_CNF_INPUT_CHANGED"));
|
.setKeySection("ON_NUM_CNF_INPUT_CHANGED")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(data -> {
|
||||||
|
if (data != null) dbSettingsModelIstance.setOnNumCnfInputChanged(data);
|
||||||
|
}));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Integer.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SETUP")
|
.setSection("SETUP")
|
||||||
.setKeySection("ON_QTA_TOT_INPUT_CHANGED"));
|
.setKeySection("ON_QTA_TOT_INPUT_CHANGED")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(data -> {
|
||||||
|
if (data != null) dbSettingsModelIstance.setOnQtaTotInputChanged(data);
|
||||||
|
}));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||||
.setGestName("PVM")
|
.setGestName("PVM")
|
||||||
.setSection("DOC_INTERNI")
|
.setSection("DOC_INTERNI")
|
||||||
.setKeySection("NOTE_PERDITA"));
|
.setKeySection("NOTE_PERDITA")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(data -> {
|
||||||
|
if (data != null)
|
||||||
|
dbSettingsModelIstance.setNotePerditaDocInterni(Arrays.asList(data.split("\\|")));
|
||||||
|
}));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PVM")
|
.setGestName("PVM")
|
||||||
.setSection("ORDINI_A")
|
.setSection("ORDINI_A")
|
||||||
.setKeySection("ORDINA_NUOVI_ARTICOLI"));
|
.setKeySection("ORDINA_NUOVI_ARTICOLI")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagOrdinaNuoviArticoliInGriglia));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PVM")
|
.setGestName("PVM")
|
||||||
.setSection("ORDINI_A")
|
.setSection("ORDINI_A")
|
||||||
.setKeySection("ORDINA_ARTICOLI_ON_SCAN"));
|
.setKeySection("ORDINA_ARTICOLI_ON_SCAN")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagOrdinaArticoliOnScan));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PVM")
|
.setGestName("PVM")
|
||||||
.setSection("ORDINI_A")
|
.setSection("ORDINI_A")
|
||||||
.setKeySection("FLAG_CONSENTI_ORIDNE_DA_GRIGLIA"));
|
.setKeySection("FLAG_CONSENTI_ORDINE_DA_GRIGLIA")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagConsentiFuoriPianoLogistico));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PVM")
|
||||||
|
.setSection("ORDINI_A")
|
||||||
|
.setKeySection("FLAG_CONSENTI_ORDINE_SENZA_GRIGLIA")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagConsentiOrdineSenzaGriglia));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||||
.setGestName("PVM")
|
.setGestName("PVM")
|
||||||
.setSection("DOC_INTERNI")
|
.setSection("DOC_INTERNI")
|
||||||
.setKeySection("CHECK_FORNITORE"));
|
.setKeySection("CHECK_FORNITORE")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setDocInterniCheckFornitore));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("ACCETTAZIONE")
|
.setSection("ACCETTAZIONE")
|
||||||
.setKeySection("FLAG_USE_QTA_ORD"));
|
.setKeySection("FLAG_USE_QTA_ORD")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagAccettazioneUseQtaOrd));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("PICKING_LIBERO")
|
.setSection("PICKING_LIBERO")
|
||||||
.setKeySection("FLAG_ALLOW_EMPTY_DEST"));
|
.setKeySection("FLAG_ALLOW_EMPTY_DEST")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagPickLiberoAllowEmptyDest));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_PRINT_PACKING_LIST_ON_CLOSE"));
|
.setKeySection("FLAG_PRINT_PACKING_LIST_ON_CLOSE")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagPrintPackingListOnOrderClose));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_PRINT_ETICHETTE_ON_CLOSE"));
|
.setKeySection("FLAG_PRINT_ETICHETTE_ON_CLOSE")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagPrintEtichetteOnOrderClose));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_ALLOW_EMPTY_DEST"));
|
.setKeySection("FLAG_PRINT_ETICHETTE_ON_LU_CLOSE")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagPrintEtichetteOnLUClose)
|
||||||
|
.setDefaultValue(true));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_ASK_INFO_AGGIUNTIVE"));
|
.setKeySection("FLAG_ASK_INFO_AGGIUNTIVE")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagAskInfoAggiuntiveSpedizione));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("COD_DTIP_ORD_TRASF"));
|
.setKeySection("COD_DTIP_ORD_TRASF")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setCodDtipOrdTrasfV));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_NOTIFICA_STATO_PARTITA"));
|
.setKeySection("FLAG_NOTIFICA_STATO_PARTITA")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setNotifyLotStatus));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_SHOW_COD_FORN"));
|
.setKeySection("FLAG_SHOW_COD_FORN")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setShowCodFornSpedizione)
|
||||||
|
.setDefaultValue(true));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("FLAG_GROUP_BY_GRP_MERC"));
|
.setKeySection("FLAG_GROUP_BY_GRP_MERC")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setGroupShippingByCommodityGroup)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("INVENTARIO")
|
.setSection("INVENTARIO")
|
||||||
.setKeySection("FLAG_CAN_CREATE_INVENTARIO"));
|
.setKeySection("FLAG_CAN_CREATE_INVENTARIO")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagCanCreateInventario)
|
||||||
|
.setDefaultValue(true));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("INVENTARIO")
|
.setSection("INVENTARIO")
|
||||||
.setKeySection("FLAG_CAN_ADD_UNKNOWN_ITEMS"));
|
.setKeySection("FLAG_CAN_ADD_UNKNOWN_ITEMS")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagCanAddUnknownItemsInventario)
|
||||||
|
.setDefaultValue(true));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("INVENTARIO")
|
||||||
|
.setKeySection("FLAG_SHOULD_ASK_TO_CREATE_OR_UPDATE_ROW")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagShouldAskToCreateOrUpdateRowInventario)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("INVENTARIO")
|
||||||
|
.setKeySection("ENABLE_OFFLINE_CACHE")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagIsInventarioCacheEnabled)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("SETUP")
|
||||||
|
.setKeySection("COMMESSA_MAGAZZINO")
|
||||||
|
.setSetter(dbSettingsModelIstance::setCommessaMagazzino)
|
||||||
|
.setDefaultValue(CommonConst.Config.COMMESSA_MAG));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("SPEDIZIONE")
|
||||||
|
.setKeySection("GENERA_DOC")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagGeneraDocumentoSpedizione)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("ACCETTAZIONE_BOLLA")
|
||||||
|
.setKeySection("FLAG_ASK_PRINT_UL")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagAskPrintUlAccettazioneBolla)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("ACCETTAZIONE_BOLLA")
|
||||||
|
.setKeySection("FLAG_ASK_TIPO_COLLO")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagAskTipoColloAccettazioneBolla)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("ACCETTAZIONE_BOLLA")
|
||||||
|
.setKeySection("FLAG_ASK_VERSAMENTO_AUTOMATICO")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagAskVersamentoAutomaticoAccettazioneBolla)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("ACCETTAZIONE_BOLLA")
|
||||||
|
.setKeySection("FLAG_CAN_ADD_UNKNOWN_ITEMS")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagCanAddUnknownItemsAccettazioneBolla)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("ACCETTAZIONE_BOLLA")
|
||||||
|
.setKeySection("FLAG_CAN_ADD_UNKNOWN_BARCODES")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagCanAddUnknownBarcodesAccettazioneBolla)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("ACCETTAZIONE_BOLLA")
|
||||||
|
.setKeySection("FLAG_ENABLE_FAST_PICK")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagEnableFastPickAccettazioneBolla)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("ACCETTAZIONE_BOLLA")
|
||||||
|
.setKeySection("FLAG_DISABLE_MANDATORY_TRACCIABILITA")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagDisableMandatoryTracciabilitaAccettazioneBolla)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("SPEDIZIONE")
|
||||||
|
.setKeySection("FLAG_OVERFLOW_QUANTITY_WARNING")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagOverflowQuantityWarning)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
|
||||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||||
|
|
||||||
mGestSetupRESTConsumer.getValues(codMdep, stbGestSetupList, list -> {
|
|
||||||
dbSettingsModelIstance.setEnableCheckPartitaMagCheckPickingV(getValueFromList(list, "SETUP", "ENABLE_CHECK_PARTITA_MAG_PICKING_V", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagMultiClienteOrdV(getValueFromList(list, "SETUP", "FLAG_MULTI_CLIENTE_ORD_VENDITA", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagUseCodAnagAziendale(getValueFromList(list, "SETUP", "FLAG_USE_COD_ANAG_AZIENDALE", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagAskClienteInPickingLibero(getValueFromList(list, "PICKING_LIBERO", "FLAG_ASK_CLIENTE", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagPickLiberoAllowEmptyCliente(getValueFromList(list, "PICKING_LIBERO", "FLAG_ALLOW_EMPTY_CLIENTE", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagCanAddExtraItemSpedizione(getValueFromList(list, "SPEDIZIONE", "FLAG_CAN_ADD_EXTRA_ITEMS", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagCanAutoOpenNewULAccettazione(getValueFromList(list, "ACCETTAZIONE", "FLAG_AUTO_OPEN_NEW_UL", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagCanAddExtraQuantitySpedizione(getValueFromList(list, "SPEDIZIONE", "FLAG_CAN_ADD_EXTRA_QUANTITY", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagEnableCheckDepositoSpedizione(getValueFromList(list, "SPEDIZIONE", "ENABLE_CHECK_DEPOSITO", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagForceAllToColli(getValueFromList(list, "SETUP", "FLAG_FORCE_ALL_TO_COLLI", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagAskPesoColloSpedizione(getValueFromList(list, "SETUP", "FLAG_ASK_PESO_COLLO", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagVersamentoDirettoProduzione(getValueFromList(list, "PRODUZIONE", "FLAG_VERSAMENTO_DIRETTO", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagSpedizioneEnableManualPick(getValueFromList(list, "SPEDIZIONE", "ENABLE_MANUAL_PICK", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagSpedizioneEnableFakeGiacenza(getValueFromList(list, "SPEDIZIONE", "ENABLE_FAKE_GIACENZA", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagSpedizioneCanSelectMultipleOrders(getValueFromList(list, "SPEDIZIONE", "FLAG_CAN_SELECT_MULTIPLE_ORDERS", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagSpedizioneUseQtaOrd(getValueFromList(list, "SPEDIZIONE", "FLAG_USE_QTA_ORD", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagOrdinaNuoviArticoliInGriglia(getValueFromList(list, "ORDINI_A", "ORDINA_NUOVI_ARTICOLI", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setDocInterniCheckFornitore(getValueFromList(list, "DOC_INTERNI", "CHECK_FORNITORE", String.class));
|
|
||||||
dbSettingsModelIstance.setFlagAccettazioneUseQtaOrd(getValueFromList(list, "ACCETTAZIONE", "FLAG_USE_QTA_ORD", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagPickLiberoAllowEmptyDest(getValueFromList(list, "PICKING_LIBERO", "FLAG_ALLOW_EMPTY_DEST", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagOrdinaArticoliOnScan(getValueFromList(list, "ORDINI_A", "ORDINA_ARTICOLI_ON_SCAN", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagConsentiFuoriPianoLogistico(getValueFromList(list, "ORDINI_A", "FLAG_CONSENTI_ORIDNE_DA_GRIGLIA", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagPrintPackingListOnOrderClose(getValueFromList(list, "SPEDIZIONE", "FLAG_PRINT_PACKING_LIST_ON_CLOSE", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagPrintEtichetteOnOrderClose(getValueFromList(list, "SPEDIZIONE", "FLAG_PRINT_ETICHETTE_ON_CLOSE", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagAskInfoAggiuntiveSpedizione(getValueFromList(list, "SPEDIZIONE", "FLAG_ASK_INFO_AGGIUNTIVE", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFilterFornitoreProd(getValueFromList(list, "PRODUZIONE", "FILTER_FORNTIORE_PROD", 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.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));
|
|
||||||
dbSettingsModelIstance.setFlagCanCreateInventario(getValueFromList(list, "INVENTARIO", "FLAG_CAN_CREATE_INVENTARIO", Boolean.class, Boolean.TRUE));
|
|
||||||
dbSettingsModelIstance.setFlagCanAddUnknownItemsInventario(getValueFromList(list, "INVENTARIO", "FLAG_CAN_ADD_UNKNOWN_ITEMS", Boolean.class, Boolean.TRUE));
|
|
||||||
|
|
||||||
String notePerdita = getValueFromList(list, "DOC_INTERNI", "NOTE_PERDITA", String.class);
|
mGestSetupRESTConsumer.getValues(codMdep, stbGestSetupReaderList, list -> {
|
||||||
if (notePerdita != null)
|
|
||||||
dbSettingsModelIstance.setNotePerditaDocInterni(Arrays.asList(notePerdita.split("\\|")));
|
|
||||||
|
|
||||||
Integer onNumCnfInputChanged = getValueFromList(list, "SETUP", "ON_NUM_CNF_INPUT_CHANGED", Integer.class);
|
for (var stbGestSetupReader : list) {
|
||||||
if (onNumCnfInputChanged != null)
|
var value = stbGestSetupReader.getValue();
|
||||||
dbSettingsModelIstance.setOnNumCnfInputChanged(onNumCnfInputChanged);
|
var clazz = stbGestSetupReader.getClazz();
|
||||||
|
|
||||||
Integer onQtaTotInputChanged = getValueFromList(list, "SETUP", "ON_QTA_TOT_INPUT_CHANGED", Integer.class);
|
Object finalValue = null;
|
||||||
if (onQtaTotInputChanged != null)
|
if (value != null) {
|
||||||
dbSettingsModelIstance.setOnQtaTotInputChanged(onQtaTotInputChanged);
|
if (clazz == String.class) {
|
||||||
|
finalValue = clazz.cast(value);
|
||||||
|
} else if (clazz == Boolean.class) {
|
||||||
|
finalValue = clazz.cast("S".equalsIgnoreCase(value));
|
||||||
|
} else if (clazz == Integer.class && value != null) {
|
||||||
|
finalValue = clazz.cast(Integer.parseInt(value));
|
||||||
|
}
|
||||||
|
} else if (stbGestSetupReader.getDefaultValue() == null) {
|
||||||
|
if (clazz == Boolean.class) {
|
||||||
|
finalValue = clazz.cast(Boolean.FALSE);
|
||||||
|
} else if (clazz == Integer.class) {
|
||||||
|
finalValue = clazz.cast(0);
|
||||||
|
}
|
||||||
|
} else finalValue = stbGestSetupReader.getDefaultValue();
|
||||||
|
|
||||||
|
stbGestSetupReader.getSetter().run(finalValue);
|
||||||
|
}
|
||||||
|
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static <T> T getValueFromList(List<StbGestSetup> stbGestSetupList, String section, String keySectionName, Class<T> clazz) {
|
|
||||||
return getValueFromList(stbGestSetupList, section, keySectionName, clazz, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static <T> T getValueFromList(List<StbGestSetup> stbGestSetupList, String section, String keySectionName, Class<T> clazz, T defaultValue) {
|
|
||||||
|
|
||||||
StbGestSetup value = Stream.of(stbGestSetupList)
|
|
||||||
.filter(x -> x.getSection().equalsIgnoreCase(section) && x.getKeySection().equalsIgnoreCase(keySectionName))
|
|
||||||
.findFirstOrElse(null);
|
|
||||||
|
|
||||||
if (value != null) {
|
|
||||||
if (clazz == String.class) {
|
|
||||||
return clazz.cast(value.getValue());
|
|
||||||
} else if (clazz == Boolean.class) {
|
|
||||||
return clazz.cast("S".equalsIgnoreCase(value.getValue()));
|
|
||||||
} else if (clazz == Integer.class && value.getValue() != null) {
|
|
||||||
return clazz.cast(Integer.parseInt(value.getValue()));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (clazz == Boolean.class) {
|
|
||||||
return clazz.cast(Boolean.FALSE);
|
|
||||||
} else if (clazz == Integer.class) {
|
|
||||||
return clazz.cast(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return defaultValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,9 +95,19 @@ public class SettingsModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class UserSession {
|
public static class UserSession {
|
||||||
|
private String deviceId;
|
||||||
private String profileDB;
|
private String profileDB;
|
||||||
private AvailableCodMdepsDTO depo;
|
private AvailableCodMdepsDTO depo;
|
||||||
private Integer defaultOrdinamentoPickingAccettazione = 0;
|
private Integer defaultOrdinamentoPickingAccettazione = 0;
|
||||||
|
private Integer defaultOrdinamentoPickingAccettazioneBolle = 0;
|
||||||
|
|
||||||
|
public String getDeviceId() {
|
||||||
|
return deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceId(String deviceId) {
|
||||||
|
this.deviceId = deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getProfileDB() {
|
public String getProfileDB() {
|
||||||
return profileDB;
|
return profileDB;
|
||||||
@@ -125,6 +135,15 @@ public class SettingsModel {
|
|||||||
this.defaultOrdinamentoPickingAccettazione = defaultOrdinamentoPickingAccettazione;
|
this.defaultOrdinamentoPickingAccettazione = defaultOrdinamentoPickingAccettazione;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getDefaultOrdinamentoPickingAccettazioneBolle() {
|
||||||
|
return defaultOrdinamentoPickingAccettazioneBolle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserSession setDefaultOrdinamentoPickingAccettazioneBolle(Integer defaultOrdinamentoPickingAccettazioneBolle) {
|
||||||
|
this.defaultOrdinamentoPickingAccettazioneBolle = defaultOrdinamentoPickingAccettazioneBolle;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Server getServer() {
|
public Server getServer() {
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package it.integry.integrywmsnative.core.settings;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.StbGestSetup;
|
||||||
|
|
||||||
|
public class StbGestSetupReader<T> extends StbGestSetup {
|
||||||
|
|
||||||
|
private RunnableArgs<T> setter;
|
||||||
|
private T defaultValue;
|
||||||
|
private transient Class<T> clazz;
|
||||||
|
|
||||||
|
public StbGestSetupReader(Class<T> clazz) {
|
||||||
|
this.clazz = clazz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbGestSetupReader<T> setGestName(String gestName) {
|
||||||
|
super.setGestName(gestName);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbGestSetupReader<T> setSection(String section) {
|
||||||
|
super.setSection(section);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbGestSetupReader<T> setKeySection(String keySection) {
|
||||||
|
super.setKeySection(keySection);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RunnableArgs<T> getSetter() {
|
||||||
|
return setter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbGestSetupReader<T> setSetter(RunnableArgs<T> setter) {
|
||||||
|
this.setter = setter;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public T getDefaultValue() {
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StbGestSetupReader<T> setDefaultValue(T defaultValue) {
|
||||||
|
this.defaultValue = defaultValue;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Class<T> getClazz() {
|
||||||
|
return clazz;
|
||||||
|
}
|
||||||
|
|
||||||
|
// public Class<T> reflectClassType() {
|
||||||
|
// return ((Class<T>) ((ParameterizedType) getClass()
|
||||||
|
// .getGenericSuperclass()).getActualTypeArguments()[0]);
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
@@ -27,9 +27,11 @@ public class UpdatesManager {
|
|||||||
public void init(AppCompatActivity activityContext) {
|
public void init(AppCompatActivity activityContext) {
|
||||||
this.mContext = activityContext;
|
this.mContext = activityContext;
|
||||||
|
|
||||||
|
final String baseEndpoint = SettingsManager.i().getServer().getProtocol() + "://" + SettingsManager.i().getServer().getHost() +
|
||||||
|
(SettingsManager.i().getServer().getPort() > 0 ? ":" + SettingsManager.i().getServer().getPort() : "");
|
||||||
|
|
||||||
String currentVersionUrl = SettingsManager.i().getServer().getProtocol() + "://" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "/ems-api/wms/currentVersion";
|
final String currentVersionUrl = baseEndpoint + "/ems-api/wms/currentVersion";
|
||||||
String currentDownloadUrl = SettingsManager.i().getServer().getProtocol() + "://" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "/ems-api/wms/android-release.apk";
|
final String currentDownloadUrl = baseEndpoint + "/ems-api/wms/android-release.apk";
|
||||||
|
|
||||||
|
|
||||||
AppUpdater appUpdater = new AppUpdater(mContext)
|
AppUpdater appUpdater = new AppUpdater(mContext)
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ public class PermissionsHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] permissionArray = new String[permissionsToAsk.size()];
|
String[] permissionArray = new String[permissionsToAsk.size()];
|
||||||
permissionsToAsk.toArray(permissionArray);
|
permissionsToAsk.toArray(permissionArray);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.integrywmsnative.core.utility;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
|
||||||
|
public class UntMisUtils {
|
||||||
|
|
||||||
|
public static boolean shouldBeShowInColli(MtbAart mtbAart) {
|
||||||
|
return SettingsManager.iDB().isFlagForceAllToColli() || (mtbAart == null || !mtbAart.isFlagQtaCnfFissaBoolean());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -53,14 +53,57 @@ public class UtilityDate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Date recognizeDate(String dateString) throws ParseException, DateNotRecognizedException, TimeNotRecognizedException {
|
public static Date recognizeDate(String dateString) throws ParseException, DateNotRecognizedException, TimeNotRecognizedException {
|
||||||
|
if(dateString == null) return null;
|
||||||
|
|
||||||
|
final String format = recognizeDateFormat(dateString);
|
||||||
|
if(format == null) return null;
|
||||||
|
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||||
|
|
||||||
|
return sdf.parse(dateString);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LocalDate recognizeLocalDateWithExceptionHandler(String dateString) {
|
||||||
|
try {
|
||||||
|
return UtilityDate.recognizeLocalDate(dateString);
|
||||||
|
} catch (DateNotRecognizedException | TimeNotRecognizedException pex) {
|
||||||
|
UtilityLogger.error(pex);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LocalDate recognizeLocalDate(String dateString) throws DateNotRecognizedException, TimeNotRecognizedException {
|
||||||
|
final String format = recognizeDateFormat(dateString);
|
||||||
|
if(format == null) return null;
|
||||||
|
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);
|
||||||
|
return LocalDate.parse(dateString, formatter);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LocalDateTime recognizeLocalDateTimeWithExceptionHandler(String dateString) {
|
||||||
|
try {
|
||||||
|
return UtilityDate.recognizeLocalDateTime(dateString);
|
||||||
|
} catch (DateNotRecognizedException | TimeNotRecognizedException pex) {
|
||||||
|
UtilityLogger.error(pex);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LocalDateTime recognizeLocalDateTime(String dateString) throws DateNotRecognizedException, TimeNotRecognizedException {
|
||||||
|
final String format = recognizeDateFormat(dateString);
|
||||||
|
if(format == null) return null;
|
||||||
|
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);
|
||||||
|
return LocalDateTime.parse(dateString, formatter);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String recognizeDateFormat(String dateString) throws DateNotRecognizedException, TimeNotRecognizedException {
|
||||||
if (dateString == null) {
|
if (dateString == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
//SE SONO PIU' DI 10 caratteri allora c'è anche l'ora
|
//SE SONO PIU' DI 10 caratteri allora c'è anche l'ora
|
||||||
|
|
||||||
SimpleDateFormat format = null;
|
|
||||||
char dateSeparator;
|
char dateSeparator;
|
||||||
|
|
||||||
String onlyDateSubstring = dateString.substring(0, 10);
|
String onlyDateSubstring = dateString.substring(0, 10);
|
||||||
@@ -85,16 +128,12 @@ public class UtilityDate {
|
|||||||
|
|
||||||
String timeFormatString = "HH" + timeSeparator + "mm" + timeSeparator + "ss";
|
String timeFormatString = "HH" + timeSeparator + "mm" + timeSeparator + "ss";
|
||||||
|
|
||||||
format = new SimpleDateFormat(dateFormatString + " " + timeFormatString);
|
return dateFormatString + " " + timeFormatString;
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
format = new SimpleDateFormat(dateFormatString);
|
return dateFormatString;
|
||||||
}
|
}
|
||||||
|
|
||||||
//format.setTimeZone(TimeZone.getTimeZone("GMT"));
|
|
||||||
|
|
||||||
return format.parse(dateString);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -170,27 +209,27 @@ public class UtilityDate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static LocalDate toLocalDate(Date dateToConvert) {
|
public static LocalDate toLocalDate(Date dateToConvert) {
|
||||||
return dateToConvert.toInstant()
|
return dateToConvert != null ? dateToConvert.toInstant()
|
||||||
.atZone(currentZone)
|
.atZone(currentZone)
|
||||||
.toLocalDate();
|
.toLocalDate() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LocalDateTime toLocalDateTime(Date dateToConvert) {
|
public static LocalDateTime toLocalDateTime(Date dateToConvert) {
|
||||||
return dateToConvert.toInstant()
|
return dateToConvert != null ? dateToConvert.toInstant()
|
||||||
.atZone(currentZone)
|
.atZone(currentZone)
|
||||||
.toLocalDateTime();
|
.toLocalDateTime() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Date toDate(LocalDate dateToConvert) {
|
public static Date toDate(LocalDate dateToConvert) {
|
||||||
return Date.from(dateToConvert.atStartOfDay()
|
return dateToConvert != null ? Date.from(dateToConvert.atStartOfDay()
|
||||||
.atZone(currentZone)
|
.atZone(currentZone)
|
||||||
.toInstant());
|
.toInstant()) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Date toDateTime(LocalDateTime dateToConvert) {
|
public static Date toDateTime(LocalDateTime dateToConvert) {
|
||||||
return Date.from(dateToConvert
|
return dateToConvert != null ? Date.from(dateToConvert
|
||||||
.atZone(currentZone)
|
.atZone(currentZone)
|
||||||
.toInstant());
|
.toInstant()) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -206,6 +245,12 @@ public class UtilityDate {
|
|||||||
.toLocalDateTime();
|
.toLocalDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static LocalDate millisTimeToLocalDate(long time, @Nullable String timezone) {
|
||||||
|
return Instant.ofEpochMilli(time)
|
||||||
|
.atZone(timezone == null ? currentZone : ZoneId.of(timezone))
|
||||||
|
.toLocalDate();
|
||||||
|
}
|
||||||
|
|
||||||
public static LocalDate timeToLocalDate(long time, @Nullable String timezone) {
|
public static LocalDate timeToLocalDate(long time, @Nullable String timezone) {
|
||||||
return Instant.ofEpochSecond(time)
|
return Instant.ofEpochSecond(time)
|
||||||
.atZone(timezone == null ? currentZone : ZoneId.of(timezone))
|
.atZone(timezone == null ? currentZone : ZoneId.of(timezone))
|
||||||
@@ -229,5 +274,9 @@ public class UtilityDate {
|
|||||||
return TimeUnit.DAYS.toSeconds(localDate.toEpochDay());
|
return TimeUnit.DAYS.toSeconds(localDate.toEpochDay());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static long localDateToMillisTime(LocalDate localDate) {
|
||||||
|
return TimeUnit.DAYS.toMillis(localDate.toEpochDay());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ public class UtilityExceptions {
|
|||||||
public static void defaultException(Context context, Exception ex, boolean sendEmail) {
|
public static void defaultException(Context context, Exception ex, boolean sendEmail) {
|
||||||
|
|
||||||
if (ex.getMessage() != null) {
|
if (ex.getMessage() != null) {
|
||||||
Logger.e(ex, Html.fromHtml(ex.getMessage()).toString());
|
Logger.e(ex, Html.fromHtml(ex.getMessage()).toString(), (Object) ex.getStackTrace());
|
||||||
} else {
|
} else {
|
||||||
Logger.e(ex, "Errore");
|
Logger.e(ex, "Errore", (Object) ex.getStackTrace());
|
||||||
}
|
}
|
||||||
|
|
||||||
String errorMessage = CommonRESTException.tryRecognizeThenGetMessage(ex);
|
String errorMessage = CommonRESTException.tryRecognizeThenGetMessage(ex);
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package it.integry.integrywmsnative.core.utility;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.GsonBuilder;
|
||||||
|
|
||||||
|
import java.lang.reflect.Modifier;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.deserializer.LocalDateDeserializer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.deserializer.LocalDateTimeDeserializer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.serializer.LocalDateSerializer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.serializer.LocalDateTimeSerializer;
|
||||||
|
|
||||||
|
public class UtilityGson {
|
||||||
|
|
||||||
|
public static Gson createObject() {
|
||||||
|
return new GsonBuilder()
|
||||||
|
.setDateFormat("dd/MM/yyyy HH:mm:ss")
|
||||||
|
.excludeFieldsWithModifiers(Modifier.TRANSIENT)
|
||||||
|
.registerTypeAdapter(LocalDate.class, new LocalDateDeserializer())
|
||||||
|
.registerTypeAdapter(LocalDate.class, new LocalDateSerializer())
|
||||||
|
.registerTypeAdapter(LocalDateTime.class, new LocalDateTimeDeserializer())
|
||||||
|
.registerTypeAdapter(LocalDateTime.class, new LocalDateTimeSerializer())
|
||||||
|
.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -41,9 +41,15 @@ public class UtilityServer {
|
|||||||
public static void isEmsApiAvailable(final String protocol, final String serverAddress, final int serverTCPport, final Runnable onComplete, final RunnableArgs<Exception> onFailed) {
|
public static void isEmsApiAvailable(final String protocol, final String serverAddress, final int serverTCPport, final Runnable onComplete, final RunnableArgs<Exception> onFailed) {
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
|
|
||||||
|
String url = null;
|
||||||
|
|
||||||
|
if(serverTCPport > 0)
|
||||||
|
url = String.format("%s://%s:%d/ems-api/system/ok", protocol, serverAddress, serverTCPport);
|
||||||
|
else
|
||||||
|
url = String.format("%s://%s/ems-api/system/ok", protocol, serverAddress);
|
||||||
|
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(String.format("%s://%s:%d/ems-api/system/ok", protocol, serverAddress, serverTCPport))
|
.url(url)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.gest.accettazione;
|
|
||||||
|
|
||||||
import dagger.Subcomponent;
|
|
||||||
|
|
||||||
@Subcomponent
|
|
||||||
public interface MainAccettazioneComponent {
|
|
||||||
|
|
||||||
@Subcomponent.Factory
|
|
||||||
interface Factory {
|
|
||||||
|
|
||||||
MainAccettazioneComponent create();
|
|
||||||
}
|
|
||||||
|
|
||||||
void inject(MainAccettazioneFragment mainAccettazioneFragment);
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.gest.accettazione;
|
|
||||||
|
|
||||||
import dagger.Module;
|
|
||||||
import dagger.Provides;
|
|
||||||
import it.integry.integrywmsnative.gest.accettazione.rest.OrdiniAccettazioneRESTConsumer;
|
|
||||||
|
|
||||||
@Module(subcomponents = {MainAccettazioneComponent.class})
|
|
||||||
public class MainAccettazioneModule {
|
|
||||||
|
|
||||||
@Provides
|
|
||||||
OrdiniAccettazioneRESTConsumer providesOrdiniAccettazioneRESTConsumer() {
|
|
||||||
return new OrdiniAccettazioneRESTConsumer();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Provides
|
|
||||||
MainAccettazioneViewModel providesMainAccettazioneViewModel(OrdiniAccettazioneRESTConsumer ordiniAccettazioneRESTConsumer) {
|
|
||||||
return new MainAccettazioneViewModel(ordiniAccettazioneRESTConsumer);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco;
|
||||||
|
|
||||||
|
import dagger.Subcomponent;
|
||||||
|
|
||||||
|
@Subcomponent
|
||||||
|
public interface MainAccettazioneBollaElencoComponent {
|
||||||
|
|
||||||
|
@Subcomponent.Factory
|
||||||
|
interface Factory {
|
||||||
|
|
||||||
|
MainAccettazioneBollaElencoComponent create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void inject(MainAccettazioneBollaElencoFragment mainAccettazioneBollaElencoFragment);
|
||||||
|
}
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.appcompat.widget.AppCompatTextView;
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||||
|
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||||
|
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
import it.integry.integrywmsnative.databinding.FragmentMainAccettazioneBollaBinding;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.SitBollaAccettazioneDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.TestataBollaAccettazioneDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.ui.MainAccettazioneBolleElencoAdapter;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.ui.MainAccettazioneBolleElencoListModel;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.AccettazioneBollaPickingActivity;
|
||||||
|
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||||
|
|
||||||
|
public class MainAccettazioneBollaElencoFragment extends BaseFragment implements ITitledFragment, IScrollableFragment, MainAccettazioneBollaElencoViewModel.Listener {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
MainAccettazioneBollaElencoViewModel mViewModel;
|
||||||
|
|
||||||
|
|
||||||
|
private final ObservableArrayList<MainAccettazioneBolleElencoListModel> mBolleInevaseMutableData = new ObservableArrayList<>();
|
||||||
|
private FragmentMainAccettazioneBollaBinding mBinding;
|
||||||
|
private ElevatedToolbar mToolbar;
|
||||||
|
private AppCompatTextView mAppBarTitle;
|
||||||
|
|
||||||
|
public BindableBoolean fabVisible = new BindableBoolean(false);
|
||||||
|
|
||||||
|
private String mTextFilter;
|
||||||
|
|
||||||
|
|
||||||
|
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
public MainAccettazioneBollaElencoFragment() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MainAccettazioneBollaElencoFragment newInstance() {
|
||||||
|
return new MainAccettazioneBollaElencoFragment();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreateActionBar(AppCompatTextView titleText, Context context) {
|
||||||
|
mAppBarTitle = titleText;
|
||||||
|
mAppBarTitle.setText(context.getText(R.string.accettazione_ordine_title_fragment).toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||||
|
onLoadingEnded();
|
||||||
|
outState.putString("mToolbar", DataCache.addItem(mToolbar));
|
||||||
|
|
||||||
|
super.onSaveInstanceState(outState);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
setRetainInstance(true);
|
||||||
|
|
||||||
|
if (savedInstanceState != null && savedInstanceState.containsKey("mToolbar"))
|
||||||
|
mToolbar = DataCache.retrieveItem(savedInstanceState.getString("mToolbar"));
|
||||||
|
|
||||||
|
mBinding = FragmentMainAccettazioneBollaBinding.inflate(inflater, container, false);
|
||||||
|
|
||||||
|
MainApplication.appComponent
|
||||||
|
.mainAccettazioneBollaElencoComponent()
|
||||||
|
.create()
|
||||||
|
.inject(this);
|
||||||
|
|
||||||
|
mViewModel.setListener(this);
|
||||||
|
|
||||||
|
mBinding.setLifecycleOwner(this);
|
||||||
|
mBinding.setView(this);
|
||||||
|
|
||||||
|
this.initRecyclerView();
|
||||||
|
|
||||||
|
mToolbar.setRecyclerView(mBinding.accettazioneMainList);
|
||||||
|
|
||||||
|
return mBinding.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
|
||||||
|
this.fabVisible.set(false);
|
||||||
|
mViewModel.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
for (Runnable onPreDestroy : mOnPreDestroyList) {
|
||||||
|
onPreDestroy.run();
|
||||||
|
}
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initRecyclerView() {
|
||||||
|
this.mViewModel.getBolleList().observe(getViewLifecycleOwner(), x -> {
|
||||||
|
this.refreshList();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
MainAccettazioneBolleElencoAdapter adapter = new MainAccettazioneBolleElencoAdapter(getActivity(), mBolleInevaseMutableData)
|
||||||
|
.setOnGroupItemClicked(x -> {
|
||||||
|
Stream.of(mBolleInevaseMutableData)
|
||||||
|
.filter(y -> !y.getGroupTitle().equalsIgnoreCase(x) && y.getSelectedObservable().get())
|
||||||
|
.forEach(y -> y.getSelectedObservable().set(false));
|
||||||
|
|
||||||
|
boolean allSelected = Stream.of(mBolleInevaseMutableData)
|
||||||
|
.filter(y -> y.getGroupTitle().equalsIgnoreCase(x))
|
||||||
|
.allMatch(y -> y.getSelectedObservable().get());
|
||||||
|
|
||||||
|
Stream.of(mBolleInevaseMutableData)
|
||||||
|
.filter(y -> y.getGroupTitle().equalsIgnoreCase(x))
|
||||||
|
.forEach(y -> y.getSelectedObservable().set(!allSelected));
|
||||||
|
})
|
||||||
|
.setOnItemChecked(x -> {
|
||||||
|
Stream.of(mBolleInevaseMutableData)
|
||||||
|
.filter(y -> !y.getGroupTitle().equalsIgnoreCase(x.getGroupTitle()) && y.getSelectedObservable().get())
|
||||||
|
.forEach(y -> y.getSelectedObservable().set(false));
|
||||||
|
|
||||||
|
fabVisible.set(Stream.of(mBolleInevaseMutableData)
|
||||||
|
.anyMatch(y -> y.getSelectedObservable().get()));
|
||||||
|
});
|
||||||
|
|
||||||
|
adapter.setEmptyView(this.mBinding.bolleAccettazioneEmptyView);
|
||||||
|
|
||||||
|
this.mBinding.accettazioneMainList.setAdapter(adapter);
|
||||||
|
|
||||||
|
if (mToolbar != null)
|
||||||
|
mToolbar.setRecyclerView(this.mBinding.accettazioneMainList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void refreshList() {
|
||||||
|
List<TestataBollaAccettazioneDTO> tmpList = mViewModel.getBolleList().getValue();
|
||||||
|
|
||||||
|
//TODO: Filter here
|
||||||
|
|
||||||
|
this.mBolleInevaseMutableData.clear();
|
||||||
|
|
||||||
|
if(tmpList != null)
|
||||||
|
this.mBolleInevaseMutableData.addAll(convertDataModelToListModel(tmpList));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||||
|
mToolbar = toolbar;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||||
|
this.mOnPreDestroyList.add(onPreDestroy);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private List<MainAccettazioneBolleElencoListModel> convertDataModelToListModel(List<TestataBollaAccettazioneDTO> dataList) {
|
||||||
|
if(dataList == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
final Comparator<TestataBollaAccettazioneDTO> comparer = Comparator.comparing(TestataBollaAccettazioneDTO::getListino)
|
||||||
|
.thenComparing(TestataBollaAccettazioneDTO::getRagSoc)
|
||||||
|
.thenComparing(TestataBollaAccettazioneDTO::getNumDoc);
|
||||||
|
|
||||||
|
return Stream.of(dataList)
|
||||||
|
.sorted(comparer)
|
||||||
|
.map(x -> {
|
||||||
|
MainAccettazioneBolleElencoListModel listModel = new MainAccettazioneBolleElencoListModel();
|
||||||
|
|
||||||
|
listModel.setOriginalModel(x);
|
||||||
|
listModel.setGroupTitle(x.getListino() + " - " + x.getRagSoc());
|
||||||
|
listModel.setDescription(String.format(getString(R.string.ord_acq_testata), x.getNumDoc(), UtilityDate.formatDate(x.getDataDoc(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)));
|
||||||
|
|
||||||
|
listModel.setSubDescription(x.getDescrizioneListino());
|
||||||
|
listModel.setRightDescription(x.getCodAnag());
|
||||||
|
listModel.setRightSubDescription(x.getCodJcom());
|
||||||
|
|
||||||
|
return listModel;
|
||||||
|
})
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void dispatchBolle() {
|
||||||
|
List<TestataBollaAccettazioneDTO> selectedBolle = Stream.of(this.mBolleInevaseMutableData)
|
||||||
|
.filter(x -> x.getSelectedObservable().get())
|
||||||
|
.map(MainAccettazioneBolleElencoListModel::getOriginalModel)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
this.mViewModel.loadPicking(selectedBolle);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPickingReady(List<TestataBollaAccettazioneDTO> bolle, List<SitBollaAccettazioneDTO> sitArts) {
|
||||||
|
AccettazioneBollaPickingActivity.startActivity(requireContext(), bolle, sitArts);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco;
|
||||||
|
|
||||||
|
import dagger.Module;
|
||||||
|
import dagger.Provides;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.BolleAccettazioneRESTConsumer;
|
||||||
|
|
||||||
|
@Module(subcomponents = {MainAccettazioneBollaElencoComponent.class})
|
||||||
|
public class MainAccettazioneBollaElencoModule {
|
||||||
|
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
BolleAccettazioneRESTConsumer providesBolleAccettazioneRESTConsumer() {
|
||||||
|
return new BolleAccettazioneRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
MainAccettazioneBollaElencoViewModel providesMainAccettazioneBollaViewModel(BolleAccettazioneRESTConsumer bolleAccettazioneRESTConsumer) {
|
||||||
|
return new MainAccettazioneBollaElencoViewModel(bolleAccettazioneRESTConsumer);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco;
|
||||||
|
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.BolleAccettazioneRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.SitBollaAccettazioneDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.TestataBollaAccettazioneDTO;
|
||||||
|
|
||||||
|
public class MainAccettazioneBollaElencoViewModel {
|
||||||
|
|
||||||
|
private final BolleAccettazioneRESTConsumer bolleAccettazioneRESTConsumer;
|
||||||
|
|
||||||
|
private final MutableLiveData<List<TestataBollaAccettazioneDTO>> bolleList = new MutableLiveData<>();
|
||||||
|
private Listener listener;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public MainAccettazioneBollaElencoViewModel(BolleAccettazioneRESTConsumer bolleAccettazioneRESTConsumer) {
|
||||||
|
this.bolleAccettazioneRESTConsumer = bolleAccettazioneRESTConsumer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init() {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
|
bolleAccettazioneRESTConsumer.retrieveBolleDaAccettare(bolleList -> {
|
||||||
|
this.bolleList.postValue(bolleList);
|
||||||
|
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public MutableLiveData<List<TestataBollaAccettazioneDTO>> getBolleList() {
|
||||||
|
return bolleList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void loadPicking(List<TestataBollaAccettazioneDTO> selectedBolle) {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
|
this.bolleAccettazioneRESTConsumer.retrievePickingListBolle(selectedBolle, sitArts -> {
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
|
this.sendOnPickingReady(selectedBolle, sitArts);
|
||||||
|
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public MainAccettazioneBollaElencoViewModel setListener(MainAccettazioneBollaElencoViewModel.Listener listener) {
|
||||||
|
this.listener = listener;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendOnLoadingStarted() {
|
||||||
|
if (this.listener != null) listener.onLoadingStarted();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendOnLoadingEnded() {
|
||||||
|
if (this.listener != null) listener.onLoadingEnded();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendError(Exception ex) {
|
||||||
|
if (this.listener != null) listener.onError(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendOnPickingReady(List<TestataBollaAccettazioneDTO> bolle, List<SitBollaAccettazioneDTO> sitArts) {
|
||||||
|
if(this.listener != null) listener.onPickingReady(bolle, sitArts);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public interface Listener extends ILoadingListener {
|
||||||
|
void onError(Exception ex);
|
||||||
|
|
||||||
|
void onPickingReady(List<TestataBollaAccettazioneDTO> bolle, List<SitBollaAccettazioneDTO> sitArts);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user