Compare commits
133 Commits
v1.33.09(3
...
v1.36.11(4
| Author | SHA1 | Date | |
|---|---|---|---|
| 502ff6f684 | |||
| 50e58446b4 | |||
| f8df1ffa96 | |||
| adf80ae3f5 | |||
| d81f623ee6 | |||
| 84c6b7099b | |||
| 965a60b6e8 | |||
| 4ba1b847e7 | |||
| f5ad8e8b64 | |||
| 4863b31bb6 | |||
| 8411b0fc17 | |||
| 6541f17555 | |||
| 143a6c9e9c | |||
| 8ef216318e | |||
| 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 | |||
| 4ef49f3523 |
6
.idea/appInsightsSettings.xml
generated
Normal file
6
.idea/appInsightsSettings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AppInsightsSettings">
|
||||||
|
<option name="selectedTabId" value="Android Vitals" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
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>
|
||||||
15
.idea/runConfigurations/app.xml
generated
15
.idea/runConfigurations/app.xml
generated
@@ -1,6 +1,6 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android App">
|
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android App">
|
||||||
<module name="WMS.app.main" />
|
<module name="WMS_Native.app.main" />
|
||||||
<option name="DEPLOY" value="true" />
|
<option name="DEPLOY" value="true" />
|
||||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<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="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
|
||||||
<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 +25,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 +34,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 = 380
|
def appVersionCode = 404
|
||||||
def appVersionName = '1.33.09'
|
def appVersionName = '1.36.11'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
@@ -34,7 +34,7 @@ android {
|
|||||||
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"
|
||||||
@@ -88,11 +88,11 @@ android {
|
|||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
namespace 'it.integry.integrywmsnative'
|
namespace 'it.integry.integrywmsnative'
|
||||||
compileSdk 33
|
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'
|
||||||
@@ -108,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"
|
||||||
@@ -152,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.6.1"
|
||||||
|
|
||||||
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'
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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)
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -76,6 +77,8 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
return sInstance;
|
return sInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract RawDao rawDao();
|
||||||
|
|
||||||
public abstract ArticoloGrigliaDao articoloGrigliaDao();
|
public abstract ArticoloGrigliaDao articoloGrigliaDao();
|
||||||
|
|
||||||
public abstract GrigliaDao grigliaDao();
|
public abstract GrigliaDao grigliaDao();
|
||||||
@@ -93,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) {
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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,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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package it.integry.integrywmsnative.core.model.dto;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.StatoPartitaMag;
|
||||||
|
|
||||||
public class StatoArticoloDTO {
|
public class StatoArticoloDTO {
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
|
||||||
@@ -17,7 +19,7 @@ public class StatoArticoloDTO {
|
|||||||
|
|
||||||
private Integer ggUtili;
|
private Integer ggUtili;
|
||||||
|
|
||||||
private Integer statoArt;
|
private StatoPartitaMag statoArt;
|
||||||
|
|
||||||
public String getCodMart() {
|
public String getCodMart() {
|
||||||
return codMart;
|
return codMart;
|
||||||
@@ -82,11 +84,11 @@ public class StatoArticoloDTO {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getStatoArt() {
|
public StatoPartitaMag getStatoArt() {
|
||||||
return statoArt;
|
return statoArt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public StatoArticoloDTO setStatoArt(Integer statoArt) {
|
public StatoArticoloDTO setStatoArt(StatoPartitaMag statoArt) {
|
||||||
this.statoArt = statoArt;
|
this.statoArt = statoArt;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,10 @@ package it.integry.integrywmsnative.core.model.secondary;
|
|||||||
|
|
||||||
public enum StatoPartitaMag {
|
public enum StatoPartitaMag {
|
||||||
|
|
||||||
IN_SCADENZA(1),
|
SCADUTO(1),
|
||||||
SCADUTO(2),
|
IN_SCADENZA(2),
|
||||||
NON_IN_SCADENZA(3);
|
NON_IN_SCADENZA(3),
|
||||||
|
DISATTIVO(4);
|
||||||
|
|
||||||
private final int text;
|
private final int text;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -66,14 +59,7 @@ public class RESTBuilder {
|
|||||||
String endpoint = protocol + "://" + host + (port > 0 ? ":" + 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,6 +1,5 @@
|
|||||||
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;
|
||||||
|
|
||||||
@@ -19,6 +18,10 @@ 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;
|
||||||
@@ -33,23 +36,28 @@ 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<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
|
||||||
analyzeAnswer(response, "getByBarcodeProd", (m) -> {
|
|
||||||
List<MtbAart> aartList = response.body().getEntityList();
|
|
||||||
aartList = aartList != null ? Stream.of(aartList).filter(x -> x.getFlagStato().equalsIgnoreCase("A")).toList() : null;
|
|
||||||
onComplete.run(aartList);
|
|
||||||
}, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
var request = new SearchArticoloByBarcodeRequestDTO()
|
||||||
public void onFailure(Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
|
.setBarcode(barcodeProd)
|
||||||
onFailed.run(new Exception(t));
|
.setOnlyActive(true);
|
||||||
}
|
|
||||||
});
|
articoloRESTConsumerService
|
||||||
|
.searchByBarcode(request)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> call, Response<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "searchByBarcode", (m) -> {
|
||||||
|
onComplete.run(response.body().getDto().getArts());
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -59,26 +67,26 @@ 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)
|
||||||
.withoutNulls()
|
.withoutNulls()
|
||||||
.distinct()
|
.distinct().toList();
|
||||||
.collect(Collectors.joining(","));
|
|
||||||
|
|
||||||
|
|
||||||
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
articoloRESTConsumer.getByCodMart(joinedCods).enqueue(new Callback<>() {
|
articoloRESTConsumer
|
||||||
@Override
|
.getByCodMart(new RetrieveArticoloByCodMartRequestDTO()
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
.setCodMarts(codMarts))
|
||||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
.enqueue(new Callback<>() {
|
||||||
onComplete.run(response.body().getEntityList());
|
@Override
|
||||||
}, onFailed);
|
public void onResponse(Call<ServiceRESTResponse<List<MtbAart>>> call, Response<ServiceRESTResponse<List<MtbAart>>> response) {
|
||||||
}
|
analyzeAnswer(response, "getByCodMart", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<List<MtbAart>>> call, Throwable t) {
|
||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,23 +110,9 @@ 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);
|
getByCodMarts(Collections.singletonList(codMartToFind), artList -> {
|
||||||
articoloRESTConsumer.getByCodMart(codMartToFind).enqueue(new Callback<>() {
|
onComplete.run(artList != null && !artList.isEmpty() ? artList.get(0) : null);
|
||||||
@Override
|
}, onFailed);
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
|
||||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
|
||||||
if (response.body().getEntityList() != null && !response.body().getEntityList().isEmpty()) {
|
|
||||||
onComplete.run(response.body().getEntityList().get(0));
|
|
||||||
} else onComplete.run(null);
|
|
||||||
|
|
||||||
}, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -186,4 +180,29 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
onComplete.run(inputMtbAart);
|
onComplete.run(inputMtbAart);
|
||||||
}, onFailed);
|
}, 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<List<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;
|
||||||
@@ -24,18 +26,18 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
service.getGestSetupValue(gestName, sectionName, keySection)
|
service.getGestSetupValue(gestName, sectionName, keySection)
|
||||||
.enqueue(new Callback<>() {
|
.enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<GestSetupDTO>> call, Response<ServiceRESTResponse<GestSetupDTO>> response) {
|
public void onResponse(Call<ServiceRESTResponse<GestSetupDTO>> call, Response<ServiceRESTResponse<GestSetupDTO>> response) {
|
||||||
analyzeAnswer(response, "GestSetup", onComplete, onFailed);
|
analyzeAnswer(response, "GestSetup", onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<GestSetupDTO>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<GestSetupDTO>> call, Throwable t) {
|
||||||
Log.e("GestSetup", t.toString());
|
Log.e("GestSetup", t.toString());
|
||||||
// UtilityLogger.errorMe(new Exception(t));
|
// UtilityLogger.errorMe(new Exception(t));
|
||||||
if (onFailed != null) onFailed.run(new Exception(t));
|
if (onFailed != null) onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getBooleanValue(String gestName, String sectionName, String keySection, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getBooleanValue(String gestName, String sectionName, String keySection, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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);
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.deserializer;
|
||||||
|
|
||||||
|
import com.google.gson.JsonDeserializationContext;
|
||||||
|
import com.google.gson.JsonDeserializer;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonParseException;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.StatoPartitaMag;
|
||||||
|
|
||||||
|
public class StatoPartitaMagDeserializer implements JsonDeserializer<StatoPartitaMag> {
|
||||||
|
@Override
|
||||||
|
public StatoPartitaMag deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
||||||
|
if (json.isJsonNull()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
int text = json.getAsInt();
|
||||||
|
return StatoPartitaMag.from(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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,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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.serializer;
|
||||||
|
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonPrimitive;
|
||||||
|
import com.google.gson.JsonSerializationContext;
|
||||||
|
import com.google.gson.JsonSerializer;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.StatoPartitaMag;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
|
||||||
|
public class StatoPartitaMagSerializer implements JsonSerializer<StatoPartitaMag> {
|
||||||
|
@Override
|
||||||
|
public JsonElement serialize(StatoPartitaMag src, Type typeOfSrc, JsonSerializationContext context) {
|
||||||
|
return new JsonPrimitive(src.getText());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -55,12 +55,22 @@ public class DBSettingsModel {
|
|||||||
private boolean notifyLotStatus = false;
|
private boolean notifyLotStatus = false;
|
||||||
|
|
||||||
private boolean groupShippingByCommodityGroup = true;
|
private boolean groupShippingByCommodityGroup = true;
|
||||||
|
private boolean groupPoductionByCommodityGroup;
|
||||||
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 boolean flagShouldAskToCreateOrUpdateRowInventario = false;
|
||||||
private String commessaMagazzino;
|
private String commessaMagazzino;
|
||||||
private boolean flagGeneraDocumentoSpedizione = false;
|
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;
|
||||||
@@ -476,4 +486,94 @@ public class DBSettingsModel {
|
|||||||
this.flagGeneraDocumentoSpedizione = flagGeneraDocumentoSpedizione;
|
this.flagGeneraDocumentoSpedizione = flagGeneraDocumentoSpedizione;
|
||||||
return this;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isGroupPoductionByCommodityGroup() {
|
||||||
|
return groupPoductionByCommodityGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setGroupPoductionByCommodityGroup(boolean groupPoductionByCommodityGroup) {
|
||||||
|
this.groupPoductionByCommodityGroup = groupPoductionByCommodityGroup;
|
||||||
|
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;
|
||||||
|
|
||||||
@@ -17,7 +16,6 @@ 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.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;
|
||||||
@@ -62,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,266 +205,316 @@ 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")
|
||||||
|
.setSection("PRODUZIONE")
|
||||||
|
.setKeySection("FLAG_GROUP_BY_GRP_MERC")
|
||||||
|
.setSetter(dbSettingsModelIstance::setGroupPoductionByCommodityGroup)
|
||||||
|
.setDefaultValue(false));
|
||||||
|
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_ORDINE_DA_GRIGLIA"));
|
.setKeySection("FLAG_CONSENTI_ORDINE_DA_GRIGLIA")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagConsentiFuoriPianoLogistico));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PVM")
|
.setGestName("PVM")
|
||||||
.setSection("ORDINI_A")
|
.setSection("ORDINI_A")
|
||||||
.setKeySection("FLAG_CONSENTI_ORDINE_SENZA_GRIGLIA"));
|
.setKeySection("FLAG_CONSENTI_ORDINE_SENZA_GRIGLIA")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.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_PRINT_ETICHETTE_ON_LU_CLOSE"));
|
.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_ALLOW_EMPTY_DEST"));
|
.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("FLAG_ASK_INFO_AGGIUNTIVE"));
|
.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("COD_DTIP_ORD_TRASF"));
|
.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_NOTIFICA_STATO_PARTITA"));
|
.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_SHOW_COD_FORN"));
|
.setKeySection("FLAG_GROUP_BY_GRP_MERC")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setGroupShippingByCommodityGroup)
|
||||||
.setGestName("PICKING")
|
.setDefaultValue(false));
|
||||||
.setSection("SPEDIZIONE")
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setKeySection("FLAG_GROUP_BY_GRP_MERC"));
|
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
|
||||||
.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")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setFlagCanAddUnknownItemsInventario)
|
||||||
|
.setDefaultValue(true));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("INVENTARIO")
|
.setSection("INVENTARIO")
|
||||||
.setKeySection("FLAG_SHOULD_ASK_TO_CREATE_OR_UPDATE_ROW"));
|
.setKeySection("FLAG_SHOULD_ASK_TO_CREATE_OR_UPDATE_ROW")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.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")
|
.setGestName("PICKING")
|
||||||
.setSection("SETUP")
|
.setSection("SETUP")
|
||||||
.setKeySection("COMMESSA_MAGAZZINO"));
|
.setKeySection("COMMESSA_MAGAZZINO")
|
||||||
stbGestSetupList.add(new StbGestSetup()
|
.setSetter(dbSettingsModelIstance::setCommessaMagazzino)
|
||||||
|
.setDefaultValue(CommonConst.Config.COMMESSA_MAG));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("SPEDIZIONE")
|
.setSection("SPEDIZIONE")
|
||||||
.setKeySection("GENERA_DOC"));
|
.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_ORDINE_DA_GRIGLIA", Boolean.class));
|
|
||||||
dbSettingsModelIstance.setFlagConsentiOrdineSenzaGriglia(getValueFromList(list, "ORDINI_A", "FLAG_CONSENTI_ORDINE_SENZA_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.setFlagPrintEtichetteOnLUClose(getValueFromList(list, "SPEDIZIONE", "FLAG_PRINT_ETICHETTE_ON_LU_CLOSE", Boolean.class, true));
|
|
||||||
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));
|
|
||||||
dbSettingsModelIstance.setFlagShouldAskToCreateOrUpdateRowInventario(getValueFromList(list, "INVENTARIO", "FLAG_SHOULD_ASK_TO_CREATE_OR_UPDATE_ROW", Boolean.class, Boolean.FALSE));
|
|
||||||
dbSettingsModelIstance.setCommessaMagazzino(getValueFromList(list, "SETUP", "COMMESSA_MAGAZZINO", String.class, CommonConst.Config.COMMESSA_MAG));
|
|
||||||
dbSettingsModelIstance.setFlagGeneraDocumentoSpedizione(getValueFromList(list, "SPEDIZIONE", "GENERA_DOC", Boolean.class, Boolean.FALSE));
|
|
||||||
|
|
||||||
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 (defaultValue == null) {
|
|
||||||
if (clazz == Boolean.class) {
|
|
||||||
return clazz.cast(Boolean.FALSE);
|
|
||||||
} else if (clazz == Integer.class) {
|
|
||||||
return clazz.cast(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return defaultValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ public class SettingsModel {
|
|||||||
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() {
|
public String getDeviceId() {
|
||||||
return deviceId;
|
return deviceId;
|
||||||
@@ -134,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]);
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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,33 @@
|
|||||||
|
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.model.secondary.StatoPartitaMag;
|
||||||
|
import it.integry.integrywmsnative.core.rest.deserializer.LocalDateDeserializer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.deserializer.LocalDateTimeDeserializer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.deserializer.StatoPartitaMagDeserializer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.serializer.LocalDateSerializer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.serializer.LocalDateTimeSerializer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.serializer.StatoPartitaMagSerializer;
|
||||||
|
|
||||||
|
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())
|
||||||
|
.registerTypeAdapter(StatoPartitaMag.class, new StatoPartitaMagDeserializer())
|
||||||
|
.registerTypeAdapter(StatoPartitaMag.class, new StatoPartitaMagSerializer())
|
||||||
|
.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.RetrieveElencoArticoliAccettazioneBollaRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.RetrieveElencoArticoliAccettazioneBollaResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.RetrieveElencoBolleAccettazioneResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.SitBollaAccettazioneDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.TestataBollaAccettazioneDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class BolleAccettazioneRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
|
|
||||||
|
public void retrieveBolleDaAccettare(RunnableArgs<List<TestataBollaAccettazioneDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
BolleAccettazioneRESTConsumerService service = RESTBuilder.getService(BolleAccettazioneRESTConsumerService.class);
|
||||||
|
service.retrieveElencoBolle()
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<RetrieveElencoBolleAccettazioneResponseDTO>> call, Response<ServiceRESTResponse<RetrieveElencoBolleAccettazioneResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "retrieveBolleDaAccettare", data -> onComplete.run(data.getBolleDaAccettare()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<RetrieveElencoBolleAccettazioneResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void retrievePickingListBolle(List<TestataBollaAccettazioneDTO> bolle, RunnableArgs<List<SitBollaAccettazioneDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
BolleAccettazioneRESTConsumerService service = RESTBuilder.getService(BolleAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
var request = new RetrieveElencoArticoliAccettazioneBollaRequestDTO()
|
||||||
|
.setBolle(bolle);
|
||||||
|
|
||||||
|
service.retrievePickingListBolle(request)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<RetrieveElencoArticoliAccettazioneBollaResponseDTO>> call, Response<ServiceRESTResponse<RetrieveElencoArticoliAccettazioneBollaResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "retrievePickingListBolle", data -> onComplete.run(data.getSitArticoli()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<RetrieveElencoArticoliAccettazioneBollaResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.RetrieveElencoArticoliAccettazioneBollaRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.RetrieveElencoArticoliAccettazioneBollaResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.RetrieveElencoBolleAccettazioneResponseDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface BolleAccettazioneRESTConsumerService {
|
||||||
|
|
||||||
|
@GET("wms/accettazione-bolla/retrieveElencoBolle")
|
||||||
|
Call<ServiceRESTResponse<RetrieveElencoBolleAccettazioneResponseDTO>> retrieveElencoBolle();
|
||||||
|
|
||||||
|
@POST("wms/accettazione-bolla/retrievePickingList")
|
||||||
|
Call<ServiceRESTResponse<RetrieveElencoArticoliAccettazioneBollaResponseDTO>> retrievePickingListBolle(@Body RetrieveElencoArticoliAccettazioneBollaRequestDTO retrieveElencoArticoliAccettazioneBollaReques);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RetrieveElencoArticoliAccettazioneBollaRequestDTO {
|
||||||
|
|
||||||
|
private List<TestataBollaAccettazioneDTO> bolle;
|
||||||
|
|
||||||
|
public List<TestataBollaAccettazioneDTO> getBolle() {
|
||||||
|
return bolle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RetrieveElencoArticoliAccettazioneBollaRequestDTO setBolle(List<TestataBollaAccettazioneDTO> bolle) {
|
||||||
|
this.bolle = bolle;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RetrieveElencoArticoliAccettazioneBollaResponseDTO {
|
||||||
|
|
||||||
|
private List<SitBollaAccettazioneDTO> sitArticoli;
|
||||||
|
|
||||||
|
public List<SitBollaAccettazioneDTO> getSitArticoli() {
|
||||||
|
return sitArticoli;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RetrieveElencoArticoliAccettazioneBollaResponseDTO setSitArticoli(List<SitBollaAccettazioneDTO> sitArticoli) {
|
||||||
|
this.sitArticoli = sitArticoli;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RetrieveElencoBolleAccettazioneResponseDTO {
|
||||||
|
|
||||||
|
private List<TestataBollaAccettazioneDTO> bolleDaAccettare;
|
||||||
|
|
||||||
|
public List<TestataBollaAccettazioneDTO> getBolleDaAccettare() {
|
||||||
|
return bolleDaAccettare;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
public class SitBollaAccettazioneDTO {
|
||||||
|
|
||||||
|
private int numDoc;
|
||||||
|
private LocalDate dataDoc;
|
||||||
|
private String serDoc;
|
||||||
|
private String codDtip;
|
||||||
|
private String codMart;
|
||||||
|
private String codArtFor;
|
||||||
|
private String partitaMag;
|
||||||
|
|
||||||
|
private BigDecimal qtaDoc;
|
||||||
|
private BigDecimal qtaCnfDoc;
|
||||||
|
private BigDecimal numCnfDoc;
|
||||||
|
private BigDecimal qtaDaAccettare;
|
||||||
|
private BigDecimal numCnfDaAccettare;
|
||||||
|
|
||||||
|
public int getNumDoc() {
|
||||||
|
return numDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitBollaAccettazioneDTO setNumDoc(int numDoc) {
|
||||||
|
this.numDoc = numDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataDoc() {
|
||||||
|
return dataDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitBollaAccettazioneDTO setDataDoc(LocalDate dataDoc) {
|
||||||
|
this.dataDoc = dataDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerDoc() {
|
||||||
|
return serDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitBollaAccettazioneDTO setSerDoc(String serDoc) {
|
||||||
|
this.serDoc = serDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodDtip() {
|
||||||
|
return codDtip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitBollaAccettazioneDTO setCodDtip(String codDtip) {
|
||||||
|
this.codDtip = codDtip;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitBollaAccettazioneDTO setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodArtFor() {
|
||||||
|
return codArtFor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitBollaAccettazioneDTO setCodArtFor(String codArtFor) {
|
||||||
|
this.codArtFor = codArtFor;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitBollaAccettazioneDTO setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaDoc() {
|
||||||
|
return qtaDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitBollaAccettazioneDTO setQtaDoc(BigDecimal qtaDoc) {
|
||||||
|
this.qtaDoc = qtaDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnfDoc() {
|
||||||
|
return qtaCnfDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitBollaAccettazioneDTO setQtaCnfDoc(BigDecimal qtaCnfDoc) {
|
||||||
|
this.qtaCnfDoc = qtaCnfDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnfDoc() {
|
||||||
|
return numCnfDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitBollaAccettazioneDTO setNumCnfDoc(BigDecimal numCnfDoc) {
|
||||||
|
this.numCnfDoc = numCnfDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaDaAccettare() {
|
||||||
|
return qtaDaAccettare;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitBollaAccettazioneDTO setQtaDaAccettare(BigDecimal qtaDaAccettare) {
|
||||||
|
this.qtaDaAccettare = qtaDaAccettare;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnfDaAccettare() {
|
||||||
|
return numCnfDaAccettare;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SitBollaAccettazioneDTO setNumCnfDaAccettare(BigDecimal numCnfDaAccettare) {
|
||||||
|
this.numCnfDaAccettare = numCnfDaAccettare;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
public class TestataBollaAccettazioneDTO {
|
||||||
|
private String codAnag;
|
||||||
|
private String ragSoc;
|
||||||
|
private String codDtip;
|
||||||
|
private LocalDate dataDoc;
|
||||||
|
private String serDoc;
|
||||||
|
private int numDoc;
|
||||||
|
private String listino;
|
||||||
|
private String descrizioneListino;
|
||||||
|
private String codJcom;
|
||||||
|
|
||||||
|
public String getCodAnag() {
|
||||||
|
return codAnag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRagSoc() {
|
||||||
|
return ragSoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodDtip() {
|
||||||
|
return codDtip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataDoc() {
|
||||||
|
return dataDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerDoc() {
|
||||||
|
return serDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNumDoc() {
|
||||||
|
return numDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getListino() {
|
||||||
|
return listino;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizioneListino() {
|
||||||
|
return descrizioneListino;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJcom() {
|
||||||
|
return codJcom;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco.ui;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.text.Html;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.core.content.res.ResourcesCompat;
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.OnSingleClickListener;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.view.ExtendedSectionedRecyclerView;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.databinding.FragmentMainAccettazioneBollaListGroupModelBinding;
|
||||||
|
import it.integry.integrywmsnative.databinding.FragmentMainAccettazioneBollaListModelBinding;
|
||||||
|
|
||||||
|
public class MainAccettazioneBolleElencoAdapter extends ExtendedSectionedRecyclerView<MainAccettazioneBolleElencoListModel, MainAccettazioneBolleElencoAdapter.SubheaderHolder, MainAccettazioneBolleElencoAdapter.SingleItemViewHolder> {
|
||||||
|
|
||||||
|
private final Context mContext;
|
||||||
|
private RunnableArgs<String> mOnGroupItemClicked;
|
||||||
|
private RunnableArgs<MainAccettazioneBolleElencoListModel> mOnItemChecked;
|
||||||
|
|
||||||
|
static class SubheaderHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
FragmentMainAccettazioneBollaListModelBinding mBinding;
|
||||||
|
|
||||||
|
SubheaderHolder(FragmentMainAccettazioneBollaListModelBinding binding) {
|
||||||
|
super(binding.getRoot());
|
||||||
|
this.mBinding = binding;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static class SingleItemViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
FragmentMainAccettazioneBollaListGroupModelBinding mBinding;
|
||||||
|
|
||||||
|
SingleItemViewHolder(FragmentMainAccettazioneBollaListGroupModelBinding binding) {
|
||||||
|
super(binding.getRoot());
|
||||||
|
this.mBinding = binding;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainAccettazioneBolleElencoAdapter(Context context, ObservableArrayList<MainAccettazioneBolleElencoListModel> mutableDataSet) {
|
||||||
|
super(mutableDataSet);
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainAccettazioneBolleElencoAdapter setOnGroupItemClicked(RunnableArgs<String> mOnGroupItemClicked) {
|
||||||
|
this.mOnGroupItemClicked = mOnGroupItemClicked;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainAccettazioneBolleElencoAdapter setOnItemChecked(RunnableArgs<MainAccettazioneBolleElencoListModel> mOnItemChecked) {
|
||||||
|
this.mOnItemChecked = mOnItemChecked;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MainAccettazioneBolleElencoAdapter.SubheaderHolder onCreateSubheaderViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
FragmentMainAccettazioneBollaListModelBinding binding = FragmentMainAccettazioneBollaListModelBinding.inflate(LayoutInflater.from(mContext), parent, false);
|
||||||
|
return new MainAccettazioneBolleElencoAdapter.SubheaderHolder(binding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MainAccettazioneBolleElencoAdapter.SingleItemViewHolder onCreateItemViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
FragmentMainAccettazioneBollaListGroupModelBinding binding = FragmentMainAccettazioneBollaListGroupModelBinding.inflate(LayoutInflater.from(mContext), parent, false);
|
||||||
|
return new MainAccettazioneBolleElencoAdapter.SingleItemViewHolder(binding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindSubheaderViewHolder(MainAccettazioneBolleElencoAdapter.SubheaderHolder subheaderHolder, int nextItemPosition) {
|
||||||
|
MainAccettazioneBolleElencoListModel pickingObjectDTO = this.mDataset.get(nextItemPosition);
|
||||||
|
|
||||||
|
subheaderHolder.mBinding.groupTitle.setVisibility(UtilityString.isNullOrEmpty(pickingObjectDTO.getGroupTitle()) ? View.GONE : View.VISIBLE);
|
||||||
|
subheaderHolder.mBinding.groupTitle.setText(Html.fromHtml(pickingObjectDTO.getGroupTitle()));
|
||||||
|
|
||||||
|
subheaderHolder.mBinding.getRoot().setOnClickListener(new OnSingleClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onSingleClick(View v) {
|
||||||
|
if(mOnGroupItemClicked != null) mOnGroupItemClicked.run(pickingObjectDTO.getGroupTitle());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindItemViewHolder(final MainAccettazioneBolleElencoAdapter.SingleItemViewHolder holder, final int position) {
|
||||||
|
MainAccettazioneBolleElencoListModel listModel = this.mDataset.get(position);
|
||||||
|
|
||||||
|
listModel.getSelectedObservable().resetOnPropertyChangedCallback();
|
||||||
|
|
||||||
|
if(listModel.getEtichettaColor() != null)
|
||||||
|
holder.mBinding.emptyView.setBackgroundColor(listModel.getEtichettaColor());
|
||||||
|
else holder.mBinding.emptyView.setBackgroundColor(ResourcesCompat.getColor(mContext.getResources(), android.R.color.transparent, null));
|
||||||
|
|
||||||
|
if(!UtilityString.isNullOrEmpty(listModel.getDescription())) {
|
||||||
|
holder.mBinding.descrizione.setText(Html.fromHtml(listModel.getDescription()));
|
||||||
|
holder.mBinding.descrizione.setVisibility(View.VISIBLE);
|
||||||
|
} else holder.mBinding.descrizione.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
if(!UtilityString.isNullOrEmpty(listModel.getSubDescription())) {
|
||||||
|
holder.mBinding.subDescrizione.setText(Html.fromHtml(listModel.getSubDescription()));
|
||||||
|
holder.mBinding.subDescrizione.setVisibility(View.VISIBLE);
|
||||||
|
} else holder.mBinding.subDescrizione.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
if(!UtilityString.isNullOrEmpty(listModel.getRightDescription())) {
|
||||||
|
holder.mBinding.rightDescrizione.setText(Html.fromHtml(listModel.getRightDescription()));
|
||||||
|
holder.mBinding.rightDescrizione.setVisibility(View.VISIBLE);
|
||||||
|
} else holder.mBinding.rightDescrizione.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
if(!UtilityString.isNullOrEmpty(listModel.getRightSubDescription())) {
|
||||||
|
holder.mBinding.rightSubDescrizione.setText(Html.fromHtml(listModel.getRightSubDescription()));
|
||||||
|
holder.mBinding.rightSubDescrizione.setVisibility(View.VISIBLE);
|
||||||
|
} else holder.mBinding.rightSubDescrizione.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
holder.mBinding.setSelected(listModel.getSelectedObservable());
|
||||||
|
holder.mBinding.executePendingBindings();
|
||||||
|
holder.mBinding.checkbox.jumpDrawablesToCurrentState();
|
||||||
|
|
||||||
|
listModel.getSelectedObservable().addOnPropertyChangedCallback(() -> {
|
||||||
|
if(this.mOnItemChecked != null) this.mOnItemChecked.run(listModel);
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.mBinding.getRoot().setOnClickListener(v -> {
|
||||||
|
listModel.getSelectedObservable().set(!listModel.getSelectedObservable().get());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public boolean onPlaceSubheaderBetweenItems(int position) {
|
||||||
|
|
||||||
|
if (getItemSize() == 1) return true;
|
||||||
|
else if (getItemSize() > 1) {
|
||||||
|
MainAccettazioneBolleElencoListModel compare1 = this.mDataset.get(position);
|
||||||
|
MainAccettazioneBolleElencoListModel compare2 = this.mDataset.get(position + 1);
|
||||||
|
|
||||||
|
return !UtilityString.equalsIgnoreCase(compare1.getGroupTitle(), compare2.getGroupTitle());
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_elenco.ui;
|
||||||
|
|
||||||
|
import androidx.annotation.ColorInt;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.TestataBollaAccettazioneDTO;
|
||||||
|
|
||||||
|
public class MainAccettazioneBolleElencoListModel implements Cloneable {
|
||||||
|
private String groupTitle;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
private String subDescription;
|
||||||
|
private String rightDescription;
|
||||||
|
private String rightSubDescription;
|
||||||
|
|
||||||
|
private @ColorInt Integer etichettaColor;
|
||||||
|
|
||||||
|
private boolean hidden;
|
||||||
|
private BindableBoolean selected = new BindableBoolean();
|
||||||
|
|
||||||
|
|
||||||
|
private TestataBollaAccettazioneDTO originalModel;
|
||||||
|
|
||||||
|
|
||||||
|
public String getGroupTitle() {
|
||||||
|
return groupTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainAccettazioneBolleElencoListModel setGroupTitle(String groupTitle) {
|
||||||
|
this.groupTitle = groupTitle;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainAccettazioneBolleElencoListModel setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubDescription() {
|
||||||
|
return subDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainAccettazioneBolleElencoListModel setSubDescription(String subDescription) {
|
||||||
|
this.subDescription = subDescription;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightDescription() {
|
||||||
|
return rightDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainAccettazioneBolleElencoListModel setRightDescription(String rightDescription) {
|
||||||
|
this.rightDescription = rightDescription;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightSubDescription() {
|
||||||
|
return rightSubDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainAccettazioneBolleElencoListModel setRightSubDescription(String rightSubDescription) {
|
||||||
|
this.rightSubDescription = rightSubDescription;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public @ColorInt Integer getEtichettaColor() {
|
||||||
|
return etichettaColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainAccettazioneBolleElencoListModel setEtichettaColor(@ColorInt Integer etichettaColor) {
|
||||||
|
this.etichettaColor = etichettaColor;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isHidden() {
|
||||||
|
return hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainAccettazioneBolleElencoListModel setHidden(boolean hidden) {
|
||||||
|
this.hidden = hidden;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindableBoolean getSelectedObservable() {
|
||||||
|
return selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TestataBollaAccettazioneDTO getOriginalModel() {
|
||||||
|
return originalModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginalModel(TestataBollaAccettazioneDTO originalModel) {
|
||||||
|
this.originalModel = originalModel;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,598 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_picking;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.res.Resources;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.SpannableString;
|
||||||
|
import android.view.Gravity;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.appcompat.widget.PopupMenu;
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
import androidx.preference.PreferenceManager;
|
||||||
|
|
||||||
|
import com.annimon.stream.ComparatorCompat;
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
import com.tfb.fbtoast.FBToast;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||||
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||||
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
|
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||||
|
import it.integry.integrywmsnative.databinding.ActivityAccettazioneBollaPickingBinding;
|
||||||
|
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_picking.dto.AccettazioneBollaPickingOrderBy;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.dto.PickingObjectDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.ui.AccettazioneBollaPickingListAdapter;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.ui.AccettazioneBollaPickingListModel;
|
||||||
|
import it.integry.integrywmsnative.gest.lista_bancali.ListaBancaliActivity;
|
||||||
|
import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGException;
|
||||||
|
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||||
|
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||||
|
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_should_versamento_automatico_ul.DialogAskShouldVersamentoAutomaticoULView;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_unknown_barcode_notes.DialogAskUnknownBarcodeNotesView;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.bind_product_barcode_with_package.DialogBindProductBarcodeWithPackageView;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUView;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.versamento_automatico_ul_done.DialogVersamentoAutomaticoULDoneView;
|
||||||
|
|
||||||
|
public class AccettazioneBollaPickingActivity extends BaseActivity implements AccettazioneBollaPickingViewModel.Listener, BottomSheetFragmentLUContentViewModel.Listener, BottomSheetFragmentLUContentView.Listener {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
AccettazioneBollaPickingViewModel mViewModel;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
DialogInputQuantityV2View mDialogInputQuantityV2View;
|
||||||
|
|
||||||
|
private ActivityAccettazioneBollaPickingBinding mBindings;
|
||||||
|
|
||||||
|
private BottomSheetFragmentLUContentViewModel mBottomSheetFragmentLUContentViewModel;
|
||||||
|
|
||||||
|
|
||||||
|
private final ObservableArrayList<AccettazioneBollaPickingListModel> mAccettazioneMutableData = new ObservableArrayList<>();
|
||||||
|
|
||||||
|
public BindableBoolean noItemsToPick = new BindableBoolean(false);
|
||||||
|
public BindableBoolean noLUPresent = new BindableBoolean(true);
|
||||||
|
public BindableBoolean bottomSheetEnabled = new BindableBoolean(false);
|
||||||
|
|
||||||
|
private int barcodeScannerIstanceID = -1;
|
||||||
|
private boolean mShowSecondaryUntMis = true;
|
||||||
|
private boolean mShouldCloseActivity;
|
||||||
|
private AccettazioneBollaPickingOrderBy.Enum mCurrentOrderBy;
|
||||||
|
|
||||||
|
private final int PICK_UL_REQUEST = 1;
|
||||||
|
|
||||||
|
private List<TestataBollaAccettazioneDTO> testataBolle;
|
||||||
|
private List<SitBollaAccettazioneDTO> sitArts;
|
||||||
|
|
||||||
|
|
||||||
|
private PopupMenu fabPopupMenu;
|
||||||
|
|
||||||
|
|
||||||
|
//Pass here all external parameters
|
||||||
|
public static void startActivity(Context context, List<TestataBollaAccettazioneDTO> testataBolle, List<SitBollaAccettazioneDTO> sitArts) {
|
||||||
|
Intent myIntent = new Intent(context, AccettazioneBollaPickingActivity.class);
|
||||||
|
|
||||||
|
String keyBolle = DataCache.addItem(testataBolle);
|
||||||
|
myIntent.putExtra("keyBolle", keyBolle);
|
||||||
|
|
||||||
|
String keySitArts = DataCache.addItem(sitArts);
|
||||||
|
myIntent.putExtra("keySitArts", keySitArts);
|
||||||
|
|
||||||
|
context.startActivity(myIntent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
testataBolle = DataCache.retrieveItem(getIntent().getStringExtra("keyBolle"));
|
||||||
|
sitArts = DataCache.retrieveItem(getIntent().getStringExtra("keySitArts"));
|
||||||
|
|
||||||
|
mBindings = ActivityAccettazioneBollaPickingBinding.inflate(getLayoutInflater());
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
|
mBindings.setView(this);
|
||||||
|
|
||||||
|
setContentView(mBindings.getRoot());
|
||||||
|
|
||||||
|
MainApplication.appComponent
|
||||||
|
.accettazioneBollaPickingComponent()
|
||||||
|
.create()
|
||||||
|
.inject(this);
|
||||||
|
|
||||||
|
|
||||||
|
setSupportActionBar(mBindings.toolbar);
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
|
mBottomSheetFragmentLUContentViewModel = mBindings.bottomSheetLuContent.getViewModelInstance();
|
||||||
|
mBindings.bottomSheetLuContent.setListener(this);
|
||||||
|
mBottomSheetFragmentLUContentViewModel.setListener(this);
|
||||||
|
|
||||||
|
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
mShowSecondaryUntMis = sharedPreferences.getBoolean("picking_ingresso_enable_sec_unt_mis", true);
|
||||||
|
|
||||||
|
this.initVars();
|
||||||
|
this.initBarcodeReader();
|
||||||
|
this.initRecyclerView();
|
||||||
|
// this.initFilters();
|
||||||
|
this.initFab();
|
||||||
|
|
||||||
|
boolean useQtaBolla = SettingsManager.iDB().isFlagAccettazioneUseQtaOrd();
|
||||||
|
|
||||||
|
mViewModel.setListeners(this);
|
||||||
|
mViewModel.init(
|
||||||
|
testataBolle,
|
||||||
|
sitArts,
|
||||||
|
useQtaBolla);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onSupportNavigateUp() {
|
||||||
|
onBackPressed();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
if (this.mBindings.bottomSheetLuContent.isExpanded()) {
|
||||||
|
this.mBindings.bottomSheetLuContent.collapse();
|
||||||
|
} else if (!noLUPresent.get()) {
|
||||||
|
this.mShouldCloseActivity = true;
|
||||||
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
|
this.mViewModel.closeLU();
|
||||||
|
} else {
|
||||||
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
|
super.onBackPressed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initVars() {
|
||||||
|
this.noLUPresent.addOnPropertyChangedCallback(() -> {
|
||||||
|
this.bottomSheetEnabled.set(!this.noLUPresent.get());
|
||||||
|
});
|
||||||
|
|
||||||
|
mCurrentOrderBy = AccettazioneBollaPickingOrderBy.Enum.fromInt(SettingsManager.i().getUserSession().getDefaultOrdinamentoPickingAccettazioneBolle());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initBarcodeReader() {
|
||||||
|
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
|
.setOnScanSuccessful(onScanSuccessful)
|
||||||
|
.setOnScanFailed(ex -> UtilityExceptions.defaultException(this, ex, false)));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initRecyclerView() {
|
||||||
|
AccettazioneBollaPickingListAdapter adapter = new AccettazioneBollaPickingListAdapter(this, mAccettazioneMutableData, mShowSecondaryUntMis);
|
||||||
|
this.mBindings.accettazionePickingList.setAdapter(adapter);
|
||||||
|
|
||||||
|
this.mViewModel.getPickingList().observe(this, updatedData -> {
|
||||||
|
// mAppliedFilterViewModel.init(updatedData);
|
||||||
|
|
||||||
|
refreshList();
|
||||||
|
});
|
||||||
|
|
||||||
|
adapter.setOnItemClicked(clickedItem -> {
|
||||||
|
this.mViewModel.dispatchBollaRow(clickedItem);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void initFab() {
|
||||||
|
fabPopupMenu = new PopupMenu(this, this.mBindings.accettazioneOrdineInevasoFab,
|
||||||
|
(Gravity.END | Gravity.BOTTOM),
|
||||||
|
androidx.appcompat.R.attr.popupMenuStyle,
|
||||||
|
com.google.android.material.R.style.Widget_Material3_PopupMenu_ContextMenu);
|
||||||
|
|
||||||
|
fabPopupMenu.setForceShowIcon(true);
|
||||||
|
fabPopupMenu.getMenuInflater().inflate(R.menu.accettazione_ordine_inevaso_fab_menu, fabPopupMenu.getMenu());
|
||||||
|
|
||||||
|
fabPopupMenu.setOnMenuItemClickListener(item -> {
|
||||||
|
int itemId = item.getItemId();
|
||||||
|
|
||||||
|
if (itemId == R.id.show_created_ul) {
|
||||||
|
showCreatedUL();
|
||||||
|
} else if (itemId == R.id.create_ul) {
|
||||||
|
createNewLU();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void showFabMenu() {
|
||||||
|
fabPopupMenu.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void refreshList() {
|
||||||
|
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
List<PickingObjectDTO> tmpList;
|
||||||
|
|
||||||
|
// if (mAppliedFilterViewModel != null) {
|
||||||
|
// mAppliedFilterViewModel.applyAllTests();
|
||||||
|
// tmpList = mAppliedFilterViewModel.getMutableFilteredOrderList().getValue();
|
||||||
|
// } else {
|
||||||
|
tmpList = mViewModel.getPickingList().getValue();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
var list = convertDataModelToListModel(tmpList);
|
||||||
|
|
||||||
|
this.mAccettazioneMutableData.clear();
|
||||||
|
this.mAccettazioneMutableData.addAll(list);
|
||||||
|
this.noItemsToPick.set(!isThereAnyItemToPick(tmpList));
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isThereAnyItemToPick(List<PickingObjectDTO> dataList) {
|
||||||
|
return Stream.of(dataList)
|
||||||
|
.anyMatch(x -> !x.isHidden());
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<AccettazioneBollaPickingListModel> convertDataModelToListModel(List<PickingObjectDTO> dataList) {
|
||||||
|
List<PickingObjectDTO> tmpList = Stream.of(dataList)
|
||||||
|
.filter(x -> !x.isHidden() && UtilityBigDecimal.greaterThan(x.getSitBollaAccettazione().getQtaDaAccettare(), BigDecimal.ZERO))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
return switch (mCurrentOrderBy) {
|
||||||
|
case COD_ART_FOR -> convertDataModelToListModel__NormalView(
|
||||||
|
tmpList,
|
||||||
|
ComparatorCompat
|
||||||
|
.comparing(x -> x.getSitBollaAccettazione().getCodArtFor()));
|
||||||
|
case DESCR_ART -> //convertDataModelToListModel__DescrArt(tmpList);
|
||||||
|
new ArrayList<>();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<AccettazioneBollaPickingListModel> convertDataModelToListModel__NormalView(List<PickingObjectDTO> dataList, ComparatorCompat<PickingObjectDTO> comparator) {
|
||||||
|
ArrayList<AccettazioneBollaPickingListModel> list = new ArrayList<>();
|
||||||
|
Stream.of(dataList)
|
||||||
|
.sorted(comparator)
|
||||||
|
.forEach(x -> {
|
||||||
|
AccettazioneBollaPickingListModel accettazioneBollaPickingListModel = new AccettazioneBollaPickingListModel();
|
||||||
|
accettazioneBollaPickingListModel.setActive(true);
|
||||||
|
|
||||||
|
accettazioneBollaPickingListModel.setTitolo(x.getMtbAart().getCodMart());
|
||||||
|
|
||||||
|
accettazioneBollaPickingListModel.setBadge2Icon(R.drawable.ic_document_outline);
|
||||||
|
accettazioneBollaPickingListModel.setBadge2(x.getSitBollaAccettazione().getNumDoc() + " del " + UtilityDate.formatDate(x.getSitBollaAccettazione().getDataDoc(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
|
|
||||||
|
accettazioneBollaPickingListModel.setDescrizione(x.getMtbAart().getDescrizione());
|
||||||
|
|
||||||
|
//Calc Num CNF
|
||||||
|
BigDecimal numCnfEvasa = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
if (x.getWithdrawMtbColrs().size() > 0) {
|
||||||
|
numCnfEvasa = Stream.of(x.getWithdrawMtbColrs())
|
||||||
|
.map(MtbColr::getNumCnf)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Calc qta col
|
||||||
|
BigDecimal qtaEvasa = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
if (x.getWithdrawMtbColrs().size() > 0) {
|
||||||
|
qtaEvasa = Stream.of(x.getWithdrawMtbColrs())
|
||||||
|
.map(MtbColr::getQtaCol)
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (SettingsManager.iDB().isFlagForceAllToColli() || (x.getMtbAart() == null || !x.getMtbAart().isFlagQtaCnfFissaBoolean())) {
|
||||||
|
accettazioneBollaPickingListModel.setQtaEvasa(numCnfEvasa);
|
||||||
|
accettazioneBollaPickingListModel.setQtaTot(x.getSitBollaAccettazione().getNumCnfDaAccettare());
|
||||||
|
accettazioneBollaPickingListModel.setUntMis(UtilityResources.getString(R.string.unt_mis_col));
|
||||||
|
|
||||||
|
accettazioneBollaPickingListModel.setSecQtaEvasa(qtaEvasa);
|
||||||
|
accettazioneBollaPickingListModel.setSecQtaTot(x.getSitBollaAccettazione().getQtaDaAccettare());
|
||||||
|
if (x.getMtbAart() != null)
|
||||||
|
accettazioneBollaPickingListModel.setSecUntMis(x.getMtbAart().getUntMis());
|
||||||
|
} else {
|
||||||
|
accettazioneBollaPickingListModel.setQtaEvasa(qtaEvasa);
|
||||||
|
accettazioneBollaPickingListModel.setQtaTot(x.getSitBollaAccettazione().getQtaDaAccettare());
|
||||||
|
if (x.getMtbAart() != null)
|
||||||
|
accettazioneBollaPickingListModel.setUntMis(x.getMtbAart().getUntMis());
|
||||||
|
|
||||||
|
accettazioneBollaPickingListModel.setSecQtaEvasa(numCnfEvasa);
|
||||||
|
accettazioneBollaPickingListModel.setSecQtaTot(x.getSitBollaAccettazione().getNumCnfDaAccettare());
|
||||||
|
accettazioneBollaPickingListModel.setSecUntMis(UtilityResources.getString(R.string.unt_mis_col));
|
||||||
|
}
|
||||||
|
|
||||||
|
accettazioneBollaPickingListModel.setOriginalModel(x);
|
||||||
|
|
||||||
|
list.add(accettazioneBollaPickingListModel);
|
||||||
|
});
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||||
|
this.onLoadingStarted();
|
||||||
|
|
||||||
|
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||||
|
};
|
||||||
|
|
||||||
|
public void createNewLU() {
|
||||||
|
this.fabPopupMenu.dismiss();
|
||||||
|
this.onLoadingStarted();
|
||||||
|
this.mViewModel.createNewLU(null, null, false, this::onLoadingEnded);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void showCreatedUL() {
|
||||||
|
this.fabPopupMenu.dismiss();
|
||||||
|
this.mViewModel.retrieveExistentLU(this::startListaBancaliRegistratiActivity);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showOrderByDialog() {
|
||||||
|
AlertDialog dialog = new AlertDialog.Builder(this)
|
||||||
|
.setTitle(this.getText(R.string.action_orderBy))
|
||||||
|
.setSingleChoiceItems(AccettazioneBollaPickingOrderBy.descriptions, mCurrentOrderBy.getVal(), (dialog12, which) -> {
|
||||||
|
mCurrentOrderBy = AccettazioneBollaPickingOrderBy.Enum.fromInt(which);
|
||||||
|
SettingsManager.i().getUserSession().setDefaultOrdinamentoPickingAccettazione(which);
|
||||||
|
})
|
||||||
|
.setPositiveButton(getText(R.string.ok), (dialog1, which) -> this.refreshList())
|
||||||
|
.create();
|
||||||
|
dialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startListaBancaliRegistratiActivity(List<AlreadyRegisteredUDCDTO> mtbColts) {
|
||||||
|
|
||||||
|
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
||||||
|
|
||||||
|
Stream.of(mtbColts)
|
||||||
|
.map(AlreadyRegisteredUDCDTO::getMtbColt)
|
||||||
|
.toList(),
|
||||||
|
|
||||||
|
input -> Stream.of(mtbColts)
|
||||||
|
.filter(x -> x.getMtbColt() == input)
|
||||||
|
.findFirstOrElse(null)
|
||||||
|
.isCanBeRecovered(),
|
||||||
|
|
||||||
|
ReportManager.getReportNameLUFromGestione(GestioneEnum.ACQUISTO));
|
||||||
|
|
||||||
|
this.startActivityForResult(myIntent, PICK_UL_REQUEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
||||||
|
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
||||||
|
null,
|
||||||
|
() -> onComplete.run(true),
|
||||||
|
() -> onComplete.run(false)
|
||||||
|
).show(getSupportFragmentManager(), "tag");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLUOpened(MtbColt mtbColt) {
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
noLUPresent.set(false);
|
||||||
|
FBToast.successToast(this, getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||||
|
|
||||||
|
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(mtbColt);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLUClosed() {
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
noLUPresent.set(true);
|
||||||
|
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null);
|
||||||
|
|
||||||
|
if (this.mShouldCloseActivity) super.onBackPressed();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRowSaved() {
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
FBToast.successToast(this, getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLUSuccessullyPrinted() {
|
||||||
|
Resources res = getResources();
|
||||||
|
String errorMessage = res.getText(R.string.alert_print_completed_message).toString();
|
||||||
|
DialogSimpleMessageView
|
||||||
|
.makeSuccessDialog(res.getText(R.string.completed).toString(), new SpannableString(errorMessage), null, null)
|
||||||
|
.show(getSupportFragmentManager(), "tag");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLUPrintRequest(RunnableArgs<Boolean> onComplete) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLUPrintError(Exception ex, Runnable onComplete) {
|
||||||
|
this.onLoadingEnded();
|
||||||
|
DialogSimpleMessageView.makeErrorDialog(
|
||||||
|
new SpannableString(ex.getMessage()),
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
R.string.button_ignore_print,
|
||||||
|
onComplete)
|
||||||
|
.show(getSupportFragmentManager(), "tag");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMtbColrEdit(MtbColr mtbColr) {
|
||||||
|
this.mViewModel.dispatchRowEdit(mtbColr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMtbColrDelete(MtbColr mtbColr) {
|
||||||
|
this.mViewModel.deleteRow(mtbColr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBottomSheetLUClose() {
|
||||||
|
this.mViewModel.closeLU();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete) {
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
DialogAskShouldVersamentoAutomaticoULView.newInstance(onComplete)
|
||||||
|
.show(getSupportFragmentManager(), "tag");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInfoAggiuntiveRequest(RunnableArgss<String, MtbTCol> onComplete) {
|
||||||
|
DialogInfoAggiuntiveLUView.newInstance(onComplete, this::onLoadingEnded)
|
||||||
|
.show(getSupportFragmentManager(), DialogInfoAggiuntiveLUView.class.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Exception ex) {
|
||||||
|
this.onLoadingEnded();
|
||||||
|
|
||||||
|
if (ex instanceof InvalidPesoKGException) {
|
||||||
|
UtilityToast.showToast(ex.getMessage());
|
||||||
|
} else {
|
||||||
|
UtilityExceptions.defaultException(this, ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal
|
||||||
|
initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal
|
||||||
|
totalQtaOrd, BigDecimal totalNumCnfOrd, BigDecimal qtaCnfOrd, BigDecimal
|
||||||
|
totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, BigDecimal
|
||||||
|
totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, String
|
||||||
|
partitaMag, LocalDate dataScad, boolean canPartitaMagBeChanged,
|
||||||
|
boolean canOverflowQuantity, RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||||
|
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||||
|
.setMtbAart(mtbAart)
|
||||||
|
.setInitialNumCnf(initialNumCnf)
|
||||||
|
.setInitialQtaCnf(initialQtaCnf)
|
||||||
|
.setInitialQtaTot(initialQtaTot)
|
||||||
|
.setTotalQtaOrd(totalQtaOrd)
|
||||||
|
.setTotalNumCnfOrd(totalNumCnfOrd)
|
||||||
|
.setQtaCnfOrd(qtaCnfOrd)
|
||||||
|
.setTotalQtaToBeTaken(totalQtaToBeTaken)
|
||||||
|
.setTotalNumCnfToBeTaken(totalNumCnfToBeTaken)
|
||||||
|
.setQtaCnfToBeTaken(qtaCnfToBeTaken)
|
||||||
|
.setTotalQtaAvailable(totalQtaAvailable)
|
||||||
|
.setTotalNumCnfAvailable(totalNumCnfAvailable)
|
||||||
|
.setQtaCnfAvailable(qtaCnfAvailable)
|
||||||
|
.setPartitaMag(partitaMag)
|
||||||
|
.setDataScad(dataScad)
|
||||||
|
.setCanPartitaMagBeChanged(canPartitaMagBeChanged)
|
||||||
|
.setCanLUBeClosed(true)
|
||||||
|
.setCanOverflowOrderQuantity(canOverflowQuantity)
|
||||||
|
.setDisableTracciabilitaCheck(SettingsManager.iDB().isFlagDisableMandatoryTracciabilitaAccettazioneBolla());
|
||||||
|
|
||||||
|
if (!mDialogInputQuantityV2View.isVisible())
|
||||||
|
mDialogInputQuantityV2View
|
||||||
|
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||||
|
.setOnComplete((resultDTO, shouldCloseLU) -> {
|
||||||
|
PickedQuantityDTO pickedQuantityDTO = new PickedQuantityDTO()
|
||||||
|
.setNumCnf(resultDTO.getNumCnf())
|
||||||
|
.setQtaCnf(resultDTO.getQtaCnf())
|
||||||
|
.setQtaTot(resultDTO.getQtaTot())
|
||||||
|
.setPartitaMag(resultDTO.getPartitaMag())
|
||||||
|
.setDataScad(resultDTO.getDataScad());
|
||||||
|
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||||
|
})
|
||||||
|
.setOnAbort(() -> this.mViewModel.resetMatchedRows())
|
||||||
|
.show(getSupportFragmentManager(), "tag");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFilterCodMartApplied(String codMartToFilter) {
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
var codMarts = new ArrayList<String>();
|
||||||
|
codMarts.add(codMartToFilter);
|
||||||
|
|
||||||
|
// this.mAppliedFilterViewModel.setCodArtFilter(codMarts);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFilterPosizioneApplied(String posizioneToFilter) {
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
var posizioni = new ArrayList<String>();
|
||||||
|
posizioni.add(posizioneToFilter);
|
||||||
|
|
||||||
|
// this.mAppliedFilterViewModel.setPosFilter(posizioni);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onULVersata(VersamentoAutomaticoULResponseDTO
|
||||||
|
versamentoAutomaticoULResponseDTO, Runnable onComplete) {
|
||||||
|
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
DialogVersamentoAutomaticoULDoneView
|
||||||
|
.newInstance(versamentoAutomaticoULResponseDTO, onComplete)
|
||||||
|
.show(getSupportFragmentManager(), "tag");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUnknownBarcodeScanned(String barcode, RunnableArgs<String> done, Runnable abort) {
|
||||||
|
DialogAskUnknownBarcodeNotesView
|
||||||
|
.newInstance(barcode, done, abort)
|
||||||
|
.show(getSupportFragmentManager(), DialogBindProductBarcodeWithPackageView.class.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
|
||||||
|
// Check which request we're responding to
|
||||||
|
if (requestCode == PICK_UL_REQUEST) {
|
||||||
|
|
||||||
|
// Make sure the request was successful
|
||||||
|
if (resultCode == RESULT_OK) {
|
||||||
|
MtbColt recoveredMtbColt = DataCache.retrieveItem(data.getStringExtra("key"));
|
||||||
|
this.mViewModel.recoverLU(recoveredMtbColt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_picking;
|
||||||
|
|
||||||
|
import dagger.Subcomponent;
|
||||||
|
|
||||||
|
@Subcomponent
|
||||||
|
public interface AccettazioneBollaPickingComponent {
|
||||||
|
|
||||||
|
@Subcomponent.Factory
|
||||||
|
interface Factory {
|
||||||
|
AccettazioneBollaPickingComponent create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void inject(AccettazioneBollaPickingActivity AccettazioneBollaPickingActivity);
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.accettazione_bolla_picking;
|
||||||
|
|
||||||
|
import dagger.Module;
|
||||||
|
import dagger.Provides;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
|
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.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.rest.AccettazioneBollaPickingRESTConsumer;
|
||||||
|
|
||||||
|
@Module(subcomponents = AccettazioneBollaPickingComponent.class)
|
||||||
|
public class AccettazioneBollaPickingModule {
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
AccettazioneBollaPickingViewModel providesAccettazioneBollaPickingViewModel(ArticoloRESTConsumer articoloRESTConsumer,
|
||||||
|
BarcodeRESTConsumer barcodeRESTConsumer,
|
||||||
|
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||||
|
PrinterRESTConsumer printerRESTConsumer,
|
||||||
|
AccettazioneBollaPickingRESTConsumer accettazioneBollaPickingRESTConsumer,
|
||||||
|
ColliAccettazioneRESTConsumer colliAccettazioneRESTConsumer,
|
||||||
|
ColliLavorazioneRESTConsumer colliLavorazioneRESTConsumer) {
|
||||||
|
return new AccettazioneBollaPickingViewModel(articoloRESTConsumer,
|
||||||
|
barcodeRESTConsumer,
|
||||||
|
colliMagazzinoRESTConsumer,
|
||||||
|
printerRESTConsumer,
|
||||||
|
accettazioneBollaPickingRESTConsumer,
|
||||||
|
colliAccettazioneRESTConsumer,
|
||||||
|
colliLavorazioneRESTConsumer);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user