Compare commits
426 Commits
v1.12.19(1
...
v1.17.2(22
| Author | SHA1 | Date | |
|---|---|---|---|
| 2782c4b477 | |||
| 5f13f7a634 | |||
| e811514764 | |||
| 21137b1224 | |||
| 7da0a5ade9 | |||
| 86d92b947d | |||
| 374127dfe9 | |||
| 91b43d1974 | |||
| c167893544 | |||
| 4c9a1bbaa9 | |||
| f970eb6cac | |||
| 1e1163c04d | |||
| 48f1307095 | |||
| 64fdda43db | |||
| 6611617a81 | |||
| f488e6bad0 | |||
| 266b3d707f | |||
| a726631925 | |||
| 0b634154e4 | |||
| 3e4d4300f1 | |||
| fb527c443f | |||
| 259c719344 | |||
| 178787d907 | |||
| a51cf2e899 | |||
| 9f587ac8b1 | |||
| df97d5c4a2 | |||
| 697bd1e85e | |||
| 5ace80ba28 | |||
| 1c8abcaa58 | |||
| 96ab52821c | |||
| ecd58dea14 | |||
| 9cdc4f299e | |||
| 39af233380 | |||
| 2576d423da | |||
| 234c21c7a1 | |||
| 6d5b6b0260 | |||
| f03976595c | |||
| 54dbade661 | |||
| 6d54bda9b4 | |||
| 4c244c1927 | |||
| ee3ee54e69 | |||
| 82d4607375 | |||
| 7ecdbd1f11 | |||
| a4c30b7fdd | |||
| 3ca75ca11a | |||
| f2f8594a18 | |||
| 7b7b3e554b | |||
| 7913771b2a | |||
| ebcd8eea0a | |||
| 97bf8c291a | |||
| e4f783862b | |||
| 653d4def4e | |||
| 3cf63fc1f1 | |||
| 45ddca1928 | |||
| f4ff33a942 | |||
| ca5b5d3151 | |||
| e22f7cf5c7 | |||
| 8ea38fd31c | |||
| ea7acf6053 | |||
| 3a0d4d290c | |||
| c8053831db | |||
| e0c07ea06e | |||
| 3e79b52e23 | |||
| 7d7712e57a | |||
| 6d7a047e8e | |||
| 72e4f2a0b9 | |||
| ef6cdc6a86 | |||
| 23b86e68cc | |||
| 2e46f9f665 | |||
| 88b1c56360 | |||
| 1d71ac10bd | |||
| 8eb677ecdf | |||
| 74efbac452 | |||
| 9c6375083f | |||
| b24d5271a4 | |||
| b5626e5b08 | |||
| fd2e1fa4f4 | |||
| a3f5072646 | |||
| 1258e8c3e6 | |||
| ccef0fe528 | |||
| 9bb5d1adce | |||
| ac446d953c | |||
| 407ff0b264 | |||
| 10e748b9d4 | |||
| e30273fe42 | |||
| 44564245a7 | |||
| 920f306907 | |||
| 90aa52ab55 | |||
| 93f3eb65f0 | |||
| eb94944928 | |||
| 28698ba306 | |||
| c713bbebbc | |||
| 38e2a02766 | |||
| dd8bf264a4 | |||
| 9488c1994d | |||
| 16099cdaf6 | |||
| f061f2bfc9 | |||
| f7253fd44c | |||
| e12d371567 | |||
| 5596f71c03 | |||
| 8669b812f5 | |||
| 3243484dd0 | |||
| 37114dc4d1 | |||
| d5af79abba | |||
| b50aa7a9d2 | |||
| cc333c3147 | |||
| fc5044134c | |||
| 93a3e39332 | |||
| 3eaf187136 | |||
| 36f9fa1e36 | |||
| 0f89913609 | |||
| 4cda247ddc | |||
| e88ea0a45c | |||
| 726cf80dc0 | |||
| a779d8b94d | |||
| f41e1f3a02 | |||
| aa75a77913 | |||
| 639be21ab5 | |||
| dfc241e7f6 | |||
| 7948c7fa97 | |||
| 2ae311c28a | |||
| 56ba43183c | |||
| b93b309ea8 | |||
| f5a2d012e5 | |||
| bf07e3d0f0 | |||
| 91f075976d | |||
| ee70faefa9 | |||
| 13cca99b09 | |||
| e55b6f4934 | |||
| 62d4b6f724 | |||
| 19b0465569 | |||
| d4f44c1ab7 | |||
| 6bf183d73c | |||
| a939f0ba08 | |||
| 08b44cb45b | |||
| fef57622cf | |||
| cbf36ec962 | |||
| adc7343352 | |||
| 94b2959d29 | |||
| 11903d1a34 | |||
| ff448b36b9 | |||
| aa8a54547c | |||
| e1d1878131 | |||
| 81bc85f854 | |||
| 00c90021b5 | |||
| 89e046cc78 | |||
| 2b2cf3656c | |||
| 47a2c36e04 | |||
| bca0d0cc52 | |||
| 594a6fc9d2 | |||
| e633dcbc4d | |||
| 99de98db28 | |||
| cce8ea5ca0 | |||
| 2cb693cafc | |||
| cc54dfb452 | |||
| 68d97a167d | |||
| adde82c191 | |||
| 5b1f681a11 | |||
| 8035cf15a8 | |||
| d277bf3e8e | |||
| 5d4130f131 | |||
| d51c62143c | |||
| 26a887c5aa | |||
| 838b3b8bb8 | |||
| 0a0de9d938 | |||
| eea134ce82 | |||
| 1020a31b89 | |||
| 0133a9232f | |||
| 3ff98fcda1 | |||
| 58b4ebb420 | |||
| fc0cb423e3 | |||
| 451f45b1a1 | |||
| b672ca1d37 | |||
| c4c4013995 | |||
| e9230aba11 | |||
| d044c2ab26 | |||
| 843679620b | |||
| 7346357b8e | |||
| b29a64a75a | |||
| 163a8cb27a | |||
| 8311f56154 | |||
| 0a76cc856c | |||
| 0ed536b0d5 | |||
| c8f8ccd64f | |||
| ecd0678aab | |||
| 3d7fb9e14f | |||
| 489687d392 | |||
| 5aa360af7c | |||
| e43ba3341f | |||
| db21ce554a | |||
| 86c9f3464c | |||
| 6376668d15 | |||
| 669bc1a8f5 | |||
| d78d99094f | |||
| c2c23c37a4 | |||
| b30bdb3df1 | |||
| 8e7ad53ec9 | |||
| e36441db73 | |||
| 97c63fb01d | |||
| cddc7681b0 | |||
| 3663b2bf4e | |||
| 91f4658fe3 | |||
| 8fba80c764 | |||
| 6dbc0c5894 | |||
| 14035b4c92 | |||
| 278f13ca6d | |||
| 52eb9ee0b7 | |||
| e89c786233 | |||
| 96439282cf | |||
| 13577f3c43 | |||
| f6dcbace57 | |||
| 2d0115723c | |||
| 5f90810a0f | |||
| b4fd56d8e2 | |||
| ed2a36d66a | |||
| 702ce4b79e | |||
| 99aac144f5 | |||
| 766ae1ae01 | |||
| d16cec069c | |||
| 0729b8ce87 | |||
| 92a2cdaec6 | |||
| 497bc54ebd | |||
| b00cd1f097 | |||
| cfc3649807 | |||
| 5ddd2e6235 | |||
| 2174a19c0f | |||
| 44cdbf929f | |||
| 65c0e520c5 | |||
| 062abb4ea3 | |||
| 1d759cdcbf | |||
| 15e1793962 | |||
| 55fee02f36 | |||
| 575ac2577f | |||
| 3fc5cd3660 | |||
| d77fbff509 | |||
| 58865ca34b | |||
| 23aa7f5261 | |||
| 65532a3185 | |||
| 1440c52322 | |||
| 4e36053ba6 | |||
| c7777b261d | |||
| 7b0a86bb81 | |||
| ebf2bd578e | |||
| f90e2acc3e | |||
| 035f058bc3 | |||
| 73e57e9430 | |||
| 13cc9f6053 | |||
| d9844315a3 | |||
| ade37f07d6 | |||
| f02e9921cb | |||
| e8ce7a9eeb | |||
| 61b0049a87 | |||
| 5c4d72dae2 | |||
| 39f52bf3dd | |||
| e50aa1f014 | |||
| b1d06605cd | |||
| ed55eb4279 | |||
| 9ac96ac8fd | |||
| 5be3fd9c25 | |||
| bab558252a | |||
| c256b39119 | |||
| af76627c50 | |||
| f9544566e9 | |||
| 4f02c3a4bc | |||
| ea8d8835cd | |||
| 61e07e8f76 | |||
| 962e1f7fa4 | |||
| 07d889bcd5 | |||
| 170db3eb0a | |||
| 856a807e3e | |||
| c56aa812ff | |||
| 770f014a70 | |||
| f6ff7aa80d | |||
| 4cd3e7e102 | |||
| 69bf5e319e | |||
| 88fe4d82cd | |||
| c8cd794cfc | |||
| 5dcc567eab | |||
| 89eafaf6ca | |||
| 6fc7f80ed4 | |||
| 2464d44222 | |||
| 96d544f2ad | |||
| e85ddc6580 | |||
| 89f6b9ce71 | |||
| c7d0ed1747 | |||
| b84b3c28f3 | |||
| 3a3bf4c2dd | |||
| 4809a96e5b | |||
| 5f206feb12 | |||
| 575762da2f | |||
| a96078c9e6 | |||
| b1941d5c34 | |||
| 4dc688af14 | |||
| 6675757317 | |||
| 1310b34a8d | |||
| 4e8fe26c6b | |||
| 32ff7bfa39 | |||
| c8cfa486e1 | |||
| 0356c912e6 | |||
| 7f448bbbb3 | |||
| f940b6f239 | |||
| a3de73dc66 | |||
| 9fa1aa156e | |||
| 03e1a186b8 | |||
| 598372675f | |||
| ffccd2f3d3 | |||
| 4252e13323 | |||
| 7c55cce6ae | |||
| 45caece076 | |||
| 79dc75fc89 | |||
| f9483e14be | |||
| d3396cdb63 | |||
| 3c0d084c28 | |||
| ba220461db | |||
| 0d9d0ff8b0 | |||
| 74d0369cb5 | |||
| 6fbdce86c7 | |||
| 4bfd68b614 | |||
| b57c452648 | |||
| 0fd4dc668a | |||
| 726afed296 | |||
| 5b04e99c33 | |||
| 5632c6f7ab | |||
| 20a076e705 | |||
| fb85af8bbf | |||
| 6a7f3ee2ed | |||
| de4a87658e | |||
| e87f248a12 | |||
| 4f366a4f38 | |||
| 41b1a0571e | |||
| 641fb3964d | |||
| 6a39512e7b | |||
| 06042908e7 | |||
| 8b053be283 | |||
| 16c0f54c46 | |||
| 664f92b26c | |||
| c8dbbcf06a | |||
| 3d275bfe4f | |||
| 92b3de4ccd | |||
| b806c00f56 | |||
| 36ed572100 | |||
| 798b869f30 | |||
| eff50dce03 | |||
| 507a38f3a7 | |||
| e9cb9954f6 | |||
| 168002316b | |||
| 3a52424ccd | |||
| 7864e930c4 | |||
| 6d3050845f | |||
| fb4489da6c | |||
| 37bafd650c | |||
| 143f364ec6 | |||
| 6d99c1fea4 | |||
| 216070c608 | |||
| 2f8d549303 | |||
| 44cca16fec | |||
| 498d213a07 | |||
| 83e249d567 | |||
| 6f1a1b5143 | |||
| a234a425e6 | |||
| b89b05ae2b | |||
| eca3cf7468 | |||
| 077cff30c1 | |||
| 1112983571 | |||
| 3e103bde5a | |||
| b2a93c0a18 | |||
| ec2395145d | |||
| abd2a14c67 | |||
| 6b1a506577 | |||
| d31cab558a | |||
| 7f734a3d54 | |||
| 0b3df8a34d | |||
| 26c08f1945 | |||
| 7005ccf97a | |||
| e138345532 | |||
| 0a581fed4d | |||
| 79cf00fe2f | |||
| 4edc493d36 | |||
| 9f038607b6 | |||
| 170adb5f69 | |||
| 8ab1186a5c | |||
| 34b079c5e7 | |||
| 3421b809a0 | |||
| f053c776a3 | |||
| 1485d73e51 | |||
| 3f66f5aeeb | |||
| fc1e3da5e9 | |||
| bce079db79 | |||
| ab8175b257 | |||
| 908755a669 | |||
| 2e1d4d6325 | |||
| b60a11951f | |||
| 021f7e9732 | |||
| 35b0018180 | |||
| cc5d946c7e | |||
| da3ad5d425 | |||
| ebb525da02 | |||
| 082ec9ebfe | |||
| 84f770db9b | |||
| bef0fa0184 | |||
| 1f4f4729d0 | |||
| 1e7a296c61 | |||
| 7b3ab68d87 | |||
| bfcaaa758a | |||
| c1918a7bfd | |||
| 653f0d6d70 | |||
| 9967b7a3ef | |||
| bd2532755c | |||
| f0bbc60ab6 | |||
| f619dece3b | |||
| cbce52fd83 | |||
| e5a4113968 | |||
| c2ab0c9ec1 | |||
| 434f9e8629 | |||
| 9d5e3d7d94 | |||
| ce749dd094 | |||
| e3baad5c57 | |||
| 05ae932906 | |||
| b2330b6416 | |||
| 9648412bf2 | |||
| 0704326c8e | |||
| ce62c57d5d | |||
| 4ac27c5b95 | |||
| ac899f7f8d | |||
| 82dc4e73ee | |||
| 42ea19a7b0 |
23
.idea/codeStyles/Project.xml
generated
23
.idea/codeStyles/Project.xml
generated
@@ -1,24 +1,12 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<JetCodeStyleSettings>
|
||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
||||
<value>
|
||||
<package name="java.util" alias="false" withSubpackages="false" />
|
||||
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
|
||||
<package name="io.ktor" alias="false" withSubpackages="true" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="PACKAGES_IMPORT_LAYOUT">
|
||||
<value>
|
||||
<package name="" alias="false" withSubpackages="true" />
|
||||
<package name="java" alias="false" withSubpackages="true" />
|
||||
<package name="javax" alias="false" withSubpackages="true" />
|
||||
<package name="kotlin" alias="false" withSubpackages="true" />
|
||||
<package name="" alias="true" withSubpackages="true" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||
</JetCodeStyleSettings>
|
||||
<codeStyleSettings language="XML">
|
||||
<indentOptions>
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||
</indentOptions>
|
||||
<arrangement>
|
||||
<rules>
|
||||
<section>
|
||||
@@ -127,5 +115,8 @@
|
||||
</rules>
|
||||
</arrangement>
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="kotlin">
|
||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</state>
|
||||
</component>
|
||||
15
.idea/jarRepositories.xml
generated
15
.idea/jarRepositories.xml
generated
@@ -11,11 +11,6 @@
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Google" />
|
||||
<option name="name" value="Google" />
|
||||
<option name="url" value="https://maven.google.com/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="BintrayJCenter" />
|
||||
<option name="name" value="BintrayJCenter" />
|
||||
@@ -26,11 +21,21 @@
|
||||
<option name="name" value="maven" />
|
||||
<option name="url" value="https://jitpack.io" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Google" />
|
||||
<option name="name" value="Google" />
|
||||
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenRepo" />
|
||||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Google" />
|
||||
<option name="name" value="Google" />
|
||||
<option name="url" value="https://maven.google.com/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven2" />
|
||||
<option name="name" value="maven2" />
|
||||
|
||||
1
.idea/runConfigurations.xml
generated
1
.idea/runConfigurations.xml
generated
@@ -3,6 +3,7 @@
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
|
||||
10
.idea/runConfigurations/app_base.xml
generated
10
.idea/runConfigurations/app_base.xml
generated
@@ -1,12 +1,13 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app_base" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="app" />
|
||||
<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="DYNAMIC_FEATURES_DISABLED_LIST" value="dynamic_frudis,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
||||
<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="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="default_activity" />
|
||||
<option name="CLEAR_LOGCAT" value="true" />
|
||||
@@ -41,11 +42,16 @@
|
||||
</Native>
|
||||
<Profilers>
|
||||
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
||||
<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>
|
||||
|
||||
10
.idea/runConfigurations/app_frudis.xml
generated
10
.idea/runConfigurations/app_frudis.xml
generated
@@ -1,12 +1,13 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app_frudis" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="app" />
|
||||
<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="DYNAMIC_FEATURES_DISABLED_LIST" value="dynamic__base,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
||||
<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="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="default_activity" />
|
||||
<option name="CLEAR_LOGCAT" value="true" />
|
||||
@@ -41,11 +42,16 @@
|
||||
</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>
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="app" />
|
||||
<configuration default="false" name="app_gramm" 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="DYNAMIC_FEATURES_DISABLED_LIST" value="dynamic_frudis,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
||||
<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="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="SKIP_NOOP_APK_INSTALLATIONS" value="false" />
|
||||
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||
<option name="USE_LAST_SELECTED_DEVICE" value="false" />
|
||||
<option name="PREFERRED_AVD" value="" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
|
||||
<option name="DEBUGGER_TYPE" value="Auto" />
|
||||
@@ -43,11 +42,16 @@
|
||||
</Native>
|
||||
<Profilers>
|
||||
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
||||
<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>
|
||||
10
.idea/runConfigurations/app_ime.xml
generated
10
.idea/runConfigurations/app_ime.xml
generated
@@ -1,12 +1,13 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app_ime" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="app" />
|
||||
<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="DYNAMIC_FEATURES_DISABLED_LIST" value="dynamic__base,dynamic_frudis,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
||||
<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="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="default_activity" />
|
||||
<option name="CLEAR_LOGCAT" value="true" />
|
||||
@@ -41,11 +42,16 @@
|
||||
</Native>
|
||||
<Profilers>
|
||||
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
||||
<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>
|
||||
|
||||
10
.idea/runConfigurations/app_saporiveri.xml
generated
10
.idea/runConfigurations/app_saporiveri.xml
generated
@@ -1,12 +1,13 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app_saporiveri" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="app" />
|
||||
<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="DYNAMIC_FEATURES_DISABLED_LIST" value="dynamic__base,dynamic_frudis,dynamic_ime,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
||||
<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="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="default_activity" />
|
||||
<option name="CLEAR_LOGCAT" value="true" />
|
||||
@@ -41,11 +42,16 @@
|
||||
</Native>
|
||||
<Profilers>
|
||||
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
||||
<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>
|
||||
|
||||
10
.idea/runConfigurations/app_saporiveri_pv.xml
generated
10
.idea/runConfigurations/app_saporiveri_pv.xml
generated
@@ -1,12 +1,13 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app_saporiveri_pv" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="app" />
|
||||
<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="DYNAMIC_FEATURES_DISABLED_LIST" value="dynamic__base,dynamic_frudis,dynamic_ime,dynamic_saporiveri,dynamic_vgalimenti" />
|
||||
<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="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="default_activity" />
|
||||
<option name="CLEAR_LOGCAT" value="true" />
|
||||
@@ -41,11 +42,16 @@
|
||||
</Native>
|
||||
<Profilers>
|
||||
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
||||
<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>
|
||||
|
||||
10
.idea/runConfigurations/app_vglimenti.xml
generated
10
.idea/runConfigurations/app_vglimenti.xml
generated
@@ -1,12 +1,13 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app_vglimenti" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="app" />
|
||||
<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="DYNAMIC_FEATURES_DISABLED_LIST" value="dynamic__base,dynamic_frudis,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv" />
|
||||
<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="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="default_activity" />
|
||||
<option name="CLEAR_LOGCAT" value="true" />
|
||||
@@ -41,11 +42,16 @@
|
||||
</Native>
|
||||
<Profilers>
|
||||
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
||||
<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>
|
||||
|
||||
BIN
Integry.jks
BIN
Integry.jks
Binary file not shown.
129
app/build.gradle
129
app/build.gradle
@@ -1,24 +1,13 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'io.fabric.tools:gradle:1.27.0'
|
||||
}
|
||||
}
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.google.firebase.firebase-perf'
|
||||
apply plugin: 'io.fabric'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 148
|
||||
def appVersionName = '1.12.19'
|
||||
def appVersionCode = 220
|
||||
def appVersionName = '1.17.2'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@@ -31,17 +20,16 @@ android {
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.all { output ->
|
||||
output.outputFileName = "android-release_v2.apk"
|
||||
output.outputFileName = "android-release.apk"
|
||||
}
|
||||
}
|
||||
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion '28.0.3'
|
||||
compileSdkVersion 30
|
||||
|
||||
defaultConfig {
|
||||
applicationId "it.integry.integrywmsnative"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 30
|
||||
versionCode appVersionCode
|
||||
versionName appVersionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@@ -49,18 +37,21 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
ext.enableCrashlytics = false
|
||||
}
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
android.buildFeatures.dataBinding true
|
||||
|
||||
compileOptions {
|
||||
targetCompatibility 1.8
|
||||
sourceCompatibility 1.8
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
productFlavors {
|
||||
}
|
||||
@@ -68,8 +59,8 @@ android {
|
||||
|
||||
build {
|
||||
doLast {
|
||||
delete "$projectDir/build/outputs/apk/release/version_v2.txt"
|
||||
file("$projectDir/build/outputs/apk/release/version_v2.txt").text = appVersionCode + '\n' + appVersionName
|
||||
delete "$projectDir/build/outputs/apk/release/version.txt"
|
||||
file("$projectDir/build/outputs/apk/release/version.txt").text = appVersionCode + '\n' + appVersionName
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,68 +72,72 @@ android {
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
checkReleaseBuilds false
|
||||
}
|
||||
|
||||
dynamicFeatures = [":dynamic__base", ":dynamic_vgalimenti", ":dynamic_ime", ":dynamic_frudis", ":dynamic_saporiveri_pv", ":dynamic_saporiveri"]
|
||||
dynamicFeatures = [":dynamic__base", ":dynamic_vgalimenti", ":dynamic_ime", ":dynamic_frudis", ":dynamic_saporiveri_pv", ":dynamic_saporiveri", ':dynamic_gramm']
|
||||
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1', {
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'com.orhanobut:logger:2.2.0'
|
||||
implementation 'com.google.firebase:firebase-core:17.2.2'
|
||||
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
||||
implementation 'com.google.firebase:firebase-perf:19.0.5'
|
||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
|
||||
//Firebase
|
||||
|
||||
// Import the Firebase BoM
|
||||
implementation platform('com.google.firebase:firebase-bom:26.3.0')
|
||||
implementation 'com.google.firebase:firebase-analytics'
|
||||
implementation 'com.google.firebase:firebase-core'
|
||||
implementation 'com.google.firebase:firebase-crash'
|
||||
implementation 'com.google.firebase:firebase-crashlytics'
|
||||
implementation 'com.google.firebase:firebase-perf'
|
||||
implementation 'com.google.android.gms:play-services-basement:17.6.0'
|
||||
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.1.0-beta01'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
||||
implementation 'com.google.android.material:material:1.3.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'androidx.preference:preference:1.1.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.2.2'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
|
||||
implementation 'com.annimon:stream:1.2.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.0'
|
||||
implementation 'androidx.preference:preference-ktx:1.1.1'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
implementation 'com.annimon:stream:1.2.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0'
|
||||
implementation 'org.apache.commons:commons-text:1.6'
|
||||
//kapt "androidx.lifecycle:lifecycle-compiler:2.0.0"
|
||||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.3.1'
|
||||
implementation 'org.apache.commons:commons-text:1.9'
|
||||
|
||||
//MVVM
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation "androidx.lifecycle:lifecycle-common-java8:2.2.0"
|
||||
implementation 'com.jakewharton.rxbinding2:rxbinding:2.2.0'
|
||||
implementation 'com.jakewharton.rxbinding2:rxbinding-support-v4:2.2.0'
|
||||
implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.2.0'
|
||||
implementation 'com.jakewharton.rxbinding2:rxbinding-design:2.2.0'
|
||||
implementation 'com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:2.2.0'
|
||||
implementation 'br.com.zbra:android-linq:1.1.0'
|
||||
def dagger2_version = '2.29.1'
|
||||
api "com.google.dagger:dagger:$dagger2_version"
|
||||
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
||||
api "com.google.dagger:dagger-android:$dagger2_version"
|
||||
api "com.google.dagger:dagger-android-support:$dagger2_version" // if you use the support libraries
|
||||
annotationProcessor "com.google.dagger:dagger-android-processor:$dagger2_version"
|
||||
|
||||
//FAB
|
||||
implementation 'com.github.clans:fab:1.6.4'
|
||||
//CUSTOM VIEWS
|
||||
implementation 'com.github.NaimishTrivedi:FBToast:1.0'
|
||||
implementation 'de.hdodenhof:circleimageview:3.0.1'
|
||||
implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
|
||||
implementation 'com.github.cachapa:ExpandableLayout:2.9.2'
|
||||
implementation 'com.github.frankiesardo:linearlistview:1.0.1@aar'
|
||||
implementation 'com.github.andrefrsousa:SuperBottomSheet:1.2.1@aar'
|
||||
implementation 'com.fede987:status-bar-alert:1.0.1'
|
||||
implementation 'com.fxn769:stash:1.2'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation 'com.mikhaellopez:lazydatepicker:1.0.0'
|
||||
implementation 'com.github.demoNo:AutoScrollViewPager:v1.0.2'
|
||||
implementation 'com.github.fede87:StatusBarAlert:1.0.1'
|
||||
implementation 'com.github.akshay2211:Stash:master'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
implementation 'com.github.zhukic:sectioned-recyclerview:1.2.3'
|
||||
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
||||
implementation 'com.github.pedromassango:doubleClick:3.0'
|
||||
|
||||
//SQLite ROOM
|
||||
def room_version = "2.2.3"
|
||||
def room_version = "2.3.0"
|
||||
|
||||
implementation "androidx.room:room-runtime:$room_version"
|
||||
annotationProcessor "androidx.room:room-compiler:$room_version"
|
||||
@@ -153,11 +148,15 @@ dependencies {
|
||||
//Barcode
|
||||
implementation project(':pointmobilescannerlibrary')
|
||||
implementation project(':zebrascannerlibrary')
|
||||
implementation project(path: ':barcode_base_android_library')
|
||||
implementation project(path: ':honeywellscannerlibrary')
|
||||
implementation project(':barcode_base_android_library')
|
||||
implementation project(':honeywellscannerlibrary')
|
||||
implementation project(':keyobardemulatorscannerlibrary')
|
||||
androidTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
|
||||
androidTestImplementation 'org.testng:testng:7.4.0'
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
google()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
@@ -14,14 +14,6 @@
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "963231271247-b50hgcd89u9ksfc7189mri044kq8aq1p.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "it.integry.integrywmsnative",
|
||||
"certificate_hash": "864b69dcc40196befa65638a868cec1c61245fa6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "963231271247-59qdc1vobbnjfp135ce4hv12c53s9hse.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
@@ -30,6 +22,14 @@
|
||||
"certificate_hash": "3b6d97a981f446f5011049d781aeb9960f9352af"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "963231271247-b50hgcd89u9ksfc7189mri044kq8aq1p.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "it.integry.integrywmsnative",
|
||||
"certificate_hash": "864b69dcc40196befa65638a868cec1c61245fa6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "963231271247-6jof105pci1g0g7m2e7kjbtrtk2443g4.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
@@ -41,20 +41,13 @@
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"analytics_service": {
|
||||
"status": 1
|
||||
},
|
||||
"appinvite_service": {
|
||||
"status": 2,
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "963231271247-6jof105pci1g0g7m2e7kjbtrtk2443g4.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
"ads_service": {
|
||||
"status": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package it.integry.integrywmsnative.gest.spedizione;
|
||||
|
||||
class SpedizioneViewModelTest {
|
||||
|
||||
@org.junit.jupiter.api.Test
|
||||
void createNewLU() {
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
|
||||
<application
|
||||
android:name=".MainApplication"
|
||||
@@ -17,11 +18,16 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true">
|
||||
android:usesCleartextTraffic="true"
|
||||
android:fullBackupContent="@xml/backup_descriptor">
|
||||
<activity
|
||||
android:name=".gest.spedizione.SpedizioneActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustNothing" />
|
||||
<activity android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity" />
|
||||
<activity
|
||||
android:name=".gest.picking_resi.PickingResiActivity"
|
||||
android:label="@string/activity_ultime_consegne_title"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light" />
|
||||
<activity
|
||||
@@ -36,12 +42,7 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".gest.accettazione_ordine_inevaso.AccettazioneOrdineInevasoActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustNothing" />
|
||||
<activity
|
||||
android:name=".gest.vendita_ordine_inevaso.VenditaOrdineInevasoActivity"
|
||||
android:name=".gest.accettazione_picking.AccettazionePickingActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustNothing" />
|
||||
@@ -60,9 +61,6 @@
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light" />
|
||||
|
||||
<meta-data
|
||||
android:name="io.fabric.ApiKey"
|
||||
android:value="26f0d16c00d20fe74582627c831f26e30646a187" />
|
||||
<meta-data
|
||||
android:name="firebase_crashlytics_collection_enabled"
|
||||
android:value="true" />
|
||||
|
||||
@@ -1,46 +1,51 @@
|
||||
package it.integry.integrywmsnative;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import android.os.Bundle;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.SubMenu;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.class_router.BaseCustomConfiguration;
|
||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
||||
import it.integry.integrywmsnative.core.class_router.configs.BaseMenuConfiguration;
|
||||
import it.integry.integrywmsnative.core.class_router.configs.MenuConfiguration;
|
||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||
import it.integry.integrywmsnative.core.data_store.db.AppDatabase;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||
import it.integry.integrywmsnative.core.expansion.OnSingleClickListener;
|
||||
import it.integry.integrywmsnative.core.interfaces.IFilterableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ILifecycleFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
|
||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ISearcableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ISelectAllFragment;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||
import it.integry.integrywmsnative.core.update.UpdatesManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityContext;
|
||||
import it.integry.integrywmsnative.core.utility.UtilitySettings;
|
||||
import it.integry.integrywmsnative.databinding.ActivityMainBinding;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.gest.login.LoginActivity;
|
||||
import it.integry.integrywmsnative.gest.main.MainFragment;
|
||||
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
||||
@@ -53,16 +58,28 @@ public class MainActivity extends BaseActivity
|
||||
private boolean firstCheckExecution = true;
|
||||
private boolean mIsOnline = false;
|
||||
|
||||
@Inject
|
||||
AppDatabase mAppDatabase;
|
||||
|
||||
@Inject
|
||||
ColliDataRecoverService mColliDataRecoverService;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
MainApplication.appComponent
|
||||
.mainActivityComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
mColliDataRecoverService.init(this);
|
||||
|
||||
mBinding = DataBindingUtil.inflate(LayoutInflater.from(this), R.layout.activity_main, null, false);
|
||||
setContentView(mBinding.getRoot());
|
||||
|
||||
UpdatesManager.init(this);
|
||||
UtilityContext.initMainActivity(this);
|
||||
|
||||
setSupportActionBar(mBinding.appBarMain.toolbar);
|
||||
getSupportActionBar().setDisplayShowTitleEnabled(false);
|
||||
@@ -90,6 +107,22 @@ public class MainActivity extends BaseActivity
|
||||
startActivity(myIntent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
return true;
|
||||
}
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
onBackPressed();
|
||||
return true;
|
||||
}
|
||||
return super.onKeyUp(keyCode, event);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@@ -103,7 +136,10 @@ public class MainActivity extends BaseActivity
|
||||
if (count == 0) {
|
||||
super.onBackPressed();
|
||||
} else {
|
||||
pop();
|
||||
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.frame_container);
|
||||
if (fragment instanceof ILifecycleFragment) {
|
||||
((ILifecycleFragment) fragment).onPreDestroy(this::pop);
|
||||
} else pop();
|
||||
// getSupportFragmentManager().popBackStack();
|
||||
|
||||
}
|
||||
@@ -133,7 +169,7 @@ public class MainActivity extends BaseActivity
|
||||
BaseMenuConfiguration.MenuItem menuItem = getMenuItem(id);
|
||||
|
||||
if(menuItem != null) {
|
||||
fragment = menuItem.getFragmentClass();
|
||||
fragment = menuItem.getFragmentFactory().run();
|
||||
this.adaptViewToFragment(fragment);
|
||||
} else {
|
||||
switch (id) {
|
||||
@@ -147,8 +183,8 @@ public class MainActivity extends BaseActivity
|
||||
break;
|
||||
|
||||
case R.id.nav_logout:
|
||||
UtilitySettings.logout();
|
||||
ServerStatusChecker.dispose();
|
||||
UtilitySettings.logout();
|
||||
|
||||
startLoginActivity();
|
||||
break;
|
||||
@@ -233,9 +269,6 @@ public class MainActivity extends BaseActivity
|
||||
for(int i = 0; i < count; i++) {
|
||||
getSupportFragmentManager().popBackStack();
|
||||
}
|
||||
|
||||
openMain();
|
||||
|
||||
}
|
||||
|
||||
private void adaptViewToFragment(Fragment fragment){
|
||||
@@ -252,6 +285,11 @@ public class MainActivity extends BaseActivity
|
||||
mBinding.appBarMain.toolbarTitleLeft.setVisibility(View.VISIBLE);
|
||||
return false;
|
||||
});
|
||||
|
||||
((ISearcableFragment) fragment).addOnPreDestroy(() -> {
|
||||
mBinding.appBarMain.mainSearch.setIconified(true);
|
||||
mBinding.appBarMain.mainSearch.setVisibility(View.GONE);
|
||||
});
|
||||
} else {
|
||||
mBinding.appBarMain.mainSearch.setOnQueryTextListener(null);
|
||||
mBinding.appBarMain.mainSearch.setVisibility(View.GONE);
|
||||
@@ -264,6 +302,10 @@ public class MainActivity extends BaseActivity
|
||||
mBinding.appBarMain.toolbarTitleCenteredLayout.setVisibility(View.GONE);
|
||||
mBinding.appBarMain.toolbarTitleLeft.setVisibility(View.VISIBLE);
|
||||
((ITitledFragment) fragment).onCreateActionBar(mBinding.appBarMain.toolbarTitleLeft, this);
|
||||
((ITitledFragment) fragment).addOnPreDestroy(() -> {
|
||||
mBinding.appBarMain.toolbarTitleCenteredLayout.setVisibility(View.VISIBLE);
|
||||
mBinding.appBarMain.toolbarTitleLeft.setVisibility(View.GONE);
|
||||
});
|
||||
} else {
|
||||
mBinding.appBarMain.toolbarTitleCenteredLayout.setVisibility(View.VISIBLE);
|
||||
mBinding.appBarMain.toolbarTitleLeft.setVisibility(View.GONE);
|
||||
@@ -271,22 +313,38 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
if(fragment instanceof IScrollableFragment) {
|
||||
((IScrollableFragment) fragment).setScrollToolbar(mBinding.appBarMain.elevatedToolbar);
|
||||
((IScrollableFragment) fragment).setOnPreDestroy(() -> {
|
||||
((IScrollableFragment) fragment).addOnPreDestroy(() -> {
|
||||
mBinding.appBarMain.elevatedToolbar.resetAll();
|
||||
});
|
||||
}
|
||||
|
||||
if(fragment instanceof ISelectAllFragment && ((ISelectAllFragment)fragment).isEnabled()) {
|
||||
if(fragment instanceof ISelectAllFragment && ((ISelectAllFragment)fragment).isSelectAllButtonEnabled()) {
|
||||
mBinding.appBarMain.mainSelectAll.setVisibility(View.VISIBLE);
|
||||
mBinding.appBarMain.mainSelectAll.setOnClickListener(v -> ((ISelectAllFragment)fragment).onSelectAll());
|
||||
} else {
|
||||
mBinding.appBarMain.mainSelectAll.setVisibility(View.GONE);
|
||||
mBinding.appBarMain.mainSelectAll.setOnClickListener(null);
|
||||
mBinding.appBarMain.mainSelectAll.setOnClickListener(new OnSingleClickListener() {
|
||||
@Override
|
||||
public void onSingleClick(View v) {
|
||||
((ISelectAllFragment)fragment).onSelectAll();
|
||||
}
|
||||
});
|
||||
((ISelectAllFragment) fragment).addOnPreDestroy(() -> {
|
||||
mBinding.appBarMain.mainSelectAll.setVisibility(View.GONE);
|
||||
mBinding.appBarMain.mainSelectAll.setOnClickListener(null);
|
||||
});
|
||||
}
|
||||
|
||||
if(fragment instanceof IFilterableFragment) {
|
||||
mBinding.appBarMain.mainFilter.setVisibility(View.VISIBLE);
|
||||
mBinding.appBarMain.mainFilter.setOnClickListener(v -> ((IFilterableFragment)fragment).onFilterClick());
|
||||
mBinding.appBarMain.mainFilter.setOnClickListener(new OnSingleClickListener() {
|
||||
@Override
|
||||
public void onSingleClick(View v) {
|
||||
((IFilterableFragment)fragment).onFilterClick();
|
||||
}
|
||||
});
|
||||
|
||||
((IFilterableFragment)fragment).addOnPreDestroy(() -> {
|
||||
mBinding.appBarMain.mainFilter.setVisibility(View.GONE);
|
||||
mBinding.appBarMain.mainFilter.setOnClickListener(null);
|
||||
});
|
||||
} else {
|
||||
mBinding.appBarMain.mainFilter.setVisibility(View.GONE);
|
||||
mBinding.appBarMain.mainFilter.setOnClickListener(null);
|
||||
@@ -315,23 +373,23 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
private void init(){
|
||||
|
||||
ServerStatusChecker.getInstance().addCallback(value -> {
|
||||
if(value && (!mIsOnline || firstCheckExecution)){
|
||||
|
||||
SettingsManager.loadDBVariables(() -> {
|
||||
mIsOnline = true;
|
||||
firstCheckExecution = false;
|
||||
|
||||
}, ex -> {
|
||||
//mNoConnectionLayout.expand(true);
|
||||
if(mIsOnline) mIsOnline = false;
|
||||
}
|
||||
);
|
||||
|
||||
} else if(!value && mIsOnline){
|
||||
mIsOnline = false;
|
||||
}
|
||||
});
|
||||
// ServerStatusChecker.getInstance().addCallback(value -> {
|
||||
// if(value && (!mIsOnline || firstCheckExecution)){
|
||||
//
|
||||
// SettingsManager.loadDBVariables(() -> {
|
||||
// mIsOnline = true;
|
||||
// firstCheckExecution = false;
|
||||
//
|
||||
// }, ex -> {
|
||||
// //mNoConnectionLayout.expand(true);
|
||||
// if(mIsOnline) mIsOnline = false;
|
||||
// }
|
||||
// );
|
||||
//
|
||||
// } else if(!value && mIsOnline){
|
||||
// mIsOnline = false;
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package it.integry.integrywmsnative;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface MainActivityComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
|
||||
MainActivityComponent create();
|
||||
}
|
||||
|
||||
void inject(MainActivity mainActivity);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative;
|
||||
|
||||
import dagger.Module;
|
||||
|
||||
@Module(subcomponents = MainActivityComponent.class)
|
||||
public class MainActivityModule {
|
||||
}
|
||||
@@ -5,19 +5,20 @@ import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import it.integry.integrywmsnative.core.context.AppContext;
|
||||
import it.integry.integrywmsnative.core.data_store.db.AppDatabase;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.ArticoloGrigliaDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.ArticoloOrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.GrigliaDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.RoomModule;
|
||||
|
||||
|
||||
public class MainApplication extends Application {
|
||||
|
||||
public static Resources res;
|
||||
|
||||
// Reference to the application graph that is used across the whole app
|
||||
public static MainApplicationComponent appComponent;
|
||||
public static MainApplicationModule appModule;
|
||||
public static RoomModule roomModule;
|
||||
|
||||
private AppContext appContext = new AppContext(this);
|
||||
|
||||
private static AppDatabase appDb;
|
||||
|
||||
|
||||
// Called when the application is starting, before any other application objects have been created.
|
||||
@@ -26,11 +27,16 @@ public class MainApplication extends Application {
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
appModule = new MainApplicationModule(MainApplication.this, this);
|
||||
roomModule = new RoomModule(this);
|
||||
appComponent = DaggerMainApplicationComponent.builder()
|
||||
.mainApplicationModule(appModule)
|
||||
.roomModule(roomModule)
|
||||
.build();
|
||||
|
||||
appComponent.inject(appContext);
|
||||
|
||||
appContext.init();
|
||||
|
||||
appDb = AppDatabase.getDatabase(this);
|
||||
//Stash.init(this);
|
||||
|
||||
res = getResources();
|
||||
}
|
||||
|
||||
@@ -49,25 +55,8 @@ public class MainApplication extends Application {
|
||||
super.onLowMemory();
|
||||
}
|
||||
|
||||
|
||||
// DATABASE REPOSITORY FUNCTIONS
|
||||
public static GrigliaDao getGrigliaRepository() {
|
||||
return appDb.grigliaDao();
|
||||
public static void exit() {
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
public static ArticoloGrigliaDao getArticoliGrigliaRepository() {
|
||||
return appDb.articoloGrigliaDao();
|
||||
}
|
||||
|
||||
public static OrdineDao getOrdiniRepository() {
|
||||
return appDb.ordineDao();
|
||||
}
|
||||
|
||||
public static ArticoloOrdineDao getArticoliOrdineRepository() {
|
||||
return appDb.articoloOrdineDao();
|
||||
}
|
||||
|
||||
public static void clearDB() {
|
||||
new Thread(() -> appDb.clearAllTables()).start();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
package it.integry.integrywmsnative;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import dagger.Component;
|
||||
import it.integry.integrywmsnative.core.context.AppContext;
|
||||
import it.integry.integrywmsnative.core.data_store.db.RoomModule;
|
||||
import it.integry.integrywmsnative.gest.accettazione_picking.AccettazionePickingComponent;
|
||||
import it.integry.integrywmsnative.gest.accettazione_picking.AccettazionePickingModule;
|
||||
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.OrdiniUscitaElencoComponent;
|
||||
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.OrdiniUscitaElencoModule;
|
||||
import it.integry.integrywmsnative.gest.picking_libero.PickingLiberoComponent;
|
||||
import it.integry.integrywmsnative.gest.picking_libero.PickingLiberoModule;
|
||||
import it.integry.integrywmsnative.gest.picking_resi.PickingResiComponent;
|
||||
import it.integry.integrywmsnative.gest.picking_resi.PickingResiModule;
|
||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdComponent;
|
||||
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.DialogAskMagazzinoProssimitaModule;
|
||||
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_ordini_acquisto.PVOrdineAcquistoGrigliaComponent;
|
||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdineAcquistoGrigliaModule;
|
||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeComponent;
|
||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeModule;
|
||||
import it.integry.integrywmsnative.gest.spedizione.SpedizioneComponent;
|
||||
import it.integry.integrywmsnative.gest.spedizione.SpedizioneModule;
|
||||
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.prod_fabbisogno_linee_prod.DialogRowInfoProdFabbisognoLineeProdComponent;
|
||||
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.prod_fabbisogno_linee_prod.DialogRowInfoProdFabbisognoLineeProdModule;
|
||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteComponent;
|
||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteModule;
|
||||
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreComponent;
|
||||
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreModule;
|
||||
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceComponent;
|
||||
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.DialogChooseBatchLotModule;
|
||||
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.scan_art.DialogScanArtComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUModule;
|
||||
|
||||
// Definition of the Application graph
|
||||
@Singleton
|
||||
@Component(modules = {
|
||||
MainApplicationModule.class,
|
||||
RoomModule.class,
|
||||
MainActivityModule.class,
|
||||
PVOrdineAcquistoGrigliaModule.class,
|
||||
PVOrdineAcquistoEditModule.class,
|
||||
PickingLiberoModule.class,
|
||||
RettificaGiacenzeModule.class,
|
||||
SpedizioneModule.class,
|
||||
AccettazionePickingModule.class,
|
||||
UltimeConsegneClienteModule.class,
|
||||
UltimiArriviFornitoreModule.class,
|
||||
PickingResiModule.class,
|
||||
OrdiniUscitaElencoModule.class,
|
||||
DialogInputQuantityV2Module.class,
|
||||
DialogScanArtModule.class,
|
||||
DialogScanOrCreateLUModule.class,
|
||||
ProdFabbisognoLineeProdModule.class,
|
||||
VersamentoMerceModule.class,
|
||||
DialogAskMagazzinoProssimitaModule.class,
|
||||
DialogChooseBatchLotModule.class,
|
||||
DialogRowInfoProdFabbisognoLineeProdModule.class})
|
||||
public interface MainApplicationComponent {
|
||||
|
||||
MainActivityComponent.Factory mainActivityComponent();
|
||||
PVOrdineAcquistoGrigliaComponent.Factory pvOrdineAcquistoGrigliaComponent();
|
||||
PVOrdineAcquistoEditComponent.Factory pvOrdineAcquistoEditComponent();
|
||||
PickingLiberoComponent.Factory pickingLiberoComponent();
|
||||
RettificaGiacenzeComponent.Factory rettificaGiacenzeComponent();
|
||||
SpedizioneComponent.Factory spedizioneComponent();
|
||||
AccettazionePickingComponent.Factory accettazionePickingComponent();
|
||||
UltimeConsegneClienteComponent.Factory ultimeConsegneClienteComponent();
|
||||
UltimiArriviFornitoreComponent.Factory ultimiArriviFornitoreComponent();
|
||||
PickingResiComponent.Factory pickingResiComponent();
|
||||
OrdiniUscitaElencoComponent.Factory prodOrdineLavorazioneElencoComponent();
|
||||
DialogInputQuantityV2Component.Factory dialogInputQuantityV2Component();
|
||||
DialogScanArtComponent.Factory dialogScanArtComponent();
|
||||
DialogScanOrCreateLUComponent.Factory dialogScanOrCreateLUComponent();
|
||||
ProdFabbisognoLineeProdComponent.Factory prodFabbisognoLineeProdComponent();
|
||||
VersamentoMerceComponent.Factory versamentoMerceComponent();
|
||||
DialogAskMagazzinoProssimitaComponent.Factory dialogAskMagazzinoProssimitaComponent();
|
||||
DialogChooseBatchLotComponent.Factory dialogChooseBatchLotComponent();
|
||||
DialogRowInfoProdFabbisognoLineeProdComponent.Factory dialogRowInfoProdFabbisognoLineeProdComponent();
|
||||
|
||||
|
||||
void inject(AppContext appContext);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package it.integry.integrywmsnative;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.rest.ProdFabbisognoLineeProdRESTConsumer;
|
||||
|
||||
@Module
|
||||
public class MainApplicationModule {
|
||||
|
||||
private final Context mContext;
|
||||
private final Application mApplication;
|
||||
|
||||
public MainApplicationModule(Context context, Application application) {
|
||||
this.mContext = context;
|
||||
this.mApplication = application;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
Application providesApplication() {
|
||||
return mApplication;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ColliDataRecoverService provideColliDataRecoverService() {
|
||||
return new ColliDataRecoverService();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
OrdiniRESTConsumer provideOrdiniRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
|
||||
return new OrdiniRESTConsumer(systemRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
GestSetupRESTConsumer provideGestSetupRESTConsumer() {
|
||||
return new GestSetupRESTConsumer();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ArticoloRESTConsumer provideArticoloRESTConsumer() {
|
||||
return new ArticoloRESTConsumer();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ColliMagazzinoRESTConsumer provideColliMagazzinoRESTConsumer(ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
return new ColliMagazzinoRESTConsumer(articoloRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
BarcodeRESTConsumer provideBarcodeRESTConsumer() {
|
||||
return new BarcodeRESTConsumer();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
PrinterRESTConsumer providePrinterRESTConsumer() {
|
||||
return new PrinterRESTConsumer();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
SystemRESTConsumer provideSystemRESTConsumer() {
|
||||
return new SystemRESTConsumer();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
PosizioniRESTConsumer providesPosizioniRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
|
||||
return new PosizioniRESTConsumer(systemRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ProdFabbisognoLineeProdRESTConsumer providesProdFabbisognoLineeProdRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
|
||||
return new ProdFabbisognoLineeProdRESTConsumer(systemRESTConsumer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -6,22 +6,21 @@ import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import it.integry.integrywmsnative.core.context.MainContext;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.PermissionsHelper;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityContext;
|
||||
import it.integry.integrywmsnative.databinding.ActivitySplashBinding;
|
||||
import it.integry.integrywmsnative.gest.login.LoginActivity;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
|
||||
public class SplashActivity extends BaseActivity {
|
||||
|
||||
@@ -39,6 +38,8 @@ public class SplashActivity extends BaseActivity {
|
||||
mBinding = DataBindingUtil.inflate(LayoutInflater.from(this), R.layout.activity_splash, null, false);
|
||||
setContentView(mBinding.getRoot());
|
||||
|
||||
UtilityContext.initMainActivity(this);
|
||||
|
||||
initAppVersion();
|
||||
|
||||
initPermissions(this::init);
|
||||
@@ -49,10 +50,10 @@ public class SplashActivity extends BaseActivity {
|
||||
onComplete.run();
|
||||
}, permanentlyDenied -> {
|
||||
if(permanentlyDenied) {
|
||||
DialogSimpleMessageHelper.makeErrorDialog(this,
|
||||
new SpannableString(getText(R.string.permissions_permanently_denied)), null, () -> {
|
||||
DialogSimpleMessageView.makeErrorDialog(new SpannableString(getText(R.string.permissions_permanently_denied)), null, () -> {
|
||||
this.finish();
|
||||
}).show();
|
||||
})
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
} else {
|
||||
initPermissions(onComplete);
|
||||
}
|
||||
@@ -93,6 +94,7 @@ public class SplashActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
if(this.onRequestPermissionResult != null) {
|
||||
List<Integer> grantResultsList = new ArrayList<>();
|
||||
for(int i = 0; i < grantResults.length; i++) {
|
||||
|
||||
@@ -13,11 +13,13 @@ public class BaseCustomConfiguration implements ICustomConfiguration {
|
||||
public static int MENU_CONFIGURATION = 0;
|
||||
public static int FLAG_SHOW_COD_FORN_IN_SPEDIZIONE = 1;
|
||||
public static int CUSTOM_DYNAMIC_VERSION_PATH = 2;
|
||||
public static int FLAG_SPEDIZIONE_GROUP_BY_GRP_MERC = 3;
|
||||
}
|
||||
|
||||
protected HashMap<Integer, Object> configurations = new HashMap<Integer, Object>() {{
|
||||
put(Keys.MENU_CONFIGURATION, new MenuConfiguration());
|
||||
put(Keys.FLAG_SHOW_COD_FORN_IN_SPEDIZIONE, true);
|
||||
put(Keys.FLAG_SPEDIZIONE_GROUP_BY_GRP_MERC, false);
|
||||
}};
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.class_router.exceptions.MethodPathNotRegisteredException;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
|
||||
public class ClassRouter {
|
||||
|
||||
@@ -20,7 +19,7 @@ public class ClassRouter {
|
||||
|
||||
private static Context context;
|
||||
|
||||
private static List<Pair<PATH, Class>> mRouteClasses = new ArrayList<>();
|
||||
private static List<Pair<PATH, Object>> mRouteClasses = new ArrayList<>();
|
||||
|
||||
public static void init(Context context) {
|
||||
ClassRouter.context = context;
|
||||
@@ -50,7 +49,13 @@ public class ClassRouter {
|
||||
//throw new MethodPathAlreadyDeclaredException(path);
|
||||
}
|
||||
|
||||
mRouteClasses.add(new Pair<>(path, clazz));
|
||||
try {
|
||||
mRouteClasses.add(new Pair<>(path, clazz.newInstance()));
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InstantiationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void deregisterPath(PATH path) {
|
||||
@@ -67,11 +72,11 @@ public class ClassRouter {
|
||||
throw new MethodPathNotRegisteredException(path);
|
||||
}
|
||||
|
||||
Class clazz = mRouteClasses.get(getClassIndex(path)).second;
|
||||
Object instance = mRouteClasses.get(getClassIndex(path)).second;
|
||||
|
||||
return (T)clazz.newInstance();
|
||||
return (T)instance;
|
||||
|
||||
} catch (InstantiationException | MethodPathNotRegisteredException | IllegalAccessException ex) {
|
||||
} catch (MethodPathNotRegisteredException ex) {
|
||||
// UtilityExceptions.defaultException(null, ex, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import androidx.fragment.app.Fragment;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableWithReturn;
|
||||
|
||||
public class BaseMenuConfiguration {
|
||||
|
||||
|
||||
@@ -65,7 +67,7 @@ public class BaseMenuConfiguration {
|
||||
@StringRes private int mTitleText;
|
||||
@DrawableRes private int mTitleIcon;
|
||||
@DrawableRes private int mDrawerIcon;
|
||||
private Fragment fragmentClass;
|
||||
private RunnableWithReturn<Fragment> fragmentFactory;
|
||||
|
||||
public int getID() {
|
||||
return mID;
|
||||
@@ -103,12 +105,12 @@ public class BaseMenuConfiguration {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Fragment getFragmentClass() {
|
||||
return fragmentClass;
|
||||
public RunnableWithReturn<Fragment> getFragmentFactory() {
|
||||
return fragmentFactory;
|
||||
}
|
||||
|
||||
public MenuItem setFragmentClass(Fragment fragmentClass) {
|
||||
this.fragmentClass = fragmentClass;
|
||||
public MenuItem setFragmentFactory(RunnableWithReturn<Fragment> fragmentFactory) {
|
||||
this.fragmentFactory = fragmentFactory;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,127 +1,137 @@
|
||||
package it.integry.integrywmsnative.core.class_router.configs;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneFragment;
|
||||
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.OrdiniUscitaElencoFragment;
|
||||
import it.integry.integrywmsnative.gest.picking_libero.PickingLiberoFragment;
|
||||
import it.integry.integrywmsnative.gest.prod_accettazione_ord_produzione.ProdOrdineProduzioneElencoFragment;
|
||||
import it.integry.integrywmsnative.gest.prod_pick_ord_lavorazione.ProdOrdineLavorazioneElencoFragment;
|
||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdFragment;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.ProdRecuperoMaterialeFragment;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeFragment;
|
||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeFragment;
|
||||
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreFragment;
|
||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteFragment;
|
||||
import it.integry.integrywmsnative.gest.vendita.MainVenditaFragment;
|
||||
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreFragment;
|
||||
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceFragment;
|
||||
|
||||
public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
|
||||
|
||||
|
||||
public MenuConfiguration() {
|
||||
|
||||
this
|
||||
.addGroup(
|
||||
new MenuGroup()
|
||||
.setGroupText(R.string.purchase)
|
||||
.setGroupId(R.id.nav_group_acquisto)
|
||||
.addGroup(
|
||||
new MenuGroup()
|
||||
.setGroupText(R.string.purchase)
|
||||
.setGroupId(R.id.nav_group_acquisto)
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_accettazione)
|
||||
.setTitleText(R.string.accettazione_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_accettazione)
|
||||
.setDrawerIcon(R.drawable.ic_black_download)
|
||||
.setFragmentClass(MainAccettazioneFragment.newInstance()))
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_accettazione)
|
||||
.setTitleText(R.string.accettazione_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_accettazione)
|
||||
.setDrawerIcon(R.drawable.ic_black_download)
|
||||
.setFragmentFactory(MainAccettazioneFragment::newInstance))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_resi_fornitore)
|
||||
.setTitleText(R.string.fragment_ultime_arrivi_fornitore_title)
|
||||
.setTitleIcon(R.drawable.ic_latest_delivery)
|
||||
.setDrawerIcon(R.drawable.ic_black_latest_delivery)
|
||||
.setFragmentClass(UltimiArriviFornitoreFragment.newInstance()))
|
||||
).addGroup(
|
||||
new MenuGroup()
|
||||
.setGroupText(R.string.checkout)
|
||||
.setGroupId(R.id.nav_group_spedizione)
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_resi_fornitore)
|
||||
.setTitleText(R.string.fragment_ultime_arrivi_fornitore_title)
|
||||
.setTitleIcon(R.drawable.ic_latest_delivery)
|
||||
.setDrawerIcon(R.drawable.ic_black_latest_delivery)
|
||||
.setFragmentFactory(UltimiArriviFornitoreFragment::newInstance))
|
||||
).addGroup(
|
||||
new MenuGroup()
|
||||
.setGroupText(R.string.checkout)
|
||||
.setGroupId(R.id.nav_group_spedizione)
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_spedizione)
|
||||
.setTitleText(R.string.vendita_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_spedizione)
|
||||
.setDrawerIcon(R.drawable.ic_black_upload)
|
||||
.setFragmentClass(MainVenditaFragment.newInstance()))
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_spedizione)
|
||||
.setTitleText(R.string.vendita_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_spedizione)
|
||||
.setDrawerIcon(R.drawable.ic_black_upload)
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1, null)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_free_picking)
|
||||
.setTitleText(R.string.free_picking)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_picking_libero)
|
||||
.setDrawerIcon(R.drawable.ic_black_barcode_scanner)
|
||||
.setFragmentClass(PickingLiberoFragment.newInstance()))
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_free_picking)
|
||||
.setTitleText(R.string.free_picking)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_picking_libero)
|
||||
.setDrawerIcon(R.drawable.ic_black_barcode_scanner)
|
||||
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(GestioneEnum.VENDITA)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_resi_cliente)
|
||||
.setTitleText(R.string.fragment_ultime_consegne_cliente_title)
|
||||
.setTitleIcon(R.drawable.ic_latest_delivery_customer)
|
||||
.setDrawerIcon(R.drawable.ic_black_latest_delivery)
|
||||
.setFragmentClass(UltimeConsegneClienteFragment.newInstance()))
|
||||
).addGroup(new MenuGroup()
|
||||
.setGroupText(R.string.manufacture)
|
||||
.setGroupId(R.id.nav_group_produzione)
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_resi_cliente)
|
||||
.setTitleText(R.string.fragment_ultime_consegne_cliente_title)
|
||||
.setTitleIcon(R.drawable.ic_latest_delivery_customer)
|
||||
.setDrawerIcon(R.drawable.ic_black_latest_delivery)
|
||||
.setFragmentFactory(UltimeConsegneClienteFragment::newInstance))
|
||||
).addGroup(new MenuGroup()
|
||||
.setGroupText(R.string.manufacture)
|
||||
.setGroupId(R.id.nav_group_produzione)
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_ordine_produzione)
|
||||
.setTitleText(R.string.prod_ordine_produzione_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_accettazione)
|
||||
.setDrawerIcon(R.drawable.ic_black_external)
|
||||
.setFragmentClass(ProdOrdineProduzioneElencoFragment.newInstance()))
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_ordine_produzione)
|
||||
.setTitleText(R.string.prod_ordine_produzione_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_prod_accettazione_produzione)
|
||||
.setDrawerIcon(R.drawable.ic_black_external)
|
||||
.setFragmentFactory(ProdOrdineProduzioneElencoFragment::newInstance))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_ordine_lavorazione)
|
||||
.setTitleText(R.string.prod_ordine_lavorazione_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_spedizione)
|
||||
.setDrawerIcon(R.drawable.ic_black_external)
|
||||
.setFragmentClass(ProdOrdineLavorazioneElencoFragment.newInstance()))
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_ordine_lavorazione)
|
||||
.setTitleText(R.string.prod_ordine_lavorazione_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_prod_picking_lavorazione)
|
||||
.setDrawerIcon(R.drawable.ic_black_external)
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.PRODUZIONE, GestioneEnum.LAVORAZIONE, -1, null)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_versamento_materiale)
|
||||
.setTitleText(R.string.prod_versamento_materiale_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_prod_versamento_materiale)
|
||||
.setDrawerIcon(R.drawable.ic_black_external)
|
||||
.setFragmentClass(ProdVersamentoMaterialeFragment.newInstance()))
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_free_lav_picking)
|
||||
.setTitleText(it.integry.integrywmsnative.R.string.free_lav_picking)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_prod_picking_libero)
|
||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_barcode_scanner)
|
||||
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(GestioneEnum.LAVORAZIONE)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_recupero_materiale)
|
||||
.setTitleText(R.string.prod_recupero_materiale_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_prod_recupero_materiale)
|
||||
.setDrawerIcon(R.drawable.ic_black_external)
|
||||
.setFragmentClass(ProdRecuperoMaterialeFragment.newInstance()))
|
||||
)
|
||||
.addGroup(
|
||||
new MenuGroup()
|
||||
.setGroupText(R.string.internal_handling)
|
||||
.setGroupId(R.id.nav_group_movimentazione_interna)
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_posizionamento_da_ord)
|
||||
.setTitleText(R.string.prod_fabbisogno_linee_prod_title)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_prod_versamento_merce)
|
||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_load_shelf)
|
||||
.setFragmentFactory(ProdFabbisognoLineeProdFragment::newInstance))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_versamento_merce)
|
||||
.setTitleText(R.string.versamento_merce_fragment_title)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_versamento_merce)
|
||||
.setDrawerIcon(R.drawable.ic_black_load_shelf)
|
||||
.setFragmentClass(VersamentoMerceFragment.newInstance()))
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_versamento_materiale)
|
||||
.setTitleText(R.string.prod_versamento_materiale_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_prod_versamento_materiale)
|
||||
.setDrawerIcon(R.drawable.ic_black_external)
|
||||
.setFragmentFactory(ProdVersamentoMaterialeFragment::newInstance))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_rettifica_giacenze)
|
||||
.setTitleText(R.string.rettifica_giacenze_fragment_title)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_rettifica_giacenze)
|
||||
.setDrawerIcon(R.drawable.ic_black_empty_box)
|
||||
.setFragmentClass(RettificaGiacenzeFragment.newInstance()))
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_recupero_materiale)
|
||||
.setTitleText(R.string.prod_recupero_materiale_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_prod_recupero_materiale)
|
||||
.setDrawerIcon(R.drawable.ic_black_external)
|
||||
.setFragmentFactory(ProdRecuperoMaterialeFragment::newInstance))
|
||||
)
|
||||
.addGroup(
|
||||
new MenuGroup()
|
||||
.setGroupText(R.string.internal_handling)
|
||||
.setGroupId(R.id.nav_group_movimentazione_interna)
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_versamento_merce)
|
||||
.setTitleText(R.string.versamento_merce_fragment_title)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_versamento_merce)
|
||||
.setDrawerIcon(R.drawable.ic_black_load_shelf)
|
||||
.setFragmentFactory(VersamentoMerceFragment::newInstance))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_rettifica_giacenze)
|
||||
.setTitleText(R.string.rettifica_giacenze_fragment_title)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_rettifica_giacenze)
|
||||
.setDrawerIcon(R.drawable.ic_black_empty_box)
|
||||
.setFragmentFactory(RettificaGiacenzeFragment::newInstance))
|
||||
|
||||
|
||||
);
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
package it.integry.integrywmsnative.core.class_router.interfaces;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.app.ProgressDialog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||
|
||||
public interface IOrdiniVendita {
|
||||
|
||||
void distribuisciCollo(Dialog progress, MtbColt mtbColt, List<OrdineVenditaInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed);
|
||||
void distribuisciCollo(MtbColt mtbColt, List<OrdineUscitaInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,16 +2,19 @@ package it.integry.integrywmsnative.core.context;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.crashlytics.android.Crashlytics;
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||
import com.orhanobut.logger.AndroidLogAdapter;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import io.fabric.sdk.android.Fabric;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecover;
|
||||
import it.integry.integrywmsnative.core.data_store.db.AppDatabase;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.settings.Stash;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityContext;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
import it.integry.integrywmsnative.core.utility.UtilitySettings;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||
|
||||
@@ -20,6 +23,9 @@ public class AppContext {
|
||||
//Note: this is the Application Context NOT the Activity Context
|
||||
private final Context mContext;
|
||||
|
||||
@Inject
|
||||
AppDatabase mAppDatabase;
|
||||
|
||||
public AppContext(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
@@ -34,8 +40,6 @@ public class AppContext {
|
||||
this.initCrashlytics();
|
||||
|
||||
this.initLogger();
|
||||
|
||||
this.initRecoverColli();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,30 +51,28 @@ public class AppContext {
|
||||
|
||||
private void initCrashlytics() {
|
||||
if(!BuildConfig.DEBUG) {
|
||||
Fabric.with(mContext, new Crashlytics());
|
||||
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
|
||||
|
||||
if( SettingsManager.isInstanceAvailable() &&
|
||||
(SettingsManager.i().userSession != null && !UtilityString.isNullOrEmpty(SettingsManager.i().userSession.profileDB)) &&
|
||||
(SettingsManager.i().user != null && !UtilityString.isNullOrEmpty(SettingsManager.i().user.fullname))) {
|
||||
(SettingsManager.i().getUserSession() != null && !UtilityString.isNullOrEmpty(SettingsManager.i().getUserSession().getProfileDB())) &&
|
||||
(SettingsManager.i().getUser() != null && !UtilityString.isNullOrEmpty(SettingsManager.i().getUser().getFullname()))) {
|
||||
|
||||
Crashlytics.setString("user_fullname", SettingsManager.i().user.fullname);
|
||||
Crashlytics.setString("profile_db", SettingsManager.i().userSession.profileDB);
|
||||
crashlytics.setUserId(SettingsManager.i().getUser().getFullname());
|
||||
crashlytics.setCustomKey("profile_db", SettingsManager.i().getUserSession().getProfileDB());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void initUtilities() {
|
||||
UtilityContext.initApplicationContext(mContext);
|
||||
UtilityResources.init(mContext);
|
||||
UtilityToast.init(mContext);
|
||||
UtilitySettings.init(mAppDatabase);
|
||||
}
|
||||
|
||||
private void initLogger() {
|
||||
Logger.addLogAdapter(new AndroidLogAdapter());
|
||||
}
|
||||
|
||||
private void initRecoverColli() {
|
||||
ColliDataRecover.init(mContext);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,18 +1,25 @@
|
||||
package it.integry.integrywmsnative.core.context;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import android.text.Spanned;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.ConnectException;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecover;
|
||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
import it.integry.integrywmsnative.core.utility.UtilitySettings;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
|
||||
public class MainContext {
|
||||
|
||||
@@ -34,6 +41,8 @@ public class MainContext {
|
||||
this.initReflections();
|
||||
|
||||
this.initServerStatusChecker();
|
||||
|
||||
ColliDataRecover.init(mContext);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,8 +52,23 @@ public class MainContext {
|
||||
|
||||
private void initDBData(Runnable onComplete) {
|
||||
SettingsManager.loadDBVariables(onComplete, ex -> {
|
||||
DialogSimpleMessageHelper.makeErrorDialog(mContext,
|
||||
new SpannableString(ex.getMessage()), null, mContext::finish).show();
|
||||
|
||||
Spanned message = null;
|
||||
|
||||
if (ex.getCause() != null && ex.getCause() instanceof ConnectException) {
|
||||
message = Html.fromHtml("Impossibile collegarsi all'host <b>" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "</b>. Riprovare più tardi.");
|
||||
} else if (ex.getMessage().startsWith("Status 404:")) {
|
||||
message = Html.fromHtml("Errore 404. Non è stato possibile soddisfare la richiesta sull'host <b>" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "</b>. Riprovare più tardi.");
|
||||
} else {
|
||||
message = new SpannableString(ex.getMessage());
|
||||
}
|
||||
|
||||
DialogSimpleMessageView.makeErrorDialog(
|
||||
message, null, mContext::finish, R.string.logout, () -> {
|
||||
UtilitySettings.logout();
|
||||
MainApplication.exit();
|
||||
})
|
||||
.show(mContext.getSupportFragmentManager(), "tag");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,18 +2,15 @@ package it.integry.integrywmsnative.core.data_recover;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.android.gms.common.util.IOUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
@@ -22,8 +19,8 @@ import java.util.Random;
|
||||
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
||||
|
||||
public class ColliDataRecover {
|
||||
|
||||
@@ -35,7 +32,7 @@ public class ColliDataRecover {
|
||||
private String gestioneCollo;
|
||||
private String filtro;
|
||||
|
||||
private List<OrdineVenditaInevasoDTO> testateOrdini;
|
||||
private List<OrdineUscitaInevasoDTO> testateOrdini;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
@@ -91,11 +88,11 @@ public class ColliDataRecover {
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<OrdineVenditaInevasoDTO> getTestateOrdini() {
|
||||
public List<OrdineUscitaInevasoDTO> getTestateOrdini() {
|
||||
return testateOrdini;
|
||||
}
|
||||
|
||||
public RecoverDTO setTestateOrdini(List<OrdineVenditaInevasoDTO> testateOrdini) {
|
||||
public RecoverDTO setTestateOrdini(List<OrdineUscitaInevasoDTO> testateOrdini) {
|
||||
this.testateOrdini = testateOrdini;
|
||||
return this;
|
||||
}
|
||||
@@ -111,11 +108,11 @@ public class ColliDataRecover {
|
||||
}
|
||||
}
|
||||
|
||||
private static Context mContext;
|
||||
private static AppCompatActivity mContext;
|
||||
|
||||
private static List<RecoverDTO> mtbColtsSessions = new ArrayList<>();
|
||||
|
||||
public static void init(Context context) {
|
||||
public static void init(AppCompatActivity context) {
|
||||
mContext = context;
|
||||
|
||||
if(isFilePresent(CommonConst.Files.RECOVER_COLLO_FILE)) {
|
||||
@@ -124,7 +121,7 @@ public class ColliDataRecover {
|
||||
}
|
||||
|
||||
public static boolean thereIsAnExistantSession() {
|
||||
return mtbColtsSessions.size() > 0;
|
||||
return mtbColtsSessions != null && mtbColtsSessions.size() > 0;
|
||||
}
|
||||
|
||||
public static List<Integer> getAllSessionIDs() {
|
||||
@@ -153,7 +150,7 @@ public class ColliDataRecover {
|
||||
return recoverDTOOptional.isPresent() ? recoverDTOOptional.get() : null;
|
||||
}
|
||||
|
||||
public static int startNewSession(MtbColt mtbColtSession, List<OrdineVenditaInevasoDTO> testateOrdini) {
|
||||
public static int startNewSession(MtbColt mtbColtSession, List<OrdineUscitaInevasoDTO> testateOrdini) {
|
||||
Integer newId = null;
|
||||
|
||||
while(newId == null) {
|
||||
@@ -195,13 +192,16 @@ public class ColliDataRecover {
|
||||
try {
|
||||
inputStream = mContext.openFileInput(CommonConst.Files.RECOVER_COLLO_FILE);
|
||||
|
||||
byte[] bytes = IOUtils.readInputStreamFully(inputStream);
|
||||
byte[] bytes = new byte[inputStream.available()];
|
||||
inputStream.read(bytes);
|
||||
inputStream.close();
|
||||
|
||||
String jsonString = new String(bytes);
|
||||
|
||||
Type listType = new TypeToken<ArrayList<RecoverDTO>>(){}.getType();
|
||||
mtbColtsSessions = gson.fromJson(jsonString, listType);
|
||||
|
||||
inputStream.close();
|
||||
if(mtbColtsSessions == null) mtbColtsSessions = new ArrayList<>();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
UtilityExceptions.defaultException(mContext, e);
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
package it.integry.integrywmsnative.core.data_recover;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||
|
||||
public class ColliDataRecoverDTO {
|
||||
|
||||
private int id;
|
||||
private int numCollo;
|
||||
private String serCollo;
|
||||
private String dataCollo;
|
||||
private String gestioneCollo;
|
||||
private String filtro;
|
||||
|
||||
private List<OrdineUscitaInevasoDTO> testateOrdini;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public ColliDataRecoverDTO setId(int id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getNumCollo() {
|
||||
return numCollo;
|
||||
}
|
||||
|
||||
public ColliDataRecoverDTO setNumCollo(int numCollo) {
|
||||
this.numCollo = numCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSerCollo() {
|
||||
return serCollo;
|
||||
}
|
||||
|
||||
public ColliDataRecoverDTO setSerCollo(String serCollo) {
|
||||
this.serCollo = serCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDataCollo() {
|
||||
return dataCollo;
|
||||
}
|
||||
|
||||
public ColliDataRecoverDTO setDataCollo(String dataCollo) {
|
||||
this.dataCollo = dataCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGestioneCollo() {
|
||||
return gestioneCollo;
|
||||
}
|
||||
|
||||
public ColliDataRecoverDTO setGestioneCollo(String gestioneCollo) {
|
||||
this.gestioneCollo = gestioneCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFiltro() {
|
||||
return filtro;
|
||||
}
|
||||
|
||||
public ColliDataRecoverDTO setFiltro(String filtro) {
|
||||
this.filtro = filtro;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<OrdineUscitaInevasoDTO> getTestateOrdini() {
|
||||
return testateOrdini;
|
||||
}
|
||||
|
||||
public ColliDataRecoverDTO setTestateOrdini(List<OrdineUscitaInevasoDTO> testateOrdini) {
|
||||
this.testateOrdini = testateOrdini;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public MtbColt getMtbColt() {
|
||||
return new MtbColt()
|
||||
.setNumCollo(getNumCollo())
|
||||
.setSerCollo(getSerCollo())
|
||||
.setGestione(getGestioneCollo())
|
||||
.setDataCollo(getDataCollo())
|
||||
.setFiltroOrdini(getFiltro());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package it.integry.integrywmsnative.core.data_recover;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.android.gms.common.util.IOUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
|
||||
@Singleton
|
||||
public class ColliDataRecoverService {
|
||||
|
||||
|
||||
private AppCompatActivity mContext;
|
||||
private List<ColliDataRecoverDTO> mtbColtsSessions = new ArrayList<>();
|
||||
|
||||
@Inject
|
||||
public ColliDataRecoverService() {
|
||||
}
|
||||
|
||||
public void init(AppCompatActivity appCompatActivity) {
|
||||
this.mContext = appCompatActivity;
|
||||
|
||||
if(isFilePresent(CommonConst.Files.RECOVER_COLLO_FILE)) {
|
||||
loadLocalFile();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean thereIsAnExistantSession() {
|
||||
return mtbColtsSessions.size() > 0;
|
||||
}
|
||||
|
||||
public List<Integer> getAllSessionIDs() {
|
||||
if(thereIsAnExistantSession()) {
|
||||
|
||||
return Stream.of(mtbColtsSessions)
|
||||
.map(ColliDataRecoverDTO::getId)
|
||||
.toList();
|
||||
|
||||
} else return null;
|
||||
}
|
||||
|
||||
public ColliDataRecoverDTO getSession(Integer sessionID) {
|
||||
|
||||
if(sessionID == null) return null;
|
||||
|
||||
return getIfExists(sessionID);
|
||||
}
|
||||
|
||||
private ColliDataRecoverDTO getIfExists(int id) {
|
||||
Optional<ColliDataRecoverDTO> recoverDTOOptional = Stream.of(mtbColtsSessions)
|
||||
.filter(x -> x.getId() == id)
|
||||
.findSingle();
|
||||
|
||||
|
||||
return recoverDTOOptional.isPresent() ? recoverDTOOptional.get() : null;
|
||||
}
|
||||
|
||||
public int startNewSession(MtbColt mtbColtSession, List<OrdineUscitaInevasoDTO> testateOrdini) {
|
||||
Integer newId = null;
|
||||
|
||||
while(newId == null) {
|
||||
int randomId = new Random().nextInt(1000);
|
||||
ColliDataRecoverDTO dto = getIfExists(randomId);
|
||||
if(dto == null) newId = randomId;
|
||||
}
|
||||
|
||||
|
||||
ColliDataRecoverDTO recoverDTO = new ColliDataRecoverDTO()
|
||||
.setId(newId)
|
||||
.setDataCollo(mtbColtSession.getDataColloS())
|
||||
.setNumCollo(mtbColtSession.getNumCollo())
|
||||
.setSerCollo(mtbColtSession.getSerCollo())
|
||||
.setGestioneCollo(mtbColtSession.getGestione())
|
||||
.setFiltro(mtbColtSession.getFiltroOrdini())
|
||||
.setTestateOrdini(testateOrdini);
|
||||
|
||||
mtbColtsSessions.add(recoverDTO);
|
||||
updateLocalFile();
|
||||
return newId;
|
||||
}
|
||||
|
||||
public void closeSession(int ID) {
|
||||
ColliDataRecoverDTO dto = getIfExists(ID);
|
||||
|
||||
if(dto != null) {
|
||||
mtbColtsSessions.remove(dto);
|
||||
updateLocalFile();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void loadLocalFile() {
|
||||
InputStream inputStream;
|
||||
Gson gson = new Gson();
|
||||
|
||||
try {
|
||||
inputStream = mContext.openFileInput(CommonConst.Files.RECOVER_COLLO_FILE);
|
||||
|
||||
byte[] bytes = IOUtils.readInputStreamFully(inputStream);
|
||||
String jsonString = new String(bytes);
|
||||
|
||||
Type listType = new TypeToken<ArrayList<ColliDataRecoverDTO>>(){}.getType();
|
||||
mtbColtsSessions = gson.fromJson(jsonString, listType);
|
||||
|
||||
inputStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
UtilityExceptions.defaultException(mContext, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void updateLocalFile() {
|
||||
FileOutputStream outputStream;
|
||||
|
||||
Gson gson = new Gson();
|
||||
String jsonText = gson.toJson(mtbColtsSessions);
|
||||
|
||||
try {
|
||||
outputStream = mContext.openFileOutput(CommonConst.Files.RECOVER_COLLO_FILE, Context.MODE_PRIVATE);
|
||||
outputStream.write(jsonText.getBytes());
|
||||
outputStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
UtilityExceptions.defaultException(mContext, e);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isFilePresent(String fileName) {
|
||||
String path = mContext.getFilesDir().getAbsolutePath() + "/" + fileName;
|
||||
File file = new File(path);
|
||||
return file.exists();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.room.Database;
|
||||
import androidx.room.Room;
|
||||
import androidx.room.RoomDatabase;
|
||||
import androidx.room.TypeConverters;
|
||||
|
||||
@@ -23,7 +20,7 @@ import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
})
|
||||
public abstract class AppDatabase extends RoomDatabase {
|
||||
|
||||
private static volatile AppDatabase INSTANCE;
|
||||
// private AppDatabase mRoomInstance;
|
||||
|
||||
public abstract ArticoloGrigliaDao articoloGrigliaDao();
|
||||
|
||||
@@ -33,19 +30,26 @@ public abstract class AppDatabase extends RoomDatabase {
|
||||
|
||||
public abstract ArticoloOrdineDao articoloOrdineDao();
|
||||
|
||||
public static AppDatabase getDatabase(final Context context) {
|
||||
if (INSTANCE == null) {
|
||||
synchronized (AppDatabase.class) {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = Room.databaseBuilder(context.getApplicationContext(),
|
||||
AppDatabase.class, "integry_wms")
|
||||
.fallbackToDestructiveMigration()
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
// public static AppDatabase getDatabase(final Context context) {
|
||||
// if (INSTANCE == null) {
|
||||
// synchronized (AppDatabase.class) {
|
||||
// if (INSTANCE == null) {
|
||||
// INSTANCE = Room.databaseBuilder(context.getApplicationContext(),
|
||||
// AppDatabase.class, "integry_wms")
|
||||
// .fallbackToDestructiveMigration()
|
||||
// .build();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return INSTANCE;
|
||||
// }
|
||||
|
||||
// public AppDatabase(Application application) {
|
||||
// mRoomInstance = Room.databaseBuilder(application,
|
||||
// AppDatabase.class, "integry_wms")
|
||||
// .fallbackToDestructiveMigration()
|
||||
// .build();
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import dagger.Component;
|
||||
|
||||
@Singleton
|
||||
@Component(modules = {RoomModule.class})
|
||||
public interface RoomComponent {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db;
|
||||
|
||||
public interface RoomComponentProvider {
|
||||
|
||||
RoomComponent provideRoomComponent();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import androidx.room.Room;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.ArticoloGrigliaDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.ArticoloOrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.GrigliaDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGrigliaRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.OrdineRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.implementations.ArticoliGrigliaDataSource;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.implementations.ArticoliOrdineDataSource;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.implementations.GrigliaDataSource;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.implementations.OrdineDataSource;
|
||||
|
||||
@Module
|
||||
public class RoomModule {
|
||||
|
||||
private AppDatabase appDatabase;
|
||||
|
||||
public RoomModule(Application application) {
|
||||
appDatabase = Room.databaseBuilder(application,
|
||||
AppDatabase.class, "integry_wms")
|
||||
.fallbackToDestructiveMigration()
|
||||
.build();
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
AppDatabase providesRoomDatabase() {
|
||||
return appDatabase;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
ArticoloGrigliaDao providesArticoloGrigliaDao(AppDatabase appDatabase) {
|
||||
return appDatabase.articoloGrigliaDao();
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
GrigliaDao providesGrigliaDao(AppDatabase appDatabase) {
|
||||
return appDatabase.grigliaDao();
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
OrdineDao providesOrdineDao(AppDatabase appDatabase) {
|
||||
return appDatabase.ordineDao();
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
ArticoloOrdineDao providesArticoloOrdineDao(AppDatabase appDatabase) {
|
||||
return appDatabase.articoloOrdineDao();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
ArticoloGrigliaRepository providesArticoloGrigliaRepository(ArticoloGrigliaDao articoloGrigliaDao) {
|
||||
return new ArticoliGrigliaDataSource(articoloGrigliaDao);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
ArticoliOrdineRepository providesArticoliOrdineRepository(ArticoloOrdineDao articoloOrdineDao) {
|
||||
return new ArticoliOrdineDataSource(articoloOrdineDao);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
GrigliaRepository providesGrigliaRepository(GrigliaDao grigliaDao) {
|
||||
return new GrigliaDataSource(grigliaDao);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
OrdineRepository providesOrdineRepository(OrdineDao ordineDao) {
|
||||
return new OrdineDataSource(ordineDao);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,7 +8,6 @@ import androidx.room.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.GrigliaWrapper;
|
||||
|
||||
@@ -17,7 +16,7 @@ public interface GrigliaDao {
|
||||
@Query("SELECT * from griglie")
|
||||
List<Griglia> getAll();
|
||||
|
||||
@Query("SELECT *, COUNT(articoli_griglia.articolo_griglia_id) as countArticoli from griglie LEFT JOIN articoli_griglia ON (griglie.griglia_id = articoli_griglia.id_griglia) where cod_alis = :codAlis GROUP BY griglie.griglia_id")
|
||||
@Query("SELECT griglie.*, COUNT(articoli_griglia.articolo_griglia_id) as countArticoli from griglie LEFT JOIN articoli_griglia ON (griglie.griglia_id = articoli_griglia.id_griglia) where cod_alis = :codAlis GROUP BY griglie.griglia_id")
|
||||
GrigliaWrapper findByCodAlis(String codAlis);
|
||||
|
||||
@Insert
|
||||
|
||||
@@ -6,7 +6,7 @@ import androidx.room.ForeignKey;
|
||||
import androidx.room.Index;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import java.util.Date;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
|
||||
@Entity(
|
||||
tableName = "articoli_griglia",
|
||||
@@ -159,7 +159,7 @@ public class ArticoloGriglia {
|
||||
articolo.setQtaCnf(this.getQtaCnf());
|
||||
articolo.setUntMis(this.getUntMis());
|
||||
articolo.setDescrizione(this.getDescrizione());
|
||||
articolo.setDataIns(new Date());
|
||||
articolo.setDataIns(UtilityDate.getDateInstance());
|
||||
articolo.setQtaOrd(0);
|
||||
|
||||
return articolo;
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.room.PrimaryKey;
|
||||
@Index(value = "cod_alis", unique = true)
|
||||
}
|
||||
)
|
||||
|
||||
public class Griglia {
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
@ColumnInfo(name = "griglia_id")
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository;
|
||||
|
||||
import com.annimon.stream.Collectors;
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.ArticoloGrigliaDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class ArticoliGrigliaRepository extends Repository{
|
||||
|
||||
ArticoloGrigliaDao mRepository;
|
||||
|
||||
public ArticoliGrigliaRepository() {
|
||||
this.mRepository = MainApplication.getArticoliGrigliaRepository();
|
||||
}
|
||||
|
||||
public void saveArticoliToGriglia(List<ArticoloGriglia> articoli, Griglia griglia, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(()->{
|
||||
try{
|
||||
List<ArticoloGriglia> toUpdate = new ArrayList<>();
|
||||
List<ArticoloGriglia> toInsert = new ArrayList<>();
|
||||
List<String> codMarts = new ArrayList<>();
|
||||
for (ArticoloGriglia art : articoli){
|
||||
Integer id = mRepository.getIdArticoloByGrigliaAndBarcodeAndCodMart(griglia.getGrigliaId(),art.getBarCode(),art.getCodMart());
|
||||
codMarts.add(art.getCodMart());
|
||||
if (id != null){
|
||||
art.setArticoloGrigliaId(id);
|
||||
toUpdate.add(art);
|
||||
}else{
|
||||
toInsert.add(art);
|
||||
}
|
||||
}
|
||||
mRepository.insertAll(toInsert);
|
||||
mRepository.updateAll(toUpdate);
|
||||
List<ArticoloGriglia> articoliGriglia = mRepository.getArticoliFromGriglia(griglia.getGrigliaId());
|
||||
List<ArticoloGriglia> toDelete =Stream.of(articoliGriglia).filter(articolo-> !codMarts.contains(articolo.getCodMart())).toList();
|
||||
mRepository.deleteList(toDelete);
|
||||
onSuccess.run();
|
||||
}catch (Exception e){
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void findArticoloByBarcodeAndGriglia(String barcode, int idGriglia,RunnableArgs<ArticoloGriglia> onSuccess, RunnableArgs<Exception> onFail ){
|
||||
execute(()->{
|
||||
try{
|
||||
onSuccess.run(mRepository.findArticoloByBarcodeAndGriglia(barcode, idGriglia));
|
||||
}catch (Exception e){
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void findArticoloByCodMartAndGriglia(String codMart, int idGriglia,RunnableArgs<ArticoloGriglia> onSuccess, RunnableArgs<Exception> onFail ){
|
||||
execute(()->{
|
||||
try{
|
||||
onSuccess.run(mRepository.findArticoloByCodMartAndGriglia(codMart, idGriglia));
|
||||
}catch (Exception e){
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void findArticoloByScanAndGriglia(String scan, int idGriglia,RunnableArgs<ArticoloGriglia> onSuccess, RunnableArgs<Exception> onFail ){
|
||||
execute(()->{
|
||||
try{
|
||||
ArticoloGriglia articolo = mRepository.findArticoloByCodMartAndGriglia(scan, idGriglia);
|
||||
if (articolo == null){
|
||||
articolo = mRepository.findArticoloByBarcodeAndGriglia(scan,idGriglia);
|
||||
if (articolo==null){
|
||||
String barcode= StringUtils.leftPad(scan,13,"0");
|
||||
articolo = mRepository.findArticoloByBarcodeAndGriglia(barcode,idGriglia);
|
||||
}
|
||||
}
|
||||
onSuccess.run(articolo);
|
||||
}catch (Exception e){
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,109 +1,24 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.ArticoloOrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class ArticoliOrdineRepository extends Repository {
|
||||
public interface ArticoliOrdineRepository {
|
||||
|
||||
ArticoloOrdineDao mRepository;
|
||||
void saveArticoliToOrdine(List<ArticoloOrdine> articoli, Runnable onSuccess, RunnableArgs<Exception> onFail);
|
||||
|
||||
public ArticoliOrdineRepository() {
|
||||
this.mRepository = MainApplication.getArticoliOrdineRepository();
|
||||
}
|
||||
void saveArticoloToOrdine(ArticoloOrdine articolo, Runnable onSuccess, RunnableArgs<Exception> onFail);
|
||||
|
||||
public void saveArticoliToOrdine(List<ArticoloOrdine> articoli, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
List<ArticoloOrdine> toUpdate = new ArrayList<>();
|
||||
List<ArticoloOrdine> toInsert = new ArrayList<>();
|
||||
for (ArticoloOrdine art : articoli) {
|
||||
if (art.getArticoloOrdineId() > 0) {
|
||||
toUpdate.add(art);
|
||||
} else {
|
||||
toInsert.add(art);
|
||||
}
|
||||
}
|
||||
mRepository.insertAll(toInsert);
|
||||
mRepository.updateAll(toUpdate);
|
||||
onSuccess.run();
|
||||
void findArticoloByOrdineAndBarcode(Ordine ordine, String barcode, RunnableArgs<ArticoloOrdine> onSuccess, RunnableArgs<Exception> onFail);
|
||||
|
||||
void findArticoloByScanAndOrdine(Ordine ordine, String barcode, RunnableArgs<ArticoloOrdine> onSuccess, RunnableArgs<Exception> onFail);
|
||||
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void saveArticoloToOrdine(ArticoloOrdine articolo, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
if (articolo.getArticoloOrdineId() > 0) {
|
||||
mRepository.update(articolo);
|
||||
} else {
|
||||
mRepository.insert(articolo);
|
||||
}
|
||||
onSuccess.run();
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
void findArticoliByOrdine(Ordine ordine, RunnableArgs<List<ArticoloOrdine>> onLoad, RunnableArgs<Exception> onError);
|
||||
|
||||
public void findArticoloByOrdineAndBarcode(Ordine ordine, String barcode, RunnableArgs<ArticoloOrdine> onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
ArticoloOrdine articolo = mRepository.findArticoloByOrdineAndBarcode(ordine.getOrdineId(), barcode);
|
||||
onSuccess.run(articolo);
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void findArticoloByScanAndOrdine(Ordine ordine, String barcode, RunnableArgs<ArticoloOrdine> onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
String scannedCode = barcode;
|
||||
ArticoloOrdine articolo = mRepository.findArticoloByCodMartAndOrdine(ordine.getOrdineId(), scannedCode);
|
||||
if (articolo == null){
|
||||
articolo = mRepository.findArticoloByBarcodeAndOrdine(ordine.getOrdineId(), scannedCode);
|
||||
if (articolo == null){
|
||||
scannedCode= StringUtils.leftPad(scannedCode,13,'0');
|
||||
articolo = mRepository.findArticoloByBarcodeAndOrdine(ordine.getOrdineId(), scannedCode);
|
||||
}
|
||||
}
|
||||
onSuccess.run(articolo);
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
void deleteArticolo(ArticoloOrdine articolo, Runnable onSave, RunnableArgs<Exception> onError);
|
||||
|
||||
public void findArticoliByOrdine(Ordine ordine, RunnableArgs<List<ArticoloOrdine>> onLoad, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
onLoad.run(mRepository.findArticoliByOrdine(ordine.getOrdineId()));
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void deleteArticolo(ArticoloOrdine articolo, Runnable onSave, RunnableArgs<Exception> onError) {
|
||||
execute(()->{
|
||||
try{
|
||||
mRepository.delete(articolo);
|
||||
onSave.run();
|
||||
}catch (Exception e){
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public interface ArticoloGrigliaRepository {
|
||||
|
||||
void saveArticoliToGriglia(List<ArticoloGriglia> articoli, Griglia griglia, Runnable onSuccess, RunnableArgs<Exception> onFail);
|
||||
|
||||
void findArticoloByBarcodeAndGriglia(String barcode, int idGriglia, RunnableArgs<ArticoloGriglia> onSuccess, RunnableArgs<Exception> onFail);
|
||||
|
||||
void findArticoloByCodMartAndGriglia(String codMart, int idGriglia, RunnableArgs<ArticoloGriglia> onSuccess, RunnableArgs<Exception> onFail);
|
||||
|
||||
void findArticoloByScanAndGriglia(String scan, int idGriglia, RunnableArgs<ArticoloGriglia> onSuccess, RunnableArgs<Exception> onFail);
|
||||
|
||||
}
|
||||
@@ -2,66 +2,17 @@ package it.integry.integrywmsnative.core.data_store.db.repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.GrigliaDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.GrigliaWrapper;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class GrigliaRepository extends Repository{
|
||||
public interface GrigliaRepository {
|
||||
|
||||
private GrigliaDao mRepository;
|
||||
void selectAll(RunnableArgs<List<Griglia>> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
public GrigliaRepository() {
|
||||
this.mRepository = MainApplication.getGrigliaRepository();
|
||||
}
|
||||
void findByCodAlis(String codAlis , RunnableArgs<GrigliaWrapper> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
public void selectAll(RunnableArgs<List<Griglia>> onSuccess, RunnableArgs<Exception> onError){
|
||||
Runnable query = ()->{
|
||||
try{
|
||||
onSuccess.run(mRepository.getAll());
|
||||
}catch (Exception e){
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
void saveGriglia(Griglia griglia, RunnableArgs<Integer> onSuccess,RunnableArgs<Exception> onFail);
|
||||
|
||||
public void findByCodAlis(String codAlis , RunnableArgs<GrigliaWrapper> onSuccess, RunnableArgs<Exception> onError){
|
||||
Runnable query = ()->{
|
||||
try{
|
||||
onSuccess.run(mRepository.findByCodAlis(codAlis));
|
||||
}catch (Exception e){
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
|
||||
|
||||
public void saveGriglia(Griglia griglia, RunnableArgs<Integer> onSuccess,RunnableArgs<Exception> onFail) {
|
||||
execute(()->{
|
||||
try{
|
||||
if (griglia.getGrigliaId() <= 0){
|
||||
griglia.setGrigliaId((int) mRepository.insert(griglia));
|
||||
}else{
|
||||
mRepository.update(griglia);
|
||||
}
|
||||
onSuccess.run(griglia.getGrigliaId());
|
||||
}catch (Exception e){
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void findGrigliaById(int idGriglia, RunnableArgs<Griglia> onLoad, RunnableArgs<Exception> onFail) {
|
||||
execute(()->{
|
||||
try{
|
||||
onLoad.run(mRepository.findGrigliaById(idGriglia));
|
||||
}catch (Exception e){
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
void findGrigliaById(int idGriglia, RunnableArgs<Griglia> onLoad, RunnableArgs<Exception> onFail);
|
||||
}
|
||||
|
||||
@@ -2,86 +2,25 @@ package it.integry.integrywmsnative.core.data_store.db.repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.view_model.OrdineWithGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.OrdineWrapper;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class OrdineRepository extends Repository {
|
||||
public interface OrdineRepository {
|
||||
|
||||
private OrdineDao mRepository;
|
||||
void selectAll(RunnableArgs<List<Ordine>> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
public OrdineRepository() {
|
||||
this.mRepository = MainApplication.getOrdiniRepository();
|
||||
}
|
||||
void selectAllTransmitted(RunnableArgs<List<OrdineWithGriglia>> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
public void selectAll(RunnableArgs<List<Ordine>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mRepository.getAll());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
void selectAllOpenOrders(Griglia griglia, RunnableArgs<List<OrdineWrapper>> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
public void selectAllTransmitted(RunnableArgs<List<OrdineWithGriglia>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mRepository.getAllTrasnmitted());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
void insert(Ordine ordine, RunnableArgs<Integer> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
public void selectAllOpenOrders(Griglia griglia, RunnableArgs<List<OrdineWrapper>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mRepository.getAllOpenOrdersByGriglia(griglia.getGrigliaId()));
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
void updateOrder(Ordine ordine, RunnableArgs<Ordine> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
public void insert(Ordine ordine, RunnableArgs<Integer> onSuccess, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
Long id = mRepository.insert(ordine);
|
||||
onSuccess.run(id.intValue());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
void delete(Ordine ordine, Runnable onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
|
||||
public void updateOrder(Ordine ordine, RunnableArgs<Ordine> onSuccess, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
mRepository.update(ordine);
|
||||
onSuccess.run(ordine);
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void delete(Ordine ordine, Runnable onSuccess, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
mRepository.delete(ordine);
|
||||
onSuccess.run();
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository.implementations;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.ArticoloGrigliaDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGrigliaRepository;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class ArticoliGrigliaDataSource extends Repository implements ArticoloGrigliaRepository {
|
||||
|
||||
private final ArticoloGrigliaDao mArticoloGrigliaDao;
|
||||
|
||||
@Inject
|
||||
public ArticoliGrigliaDataSource(ArticoloGrigliaDao articoloGrigliaDao) {
|
||||
this.mArticoloGrigliaDao = articoloGrigliaDao;
|
||||
}
|
||||
|
||||
public void saveArticoliToGriglia(List<ArticoloGriglia> articoli, Griglia griglia, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
List<ArticoloGriglia> toUpdate = new ArrayList<>();
|
||||
List<ArticoloGriglia> toInsert = new ArrayList<>();
|
||||
List<String> codMarts = new ArrayList<>();
|
||||
for (ArticoloGriglia art : articoli) {
|
||||
Integer id = mArticoloGrigliaDao.getIdArticoloByGrigliaAndBarcodeAndCodMart(griglia.getGrigliaId(), art.getBarCode(), art.getCodMart());
|
||||
codMarts.add(art.getCodMart());
|
||||
if (id != null) {
|
||||
art.setArticoloGrigliaId(id);
|
||||
toUpdate.add(art);
|
||||
} else {
|
||||
toInsert.add(art);
|
||||
}
|
||||
}
|
||||
mArticoloGrigliaDao.insertAll(toInsert);
|
||||
mArticoloGrigliaDao.updateAll(toUpdate);
|
||||
List<ArticoloGriglia> articoliGriglia = mArticoloGrigliaDao.getArticoliFromGriglia(griglia.getGrigliaId());
|
||||
List<ArticoloGriglia> toDelete = Stream.of(articoliGriglia).filter(articolo -> !codMarts.contains(articolo.getCodMart())).toList();
|
||||
mArticoloGrigliaDao.deleteList(toDelete);
|
||||
onSuccess.run();
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void findArticoloByBarcodeAndGriglia(String barcode, int idGriglia, RunnableArgs<ArticoloGriglia> onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
onSuccess.run(mArticoloGrigliaDao.findArticoloByBarcodeAndGriglia(barcode, idGriglia));
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void findArticoloByCodMartAndGriglia(String codMart, int idGriglia, RunnableArgs<ArticoloGriglia> onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
onSuccess.run(mArticoloGrigliaDao.findArticoloByCodMartAndGriglia(codMart, idGriglia));
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void findArticoloByScanAndGriglia(String scan, int idGriglia, RunnableArgs<ArticoloGriglia> onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
ArticoloGriglia articolo = mArticoloGrigliaDao.findArticoloByCodMartAndGriglia(scan, idGriglia);
|
||||
if (articolo == null) {
|
||||
articolo = mArticoloGrigliaDao.findArticoloByBarcodeAndGriglia(scan, idGriglia);
|
||||
if (articolo == null) {
|
||||
String barcode = StringUtils.leftPad(scan, 13, "0");
|
||||
articolo = mArticoloGrigliaDao.findArticoloByBarcodeAndGriglia(barcode, idGriglia);
|
||||
}
|
||||
}
|
||||
onSuccess.run(articolo);
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository.implementations;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.ArticoloOrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class ArticoliOrdineDataSource extends Repository implements ArticoliOrdineRepository {
|
||||
|
||||
private final ArticoloOrdineDao mArticoloOrdineDao;
|
||||
|
||||
@Inject
|
||||
public ArticoliOrdineDataSource(ArticoloOrdineDao articoloOrdineDao) {
|
||||
this.mArticoloOrdineDao = articoloOrdineDao;
|
||||
}
|
||||
|
||||
public void saveArticoliToOrdine(List<ArticoloOrdine> articoli, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
List<ArticoloOrdine> toUpdate = new ArrayList<>();
|
||||
List<ArticoloOrdine> toInsert = new ArrayList<>();
|
||||
for (ArticoloOrdine art : articoli) {
|
||||
if (art.getArticoloOrdineId() > 0) {
|
||||
toUpdate.add(art);
|
||||
} else {
|
||||
toInsert.add(art);
|
||||
}
|
||||
}
|
||||
mArticoloOrdineDao.insertAll(toInsert);
|
||||
mArticoloOrdineDao.updateAll(toUpdate);
|
||||
onSuccess.run();
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void saveArticoloToOrdine(ArticoloOrdine articolo, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
if (articolo.getArticoloOrdineId() > 0) {
|
||||
mArticoloOrdineDao.update(articolo);
|
||||
} else {
|
||||
mArticoloOrdineDao.insert(articolo);
|
||||
}
|
||||
onSuccess.run();
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void findArticoloByOrdineAndBarcode(Ordine ordine, String barcode, RunnableArgs<ArticoloOrdine> onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
ArticoloOrdine articolo = mArticoloOrdineDao.findArticoloByOrdineAndBarcode(ordine.getOrdineId(), barcode);
|
||||
onSuccess.run(articolo);
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void findArticoloByScanAndOrdine(Ordine ordine, String barcode, RunnableArgs<ArticoloOrdine> onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
String scannedCode = barcode;
|
||||
ArticoloOrdine articolo = mArticoloOrdineDao.findArticoloByCodMartAndOrdine(ordine.getOrdineId(), scannedCode);
|
||||
if (articolo == null) {
|
||||
articolo = mArticoloOrdineDao.findArticoloByBarcodeAndOrdine(ordine.getOrdineId(), scannedCode);
|
||||
if (articolo == null) {
|
||||
scannedCode = StringUtils.leftPad(scannedCode, 13, '0');
|
||||
articolo = mArticoloOrdineDao.findArticoloByBarcodeAndOrdine(ordine.getOrdineId(), scannedCode);
|
||||
}
|
||||
}
|
||||
onSuccess.run(articolo);
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void findArticoliByOrdine(Ordine ordine, RunnableArgs<List<ArticoloOrdine>> onLoad, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
onLoad.run(mArticoloOrdineDao.findArticoliByOrdine(ordine.getOrdineId()));
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void deleteArticolo(ArticoloOrdine articolo, Runnable onSave, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
mArticoloOrdineDao.delete(articolo);
|
||||
onSave.run();
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository.implementations;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.GrigliaDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.GrigliaWrapper;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class GrigliaDataSource extends Repository implements GrigliaRepository {
|
||||
|
||||
private final GrigliaDao mGrigliaDao;
|
||||
|
||||
@Inject
|
||||
public GrigliaDataSource(GrigliaDao grigliaDao) {
|
||||
this.mGrigliaDao = grigliaDao;
|
||||
}
|
||||
|
||||
public void selectAll(RunnableArgs<List<Griglia>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mGrigliaDao.getAll());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
|
||||
public void findByCodAlis(String codAlis, RunnableArgs<GrigliaWrapper> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mGrigliaDao.findByCodAlis(codAlis));
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
|
||||
|
||||
public void saveGriglia(Griglia griglia, RunnableArgs<Integer> onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
if (griglia.getGrigliaId() <= 0) {
|
||||
griglia.setGrigliaId((int) mGrigliaDao.insert(griglia));
|
||||
} else {
|
||||
mGrigliaDao.update(griglia);
|
||||
}
|
||||
onSuccess.run(griglia.getGrigliaId());
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void findGrigliaById(int idGriglia, RunnableArgs<Griglia> onLoad, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
onLoad.run(mGrigliaDao.findGrigliaById(idGriglia));
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository.implementations;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.OrdineRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.view_model.OrdineWithGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.OrdineWrapper;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class OrdineDataSource extends Repository implements OrdineRepository {
|
||||
|
||||
private OrdineDao mOrdineDao;
|
||||
|
||||
@Inject
|
||||
public OrdineDataSource(OrdineDao ordineDao) {
|
||||
this.mOrdineDao = ordineDao;
|
||||
}
|
||||
|
||||
public void selectAll(RunnableArgs<List<Ordine>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mOrdineDao.getAll());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
|
||||
public void selectAllTransmitted(RunnableArgs<List<OrdineWithGriglia>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mOrdineDao.getAllTrasnmitted());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
|
||||
public void selectAllOpenOrders(Griglia griglia, RunnableArgs<List<OrdineWrapper>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mOrdineDao.getAllOpenOrdersByGriglia(griglia.getGrigliaId()));
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
|
||||
public void insert(Ordine ordine, RunnableArgs<Integer> onSuccess, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
Long id = mOrdineDao.insert(ordine);
|
||||
onSuccess.run(id.intValue());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void updateOrder(Ordine ordine, RunnableArgs<Ordine> onSuccess, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
mOrdineDao.update(ordine);
|
||||
onSuccess.run(ordine);
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void delete(Ordine ordine, Runnable onSuccess, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
mOrdineDao.delete(ordine);
|
||||
onSuccess.run();
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository;
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository.implementations;
|
||||
|
||||
public class Repository {
|
||||
|
||||
@@ -29,6 +29,19 @@ public class BindableBoolean implements Observable {
|
||||
}
|
||||
mCallbacks.add(callback);
|
||||
}
|
||||
public void addOnPropertyChangedCallback(@NonNull Runnable callback) {
|
||||
synchronized (this) {
|
||||
if (mCallbacks == null) {
|
||||
mCallbacks = new PropertyChangeRegistry();
|
||||
}
|
||||
}
|
||||
mCallbacks.add(new OnPropertyChangedCallback() {
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
callback.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeOnPropertyChangedCallback(@NonNull OnPropertyChangedCallback callback) {
|
||||
@@ -83,7 +96,11 @@ public class BindableBoolean implements Observable {
|
||||
}
|
||||
|
||||
public void set(boolean value) {
|
||||
if (mValue != value) {
|
||||
this.set(value, false);
|
||||
}
|
||||
|
||||
public void set(boolean value, boolean forceRefresh) {
|
||||
if (mValue != value || forceRefresh) {
|
||||
this.mValue = value;
|
||||
notifyChange();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,13 @@ package it.integry.integrywmsnative.core.di;
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
public class BindableInteger extends BaseObservable {
|
||||
Integer value;
|
||||
Integer mValue;
|
||||
|
||||
public BindableInteger() {}
|
||||
|
||||
public BindableInteger(int startValue) {
|
||||
this.mValue = startValue;
|
||||
}
|
||||
|
||||
public Integer get() {
|
||||
return get(true);
|
||||
@@ -11,21 +17,21 @@ public class BindableInteger extends BaseObservable {
|
||||
|
||||
public Integer get(boolean defaultIfNull) {
|
||||
|
||||
if(value == null){
|
||||
if(mValue == null){
|
||||
if(defaultIfNull) return 0;
|
||||
else return null;
|
||||
} else return value;
|
||||
} else return mValue;
|
||||
}
|
||||
|
||||
public void set(Integer value) {
|
||||
if (!Objects.equals(this.value, value)) {
|
||||
this.value = value;
|
||||
if (!Objects.equals(this.mValue, value)) {
|
||||
this.mValue = value;
|
||||
notifyChange();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return value == null;
|
||||
return mValue == null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,40 +1,55 @@
|
||||
package it.integry.integrywmsnative.core.di;
|
||||
|
||||
import androidx.annotation.ColorRes;
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.appcompat.widget.AppCompatMultiAutoCompleteTextView;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.databinding.BindingAdapter;
|
||||
import androidx.databinding.BindingConversion;
|
||||
import androidx.constraintlayout.widget.Guideline;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
import androidx.core.util.Pair;
|
||||
import androidx.appcompat.widget.AppCompatCheckBox;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
import android.app.DatePickerDialog;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
|
||||
import androidx.annotation.ColorRes;
|
||||
import androidx.appcompat.widget.AppCompatCheckBox;
|
||||
import androidx.appcompat.widget.AppCompatMultiAutoCompleteTextView;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.appcompat.widget.LinearLayoutCompat;
|
||||
import androidx.constraintlayout.widget.Guideline;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.core.util.Pair;
|
||||
import androidx.databinding.BindingAdapter;
|
||||
import androidx.databinding.BindingConversion;
|
||||
import androidx.databinding.Observable;
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
import com.google.android.material.textfield.TextInputLayout;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.Locale;
|
||||
|
||||
import androidx.databinding.Observable;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
|
||||
public class Converters {
|
||||
|
||||
|
||||
@BindingConversion
|
||||
public static String convertBindableToString(BindableString bindableString) {
|
||||
return bindableString.get();
|
||||
if(bindableString != null) return bindableString.get();
|
||||
return "";
|
||||
}
|
||||
|
||||
@BindingConversion
|
||||
@@ -42,6 +57,33 @@ public class Converters {
|
||||
return bindableBoolean.get();
|
||||
}
|
||||
|
||||
@BindingConversion
|
||||
public static boolean convertObservableToBoolean(ObservableField<Boolean> bindableBoolean) {
|
||||
return bindableBoolean.get();
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindEditText(AppCompatTextView view, final BindableInteger bindableInteger) {
|
||||
Pair<BindableInteger, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != bindableInteger) {
|
||||
if (pair != null) {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
if(bindableInteger != null) bindableInteger.set(Integer.parseInt(s.toString()));
|
||||
}
|
||||
};
|
||||
view.setTag(R.id.bound_observable, new Pair<>(bindableInteger, watcher));
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
String newValue = bindableInteger != null && bindableInteger.get() != null ? bindableInteger.get().toString() : "0";
|
||||
if (!view.getText().toString().equals(newValue)) {
|
||||
view.setText(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindEditText(EditText view, final BindableString bindableString) {
|
||||
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
@@ -50,7 +92,8 @@ public class Converters {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
bindableString.set(s.toString());
|
||||
}
|
||||
};
|
||||
@@ -71,7 +114,8 @@ public class Converters {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
bindableString.set(s.toString());
|
||||
}
|
||||
};
|
||||
@@ -84,6 +128,103 @@ public class Converters {
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindTextInputEditTextBigDecimal(TextInputEditText view, final ObservableField<BigDecimal> observableBigDecimal) {
|
||||
Pair<ObservableField<BigDecimal>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != observableBigDecimal) {
|
||||
if (pair != null) {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
BigDecimal value = null;
|
||||
if(!UtilityString.isNullOrEmpty(s.toString())) value = new BigDecimal(s.toString());
|
||||
observableBigDecimal.set(value);
|
||||
}
|
||||
};
|
||||
view.setTag(R.id.bound_observable, new Pair<>(observableBigDecimal, watcher));
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
BigDecimal newValue = observableBigDecimal.get();
|
||||
BigDecimal viewValue = view.getText().toString().trim().length() > 0 ? new BigDecimal(view.getText().toString()) : null;
|
||||
|
||||
if(!UtilityBigDecimal.equalsTo(viewValue, newValue)) {
|
||||
view.setText(UtilityNumber.decimalToString(newValue));
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindTextInputEditTextString(TextInputEditText 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();
|
||||
String viewValue = view.getText().toString();
|
||||
|
||||
if(!viewValue.equalsIgnoreCase(newValue)) {
|
||||
view.setText(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter({"binding"})
|
||||
public static void bindTextInputEditTextDate(TextInputEditText view, final ObservableField<Date> observableDate) {
|
||||
Pair<ObservableField<Date>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != observableDate) {
|
||||
if (pair != null) {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
}
|
||||
};
|
||||
view.setTag(R.id.bound_observable, new Pair<>(observableDate, watcher));
|
||||
view.addTextChangedListener(watcher);
|
||||
|
||||
RunnableArgs<View> onClick = v -> {
|
||||
// Get Current Date
|
||||
Calendar c = UtilityDate.getCalendarInstance();
|
||||
|
||||
if(observableDate.get() != null) {
|
||||
c.setTime(observableDate.get());
|
||||
}
|
||||
|
||||
int mYear = c.get(Calendar.YEAR);
|
||||
int mMonth = c.get(Calendar.MONTH);
|
||||
int mDay = c.get(Calendar.DAY_OF_MONTH);
|
||||
|
||||
DatePickerDialog datePickerDialog = new DatePickerDialog(view.getContext(),
|
||||
(cView, year, month, day) -> {
|
||||
Date resultDate = new GregorianCalendar(year, month, day).getTime();
|
||||
view.setText(UtilityDate.formatDate(resultDate, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
observableDate.set(resultDate);
|
||||
}, mYear, mMonth, mDay);
|
||||
datePickerDialog.show();
|
||||
};
|
||||
|
||||
//Adding click-listener
|
||||
view.setOnClickListener(onClick::run);
|
||||
if(view.getParent() != null && view.getParent().getParent() != null && view.getParent().getParent() instanceof TextInputLayout) {
|
||||
((FrameLayout)view.getParent()).setOnClickListener(onClick::run);
|
||||
((TextInputLayout) view.getParent().getParent()).setOnClickListener(onClick::run);
|
||||
}
|
||||
}
|
||||
Date newValue = observableDate.get();
|
||||
view.setText(UtilityDate.formatDate(newValue, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindAutoCompleteTextView(AutoCompleteTextView view, final BindableString bindableString) {
|
||||
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
@@ -92,7 +233,8 @@ public class Converters {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
bindableString.set(s.toString());
|
||||
}
|
||||
};
|
||||
@@ -113,7 +255,8 @@ public class Converters {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
bindableString.set(s.toString());
|
||||
}
|
||||
};
|
||||
@@ -134,7 +277,8 @@ public class Converters {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
bindableString.set(s.toString());
|
||||
}
|
||||
};
|
||||
@@ -164,12 +308,13 @@ public class Converters {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
try {
|
||||
if(s.toString().trim().isEmpty()){
|
||||
if (s.toString().trim().isEmpty()) {
|
||||
bindableFloat.set(null);
|
||||
} else bindableFloat.set(decimalFormat.parse(s.toString()).floatValue());
|
||||
} catch (Exception ex){
|
||||
} catch (Exception ex) {
|
||||
Log.e("FloatFormat", ex.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -225,7 +370,7 @@ public class Converters {
|
||||
|
||||
@BindingAdapter({"layout_constraintGuide_percent"})
|
||||
public static void bindFloatPercetageOnGuideline(View view, final float percentage) {
|
||||
((Guideline)view).setGuidelinePercent(percentage);
|
||||
((Guideline) view).setGuidelinePercent(percentage);
|
||||
}
|
||||
|
||||
@BindingAdapter({"backgroundTintResID"})
|
||||
@@ -234,13 +379,10 @@ public class Converters {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@BindingAdapter("visibility")
|
||||
public static void bindCheckbox(LinearLayout view, final BindableBoolean bindableBoolean) {
|
||||
@BindingAdapter({"visibility"})
|
||||
public static void bindViewVisibility(View view, final BindableBoolean bindableBoolean) {
|
||||
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||
view.setTag(R.id.bound_observable, bindableBoolean);
|
||||
//view.setOnCheckedChangeListener((compoundButton, b) -> bindableBoolean.set(b));
|
||||
}
|
||||
bindableBoolean.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||
@Override
|
||||
@@ -254,7 +396,7 @@ public class Converters {
|
||||
|
||||
|
||||
@BindingAdapter("visibility")
|
||||
public static void bindView(View view, final BindableBoolean bindableBoolean) {
|
||||
public static void bindView(View view, final ObservableField<Boolean> bindableBoolean) {
|
||||
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||
view.setTag(R.id.bound_observable, bindableBoolean);
|
||||
}
|
||||
@@ -268,4 +410,13 @@ public class Converters {
|
||||
view.setVisibility(bindableBoolean.get() ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
|
||||
@BindingAdapter("android:layout_weight")
|
||||
public static void setLayoutWeight(View view, final Float weight) {
|
||||
|
||||
LinearLayoutCompat.LayoutParams layoutParams = (LinearLayoutCompat.LayoutParams) view.getLayoutParams();
|
||||
layoutParams.weight = weight;
|
||||
view.setLayoutParams(layoutParams);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package it.integry.integrywmsnative.core.di;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.core.util.Pair;
|
||||
import androidx.databinding.BindingAdapter;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.OnSingleClickListener;
|
||||
|
||||
public class ViewConverters {
|
||||
|
||||
|
||||
|
||||
@BindingAdapter("singleClick")
|
||||
public static void bindViewSingleClick(View view, final Runnable callback) {
|
||||
view.setFocusable(true);
|
||||
view.setClickable(true);
|
||||
view.setOnClickListener(new OnSingleClickListener() {
|
||||
@Override
|
||||
public void onSingleClick(View v) {
|
||||
callback.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class AlreadyAttachedDocumentToLUException extends Exception {
|
||||
|
||||
public AlreadyAttachedDocumentToLUException() {
|
||||
super(UtilityResources.getString(R.string.lu_already_attache_to_doc));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class AlreadyUsedAnonymousLabelException extends Exception {
|
||||
|
||||
public AlreadyUsedAnonymousLabelException() {
|
||||
super(UtilityResources.getString(R.string.already_used_anonymous_barcode));
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.view.dialogs.exception.DialogException;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class ExceptionsHandler implements Thread.UncaughtExceptionHandler {
|
||||
UtilityLogger.errorMe(new Exception(ex));
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Exception Logger failed!", e);
|
||||
System.exit(0);
|
||||
MainApplication.exit();
|
||||
}
|
||||
|
||||
appendToFile(new Exception(ex));
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
public class InvalidLUException extends Exception {
|
||||
public InvalidLUException() {
|
||||
super("L'unità logistica scansionata non è valida");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
|
||||
public class InvalidLUGestioneException extends Exception {
|
||||
|
||||
public InvalidLUGestioneException() {
|
||||
super("La GESTIONE dell'unità logistica scansionata non è valida");
|
||||
}
|
||||
|
||||
public InvalidLUGestioneException(GestioneEnum gestioneEnum) {
|
||||
super("La GESTIONE " + gestioneEnum.getText() + " dell'unità logistica scansionata non è valida");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class InvalidLUMultiCodMdepException extends Exception {
|
||||
|
||||
public InvalidLUMultiCodMdepException() {
|
||||
super(UtilityResources.getString(R.string.error_multiple_cod_mdep_ord));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class InvalidLUMultiGestioneException extends Exception {
|
||||
|
||||
public InvalidLUMultiGestioneException() {
|
||||
super(UtilityResources.getString(R.string.error_multiple_gest));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class InvalidOrderTypeException extends Exception {
|
||||
|
||||
public InvalidOrderTypeException() {
|
||||
super(UtilityResources.getString(R.string.error_wrong_order_type));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class LUScanNotGrantedException extends Exception {
|
||||
|
||||
public LUScanNotGrantedException() {
|
||||
super(UtilityResources.getString(R.string.lu_scan_not_granted_here));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public final class NoArtsFoundException extends Exception {
|
||||
public NoArtsFoundException() {
|
||||
super(UtilityResources.getString(R.string.no_result_from_barcode));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class NoArtsInLUException extends Exception {
|
||||
|
||||
public NoArtsInLUException() {
|
||||
super(UtilityResources.getString(R.string.no_items_found_message));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
public final class NoLUFoundException extends Exception {
|
||||
|
||||
public NoLUFoundException() {
|
||||
super("Nessuna UL trovata");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class NoOrderFoundException extends Exception {
|
||||
|
||||
public NoOrderFoundException() {
|
||||
super(UtilityResources.getString(R.string.no_orders_found_message));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class NoPrintersFoundException extends Exception {
|
||||
public NoPrintersFoundException() {
|
||||
super(UtilityResources.getString(R.string.exception_no_printer_found));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public final class NoResultFromBarcodeException extends Exception {
|
||||
public NoResultFromBarcodeException() {
|
||||
super(UtilityResources.getString(R.string.no_result_from_barcode));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
public final class ScannedPositionNotExistException extends Exception {
|
||||
public ScannedPositionNotExistException() {
|
||||
super("Nessuna posizione trovata con il barcode scansionato");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class TooManyLUFoundInMonoLUPositionException extends Exception {
|
||||
|
||||
public TooManyLUFoundInMonoLUPositionException() {
|
||||
super(UtilityResources.getString(R.string.too_much_lu_found_message_in_mono_lu));
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.exception.printer;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
|
||||
public class PrinterNotFoundException extends Exception{
|
||||
|
||||
public PrinterNotFoundException() {
|
||||
super(MainApplication.res.getString(R.string.exception_printer_not_found));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,14 +1,22 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.view.KeyEvent;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
|
||||
public class BaseActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
protected Dialog mCurrentProgress;
|
||||
|
||||
public BaseActivity() {
|
||||
//Thread.setDefaultUncaughtExceptionHandler(new MyExceptionHandler(this, BaseActivity.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
if (BarcodeManager.isEnabled() && BarcodeManager.isKeyboardEmulator()) {
|
||||
@@ -28,4 +36,21 @@ public class BaseActivity extends AppCompatActivity {
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void openProgress() {
|
||||
BarcodeManager.disable();
|
||||
if (this.mCurrentProgress == null) {
|
||||
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(this);
|
||||
}
|
||||
}
|
||||
|
||||
protected void closeProgress() {
|
||||
BarcodeManager.enable();
|
||||
if (mCurrentProgress != null) {
|
||||
mCurrentProgress.dismiss();
|
||||
mCurrentProgress = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
|
||||
public class BaseDialogFragment extends DialogFragment {
|
||||
|
||||
private boolean mBarcodeListener = false;
|
||||
private Dialog mCurrentProgress;
|
||||
|
||||
public BaseDialogFragment() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
if (BarcodeManager.isEnabled() && BarcodeManager.isKeyboardEmulator()) {
|
||||
getDialog().setOnKeyListener((dialog, keyCode, event) -> {
|
||||
if (mBarcodeListener && (event.getAction() == KeyEvent.ACTION_DOWN || event.getAction() == KeyEvent.ACTION_MULTIPLE) && !isControlKey(event)) {
|
||||
return BarcodeManager.onKeyDown(event.getKeyCode(), event);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isControlKey(KeyEvent keyEvent) {
|
||||
int keyCode = keyEvent.getKeyCode();
|
||||
return (
|
||||
keyCode == KeyEvent.KEYCODE_BACK ||
|
||||
keyCode == KeyEvent.KEYCODE_SHIFT_LEFT ||
|
||||
keyCode == KeyEvent.KEYCODE_DEL
|
||||
);
|
||||
}
|
||||
|
||||
public void setBarcodeListener(boolean listen) {
|
||||
this.mBarcodeListener = listen;
|
||||
}
|
||||
|
||||
protected void openProgress() {
|
||||
if (this.mCurrentProgress == null) {
|
||||
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(getActivity());
|
||||
}
|
||||
}
|
||||
|
||||
protected void closeProgress() {
|
||||
if (mCurrentProgress != null) {
|
||||
mCurrentProgress.dismiss();
|
||||
mCurrentProgress = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import android.app.Dialog;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
|
||||
public class BaseFragment extends Fragment {
|
||||
|
||||
protected Dialog mCurrentProgress;
|
||||
|
||||
|
||||
protected void openProgress() {
|
||||
|
||||
// new Thread(() -> {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
if (this.mCurrentProgress == null) {
|
||||
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(getActivity());
|
||||
}
|
||||
});
|
||||
// }).start();
|
||||
}
|
||||
|
||||
protected void closeProgress() {
|
||||
// new Thread(() -> {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
if (mCurrentProgress != null) {
|
||||
mCurrentProgress.dismiss();
|
||||
mCurrentProgress = null;
|
||||
}
|
||||
});
|
||||
// }).start();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableList;
|
||||
|
||||
public abstract class OnListGeneralChangedCallback extends ObservableList.OnListChangedCallback {
|
||||
|
||||
|
||||
@Override
|
||||
public void onItemRangeChanged(ObservableList sender, int positionStart, int itemCount) {
|
||||
onChanged(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeInserted(ObservableList sender, int positionStart, int itemCount) {
|
||||
onChanged(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeMoved(ObservableList sender, int fromPosition, int toPosition, int itemCount) {
|
||||
onChanged(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeRemoved(ObservableList sender, int positionStart, int itemCount) {
|
||||
onChanged(sender);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of {@link View.OnClickListener} that ignores subsequent clicks that happen too quickly after the first one.<br/>
|
||||
* To use this class, implement {@link #onSingleClick(View)} instead of {@link View.OnClickListener#onClick(View)}.
|
||||
*/
|
||||
public abstract class OnSingleClickListener implements View.OnClickListener {
|
||||
private static final String TAG = OnSingleClickListener.class.getSimpleName();
|
||||
|
||||
private static final long MIN_DELAY_MS = 500;
|
||||
|
||||
private long mLastClickTime;
|
||||
|
||||
@Override
|
||||
public final void onClick(View v) {
|
||||
long lastClickTime = mLastClickTime;
|
||||
long now = System.currentTimeMillis();
|
||||
mLastClickTime = now;
|
||||
if (now - lastClickTime < MIN_DELAY_MS) {
|
||||
// Too fast: ignore
|
||||
if (Config.LOGD) Log.d(TAG, "onClick Clicked too quickly: ignored");
|
||||
} else {
|
||||
// Register the click
|
||||
onSingleClick(v);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a view has been clicked.
|
||||
*
|
||||
* @param v The view that was clicked.
|
||||
*/
|
||||
public abstract void onSingleClick(View v);
|
||||
|
||||
/**
|
||||
* Wraps an {@link View.OnClickListener} into an {@link OnSingleClickListener}.<br/>
|
||||
* The argument's {@link View.OnClickListener#onClick(View)} method will be called when a single click is registered.
|
||||
*
|
||||
* @param onClickListener The listener to wrap.
|
||||
* @return the wrapped listener.
|
||||
*/
|
||||
public static View.OnClickListener wrap(final View.OnClickListener onClickListener) {
|
||||
return new OnSingleClickListener() {
|
||||
@Override
|
||||
public void onSingleClick(View v) {
|
||||
onClickListener.onClick(v);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
public interface RunnableArgsWithReturn<T, R> {
|
||||
|
||||
R run(T data);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
public interface RunnableArgssss<S, T, U, V> {
|
||||
|
||||
void run(S data1, T data2, U data3, V data4);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
public interface RunnableWithReturn<R> {
|
||||
|
||||
R run();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import android.widget.BaseAdapter;
|
||||
|
||||
import androidx.databinding.ObservableList;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class WeakReferenceOnListChangedCallback extends ObservableList.OnListChangedCallback {
|
||||
|
||||
private final WeakReference<BaseAdapter> adapterReference;
|
||||
|
||||
public WeakReferenceOnListChangedCallback(BaseAdapter baseAdapter) {
|
||||
this.adapterReference = new WeakReference<>(baseAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeChanged(ObservableList sender, int positionStart, int itemCount) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeInserted(ObservableList sender, int positionStart, int itemCount) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeMoved(ObservableList sender, int fromPosition, int toPosition, int itemCount) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeRemoved(ObservableList sender, int positionStart, int itemCount) {
|
||||
BaseAdapter adapter = adapterReference.get();
|
||||
if (adapter != null) {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package it.integry.integrywmsnative.core.expansion.view;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableList;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||
|
||||
public abstract class ExtendedRecyclerView<T, VH extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<VH> {
|
||||
protected ArrayList<T> mDataset;
|
||||
private View mEmptyView;
|
||||
|
||||
public ExtendedRecyclerView(ObservableArrayList<T> myDataset) {
|
||||
mDataset = myDataset;
|
||||
|
||||
myDataset.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
notifyDataSetChanged();
|
||||
checkIfEmpty();
|
||||
}
|
||||
});
|
||||
|
||||
checkIfEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewRecycled(VH holder) {
|
||||
super.onViewRecycled(holder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mDataset.size();
|
||||
}
|
||||
|
||||
public ExtendedRecyclerView<T, VH> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package it.integry.integrywmsnative.core.expansion.view;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableList;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.zhukic.sectionedrecyclerview.SectionedRecyclerViewAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||
|
||||
public abstract class ExtendedSectionedRecyclerView<T, SH extends RecyclerView.ViewHolder, VH extends RecyclerView.ViewHolder>
|
||||
extends SectionedRecyclerViewAdapter<SH, VH> {
|
||||
|
||||
protected ArrayList<T> mDataset = new ArrayList<>();
|
||||
private View mEmptyView;
|
||||
|
||||
public ExtendedSectionedRecyclerView(ObservableArrayList<T> myDataset) {
|
||||
mDataset.addAll(myDataset);
|
||||
|
||||
myDataset.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
mDataset.clear();
|
||||
mDataset.addAll(sender);
|
||||
notifyDataSetChanged();
|
||||
notifyDataChanged();
|
||||
checkIfEmpty();
|
||||
}
|
||||
});
|
||||
|
||||
checkIfEmpty();
|
||||
}
|
||||
|
||||
public ExtendedSectionedRecyclerView<T, SH, VH> setEmptyView(View emptyView) {
|
||||
this.mEmptyView = emptyView;
|
||||
this.checkIfEmpty();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemSize() {
|
||||
return this.mDataset.size();
|
||||
}
|
||||
|
||||
private void checkIfEmpty() {
|
||||
if (mEmptyView != null) {
|
||||
final boolean emptyViewVisible = getItemSize() == 0;
|
||||
mEmptyView.setVisibility(emptyViewVisible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.interfaces;
|
||||
|
||||
public interface IDestroyableFragment {
|
||||
|
||||
void addOnPreDestroy(Runnable onPreDestroy);
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package it.integry.integrywmsnative.core.interfaces;
|
||||
|
||||
public interface IFilterableFragment {
|
||||
public interface IFilterableFragment extends IDestroyableFragment {
|
||||
|
||||
void onFilterClick();
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.interfaces;
|
||||
|
||||
public interface ILifecycleFragment {
|
||||
|
||||
void onPreDestroy(Runnable onComplete);
|
||||
|
||||
}
|
||||
@@ -2,10 +2,8 @@ package it.integry.integrywmsnative.core.interfaces;
|
||||
|
||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
|
||||
public interface IScrollableFragment {
|
||||
public interface IScrollableFragment extends IDestroyableFragment {
|
||||
|
||||
void setScrollToolbar(ElevatedToolbar toolbar);
|
||||
|
||||
void setOnPreDestroy(Runnable onPreDestroy);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package it.integry.integrywmsnative.core.interfaces;
|
||||
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
|
||||
public interface ISearcableFragment extends SearchView.OnQueryTextListener {
|
||||
public interface ISearcableFragment extends SearchView.OnQueryTextListener, IDestroyableFragment {
|
||||
|
||||
void onSearchEnabled();
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package it.integry.integrywmsnative.core.interfaces;
|
||||
|
||||
public interface ISelectAllFragment {
|
||||
public interface ISelectAllFragment extends IDestroyableFragment {
|
||||
|
||||
boolean isEnabled();
|
||||
boolean isSelectAllButtonEnabled();
|
||||
|
||||
void onSelectAll();
|
||||
|
||||
|
||||
@@ -2,14 +2,13 @@ package it.integry.integrywmsnative.core.interfaces;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
/**
|
||||
* Created by GiuseppeS on 07/03/2018.
|
||||
*/
|
||||
|
||||
public interface ITitledFragment {
|
||||
public interface ITitledFragment extends IDestroyableFragment {
|
||||
|
||||
void onCreateActionBar(AppCompatTextView titleText, Context context);
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package it.integry.integrywmsnative.core.interfaces.viewmodel_listeners;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
|
||||
public interface ILUBaseOperationsListener {
|
||||
|
||||
void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete);
|
||||
|
||||
void onLUOpened(MtbColt mtbColt);
|
||||
|
||||
void onLUClosed();
|
||||
|
||||
void onRowSaved();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package it.integry.integrywmsnative.core.interfaces.viewmodel_listeners;
|
||||
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
|
||||
public interface ILUPositionListener {
|
||||
|
||||
void onLUPositionChangeRequest(RunnableArgss<Boolean, MtbDepoPosizione> onComplete);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package it.integry.integrywmsnative.core.interfaces.viewmodel_listeners;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public interface ILUPrintListener {
|
||||
|
||||
void onLUSuccessullyPrinted();
|
||||
|
||||
void onLUPrintRequest(RunnableArgs<Boolean> onComplete);
|
||||
|
||||
void onLUPrintError(Exception ex, Runnable onComplete);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package it.integry.integrywmsnative.core.interfaces.viewmodel_listeners;
|
||||
|
||||
public interface ILoadingListener {
|
||||
|
||||
void onLoadingStarted();
|
||||
|
||||
void onLoadingEnded();
|
||||
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package it.integry.integrywmsnative.core.model;
|
||||
|
||||
public class CommonModelConsts {
|
||||
|
||||
public static String ENTITY_NULL_STRING = "[NULL]";
|
||||
|
||||
public static class OPERATION {
|
||||
public static String INSERT_OR_UPDATE = "INSERT_OR_UPDATE";
|
||||
public static String INSERT = "INSERT";
|
||||
|
||||
@@ -141,6 +141,8 @@ public class DtbDocr {
|
||||
|
||||
private MtbAart mtbAart;
|
||||
|
||||
private String dataScadPartitaMag;
|
||||
|
||||
public String getCodAnag() {
|
||||
return codAnag;
|
||||
}
|
||||
@@ -739,6 +741,19 @@ public class DtbDocr {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDataScadPartitaMag() {
|
||||
return dataScadPartitaMag;
|
||||
}
|
||||
|
||||
public Date getDataScadPartitaMagD() {
|
||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataScadPartitaMag());
|
||||
}
|
||||
|
||||
public DtbDocr setDataScadPartitaMag(String dataScadPartitaMag) {
|
||||
this.dataScadPartitaMag = dataScadPartitaMag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbAart getMtbAart() {
|
||||
return mtbAart;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package it.integry.integrywmsnative.core.model;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class GtbAnag {
|
||||
public class GtbAnag extends EntityBase {
|
||||
|
||||
private String codAnag;
|
||||
private String ragSoc;
|
||||
@@ -45,6 +45,10 @@ public class GtbAnag {
|
||||
private String precode;
|
||||
private Boolean insDestinatario;
|
||||
|
||||
public GtbAnag() {
|
||||
this.type = "gtb_anag";
|
||||
}
|
||||
|
||||
public String getCodAnag() {
|
||||
return codAnag;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
package it.integry.integrywmsnative.core.model;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class JtbFasi extends EntityBase {
|
||||
|
||||
private String codJfas;
|
||||
private String codJfasParent;
|
||||
private String descrizione;
|
||||
private String descrizEstesa;
|
||||
private String codMfas;
|
||||
private String pathIcona;
|
||||
private String umAllocazione;
|
||||
private BigDecimal maxAllocazione;
|
||||
private String codJCal;
|
||||
private String idJfas;
|
||||
private String flagAttivo;
|
||||
private String flagCheck;
|
||||
private String umProd;
|
||||
private BigDecimal prodStd;
|
||||
private String codMdepLav;
|
||||
private String tipoProd;
|
||||
|
||||
public JtbFasi() {
|
||||
this.type = "jtb_fasi";
|
||||
}
|
||||
|
||||
public String getCodJfas() {
|
||||
return codJfas;
|
||||
}
|
||||
|
||||
public JtbFasi setCodJfas(String codJfas) {
|
||||
this.codJfas = codJfas;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodJfasParent() {
|
||||
return codJfasParent;
|
||||
}
|
||||
|
||||
public JtbFasi setCodJfasParent(String codJfasParent) {
|
||||
this.codJfasParent = codJfasParent;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public JtbFasi setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizEstesa() {
|
||||
return descrizEstesa;
|
||||
}
|
||||
|
||||
public JtbFasi setDescrizEstesa(String descrizEstesa) {
|
||||
this.descrizEstesa = descrizEstesa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMfas() {
|
||||
return codMfas;
|
||||
}
|
||||
|
||||
public JtbFasi setCodMfas(String codMfas) {
|
||||
this.codMfas = codMfas;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPathIcona() {
|
||||
return pathIcona;
|
||||
}
|
||||
|
||||
public JtbFasi setPathIcona(String pathIcona) {
|
||||
this.pathIcona = pathIcona;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUmAllocazione() {
|
||||
return umAllocazione;
|
||||
}
|
||||
|
||||
public JtbFasi setUmAllocazione(String umAllocazione) {
|
||||
this.umAllocazione = umAllocazione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxAllocazione() {
|
||||
return maxAllocazione;
|
||||
}
|
||||
|
||||
public JtbFasi setMaxAllocazione(BigDecimal maxAllocazione) {
|
||||
this.maxAllocazione = maxAllocazione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodJCal() {
|
||||
return codJCal;
|
||||
}
|
||||
|
||||
public JtbFasi setCodJCal(String codJCal) {
|
||||
this.codJCal = codJCal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIdJfas() {
|
||||
return idJfas;
|
||||
}
|
||||
|
||||
public JtbFasi setIdJfas(String idJfas) {
|
||||
this.idJfas = idJfas;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagAttivo() {
|
||||
return flagAttivo;
|
||||
}
|
||||
|
||||
public JtbFasi setFlagAttivo(String flagAttivo) {
|
||||
this.flagAttivo = flagAttivo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagCheck() {
|
||||
return flagCheck;
|
||||
}
|
||||
|
||||
public JtbFasi setFlagCheck(String flagCheck) {
|
||||
this.flagCheck = flagCheck;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUmProd() {
|
||||
return umProd;
|
||||
}
|
||||
|
||||
public JtbFasi setUmProd(String umProd) {
|
||||
this.umProd = umProd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getProdStd() {
|
||||
return prodStd;
|
||||
}
|
||||
|
||||
public JtbFasi setProdStd(BigDecimal prodStd) {
|
||||
this.prodStd = prodStd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMdepLav() {
|
||||
return codMdepLav;
|
||||
}
|
||||
|
||||
public JtbFasi setCodMdepLav(String codMdepLav) {
|
||||
this.codMdepLav = codMdepLav;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTipoProd() {
|
||||
return tipoProd;
|
||||
}
|
||||
|
||||
public JtbFasi setTipoProd(String tipoProd) {
|
||||
this.tipoProd = tipoProd;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("%s - %s", getCodJfas(), getDescrizione());
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,15 @@
|
||||
package it.integry.integrywmsnative.core.model;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
|
||||
/**
|
||||
* Created by GiuseppeS on 06/03/2018.
|
||||
*/
|
||||
|
||||
public class MtbAart implements Parcelable{
|
||||
public class MtbAart extends EntityBase {
|
||||
|
||||
private String codMart;
|
||||
private String descrizione;
|
||||
@@ -88,103 +87,32 @@ public class MtbAart implements Parcelable{
|
||||
private String codNcIntracee;
|
||||
private String marchio;
|
||||
private Integer sezione;
|
||||
private UntMisRifPesoEnum untMisRifPeso;
|
||||
|
||||
private List<MtbUntMis> mtbUntMis;
|
||||
|
||||
|
||||
public MtbAart(){}
|
||||
public enum UntMisRifPesoEnum {
|
||||
C,
|
||||
M;
|
||||
}
|
||||
|
||||
|
||||
public boolean isFlagTracciabilita() {
|
||||
|
||||
public MtbAart() {
|
||||
this.type = "mtb_aart";
|
||||
}
|
||||
|
||||
public boolean isFlagTracciabilitaBoolean() {
|
||||
return flagTracciabilita != null && flagTracciabilita.equalsIgnoreCase("S");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected MtbAart(Parcel in) {
|
||||
codMart = in.readString();
|
||||
descrizione = in.readString();
|
||||
untMis = in.readString();
|
||||
barCode = in.readString();
|
||||
pesoKg = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
qtaCnf = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
codAliq = in.readString();
|
||||
codScoArt = in.readString();
|
||||
codTcolUi = in.readString();
|
||||
codTcolUl = in.readString();
|
||||
articoloComposto = in.readString();
|
||||
esposizioneComp = in.readString();
|
||||
descrizioneEstesa = in.readString();
|
||||
codUltForn = in.readString();
|
||||
dataUltCar = in.readString();
|
||||
valUltCar = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
codUltClie = in.readString();
|
||||
dataUltScar = in.readString();
|
||||
valUltScar = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
tipoCodice = in.readString();
|
||||
note = in.readString();
|
||||
posizione = in.readString();
|
||||
colliPedana = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
untMis2 = in.readString();
|
||||
rapConv2 = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
flagInclListino = in.readString();
|
||||
untMis3 = in.readString();
|
||||
rapConv3 = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
codMartStat = in.readString();
|
||||
codMcon = in.readString();
|
||||
codMgrp = in.readString();
|
||||
codMsfa = in.readString();
|
||||
codMsgr = in.readString();
|
||||
codMstp = in.readString();
|
||||
codMtip = in.readString();
|
||||
descrizioneStat = in.readString();
|
||||
flagStato = in.readString();
|
||||
cambioDiviCar = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
cambioDiviScar = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
ggScadPartita = in.readByte() == 0x00 ? null : in.readInt();
|
||||
volumeMc = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
flagEsponiPrz = in.readString();
|
||||
dataUltVar = in.readString();
|
||||
percSfrido = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
codBarreImb = in.readString();
|
||||
flagCalcPrz = in.readString();
|
||||
esposizioneCompAcq = in.readString();
|
||||
flagCalcPrzAcq = in.readString();
|
||||
diacod = in.readString();
|
||||
plu = in.readString();
|
||||
partIvaProd = in.readString();
|
||||
ragSocProd = in.readString();
|
||||
flagRapConvVariabile = in.readString();
|
||||
flagMovArtMag = in.readString();
|
||||
flagTracciabilita = in.readString();
|
||||
taraKg = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
colliStrato = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
flagQtaCnfFissa = in.readString();
|
||||
flagColliPedanaFisso = in.readString();
|
||||
codCconCosti = in.readString();
|
||||
codCconRicavi = in.readString();
|
||||
codDgrpArt = in.readString();
|
||||
codDiviCar = in.readString();
|
||||
codDiviScar = in.readString();
|
||||
codEcrCat = in.readString();
|
||||
codEcrMcat = in.readString();
|
||||
codEcrRep = in.readString();
|
||||
codEcrStipo = in.readString();
|
||||
codEcrTipo = in.readString();
|
||||
codGrpBolla = in.readString();
|
||||
ingredienti = in.readString();
|
||||
idArtEqui = in.readString();
|
||||
descrCassa = in.readString();
|
||||
codNcIntracee = in.readString();
|
||||
marchio = in.readString();
|
||||
sezione = in.readByte() == 0x00 ? null : in.readInt();
|
||||
public boolean isFlagQtaCnfFissaBoolean() {
|
||||
return "S".equalsIgnoreCase(flagQtaCnfFissa);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
@@ -658,6 +586,10 @@ public class MtbAart implements Parcelable{
|
||||
return flagRapConvVariabile;
|
||||
}
|
||||
|
||||
public boolean getFlagRapConvVariabileBoolean() {
|
||||
return !UtilityString.isNullOrEmpty(flagRapConvVariabile) && flagRapConvVariabile.equalsIgnoreCase("S");
|
||||
}
|
||||
|
||||
public MtbAart setFlagRapConvVariabile(String flagRapConvVariabile) {
|
||||
this.flagRapConvVariabile = flagRapConvVariabile;
|
||||
return this;
|
||||
@@ -703,10 +635,6 @@ public class MtbAart implements Parcelable{
|
||||
return flagQtaCnfFissa;
|
||||
}
|
||||
|
||||
public boolean isFlagQtaCnfFissa() {
|
||||
return "S".equalsIgnoreCase(flagQtaCnfFissa);
|
||||
}
|
||||
|
||||
public MtbAart setFlagQtaCnfFissa(String flagQtaCnfFissa) {
|
||||
this.flagQtaCnfFissa = flagQtaCnfFissa;
|
||||
return this;
|
||||
@@ -874,111 +802,21 @@ public class MtbAart implements Parcelable{
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(codMart);
|
||||
dest.writeString(descrizione);
|
||||
dest.writeString(untMis);
|
||||
dest.writeString(barCode);
|
||||
dest.writeValue(pesoKg);
|
||||
dest.writeValue(qtaCnf);
|
||||
dest.writeString(codAliq);
|
||||
dest.writeString(codScoArt);
|
||||
dest.writeString(codTcolUi);
|
||||
dest.writeString(codTcolUl);
|
||||
dest.writeString(articoloComposto);
|
||||
dest.writeString(esposizioneComp);
|
||||
dest.writeString(descrizioneEstesa);
|
||||
dest.writeString(codUltForn);
|
||||
dest.writeString(dataUltCar);
|
||||
dest.writeValue(valUltCar);
|
||||
dest.writeString(codUltClie);
|
||||
dest.writeString(dataUltScar);
|
||||
dest.writeValue(valUltScar);
|
||||
dest.writeString(tipoCodice);
|
||||
dest.writeString(note);
|
||||
dest.writeString(posizione);
|
||||
dest.writeValue(colliPedana);
|
||||
dest.writeString(untMis2);
|
||||
dest.writeValue(rapConv2);
|
||||
dest.writeString(flagInclListino);
|
||||
dest.writeString(untMis3);
|
||||
dest.writeValue(rapConv3);
|
||||
dest.writeString(codMartStat);
|
||||
dest.writeString(codMcon);
|
||||
dest.writeString(codMgrp);
|
||||
dest.writeString(codMsfa);
|
||||
dest.writeString(codMsgr);
|
||||
dest.writeString(codMstp);
|
||||
dest.writeString(codMtip);
|
||||
dest.writeString(descrizioneStat);
|
||||
dest.writeString(flagStato);
|
||||
dest.writeValue(cambioDiviCar);
|
||||
dest.writeValue(cambioDiviScar);
|
||||
if (ggScadPartita == null) {
|
||||
dest.writeByte((byte) (0x00));
|
||||
} else {
|
||||
dest.writeByte((byte) (0x01));
|
||||
dest.writeInt(ggScadPartita);
|
||||
}
|
||||
dest.writeValue(volumeMc);
|
||||
dest.writeString(flagEsponiPrz);
|
||||
dest.writeString(dataUltVar);
|
||||
dest.writeValue(percSfrido);
|
||||
dest.writeString(codBarreImb);
|
||||
dest.writeString(flagCalcPrz);
|
||||
dest.writeString(esposizioneCompAcq);
|
||||
dest.writeString(flagCalcPrzAcq);
|
||||
dest.writeString(diacod);
|
||||
dest.writeString(plu);
|
||||
dest.writeString(partIvaProd);
|
||||
dest.writeString(ragSocProd);
|
||||
dest.writeString(flagRapConvVariabile);
|
||||
dest.writeString(flagMovArtMag);
|
||||
dest.writeString(flagTracciabilita);
|
||||
dest.writeValue(taraKg);
|
||||
dest.writeValue(colliStrato);
|
||||
dest.writeString(flagQtaCnfFissa);
|
||||
dest.writeString(flagColliPedanaFisso);
|
||||
dest.writeString(codCconCosti);
|
||||
dest.writeString(codCconRicavi);
|
||||
dest.writeString(codDgrpArt);
|
||||
dest.writeString(codDiviCar);
|
||||
dest.writeString(codDiviScar);
|
||||
dest.writeString(codEcrCat);
|
||||
dest.writeString(codEcrMcat);
|
||||
dest.writeString(codEcrRep);
|
||||
dest.writeString(codEcrStipo);
|
||||
dest.writeString(codEcrTipo);
|
||||
dest.writeString(codGrpBolla);
|
||||
dest.writeString(ingredienti);
|
||||
dest.writeString(idArtEqui);
|
||||
dest.writeString(descrCassa);
|
||||
dest.writeString(codNcIntracee);
|
||||
dest.writeString(marchio);
|
||||
if (sezione == null) {
|
||||
dest.writeByte((byte) (0x00));
|
||||
} else {
|
||||
dest.writeByte((byte) (0x01));
|
||||
dest.writeInt(sezione);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public List<MtbUntMis> getMtbUntMis() {
|
||||
return mtbUntMis;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static final Parcelable.Creator<MtbAart> CREATOR = new Parcelable.Creator<MtbAart>() {
|
||||
@Override
|
||||
public MtbAart createFromParcel(Parcel in) {
|
||||
return new MtbAart(in);
|
||||
}
|
||||
public MtbAart setMtbUntMis(List<MtbUntMis> mtbUntMis) {
|
||||
this.mtbUntMis = mtbUntMis;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MtbAart[] newArray(int size) {
|
||||
return new MtbAart[size];
|
||||
}
|
||||
};
|
||||
public UntMisRifPesoEnum getUntMisRifPeso() {
|
||||
return untMisRifPeso;
|
||||
}
|
||||
|
||||
public MtbAart setUntMisRifPeso(UntMisRifPesoEnum untMisRifPeso) {
|
||||
this.untMisRifPeso = untMisRifPeso;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
|
||||
public class MtbColr extends EntityBase {
|
||||
@@ -50,11 +51,16 @@ public class MtbColr extends EntityBase {
|
||||
private BigDecimal pesoLordoKg;
|
||||
|
||||
private MtbAart mtbAart;
|
||||
|
||||
private MtbPartitaMag mtbPartitaMag;
|
||||
|
||||
private transient MtbColr refMtbColr;
|
||||
|
||||
public MtbColr() {
|
||||
type = "mtb_colr";
|
||||
|
||||
if(SettingsManager.i().isUserLoggedIn()) {
|
||||
setUtente(SettingsManager.i().getUser().getFullname());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +75,10 @@ public class MtbColr extends EntityBase {
|
||||
return gestione;
|
||||
}
|
||||
|
||||
public GestioneEnum getGestioneEnum() {
|
||||
return GestioneEnum.fromString(gestione);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public MtbColr setGestione(GestioneEnum gestione) {
|
||||
@@ -180,6 +190,10 @@ public class MtbColr extends EntityBase {
|
||||
return gestioneRif;
|
||||
}
|
||||
|
||||
public GestioneEnum getGestioneRifEnum() {
|
||||
return GestioneEnum.fromString(gestioneRif);
|
||||
}
|
||||
|
||||
public MtbColr setGestioneRif(String gestioneRif) {
|
||||
this.gestioneRif = gestioneRif;
|
||||
return this;
|
||||
@@ -501,4 +515,13 @@ public class MtbColr extends EntityBase {
|
||||
this.pesoLordoKg = pesoLordoKg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbColr getRefMtbColr() {
|
||||
return refMtbColr;
|
||||
}
|
||||
|
||||
public MtbColr setRefMtbColr(MtbColr refMtbColr) {
|
||||
this.refMtbColr = refMtbColr;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user