Finish v1.17.4(222)
This commit is contained in:
commit
1b0f9fb4de
60
.idea/runConfigurations/app_agricoper.xml
generated
Normal file
60
.idea/runConfigurations/app_agricoper.xml
generated
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="app_agricoper" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||||
|
<module name="WMS_Native.app" />
|
||||||
|
<option name="DEPLOY" value="true" />
|
||||||
|
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||||
|
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||||
|
<option name="ARTIFACT_NAME" value="" />
|
||||||
|
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||||
|
<option name="ALL_USERS" value="false" />
|
||||||
|
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||||
|
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
||||||
|
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||||
|
<option name="MODE" value="default_activity" />
|
||||||
|
<option name="CLEAR_LOGCAT" value="true" />
|
||||||
|
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
||||||
|
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
|
||||||
|
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||||
|
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||||
|
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||||
|
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
|
||||||
|
<option name="DEBUGGER_TYPE" value="Auto" />
|
||||||
|
<Auto>
|
||||||
|
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||||
|
<option name="SHOW_STATIC_VARS" value="true" />
|
||||||
|
<option name="WORKING_DIR" value="" />
|
||||||
|
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||||
|
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||||
|
</Auto>
|
||||||
|
<Hybrid>
|
||||||
|
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||||
|
<option name="SHOW_STATIC_VARS" value="true" />
|
||||||
|
<option name="WORKING_DIR" value="" />
|
||||||
|
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||||
|
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||||
|
</Hybrid>
|
||||||
|
<Java />
|
||||||
|
<Native>
|
||||||
|
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||||
|
<option name="SHOW_STATIC_VARS" value="true" />
|
||||||
|
<option name="WORKING_DIR" value="" />
|
||||||
|
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||||
|
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||||
|
</Native>
|
||||||
|
<Profilers>
|
||||||
|
<option name="ADVANCED_PROFILING_ENABLED" value="true" />
|
||||||
|
<option name="STARTUP_PROFILING_ENABLED" value="false" />
|
||||||
|
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
|
||||||
|
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Sample Java Methods" />
|
||||||
|
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
|
||||||
|
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
|
||||||
|
</Profilers>
|
||||||
|
<option name="DEEP_LINK" value="" />
|
||||||
|
<option name="ACTIVITY_CLASS" value="" />
|
||||||
|
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
|
||||||
|
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
3
.idea/runConfigurations/app_base.xml
generated
3
.idea/runConfigurations/app_base.xml
generated
@ -7,7 +7,8 @@
|
|||||||
<option name="ARTIFACT_NAME" value="" />
|
<option name="ARTIFACT_NAME" value="" />
|
||||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||||
<option name="ALL_USERS" value="false" />
|
<option name="ALL_USERS" value="false" />
|
||||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||||
|
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic_agricoper,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
||||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||||
<option name="MODE" value="default_activity" />
|
<option name="MODE" value="default_activity" />
|
||||||
<option name="CLEAR_LOGCAT" value="true" />
|
<option name="CLEAR_LOGCAT" value="true" />
|
||||||
|
|||||||
3
.idea/runConfigurations/app_frudis.xml
generated
3
.idea/runConfigurations/app_frudis.xml
generated
@ -7,7 +7,8 @@
|
|||||||
<option name="ARTIFACT_NAME" value="" />
|
<option name="ARTIFACT_NAME" value="" />
|
||||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||||
<option name="ALL_USERS" value="false" />
|
<option name="ALL_USERS" value="false" />
|
||||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||||
|
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_agricoper,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
||||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||||
<option name="MODE" value="default_activity" />
|
<option name="MODE" value="default_activity" />
|
||||||
<option name="CLEAR_LOGCAT" value="true" />
|
<option name="CLEAR_LOGCAT" value="true" />
|
||||||
|
|||||||
3
.idea/runConfigurations/app_gramm.xml
generated
3
.idea/runConfigurations/app_gramm.xml
generated
@ -7,7 +7,8 @@
|
|||||||
<option name="ARTIFACT_NAME" value="" />
|
<option name="ARTIFACT_NAME" value="" />
|
||||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||||
<option name="ALL_USERS" value="false" />
|
<option name="ALL_USERS" value="false" />
|
||||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_frudis,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_frudis,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||||
|
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_agricoper,WMS_Native.dynamic_frudis,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_frudis,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
||||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||||
<option name="MODE" value="default_activity" />
|
<option name="MODE" value="default_activity" />
|
||||||
<option name="CLEAR_LOGCAT" value="true" />
|
<option name="CLEAR_LOGCAT" value="true" />
|
||||||
|
|||||||
3
.idea/runConfigurations/app_ime.xml
generated
3
.idea/runConfigurations/app_ime.xml
generated
@ -7,7 +7,8 @@
|
|||||||
<option name="ARTIFACT_NAME" value="" />
|
<option name="ARTIFACT_NAME" value="" />
|
||||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||||
<option name="ALL_USERS" value="false" />
|
<option name="ALL_USERS" value="false" />
|
||||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||||
|
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_agricoper,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
||||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||||
<option name="MODE" value="default_activity" />
|
<option name="MODE" value="default_activity" />
|
||||||
<option name="CLEAR_LOGCAT" value="true" />
|
<option name="CLEAR_LOGCAT" value="true" />
|
||||||
|
|||||||
3
.idea/runConfigurations/app_saporiveri.xml
generated
3
.idea/runConfigurations/app_saporiveri.xml
generated
@ -7,7 +7,8 @@
|
|||||||
<option name="ARTIFACT_NAME" value="" />
|
<option name="ARTIFACT_NAME" value="" />
|
||||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||||
<option name="ALL_USERS" value="false" />
|
<option name="ALL_USERS" value="false" />
|
||||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||||
|
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_agricoper,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
||||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||||
<option name="MODE" value="default_activity" />
|
<option name="MODE" value="default_activity" />
|
||||||
<option name="CLEAR_LOGCAT" value="true" />
|
<option name="CLEAR_LOGCAT" value="true" />
|
||||||
|
|||||||
3
.idea/runConfigurations/app_saporiveri_pv.xml
generated
3
.idea/runConfigurations/app_saporiveri_pv.xml
generated
@ -7,7 +7,8 @@
|
|||||||
<option name="ARTIFACT_NAME" value="" />
|
<option name="ARTIFACT_NAME" value="" />
|
||||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||||
<option name="ALL_USERS" value="false" />
|
<option name="ALL_USERS" value="false" />
|
||||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_vgalimenti" />
|
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||||
|
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_agricoper,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_vgalimenti" />
|
||||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||||
<option name="MODE" value="default_activity" />
|
<option name="MODE" value="default_activity" />
|
||||||
<option name="CLEAR_LOGCAT" value="true" />
|
<option name="CLEAR_LOGCAT" value="true" />
|
||||||
|
|||||||
3
.idea/runConfigurations/app_vglimenti.xml
generated
3
.idea/runConfigurations/app_vglimenti.xml
generated
@ -7,7 +7,8 @@
|
|||||||
<option name="ARTIFACT_NAME" value="" />
|
<option name="ARTIFACT_NAME" value="" />
|
||||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||||
<option name="ALL_USERS" value="false" />
|
<option name="ALL_USERS" value="false" />
|
||||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv" />
|
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||||
|
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_agricoper,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv" />
|
||||||
<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="true" />
|
<option name="CLEAR_LOGCAT" value="true" />
|
||||||
|
|||||||
@ -6,8 +6,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 220
|
def appVersionCode = 222
|
||||||
def appVersionName = '1.17.2'
|
def appVersionName = '1.17.4'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
@ -75,13 +75,16 @@ android {
|
|||||||
checkReleaseBuilds false
|
checkReleaseBuilds false
|
||||||
}
|
}
|
||||||
|
|
||||||
dynamicFeatures = [":dynamic__base", ":dynamic_vgalimenti", ":dynamic_ime", ":dynamic_frudis", ":dynamic_saporiveri_pv", ":dynamic_saporiveri", ':dynamic_gramm']
|
dynamicFeatures = [":dynamic__base", ":dynamic_vgalimenti", ":dynamic_ime", ":dynamic_frudis", ":dynamic_saporiveri_pv", ":dynamic_saporiveri", ':dynamic_gramm', ':dynamic_agricoper']
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
|
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
|
||||||
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
|
||||||
|
implementation 'androidx.fragment:fragment:1.2.5'
|
||||||
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'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -25,14 +25,16 @@
|
|||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing" />
|
||||||
<activity android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity" />
|
<activity android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/Light"
|
||||||
|
android:windowSoftInputMode="adjustNothing" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.picking_resi.PickingResiActivity"
|
android:name=".gest.picking_resi.PickingResiActivity"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/Light" />
|
android:theme="@style/Light" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustPan">
|
android:windowSoftInputMode="adjustPan">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@ -48,7 +50,6 @@
|
|||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.login.LoginActivity"
|
android:name=".gest.login.LoginActivity"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:theme="@style/Light" />
|
android:theme="@style/Light" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.lista_bancali.ListaBancaliActivity"
|
android:name=".gest.lista_bancali.ListaBancaliActivity"
|
||||||
|
|||||||
@ -95,7 +95,7 @@ public class MainActivity extends BaseActivity
|
|||||||
mBinding.appBarMain.mainSearch.setVisibility(View.GONE);
|
mBinding.appBarMain.mainSearch.setVisibility(View.GONE);
|
||||||
|
|
||||||
initGestMenu();
|
initGestMenu();
|
||||||
openMain();
|
if(savedInstanceState == null) openMain();
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,8 @@ import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisogn
|
|||||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdModule;
|
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdModule;
|
||||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.dialog_ask_mag_prossimita.DialogAskMagazzinoProssimitaComponent;
|
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.dialog_ask_mag_prossimita.DialogAskMagazzinoProssimitaComponent;
|
||||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.dialog_ask_mag_prossimita.DialogAskMagazzinoProssimitaModule;
|
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.dialog_ask_mag_prossimita.DialogAskMagazzinoProssimitaModule;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.ProdRientroMerceOrderDetailComponent;
|
||||||
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_ordini_acquisto.PVOrdineAcquistoGrigliaComponent;
|
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdineAcquistoGrigliaComponent;
|
||||||
@ -35,6 +37,8 @@ import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceComponen
|
|||||||
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceModule;
|
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceModule;
|
||||||
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.input_lu_prod.DialogInputLUProdComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdModule;
|
||||||
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.scan_art.DialogScanArtComponent;
|
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtComponent;
|
||||||
@ -59,6 +63,7 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
|||||||
PickingResiModule.class,
|
PickingResiModule.class,
|
||||||
OrdiniUscitaElencoModule.class,
|
OrdiniUscitaElencoModule.class,
|
||||||
DialogInputQuantityV2Module.class,
|
DialogInputQuantityV2Module.class,
|
||||||
|
DialogInputLUProdModule.class,
|
||||||
DialogScanArtModule.class,
|
DialogScanArtModule.class,
|
||||||
DialogScanOrCreateLUModule.class,
|
DialogScanOrCreateLUModule.class,
|
||||||
ProdFabbisognoLineeProdModule.class,
|
ProdFabbisognoLineeProdModule.class,
|
||||||
@ -80,6 +85,7 @@ public interface MainApplicationComponent {
|
|||||||
PickingResiComponent.Factory pickingResiComponent();
|
PickingResiComponent.Factory pickingResiComponent();
|
||||||
OrdiniUscitaElencoComponent.Factory prodOrdineLavorazioneElencoComponent();
|
OrdiniUscitaElencoComponent.Factory prodOrdineLavorazioneElencoComponent();
|
||||||
DialogInputQuantityV2Component.Factory dialogInputQuantityV2Component();
|
DialogInputQuantityV2Component.Factory dialogInputQuantityV2Component();
|
||||||
|
DialogInputLUProdComponent.Factory dialogInputLUProdComponent();
|
||||||
DialogScanArtComponent.Factory dialogScanArtComponent();
|
DialogScanArtComponent.Factory dialogScanArtComponent();
|
||||||
DialogScanOrCreateLUComponent.Factory dialogScanOrCreateLUComponent();
|
DialogScanOrCreateLUComponent.Factory dialogScanOrCreateLUComponent();
|
||||||
ProdFabbisognoLineeProdComponent.Factory prodFabbisognoLineeProdComponent();
|
ProdFabbisognoLineeProdComponent.Factory prodFabbisognoLineeProdComponent();
|
||||||
@ -87,6 +93,8 @@ public interface MainApplicationComponent {
|
|||||||
DialogAskMagazzinoProssimitaComponent.Factory dialogAskMagazzinoProssimitaComponent();
|
DialogAskMagazzinoProssimitaComponent.Factory dialogAskMagazzinoProssimitaComponent();
|
||||||
DialogChooseBatchLotComponent.Factory dialogChooseBatchLotComponent();
|
DialogChooseBatchLotComponent.Factory dialogChooseBatchLotComponent();
|
||||||
DialogRowInfoProdFabbisognoLineeProdComponent.Factory dialogRowInfoProdFabbisognoLineeProdComponent();
|
DialogRowInfoProdFabbisognoLineeProdComponent.Factory dialogRowInfoProdFabbisognoLineeProdComponent();
|
||||||
|
ProdRientroMerceComponent.Factory prodRientroMerceComponent();
|
||||||
|
ProdRientroMerceOrderDetailComponent.Factory prodRientroMerceOrderDetailComponent();
|
||||||
|
|
||||||
|
|
||||||
void inject(AppContext appContext);
|
void inject(AppContext appContext);
|
||||||
|
|||||||
@ -12,6 +12,8 @@ import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||||
@ -59,6 +61,18 @@ public class MainApplicationModule {
|
|||||||
return new ArticoloRESTConsumer();
|
return new ArticoloRESTConsumer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
MagazzinoRESTConsumer provideMagazzinoRESTConsumer() {
|
||||||
|
return new MagazzinoRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
MesRESTConsumer provideMesRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
|
||||||
|
return new MesRESTConsumer(systemRESTConsumer);
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
ColliMagazzinoRESTConsumer provideColliMagazzinoRESTConsumer(ArticoloRESTConsumer articoloRESTConsumer) {
|
ColliMagazzinoRESTConsumer provideColliMagazzinoRESTConsumer(ArticoloRESTConsumer articoloRESTConsumer) {
|
||||||
|
|||||||
@ -84,6 +84,28 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BindingAdapter("binding")
|
||||||
|
public static void bindEditText(AppCompatTextView view, final ObservableField<String> observableField) {
|
||||||
|
Pair<ObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
|
if (pair == null || pair.first != observableField) {
|
||||||
|
if (pair != null) {
|
||||||
|
view.removeTextChangedListener(pair.second);
|
||||||
|
}
|
||||||
|
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
if(observableField != null) observableField.set(s.toString());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
view.setTag(R.id.bound_observable, new Pair<>(observableField, watcher));
|
||||||
|
view.addTextChangedListener(watcher);
|
||||||
|
}
|
||||||
|
String newValue = observableField.get();
|
||||||
|
if (!view.getText().toString().equals(newValue)) {
|
||||||
|
view.setText(newValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@BindingAdapter("binding")
|
@BindingAdapter("binding")
|
||||||
public static void bindEditText(EditText view, final BindableString bindableString) {
|
public static void bindEditText(EditText view, final BindableString bindableString) {
|
||||||
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
@ -106,6 +128,28 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BindingAdapter("binding")
|
||||||
|
public static void bindEditText(EditText view, final ObservableField<String> observableString) {
|
||||||
|
Pair<ObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
|
if (pair == null || pair.first != observableString) {
|
||||||
|
if (pair != null) {
|
||||||
|
view.removeTextChangedListener(pair.second);
|
||||||
|
}
|
||||||
|
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
observableString.set(s.toString());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
view.setTag(R.id.bound_observable, new Pair<>(observableString, watcher));
|
||||||
|
view.addTextChangedListener(watcher);
|
||||||
|
}
|
||||||
|
String newValue = observableString.get();
|
||||||
|
if (!view.getText().toString().equals(newValue)) {
|
||||||
|
view.setText(newValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@BindingAdapter("binding")
|
@BindingAdapter("binding")
|
||||||
public static void bindTextInputEditText(TextInputEditText view, final BindableString bindableString) {
|
public static void bindTextInputEditText(TextInputEditText view, final BindableString bindableString) {
|
||||||
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
package it.integry.integrywmsnative.core.di.binders;
|
||||||
|
|
||||||
|
public class AutoCompleteTextViewBinders {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -49,16 +49,38 @@ public class BaseDialogFragment extends DialogFragment {
|
|||||||
this.mBarcodeListener = listen;
|
this.mBarcodeListener = listen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void onLoadingStarted() {
|
||||||
|
BarcodeManager.disable();
|
||||||
|
this.openProgress();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onLoadingEnded() {
|
||||||
|
this.closeProgress();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
|
||||||
protected void openProgress() {
|
protected void openProgress() {
|
||||||
|
|
||||||
|
// new Thread(() -> {
|
||||||
|
getActivity().runOnUiThread(() -> {
|
||||||
if (this.mCurrentProgress == null) {
|
if (this.mCurrentProgress == null) {
|
||||||
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(getActivity());
|
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(getActivity());
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
// }).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void closeProgress() {
|
protected void closeProgress() {
|
||||||
|
// new Thread(() -> {
|
||||||
|
getActivity().runOnUiThread(() -> {
|
||||||
if (mCurrentProgress != null) {
|
if (mCurrentProgress != null) {
|
||||||
mCurrentProgress.dismiss();
|
mCurrentProgress.dismiss();
|
||||||
mCurrentProgress = null;
|
mCurrentProgress = null;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
// }).start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import android.app.Dialog;
|
|||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||||
|
|
||||||
public class BaseFragment extends Fragment {
|
public class BaseFragment extends Fragment {
|
||||||
@ -32,4 +34,23 @@ public class BaseFragment extends Fragment {
|
|||||||
});
|
});
|
||||||
// }).start();
|
// }).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void onLoadingStarted() {
|
||||||
|
BarcodeManager.disable();
|
||||||
|
this.openProgress();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onLoadingEnded() {
|
||||||
|
this.closeProgress();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onError(Exception ex) {
|
||||||
|
this.getActivity().runOnUiThread(() -> {
|
||||||
|
this.closeProgress();
|
||||||
|
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
|
||||||
|
BarcodeManager.enable();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import androidx.databinding.ObservableList;
|
|||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||||
|
|
||||||
@ -38,6 +39,28 @@ public abstract class ExtendedRecyclerView<T, VH extends RecyclerView.ViewHolder
|
|||||||
return mDataset.size();
|
return mDataset.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearDataset() {
|
||||||
|
mDataset.clear();
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateDataset(List<T> updatedDataset) {
|
||||||
|
mDataset.clear();
|
||||||
|
|
||||||
|
if(updatedDataset != null && !updatedDataset.isEmpty()) {
|
||||||
|
mDataset.addAll(updatedDataset);
|
||||||
|
}
|
||||||
|
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addDataset(List<T> insertDataset) {
|
||||||
|
if(insertDataset != null && !insertDataset.isEmpty()) {
|
||||||
|
mDataset.addAll(insertDataset);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ExtendedRecyclerView<T, VH> setEmptyView(View emptyView) {
|
public ExtendedRecyclerView<T, VH> setEmptyView(View emptyView) {
|
||||||
this.mEmptyView = emptyView;
|
this.mEmptyView = emptyView;
|
||||||
this.checkIfEmpty();
|
this.checkIfEmpty();
|
||||||
|
|||||||
@ -0,0 +1,348 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class DtbOrdSteps extends EntityBase {
|
||||||
|
|
||||||
|
private String dataOrd;
|
||||||
|
private String gestione;
|
||||||
|
private Integer idRiga;
|
||||||
|
private Integer idStep;
|
||||||
|
private Integer numOrd;
|
||||||
|
private String activityId;
|
||||||
|
private String codAnag;
|
||||||
|
private String codDtip;
|
||||||
|
private String codJfas;
|
||||||
|
private String codMdep;
|
||||||
|
private String codProdPri;
|
||||||
|
private String dataDoc;
|
||||||
|
private String dataFine;
|
||||||
|
private String dataIniz;
|
||||||
|
private String descrizioneAttivita;
|
||||||
|
private String flagTipoTempo;
|
||||||
|
private Integer hrNum;
|
||||||
|
private BigDecimal hrTime;
|
||||||
|
private String idRigaDoc;
|
||||||
|
private String note;
|
||||||
|
private String numDoc;
|
||||||
|
private Integer numFase;
|
||||||
|
private BigDecimal qtaAllocata;
|
||||||
|
private BigDecimal qtaDisp;
|
||||||
|
private BigDecimal qtaDispImmessa;
|
||||||
|
private BigDecimal qtaImmesse;
|
||||||
|
private BigDecimal qtaInProd;
|
||||||
|
private BigDecimal qtaLav;
|
||||||
|
private BigDecimal qtaProd;
|
||||||
|
private BigDecimal qtaScartate;
|
||||||
|
private BigDecimal qtaTrasferite;
|
||||||
|
private BigDecimal rapConvLav;
|
||||||
|
private String serDoc;
|
||||||
|
private String untMisLav;
|
||||||
|
|
||||||
|
|
||||||
|
public String getDataOrd() {
|
||||||
|
return dataOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setDataOrd(String dataOrd) {
|
||||||
|
this.dataOrd = dataOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGestione() {
|
||||||
|
return gestione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setGestione(String gestione) {
|
||||||
|
this.gestione = gestione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIdRiga() {
|
||||||
|
return idRiga;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setIdRiga(Integer idRiga) {
|
||||||
|
this.idRiga = idRiga;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIdStep() {
|
||||||
|
return idStep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setIdStep(Integer idStep) {
|
||||||
|
this.idStep = idStep;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumOrd() {
|
||||||
|
return numOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setNumOrd(Integer numOrd) {
|
||||||
|
this.numOrd = numOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getActivityId() {
|
||||||
|
return activityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setActivityId(String activityId) {
|
||||||
|
this.activityId = activityId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodAnag() {
|
||||||
|
return codAnag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setCodAnag(String codAnag) {
|
||||||
|
this.codAnag = codAnag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodDtip() {
|
||||||
|
return codDtip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setCodDtip(String codDtip) {
|
||||||
|
this.codDtip = codDtip;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJfas() {
|
||||||
|
return codJfas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setCodJfas(String codJfas) {
|
||||||
|
this.codJfas = codJfas;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMdep() {
|
||||||
|
return codMdep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setCodMdep(String codMdep) {
|
||||||
|
this.codMdep = codMdep;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodProdPri() {
|
||||||
|
return codProdPri;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setCodProdPri(String codProdPri) {
|
||||||
|
this.codProdPri = codProdPri;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataDoc() {
|
||||||
|
return dataDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setDataDoc(String dataDoc) {
|
||||||
|
this.dataDoc = dataDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataFine() {
|
||||||
|
return dataFine;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setDataFine(String dataFine) {
|
||||||
|
this.dataFine = dataFine;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataIniz() {
|
||||||
|
return dataIniz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setDataIniz(String dataIniz) {
|
||||||
|
this.dataIniz = dataIniz;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizioneAttivita() {
|
||||||
|
return descrizioneAttivita;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setDescrizioneAttivita(String descrizioneAttivita) {
|
||||||
|
this.descrizioneAttivita = descrizioneAttivita;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagTipoTempo() {
|
||||||
|
return flagTipoTempo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setFlagTipoTempo(String flagTipoTempo) {
|
||||||
|
this.flagTipoTempo = flagTipoTempo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getHrNum() {
|
||||||
|
return hrNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setHrNum(Integer hrNum) {
|
||||||
|
this.hrNum = hrNum;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getHrTime() {
|
||||||
|
return hrTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setHrTime(BigDecimal hrTime) {
|
||||||
|
this.hrTime = hrTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdRigaDoc() {
|
||||||
|
return idRigaDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setIdRigaDoc(String idRigaDoc) {
|
||||||
|
this.idRigaDoc = idRigaDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNote() {
|
||||||
|
return note;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setNote(String note) {
|
||||||
|
this.note = note;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumDoc() {
|
||||||
|
return numDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setNumDoc(String numDoc) {
|
||||||
|
this.numDoc = numDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumFase() {
|
||||||
|
return numFase;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setNumFase(Integer numFase) {
|
||||||
|
this.numFase = numFase;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaAllocata() {
|
||||||
|
return qtaAllocata;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setQtaAllocata(BigDecimal qtaAllocata) {
|
||||||
|
this.qtaAllocata = qtaAllocata;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaDisp() {
|
||||||
|
return qtaDisp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setQtaDisp(BigDecimal qtaDisp) {
|
||||||
|
this.qtaDisp = qtaDisp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaDispImmessa() {
|
||||||
|
return qtaDispImmessa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setQtaDispImmessa(BigDecimal qtaDispImmessa) {
|
||||||
|
this.qtaDispImmessa = qtaDispImmessa;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaImmesse() {
|
||||||
|
return qtaImmesse;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setQtaImmesse(BigDecimal qtaImmesse) {
|
||||||
|
this.qtaImmesse = qtaImmesse;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaInProd() {
|
||||||
|
return qtaInProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setQtaInProd(BigDecimal qtaInProd) {
|
||||||
|
this.qtaInProd = qtaInProd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaLav() {
|
||||||
|
return qtaLav;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setQtaLav(BigDecimal qtaLav) {
|
||||||
|
this.qtaLav = qtaLav;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaProd() {
|
||||||
|
return qtaProd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setQtaProd(BigDecimal qtaProd) {
|
||||||
|
this.qtaProd = qtaProd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaScartate() {
|
||||||
|
return qtaScartate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setQtaScartate(BigDecimal qtaScartate) {
|
||||||
|
this.qtaScartate = qtaScartate;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaTrasferite() {
|
||||||
|
return qtaTrasferite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setQtaTrasferite(BigDecimal qtaTrasferite) {
|
||||||
|
this.qtaTrasferite = qtaTrasferite;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getRapConvLav() {
|
||||||
|
return rapConvLav;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setRapConvLav(BigDecimal rapConvLav) {
|
||||||
|
this.rapConvLav = rapConvLav;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerDoc() {
|
||||||
|
return serDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setSerDoc(String serDoc) {
|
||||||
|
this.serDoc = serDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUntMisLav() {
|
||||||
|
return untMisLav;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DtbOrdSteps setUntMisLav(String untMisLav) {
|
||||||
|
this.untMisLav = untMisLav;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -105,4 +105,6 @@ public class MtbTCol {
|
|||||||
this.circuito = circuito;
|
this.circuito = circuito;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,10 +3,8 @@ package it.integry.integrywmsnative.core.rest;
|
|||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
|
|
||||||
import java.sql.Date;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.rest.deserializer.DateDeserializer;
|
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import retrofit2.Retrofit;
|
import retrofit2.Retrofit;
|
||||||
@ -53,11 +51,12 @@ public class RESTBuilder {
|
|||||||
String endpoint = "http://" + host + ":" + port + "/" + (addEmsApi ? "ems-api/" : "");
|
String endpoint = "http://" + host + ":" + port + "/" + (addEmsApi ? "ems-api/" : "");
|
||||||
|
|
||||||
Gson gson = new GsonBuilder()
|
Gson gson = new GsonBuilder()
|
||||||
.registerTypeAdapter(Date.class, new DateDeserializer())
|
.setDateFormat("dd/MM/yyyy HH:mm:ss")
|
||||||
.create();
|
.create();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Retrofit retrofit = new Retrofit.Builder()
|
Retrofit retrofit = new Retrofit.Builder()
|
||||||
.addConverterFactory(GsonConverterFactory.create(gson))
|
.addConverterFactory(GsonConverterFactory.create(gson))
|
||||||
.baseUrl(endpoint)
|
.baseUrl(endpoint)
|
||||||
|
|||||||
@ -40,11 +40,11 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void getByCodMart(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getByCodMarts(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
getByCodMartStatic(codMartToFind, onComplete, onFailed);
|
getByCodMartsStatic(codMartToFind, onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void getByCodMartStatic(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)
|
String joinedCods = Stream.of(codMartToFind)
|
||||||
.collect(Collectors.joining(","));
|
.collect(Collectors.joining(","));
|
||||||
@ -67,4 +67,26 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void getByCodMart(String codMartToFind, RunnableArgs<MtbAart> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
|
articoloRESTConsumer.getByCodMart(codMartToFind).enqueue(new Callback<ServiceRESTResponse<MtbAart>>() {
|
||||||
|
@Override
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -418,7 +418,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ArticoloRESTConsumer.getByCodMartStatic(codMarts, arts -> {
|
ArticoloRESTConsumer.getByCodMartsStatic(codMarts, arts -> {
|
||||||
|
|
||||||
if (arts != null && arts.size() > 0) {
|
if (arts != null && arts.size() > 0) {
|
||||||
for (MtbColt mtbColt : mtbColts) {
|
for (MtbColt mtbColt : mtbColts) {
|
||||||
|
|||||||
@ -6,15 +6,18 @@ import java.lang.reflect.Type;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
public class MagazzinoRESTConsumer extends _BaseRESTConsumer {
|
public class MagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void getTipoCollo(String codTcol, RunnableArgs<MtbTCol> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getTipoCollo(String codTcol, RunnableArgs<MtbTCol> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
String baseSql = "SELECT * " +
|
String baseSql = "SELECT * " +
|
||||||
"FROM mtb_tcol " +
|
"FROM mtb_tcol " +
|
||||||
"WHERE cod_tcol = " + UtilityDB.valueToString(codTcol);
|
"WHERE cod_tcol = " + UtilityDB.valueToString(codTcol);
|
||||||
@ -36,7 +39,11 @@ public class MagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void getTipiCollo(RunnableArgs<List<MtbTCol>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getTipiCollo(RunnableArgs<List<MtbTCol>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
getTipiColloStatic(onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void getTipiColloStatic(RunnableArgs<List<MtbTCol>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
String baseSql = "SELECT * " +
|
String baseSql = "SELECT * " +
|
||||||
"FROM mtb_tcol ";
|
"FROM mtb_tcol ";
|
||||||
|
|
||||||
|
|||||||
@ -1,23 +1,42 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.JtbFasi;
|
||||||
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.utility.UtilityDB;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
public class MesRESTConsumer extends _BaseRESTConsumer {
|
public class MesRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
public static void getOrdiniLavorazioneMateriale(String codJfas, String idMateriale, RunnableArgs<List<OrdineLavorazioneDTO>> onComplete, RunnableArgs<Exception> onFailed){
|
private final SystemRESTConsumer mSystemRESTConsumer;
|
||||||
|
|
||||||
|
public MesRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
|
||||||
|
this.mSystemRESTConsumer = systemRESTConsumer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void getOrdiniLavorazioneMateriale(String codJfas, String idMateriale, RunnableArgs<List<OrdineLavorazioneDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
MesRESTConsumerService mesRESTConsumerService = RESTBuilder.getService(MesRESTConsumerService.class);
|
MesRESTConsumerService mesRESTConsumerService = RESTBuilder.getService(MesRESTConsumerService.class);
|
||||||
mesRESTConsumerService.getOrdiniLavorazioneMateriale(codJfas,idMateriale).enqueue(new Callback<ServiceRESTResponse<List<OrdineLavorazioneDTO>>>() {
|
|
||||||
|
mesRESTConsumerService.getOrdiniLavorazioneMateriale(codJfas, idMateriale)
|
||||||
|
.enqueue(new Callback<ServiceRESTResponse<List<OrdineLavorazioneDTO>>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Response<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> response) {
|
public void onResponse(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Response<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> response) {
|
||||||
analyzeAnswer(response, "getAvailablePosizioni", (m) -> onComplete.run(response.body().getDto()), onFailed);
|
analyzeAnswer(response, "getOrdiniLavorazioneMateriale", (m) -> onComplete.run(response.body().getDto()), onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -25,7 +44,50 @@ public class MesRESTConsumer extends _BaseRESTConsumer {
|
|||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getOrdiniLavorazione(String flagEvaso, String codJfas, RunnableArgs<List<OrdineLavorazioneDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
MesRESTConsumerService mesRESTConsumerService = RESTBuilder.getService(MesRESTConsumerService.class);
|
||||||
|
|
||||||
|
mesRESTConsumerService.getOrdiniLavorazione(flagEvaso, codJfas)
|
||||||
|
.enqueue(new Callback<ServiceRESTResponse<List<OrdineLavorazioneDTO>>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Response<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> response) {
|
||||||
|
analyzeAnswer(response, "getOrdiniLavorazione", (m) -> onComplete.run(response.body().getDto()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getOrdiniLavorazione(Date dateStart, String flagEvaso, String codJfas, RunnableArgs<List<OrdineLavorazioneDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
MesRESTConsumerService mesRESTConsumerService = RESTBuilder.getService(MesRESTConsumerService.class);
|
||||||
|
|
||||||
|
mesRESTConsumerService.getOrdiniLavorazione(UtilityDate.formatDate(dateStart, UtilityDate.COMMONS_DATE_FORMATS.YMD_DASH), flagEvaso, codJfas)
|
||||||
|
.enqueue(new Callback<ServiceRESTResponse<List<OrdineLavorazioneDTO>>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Response<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> response) {
|
||||||
|
analyzeAnswer(response, "getOrdiniLavorazione", (m) -> onComplete.run(response.body().getDto()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getLineeProduzione(String codJfasParent, RunnableArgs<List<JtbFasi>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
Type typeOfObjectsList = new TypeToken<ArrayList<JtbFasi>>() {}.getType();
|
||||||
|
this.mSystemRESTConsumer.processSql(
|
||||||
|
"SELECT * FROM jtb_fasi WHERE cod_jfas_parent = " + UtilityDB.valueToString(codJfasParent),
|
||||||
|
typeOfObjectsList,
|
||||||
|
onComplete,
|
||||||
|
onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,4 +14,12 @@ public interface MesRESTConsumerService {
|
|||||||
@GET("mes_v2/getOrdiniLavorazioneMateriale")
|
@GET("mes_v2/getOrdiniLavorazioneMateriale")
|
||||||
Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> getOrdiniLavorazioneMateriale(@Query("codJfas") String codJfas, @Query("idMateriale") String idMateriale);
|
Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> getOrdiniLavorazioneMateriale(@Query("codJfas") String codJfas, @Query("idMateriale") String idMateriale);
|
||||||
|
|
||||||
|
|
||||||
|
@GET("mes_v2/getOrdiniLavorazione")
|
||||||
|
Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> getOrdiniLavorazione(@Query("flagEvaso") String flagEvaso, @Query("codJfas") String codJfas);
|
||||||
|
|
||||||
|
|
||||||
|
@GET("mes_v2/getOrdiniLavorazione")
|
||||||
|
Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> getOrdiniLavorazione(@Query("startDate") String startDate, @Query("flagEvaso") String flagEvaso, @Query("codJfas") String codJfas);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import java.lang.reflect.Type;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
|
||||||
public class DateDeserializer implements JsonDeserializer<Date> {
|
public class DateDeserializer implements JsonDeserializer<Date> {
|
||||||
|
|
||||||
@ -16,6 +17,8 @@ public class DateDeserializer implements JsonDeserializer<Date> {
|
|||||||
public Date deserialize(JsonElement element, Type arg1, JsonDeserializationContext arg2) throws JsonParseException {
|
public Date deserialize(JsonElement element, Type arg1, JsonDeserializationContext arg2) throws JsonParseException {
|
||||||
String date = element.getAsString();
|
String date = element.getAsString();
|
||||||
|
|
||||||
|
if (UtilityString.isNullOrEmpty(date)) return null;
|
||||||
|
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(date);
|
return UtilityDate.recognizeDateWithExceptionHandler(date);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
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.util.Date;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
|
||||||
|
public class DateSerializer implements JsonSerializer<Date> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JsonElement serialize(Date src, Type typeOfSrc, JsonSerializationContext context) {
|
||||||
|
String dateString = UtilityDate.formatDate(src, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
||||||
|
|
||||||
|
return src == null ? null : new JsonPrimitive(dateString);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,10 +2,8 @@ package it.integry.integrywmsnative.core.utility;
|
|||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.TimeZone;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.exception.DateNotRecognizedException;
|
import it.integry.integrywmsnative.core.exception.DateNotRecognizedException;
|
||||||
import it.integry.integrywmsnative.core.exception.TimeNotRecognizedException;
|
import it.integry.integrywmsnative.core.exception.TimeNotRecognizedException;
|
||||||
@ -19,9 +17,15 @@ public class UtilityDate {
|
|||||||
public static class COMMONS_DATE_FORMATS {
|
public static class COMMONS_DATE_FORMATS {
|
||||||
public static final String DMY_SLASH = "dd/MM/yyyy";
|
public static final String DMY_SLASH = "dd/MM/yyyy";
|
||||||
public static final String YMD_SLASH = "yyyy/MM/dd";
|
public static final String YMD_SLASH = "yyyy/MM/dd";
|
||||||
|
public static final String DM_SLASH = "dd/MM";
|
||||||
|
public static final String MD_SLASH = "MM/dd";
|
||||||
public static final String YMD_DASH = "yyyy-MM-dd";
|
public static final String YMD_DASH = "yyyy-MM-dd";
|
||||||
public static final String DMY_TIME_SLASH = DMY_SLASH + " HH:mm:ss";
|
public static final String DMY_TIME_SLASH = DMY_SLASH + " HH:mm:ss";
|
||||||
public static final String YMD_TIME_SLASH = YMD_SLASH + " HH:mm:ss";
|
public static final String YMD_TIME_SLASH = YMD_SLASH + " HH:mm:ss";
|
||||||
|
public static final String DM_TIME_SLASH = DM_SLASH + " HH:mm";
|
||||||
|
public static final String MD_TIME_SLASH = MD_SLASH + " HH:mm";
|
||||||
|
public static final String TIME = "HH:mm";
|
||||||
|
public static final String TIME_W_SECS = "HH:mm:ss";
|
||||||
|
|
||||||
|
|
||||||
public static final String DM_HUMAN = "dd MMM";
|
public static final String DM_HUMAN = "dd MMM";
|
||||||
|
|||||||
@ -8,6 +8,14 @@ import androidx.fragment.app.DialogFragment;
|
|||||||
|
|
||||||
public class UtilityDialog {
|
public class UtilityDialog {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void setTo60PercentWidth(Context context, DialogFragment dialog) {
|
||||||
|
int width = (int)(context.getResources().getDisplayMetrics().widthPixels*0.60);
|
||||||
|
|
||||||
|
dialog.getDialog().getWindow().setLayout(width, LinearLayout.LayoutParams.MATCH_PARENT);
|
||||||
|
}
|
||||||
|
|
||||||
public static void setTo90PercentWidth(Context context, Dialog dialog) {
|
public static void setTo90PercentWidth(Context context, Dialog dialog) {
|
||||||
int width = (int)(context.getResources().getDisplayMetrics().widthPixels*0.90);
|
int width = (int)(context.getResources().getDisplayMetrics().widthPixels*0.90);
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.core.utility;
|
package it.integry.integrywmsnative.core.utility;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
@ -22,4 +23,14 @@ public class UtilityDimension {
|
|||||||
return Math.round(px);
|
return Math.round(px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static double getDisplayInchs(Activity activity) {
|
||||||
|
DisplayMetrics metrics = new DisplayMetrics();
|
||||||
|
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||||
|
|
||||||
|
float yInches= metrics.heightPixels/metrics.ydpi;
|
||||||
|
float xInches= metrics.widthPixels/metrics.xdpi;
|
||||||
|
return Math.sqrt(xInches*xInches + yInches*yInches);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -144,7 +144,7 @@ public class AccettazionePickingViewModel {
|
|||||||
.map(SitArtOrdDTO::getCodMart)
|
.map(SitArtOrdDTO::getCodMart)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
this.mArticoloRESTConsumer.getByCodMart(codMarts, listMtbAarts -> {
|
this.mArticoloRESTConsumer.getByCodMarts(codMarts, listMtbAarts -> {
|
||||||
List<PickingObjectDTO> pickingList = Stream.of(sitArtOrdList)
|
List<PickingObjectDTO> pickingList = Stream.of(sitArtOrdList)
|
||||||
.map(sitArtOrdDTO -> {
|
.map(sitArtOrdDTO -> {
|
||||||
MtbAart mtbAart = null;
|
MtbAart mtbAart = null;
|
||||||
|
|||||||
@ -7,11 +7,15 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.widget.AppCompatTextView;
|
import androidx.appcompat.widget.AppCompatTextView;
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -34,6 +38,7 @@ import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDimension;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
@ -68,7 +73,7 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
setRetainInstance(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -78,13 +83,19 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
|||||||
|
|
||||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.fragment_main, container, false);
|
mBindings = DataBindingUtil.inflate(inflater, R.layout.fragment_main, container, false);
|
||||||
|
|
||||||
|
|
||||||
|
return mBindings.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewCreated(@NonNull @NotNull View view, @Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
|
||||||
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
|
||||||
mToolbar.setNestedScrollView(mBindings.fragmentMainScrollview);
|
mToolbar.setNestedScrollView(mBindings.fragmentMainScrollview);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
initGestMenu();
|
initGestMenu();
|
||||||
initVersion();
|
initVersion();
|
||||||
|
|
||||||
return mBindings.getRoot();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -128,7 +139,7 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
|||||||
|
|
||||||
List<Exception> generatedErrors = new ArrayList<>();
|
List<Exception> generatedErrors = new ArrayList<>();
|
||||||
|
|
||||||
Iterator sessionsIterator = ColliDataRecover.getAllSessionIDs().iterator();
|
Iterator<Integer> sessionsIterator = ColliDataRecover.getAllSessionIDs().iterator();
|
||||||
|
|
||||||
cyclicRecover(sessionsIterator, () -> {
|
cyclicRecover(sessionsIterator, () -> {
|
||||||
|
|
||||||
@ -225,6 +236,10 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
|||||||
BaseMenuConfiguration menuConfiguration = customConfiguration.getConfig(BaseCustomConfiguration.Keys.MENU_CONFIGURATION);
|
BaseMenuConfiguration menuConfiguration = customConfiguration.getConfig(BaseCustomConfiguration.Keys.MENU_CONFIGURATION);
|
||||||
List<MenuConfiguration.MenuGroup> menuGroups = menuConfiguration.getGroups();
|
List<MenuConfiguration.MenuGroup> menuGroups = menuConfiguration.getGroups();
|
||||||
|
|
||||||
|
int menuSpanCount = 2;
|
||||||
|
if(UtilityDimension.getDisplayInchs(this.getActivity()) > 8) menuSpanCount = 4;
|
||||||
|
else if(UtilityDimension.getDisplayInchs(this.getActivity()) > 6.5) menuSpanCount = 3;
|
||||||
|
|
||||||
for (MenuConfiguration.MenuGroup menuGroup : menuGroups) {
|
for (MenuConfiguration.MenuGroup menuGroup : menuGroups) {
|
||||||
FragmentMainMenuGroupLayoutBinding groupBinding = DataBindingUtil.inflate(mLayoutInflater, R.layout.fragment_main_menu_group_layout, null, false);
|
FragmentMainMenuGroupLayoutBinding groupBinding = DataBindingUtil.inflate(mLayoutInflater, R.layout.fragment_main_menu_group_layout, null, false);
|
||||||
|
|
||||||
@ -233,7 +248,7 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
|||||||
|
|
||||||
MenuListAdapter menuListAdapter = new MenuListAdapter(getContext(), menuGroup.getItems());
|
MenuListAdapter menuListAdapter = new MenuListAdapter(getContext(), menuGroup.getItems());
|
||||||
|
|
||||||
groupBinding.mainList.setLayoutManager(new GridLayoutManager(getContext(), 2));
|
groupBinding.mainList.setLayoutManager(new GridLayoutManager(getContext(), menuSpanCount));
|
||||||
groupBinding.mainList.setAdapter(menuListAdapter);
|
groupBinding.mainList.setAdapter(menuListAdapter);
|
||||||
groupBinding.mainList.setNestedScrollingEnabled(false);
|
groupBinding.mainList.setNestedScrollingEnabled(false);
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ public class PickingResiRESTConsumer {
|
|||||||
.distinct()
|
.distinct()
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
mArticoloRESTConsumer.getByCodMart(codMarts, arts -> {
|
mArticoloRESTConsumer.getByCodMarts(codMarts, arts -> {
|
||||||
|
|
||||||
if(arts != null && arts.size() > 0) {
|
if(arts != null && arts.size() > 0) {
|
||||||
for (DtbDocr value : values) {
|
for (DtbDocr value : values) {
|
||||||
|
|||||||
@ -262,7 +262,7 @@ public class ProdRecuperoMaterialeHelper {
|
|||||||
.distinct()
|
.distinct()
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
ArticoloRESTConsumer.getByCodMartStatic(codMarts, arts -> {
|
ArticoloRESTConsumer.getByCodMartsStatic(codMarts, arts -> {
|
||||||
|
|
||||||
if(arts != null && arts.size() > 0) {
|
if(arts != null && arts.size() > 0) {
|
||||||
for (HistoryVersamentoProdULDTO value : newUlList) {
|
for (HistoryVersamentoProdULDTO value : newUlList) {
|
||||||
|
|||||||
@ -0,0 +1,14 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce;
|
||||||
|
|
||||||
|
import dagger.Subcomponent;
|
||||||
|
|
||||||
|
@Subcomponent
|
||||||
|
public interface ProdRientroMerceComponent {
|
||||||
|
|
||||||
|
@Subcomponent.Factory
|
||||||
|
interface Factory {
|
||||||
|
ProdRientroMerceComponent create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void inject(ProdRientroMerceFragment prodRientroMerceFragment);
|
||||||
|
}
|
||||||
@ -0,0 +1,161 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.SpannableString;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.widget.AppCompatTextView;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
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.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceBinding;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.ProdRientroMerceOrderDetailFragment;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_list.ProdRientroMerceOrderListFragment;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
|
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||||
|
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||||
|
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
|
|
||||||
|
public class ProdRientroMerceFragment extends BaseFragment implements ITitledFragment, IScrollableFragment, ProdRientroMerceViewModel.Listener, BottomSheetFragmentLUContentView.Listener, BottomSheetMtbColrEditView.Listener {
|
||||||
|
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
ProdRientroMerceViewModel mViewModel;
|
||||||
|
|
||||||
|
private AppCompatTextView mAppBarTitle;
|
||||||
|
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||||
|
|
||||||
|
private FragmentProdRientroMerceBinding mBindings;
|
||||||
|
|
||||||
|
private ProdRientroMerceOrderListFragment mProdRientroMerceOrderListFragment;
|
||||||
|
private ProdRientroMerceOrderDetailFragment mProdRientroMerceOrderDetailFragment;
|
||||||
|
private ElevatedToolbar mToolbar;
|
||||||
|
|
||||||
|
public static ProdRientroMerceFragment newInstance() {
|
||||||
|
return new ProdRientroMerceFragment();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(@Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setRetainInstance(true);
|
||||||
|
|
||||||
|
mProdRientroMerceOrderListFragment = ProdRientroMerceOrderListFragment.newInstance(mToolbar);
|
||||||
|
mProdRientroMerceOrderDetailFragment = ProdRientroMerceOrderDetailFragment.newInstance();
|
||||||
|
|
||||||
|
mProdRientroMerceOrderListFragment.setOnItemSelectedRunnable(mProdRientroMerceOrderDetailFragment::setOrder);
|
||||||
|
mProdRientroMerceOrderDetailFragment.setOnMtbColtClicked(item -> {
|
||||||
|
mBindings.bottomSheetMtbColrEdit.setMtbColr(item.getMtbColr().get(0));
|
||||||
|
mBindings.bottomSheetMtbColrEdit.expand();
|
||||||
|
});
|
||||||
|
|
||||||
|
getChildFragmentManager()
|
||||||
|
.beginTransaction()
|
||||||
|
.replace(R.id.order_list_fragment, mProdRientroMerceOrderListFragment)
|
||||||
|
.replace(R.id.order_detail_fragment, mProdRientroMerceOrderDetailFragment)
|
||||||
|
.commit();
|
||||||
|
|
||||||
|
MainApplication.appComponent
|
||||||
|
.prodRientroMerceComponent()
|
||||||
|
.create()
|
||||||
|
.inject(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||||
|
@Nullable Bundle savedInstanceState) {
|
||||||
|
mBindings = DataBindingUtil.inflate(LayoutInflater.from(getActivity()), R.layout.fragment_prod_rientro_merce, container, false);
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
|
|
||||||
|
mViewModel.setListener(this);
|
||||||
|
|
||||||
|
this.initBottomSheet();
|
||||||
|
|
||||||
|
return mBindings.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
|
||||||
|
if(savedInstanceState == null) {
|
||||||
|
this.mViewModel.getOrdiniLavorazioneAperti().observe(this.getViewLifecycleOwner(), this::ordersUpdated);
|
||||||
|
|
||||||
|
mViewModel.init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreateActionBar(AppCompatTextView titleText, Context context) {
|
||||||
|
mAppBarTitle = titleText;
|
||||||
|
mAppBarTitle.setText(context.getText(R.string.rientro_merce_fragment_title).toString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||||
|
this.mOnPreDestroyList.add(onPreDestroy);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
super.onDestroyView();
|
||||||
|
|
||||||
|
for (Runnable onPreDestroy :
|
||||||
|
mOnPreDestroyList) {
|
||||||
|
onPreDestroy.run();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDataSaved() {
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ordersUpdated(List<OrdineLavorazioneDTO> ordiniLavorazioneList) {
|
||||||
|
this.mProdRientroMerceOrderListFragment.pushOrderList(ordiniLavorazioneList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||||
|
mToolbar = toolbar;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void initBottomSheet() {
|
||||||
|
mBindings.bottomSheetMtbColrEdit.setListener(this);
|
||||||
|
mBindings.bottomSheetMtbColrEdit.disableEditButton();
|
||||||
|
mBindings.bottomSheetMtbColrEdit.init(mBindings.bottomSheetMtbColrEdit, mBindings.bottomSheetMtbColrEditBackground);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMtbColrEdit(MtbColr mtbColr) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMtbColrDelete(MtbColr mtbColr) {
|
||||||
|
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
||||||
|
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
||||||
|
null,
|
||||||
|
() -> mProdRientroMerceOrderDetailFragment.deleteMtbColr(mtbColr),
|
||||||
|
() -> {}
|
||||||
|
).show(getActivity().getSupportFragmentManager(), "tag");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce;
|
||||||
|
|
||||||
|
import dagger.Module;
|
||||||
|
import dagger.Provides;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||||
|
|
||||||
|
@Module(subcomponents = ProdRientroMerceComponent.class)
|
||||||
|
public class ProdRientroMerceModule {
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
ProdRientroMerceViewModel providesProdRientroMerceViewModel(MesRESTConsumer mesRESTConsumer) {
|
||||||
|
return new ProdRientroMerceViewModel(mesRESTConsumer);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce;
|
||||||
|
|
||||||
|
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.core.rest.consumers.MesRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.gest.picking_resi.exceptions.DocumentsLoadException;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
|
|
||||||
|
public class ProdRientroMerceViewModel {
|
||||||
|
|
||||||
|
|
||||||
|
private final MutableLiveData<List<OrdineLavorazioneDTO>> mOrdiniLavorazioneAperti = new MutableLiveData<>();
|
||||||
|
|
||||||
|
private Listener mListener;
|
||||||
|
|
||||||
|
private final MesRESTConsumer mMesRESTConsumer;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public ProdRientroMerceViewModel(MesRESTConsumer mesRESTConsumer) {
|
||||||
|
this.mMesRESTConsumer = mesRESTConsumer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init() {
|
||||||
|
new Thread(this::sendOnLoadingStarted).start();
|
||||||
|
|
||||||
|
this.mMesRESTConsumer.getOrdiniLavorazione("I", null, ordiniLavorazioneList -> {
|
||||||
|
this.mOrdiniLavorazioneAperti.postValue(ordiniLavorazioneList);
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
}, ex -> this.sendError(new DocumentsLoadException(ex)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MutableLiveData<List<OrdineLavorazioneDTO>> getOrdiniLavorazioneAperti() {
|
||||||
|
return mOrdiniLavorazioneAperti;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setListener(Listener listener) {
|
||||||
|
this.mListener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void sendOnLoadingStarted() {
|
||||||
|
if (this.mListener != null) mListener.onLoadingStarted();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendOnLoadingEnded() {
|
||||||
|
if (this.mListener != null) mListener.onLoadingEnded();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendError(Exception ex) {
|
||||||
|
if (this.mListener != null) mListener.onError(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public interface Listener extends ILoadingListener {
|
||||||
|
|
||||||
|
void onDataSaved();
|
||||||
|
|
||||||
|
void onError(Exception ex);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail;
|
||||||
|
|
||||||
|
import dagger.Subcomponent;
|
||||||
|
|
||||||
|
@Subcomponent
|
||||||
|
public interface ProdRientroMerceOrderDetailComponent {
|
||||||
|
|
||||||
|
@Subcomponent.Factory
|
||||||
|
interface Factory {
|
||||||
|
ProdRientroMerceOrderDetailComponent create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void inject(ProdRientroMerceOrderDetailFragment prodRientroMerceOrderDetailFragment);
|
||||||
|
}
|
||||||
@ -0,0 +1,277 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail;
|
||||||
|
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.DtbOrdSteps;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||||
|
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderDetailBinding;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
|
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdDTO;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link ProdRientroMerceOrderDetailFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class ProdRientroMerceOrderDetailFragment extends BaseFragment implements ProdRientroMerceOrderDetailViewModel.Listener {
|
||||||
|
|
||||||
|
|
||||||
|
public final MutableLiveData<OrdineLavorazioneDTO> currentOrder = new MutableLiveData<>();
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
ArticoloRESTConsumer mArticoloRESTConsumer;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
SystemRESTConsumer mSystemRESTConsumer;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
ProdRientroMerceOrderDetailViewModel mViewModel;
|
||||||
|
|
||||||
|
private FragmentProdRientroMerceOrderDetailBinding mBindings;
|
||||||
|
private ProdRientroMerceOrderDetailMtbColtListAdapter mAdapter;
|
||||||
|
|
||||||
|
private RunnableArgs<MtbColt> onMtbColtClicked;
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderDetailFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ProdRientroMerceOrderDetailFragment newInstance() {
|
||||||
|
return new ProdRientroMerceOrderDetailFragment();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setRetainInstance(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
mBindings = DataBindingUtil.inflate(LayoutInflater.from(getActivity()), R.layout.fragment_prod_rientro_merce_order_detail, container, false);
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
|
|
||||||
|
mBindings.setView(this);
|
||||||
|
|
||||||
|
MainApplication.appComponent
|
||||||
|
.prodRientroMerceOrderDetailComponent()
|
||||||
|
.create()
|
||||||
|
.inject(this);
|
||||||
|
|
||||||
|
mViewModel.setListener(this);
|
||||||
|
|
||||||
|
this.mViewModel.mtbColtsOfOrder.observe(getViewLifecycleOwner(), this::refreshList);
|
||||||
|
|
||||||
|
this.initRecyclerView();
|
||||||
|
|
||||||
|
return mBindings.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initRecyclerView() {
|
||||||
|
mBindings.mainList.setNestedScrollingEnabled(false);
|
||||||
|
mBindings.mainList.setHasFixedSize(true);
|
||||||
|
mBindings.mainList.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
|
|
||||||
|
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(getActivity(), SimpleDividerItemDecoration.VERTICAL);
|
||||||
|
itemDecorator.setDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.divider));
|
||||||
|
mBindings.mainList.addItemDecoration(itemDecorator);
|
||||||
|
|
||||||
|
mAdapter = new ProdRientroMerceOrderDetailMtbColtListAdapter(new ObservableArrayList<>());
|
||||||
|
mAdapter.setEmptyView(mBindings.mtbColtEmptyView);
|
||||||
|
|
||||||
|
mBindings.mainList.setAdapter(mAdapter);
|
||||||
|
mAdapter.setOnItemClickListener(item -> {
|
||||||
|
if(this.onMtbColtClicked != null) this.onMtbColtClicked.run(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrder(OrdineLavorazioneDTO order) {
|
||||||
|
currentOrder.postValue(order);
|
||||||
|
mBindings.invalidateAll();
|
||||||
|
mAdapter.clearDataset();
|
||||||
|
|
||||||
|
mViewModel.setOrder(order);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void refreshList(List<MtbColt> mtbColts) {
|
||||||
|
mAdapter.updateDataset(mtbColts);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDataSaved() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void addULButtonClick() {
|
||||||
|
this.openProgress();
|
||||||
|
|
||||||
|
String codProd = this.currentOrder.getValue().getCodProd();
|
||||||
|
mArticoloRESTConsumer.getByCodMart(codProd, mtbAart -> {
|
||||||
|
|
||||||
|
String sql = "SELECT TOP 1 * " +
|
||||||
|
"FROM ( " +
|
||||||
|
" SELECT MAX(id_step) OVER ( PARTITION BY gestione, num_ord, data_ord) as last_step, " +
|
||||||
|
" * " +
|
||||||
|
" FROM dtb_ord_steps " +
|
||||||
|
" WHERE cod_jfas IS NOT NULL " +
|
||||||
|
" AND gestione = " + UtilityDB.valueToString(this.currentOrder.getValue().getGestione()) +
|
||||||
|
" AND num_ord = " + UtilityDB.valueToString(this.currentOrder.getValue().getNumOrd()) +
|
||||||
|
" AND data_ord = " + UtilityDB.valueToString(this.currentOrder.getValue().getDataOrdD()) +
|
||||||
|
" ) tmp " +
|
||||||
|
"WHERE data_iniz IS NOT NULL " +
|
||||||
|
" AND (data_fine IS NULL OR last_step = id_step) " +
|
||||||
|
"ORDER BY id_step DESC";
|
||||||
|
|
||||||
|
mSystemRESTConsumer.<List<DtbOrdSteps>>processSql(sql, new TypeToken<ArrayList<DtbOrdSteps>>() {}.getType(), dtbOrdStep -> {
|
||||||
|
|
||||||
|
this.closeProgress();
|
||||||
|
|
||||||
|
DialogInputLUProdDTO dialogInputLUProdDTO = new DialogInputLUProdDTO()
|
||||||
|
.setMtbAart(mtbAart)
|
||||||
|
.setNumCnf(this.currentOrder.getValue().getColliPedana())
|
||||||
|
.setQtaCnf(mtbAart.getQtaCnf())
|
||||||
|
.setQtaTot(this.currentOrder.getValue().getColliPedana().multiply(mtbAart.getQtaCnf()))
|
||||||
|
.setPartitaMag(this.currentOrder.getValue().getPartitaMag())
|
||||||
|
.setDataScad(this.currentOrder.getValue().getDataScadD())
|
||||||
|
.setCodJfasParent(this.currentOrder.getValue().getCodJfas())
|
||||||
|
.setCodTcol(this.currentOrder.getValue().getCodTcolUl())
|
||||||
|
.setSuggestedCodJfas(dtbOrdStep != null && dtbOrdStep.size() > 0 ? dtbOrdStep.get(0).getCodJfas() : null);
|
||||||
|
|
||||||
|
|
||||||
|
DialogInputLUProdView
|
||||||
|
.newInstance(dialogInputLUProdDTO, resultDTO -> {
|
||||||
|
ProdRientroMerceOrderDetailPickedQuantityDTO pickedQuantityDTO = new ProdRientroMerceOrderDetailPickedQuantityDTO()
|
||||||
|
.setNumCnf(resultDTO.getNumCnf())
|
||||||
|
.setPesoCollo(resultDTO.getPesoCollo())
|
||||||
|
.setPesoNetto(resultDTO.getPesoNetto())
|
||||||
|
.setTaraPed(resultDTO.getTaraPed())
|
||||||
|
.setTaraCol(resultDTO.getTaraCol())
|
||||||
|
.setPesoLordo(resultDTO.getPesoLordo())
|
||||||
|
.setMtbTCol(resultDTO.getMtbTCol())
|
||||||
|
.setJtbFasi(resultDTO.getJtbFasi());
|
||||||
|
|
||||||
|
this.mViewModel.createLU(pickedQuantityDTO);
|
||||||
|
}, () -> {
|
||||||
|
this.closeProgress();
|
||||||
|
})
|
||||||
|
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||||
|
|
||||||
|
}, this::onError);
|
||||||
|
|
||||||
|
}, this::onError);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderDetailFragment setOnMtbColtClicked(RunnableArgs<MtbColt> onMtbColtClicked) {
|
||||||
|
this.onMtbColtClicked = onMtbColtClicked;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void editMtbColr(MtbColr mtbColr) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteMtbColr(MtbColr mtbColr) {
|
||||||
|
MtbColt mtbColt = new MtbColt()
|
||||||
|
.setGestione(mtbColr.getGestione())
|
||||||
|
.setDataCollo(mtbColr.getDataColloS())
|
||||||
|
.setSerCollo(mtbColr.getSerCollo())
|
||||||
|
.setNumCollo(mtbColr.getNumCollo());
|
||||||
|
|
||||||
|
this.mViewModel.deleteLU(mtbColt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Drawable getOrderStatusIcon() {
|
||||||
|
if (currentOrder.getValue() != null) {
|
||||||
|
switch (currentOrder.getValue().getStatoEnum()) {
|
||||||
|
case IN_CORSO:
|
||||||
|
return ContextCompat.getDrawable(getActivity(), R.drawable.ic_play_circle_filled_24dp);
|
||||||
|
case PAUSA:
|
||||||
|
return ContextCompat.getDrawable(getActivity(), R.drawable.ic_pause_circle_filled_24dp);
|
||||||
|
case PROGRAMMATO:
|
||||||
|
default:
|
||||||
|
return ContextCompat.getDrawable(getActivity(), R.drawable.ic_clock_circle_outline_24dp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return ContextCompat.getDrawable(getActivity(), R.drawable.ic_clock_circle_outline_24dp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrderStatusIconTintColor() {
|
||||||
|
if (currentOrder.getValue() != null) {
|
||||||
|
switch (currentOrder.getValue().getStatoEnum()) {
|
||||||
|
case IN_CORSO:
|
||||||
|
return ContextCompat.getColor(getActivity(), R.color.green_800);
|
||||||
|
case PAUSA:
|
||||||
|
return ContextCompat.getColor(getActivity(), R.color.yellow_800);
|
||||||
|
case PROGRAMMATO:
|
||||||
|
default:
|
||||||
|
return ContextCompat.getColor(getActivity(), R.color.blue_800);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return ContextCompat.getColor(getActivity(), R.color.blue_800);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Drawable getOrderStatusLabelBackgroud() {
|
||||||
|
if (currentOrder.getValue() != null) {
|
||||||
|
switch (currentOrder.getValue().getStatoEnum()) {
|
||||||
|
case IN_CORSO:
|
||||||
|
return ContextCompat.getDrawable(getActivity(), R.drawable.label_success_text);
|
||||||
|
case PAUSA:
|
||||||
|
return ContextCompat.getDrawable(getActivity(), R.drawable.label_warning_text);
|
||||||
|
case PROGRAMMATO:
|
||||||
|
default:
|
||||||
|
return ContextCompat.getDrawable(getActivity(), R.drawable.label_primary_text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return ContextCompat.getDrawable(getActivity(), R.drawable.label_primary_text);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrderStatusLabelTextColor() {
|
||||||
|
if (currentOrder.getValue() != null) {
|
||||||
|
switch (currentOrder.getValue().getStatoEnum()) {
|
||||||
|
case IN_CORSO:
|
||||||
|
return ContextCompat.getColor(getActivity(), R.color.green_800);
|
||||||
|
case PAUSA:
|
||||||
|
return ContextCompat.getColor(getActivity(), R.color.yellow_800);
|
||||||
|
case PROGRAMMATO:
|
||||||
|
default:
|
||||||
|
return ContextCompat.getColor(getActivity(), R.color.blue_800);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return ContextCompat.getColor(getActivity(), R.color.blue_800);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail;
|
||||||
|
|
||||||
|
import dagger.Module;
|
||||||
|
import dagger.Provides;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.ProdRientroMerceOrderDetailRESTConsumer;
|
||||||
|
|
||||||
|
@Module(subcomponents = ProdRientroMerceOrderDetailComponent.class)
|
||||||
|
public class ProdRientroMerceOrderDetailModule {
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
ProdRientroMerceOrderDetailRESTConsumer provideProdRientroMerceOrderDetailRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
|
||||||
|
return new ProdRientroMerceOrderDetailRESTConsumer(systemRESTConsumer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
ProdRientroMerceOrderDetailViewModel provideProdRientroMerceOrderDetailViewModel(
|
||||||
|
ProdRientroMerceOrderDetailRESTConsumer prodRientroMerceOrderDetailRESTConsumer,
|
||||||
|
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer) {
|
||||||
|
return new ProdRientroMerceOrderDetailViewModel(prodRientroMerceOrderDetailRESTConsumer, colliMagazzinoRESTConsumer);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,89 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.view.ExtendedRecyclerView;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderDetailMtbColtItemModelBinding;
|
||||||
|
|
||||||
|
public class ProdRientroMerceOrderDetailMtbColtListAdapter extends ExtendedRecyclerView<MtbColt, ProdRientroMerceOrderDetailMtbColtListAdapter.ViewHolder> {
|
||||||
|
|
||||||
|
private OnItemClickListener mOnItemClickListener;
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderDetailMtbColtListAdapter(ObservableArrayList<MtbColt> myDataset) {
|
||||||
|
super(myDataset);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
protected FragmentProdRientroMerceOrderDetailMtbColtItemModelBinding mViewDataBinding;
|
||||||
|
|
||||||
|
|
||||||
|
public ViewHolder(FragmentProdRientroMerceOrderDetailMtbColtItemModelBinding v) {
|
||||||
|
super(v.getRoot());
|
||||||
|
mViewDataBinding = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void bind(MtbColt mtbColt) {
|
||||||
|
mViewDataBinding.setMtbColt(mtbColt);
|
||||||
|
mViewDataBinding.executePendingBindings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProdRientroMerceOrderDetailMtbColtListAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
// create a new view
|
||||||
|
FragmentProdRientroMerceOrderDetailMtbColtItemModelBinding viewDataBinding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.fragment_prod_rientro_merce_order_detail__mtb_colt_item_model, parent, false);
|
||||||
|
|
||||||
|
return new ProdRientroMerceOrderDetailMtbColtListAdapter.ViewHolder(viewDataBinding);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(ProdRientroMerceOrderDetailMtbColtListAdapter.ViewHolder holder, int position) {
|
||||||
|
MtbColt mtbColt = mDataset.get(position);
|
||||||
|
holder.bind(mtbColt);
|
||||||
|
|
||||||
|
//Setting qty with unt_mis
|
||||||
|
// if(!SettingsManager.iDB().isFlagForceAllToColli() && (mtbColr.getMtbAart() == null || mtbColr.getMtbAart().isFlagQtaCnfFissaBoolean())){
|
||||||
|
// String text = UtilityNumber.decimalToString(mtbColr.getQtaCol());
|
||||||
|
//
|
||||||
|
// if(mtbColr.getMtbAart() != null) {
|
||||||
|
// text += !UtilityString.isNullOrEmpty(mtbColr.getMtbAart().getUntMis()) ? "\n" + mtbColr.getMtbAart().getUntMis() : "";
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// holder.mViewDataBinding.qtaTextview.setText(text);
|
||||||
|
// } else {
|
||||||
|
// holder.mViewDataBinding.qtaTextview.setText(UtilityNumber.decimalToString(mtbColr.getNumCnf()) + "\n" + UtilityResources.getString(R.string.unt_mis_col));
|
||||||
|
// }
|
||||||
|
|
||||||
|
holder.mViewDataBinding.getRoot().setOnClickListener(x -> {
|
||||||
|
if(mOnItemClickListener != null) {
|
||||||
|
mOnItemClickListener.onItemClick(holder.mViewDataBinding.getMtbColt());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.mViewDataBinding.executePendingBindings();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderDetailMtbColtListAdapter setOnItemClickListener(ProdRientroMerceOrderDetailMtbColtListAdapter.OnItemClickListener onItemClickListener) {
|
||||||
|
this.mOnItemClickListener = onItemClickListener;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnItemClickListener {
|
||||||
|
void onItemClick(MtbColt item);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.JtbFasi;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||||
|
|
||||||
|
public class ProdRientroMerceOrderDetailPickedQuantityDTO {
|
||||||
|
|
||||||
|
private BigDecimal numCnf;
|
||||||
|
private BigDecimal pesoCollo;
|
||||||
|
private BigDecimal pesoNetto;
|
||||||
|
private BigDecimal taraPed;
|
||||||
|
private BigDecimal taraCol;
|
||||||
|
private BigDecimal pesoLordo;
|
||||||
|
|
||||||
|
private MtbTCol mtbTCol;
|
||||||
|
private JtbFasi jtbFasi;
|
||||||
|
|
||||||
|
public BigDecimal getNumCnf() {
|
||||||
|
return numCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderDetailPickedQuantityDTO setNumCnf(BigDecimal numCnf) {
|
||||||
|
this.numCnf = numCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoCollo() {
|
||||||
|
return pesoCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderDetailPickedQuantityDTO setPesoCollo(BigDecimal pesoCollo) {
|
||||||
|
this.pesoCollo = pesoCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoNetto() {
|
||||||
|
return pesoNetto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderDetailPickedQuantityDTO setPesoNetto(BigDecimal pesoNetto) {
|
||||||
|
this.pesoNetto = pesoNetto;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTaraPed() {
|
||||||
|
return taraPed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderDetailPickedQuantityDTO setTaraPed(BigDecimal taraPed) {
|
||||||
|
this.taraPed = taraPed;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTaraCol() {
|
||||||
|
return taraCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderDetailPickedQuantityDTO setTaraCol(BigDecimal taraCol) {
|
||||||
|
this.taraCol = taraCol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoLordo() {
|
||||||
|
return pesoLordo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderDetailPickedQuantityDTO setPesoLordo(BigDecimal pesoLordo) {
|
||||||
|
this.pesoLordo = pesoLordo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbTCol getMtbTCol() {
|
||||||
|
return mtbTCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderDetailPickedQuantityDTO setMtbTCol(MtbTCol mtbTCol) {
|
||||||
|
this.mtbTCol = mtbTCol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JtbFasi getJtbFasi() {
|
||||||
|
return jtbFasi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderDetailPickedQuantityDTO setJtbFasi(JtbFasi jtbFasi) {
|
||||||
|
this.jtbFasi = jtbFasi;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,144 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail;
|
||||||
|
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import com.annimon.stream.Optional;
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.ProdRientroMerceOrderDetailRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto.ImportColliDaProduzioneRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
|
|
||||||
|
public class ProdRientroMerceOrderDetailViewModel {
|
||||||
|
|
||||||
|
public MutableLiveData<List<MtbColt>> mtbColtsOfOrder = new MutableLiveData<>();
|
||||||
|
private OrdineLavorazioneDTO currentOrder;
|
||||||
|
|
||||||
|
private final ProdRientroMerceOrderDetailRESTConsumer mProdRientroMerceOrderDetailRESTConsumer;
|
||||||
|
private final ColliMagazzinoRESTConsumer mColliMagazzinoRESTConsumer;
|
||||||
|
|
||||||
|
private Listener mListener;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public ProdRientroMerceOrderDetailViewModel(ProdRientroMerceOrderDetailRESTConsumer prodRientroMerceOrderDetailRESTConsumer,
|
||||||
|
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer) {
|
||||||
|
this.mProdRientroMerceOrderDetailRESTConsumer = prodRientroMerceOrderDetailRESTConsumer;
|
||||||
|
this.mColliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrder(OrdineLavorazioneDTO order) {
|
||||||
|
this.currentOrder = order;
|
||||||
|
|
||||||
|
refreshMtbColts();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void refreshMtbColts() {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
this.mtbColtsOfOrder.postValue(null);
|
||||||
|
|
||||||
|
this.mProdRientroMerceOrderDetailRESTConsumer.getMtbColtsOfOrder(currentOrder, mtbColts -> {
|
||||||
|
for (MtbColt mtbColt : mtbColts) {
|
||||||
|
mtbColt.getMtbColr().get(0).setDescrizione(currentOrder.getDescrizioneProd());
|
||||||
|
}
|
||||||
|
|
||||||
|
this.mtbColtsOfOrder.postValue(mtbColts);
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createLU(ProdRientroMerceOrderDetailPickedQuantityDTO pickedQuantityDTO) {
|
||||||
|
|
||||||
|
new Thread(this::sendOnLoadingStarted).start();
|
||||||
|
|
||||||
|
new Thread(() -> {
|
||||||
|
|
||||||
|
ImportColliDaProduzioneRequestDTO importColliDaProduzioneRequestDTO =
|
||||||
|
new ImportColliDaProduzioneRequestDTO()
|
||||||
|
.setColliBancale(pickedQuantityDTO.getNumCnf().intValue())
|
||||||
|
.setQtaCnf(pickedQuantityDTO.getPesoCollo())
|
||||||
|
.setQtaCol(pickedQuantityDTO.getPesoNetto())
|
||||||
|
.setCodJcom(currentOrder.getCodJcom())
|
||||||
|
.setCodJfas(pickedQuantityDTO.getJtbFasi().getCodJfas())
|
||||||
|
.setCodMart(currentOrder.getCodProd())
|
||||||
|
.setCodTcol(pickedQuantityDTO.getMtbTCol().getCodTcol())
|
||||||
|
.setDataCollo(new Date())
|
||||||
|
.setDataOrd(currentOrder.getDataOrdD())
|
||||||
|
.setNumOrd(currentOrder.getNumOrd())
|
||||||
|
.setGestione(currentOrder.getGestione())
|
||||||
|
.setPartitaMag(currentOrder.getPartitaMag())
|
||||||
|
.setFornitore(currentOrder.getRagSocAnag())
|
||||||
|
.setPesoLordo(pickedQuantityDTO.getPesoLordo())
|
||||||
|
.setPesoNetto(pickedQuantityDTO.getPesoNetto());
|
||||||
|
|
||||||
|
this.mProdRientroMerceOrderDetailRESTConsumer.importColloDaProduzione(importColliDaProduzioneRequestDTO, mtbColtSaved -> {
|
||||||
|
|
||||||
|
synchronized (this.mtbColtsOfOrder) {
|
||||||
|
refreshMtbColts();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
}, this::sendError);
|
||||||
|
|
||||||
|
|
||||||
|
}).start();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteLU(MtbColt mtbColt) {
|
||||||
|
new Thread(this::sendOnLoadingStarted).start();
|
||||||
|
|
||||||
|
new Thread(() -> {
|
||||||
|
this.mProdRientroMerceOrderDetailRESTConsumer.deleteColloDaProduzione(mtbColt, () -> {
|
||||||
|
synchronized (this.mtbColtsOfOrder) {
|
||||||
|
Optional<MtbColt> mtbColtToRemove = Stream.of(this.mtbColtsOfOrder.getValue())
|
||||||
|
.filter(x -> x.getNumCollo().equals(mtbColt.getNumCollo()) &&
|
||||||
|
x.getSerCollo().equalsIgnoreCase(mtbColt.getSerCollo()) &&
|
||||||
|
x.getDataColloD().compareTo(mtbColt.getDataColloD()) == 0 &&
|
||||||
|
x.getGestione().equalsIgnoreCase(mtbColt.getGestione()))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
if (mtbColtToRemove.isPresent()) {
|
||||||
|
this.mtbColtsOfOrder.getValue().remove(mtbColtToRemove.get());
|
||||||
|
this.mtbColtsOfOrder.postValue(this.mtbColtsOfOrder.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
}, this::sendError);
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setListener(Listener listener) {
|
||||||
|
this.mListener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void sendOnLoadingStarted() {
|
||||||
|
if (this.mListener != null) mListener.onLoadingStarted();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendOnLoadingEnded() {
|
||||||
|
if (this.mListener != null) mListener.onLoadingEnded();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendError(Exception ex) {
|
||||||
|
if (this.mListener != null) mListener.onError(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Listener extends ILoadingListener {
|
||||||
|
|
||||||
|
void onDataSaved();
|
||||||
|
|
||||||
|
void onError(Exception ex);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,155 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest;
|
||||||
|
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.orhanobut.logger.Logger;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
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.SystemRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto.ImportColliDaProduzioneRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class ProdRientroMerceOrderDetailRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
|
private final SystemRESTConsumer systemRESTConsumer;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public ProdRientroMerceOrderDetailRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
|
||||||
|
this.systemRESTConsumer = systemRESTConsumer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void getMtbColtsOfOrder(OrdineLavorazioneDTO ordineLavorazioneDTO, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
String sql = "SELECT mtb_colr.* " +
|
||||||
|
" FROM mtb_colr " +
|
||||||
|
" INNER JOIN mtb_colt mc ON mtb_colr.gestione = mc.gestione AND mtb_colr.data_collo = mc.data_collo AND " +
|
||||||
|
" mtb_colr.ser_collo = mc.ser_collo AND mtb_colr.num_collo = mc.num_collo " +
|
||||||
|
" WHERE " +
|
||||||
|
" mtb_colr.num_ord = " + UtilityDB.valueToString(ordineLavorazioneDTO.getNumOrd()) + " AND" +
|
||||||
|
" mtb_colr.data_ord = " + UtilityDB.valueToString(ordineLavorazioneDTO.getDataOrdD()) + " AND" +
|
||||||
|
" mtb_colr.gestione = 'L' AND" +
|
||||||
|
" mc.segno = 1";
|
||||||
|
|
||||||
|
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColr>>() {
|
||||||
|
}.getType();
|
||||||
|
systemRESTConsumer.<List<MtbColr>>processSql(sql, typeOfObjectsList, mtbColrList -> {
|
||||||
|
|
||||||
|
|
||||||
|
if (mtbColrList != null && !mtbColrList.isEmpty()) {
|
||||||
|
|
||||||
|
List<HashMap<String, Object>> params = new ArrayList<>();
|
||||||
|
|
||||||
|
for (MtbColr mtbcolr :
|
||||||
|
mtbColrList) {
|
||||||
|
HashMap<String, Object> parm = new HashMap<>();
|
||||||
|
|
||||||
|
parm.put("data_collo", mtbcolr.getDataColloD());
|
||||||
|
parm.put("gestione", mtbcolr.getGestione());
|
||||||
|
parm.put("ser_collo", mtbcolr.getSerCollo());
|
||||||
|
parm.put("num_collo", mtbcolr.getNumCollo());
|
||||||
|
|
||||||
|
params.add(parm);
|
||||||
|
}
|
||||||
|
|
||||||
|
String mtbColtSql = "SELECT * FROM mtb_colt WHERE " + UtilityQuery.concatFieldListInWhereCond(params) + "";
|
||||||
|
|
||||||
|
|
||||||
|
Type mtbColtTypeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {
|
||||||
|
}.getType();
|
||||||
|
systemRESTConsumer.<List<MtbColt>>processSql(mtbColtSql, mtbColtTypeOfObjectsList, mtbColtList -> {
|
||||||
|
|
||||||
|
if(mtbColtList == null) mtbColtList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (MtbColt mtbColt : mtbColtList) {
|
||||||
|
|
||||||
|
ObservableArrayList<MtbColr> mtbColrsRoAdd = new ObservableArrayList<>();
|
||||||
|
mtbColrsRoAdd.addAll(Stream.of(mtbColrList)
|
||||||
|
.filter(x -> x.getNumCollo().equals(mtbColt.getNumCollo()) &&
|
||||||
|
x.getDataColloD().compareTo(mtbColt.getDataColloD()) == 0 &&
|
||||||
|
x.getGestione().equals(mtbColt.getGestione()) &&
|
||||||
|
x.getSerCollo().equals(mtbColt.getSerCollo()))
|
||||||
|
.toList());
|
||||||
|
|
||||||
|
mtbColt.setMtbColr(mtbColrsRoAdd);
|
||||||
|
}
|
||||||
|
|
||||||
|
onComplete.run(mtbColtList);
|
||||||
|
|
||||||
|
}, onFailed);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
onComplete.run(new ArrayList<>());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void importColloDaProduzione(ImportColliDaProduzioneRequestDTO importColliDaProduzioneRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
ProdRientroMerceOrderDetailRESTConsumerService service = RESTBuilder.getService(ProdRientroMerceOrderDetailRESTConsumerService.class);
|
||||||
|
service.importColloDaProduzione(importColliDaProduzioneRequestDTO).enqueue(new Callback<ServiceRESTResponse<MtbColt>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
|
||||||
|
analyzeAnswer(response, "importColliDaProduzione", mtbColt -> {
|
||||||
|
onComplete.run(mtbColt);
|
||||||
|
}, ex -> {
|
||||||
|
if(onFailed != null) onFailed.run(ex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<MtbColt>> call, Throwable t) {
|
||||||
|
Logger.e(t, "importColliDaProduzione");
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void deleteColloDaProduzione(MtbColt mtbColtToDelete, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ProdRientroMerceOrderDetailRESTConsumerService service = RESTBuilder.getService(ProdRientroMerceOrderDetailRESTConsumerService.class);
|
||||||
|
service.deleteColloDaProduzione(mtbColtToDelete).enqueue(new Callback<ServiceRESTResponse<Object>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||||
|
analyzeAnswer(response, "deleteColloDaProduzione", mtbColt -> {
|
||||||
|
onComplete.run();
|
||||||
|
}, ex -> {
|
||||||
|
if(onFailed != null) onFailed.run(ex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
|
||||||
|
Logger.e(t, "deleteColloDaProduzione");
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto.ImportColliDaProduzioneRequestDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface ProdRientroMerceOrderDetailRESTConsumerService {
|
||||||
|
|
||||||
|
|
||||||
|
@POST("importColliDaProduzioneJson")
|
||||||
|
Call<ServiceRESTResponse<MtbColt>> importColliDaProduzione(@Body List<ImportColliDaProduzioneRequestDTO> importColliDaProduzioneRequestDTO);
|
||||||
|
|
||||||
|
@POST("importColloDaProduzioneJson")
|
||||||
|
Call<ServiceRESTResponse<MtbColt>> importColloDaProduzione(@Body ImportColliDaProduzioneRequestDTO importColloDaProduzioneRequestDTO);
|
||||||
|
|
||||||
|
@POST("cancellaColloDaProduzione")
|
||||||
|
Call<ServiceRESTResponse<Object>> deleteColloDaProduzione(@Body MtbColt mtbColtToDelete);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,190 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.rest.dto;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class ImportColliDaProduzioneRequestDTO {
|
||||||
|
|
||||||
|
private String codMart;
|
||||||
|
private String codJcom;
|
||||||
|
private String partitaMag;
|
||||||
|
private BigDecimal pesoLordo;
|
||||||
|
private BigDecimal pesoNetto;
|
||||||
|
private String codTcol;
|
||||||
|
private String fornitore;
|
||||||
|
|
||||||
|
private int colliBancale;
|
||||||
|
private BigDecimal qtaCnf;
|
||||||
|
private Date dataCollo;
|
||||||
|
|
||||||
|
private Date dataOrd;
|
||||||
|
private int numOrd;
|
||||||
|
private String codJfas;
|
||||||
|
private String gestione;
|
||||||
|
private BigDecimal qtaCol;
|
||||||
|
private Integer rigaOrd;
|
||||||
|
private Integer numRisorse;
|
||||||
|
private String annotazioni;
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJcom() {
|
||||||
|
return codJcom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setCodJcom(String codJcom) {
|
||||||
|
this.codJcom = codJcom;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoLordo() {
|
||||||
|
return pesoLordo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setPesoLordo(BigDecimal pesoLordo) {
|
||||||
|
this.pesoLordo = pesoLordo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoNetto() {
|
||||||
|
return pesoNetto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setPesoNetto(BigDecimal pesoNetto) {
|
||||||
|
this.pesoNetto = pesoNetto;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodTcol() {
|
||||||
|
return codTcol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setCodTcol(String codTcol) {
|
||||||
|
this.codTcol = codTcol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFornitore() {
|
||||||
|
return fornitore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setFornitore(String fornitore) {
|
||||||
|
this.fornitore = fornitore;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getColliBancale() {
|
||||||
|
return colliBancale;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setColliBancale(int colliBancale) {
|
||||||
|
this.colliBancale = colliBancale;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnf() {
|
||||||
|
return qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setQtaCnf(BigDecimal qtaCnf) {
|
||||||
|
this.qtaCnf = qtaCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDataCollo() {
|
||||||
|
return dataCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setDataCollo(Date dataCollo) {
|
||||||
|
this.dataCollo = dataCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDataOrd() {
|
||||||
|
return dataOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setDataOrd(Date dataOrd) {
|
||||||
|
this.dataOrd = dataOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNumOrd() {
|
||||||
|
return numOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setNumOrd(int numOrd) {
|
||||||
|
this.numOrd = numOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJfas() {
|
||||||
|
return codJfas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setCodJfas(String codJfas) {
|
||||||
|
this.codJfas = codJfas;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGestione() {
|
||||||
|
return gestione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setGestione(String gestione) {
|
||||||
|
this.gestione = gestione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCol() {
|
||||||
|
return qtaCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setQtaCol(BigDecimal qtaCol) {
|
||||||
|
this.qtaCol = qtaCol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRigaOrd() {
|
||||||
|
return rigaOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setRigaOrd(Integer rigaOrd) {
|
||||||
|
this.rigaOrd = rigaOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumRisorse() {
|
||||||
|
return numRisorse;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setNumRisorse(Integer numRisorse) {
|
||||||
|
this.numRisorse = numRisorse;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAnnotazioni() {
|
||||||
|
return annotazioni;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImportColliDaProduzioneRequestDTO setAnnotazioni(String annotazioni) {
|
||||||
|
this.annotazioni = annotazioni;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,197 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_list;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.text.Html;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
import androidx.databinding.ObservableList;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.zhukic.sectionedrecyclerview.SectionedRecyclerViewAdapter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.OnSingleClickListener;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderListListGroupModelBinding;
|
||||||
|
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderListListModelBinding;
|
||||||
|
|
||||||
|
public class ProdRientroMerceOrderListAdapter extends SectionedRecyclerViewAdapter<ProdRientroMerceOrderListAdapter.SubheaderHolder, ProdRientroMerceOrderListAdapter.SingleItemViewHolder> {
|
||||||
|
|
||||||
|
private final Context mContext;
|
||||||
|
private final List<ProdRientroMerceOrderListModel> mDataset = new ArrayList<>();
|
||||||
|
private View mEmptyView;
|
||||||
|
|
||||||
|
private RunnableArgs<String> mOnGroupItemClicked;
|
||||||
|
private RunnableArgs<ProdRientroMerceOrderListModel> mOnItemChecked;
|
||||||
|
|
||||||
|
static class SubheaderHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
FragmentProdRientroMerceOrderListListModelBinding mBinding;
|
||||||
|
|
||||||
|
SubheaderHolder(FragmentProdRientroMerceOrderListListModelBinding binding) {
|
||||||
|
super(binding.getRoot());
|
||||||
|
this.mBinding = binding;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static class SingleItemViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
FragmentProdRientroMerceOrderListListGroupModelBinding mBinding;
|
||||||
|
|
||||||
|
SingleItemViewHolder(FragmentProdRientroMerceOrderListListGroupModelBinding binding) {
|
||||||
|
super(binding.getRoot());
|
||||||
|
this.mBinding = binding;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListAdapter(Context context, ObservableArrayList<ProdRientroMerceOrderListModel> mutableDataSet) {
|
||||||
|
this.mContext = context;
|
||||||
|
|
||||||
|
mutableDataSet.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void onChanged(ObservableList sender) {
|
||||||
|
mDataset.clear();
|
||||||
|
mDataset.addAll(sender);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
notifyDataChanged();
|
||||||
|
checkIfEmpty();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListAdapter setOnGroupItemClicked(RunnableArgs<String> onGroupItemClicked) {
|
||||||
|
this.mOnGroupItemClicked = onGroupItemClicked;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListAdapter setOnItemChecked(RunnableArgs<ProdRientroMerceOrderListModel> onItemChecked) {
|
||||||
|
this.mOnItemChecked = onItemChecked;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListAdapter setEmptyView(View emptyView) {
|
||||||
|
this.mEmptyView = emptyView;
|
||||||
|
this.checkIfEmpty();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkIfEmpty() {
|
||||||
|
if (mEmptyView != null) {
|
||||||
|
final boolean emptyViewVisible = getItemCount() == 0;
|
||||||
|
mEmptyView.setVisibility(emptyViewVisible ? View.VISIBLE : View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProdRientroMerceOrderListAdapter.SubheaderHolder onCreateSubheaderViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
FragmentProdRientroMerceOrderListListModelBinding binding = DataBindingUtil.inflate(LayoutInflater.from(mContext), R.layout.fragment_prod_rientro_merce_order_list__list_model, parent, false);
|
||||||
|
return new ProdRientroMerceOrderListAdapter.SubheaderHolder(binding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProdRientroMerceOrderListAdapter.SingleItemViewHolder onCreateItemViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
FragmentProdRientroMerceOrderListListGroupModelBinding binding = DataBindingUtil.inflate(LayoutInflater.from(mContext), R.layout.fragment_prod_rientro_merce_order_list__list_group_model, parent, false);
|
||||||
|
return new ProdRientroMerceOrderListAdapter.SingleItemViewHolder(binding);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindSubheaderViewHolder(ProdRientroMerceOrderListAdapter.SubheaderHolder subheaderHolder, int nextItemPosition) {
|
||||||
|
ProdRientroMerceOrderListModel 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 ProdRientroMerceOrderListAdapter.SingleItemViewHolder holder, final int position) {
|
||||||
|
ProdRientroMerceOrderListModel listModel = this.mDataset.get(position);
|
||||||
|
|
||||||
|
switch (listModel.getIcon()) {
|
||||||
|
case START:
|
||||||
|
holder.mBinding.ordineStateIcon.setImageResource(R.drawable.ic_play_circle_filled_24dp);
|
||||||
|
holder.mBinding.ordineStateIcon.setColorFilter(ContextCompat.getColor(mContext, R.color.green_800), android.graphics.PorterDuff.Mode.SRC_IN);
|
||||||
|
break;
|
||||||
|
case PAUSE:
|
||||||
|
holder.mBinding.ordineStateIcon.setImageResource(R.drawable.ic_pause_circle_filled_24dp);
|
||||||
|
holder.mBinding.ordineStateIcon.setColorFilter(ContextCompat.getColor(mContext, R.color.yellow_800), android.graphics.PorterDuff.Mode.SRC_IN);
|
||||||
|
break;
|
||||||
|
case SCHEDULED:
|
||||||
|
default:
|
||||||
|
holder.mBinding.ordineStateIcon.setImageResource(R.drawable.ic_clock_circle_outline_24dp);
|
||||||
|
holder.mBinding.ordineStateIcon.setColorFilter(ContextCompat.getColor(mContext, R.color.blue_700), android.graphics.PorterDuff.Mode.SRC_IN);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!UtilityString.isNullOrEmpty(listModel.getPreDescription())) {
|
||||||
|
holder.mBinding.preFirstRow.setText(Html.fromHtml(listModel.getPreDescription()));
|
||||||
|
holder.mBinding.preFirstRow.setVisibility(View.VISIBLE);
|
||||||
|
} else holder.mBinding.preFirstRow.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
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.executePendingBindings();
|
||||||
|
|
||||||
|
holder.mBinding.getRoot().setOnClickListener(v -> {
|
||||||
|
if (this.mOnItemChecked != null) this.mOnItemChecked.run(listModel);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onPlaceSubheaderBetweenItems(int position) {
|
||||||
|
|
||||||
|
if (getItemSize() == 1) return true;
|
||||||
|
else if (getItemSize() > 1) {
|
||||||
|
ProdRientroMerceOrderListModel compare1 = this.mDataset.get(position);
|
||||||
|
ProdRientroMerceOrderListModel compare2 = this.mDataset.get(position + 1);
|
||||||
|
|
||||||
|
if (UtilityString.equalsIgnoreCase(compare1.getGroupTitle(), compare2.getGroupTitle())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemSize() {
|
||||||
|
return mDataset.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,167 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_list;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.annimon.stream.ComparatorCompat;
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.databinding.FragmentProdRientroMerceOrderListBinding;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
|
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||||
|
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link ProdRientroMerceOrderListFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class ProdRientroMerceOrderListFragment extends Fragment {
|
||||||
|
|
||||||
|
private final ObservableArrayList<ProdRientroMerceOrderListModel> mOrdiniApertiMutableData = new ObservableArrayList<>();
|
||||||
|
|
||||||
|
private FragmentProdRientroMerceOrderListBinding mBindings = null;
|
||||||
|
|
||||||
|
private RunnableArgs<OrdineLavorazioneDTO> mOnItemSelectedRunnable;
|
||||||
|
|
||||||
|
private ElevatedToolbar mToolbar;
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ProdRientroMerceOrderListFragment newInstance(ElevatedToolbar elevatedToolbar) {
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
|
||||||
|
args.putString("toolbarInstance", DataCache.addItem(elevatedToolbar));
|
||||||
|
final ProdRientroMerceOrderListFragment prodRientroMerceOrderListFragment = new ProdRientroMerceOrderListFragment();
|
||||||
|
prodRientroMerceOrderListFragment.setArguments(args);
|
||||||
|
return prodRientroMerceOrderListFragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setRetainInstance(true);
|
||||||
|
|
||||||
|
mToolbar = DataCache.retrieveItem(getArguments().getString("toolbarInstance"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
mBindings = DataBindingUtil.inflate(inflater, R.layout.fragment_prod_rientro_merce_order_list, container, false);
|
||||||
|
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
|
|
||||||
|
if(savedInstanceState == null) this.initRecyclerView();
|
||||||
|
|
||||||
|
return mBindings.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initRecyclerView() {
|
||||||
|
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(getActivity(), SimpleDividerItemDecoration.VERTICAL);
|
||||||
|
itemDecorator.setDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.divider));
|
||||||
|
this.mBindings.mainList.addItemDecoration(itemDecorator);
|
||||||
|
|
||||||
|
|
||||||
|
ProdRientroMerceOrderListAdapter prodRientroMerceOrderListAdapter = new ProdRientroMerceOrderListAdapter(getActivity(), mOrdiniApertiMutableData)
|
||||||
|
.setEmptyView(this.mBindings.emptyView)
|
||||||
|
.setOnItemChecked(x -> {
|
||||||
|
if(mOnItemSelectedRunnable != null) mOnItemSelectedRunnable.run(x.getOriginalModel());
|
||||||
|
});
|
||||||
|
|
||||||
|
this.mBindings.mainList.setAdapter(prodRientroMerceOrderListAdapter);
|
||||||
|
this.mBindings.mainList.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
|
|
||||||
|
this.mToolbar.setRecyclerView(mBindings.mainList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void pushOrderList(List<OrdineLavorazioneDTO> orderList) {
|
||||||
|
this.mOrdiniApertiMutableData.clear();
|
||||||
|
this.mOrdiniApertiMutableData.addAll(convertDataModelToListModel(orderList));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private List<ProdRientroMerceOrderListModel> convertDataModelToListModel(List<OrdineLavorazioneDTO> dataList) {
|
||||||
|
|
||||||
|
ComparatorCompat<OrdineLavorazioneDTO> comparator = ComparatorCompat
|
||||||
|
.comparing(OrdineLavorazioneDTO::getCodJfas)
|
||||||
|
.thenComparing(ComparatorCompat.comparing(ordineLavorazioneDTO -> ordineLavorazioneDTO.getDataInizProd() != null ? ordineLavorazioneDTO.getDataInizProd() : "zzzzzzzz"))
|
||||||
|
.thenComparing(ComparatorCompat.comparing(OrdineLavorazioneDTO::getNumOrd));
|
||||||
|
|
||||||
|
if(dataList == null) return new ArrayList<>();
|
||||||
|
|
||||||
|
List<ProdRientroMerceOrderListModel> notHiddenElements = Stream.of(dataList)
|
||||||
|
.sorted(comparator)
|
||||||
|
.map(x -> {
|
||||||
|
ProdRientroMerceOrderListModel listModel = new ProdRientroMerceOrderListModel();
|
||||||
|
|
||||||
|
switch (x.getStatoEnum()) {
|
||||||
|
case IN_CORSO:
|
||||||
|
listModel.setIcon(ProdRientroMerceOrderListModel.StatoIconEnum.START);
|
||||||
|
break;
|
||||||
|
case PAUSA:
|
||||||
|
listModel.setIcon(ProdRientroMerceOrderListModel.StatoIconEnum.PAUSE);
|
||||||
|
break;
|
||||||
|
case PROGRAMMATO:
|
||||||
|
default:
|
||||||
|
listModel.setIcon(ProdRientroMerceOrderListModel.StatoIconEnum.SCHEDULED);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
listModel.setGroupTitle(x.getCodJfas());
|
||||||
|
|
||||||
|
if(!UtilityString.isNullOrEmpty(x.getRagSocAnag()))
|
||||||
|
listModel.setPreDescription("Provenienza: " + x.getRagSocAnag());
|
||||||
|
|
||||||
|
String testataOrdString = "N° " + x.getNumOrd();
|
||||||
|
listModel.setDescription(testataOrdString);
|
||||||
|
|
||||||
|
listModel.setSubDescription(x.getDescrizioneProd());
|
||||||
|
|
||||||
|
listModel.setRightDescription(x.getCodJcom() != null ? (x.getDescCommessa() + " (" + x.getCodJcom() + ")") : "");
|
||||||
|
|
||||||
|
try {
|
||||||
|
listModel.setRightSubDescription(UtilityDate.formatDate(x.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
|
} catch (Exception ex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
listModel.setOriginalModel(x);
|
||||||
|
|
||||||
|
return listModel;
|
||||||
|
})
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
return notHiddenElements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListFragment setOnItemSelectedRunnable(RunnableArgs<OrdineLavorazioneDTO> onItemSelectedRunnable) {
|
||||||
|
this.mOnItemSelectedRunnable = onItemSelectedRunnable;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RecyclerView getList() {
|
||||||
|
return mBindings.mainList;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,108 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_rientro_merce.order_list;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||||
|
|
||||||
|
public class ProdRientroMerceOrderListModel implements Cloneable {
|
||||||
|
private String groupTitle;
|
||||||
|
|
||||||
|
private StatoIconEnum icon;
|
||||||
|
private String preDescription;
|
||||||
|
private String description;
|
||||||
|
private String subDescription;
|
||||||
|
private String rightDescription;
|
||||||
|
private String rightSubDescription;
|
||||||
|
|
||||||
|
private boolean hidden;
|
||||||
|
|
||||||
|
|
||||||
|
private OrdineLavorazioneDTO originalModel;
|
||||||
|
|
||||||
|
|
||||||
|
public String getGroupTitle() {
|
||||||
|
return groupTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListModel setGroupTitle(String groupTitle) {
|
||||||
|
this.groupTitle = groupTitle;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StatoIconEnum getIcon() {
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListModel setIcon(StatoIconEnum icon) {
|
||||||
|
this.icon = icon;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPreDescription() {
|
||||||
|
return preDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListModel setPreDescription(String preDescription) {
|
||||||
|
this.preDescription = preDescription;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListModel setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubDescription() {
|
||||||
|
return subDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListModel setSubDescription(String subDescription) {
|
||||||
|
this.subDescription = subDescription;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightDescription() {
|
||||||
|
return rightDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListModel setRightDescription(String rightDescription) {
|
||||||
|
this.rightDescription = rightDescription;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightSubDescription() {
|
||||||
|
return rightSubDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListModel setRightSubDescription(String rightSubDescription) {
|
||||||
|
this.rightSubDescription = rightSubDescription;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isHidden() {
|
||||||
|
return hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListModel setHidden(boolean hidden) {
|
||||||
|
this.hidden = hidden;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrdineLavorazioneDTO getOriginalModel() {
|
||||||
|
return originalModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProdRientroMerceOrderListModel setOriginalModel(OrdineLavorazioneDTO originalModel) {
|
||||||
|
this.originalModel = originalModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static enum StatoIconEnum {
|
||||||
|
PAUSE,
|
||||||
|
START,
|
||||||
|
SCHEDULED
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -152,7 +152,7 @@ public class ChooseOrdsLavFromListAdapter extends RecyclerView.Adapter<ChooseOrd
|
|||||||
|
|
||||||
OrdineLavorazioneDTO ordine = checkableOrdineLavoro.getItem().getOrdineLav();
|
OrdineLavorazioneDTO ordine = checkableOrdineLavoro.getItem().getOrdineLav();
|
||||||
|
|
||||||
checkableOrdineLavoro.setTestata(UtilityString.formatHtmlStringFromResId(R.string.ord_testata, String.valueOf(ordine.getNumOrd()), UtilityDate.formatDate(ordine.getDateOrd(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)).toString());
|
checkableOrdineLavoro.setTestata(UtilityString.formatHtmlStringFromResId(R.string.ord_testata, String.valueOf(ordine.getNumOrd()), UtilityDate.formatDate(ordine.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)).toString());
|
||||||
|
|
||||||
checkableOrdineLavoro.getChecked().resetOnPropertyChangedCallback();
|
checkableOrdineLavoro.getChecked().resetOnPropertyChangedCallback();
|
||||||
checkableOrdineLavoro.getChecked().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
checkableOrdineLavoro.getChecked().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
|
|||||||
@ -1,12 +1,9 @@
|
|||||||
package it.integry.integrywmsnative.gest.prod_versamento_materiale.dto;
|
package it.integry.integrywmsnative.gest.prod_versamento_materiale.dto;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.ParseException;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.di.BindableFloat;
|
import it.integry.integrywmsnative.core.di.BindableFloat;
|
||||||
import it.integry.integrywmsnative.core.exception.DateNotRecognizedException;
|
|
||||||
import it.integry.integrywmsnative.core.exception.TimeNotRecognizedException;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
|
||||||
public class OrdineLavorazioneDTO {
|
public class OrdineLavorazioneDTO {
|
||||||
@ -77,6 +74,8 @@ public class OrdineLavorazioneDTO {
|
|||||||
|
|
||||||
private String codAnag;
|
private String codAnag;
|
||||||
|
|
||||||
|
private String ragSocAnag;
|
||||||
|
|
||||||
private String rifOrd;
|
private String rifOrd;
|
||||||
|
|
||||||
private String codVdes;
|
private String codVdes;
|
||||||
@ -136,8 +135,8 @@ public class OrdineLavorazioneDTO {
|
|||||||
public String getDataOrd() {
|
public String getDataOrd() {
|
||||||
return dataOrd;
|
return dataOrd;
|
||||||
}
|
}
|
||||||
public Date getDateOrd() throws ParseException, TimeNotRecognizedException, DateNotRecognizedException {
|
public Date getDataOrdD() {
|
||||||
return UtilityDate.recognizeDate(dataOrd);
|
return UtilityDate.recognizeDateWithExceptionHandler(dataOrd);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDataOrd(String dataOrd) {
|
public void setDataOrd(String dataOrd) {
|
||||||
@ -196,6 +195,10 @@ public class OrdineLavorazioneDTO {
|
|||||||
return dataIniz;
|
return dataIniz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getDataInizD() {
|
||||||
|
return UtilityDate.recognizeDateWithExceptionHandler(getDataIniz());
|
||||||
|
}
|
||||||
|
|
||||||
public void setDataIniz(String dataIniz) {
|
public void setDataIniz(String dataIniz) {
|
||||||
this.dataIniz = dataIniz;
|
this.dataIniz = dataIniz;
|
||||||
}
|
}
|
||||||
@ -204,6 +207,10 @@ public class OrdineLavorazioneDTO {
|
|||||||
return dataFine;
|
return dataFine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getDataFineD() {
|
||||||
|
return UtilityDate.recognizeDateWithExceptionHandler(getDataFine());
|
||||||
|
}
|
||||||
|
|
||||||
public void setDataFine(String dataFine) {
|
public void setDataFine(String dataFine) {
|
||||||
this.dataFine = dataFine;
|
this.dataFine = dataFine;
|
||||||
}
|
}
|
||||||
@ -276,6 +283,10 @@ public class OrdineLavorazioneDTO {
|
|||||||
return dataScad;
|
return dataScad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getDataScadD() {
|
||||||
|
return UtilityDate.recognizeDateWithExceptionHandler(getDataScad());
|
||||||
|
}
|
||||||
|
|
||||||
public void setDataScad(String dataScad) {
|
public void setDataScad(String dataScad) {
|
||||||
this.dataScad = dataScad;
|
this.dataScad = dataScad;
|
||||||
}
|
}
|
||||||
@ -308,6 +319,10 @@ public class OrdineLavorazioneDTO {
|
|||||||
return dataInizProd;
|
return dataInizProd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getDataInizProdD() {
|
||||||
|
return UtilityDate.recognizeDateWithExceptionHandler(getDataInizProd());
|
||||||
|
}
|
||||||
|
|
||||||
public void setDataInizProd(String dataInizProd) {
|
public void setDataInizProd(String dataInizProd) {
|
||||||
this.dataInizProd = dataInizProd;
|
this.dataInizProd = dataInizProd;
|
||||||
}
|
}
|
||||||
@ -328,6 +343,14 @@ public class OrdineLavorazioneDTO {
|
|||||||
this.codAnag = codAnag;
|
this.codAnag = codAnag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getRagSocAnag() {
|
||||||
|
return ragSocAnag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRagSocAnag(String ragSocAnag) {
|
||||||
|
this.ragSocAnag = ragSocAnag;
|
||||||
|
}
|
||||||
|
|
||||||
public String getRifOrd() {
|
public String getRifOrd() {
|
||||||
return rifOrd;
|
return rifOrd;
|
||||||
}
|
}
|
||||||
@ -463,4 +486,8 @@ public class OrdineLavorazioneDTO {
|
|||||||
public void setNumCnfVersamento(float numCnfVersamento) {
|
public void setNumCnfVersamento(float numCnfVersamento) {
|
||||||
this.numCnfVersamento.set(numCnfVersamento);
|
this.numCnfVersamento.set(numCnfVersamento);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public OrdineLavorazioneStatoEnum getStatoEnum() {
|
||||||
|
return OrdineLavorazioneStatoEnum.fromString(getStato());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,26 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.prod_versamento_materiale.dto;
|
||||||
|
|
||||||
|
public enum OrdineLavorazioneStatoEnum {
|
||||||
|
|
||||||
|
IN_CORSO("IN CORSO"),
|
||||||
|
PROGRAMMATO("PROGRAMMATO"),
|
||||||
|
PAUSA("IN PAUSA");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private String text;
|
||||||
|
OrdineLavorazioneStatoEnum(String text) {
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
public String getText() {
|
||||||
|
return this.text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static OrdineLavorazioneStatoEnum fromString(String text) {
|
||||||
|
for (OrdineLavorazioneStatoEnum b : OrdineLavorazioneStatoEnum.values()) {
|
||||||
|
if (b.text.equalsIgnoreCase(text)) return b;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -178,7 +178,7 @@ public class SpedizioneViewModel {
|
|||||||
.map(SitArtOrdDTO::getCodMart)
|
.map(SitArtOrdDTO::getCodMart)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
this.mArticoloRESTConsumer.getByCodMart(codMarts, listMtbAarts -> {
|
this.mArticoloRESTConsumer.getByCodMarts(codMarts, listMtbAarts -> {
|
||||||
List<PickingObjectDTO> pickingList = Stream.of(sitArtOrdList)
|
List<PickingObjectDTO> pickingList = Stream.of(sitArtOrdList)
|
||||||
.map(sitArtOrdDTO -> {
|
.map(sitArtOrdDTO -> {
|
||||||
MtbAart mtbAart = null;
|
MtbAart mtbAart = null;
|
||||||
|
|||||||
@ -188,7 +188,7 @@ public class UltimeConsegneClienteRESTConsumer {
|
|||||||
.distinct()
|
.distinct()
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
ArticoloRESTConsumer.getByCodMartStatic(codMarts, arts -> {
|
ArticoloRESTConsumer.getByCodMartsStatic(codMarts, arts -> {
|
||||||
|
|
||||||
if (arts != null && arts.size() > 0) {
|
if (arts != null && arts.size() > 0) {
|
||||||
for (DtbDocr value : values) {
|
for (DtbDocr value : values) {
|
||||||
|
|||||||
@ -147,17 +147,6 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
|||||||
this.mOnPreDestroyList.add(onPreDestroy);
|
this.mOnPreDestroyList.add(onPreDestroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onLoadingStarted() {
|
|
||||||
BarcodeManager.disable();
|
|
||||||
this.openProgress();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onLoadingEnded() {
|
|
||||||
this.closeProgress();
|
|
||||||
BarcodeManager.enable();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLivelloPosizioneRequired(MtbDepoPosizione posizione, RunnableArgs<MtbDepoPosizione> onComplete) {
|
public void onLivelloPosizioneRequired(MtbDepoPosizione posizione, RunnableArgs<MtbDepoPosizione> onComplete) {
|
||||||
@ -237,13 +226,4 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(Exception ex) {
|
|
||||||
this.getActivity().runOnUiThread(() -> {
|
|
||||||
this.closeProgress();
|
|
||||||
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
|
|
||||||
BarcodeManager.enable();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,19 +1,15 @@
|
|||||||
package it.integry.integrywmsnative.ui;
|
package it.integry.integrywmsnative.ui;
|
||||||
|
|
||||||
import android.animation.ObjectAnimator;
|
|
||||||
import android.animation.StateListAnimator;
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
|
||||||
import androidx.cardview.widget.CardView;
|
import androidx.cardview.widget.CardView;
|
||||||
import androidx.core.view.ViewCompat;
|
|
||||||
import androidx.core.widget.NestedScrollView;
|
import androidx.core.widget.NestedScrollView;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
@ -73,12 +69,26 @@ public class ElevatedToolbar extends CardView {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
View.OnScrollChangeListener recyclerViewScrollChangeListener = (view, i, i1, i2, i3) -> {
|
||||||
|
|
||||||
|
if(!view.canScrollVertically(-1)) {
|
||||||
|
resetElevation();
|
||||||
|
} else {
|
||||||
|
setCardElevation(CARD_ELEVATION);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
public void setRecyclerView(RecyclerView recyclerView) {
|
public void setRecyclerView(RecyclerView recyclerView) {
|
||||||
this.mRecyclerView = recyclerView;
|
this.mRecyclerView = recyclerView;
|
||||||
resetElevation();
|
resetElevation();
|
||||||
|
|
||||||
if(mRecyclerView != null) {
|
if(mRecyclerView != null) {
|
||||||
mRecyclerView.setOnScrollListener(recyclerViewScrollListener);
|
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
|
// mRecyclerView.addOnScrollListener(recyclerViewScrollChangeListener);
|
||||||
|
// } else {
|
||||||
|
mRecyclerView.addOnScrollListener(recyclerViewScrollListener);
|
||||||
|
// }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.e("ElevatedToolbar", "RecyclerView is NULL");
|
Log.e("ElevatedToolbar", "RecyclerView is NULL");
|
||||||
|
|||||||
@ -101,10 +101,6 @@ public class BottomSheetFragmentLUContentView extends BottomSheetFragmentBaseVie
|
|||||||
mBinding.textviewArtDescription.setText(mContext.getResources().getQuantityString(R.plurals.articles, mtbColrs.size()));
|
mBinding.textviewArtDescription.setText(mContext.getResources().getQuantityString(R.plurals.articles, mtbColrs.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void collapseMtbColrActionSheet(){
|
|
||||||
this.mBinding.bottomSheetMtbColrEdit.collapse();
|
|
||||||
}
|
|
||||||
|
|
||||||
public BottomSheetFragmentLUContentView setListener(Listener listener) {
|
public BottomSheetFragmentLUContentView setListener(Listener listener) {
|
||||||
this.mListener = listener;
|
this.mListener = listener;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import android.util.AttributeSet;
|
|||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.databinding.ObservableField;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
@ -18,6 +19,8 @@ public class BottomSheetMtbColrEditView extends BottomSheetFragmentBaseView {
|
|||||||
private BottomSheetMtbColrEditBinding mBinding;
|
private BottomSheetMtbColrEditBinding mBinding;
|
||||||
private BottomSheetMtbColrEditViewModel mViewModel;
|
private BottomSheetMtbColrEditViewModel mViewModel;
|
||||||
|
|
||||||
|
public ObservableField<Boolean> enabledEditButton = new ObservableField<>(true);
|
||||||
|
public ObservableField<Boolean> enabledDeleteButton = new ObservableField<>(true);
|
||||||
|
|
||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
|
|
||||||
@ -75,6 +78,22 @@ public class BottomSheetMtbColrEditView extends BottomSheetFragmentBaseView {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void enableEditButton() {
|
||||||
|
this.enabledEditButton.set(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void disableEditButton() {
|
||||||
|
this.enabledEditButton.set(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void enableDeleteButton() {
|
||||||
|
this.enabledDeleteButton.set(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void disableDeleteButton() {
|
||||||
|
this.enabledDeleteButton.set(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public BottomSheetMtbColrEditViewModel getViewModelInstance() {
|
public BottomSheetMtbColrEditViewModel getViewModelInstance() {
|
||||||
return this.mViewModel;
|
return this.mViewModel;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception;
|
package it.integry.integrywmsnative.view.dialogs.exception;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception;
|
package it.integry.integrywmsnative.view.dialogs.exception;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.exception;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public class InvalidGrossWeightQuantityException extends Exception {
|
||||||
|
|
||||||
|
public InvalidGrossWeightQuantityException() {
|
||||||
|
super(UtilityResources.getString(R.string.invalid_gross_weight_error_message));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.exception;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public class InvalidNumCnfQuantityException extends Exception {
|
||||||
|
|
||||||
|
public InvalidNumCnfQuantityException() {
|
||||||
|
super(UtilityResources.getString(R.string.invalid_num_cnf_error_message));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.exception;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public class InvalidProductionLineException extends Exception {
|
||||||
|
|
||||||
|
public InvalidProductionLineException() {
|
||||||
|
super(UtilityResources.getString(R.string.invalid_production_line_error_message));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception;
|
package it.integry.integrywmsnative.view.dialogs.exception;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception;
|
package it.integry.integrywmsnative.view.dialogs.exception;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.input_lu_prod;
|
||||||
|
|
||||||
|
import dagger.Subcomponent;
|
||||||
|
|
||||||
|
@Subcomponent
|
||||||
|
public interface DialogInputLUProdComponent {
|
||||||
|
|
||||||
|
@Subcomponent.Factory
|
||||||
|
interface Factory {
|
||||||
|
DialogInputLUProdComponent create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void inject(DialogInputLUProdView dialogInputLUProdView);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.input_lu_prod;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
|
||||||
|
public class DialogInputLUProdDTO {
|
||||||
|
|
||||||
|
private MtbAart mtbAart;
|
||||||
|
|
||||||
|
private BigDecimal numCnf;
|
||||||
|
private BigDecimal qtaCnf;
|
||||||
|
private BigDecimal qtaTot;
|
||||||
|
|
||||||
|
private String partitaMag;
|
||||||
|
private Date dataScad;
|
||||||
|
|
||||||
|
private String codJfasParent;
|
||||||
|
private String codTcol;
|
||||||
|
private String suggestedCodJfas;
|
||||||
|
|
||||||
|
public MtbAart getMtbAart() {
|
||||||
|
return mtbAart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdDTO setMtbAart(MtbAart mtbAart) {
|
||||||
|
this.mtbAart = mtbAart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnf() {
|
||||||
|
return numCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdDTO setNumCnf(BigDecimal numCnf) {
|
||||||
|
this.numCnf = numCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnf() {
|
||||||
|
return qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdDTO setQtaCnf(BigDecimal qtaCnf) {
|
||||||
|
this.qtaCnf = qtaCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaTot() {
|
||||||
|
return qtaTot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdDTO setQtaTot(BigDecimal qtaTot) {
|
||||||
|
this.qtaTot = qtaTot;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartitaMag() {
|
||||||
|
return partitaMag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdDTO setPartitaMag(String partitaMag) {
|
||||||
|
this.partitaMag = partitaMag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDataScad() {
|
||||||
|
return dataScad;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdDTO setDataScad(Date dataScad) {
|
||||||
|
this.dataScad = dataScad;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodJfasParent() {
|
||||||
|
return codJfasParent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdDTO setCodJfasParent(String codJfasParent) {
|
||||||
|
this.codJfasParent = codJfasParent;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodTcol() {
|
||||||
|
return codTcol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdDTO setCodTcol(String codTcol) {
|
||||||
|
this.codTcol = codTcol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuggestedCodJfas() {
|
||||||
|
return suggestedCodJfas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdDTO setSuggestedCodJfas(String suggestedCodJfas) {
|
||||||
|
this.suggestedCodJfas = suggestedCodJfas;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.input_lu_prod;
|
||||||
|
|
||||||
|
import dagger.Module;
|
||||||
|
import dagger.Provides;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||||
|
|
||||||
|
@Module(subcomponents = DialogInputLUProdComponent.class)
|
||||||
|
public class DialogInputLUProdModule {
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
DialogInputLUProdViewModel providesDialogInputLUProdViewModel(MagazzinoRESTConsumer magazzinoRESTConsumer, MesRESTConsumer mesRESTConsumer) {
|
||||||
|
return new DialogInputLUProdViewModel(magazzinoRESTConsumer, mesRESTConsumer);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.input_lu_prod;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.JtbFasi;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||||
|
|
||||||
|
public class DialogInputLUProdResultDTO {
|
||||||
|
|
||||||
|
private BigDecimal numCnf;
|
||||||
|
private BigDecimal pesoCollo;
|
||||||
|
private BigDecimal pesoNetto;
|
||||||
|
private BigDecimal taraPed;
|
||||||
|
private BigDecimal taraCol;
|
||||||
|
private BigDecimal pesoLordo;
|
||||||
|
|
||||||
|
private MtbTCol mtbTCol;
|
||||||
|
private JtbFasi jtbFasi;
|
||||||
|
|
||||||
|
|
||||||
|
public BigDecimal getNumCnf() {
|
||||||
|
return numCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdResultDTO setNumCnf(BigDecimal numCnf) {
|
||||||
|
this.numCnf = numCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoCollo() {
|
||||||
|
return pesoCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdResultDTO setPesoCollo(BigDecimal pesoCollo) {
|
||||||
|
this.pesoCollo = pesoCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoNetto() {
|
||||||
|
return pesoNetto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdResultDTO setPesoNetto(BigDecimal pesoNetto) {
|
||||||
|
this.pesoNetto = pesoNetto;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTaraPed() {
|
||||||
|
return taraPed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdResultDTO setTaraPed(BigDecimal taraPed) {
|
||||||
|
this.taraPed = taraPed;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTaraCol() {
|
||||||
|
return taraCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdResultDTO setTaraCol(BigDecimal taraCol) {
|
||||||
|
this.taraCol = taraCol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoLordo() {
|
||||||
|
return pesoLordo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdResultDTO setPesoLordo(BigDecimal pesoLordo) {
|
||||||
|
this.pesoLordo = pesoLordo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbTCol getMtbTCol() {
|
||||||
|
return mtbTCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdResultDTO setMtbTCol(MtbTCol mtbTCol) {
|
||||||
|
this.mtbTCol = mtbTCol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JtbFasi getJtbFasi() {
|
||||||
|
return jtbFasi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdResultDTO setJtbFasi(JtbFasi jtbFasi) {
|
||||||
|
this.jtbFasi = jtbFasi;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,410 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.input_lu_prod;
|
||||||
|
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
|
import android.text.SpannableString;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.databinding.ObservableField;
|
||||||
|
import androidx.fragment.app.DialogFragment;
|
||||||
|
|
||||||
|
import com.annimon.stream.Optional;
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
import com.google.android.material.textfield.TextInputLayout;
|
||||||
|
import com.pedromassango.doubleclick.DoubleClick;
|
||||||
|
import com.pedromassango.doubleclick.DoubleClickListener;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.JtbFasi;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityObservable;
|
||||||
|
import it.integry.integrywmsnative.databinding.DialogInputLuProdBinding;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter.DialogInputLULineeProdAdapter;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter.DialogInputLULineeProdListModel;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter.DialogInputLUProdTipoColloAdapter;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter.DialogInputLUProdTipoColloListModel;
|
||||||
|
|
||||||
|
public class DialogInputLUProdView extends BaseDialogFragment implements DialogInputLUProdViewModel.Listener {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
DialogInputLUProdViewModel mViewModel;
|
||||||
|
|
||||||
|
private final DialogInputLUProdDTO mDialogInputLUProdDTO;
|
||||||
|
private final RunnableArgs<DialogInputLUProdResultDTO> mOnComplete;
|
||||||
|
private final Runnable mOnAbort;
|
||||||
|
|
||||||
|
public ObservableField<String> selectedMtbTcol = new ObservableField<>();
|
||||||
|
public ObservableField<DialogInputLUProdTipoColloListModel> currentMtbTCol = new ObservableField<>();
|
||||||
|
|
||||||
|
public ObservableField<String> selectedLineaProd = new ObservableField<>();
|
||||||
|
public ObservableField<DialogInputLULineeProdListModel> currentLineaProd = new ObservableField<>();
|
||||||
|
|
||||||
|
public ObservableField<MtbAart> currentMtbAart = new ObservableField<>();
|
||||||
|
|
||||||
|
public ObservableField<BigDecimal> currentNumCnf = new ObservableField<>();
|
||||||
|
public ObservableField<BigDecimal> currentPesoCollo = new ObservableField<>();
|
||||||
|
public ObservableField<BigDecimal> currentPesoNetto = new ObservableField<>();
|
||||||
|
public ObservableField<BigDecimal> currentTaraPed = new ObservableField<>();
|
||||||
|
public ObservableField<BigDecimal> currentTaraCol = new ObservableField<>();
|
||||||
|
public ObservableField<BigDecimal> currentPesoLordo = new ObservableField<>();
|
||||||
|
|
||||||
|
public ObservableField<Boolean> enabledLineeProd = new ObservableField<>(false);
|
||||||
|
|
||||||
|
public ObservableField<Boolean> enabledNumCnf = new ObservableField<>(true);
|
||||||
|
public ObservableField<Boolean> enabledQtaCnf = new ObservableField<>(false);
|
||||||
|
public ObservableField<Boolean> enabledQtaTot = new ObservableField<>(false);
|
||||||
|
public ObservableField<Boolean> enabledTaraPed = new ObservableField<>(false);
|
||||||
|
public ObservableField<Boolean> enabledTaraCol = new ObservableField<>(false);
|
||||||
|
public ObservableField<Boolean> enabledPesoLordo = new ObservableField<>(true);
|
||||||
|
|
||||||
|
|
||||||
|
private DialogInputLuProdBinding mBindings;
|
||||||
|
private boolean mEnableDataCallback = true;
|
||||||
|
|
||||||
|
private DialogInputLUProdTipoColloAdapter codTcolArrayAdapter = null;
|
||||||
|
private DialogInputLULineeProdAdapter lineeProdArrayAdapter = null;
|
||||||
|
|
||||||
|
public static DialogInputLUProdView newInstance(@NotNull DialogInputLUProdDTO dialogInputLUProdDTO, @NotNull RunnableArgs<DialogInputLUProdResultDTO> onComplete, @NotNull Runnable onAbort) {
|
||||||
|
return new DialogInputLUProdView(dialogInputLUProdDTO, onComplete, onAbort);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DialogInputLUProdView(@NotNull DialogInputLUProdDTO dialogInputLUProdDTO, @NotNull RunnableArgs<DialogInputLUProdResultDTO> onComplete, @NotNull Runnable onAbort) {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.mDialogInputLUProdDTO = dialogInputLUProdDTO;
|
||||||
|
this.mOnComplete = onComplete;
|
||||||
|
this.mOnAbort = onAbort;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setStyle(DialogFragment.STYLE_NORMAL, R.style.AppTheme_NewMaterial_Dialog_FullscreenDialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_input_lu_prod, container, false);
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
|
|
||||||
|
mBindings.toolbar.setTitle("Creazione pedana");
|
||||||
|
|
||||||
|
MainApplication.appComponent
|
||||||
|
.dialogInputLUProdComponent()
|
||||||
|
.create()
|
||||||
|
.inject(this);
|
||||||
|
|
||||||
|
this.mViewModel
|
||||||
|
.setMtbAart(mDialogInputLUProdDTO.getMtbAart())
|
||||||
|
.setInitialNumCnf(mDialogInputLUProdDTO.getNumCnf())
|
||||||
|
.setInitialPesoCollo(mDialogInputLUProdDTO.getQtaCnf())
|
||||||
|
.setInitialPesoNetto(mDialogInputLUProdDTO.getQtaTot());
|
||||||
|
|
||||||
|
mBindings.setView(this);
|
||||||
|
mBindings.setViewmodel(this.mViewModel);
|
||||||
|
|
||||||
|
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
return mBindings.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
this.init();
|
||||||
|
|
||||||
|
this.mViewModel.setListener(this);
|
||||||
|
this.mViewModel.init(mDialogInputLUProdDTO.getCodJfasParent());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
UtilityObservable.addPropertyChanged(this.currentMtbAart, (value) -> {
|
||||||
|
this.currentTaraCol.set(value.getTaraKg());
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.selectedMtbTcol, (value) -> {
|
||||||
|
if(this.codTcolArrayAdapter != null && this.codTcolArrayAdapter.getDataset() != null) {
|
||||||
|
Optional<DialogInputLUProdTipoColloListModel> selectedItem = Stream.of(this.codTcolArrayAdapter.getDataset())
|
||||||
|
.filter(x -> x.toString().equals(value))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
if(selectedItem.isPresent()) {
|
||||||
|
currentMtbTCol.set(selectedItem.get());
|
||||||
|
this.mViewModel.setInternalTipoPed(selectedItem.get().getOriginalModel());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.currentMtbTCol, (value) -> {
|
||||||
|
this.currentTaraPed.set(value.getOriginalModel().getTaraKg());
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.selectedLineaProd, (value) -> {
|
||||||
|
if(this.lineeProdArrayAdapter != null && this.lineeProdArrayAdapter.getDataset() != null) {
|
||||||
|
Optional<DialogInputLULineeProdListModel> selectedItem = Stream.of(this.lineeProdArrayAdapter.getDataset())
|
||||||
|
.filter(x -> x.toString().equals(value))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
if(selectedItem.isPresent()) {
|
||||||
|
currentLineaProd.set(selectedItem.get());
|
||||||
|
this.mViewModel.setInternalLineaProd(selectedItem.get().getOriginalModel());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.currentNumCnf, (value) -> {
|
||||||
|
if (this.mEnableDataCallback) {
|
||||||
|
this.mViewModel.setNumCnf(value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.currentPesoCollo, (value) -> {
|
||||||
|
if (this.mEnableDataCallback) {
|
||||||
|
this.mViewModel.setPesoCollo(value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.currentPesoNetto, (value) -> {
|
||||||
|
if(value != null) {
|
||||||
|
this.currentPesoNetto.set(value.setScale(0, RoundingMode.HALF_UP));
|
||||||
|
}
|
||||||
|
if (this.mEnableDataCallback) {
|
||||||
|
this.mViewModel.setPesoNetto(value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.currentTaraPed, (value) -> {
|
||||||
|
if (this.mEnableDataCallback) {
|
||||||
|
this.mViewModel.setTaraPed(value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.currentTaraCol, (value) -> {
|
||||||
|
if (this.mEnableDataCallback) {
|
||||||
|
this.mViewModel.setTaraCol(value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.currentPesoLordo, (value) -> {
|
||||||
|
if(value != null) {
|
||||||
|
this.currentPesoLordo.set(value.setScale(0, RoundingMode.HALF_UP));
|
||||||
|
}
|
||||||
|
if (this.mEnableDataCallback) {
|
||||||
|
this.mViewModel.setPesoLordo(value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
final ColorStateList textColorsNumCnf = this.mBindings.inputNumCnfLayout.getEditText().getTextColors();
|
||||||
|
final ColorStateList textColorsQtaCnf = this.mBindings.inputQtaCnfLayout.getEditText().getTextColors();
|
||||||
|
final ColorStateList textColorsQtaTot = this.mBindings.inputQtaTotLayout.getEditText().getTextColors();
|
||||||
|
final ColorStateList textColorsTaraPed = this.mBindings.inputTaraPedLayout.getEditText().getTextColors();
|
||||||
|
final ColorStateList textColorsTaraCol = this.mBindings.inputTaraColLayout.getEditText().getTextColors();
|
||||||
|
final ColorStateList textColorsPesoLor = this.mBindings.inputPesoLordoLayout.getEditText().getTextColors();
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.mViewModel.blockedNumCnf, (value) -> {
|
||||||
|
toggleTextInputLayoutError(textColorsNumCnf, this.mBindings.inputNumCnfLayout, value);
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.mViewModel.blockedPesoCollo, (value) -> {
|
||||||
|
toggleTextInputLayoutError(textColorsQtaCnf, this.mBindings.inputQtaCnfLayout, value);
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.mViewModel.blockedPesoNetto, (value) -> {
|
||||||
|
toggleTextInputLayoutError(textColorsQtaTot, this.mBindings.inputQtaTotLayout, value);
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.mViewModel.blockedTaraPed, (value) -> {
|
||||||
|
toggleTextInputLayoutError(textColorsTaraPed, this.mBindings.inputTaraPedLayout, value);
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.mViewModel.blockedTaraCol, (value) -> {
|
||||||
|
toggleTextInputLayoutError(textColorsTaraCol, this.mBindings.inputTaraColLayout, value);
|
||||||
|
});
|
||||||
|
|
||||||
|
UtilityObservable.addPropertyChanged(this.mViewModel.blockedPesoLordo, (value) -> {
|
||||||
|
toggleTextInputLayoutError(textColorsPesoLor, this.mBindings.inputPesoLordoLayout, value);
|
||||||
|
});
|
||||||
|
|
||||||
|
//Init double taps
|
||||||
|
this.mBindings.inputNumCnfText.setOnClickListener(new DoubleClick(new DoubleClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onSingleClick(View view) {
|
||||||
|
String a = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDoubleClick(View view) {
|
||||||
|
mViewModel.blockedNumCnf.set(!mViewModel.blockedNumCnf.get());
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
this.mBindings.inputQtaCnfText.setOnClickListener(new DoubleClick(new DoubleClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onSingleClick(View view) {
|
||||||
|
String a = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDoubleClick(View view) {
|
||||||
|
mViewModel.blockedPesoCollo.set(!mViewModel.blockedPesoCollo.get());
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
this.mBindings.inputQtaTotText.setOnClickListener(new DoubleClick(new DoubleClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onSingleClick(View view) {
|
||||||
|
String a = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDoubleClick(View view) {
|
||||||
|
mViewModel.blockedPesoNetto.set(!mViewModel.blockedPesoNetto.get());
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
this.mBindings.filledExposedDropdownCodTcol.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||||
|
currentMtbTCol.set(codTcolArrayAdapter.getItem(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||||
|
currentMtbTCol.set(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.mBindings.filledExposedDropdownCodTcol.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||||
|
currentLineaProd.set(lineeProdArrayAdapter.getItem(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||||
|
currentLineaProd.set(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.mViewModel.getTipiCollo().observe(getViewLifecycleOwner(), tipiCollo -> {
|
||||||
|
|
||||||
|
codTcolArrayAdapter = new DialogInputLUProdTipoColloAdapter(getActivity(), R.layout.array_adapter_single_item, tipiCollo);
|
||||||
|
mBindings.filledExposedDropdownCodTcol.setAdapter(codTcolArrayAdapter);
|
||||||
|
|
||||||
|
if(mDialogInputLUProdDTO.getCodTcol() != null) {
|
||||||
|
Optional<MtbTCol> optTCol = Stream.of(tipiCollo)
|
||||||
|
.filter(x -> x.getCodTcol().equalsIgnoreCase(mDialogInputLUProdDTO.getCodTcol()))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
if(optTCol.isPresent())
|
||||||
|
selectedMtbTcol.set(new DialogInputLUProdTipoColloListModel().setOriginalModel(optTCol.get()).toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
this.mViewModel.getLineeProd().observe(getViewLifecycleOwner(), lineeProd -> {
|
||||||
|
this.enabledLineeProd.set(lineeProd != null && lineeProd.size() > 0);
|
||||||
|
|
||||||
|
lineeProdArrayAdapter = new DialogInputLULineeProdAdapter(getActivity(), R.layout.array_adapter_single_item, lineeProd);
|
||||||
|
mBindings.filledExposedDropdownCodJfas.setAdapter(lineeProdArrayAdapter);
|
||||||
|
|
||||||
|
if(mDialogInputLUProdDTO.getSuggestedCodJfas() != null) {
|
||||||
|
Optional<JtbFasi> optFas = Stream.of(lineeProd)
|
||||||
|
.filter(x -> x.getCodJfas().equalsIgnoreCase(mDialogInputLUProdDTO.getSuggestedCodJfas()))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
if(optFas.isPresent())
|
||||||
|
selectedLineaProd.set(new DialogInputLULineeProdListModel().setOriginalModel(optFas.get()).toString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.currentMtbAart.set(mDialogInputLUProdDTO.getMtbAart());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void toggleTextInputLayoutError(ColorStateList originalColorStateList, TextInputLayout textInputLayout, boolean isError) {
|
||||||
|
if (isError) {
|
||||||
|
textInputLayout.setErrorEnabled(true);
|
||||||
|
textInputLayout.setError(" ");
|
||||||
|
textInputLayout.setErrorIconDrawable(null);
|
||||||
|
textInputLayout.getEditText().setTextColor(ContextCompat.getColor(getActivity(), R.color.red_600));
|
||||||
|
textInputLayout.setHintTextAppearance(R.style.ErrorFloatingLabel);
|
||||||
|
} else {
|
||||||
|
textInputLayout.setErrorEnabled(false);
|
||||||
|
textInputLayout.setError(null);
|
||||||
|
textInputLayout.getEditText().setTextColor(originalColorStateList);
|
||||||
|
textInputLayout.setHintTextAppearance(R.style.NormalFloatingLabel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void resetValues() {
|
||||||
|
this.mViewModel.blockedNumCnf.set(false);
|
||||||
|
this.mViewModel.blockedPesoLordo.set(false);
|
||||||
|
|
||||||
|
this.currentNumCnf.set(mDialogInputLUProdDTO.getNumCnf());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void save() {
|
||||||
|
if (this.mViewModel.validate()) {
|
||||||
|
this.mOnComplete.run(this.mViewModel.getResult());
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDataChanged() {
|
||||||
|
this.mEnableDataCallback = false;
|
||||||
|
|
||||||
|
this.currentNumCnf.set(this.mViewModel.getNumCnf());
|
||||||
|
this.currentPesoCollo.set(this.mViewModel.getPesoCollo());
|
||||||
|
this.currentPesoNetto.set(this.mViewModel.getPesoNetto());
|
||||||
|
this.currentTaraPed.set(this.mViewModel.getTaraPed());
|
||||||
|
this.currentTaraCol.set(this.mViewModel.getTaraCol());
|
||||||
|
this.currentPesoLordo.set(this.mViewModel.getPesoLordo());
|
||||||
|
|
||||||
|
this.mBindings.executePendingBindings();
|
||||||
|
|
||||||
|
this.mEnableDataCallback = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Exception ex) {
|
||||||
|
this.onLoadingEnded();
|
||||||
|
DialogSimpleMessageView
|
||||||
|
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
||||||
|
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,268 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.input_lu_prod;
|
||||||
|
|
||||||
|
import androidx.databinding.ObservableField;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||||
|
import it.integry.integrywmsnative.core.model.JtbFasi;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.exception.InvalidGrossWeightQuantityException;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.exception.InvalidProductionLineException;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.exception.InvalidNumCnfQuantityException;
|
||||||
|
|
||||||
|
public class DialogInputLUProdViewModel {
|
||||||
|
|
||||||
|
public ObservableField<MtbAart> mtbAart = new ObservableField<>();
|
||||||
|
|
||||||
|
public ObservableField<Boolean> blockedNumCnf = new ObservableField<>(false);
|
||||||
|
public ObservableField<Boolean> blockedPesoCollo = new ObservableField<>(false);
|
||||||
|
public ObservableField<Boolean> blockedPesoNetto = new ObservableField<>(false);
|
||||||
|
public ObservableField<Boolean> blockedTaraPed = new ObservableField<>(false);
|
||||||
|
public ObservableField<Boolean> blockedTaraCol = new ObservableField<>(false);
|
||||||
|
public ObservableField<Boolean> blockedPesoLordo = new ObservableField<>(false);
|
||||||
|
|
||||||
|
private final MutableLiveData<List<MtbTCol>> mTipiColloLiveData = new MutableLiveData<>();
|
||||||
|
private final MutableLiveData<List<JtbFasi>> mLineeProdLiveData = new MutableLiveData<>();
|
||||||
|
|
||||||
|
private BigDecimal initialNumCnf;
|
||||||
|
private BigDecimal initialPesoCollo;
|
||||||
|
|
||||||
|
private BigDecimal internalNumCnf;
|
||||||
|
private BigDecimal internalPesoCollo;
|
||||||
|
private BigDecimal internalPesoNetto;
|
||||||
|
private BigDecimal internalTaraPed;
|
||||||
|
private BigDecimal internalTaraCol;
|
||||||
|
private BigDecimal internalPesoLordo;
|
||||||
|
|
||||||
|
private MtbTCol internalTipoPed;
|
||||||
|
private JtbFasi internalLineaProd;
|
||||||
|
|
||||||
|
|
||||||
|
private Listener mListener;
|
||||||
|
|
||||||
|
private final MagazzinoRESTConsumer mMagazzinoRESTConsumer;
|
||||||
|
private final MesRESTConsumer mMesRESTConsumer;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public DialogInputLUProdViewModel(MagazzinoRESTConsumer magazzinoRESTConsumer, MesRESTConsumer mesRESTConsumer) {
|
||||||
|
this.mMagazzinoRESTConsumer = magazzinoRESTConsumer;
|
||||||
|
this.mMesRESTConsumer = mesRESTConsumer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init(String codJfasParent) {
|
||||||
|
new Thread(this::sendOnLoadingStarted).start();
|
||||||
|
|
||||||
|
mMagazzinoRESTConsumer.getTipiCollo(tipiCollo -> {
|
||||||
|
this.mTipiColloLiveData.postValue(tipiCollo);
|
||||||
|
|
||||||
|
mMesRESTConsumer.getLineeProduzione(codJfasParent, jtbFasi -> {
|
||||||
|
this.mLineeProdLiveData.postValue(jtbFasi);
|
||||||
|
|
||||||
|
this.internalPesoLordo = calcPesoLordo();
|
||||||
|
this.mListener.onDataChanged();
|
||||||
|
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
}, this::sendError);
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MutableLiveData<List<MtbTCol>> getTipiCollo() {
|
||||||
|
return this.mTipiColloLiveData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MutableLiveData<List<JtbFasi>> getLineeProd() {
|
||||||
|
return this.mLineeProdLiveData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNumCnf() {
|
||||||
|
return this.internalNumCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoCollo() {
|
||||||
|
return this.internalPesoCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoNetto() {
|
||||||
|
return this.internalPesoNetto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTaraPed() {
|
||||||
|
return this.internalTaraPed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTaraCol() {
|
||||||
|
return this.internalTaraCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPesoLordo() {
|
||||||
|
return this.internalPesoLordo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdViewModel setMtbAart(MtbAart mtbAart) {
|
||||||
|
this.mtbAart.set(mtbAart);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdViewModel setInitialNumCnf(BigDecimal numCnf) {
|
||||||
|
this.initialNumCnf = numCnf;
|
||||||
|
this.internalNumCnf = numCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdViewModel setInitialPesoCollo(BigDecimal pesoCollo) {
|
||||||
|
this.initialPesoCollo = pesoCollo;
|
||||||
|
this.internalPesoCollo = pesoCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdViewModel setInitialPesoNetto(BigDecimal pesoNetto) {
|
||||||
|
this.internalPesoNetto = pesoNetto;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setNumCnf(BigDecimal numCnf) {
|
||||||
|
this.internalNumCnf = numCnf;
|
||||||
|
this.blockedNumCnf.set(!(UtilityBigDecimal.equalsTo(numCnf, BigDecimal.ZERO) || numCnf == null));
|
||||||
|
|
||||||
|
if (this.internalNumCnf != null) {
|
||||||
|
if (!this.blockedPesoLordo.get()) {
|
||||||
|
this.internalPesoNetto = UtilityBigDecimal.multiply(numCnf, this.internalPesoCollo);
|
||||||
|
this.internalPesoLordo = calcPesoLordo();
|
||||||
|
} else {
|
||||||
|
BigDecimal taraPed = internalTaraPed != null ? internalTaraPed : BigDecimal.ZERO;
|
||||||
|
|
||||||
|
this.internalPesoCollo = UtilityBigDecimal.divide(this.internalPesoLordo.subtract(taraPed), internalNumCnf).subtract(internalTaraCol);
|
||||||
|
this.internalPesoNetto = UtilityBigDecimal.multiply(this.internalNumCnf, internalPesoCollo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.mListener.onDataChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPesoCollo(BigDecimal pesoCollo) {
|
||||||
|
this.internalPesoCollo = pesoCollo;
|
||||||
|
this.internalPesoLordo = calcPesoLordo();
|
||||||
|
|
||||||
|
this.mListener.onDataChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPesoNetto(BigDecimal qtaTot) {
|
||||||
|
this.internalPesoNetto = qtaTot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaraPed(BigDecimal taraPed) {
|
||||||
|
this.internalTaraPed = taraPed;
|
||||||
|
|
||||||
|
if (!this.blockedPesoLordo.get()) {
|
||||||
|
if(internalNumCnf == null) internalNumCnf = initialNumCnf;
|
||||||
|
|
||||||
|
this.internalPesoNetto = UtilityBigDecimal.multiply(internalNumCnf, this.internalPesoCollo);
|
||||||
|
this.internalPesoLordo = calcPesoLordo();
|
||||||
|
} else {
|
||||||
|
this.internalPesoCollo = UtilityBigDecimal.divide(this.internalPesoLordo.subtract(taraPed), internalNumCnf).subtract(internalTaraCol);
|
||||||
|
this.internalPesoNetto = UtilityBigDecimal.multiply(this.internalNumCnf, internalPesoCollo);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.mListener.onDataChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaraCol(BigDecimal taraCol) {
|
||||||
|
this.internalTaraCol = taraCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPesoLordo(BigDecimal pesoLordo) {
|
||||||
|
this.internalPesoLordo = pesoLordo;
|
||||||
|
this.blockedPesoLordo.set(!(UtilityBigDecimal.equalsTo(pesoLordo, BigDecimal.ZERO) || pesoLordo == null));
|
||||||
|
|
||||||
|
if (internalPesoLordo != null) {
|
||||||
|
if(internalNumCnf == null) internalNumCnf = initialNumCnf;
|
||||||
|
|
||||||
|
BigDecimal taraPed = internalTaraPed != null ? internalTaraPed : BigDecimal.ZERO;
|
||||||
|
this.internalPesoCollo = UtilityBigDecimal.divide(this.internalPesoLordo.subtract(taraPed), internalNumCnf).subtract(internalTaraCol);
|
||||||
|
this.internalPesoNetto = UtilityBigDecimal.multiply(this.internalNumCnf, internalPesoCollo);
|
||||||
|
} else {
|
||||||
|
this.internalPesoCollo = this.initialPesoCollo;
|
||||||
|
this.internalPesoNetto = UtilityBigDecimal.multiply(this.internalNumCnf, internalPesoCollo);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.mListener.onDataChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdViewModel setInternalTipoPed(MtbTCol internalTipoPed) {
|
||||||
|
this.internalTipoPed = internalTipoPed;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdViewModel setInternalLineaProd(JtbFasi internalLineaProd) {
|
||||||
|
this.internalLineaProd = internalLineaProd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private BigDecimal calcPesoLordo() {
|
||||||
|
BigDecimal taraPed = internalTaraPed != null ? internalTaraPed : BigDecimal.ZERO;
|
||||||
|
return UtilityBigDecimal.multiply(this.internalNumCnf, this.internalPesoCollo.add(internalTaraCol)).add(taraPed);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean validate() {
|
||||||
|
if (this.internalNumCnf == null || UtilityBigDecimal.equalsOrLowerThan(this.internalNumCnf, BigDecimal.ZERO)) {
|
||||||
|
this.mListener.onError(new InvalidNumCnfQuantityException());
|
||||||
|
return false;
|
||||||
|
} else if (this.internalPesoLordo == null || UtilityBigDecimal.equalsOrLowerThan(this.internalPesoLordo, BigDecimal.ZERO)) {
|
||||||
|
this.mListener.onError(new InvalidGrossWeightQuantityException());
|
||||||
|
return false;
|
||||||
|
} else if(this.internalLineaProd == null) {
|
||||||
|
this.mListener.onError(new InvalidProductionLineException());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public DialogInputLUProdResultDTO getResult() {
|
||||||
|
return new DialogInputLUProdResultDTO()
|
||||||
|
.setNumCnf(this.internalNumCnf)
|
||||||
|
.setPesoCollo(this.internalPesoCollo)
|
||||||
|
.setPesoNetto(this.internalPesoNetto)
|
||||||
|
.setTaraPed(this.internalTaraPed)
|
||||||
|
.setTaraCol(this.internalTaraCol)
|
||||||
|
.setPesoLordo(this.internalPesoLordo)
|
||||||
|
.setMtbTCol(this.internalTipoPed)
|
||||||
|
.setJtbFasi(this.internalLineaProd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void sendOnLoadingStarted() {
|
||||||
|
if (this.mListener != null) mListener.onLoadingStarted();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendOnLoadingEnded() {
|
||||||
|
if (this.mListener != null) mListener.onLoadingEnded();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendError(Exception ex) {
|
||||||
|
if (this.mListener != null) mListener.onError(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setListener(Listener listener) {
|
||||||
|
this.mListener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface Listener extends ILoadingListener {
|
||||||
|
void onDataChanged();
|
||||||
|
|
||||||
|
void onError(Exception ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.JtbFasi;
|
||||||
|
|
||||||
|
public class DialogInputLULineeProdAdapter extends ArrayAdapter<DialogInputLULineeProdListModel> {
|
||||||
|
|
||||||
|
private final List<DialogInputLULineeProdListModel> mDataset;
|
||||||
|
|
||||||
|
public DialogInputLULineeProdAdapter(@NonNull Context context, int resource, @NonNull List<JtbFasi> objects) {
|
||||||
|
super(context, resource);
|
||||||
|
this.mDataset = Stream.of(objects).map(x -> new DialogInputLULineeProdListModel()
|
||||||
|
.setOriginalModel(x))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
addAll(mDataset);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DialogInputLULineeProdListModel> getDataset() {
|
||||||
|
return this.mDataset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JtbFasi getOriginalModelItem(int position) {
|
||||||
|
return mDataset.get(position).getOriginalModel();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.JtbFasi;
|
||||||
|
|
||||||
|
public class DialogInputLULineeProdListModel {
|
||||||
|
|
||||||
|
private JtbFasi originalModel;
|
||||||
|
|
||||||
|
public JtbFasi getOriginalModel() {
|
||||||
|
return originalModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLULineeProdListModel setOriginalModel(JtbFasi originalModel) {
|
||||||
|
this.originalModel = originalModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return originalModel.getCodJfas();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||||
|
|
||||||
|
public class DialogInputLUProdTipoColloAdapter extends ArrayAdapter<DialogInputLUProdTipoColloListModel> {
|
||||||
|
|
||||||
|
private final List<DialogInputLUProdTipoColloListModel> mDataset;
|
||||||
|
|
||||||
|
public DialogInputLUProdTipoColloAdapter(@NonNull Context context, int resource, @NonNull List<MtbTCol> objects) {
|
||||||
|
super(context, resource);
|
||||||
|
this.mDataset = Stream.of(objects).map(x -> new DialogInputLUProdTipoColloListModel()
|
||||||
|
.setOriginalModel(x))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
addAll(mDataset);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DialogInputLUProdTipoColloListModel> getDataset() {
|
||||||
|
return this.mDataset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbTCol getOriginalModelItem(int position) {
|
||||||
|
return mDataset.get(position).getOriginalModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||||
|
|
||||||
|
public class DialogInputLUProdTipoColloListModel {
|
||||||
|
|
||||||
|
private MtbTCol originalModel;
|
||||||
|
|
||||||
|
public MtbTCol getOriginalModel() {
|
||||||
|
return originalModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputLUProdTipoColloListModel setOriginalModel(MtbTCol originalModel) {
|
||||||
|
this.originalModel = originalModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return originalModel.getCodTcol() + " - " + originalModel.getDescrizione();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -5,7 +5,6 @@ import android.content.Context;
|
|||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
@ -14,12 +13,10 @@ import com.annimon.stream.Optional;
|
|||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.di.BindableString;
|
import it.integry.integrywmsnative.core.di.BindableString;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
|
||||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||||
@ -96,7 +93,7 @@ public class DialogInputPeso {
|
|||||||
|
|
||||||
final Dialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
final Dialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
|
|
||||||
MagazzinoRESTConsumer.getTipiCollo(codTcols -> {
|
MagazzinoRESTConsumer.getTipiColloStatic(codTcols -> {
|
||||||
this.codTcolList = codTcols;
|
this.codTcolList = codTcols;
|
||||||
|
|
||||||
List<String> codTcolDescriptions = Stream.of(codTcols)
|
List<String> codTcolDescriptions = Stream.of(codTcols)
|
||||||
|
|||||||
@ -3,6 +3,8 @@ package it.integry.integrywmsnative.view.dialogs.input_quantity_v2;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
@ -135,6 +137,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
mBindings.inputQtaTotText.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
|
mBindings.inputQtaTotText.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
return mBindings.getRoot();
|
return mBindings.getRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,6 +365,6 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
public void onError(Exception ex) {
|
public void onError(Exception ex) {
|
||||||
DialogSimpleMessageView
|
DialogSimpleMessageView
|
||||||
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
||||||
.show(getActivity().getSupportFragmentManager(), "tag");;
|
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,10 +15,10 @@ import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
|||||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.InvalidBatchLotException;
|
import it.integry.integrywmsnative.view.dialogs.exception.InvalidBatchLotException;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.InvalidExpireDateException;
|
import it.integry.integrywmsnative.view.dialogs.exception.InvalidExpireDateException;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.InvalidQtaCnfQuantityException;
|
import it.integry.integrywmsnative.view.dialogs.exception.InvalidQtaCnfQuantityException;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.InvalidQuantityException;
|
import it.integry.integrywmsnative.view.dialogs.exception.InvalidQuantityException;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.OverflowNumCnfAvailableQuantityException;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.OverflowNumCnfAvailableQuantityException;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.OverflowNumCnfOrderedQuantityException;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.OverflowNumCnfOrderedQuantityException;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.OverflowQtaTotAvailableQuantityException;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.OverflowQtaTotAvailableQuantityException;
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z"/>
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M12.5,7H11v6l5.25,3.15 0.75,-1.23 -4.5,-2.67z"/>
|
||||||
|
</vector>
|
||||||
BIN
app/src/main/res/drawable/ic_erase_96.png
Normal file
BIN
app/src/main/res/drawable/ic_erase_96.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10s10,-4.48 10,-10S17.52,2 12,2zM11,16H9V8h2V16zM15,16h-2V8h2V16z"/>
|
||||||
|
</vector>
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M9,16h2L11,8L9,8v8zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM13,16h2L15,8h-2v8z"/>
|
||||||
|
</vector>
|
||||||
5
app/src/main/res/drawable/ic_person_filled_24dp.xml
Normal file
5
app/src/main/res/drawable/ic_person_filled_24dp.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
|
||||||
|
</vector>
|
||||||
5
app/src/main/res/drawable/ic_play_circle_filled_24dp.xml
Normal file
5
app/src/main/res/drawable/ic_play_circle_filled_24dp.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10s10,-4.48 10,-10S17.52,2 12,2zM9.5,16.5v-9l7,4.5L9.5,16.5z"/>
|
||||||
|
</vector>
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M10,16.5l6,-4.5 -6,-4.5v9zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
|
||||||
|
</vector>
|
||||||
BIN
app/src/main/res/drawable/ic_workers_96px.png
Normal file
BIN
app/src/main/res/drawable/ic_workers_96px.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
21
app/src/main/res/drawable/label_primary_text.xml
Normal file
21
app/src/main/res/drawable/label_primary_text.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle" >
|
||||||
|
|
||||||
|
<!-- View background color -->
|
||||||
|
<solid
|
||||||
|
android:color="@color/blue_100" >
|
||||||
|
</solid>
|
||||||
|
|
||||||
|
<!-- View border color and width -->
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="@color/blue_800" >
|
||||||
|
</stroke>
|
||||||
|
|
||||||
|
<!-- The radius makes the corners rounded -->
|
||||||
|
<corners
|
||||||
|
android:radius="4dp" >
|
||||||
|
</corners>
|
||||||
|
|
||||||
|
</shape>
|
||||||
21
app/src/main/res/drawable/label_success_text.xml
Normal file
21
app/src/main/res/drawable/label_success_text.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle" >
|
||||||
|
|
||||||
|
<!-- View background color -->
|
||||||
|
<solid
|
||||||
|
android:color="@color/green_100" >
|
||||||
|
</solid>
|
||||||
|
|
||||||
|
<!-- View border color and width -->
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="@color/green_800" >
|
||||||
|
</stroke>
|
||||||
|
|
||||||
|
<!-- The radius makes the corners rounded -->
|
||||||
|
<corners
|
||||||
|
android:radius="4dp" >
|
||||||
|
</corners>
|
||||||
|
|
||||||
|
</shape>
|
||||||
21
app/src/main/res/drawable/label_warning_text.xml
Normal file
21
app/src/main/res/drawable/label_warning_text.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle" >
|
||||||
|
|
||||||
|
<!-- View background color -->
|
||||||
|
<solid
|
||||||
|
android:color="@color/yellow_100" >
|
||||||
|
</solid>
|
||||||
|
|
||||||
|
<!-- View border color and width -->
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="@color/yellow_800" >
|
||||||
|
</stroke>
|
||||||
|
|
||||||
|
<!-- The radius makes the corners rounded -->
|
||||||
|
<corners
|
||||||
|
android:radius="4dp" >
|
||||||
|
</corners>
|
||||||
|
|
||||||
|
</shape>
|
||||||
366
app/src/main/res/layout-land-hdpi/dialog_input_lu_prod.xml
Normal file
366
app/src/main/res/layout-land-hdpi/dialog_input_lu_prod.xml
Normal file
@ -0,0 +1,366 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
<import type="androidx.core.content.ContextCompat"/>
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityBigDecimal" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.R" />
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewmodel"
|
||||||
|
type="it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdViewModel" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="view"
|
||||||
|
type="it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdView" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:cardCornerRadius="12dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/full_white">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorPrimary"
|
||||||
|
android:minWidth="550dp"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:titleTextColor="@android:color/white">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
|
android:id="@+id/reset_values"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/ic_erase_96"
|
||||||
|
android:backgroundTint="@android:color/transparent"
|
||||||
|
android:onClick="@{() -> view.resetValues()}"
|
||||||
|
android:tint="@android:color/white"/>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/toolbar">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Dialog.DialogTitleText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:text="@{viewmodel.mtbAart.codMart}"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
tools:text="COD MART (Partita mag)" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:singleLine="false"
|
||||||
|
android:text="@{viewmodel.mtbAart.descrizioneEstesa}"
|
||||||
|
tools:text="RAD 25 D H/L 200 - 10 EL B BIANCO" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_cod_tcol"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_weight="@{view.enabledLineeProd ? 0.34f : 1f}"
|
||||||
|
android:hint="@string/lu_type"
|
||||||
|
android:paddingEnd="2dp"
|
||||||
|
tools:layout_weight="0.34">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_cod_tcol"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:nextFocusForward="@id/filled_exposed_dropdown_cod_jfas"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:binding="@{view.selectedMtbTcol}" />
|
||||||
|
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_cod_jfas"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_weight="0.66"
|
||||||
|
android:hint="@string/production_line"
|
||||||
|
android:paddingStart="2dp"
|
||||||
|
app:visibility="@{view.enabledLineeProd}">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_cod_jfas"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:nextFocusForward="@id/input_num_cnf_text"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:binding="@{view.selectedLineaProd}" />
|
||||||
|
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_num_cnf_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledNumCnf}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:paddingEnd="4dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_num_cnf_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.enabledNumCnf}"
|
||||||
|
android:hint="@string/pcks_x_ped"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="number"
|
||||||
|
app:binding="@{view.currentNumCnf}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_qta_cnf_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledQtaCnf}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:paddingEnd="4dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_qta_cnf_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:textColor="@{ContextCompat.getColor(context, view.enabledQtaCnf ? android.R.color.black : R.color.gray_400)}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.enabledQtaCnf}"
|
||||||
|
android:hint="@string/kg_x_pck"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
|
app:binding="@{view.currentPesoCollo}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_qta_tot_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledQtaTot}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:imeOptions="actionDone">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_qta_tot_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:textColor="@{ContextCompat.getColor(context, view.enabledQtaTot ? android.R.color.black : R.color.gray_400)}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.enabledQtaTot}"
|
||||||
|
android:hint="@string/net_weight"
|
||||||
|
android:inputType="number"
|
||||||
|
app:binding="@{view.currentPesoNetto}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_tara_ped_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledTaraPed}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
tools:layout_weight="1">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_tara_ped_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:textColor="@{ContextCompat.getColor(context, view.enabledTaraPed ? android.R.color.black : R.color.gray_400)}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.enabledTaraPed}"
|
||||||
|
android:hint="@string/tare_lu"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="number"
|
||||||
|
app:binding="@{view.currentTaraPed}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_tara_col_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledTaraCol}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:paddingEnd="4dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_tara_col_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:textColor="@{ContextCompat.getColor(context, view.enabledTaraCol ? android.R.color.black : R.color.gray_400)}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.enabledTaraCol}"
|
||||||
|
android:hint="@string/tare_pckg"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
|
app:binding="@{view.currentTaraCol}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_peso_lordo_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledPesoLordo}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
tools:layout_weight="1">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_peso_lordo_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/gross_weight"
|
||||||
|
android:inputType="number"
|
||||||
|
app:binding="@{view.currentPesoLordo}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/abort_btn"
|
||||||
|
style="@style/Button.DangerFull"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:layout_weight="0.4"
|
||||||
|
android:onClick="@{() -> view.dismiss()}"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:text="@string/abort"
|
||||||
|
app:icon="@drawable/ic_close_24dp"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/save_btn"
|
||||||
|
style="@style/Button.PrimaryFull"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:layout_weight="0.45"
|
||||||
|
android:onClick="@{() -> view.save()}"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:text="@string/confirm"
|
||||||
|
app:icon="@drawable/ic_save_24"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
</layout>
|
||||||
587
app/src/main/res/layout-land-hdpi/dialog_input_quantity_v2.xml
Normal file
587
app/src/main/res/layout-land-hdpi/dialog_input_quantity_v2.xml
Normal file
@ -0,0 +1,587 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityBigDecimal" />
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewmodel"
|
||||||
|
type="it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2ViewModel" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="view"
|
||||||
|
type="it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:cardCornerRadius="12dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorPrimary"
|
||||||
|
android:minWidth="550dp"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:titleTextColor="@android:color/white">
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/toolbar">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Dialog.DialogTitleText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:text="@{viewmodel.mtbAart.codMart}"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
tools:text="COD MART (Partita mag)" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Dialog.DialogSubTitleText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:text="@{viewmodel.mtbAart.diacod}"
|
||||||
|
android:textColor="@color/red_600"
|
||||||
|
android:visibility="@{UtilityString.isNullOrEmpty(viewmodel.mtbAart.diacod) ? View.GONE : View.VISIBLE}"
|
||||||
|
tools:text="DIACOD" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:singleLine="false"
|
||||||
|
android:text="@{viewmodel.mtbAart.descrizioneEstesa}"
|
||||||
|
tools:text="RAD 25 D H/L 200 - 10 EL B BIANCO" />
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:visibility="@{viewmodel.totalNumCnfOrd != null || viewmodel.totalQtaOrd != null ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toStartOf="@id/qta_ord_panel"
|
||||||
|
android:text="@string/total_ordered"
|
||||||
|
android:textColor="@android:color/black" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/qta_ord_panel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(viewmodel.totalNumCnfOrd)}"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:text="@string/unt_mis_col"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:text="("
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(viewmodel.totalQtaOrd)}"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="2dp"
|
||||||
|
android:text="@{viewmodel.mtbAart.untMis}"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:text=")"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginEnd="2dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:background="@drawable/badge_gray_round_corner"
|
||||||
|
android:backgroundTint="@color/green_600"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:visibility="@{viewmodel.totalNumCnfToBeTaken != null || viewmodel.totalQtaToBeTaken != null ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="@string/to_be_taken"
|
||||||
|
android:textColor="@android:color/white" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(viewmodel.totalNumCnfToBeTaken)}"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:text="@string/unt_mis_col"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:text="("
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(viewmodel.totalQtaToBeTaken)}"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="2dp"
|
||||||
|
android:text="@{viewmodel.mtbAart.untMis}"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:text=")"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginStart="2dp"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:background="@drawable/badge_gray_round_corner"
|
||||||
|
android:backgroundTint="@color/colorPrimary"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:visibility="@{viewmodel.totalNumCnfAvailable != null || viewmodel.totalQtaAvailable != null ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="@string/total_available"
|
||||||
|
android:textColor="@android:color/white" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(viewmodel.totalNumCnfAvailable)}"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:text="@string/unt_mis_col"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:text="("
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:text="@{UtilityNumber.decimalToString(viewmodel.totalQtaAvailable)}"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="2dp"
|
||||||
|
android:text="@{viewmodel.mtbAart.untMis}"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:text=")"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:background="@color/gray_400" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_partita_mag_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? 1f : 2f}"
|
||||||
|
android:enabled="@{view.enabledChangePartitaMag}"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
tools:layout_weight="1">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_partita_mag_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/batch_lot"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="text"
|
||||||
|
app:binding="@{view.currentPartitaMag}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_data_scad_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledChangePartitaMag}"
|
||||||
|
android:visibility="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_data_scad_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:hint="@string/expire_date"
|
||||||
|
android:inputType="text"
|
||||||
|
app:binding="@{view.currentDataScad}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_num_cnf_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||||
|
android:enabled="@{view.enabledNumCnf}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
tools:layout_weight="1">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_num_cnf_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/num_pcks"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="number"
|
||||||
|
app:binding="@{view.currentNumCnf}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_qta_cnf_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledQtaCnf}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
android:visibility="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_qta_cnf_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/qty_x_pck"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
|
app:binding="@{view.currentQtaCnf}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_qta_tot_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||||
|
android:enabled="@{view.enabledQtaTot}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
tools:layout_weight="1">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_qta_tot_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/tot_qty"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
|
app:binding="@{view.currentQtaTot}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/close_lu_btn"
|
||||||
|
style="@style/Button.PrimaryOutline"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="0dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:layout_weight="0.4"
|
||||||
|
android:onClick="@{() -> view.saveAndCloseLU()}"
|
||||||
|
android:text="@string/action_close_ul"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:strokeColor="@color/colorPrimary"
|
||||||
|
app:visibility="@{view.enabledLUCloseButton}" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/abort_btn"
|
||||||
|
style="@style/Button.DangerFull"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:layout_weight="0.3"
|
||||||
|
android:onClick="@{() -> view.dismiss()}"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
app:icon="@drawable/ic_close_24dp"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/save_btn"
|
||||||
|
style="@style/Button.PrimaryFull"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:layout_weight="0.3"
|
||||||
|
android:onClick="@{() -> view.save()}"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
app:icon="@drawable/ic_save_24"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
</layout>
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@ -7,6 +7,7 @@
|
|||||||
<data>
|
<data>
|
||||||
|
|
||||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="view"
|
name="view"
|
||||||
@ -158,7 +159,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintGuide_percent="0.50" />
|
app:layout_constraintGuide_percent="@{!view.enabledEditButton ? 0f : (!view.enabledDeleteButton ? 1f : 0.50f)}"
|
||||||
|
tools:layout_constraintGuide_percent="0.5f"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@ -167,6 +169,8 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:enabled="false"
|
||||||
|
app:visibility="@{view.enabledEditButton}"
|
||||||
app:singleClick="@{() -> view.editMtbColr()}"
|
app:singleClick="@{() -> view.editMtbColr()}"
|
||||||
app:layout_constraintEnd_toStartOf="@id/guideline_action"
|
app:layout_constraintEnd_toStartOf="@id/guideline_action"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@ -181,13 +185,15 @@
|
|||||||
android:scaleX="1.5"
|
android:scaleX="1.5"
|
||||||
android:scaleY="1.5"
|
android:scaleY="1.5"
|
||||||
android:src="@drawable/ic_edit_24dp"
|
android:src="@drawable/ic_edit_24dp"
|
||||||
android:tint="@color/green_600" />
|
android:tint="@color/green_600"
|
||||||
|
android:duplicateParentState="true"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/edit" />
|
android:text="@string/edit"
|
||||||
|
android:duplicateParentState="true" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
@ -198,6 +204,7 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
app:visibility="@{view.enabledDeleteButton ? View.VISIBLE : View.GONE}"
|
||||||
app:singleClick="@{() -> view.deleteMtbColr()}"
|
app:singleClick="@{() -> view.deleteMtbColr()}"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@id/guideline_action"
|
app:layout_constraintStart_toStartOf="@id/guideline_action"
|
||||||
|
|||||||
@ -391,7 +391,8 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#99000000"
|
android:background="#99000000"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
singleClick="@{() -> view.collapseMtbColrActionSheet()}"/>
|
android:clickable="true"
|
||||||
|
android:focusable="true"/>
|
||||||
|
|
||||||
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
||||||
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
||||||
|
|||||||
@ -95,7 +95,7 @@
|
|||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:text="@{`Preparato da: ` + mtbColt.preparatoDa}"
|
android:text="@{`Preparato da: ` + mtbColt.preparatoDa}"
|
||||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbColt.preparatoDa) ? View.INVISIBLE : View.VISIBLE}"
|
android:visibility="@{UtilityString.isNullOrEmpty(mtbColt.preparatoDa) ? View.INVISIBLE : View.VISIBLE}"
|
||||||
tools:text="Preparato da: Lisa Sportelli" />
|
tools:text="Preparato da: Utente" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
353
app/src/main/res/layout/dialog_input_lu_prod.xml
Normal file
353
app/src/main/res/layout/dialog_input_lu_prod.xml
Normal file
@ -0,0 +1,353 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||||
|
|
||||||
|
<import type="it.integry.integrywmsnative.core.utility.UtilityBigDecimal" />
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewmodel"
|
||||||
|
type="it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdViewModel" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="view"
|
||||||
|
type="it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdView" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/full_white">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorPrimary"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:titleTextColor="@android:color/white">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
|
android:id="@+id/reset_values"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/ic_erase_96"
|
||||||
|
android:backgroundTint="@android:color/transparent"
|
||||||
|
android:onClick="@{() -> view.resetValues()}"
|
||||||
|
android:tint="@android:color/white"/>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/toolbar">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Dialog.DialogTitleText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:text="@{viewmodel.mtbAart.codMart}"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
tools:text="COD MART (Partita mag)" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:singleLine="false"
|
||||||
|
android:text="@{viewmodel.mtbAart.descrizioneEstesa}"
|
||||||
|
tools:text="RAD 25 D H/L 200 - 10 EL B BIANCO" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_cod_tcol"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_weight="@{view.enabledLineeProd ? 0.34f : 1f}"
|
||||||
|
android:hint="@string/lu_type"
|
||||||
|
tools:layout_weight="0.34"
|
||||||
|
android:paddingEnd="2dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_cod_tcol"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:nextFocusForward="@id/filled_exposed_dropdown_cod_jfas"
|
||||||
|
app:binding="@{view.selectedMtbTcol}"
|
||||||
|
android:singleLine="true" />
|
||||||
|
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_cod_jfas"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
app:visibility="@{view.enabledLineeProd}"
|
||||||
|
android:layout_weight="0.66"
|
||||||
|
android:hint="@string/production_line"
|
||||||
|
android:paddingStart="2dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_cod_jfas"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
|
android:nextFocusForward="@id/input_num_cnf_text"
|
||||||
|
app:binding="@{view.selectedLineaProd}"
|
||||||
|
android:singleLine="true" />
|
||||||
|
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_num_cnf_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.enabledNumCnf}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_num_cnf_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/pcks_x_ped"
|
||||||
|
android:enabled="@{view.enabledNumCnf}"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="number"
|
||||||
|
app:binding="@{view.currentNumCnf}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_qta_cnf_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledQtaCnf}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:paddingEnd="4dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_qta_cnf_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:textColor="@{ContextCompat.getColor(context, view.enabledQtaCnf ? android.R.color.black : R.color.gray_400)}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.enabledQtaCnf}"
|
||||||
|
android:hint="@string/kg_x_pck"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
|
app:binding="@{view.currentPesoCollo}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_qta_tot_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledQtaTot}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:imeOptions="actionDone">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_qta_tot_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:textColor="@{ContextCompat.getColor(context, view.enabledQtaTot ? android.R.color.black : R.color.gray_400)}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.enabledQtaTot}"
|
||||||
|
android:hint="@string/net_weight"
|
||||||
|
android:inputType="number"
|
||||||
|
app:binding="@{view.currentPesoNetto}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_tara_ped_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledTaraPed}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
tools:layout_weight="1">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_tara_ped_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:textColor="@{ContextCompat.getColor(context, view.enabledTaraPed ? android.R.color.black : R.color.gray_400)}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.enabledTaraPed}"
|
||||||
|
android:hint="@string/tare_lu"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="number"
|
||||||
|
app:binding="@{view.currentTaraPed}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_tara_col_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledTaraCol}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:paddingEnd="4dp">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_tara_col_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:textColor="@{ContextCompat.getColor(context, view.enabledTaraCol ? android.R.color.black : R.color.gray_400)}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="@{view.enabledTaraCol}"
|
||||||
|
android:hint="@string/tare_pckg"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
|
app:binding="@{view.currentTaraCol}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_peso_lordo_layout"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:enabled="@{view.enabledPesoLordo}"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
tools:layout_weight="1">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_peso_lordo_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/gross_weight"
|
||||||
|
android:inputType="number"
|
||||||
|
app:binding="@{view.currentPesoLordo}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="1">
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/abort_btn"
|
||||||
|
style="@style/Button.DangerFull"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
android:layout_weight="0.4"
|
||||||
|
android:onClick="@{() -> view.dismiss()}"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:text="@string/abort"
|
||||||
|
app:icon="@drawable/ic_close_24dp"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/save_btn"
|
||||||
|
style="@style/Button.PrimaryFull"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="0dp"
|
||||||
|
android:layout_weight="0.45"
|
||||||
|
android:onClick="@{() -> view.save()}"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:text="@string/confirm"
|
||||||
|
app:icon="@drawable/ic_save_24"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@ -6,9 +6,7 @@
|
|||||||
<data>
|
<data>
|
||||||
|
|
||||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
|
|
||||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||||
|
|
||||||
<import type="it.integry.integrywmsnative.core.utility.UtilityBigDecimal" />
|
<import type="it.integry.integrywmsnative.core.utility.UtilityBigDecimal" />
|
||||||
|
|
||||||
<import type="android.view.View" />
|
<import type="android.view.View" />
|
||||||
|
|||||||
@ -331,7 +331,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#99000000"
|
android:background="#99000000"
|
||||||
android:visibility="gone" />
|
android:visibility="gone"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true" />
|
||||||
|
|
||||||
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
||||||
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user