Compare commits
499 Commits
v1.16.1(18
...
v1.24.6(27
| Author | SHA1 | Date | |
|---|---|---|---|
| cc1e1bf221 | |||
| 0f41bd99aa | |||
| 7a3a207462 | |||
| 7206b3c37e | |||
| 4cf8b6167f | |||
| b19b438489 | |||
| d3ee6d9ea3 | |||
| dd9789c4f3 | |||
| 67571e3d7a | |||
| a0e17f557d | |||
| 684946bb14 | |||
| 4aab6b1688 | |||
| 310a79f41d | |||
| f8164ca1eb | |||
| 790a9eae6c | |||
| b41edd314f | |||
| 34d8a93c01 | |||
| 3b45d8fe35 | |||
| aba1fcdc7b | |||
| 012d7caa52 | |||
| e7e20da206 | |||
| ef6535897b | |||
| 8c75ecbd0a | |||
| fad3c4243d | |||
| a6e75114cb | |||
| 48a83bc0d5 | |||
| b58475b426 | |||
| 207daab105 | |||
| c32da27b7f | |||
| 1f94c14634 | |||
| 4880ea8301 | |||
| a2d165d475 | |||
| d142f0c868 | |||
| 746838010a | |||
| a74d865c57 | |||
| 0a37323cef | |||
| b36b80eae0 | |||
| acb7727f3c | |||
| c16f5d2ddd | |||
| 4ca449d557 | |||
| da70d7c064 | |||
| 0be1eac5fe | |||
| e0eabbcbda | |||
| bd7b561b28 | |||
| 37c3a1ec76 | |||
| 62e69ad5bf | |||
| 3a6ba51a69 | |||
| 767088f1d0 | |||
| d0f6999dd8 | |||
| f88d7892bd | |||
| 3df5e406ef | |||
| 8e0728c2b4 | |||
| 0a2d47110d | |||
| 4ed8c825dd | |||
| 0a6d01628f | |||
| 453c8e0cad | |||
| ee43d1e985 | |||
| 86d472fb88 | |||
| 61c3458088 | |||
| 85c4768e51 | |||
| f1b4ce469e | |||
| 6071b3eb44 | |||
| 1d2bd20584 | |||
| 756389e6c6 | |||
| 4b19129a2f | |||
| f6aadf1115 | |||
| 3a5de50353 | |||
| cf3b8749dc | |||
| 34ff300515 | |||
| 0738993d4c | |||
| 9765fe1807 | |||
| 968e904715 | |||
| 90985b899b | |||
| d81e0dd72c | |||
| ee8751163c | |||
| 5476e9633e | |||
| 84d800a698 | |||
| eb39e1b7c5 | |||
| 57fa738c59 | |||
| bfc02a7d48 | |||
| e963e03c81 | |||
| f1c25a3673 | |||
| 90d5a8d43b | |||
| e1b4af2402 | |||
| 86c7be4e7d | |||
| 8686df3d8a | |||
| 6b04246f42 | |||
| 8e40092130 | |||
| b8dbde5ee1 | |||
| ae6d37e80d | |||
| 6dcc711006 | |||
| a616cb6022 | |||
| 837781389c | |||
| f23ff88878 | |||
| ddc038add4 | |||
| f037617dd9 | |||
| 84cff70567 | |||
| 8a1b3a1b00 | |||
| f11a81ef05 | |||
| eb8595e247 | |||
| 85520b937f | |||
| ec5bee558c | |||
| 857295d92b | |||
| 4da2c43251 | |||
| fc1681d111 | |||
| 692a350128 | |||
| 47f29899a2 | |||
| a0dfd20110 | |||
| 92aadad5cb | |||
| 52092e7e9c | |||
| ecfb8faf01 | |||
| e5dd4b15f4 | |||
| 6e070285e3 | |||
| d13cdf63c2 | |||
| c3884774e1 | |||
| 983b70821a | |||
| 8e60aa0249 | |||
| 69962781aa | |||
| a921b83c1f | |||
| ea8be0559a | |||
| 66f117186c | |||
| 4ff39009d2 | |||
| 981a42cd7e | |||
| 062938d0e4 | |||
| cc7044c7de | |||
| 7d771bf39b | |||
| 3261aa7c41 | |||
| d79c13b370 | |||
| 55c1cb40a2 | |||
| d570ab7e3d | |||
| e3ebfcb27d | |||
| 2230dade45 | |||
| 637e46b868 | |||
| 473d5d1a5a | |||
| c37f4d62a4 | |||
| b8ac75ed6d | |||
| df9d3a80ac | |||
| 6aacaef720 | |||
| 1fab62187f | |||
| 0c4d0f2b59 | |||
| dbf183c7c6 | |||
| 42649cd5bb | |||
| 1f1a8f75de | |||
| 5215d43bf4 | |||
| d2f262a9b8 | |||
| 1fc78d053b | |||
| 016be4799c | |||
| e837132996 | |||
| 925760720d | |||
| 2e872c23aa | |||
| 7a62c8855f | |||
| c1da07b23c | |||
| ba7e2a6d61 | |||
| e798db1427 | |||
| a79dee3574 | |||
| 4f753399bf | |||
| 80842e49e5 | |||
| 2eac741bbb | |||
| c3e2a2a8fd | |||
| 99f0691c55 | |||
| 37ebd96a0f | |||
| c012c54805 | |||
| 9de6dcce80 | |||
| fc403ec419 | |||
| 4968f2f4fa | |||
| a7ea9b9022 | |||
| 28a034f0d6 | |||
| ca3f1f5962 | |||
| 4117e69278 | |||
| 18ff1e2345 | |||
| 37e3024220 | |||
| ed35ea6894 | |||
| bd28db7422 | |||
| 9beea9f2e9 | |||
| 205af60edb | |||
| 21f9a9819a | |||
| 4059335e61 | |||
| 14252f0f4b | |||
| c13eee355e | |||
| 51528fda6f | |||
| 1486d39eb8 | |||
| 1951d8e2a4 | |||
| 420fdf6b4c | |||
| a14a593e4f | |||
| 5d7ffa02c4 | |||
| 4942807104 | |||
| 20dafb1250 | |||
| eb0746de0c | |||
| 2e255e0c47 | |||
| 6baebda5e1 | |||
| 8f943829ec | |||
| bd19d8c1a2 | |||
| 3e79d0a07a | |||
| d2111e36ee | |||
| 47a1ab8223 | |||
| 45df794280 | |||
| 7a9bd15cfa | |||
| f902439086 | |||
| e7334d358b | |||
| 262986f02c | |||
| 76188aa792 | |||
| eb67d2fc65 | |||
| 6e176c0b7f | |||
| 83b2327247 | |||
| 7605c4d70a | |||
| 5a8935675c | |||
| 1645fba77c | |||
| 6929a386db | |||
| 93c3350cb2 | |||
| 2b97faaa65 | |||
| 9260379c5f | |||
| 35e7fd60be | |||
| 1bbe5818f8 | |||
| 65d372c04c | |||
| be1c5ecd0b | |||
| 30e16fb765 | |||
| effff99e9a | |||
| c40bb8d7b0 | |||
| a7063c70eb | |||
| 512f5b0de3 | |||
| e306c28723 | |||
| f361701ad9 | |||
| aa00c440b0 | |||
| df2a566322 | |||
| eb83f8babb | |||
| e21946fe23 | |||
| 30b5053a22 | |||
| 914618cfeb | |||
| 53ebf6ff14 | |||
| 34c2065041 | |||
| db7ceedb4a | |||
| 1ef70c4f3a | |||
| e1eae00e01 | |||
| f8533daeed | |||
| ff4d71e616 | |||
| 8015961054 | |||
| a9164109da | |||
| 4a884b92ad | |||
| 6f15169157 | |||
| eb99c9d8cf | |||
| 0cc31a4a8e | |||
| a6664102db | |||
| eaeef05e64 | |||
| 98b6a32126 | |||
| fcddda8e3f | |||
| 9033548455 | |||
| 18b4b08e1b | |||
| 627d3646a6 | |||
| 8d87970a75 | |||
| ea6b26e00f | |||
| 624a880ad5 | |||
| fbcda5eaf6 | |||
| fbe095b7f7 | |||
| d4bd92ec90 | |||
| c3ee5519b4 | |||
| 1394725286 | |||
| b4cf8f629c | |||
| ec49384b58 | |||
| 0404863e3d | |||
| b71d627f99 | |||
| 403541c8e0 | |||
| f1e2a3a536 | |||
| 23bb284cff | |||
| 449955f182 | |||
| 15d3b1858a | |||
| cfb3acc33d | |||
| 61768fb2d0 | |||
| d782e8667a | |||
| e3d366b7a5 | |||
| c64112835b | |||
| 7ebc5de620 | |||
| aa93dc489e | |||
| 6c1be3a7bc | |||
| 18593c7fa0 | |||
| 3a6b87ba47 | |||
| 95ee04fc2a | |||
| 1d3113ce2e | |||
| ef3bac3b0b | |||
| d5f590bfda | |||
| 1b0f9fb4de | |||
| b1e309dc1c | |||
| 6da020c5cc | |||
| da4d66ecfe | |||
| 18efcb31a0 | |||
| d31cb71f9e | |||
| 86c99a99ca | |||
| ba1a70e73e | |||
| c822c3e0ef | |||
| 42746b3656 | |||
| 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 |
1
.idea/.gitignore
generated
vendored
Normal file
1
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/saveactions_settings.xml
|
||||
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>
|
||||
558
.idea/dbnavigator.xml
generated
Normal file
558
.idea/dbnavigator.xml
generated
Normal file
File diff suppressed because one or more lines are too long
16
.idea/deploymentTargetDropDown.xml
generated
Normal file
16
.idea/deploymentTargetDropDown.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<runningDeviceTargetsSelectedWithDialog>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="SERIAL_NUMBER" />
|
||||
<value value="20119B1E55" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetsSelectedWithDialog>
|
||||
</component>
|
||||
</project>
|
||||
12
.idea/runConfigurations.xml
generated
12
.idea/runConfigurations.xml
generated
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<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" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/runConfigurations/app_base.xml
generated
8
.idea/runConfigurations/app_base.xml
generated
@@ -1,19 +1,21 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app_base" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="WMS_Native.app" />
|
||||
<module name="WMS.app" />
|
||||
<option name="DEPLOY" value="true" />
|
||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||
<option name="ARTIFACT_NAME" value="" />
|
||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||
<option name="ALL_USERS" value="false" />
|
||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
|
||||
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS.dynamic_vgalimenti" />
|
||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="default_activity" />
|
||||
<option name="CLEAR_LOGCAT" value="true" />
|
||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
||||
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
|
||||
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
|
||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
|
||||
@@ -44,7 +46,7 @@
|
||||
<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_CPU_PROFILING_CONFIGURATION_NAME" value="Callstack Sample" />
|
||||
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
|
||||
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
|
||||
</Profilers>
|
||||
|
||||
59
.idea/runConfigurations/app_frudis.xml
generated
59
.idea/runConfigurations/app_frudis.xml
generated
@@ -1,59 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app_frudis" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="WMS_Native.app" />
|
||||
<option name="DEPLOY" value="true" />
|
||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||
<option name="ARTIFACT_NAME" value="" />
|
||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||
<option name="ALL_USERS" value="false" />
|
||||
<option name="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" />
|
||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
||||
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
|
||||
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
|
||||
<option name="DEBUGGER_TYPE" value="Auto" />
|
||||
<Auto>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Auto>
|
||||
<Hybrid>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Hybrid>
|
||||
<Java />
|
||||
<Native>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Native>
|
||||
<Profilers>
|
||||
<option name="ADVANCED_PROFILING_ENABLED" value="true" />
|
||||
<option name="STARTUP_PROFILING_ENABLED" value="false" />
|
||||
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
|
||||
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Sample Java Methods" />
|
||||
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
|
||||
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
|
||||
</Profilers>
|
||||
<option name="DEEP_LINK" value="" />
|
||||
<option name="ACTIVITY_CLASS" value="" />
|
||||
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
|
||||
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
|
||||
<method v="2">
|
||||
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
59
.idea/runConfigurations/app_gramm.xml
generated
59
.idea/runConfigurations/app_gramm.xml
generated
@@ -1,59 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<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="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="false" />
|
||||
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
|
||||
<option name="DEBUGGER_TYPE" value="Auto" />
|
||||
<Auto>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Auto>
|
||||
<Hybrid>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Hybrid>
|
||||
<Java />
|
||||
<Native>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Native>
|
||||
<Profilers>
|
||||
<option name="ADVANCED_PROFILING_ENABLED" value="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>
|
||||
</configuration>
|
||||
</component>
|
||||
59
.idea/runConfigurations/app_ime.xml
generated
59
.idea/runConfigurations/app_ime.xml
generated
@@ -1,59 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app_ime" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="WMS_Native.app" />
|
||||
<option name="DEPLOY" value="true" />
|
||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||
<option name="ARTIFACT_NAME" value="" />
|
||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||
<option name="ALL_USERS" value="false" />
|
||||
<option name="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" />
|
||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" 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="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
|
||||
<option name="DEBUGGER_TYPE" value="Auto" />
|
||||
<Auto>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Auto>
|
||||
<Hybrid>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Hybrid>
|
||||
<Java />
|
||||
<Native>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Native>
|
||||
<Profilers>
|
||||
<option name="ADVANCED_PROFILING_ENABLED" value="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>
|
||||
</configuration>
|
||||
</component>
|
||||
59
.idea/runConfigurations/app_saporiveri.xml
generated
59
.idea/runConfigurations/app_saporiveri.xml
generated
@@ -1,59 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app_saporiveri" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="WMS_Native.app" />
|
||||
<option name="DEPLOY" value="true" />
|
||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||
<option name="ARTIFACT_NAME" value="" />
|
||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||
<option name="ALL_USERS" value="false" />
|
||||
<option name="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" />
|
||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
||||
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
|
||||
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
|
||||
<option name="DEBUGGER_TYPE" value="Auto" />
|
||||
<Auto>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Auto>
|
||||
<Hybrid>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Hybrid>
|
||||
<Java />
|
||||
<Native>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Native>
|
||||
<Profilers>
|
||||
<option name="ADVANCED_PROFILING_ENABLED" value="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>
|
||||
</configuration>
|
||||
</component>
|
||||
59
.idea/runConfigurations/app_saporiveri_pv.xml
generated
59
.idea/runConfigurations/app_saporiveri_pv.xml
generated
@@ -1,59 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app_saporiveri_pv" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="WMS_Native.app" />
|
||||
<option name="DEPLOY" value="true" />
|
||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||
<option name="ARTIFACT_NAME" value="" />
|
||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||
<option name="ALL_USERS" value="false" />
|
||||
<option name="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" />
|
||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
||||
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
|
||||
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
|
||||
<option name="DEBUGGER_TYPE" value="Auto" />
|
||||
<Auto>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Auto>
|
||||
<Hybrid>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Hybrid>
|
||||
<Java />
|
||||
<Native>
|
||||
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
|
||||
<option name="SHOW_STATIC_VARS" value="true" />
|
||||
<option name="WORKING_DIR" value="" />
|
||||
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
|
||||
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
|
||||
</Native>
|
||||
<Profilers>
|
||||
<option name="ADVANCED_PROFILING_ENABLED" value="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>
|
||||
</configuration>
|
||||
</component>
|
||||
8
.idea/runConfigurations/app_vglimenti.xml
generated
8
.idea/runConfigurations/app_vglimenti.xml
generated
@@ -1,19 +1,21 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app_vglimenti" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
||||
<module name="WMS_Native.app" />
|
||||
<module name="WMS.app" />
|
||||
<option name="DEPLOY" value="true" />
|
||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||
<option name="ARTIFACT_NAME" value="" />
|
||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||
<option name="ALL_USERS" value="false" />
|
||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv" />
|
||||
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS.dynamic__base" />
|
||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="default_activity" />
|
||||
<option name="CLEAR_LOGCAT" value="true" />
|
||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
||||
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
|
||||
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
|
||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
|
||||
@@ -44,7 +46,7 @@
|
||||
<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_CPU_PROFILING_CONFIGURATION_NAME" value="Callstack Sample" />
|
||||
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
|
||||
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
|
||||
</Profilers>
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.google.firebase.firebase-perf'
|
||||
|
||||
if (!project.hasProperty("disable-performance-plugin")) {
|
||||
apply plugin: 'com.google.firebase.firebase-perf'
|
||||
}
|
||||
|
||||
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 = 183
|
||||
def appVersionName = '1.16.1'
|
||||
def appVersionCode = 274
|
||||
def appVersionName = '1.24.6'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@@ -16,6 +19,9 @@ android {
|
||||
keyPassword 'inpmiy'
|
||||
storeFile file('Integry.jks')
|
||||
storePassword 'inpmiy'
|
||||
|
||||
enableV3Signing true
|
||||
enableV4Signing true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,12 +31,12 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
compileSdkVersion 29
|
||||
compileSdkVersion 31
|
||||
|
||||
defaultConfig {
|
||||
applicationId "it.integry.integrywmsnative"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
targetSdkVersion 31
|
||||
versionCode appVersionCode
|
||||
versionName appVersionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@@ -51,8 +57,9 @@ android {
|
||||
android.buildFeatures.dataBinding true
|
||||
|
||||
compileOptions {
|
||||
targetCompatibility 1.8
|
||||
sourceCompatibility 1.8
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
|
||||
}
|
||||
productFlavors {
|
||||
}
|
||||
@@ -75,7 +82,7 @@ android {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
dynamicFeatures = [":dynamic__base", ":dynamic_vgalimenti", ":dynamic_ime", ":dynamic_frudis", ":dynamic_saporiveri_pv", ":dynamic_saporiveri", ':dynamic_gramm']
|
||||
dynamicFeatures = [":dynamic__base", ":dynamic_vgalimenti"]
|
||||
|
||||
|
||||
}
|
||||
@@ -91,55 +98,51 @@ dependencies {
|
||||
//Firebase
|
||||
|
||||
// Import the Firebase BoM
|
||||
implementation platform('com.google.firebase:firebase-bom:26.3.0')
|
||||
implementation platform('com.google.firebase:firebase-bom:29.1.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.5.0'
|
||||
implementation 'com.google.android.gms:play-services-basement:18.0.0'
|
||||
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.3.0-rc01'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'androidx.preference:preference-ktx:1.1.1'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||
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.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0'
|
||||
implementation 'com.annimon:stream:1.2.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.4.1'
|
||||
implementation 'org.apache.commons:commons-text:1.9'
|
||||
|
||||
//MVVM
|
||||
def dagger2_version = '2.29.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation "androidx.lifecycle:lifecycle-common-java8:2.2.0"
|
||||
def dagger2_version = '2.40'
|
||||
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
|
||||
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 '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.fede987:status-bar-alert:1.0.1'
|
||||
implementation 'com.fxn769:stash:1.2'
|
||||
testImplementation 'junit:junit:4.13.1'
|
||||
implementation 'com.github.fede87:StatusBarAlert:1.0.1'
|
||||
implementation 'com.github.zhukic:sectioned-recyclerview:1.2.3'
|
||||
implementation 'com.github.pedromassango:doubleClick:3.0'
|
||||
|
||||
//SQLite ROOM
|
||||
def room_version = "2.2.5"
|
||||
def room_version = "2.4.1"
|
||||
|
||||
implementation "androidx.room:room-runtime:$room_version"
|
||||
annotationProcessor "androidx.room:room-compiler:$room_version"
|
||||
@@ -153,11 +156,18 @@ dependencies {
|
||||
implementation project(':barcode_base_android_library')
|
||||
implementation project(':honeywellscannerlibrary')
|
||||
implementation project(':keyobardemulatorscannerlibrary')
|
||||
implementation project(':barcode_kaiteki')
|
||||
androidTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
|
||||
androidTestImplementation 'org.testng:testng:7.3.0'
|
||||
|
||||
|
||||
implementation 'com.github.RaviKoradiya:LiveAdapter:1.3.4'
|
||||
|
||||
// Required -- JUnit 4 framework
|
||||
// testImplementation "org.junit.jupiter:junit-jupiter-api:5.8.1"
|
||||
// androidTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
||||
// androidTestImplementation 'org.testng:testng:7.4.0'
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package it.integry.integrywmsnative;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.test.InstrumentationRegistry;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumentation test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() throws Exception {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("it.integry.integrywmsnative", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
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,27 +18,31 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true">
|
||||
android:usesCleartextTraffic="true"
|
||||
android:fullBackupContent="@xml/backup_descriptor"
|
||||
android:requestLegacyExternalStorage="true">
|
||||
<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_OLD.PickingResiActivity"
|
||||
android:label="@string/activity_ultime_consegne_title"
|
||||
<activity android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light" />
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustNothing" />
|
||||
<activity android:name=".gest.contab_doc_interni.edit_form.DocInterniEditFormActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustNothing" />
|
||||
<activity
|
||||
android:name=".gest.picking_resi.PickingResiActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:name=".gest.main.MainActivity"
|
||||
android:theme="@style/Light"
|
||||
android:windowSoftInputMode="adjustPan">
|
||||
android:windowSoftInputMode="adjustNothing"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.CLIENTBARCODEACTIVITY" />
|
||||
|
||||
@@ -51,7 +56,6 @@
|
||||
android:windowSoftInputMode="adjustNothing" />
|
||||
<activity
|
||||
android:name=".gest.login.LoginActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light" />
|
||||
<activity
|
||||
android:name=".gest.lista_bancali.ListaBancaliActivity"
|
||||
@@ -71,7 +75,8 @@
|
||||
<activity
|
||||
android:name=".SplashActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/SplashTheme">
|
||||
android:theme="@style/SplashTheme"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ import android.app.Application;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.context.AppContext;
|
||||
import it.integry.integrywmsnative.core.data_store.db.RoomModule;
|
||||
|
||||
@@ -17,7 +19,8 @@ public class MainApplication extends Application {
|
||||
public static MainApplicationModule appModule;
|
||||
public static RoomModule roomModule;
|
||||
|
||||
private AppContext appContext = new AppContext(this);
|
||||
@Inject
|
||||
AppContext appContext;
|
||||
|
||||
|
||||
|
||||
@@ -27,16 +30,15 @@ public class MainApplication extends Application {
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
appModule = new MainApplicationModule(MainApplication.this, this);
|
||||
appModule = new MainApplicationModule(this);
|
||||
roomModule = new RoomModule(this);
|
||||
appComponent = DaggerMainApplicationComponent.builder()
|
||||
.mainApplicationModule(appModule)
|
||||
.roomModule(roomModule)
|
||||
.build();
|
||||
|
||||
appComponent.inject(appContext);
|
||||
appComponent.inject(this);
|
||||
|
||||
appContext.init();
|
||||
res = getResources();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,63 +5,219 @@ 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.core.expansion.BaseActivityComponent;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseActivityModule;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragmentComponent;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragmentModule;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseFragmentComponent;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseFragmentModule;
|
||||
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneComponent;
|
||||
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneModule;
|
||||
import it.integry.integrywmsnative.gest.accettazione_picking.AccettazionePickingComponent;
|
||||
import it.integry.integrywmsnative.gest.accettazione_picking.AccettazionePickingModule;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniComponent;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniModule;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoComponent;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoModule;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniEditFormComponent;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniEditFormModule;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsComponent;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsModule;
|
||||
import it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleComponent;
|
||||
import it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleModule;
|
||||
import it.integry.integrywmsnative.gest.lista_bancali.ListaBancaliComponent;
|
||||
import it.integry.integrywmsnative.gest.lista_bancali.ListaBancaliModule;
|
||||
import it.integry.integrywmsnative.gest.login.LoginComponent;
|
||||
import it.integry.integrywmsnative.gest.login.LoginModule;
|
||||
import it.integry.integrywmsnative.gest.main.MainActivityComponent;
|
||||
import it.integry.integrywmsnative.gest.main.MainActivityModule;
|
||||
import it.integry.integrywmsnative.gest.main.MainFragmentComponent;
|
||||
import it.integry.integrywmsnative.gest.main.MainFragmentModule;
|
||||
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_posizionamento_da_ord.ProdPosizionamentoDaOrdComponent;
|
||||
import it.integry.integrywmsnative.gest.prod_posizionamento_da_ord.ProdPosizionamentoDaOrdModule;
|
||||
import it.integry.integrywmsnative.gest.prod_accettazione_ord_produzione.ProdOrdineProduzioneElencoComponent;
|
||||
import it.integry.integrywmsnative.gest.prod_accettazione_ord_produzione.ProdOrdineProduzioneElencoModule;
|
||||
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.prod_recupero_materiale.ProdRecuperoMaterialeComponent;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.ProdRecuperoMaterialeModule;
|
||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceComponent;
|
||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.ProdRientroMerceOrderDetailComponent;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeComponent;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeModule;
|
||||
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.pv_ordine_acquisto_edit.dialog.DialogEditArticoloComponent;
|
||||
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.dialog.DialogEditArticoloModule;
|
||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaComponent;
|
||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaModule;
|
||||
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.ask_cliente.DialogAskClienteComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsModule;
|
||||
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.info_aggiuntive_lu.InfoAggiuntiveLUDialogComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Component;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.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,
|
||||
SplashActivityModule.class,
|
||||
MainApplicationModule.class,
|
||||
BaseActivityModule.class,
|
||||
BaseFragmentModule.class,
|
||||
BaseDialogFragmentModule.class,
|
||||
LoginModule.class,
|
||||
MainActivityModule.class,
|
||||
PVOrdineAcquistoGrigliaModule.class,
|
||||
MainFragmentModule.class,
|
||||
MainAccettazioneModule.class,
|
||||
ListaBancaliModule.class,
|
||||
ContenutoBancaleModule.class,
|
||||
PVOrdiniAcquistoGrigliaModule.class,
|
||||
PVOrdineAcquistoEditModule.class,
|
||||
PickingLiberoModule.class,
|
||||
RettificaGiacenzeModule.class,
|
||||
SpedizioneModule.class,
|
||||
AccettazionePickingModule.class,
|
||||
UltimeConsegneClienteModule.class,
|
||||
UltimiArriviFornitoreModule.class,
|
||||
PickingResiModule.class,
|
||||
ProdPosizionamentoDaOrdModule.class,
|
||||
OrdiniUscitaElencoModule.class,
|
||||
DialogInputQuantityV2Module.class,
|
||||
DialogScanArtModule.class})
|
||||
DialogInputLUProdModule.class,
|
||||
DialogScanArtModule.class,
|
||||
DialogScanOrCreateLUModule.class,
|
||||
ProdFabbisognoLineeProdModule.class,
|
||||
VersamentoMerceModule.class,
|
||||
DialogAskMagazzinoProssimitaModule.class,
|
||||
DialogChooseBatchLotModule.class,
|
||||
DialogRowInfoProdFabbisognoLineeProdModule.class,
|
||||
ProdOrdineProduzioneElencoModule.class,
|
||||
ProdRecuperoMaterialeModule.class,
|
||||
ProdVersamentoMaterialeModule.class,
|
||||
DialogChooseArtsFromListaArtsModule.class,
|
||||
DocInterniModule.class,
|
||||
DialogSelectDocInfoModule.class,
|
||||
DocInterniEditFormModule.class,
|
||||
DialogSelectDocRowsModule.class,
|
||||
DialogAskClienteModule.class,
|
||||
DialogEditArticoloModule.class
|
||||
})
|
||||
public interface MainApplicationComponent {
|
||||
|
||||
BaseActivityComponent.Factory baseActivityComponent();
|
||||
|
||||
BaseFragmentComponent.Factory baseFragmentComponent();
|
||||
|
||||
BaseDialogFragmentComponent.Factory baseDialogFragmentComponent();
|
||||
|
||||
SplashActivityComponent.Factory splashActivityComponent();
|
||||
|
||||
LoginComponent.Factory loginActivityComponent();
|
||||
|
||||
MainActivityComponent.Factory mainActivityComponent();
|
||||
PVOrdineAcquistoGrigliaComponent.Factory pvOrdineAcquistoGrigliaComponent();
|
||||
|
||||
MainFragmentComponent.Factory mainFragmentComponent();
|
||||
|
||||
MainAccettazioneComponent.Factory mainAccettazioneComponent();
|
||||
|
||||
ListaBancaliComponent.Factory listaBancaliComponent();
|
||||
|
||||
ContenutoBancaleComponent.Factory contenutoBancaleComponent();
|
||||
|
||||
PVOrdiniAcquistoGrigliaComponent.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();
|
||||
ProdPosizionamentoDaOrdComponent.Factory prodPosizionamentoDaOrdComponent();
|
||||
|
||||
OrdiniUscitaElencoComponent.Factory prodOrdineLavorazioneElencoComponent();
|
||||
|
||||
DialogAskClienteComponent.Factory dialogAskClienteComponent();
|
||||
|
||||
DialogInputQuantityV2Component.Factory dialogInputQuantityV2Component();
|
||||
|
||||
DialogInputLUProdComponent.Factory dialogInputLUProdComponent();
|
||||
|
||||
DialogScanArtComponent.Factory dialogScanArtComponent();
|
||||
|
||||
DialogScanOrCreateLUComponent.Factory dialogScanOrCreateLUComponent();
|
||||
|
||||
ProdFabbisognoLineeProdComponent.Factory prodFabbisognoLineeProdComponent();
|
||||
|
||||
void inject(AppContext appContext);
|
||||
VersamentoMerceComponent.Factory versamentoMerceComponent();
|
||||
|
||||
DialogAskMagazzinoProssimitaComponent.Factory dialogAskMagazzinoProssimitaComponent();
|
||||
|
||||
DialogChooseBatchLotComponent.Factory dialogChooseBatchLotComponent();
|
||||
|
||||
DialogRowInfoProdFabbisognoLineeProdComponent.Factory dialogRowInfoProdFabbisognoLineeProdComponent();
|
||||
|
||||
ProdRientroMerceComponent.Factory prodRientroMerceComponent();
|
||||
|
||||
ProdRientroMerceOrderDetailComponent.Factory prodRientroMerceOrderDetailComponent();
|
||||
|
||||
ProdOrdineProduzioneElencoComponent.Factory prodOrdineProduzioneElencoComponent();
|
||||
|
||||
ProdRecuperoMaterialeComponent.Factory prodRecuperoMaterialeComponent();
|
||||
|
||||
ProdVersamentoMaterialeComponent.Factory prodVersamentoMaterialeComponent();
|
||||
|
||||
DialogChooseArtsFromListaArtsComponent.Factory dialogChooseArtsFromListaArtsComponent();
|
||||
|
||||
DocInterniComponent.Factory docInterniComponent();
|
||||
|
||||
DialogSelectDocInfoComponent.Factory dialogSelectMgrpDtipPairComponent();
|
||||
|
||||
DialogSelectDocRowsComponent.Factory dialogSelectDocRowsComponent();
|
||||
|
||||
DocInterniEditFormComponent.Factory docInterniEditFormComponent();
|
||||
|
||||
InfoAggiuntiveLUDialogComponent.Factory infoAggiuntiveLUDialogComponent();
|
||||
|
||||
DialogEditArticoloComponent.Factory dialogEditArticoloComponent();
|
||||
|
||||
void inject(MainApplication mainApplication);
|
||||
|
||||
void inject(AppContext mainApplication);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,30 +1,44 @@
|
||||
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.context.AppContext;
|
||||
import it.integry.integrywmsnative.core.context.MainContext;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||
import it.integry.integrywmsnative.core.data_store.db.AppDatabase;
|
||||
import it.integry.integrywmsnative.core.menu.MenuRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.menu.MenuService;
|
||||
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.CommessaRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.DepositoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.EntityRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.services.inventario.InventarioService;
|
||||
import it.integry.integrywmsnative.core.update.UpdatesManager;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.rest.DocInterniRESTConsumer;
|
||||
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.rest.ProdFabbisognoLineeProdRESTConsumer;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||
|
||||
@Module
|
||||
public class MainApplicationModule {
|
||||
|
||||
private final Context mContext;
|
||||
private final Application mApplication;
|
||||
|
||||
public MainApplicationModule(Context context, Application application) {
|
||||
this.mContext = context;
|
||||
public MainApplicationModule(Application application) {
|
||||
this.mApplication = application;
|
||||
}
|
||||
|
||||
@@ -36,14 +50,52 @@ public class MainApplicationModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ColliDataRecoverService provideColliDataRecoverService() {
|
||||
return new ColliDataRecoverService(mContext);
|
||||
AppContext providesAppContext() {
|
||||
return new AppContext(mApplication);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
OrdiniRESTConsumer provideOrdiniRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
|
||||
return new OrdiniRESTConsumer(systemRESTConsumer);
|
||||
MainContext providesMainContextNew(MenuService menuService, AppDatabase appDatabase) {
|
||||
return new MainContext(mApplication.getApplicationContext(), menuService, appDatabase);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ColliDataRecoverService provideColliDataRecoverService() {
|
||||
ColliDataRecoverService colliDataRecoverService = new ColliDataRecoverService(mApplication.getApplicationContext());
|
||||
colliDataRecoverService.init();
|
||||
return colliDataRecoverService;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
MenuService provideMenuService(MenuRESTConsumer menuRESTConsumer) {
|
||||
return new MenuService(menuRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
UpdatesManager provideUpdatesManager() {
|
||||
return new UpdatesManager();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
DialogProgressView providesDialogProgressView() {
|
||||
return DialogProgressView.newInstance();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
DialogInputQuantityV2View providesDialogInputQuantityV2View() {
|
||||
return new DialogInputQuantityV2View();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
OrdiniRESTConsumer provideOrdiniRESTConsumer(SystemRESTConsumer systemRESTConsumer, EntityRESTConsumer entityRESTConsumer) {
|
||||
return new OrdiniRESTConsumer(systemRESTConsumer, entityRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@@ -54,14 +106,50 @@ public class MainApplicationModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ArticoloRESTConsumer provideArticoloRESTConsumer() {
|
||||
return new ArticoloRESTConsumer();
|
||||
ArticoloRESTConsumer provideArticoloRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
|
||||
return new ArticoloRESTConsumer(systemRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ColliMagazzinoRESTConsumer provideColliMagazzinoRESTConsumer(ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
return new ColliMagazzinoRESTConsumer(articoloRESTConsumer);
|
||||
CommessaRESTConsumer provideCommessaRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
|
||||
return new CommessaRESTConsumer(systemRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
DepositoRESTConsumer provideDepositoRESTConsumer(EntityRESTConsumer entityRESTConsumer, SystemRESTConsumer systemRESTConsumer) {
|
||||
return new DepositoRESTConsumer(entityRESTConsumer, systemRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
MenuRESTConsumer provideMenuRESTConsumer() {
|
||||
return new MenuRESTConsumer();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
MagazzinoRESTConsumer provideMagazzinoRESTConsumer() {
|
||||
return new MagazzinoRESTConsumer();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
MesRESTConsumer provideMesRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
|
||||
return new MesRESTConsumer(systemRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
EntityRESTConsumer provideEntityRESTConsumer() {
|
||||
return new EntityRESTConsumer();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ColliMagazzinoRESTConsumer provideColliMagazzinoRESTConsumer(SystemRESTConsumer systemRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer, EntityRESTConsumer entityRESTConsumer) {
|
||||
return new ColliMagazzinoRESTConsumer(systemRESTConsumer, articoloRESTConsumer, entityRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@@ -88,5 +176,28 @@ public class MainApplicationModule {
|
||||
return new PosizioniRESTConsumer(systemRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
ProdFabbisognoLineeProdRESTConsumer providesProdFabbisognoLineeProdRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
|
||||
return new ProdFabbisognoLineeProdRESTConsumer(systemRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
DocInterniRESTConsumer provideDocInterniRESTConsumer() {
|
||||
return new DocInterniRESTConsumer();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
GiacenzaRESTConsumer provideGiacenzaRESTConsumer(SystemRESTConsumer systemRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
return new GiacenzaRESTConsumer(systemRESTConsumer, articoloRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
InventarioService provideInventarioService(GiacenzaRESTConsumer giacenzaRESTConsumer) {
|
||||
return new InventarioService(giacenzaRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,65 +1,71 @@
|
||||
package it.integry.integrywmsnative;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
import android.text.Spanned;
|
||||
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 javax.inject.Inject;
|
||||
|
||||
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.gest.main.MainActivity;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
|
||||
public class SplashActivity extends BaseActivity {
|
||||
public class SplashActivity extends BaseActivity implements MainContext.Listener {
|
||||
|
||||
|
||||
private ActivitySplashBinding mBinding;
|
||||
|
||||
private MainContext mainContext = new MainContext(this);
|
||||
// private MainContext mainContext = new MainContext(this);
|
||||
|
||||
@Inject
|
||||
MainContext mainContext;
|
||||
|
||||
private RunnableArgsss<Integer, String[], List<Integer>> onRequestPermissionResult;
|
||||
|
||||
public static void startActivity(Context context) {
|
||||
Intent intent = new Intent(context, SplashActivity.class);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
MainApplication.appComponent
|
||||
.splashActivityComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
mainContext.setListener(this);
|
||||
|
||||
mBinding = DataBindingUtil.inflate(LayoutInflater.from(this), R.layout.activity_splash, null, false);
|
||||
setContentView(mBinding.getRoot());
|
||||
|
||||
initAppVersion();
|
||||
UtilityContext.initMainActivity(this);
|
||||
|
||||
|
||||
initAppVersion();
|
||||
initPermissions(this::init);
|
||||
}
|
||||
|
||||
private void initPermissions(Runnable onComplete) {
|
||||
PermissionsHelper.askPermissions(this, () -> {
|
||||
onComplete.run();
|
||||
}, permanentlyDenied -> {
|
||||
if(permanentlyDenied) {
|
||||
DialogSimpleMessageHelper.makeErrorDialog(this,
|
||||
new SpannableString(getText(R.string.permissions_permanently_denied)), null, () -> {
|
||||
this.finish();
|
||||
}).show();
|
||||
} else {
|
||||
initPermissions(onComplete);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void initAppVersion() {
|
||||
try {
|
||||
PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
|
||||
@@ -67,7 +73,7 @@ public class SplashActivity extends BaseActivity {
|
||||
|
||||
String debugText = "";
|
||||
|
||||
if(BuildConfig.DEBUG) debugText += "\n[DEBUG VERSION]";
|
||||
if (BuildConfig.DEBUG) debugText += "\n[DEBUG VERSION]";
|
||||
|
||||
mBinding.appVersionTextview.setText("v" + version + debugText);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
@@ -75,15 +81,39 @@ public class SplashActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
private void initPermissions(Runnable onComplete) {
|
||||
PermissionsHelper.askPermissions(this, onComplete, permanentlyDenied -> {
|
||||
if (permanentlyDenied) {
|
||||
onError(new SpannableString(getText(R.string.permissions_permanently_denied)));
|
||||
|
||||
} else {
|
||||
initPermissions(onComplete);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void init() {
|
||||
if(!SettingsManager.i().isUserLoggedIn()){
|
||||
if (!SettingsManager.i().isUserLoggedIn()) {
|
||||
startLoginActivity();
|
||||
} else {
|
||||
mainContext.init(this::startMainActivity);
|
||||
mainContext.init();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDBDataLoading(String item) {
|
||||
mBinding.loadingInfoTextview.setText("Caricamento " + item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMenuLoading() {
|
||||
mBinding.loadingInfoTextview.setText("Caricamento menù");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContextInitialized() {
|
||||
startMainActivity();
|
||||
}
|
||||
|
||||
|
||||
public void setOnRequestPermissionsResult(RunnableArgsss<Integer, String[], List<Integer>> onRequestPermissionResult) {
|
||||
@@ -93,9 +123,10 @@ public class SplashActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
|
||||
if(this.onRequestPermissionResult != null) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
if (this.onRequestPermissionResult != null) {
|
||||
List<Integer> grantResultsList = new ArrayList<>();
|
||||
for(int i = 0; i < grantResults.length; i++) {
|
||||
for (int i = 0; i < grantResults.length; i++) {
|
||||
grantResultsList.add(grantResults[i]);
|
||||
}
|
||||
|
||||
@@ -104,20 +135,26 @@ public class SplashActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void startLoginActivity(){
|
||||
private void startLoginActivity() {
|
||||
this.finish();
|
||||
Intent myIntent = new Intent(this, LoginActivity.class);
|
||||
startActivity(myIntent);
|
||||
}
|
||||
|
||||
private void startMainActivity(){
|
||||
private void startMainActivity() {
|
||||
this.finish();
|
||||
Intent myIntent = new Intent(this, MainActivity.class);
|
||||
startActivity(myIntent);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onError(Spanned message) {
|
||||
|
||||
DialogSimpleMessageView.makeErrorDialog(
|
||||
message, null, this::finish, R.string.logout, () -> {
|
||||
this.mainContext.logout(MainApplication::exit);
|
||||
})
|
||||
.show(this.getSupportFragmentManager(), "tag");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package it.integry.integrywmsnative;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface SplashActivityComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
|
||||
SplashActivityComponent create();
|
||||
}
|
||||
|
||||
void inject(SplashActivity mainActivity);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative;
|
||||
|
||||
import dagger.Module;
|
||||
|
||||
@Module(subcomponents = SplashActivityComponent.class)
|
||||
public class SplashActivityModule {
|
||||
}
|
||||
@@ -16,7 +16,7 @@ public class CommonConst {
|
||||
|
||||
public static String DEFAULT_ANONYMOUS_UL_SERIE = "UL";
|
||||
|
||||
public static int NUMBER_OF_DECIMAL_DIGITS = 3;
|
||||
public static int NUMBER_OF_DECIMAL_DIGITS = 5;
|
||||
}
|
||||
|
||||
public static class Files {
|
||||
|
||||
@@ -23,7 +23,7 @@ public class BarcodeCallbackDTO {
|
||||
return onScanSuccessfull;
|
||||
}
|
||||
|
||||
public BarcodeCallbackDTO setOnScanSuccessfull(RunnableArgs<BarcodeScanDTO> onScanSuccessfull) {
|
||||
public BarcodeCallbackDTO setOnScanSuccessful(RunnableArgs<BarcodeScanDTO> onScanSuccessfull) {
|
||||
this.onScanSuccessfull = onScanSuccessfull;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -1,33 +1,27 @@
|
||||
package it.integry.integrywmsnative.core.barcode_reader;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.KeyEvent;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.barcode_base_android_library.exception.BarcodeAdapterNotFoundException;
|
||||
import it.integry.barcode_base_android_library.interfaces.BarcodeReaderInterface;
|
||||
import it.integry.honeywellscannerlibrary.HoneyWellBarcodeReader;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.keyobardemulatorscannerlibrary.KeyboardEmulatorBarcodeReader;
|
||||
import it.integry.pointmobilescannerlibrary.PointMobileBarcodeReader;
|
||||
import it.integry.zebrascannerlibrary.ZebraBarcodeReader;
|
||||
|
||||
public class BarcodeManager {
|
||||
|
||||
private static AppCompatActivity context;
|
||||
|
||||
private static BarcodeReaderInterface mCurrentBarcodeInterface;
|
||||
private static List<BarcodeCallbackDTO> mBarcodeCallbacksStacktrace = new ArrayList<>();
|
||||
private static final List<BarcodeCallbackDTO> mBarcodeCallbacksStacktrace = new ArrayList<>();
|
||||
|
||||
private static boolean mEnabled = true;
|
||||
|
||||
|
||||
private static Class<? extends BarcodeReaderInterface>[] registeredBarcodeReaderInterfaces = new Class[]{
|
||||
private static final Class<? extends BarcodeReaderInterface>[] registeredBarcodeReaderInterfaces = new Class[]{
|
||||
PointMobileBarcodeReader.class,
|
||||
ZebraBarcodeReader.class,
|
||||
HoneyWellBarcodeReader.class,
|
||||
@@ -35,73 +29,60 @@ public class BarcodeManager {
|
||||
};
|
||||
|
||||
|
||||
public static void init(AppCompatActivity context) {
|
||||
BarcodeManager.context = context;
|
||||
public static void init(Context applicationContext) throws Exception {
|
||||
|
||||
initBarcodeReader();
|
||||
initBarcodeReader(applicationContext);
|
||||
}
|
||||
|
||||
private static void initBarcodeReader() {
|
||||
private static void initBarcodeReader(Context applicationContext) throws Exception {
|
||||
|
||||
for (Class<? extends BarcodeReaderInterface> readerInterface : registeredBarcodeReaderInterfaces){
|
||||
for (Class<? extends BarcodeReaderInterface> readerInterface : registeredBarcodeReaderInterfaces) {
|
||||
|
||||
Constructor<?> cons = null;
|
||||
try {
|
||||
cons = Class.forName(readerInterface.getName()).getConstructors()[0];
|
||||
BarcodeReaderInterface object = (BarcodeReaderInterface) cons.newInstance(context);
|
||||
Constructor<?> cons = Class.forName(readerInterface.getName()).getConstructors()[0];
|
||||
BarcodeReaderInterface object = (BarcodeReaderInterface) cons.newInstance(applicationContext);
|
||||
|
||||
if(object.isRightAdapter()) {
|
||||
mCurrentBarcodeInterface = object;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
UtilityExceptions.defaultException(context,e);
|
||||
if (object.isRightAdapter()) {
|
||||
mCurrentBarcodeInterface = object;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(mCurrentBarcodeInterface != null) {
|
||||
if (mCurrentBarcodeInterface != null) {
|
||||
|
||||
try {
|
||||
mCurrentBarcodeInterface.init(() -> {
|
||||
|
||||
mCurrentBarcodeInterface.register(data -> {
|
||||
BarcodeCallbackDTO callback = getValidCallback();
|
||||
if(callback != null && mEnabled) {
|
||||
callback.getOnScanSuccessfull().run(data);
|
||||
}
|
||||
}, ex -> {
|
||||
BarcodeCallbackDTO callback = getValidCallback();
|
||||
if(callback != null && mEnabled) {
|
||||
callback.getOnScanFailed().run(ex);
|
||||
}
|
||||
});
|
||||
mCurrentBarcodeInterface.init(() -> {
|
||||
|
||||
mCurrentBarcodeInterface.register(data -> {
|
||||
BarcodeCallbackDTO callback = getValidCallback();
|
||||
if (callback != null && mEnabled) {
|
||||
callback.getOnScanSuccessfull().run(data);
|
||||
}
|
||||
}, ex -> {
|
||||
BarcodeCallbackDTO callback = getValidCallback();
|
||||
if (callback != null && mEnabled) {
|
||||
callback.getOnScanFailed().run(ex);
|
||||
}
|
||||
});
|
||||
} catch (BarcodeAdapterNotFoundException ex) {
|
||||
UtilityExceptions.defaultException(context, ex);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static BarcodeCallbackDTO getValidCallback() {
|
||||
|
||||
if(mBarcodeCallbacksStacktrace.size() > 0) {
|
||||
return mBarcodeCallbacksStacktrace.get(mBarcodeCallbacksStacktrace.size() -1);
|
||||
if (mBarcodeCallbacksStacktrace.size() > 0) {
|
||||
return mBarcodeCallbacksStacktrace.get(mBarcodeCallbacksStacktrace.size() - 1);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static boolean onKeyDown(int keyCode, KeyEvent keyEvent){
|
||||
public static boolean onKeyDown(int keyCode, KeyEvent keyEvent) {
|
||||
if (mCurrentBarcodeInterface != null)
|
||||
mCurrentBarcodeInterface.onKeyEvent(keyEvent);
|
||||
mCurrentBarcodeInterface.onKeyEvent(keyEvent);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -113,8 +94,8 @@ public class BarcodeManager {
|
||||
|
||||
int newID = -1;
|
||||
|
||||
if(mBarcodeCallbacksStacktrace.size() > 0) {
|
||||
newID = mBarcodeCallbacksStacktrace.get(mBarcodeCallbacksStacktrace.size() -1).getID() + 1;
|
||||
if (mBarcodeCallbacksStacktrace.size() > 0) {
|
||||
newID = mBarcodeCallbacksStacktrace.get(mBarcodeCallbacksStacktrace.size() - 1).getID() + 1;
|
||||
} else {
|
||||
newID = 1;
|
||||
}
|
||||
@@ -131,7 +112,7 @@ public class BarcodeManager {
|
||||
//Rimuovo la callback con l'ID trovato e tutte quelle con >ID in modo che rimuovo tutte le call aggiunte successivamente
|
||||
|
||||
for (int i = 0; i < mBarcodeCallbacksStacktrace.size(); i++) {
|
||||
if(mBarcodeCallbacksStacktrace.get(i).getID() == ID || callbackObjFound) {
|
||||
if (mBarcodeCallbacksStacktrace.get(i).getID() == ID || callbackObjFound) {
|
||||
mBarcodeCallbacksStacktrace.remove(i);
|
||||
|
||||
callbackObjFound = true;
|
||||
|
||||
@@ -2,7 +2,6 @@ package it.integry.integrywmsnative.core.class_router;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import it.integry.integrywmsnative.core.class_router.configs.MenuConfiguration;
|
||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityHashMap;
|
||||
|
||||
@@ -10,14 +9,12 @@ public class BaseCustomConfiguration implements ICustomConfiguration {
|
||||
|
||||
|
||||
public static class Keys {
|
||||
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());
|
||||
protected HashMap<Integer, Object> configurations = new HashMap<>() {{
|
||||
put(Keys.FLAG_SHOW_COD_FORN_IN_SPEDIZIONE, true);
|
||||
put(Keys.FLAG_SPEDIZIONE_GROUP_BY_GRP_MERC, false);
|
||||
}};
|
||||
|
||||
@@ -6,8 +6,6 @@ import android.util.Pair;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.class_router.exceptions.MethodPathNotRegisteredException;
|
||||
|
||||
public class ClassRouter {
|
||||
|
||||
public enum PATH {
|
||||
@@ -21,8 +19,8 @@ public class ClassRouter {
|
||||
|
||||
private static List<Pair<PATH, Object>> mRouteClasses = new ArrayList<>();
|
||||
|
||||
public static void init(Context context) {
|
||||
ClassRouter.context = context;
|
||||
public static void init() {
|
||||
// ClassRouter.context = context;
|
||||
}
|
||||
|
||||
private static boolean checkIClassExists(PATH path) {
|
||||
@@ -51,9 +49,7 @@ public class ClassRouter {
|
||||
|
||||
try {
|
||||
mRouteClasses.add(new Pair<>(path, clazz.newInstance()));
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InstantiationException e) {
|
||||
} catch (IllegalAccessException | InstantiationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -69,15 +65,15 @@ public class ClassRouter {
|
||||
try {
|
||||
|
||||
if (!checkIClassExists(path)) {
|
||||
throw new MethodPathNotRegisteredException(path);
|
||||
// throw new MethodPathNotRegisteredException(path);
|
||||
}
|
||||
|
||||
Object instance = mRouteClasses.get(getClassIndex(path)).second;
|
||||
|
||||
return (T)instance;
|
||||
|
||||
} catch (MethodPathNotRegisteredException ex) {
|
||||
// UtilityExceptions.defaultException(null, ex, true);
|
||||
} catch (Exception ex) {
|
||||
// UtilityExceptions.defaultException(null, ex, true);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -32,6 +32,8 @@ public class BaseMenuConfiguration {
|
||||
@IdRes
|
||||
private int mGroupId;
|
||||
|
||||
private String codMenu;
|
||||
|
||||
private List<MenuItem> mItems = new ArrayList<>();
|
||||
|
||||
public @IdRes int getGroupId() {
|
||||
@@ -52,6 +54,15 @@ public class BaseMenuConfiguration {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMenu() {
|
||||
return codMenu;
|
||||
}
|
||||
|
||||
public MenuGroup setCodMenu(String codMenu) {
|
||||
this.codMenu = codMenu;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MenuItem> getItems() {
|
||||
return mItems;
|
||||
}
|
||||
@@ -67,6 +78,7 @@ public class BaseMenuConfiguration {
|
||||
@StringRes private int mTitleText;
|
||||
@DrawableRes private int mTitleIcon;
|
||||
@DrawableRes private int mDrawerIcon;
|
||||
private String codMenu;
|
||||
private RunnableWithReturn<Fragment> fragmentFactory;
|
||||
|
||||
public int getID() {
|
||||
@@ -105,6 +117,15 @@ public class BaseMenuConfiguration {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMenu() {
|
||||
return codMenu;
|
||||
}
|
||||
|
||||
public MenuItem setCodMenu(String codMenu) {
|
||||
this.codMenu = codMenu;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RunnableWithReturn<Fragment> getFragmentFactory() {
|
||||
return fragmentFactory;
|
||||
}
|
||||
|
||||
@@ -3,11 +3,15 @@ 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.contab_doc_interni.DocInterniFragment;
|
||||
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_fabbisogno_linee_prod.ProdFabbisognoLineeProdFragment;
|
||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.ProdRecuperoMaterialeFragment;
|
||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceFragment;
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeFragment;
|
||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaFragment;
|
||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeFragment;
|
||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteFragment;
|
||||
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreFragment;
|
||||
@@ -23,9 +27,11 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
new MenuGroup()
|
||||
.setGroupText(R.string.purchase)
|
||||
.setGroupId(R.id.nav_group_acquisto)
|
||||
.setCodMenu("MM008")
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_accettazione)
|
||||
.setCodMenu("MG044")
|
||||
.setTitleText(R.string.accettazione_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_accettazione)
|
||||
.setDrawerIcon(R.drawable.ic_black_download)
|
||||
@@ -33,6 +39,7 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_resi_fornitore)
|
||||
.setCodMenu("MG045")
|
||||
.setTitleText(R.string.fragment_ultime_arrivi_fornitore_title)
|
||||
.setTitleIcon(R.drawable.ic_latest_delivery)
|
||||
.setDrawerIcon(R.drawable.ic_black_latest_delivery)
|
||||
@@ -41,16 +48,19 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
new MenuGroup()
|
||||
.setGroupText(R.string.checkout)
|
||||
.setGroupId(R.id.nav_group_spedizione)
|
||||
.setCodMenu("MM010")
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_spedizione)
|
||||
.setCodMenu("MG046")
|
||||
.setTitleText(R.string.vendita_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_spedizione)
|
||||
.setDrawerIcon(R.drawable.ic_black_upload)
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, GestioneEnum.VENDITA, -1)))
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1, null)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_free_picking)
|
||||
.setCodMenu("MG047")
|
||||
.setTitleText(R.string.free_picking)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_picking_libero)
|
||||
.setDrawerIcon(R.drawable.ic_black_barcode_scanner)
|
||||
@@ -58,6 +68,7 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_resi_cliente)
|
||||
.setCodMenu("MG048")
|
||||
.setTitleText(R.string.fragment_ultime_consegne_cliente_title)
|
||||
.setTitleIcon(R.drawable.ic_latest_delivery_customer)
|
||||
.setDrawerIcon(R.drawable.ic_black_latest_delivery)
|
||||
@@ -65,9 +76,11 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
).addGroup(new MenuGroup()
|
||||
.setGroupText(R.string.manufacture)
|
||||
.setGroupId(R.id.nav_group_produzione)
|
||||
.setCodMenu("MM009")
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_ordine_produzione)
|
||||
.setCodMenu("MG049")
|
||||
.setTitleText(R.string.prod_ordine_produzione_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_prod_accettazione_produzione)
|
||||
.setDrawerIcon(R.drawable.ic_black_external)
|
||||
@@ -75,13 +88,15 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_ordine_lavorazione)
|
||||
.setCodMenu("MG050")
|
||||
.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)))
|
||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.PRODUZIONE, GestioneEnum.LAVORAZIONE, -1, null)))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_free_lav_picking)
|
||||
.setCodMenu("MG051")
|
||||
.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)
|
||||
@@ -89,13 +104,15 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_posizionamento_da_ord)
|
||||
.setTitleText(it.integry.integrywmsnative.R.string.versamento_merce_fragment_title)
|
||||
.setCodMenu("MG052")
|
||||
.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(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.PRODUZIONE, GestioneEnum.LAVORAZIONE, 1)))
|
||||
.setFragmentFactory(ProdFabbisognoLineeProdFragment::newInstance))
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_versamento_materiale)
|
||||
.setCodMenu("MG053")
|
||||
.setTitleText(R.string.prod_versamento_materiale_title_fragment)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_prod_versamento_materiale)
|
||||
.setDrawerIcon(R.drawable.ic_black_external)
|
||||
@@ -103,32 +120,70 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_prod_recupero_materiale)
|
||||
.setCodMenu("MG054")
|
||||
.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(it.integry.integrywmsnative.R.id.nav_prod_rientro_merce)
|
||||
.setCodMenu("MG059")
|
||||
.setTitleText(it.integry.integrywmsnative.R.string.rientro_merce_fragment_title)
|
||||
.setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_prod_accettazione_produzione)
|
||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_external)
|
||||
.setFragmentFactory(ProdRientroMerceFragment::newInstance))
|
||||
).addGroup(
|
||||
new MenuGroup()
|
||||
.setGroupText(R.string.internal_handling)
|
||||
.setGroupId(R.id.nav_group_movimentazione_interna)
|
||||
.setCodMenu("MM011")
|
||||
|
||||
.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))
|
||||
.addItem(new MenuItem()
|
||||
.setID(R.id.nav_versamento_merce)
|
||||
.setCodMenu("MG055")
|
||||
.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)
|
||||
.setCodMenu("MG056")
|
||||
.setTitleText(R.string.rettifica_giacenze_fragment_title)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_rettifica_giacenze)
|
||||
.setDrawerIcon(R.drawable.ic_black_empty_box)
|
||||
.setFragmentFactory(RettificaGiacenzeFragment::newInstance))
|
||||
|
||||
|
||||
);
|
||||
).addGroup(
|
||||
new MenuGroup()
|
||||
.setCodMenu("MM012")
|
||||
.setGroupText(it.integry.integrywmsnative.R.string.punto_vendita)
|
||||
.setGroupId(it.integry.integrywmsnative.R.id.nav_group_puntivendita)
|
||||
|
||||
.addItem(new MenuItem()
|
||||
.setCodMenu("MG057")
|
||||
.setID(it.integry.integrywmsnative.R.id.nav_pv_ordini_acquisto)
|
||||
.setTitleText(it.integry.integrywmsnative.R.string.generate_orders)
|
||||
.setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_purchase_orders_pv)
|
||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_purchase_orders_pv)
|
||||
.setFragmentFactory(PVOrdiniAcquistoGrigliaFragment::newInstance))
|
||||
.addItem(new MenuItem()
|
||||
.setCodMenu("MG058")
|
||||
.setID(it.integry.integrywmsnative.R.id.nav_pv_doc_interni)
|
||||
.setTitleText(it.integry.integrywmsnative.R.string.doc_interni)
|
||||
.setTitleIcon(R.drawable.ic_dashboard_contab_doc_interni)
|
||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_contab_doc_interni)
|
||||
.setFragmentFactory(DocInterniFragment::newInstance))
|
||||
|
||||
// .addItem(new MenuItem()
|
||||
// .setID(it.integry.integrywmsnative.R.id.nav_pv_ordini_acquisto_trasmessi)
|
||||
// .setTitleText(it.integry.integrywmsnative.R.string.transmitted_orders)
|
||||
// .setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_trasmitted_orders_list)
|
||||
// .setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_trasmitted_orders_list)
|
||||
// .setFragmentClass(PVOrdiniAcquistoTransmittedListFragment.newInstance()))
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -7,32 +7,38 @@ import com.orhanobut.logger.AndroidLogAdapter;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecover;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
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;
|
||||
|
||||
@Singleton
|
||||
public class AppContext {
|
||||
|
||||
//Note: this is the Application Context NOT the Activity Context
|
||||
private final Context mContext;
|
||||
private final Context mApplicationContext;
|
||||
|
||||
@Inject
|
||||
AppDatabase mAppDatabase;
|
||||
|
||||
public AppContext(Context context) {
|
||||
this.mContext = context;
|
||||
this.mApplicationContext = context;
|
||||
|
||||
MainApplication.appComponent
|
||||
.inject(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Inject
|
||||
public void init() {
|
||||
this.initUtilities();
|
||||
|
||||
@@ -41,15 +47,12 @@ public class AppContext {
|
||||
this.initCrashlytics();
|
||||
|
||||
this.initLogger();
|
||||
|
||||
this.initRecoverColli();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void initSettings() {
|
||||
Stash.init(mContext);
|
||||
SettingsManager.init(mContext);
|
||||
Stash.init(mApplicationContext);
|
||||
SettingsManager.init(mApplicationContext);
|
||||
}
|
||||
|
||||
private void initCrashlytics() {
|
||||
@@ -67,19 +70,13 @@ public class AppContext {
|
||||
}
|
||||
|
||||
private void initUtilities() {
|
||||
UtilityContext.initApplicationContext(mContext);
|
||||
UtilityResources.init(mContext);
|
||||
UtilityToast.init(mContext);
|
||||
UtilitySettings.init(mAppDatabase);
|
||||
UtilityContext.initApplicationContext(mApplicationContext);
|
||||
UtilityResources.init(mApplicationContext);
|
||||
UtilityToast.init(mApplicationContext);
|
||||
}
|
||||
|
||||
private void initLogger() {
|
||||
Logger.addLogAdapter(new AndroidLogAdapter());
|
||||
}
|
||||
|
||||
private void initRecoverColli() {
|
||||
ColliDataRecover.init(mContext);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,62 +1,110 @@
|
||||
package it.integry.integrywmsnative.core.context;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import android.text.Spanned;
|
||||
import android.text.SpannedString;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.ConnectException;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
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_store.db.AppDatabase;
|
||||
import it.integry.integrywmsnative.core.menu.MenuService;
|
||||
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.core.utility.UtilitySettings;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityThread;
|
||||
|
||||
@Singleton
|
||||
public class MainContext {
|
||||
|
||||
private final AppCompatActivity mContext;
|
||||
private final Context applicationContext;
|
||||
private final MenuService menuService;
|
||||
private final AppDatabase appDatabase;
|
||||
|
||||
public MainContext(AppCompatActivity context) {
|
||||
this.mContext = context;
|
||||
private Listener mListener;
|
||||
|
||||
public MainContext(Context applicationContext, MenuService menuService, AppDatabase appDatabase) {
|
||||
this.applicationContext = applicationContext;
|
||||
this.menuService = menuService;
|
||||
this.appDatabase = appDatabase;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
|
||||
public void init(Runnable onContextInitialized) {
|
||||
try {
|
||||
BarcodeManager.init(applicationContext);
|
||||
} catch (Exception exception) {
|
||||
|
||||
BarcodeManager.init(mContext);
|
||||
}
|
||||
|
||||
this.initDBData(() -> {
|
||||
onContextInitialized.run();
|
||||
this.initMenu(() -> {
|
||||
|
||||
this.initReflections();
|
||||
if (mListener != null) mListener.onContextInitialized();
|
||||
});
|
||||
});
|
||||
|
||||
this.initReflections();
|
||||
|
||||
this.initServerStatusChecker();
|
||||
|
||||
}
|
||||
|
||||
public void logout(Runnable onLoggedOut) {
|
||||
menuService.invalidateCache();
|
||||
UtilityThread.executeParallel(() -> {
|
||||
SettingsManager.i().setUser(null);
|
||||
SettingsManager.i().setUserSession(null);
|
||||
SettingsManager.update();
|
||||
appDatabase.clearAllTables();
|
||||
|
||||
onLoggedOut.run();
|
||||
}, true);
|
||||
}
|
||||
|
||||
private void initServerStatusChecker() {
|
||||
ServerStatusChecker.init();
|
||||
}
|
||||
|
||||
private void initDBData(Runnable onComplete) {
|
||||
SettingsManager.loadDBVariables(onComplete, ex -> {
|
||||
DialogSimpleMessageHelper.makeErrorDialog(mContext,
|
||||
new SpannableString(ex.getMessage()), null, mContext::finish, R.string.logout, () -> {
|
||||
UtilitySettings.logout();
|
||||
MainApplication.exit();
|
||||
}).show();
|
||||
|
||||
|
||||
SettingsManager.loadDBVariables(item -> {
|
||||
if (mListener != null) mListener.onDBDataLoading(item);
|
||||
},
|
||||
onComplete,
|
||||
ex -> {
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
if (mListener != null) mListener.onError(message);
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private void initMenu(Runnable onComplete) {
|
||||
if (mListener != null) mListener.onMenuLoading();
|
||||
this.menuService.init(onComplete, ex -> {
|
||||
if (mListener != null) mListener.onError(new SpannedString(ex.getMessage()));
|
||||
});
|
||||
}
|
||||
|
||||
private void initReflections() {
|
||||
ClassRouter.init(mContext);
|
||||
ClassRouter.init();
|
||||
|
||||
try {
|
||||
String initMethod = "init";
|
||||
@@ -69,14 +117,29 @@ public class MainContext {
|
||||
// for static methods we can use null as instance of class
|
||||
final Object newInstance = dynamicContextClass.newInstance();
|
||||
|
||||
m.invoke(newInstance, (Context) mContext);
|
||||
m.invoke(newInstance, applicationContext);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
UtilityExceptions.defaultException(mContext, e, true);
|
||||
// UtilityExceptions.defaultException(mContext, e, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public MainContext setListener(Listener listener) {
|
||||
this.mListener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
void onDBDataLoading(String item);
|
||||
|
||||
void onMenuLoading();
|
||||
|
||||
void onContextInitialized();
|
||||
|
||||
void onError(Spanned message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.Contains;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.Equals;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.EqualsIgnoreCase;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.GreaterThan;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.IsNull;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.LessThan;
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.custom.Not;
|
||||
import it.integry.integrywmsnative.core.coollection.query.Query;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class Coollection {
|
||||
|
||||
public static <T> Query<T> from(Collection<T> collection) {
|
||||
return new Query<T>(collection);
|
||||
}
|
||||
|
||||
public static Matcher eq(Object value) {
|
||||
return new Equals(value);
|
||||
}
|
||||
|
||||
public static Matcher contains(String value) {
|
||||
return new Contains(value);
|
||||
}
|
||||
|
||||
public static Matcher eqIgnoreCase(String value) {
|
||||
return new EqualsIgnoreCase(value);
|
||||
}
|
||||
|
||||
public static Matcher not(Matcher matcher) {
|
||||
return new Not(matcher);
|
||||
}
|
||||
|
||||
public static Matcher greaterThan(Number value) {
|
||||
return new GreaterThan(value);
|
||||
}
|
||||
|
||||
public static Matcher lessThan(Number value) {
|
||||
return new LessThan(value);
|
||||
}
|
||||
|
||||
public static Matcher isNull() {
|
||||
return new IsNull();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher;
|
||||
|
||||
public interface Matcher {
|
||||
|
||||
boolean match(Object value);
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class Contains implements Matcher {
|
||||
|
||||
private final String matcherValue;
|
||||
|
||||
public Contains(String matcherValue) {
|
||||
this.matcherValue = matcherValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object value) {
|
||||
return String.valueOf(value).contains(matcherValue);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class Equals implements Matcher {
|
||||
|
||||
private final Object value;
|
||||
|
||||
public Equals(Object value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object anotherValue) {
|
||||
return value.equals(anotherValue);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class EqualsIgnoreCase implements Matcher {
|
||||
|
||||
private final String value;
|
||||
|
||||
public EqualsIgnoreCase(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object anotherValue) {
|
||||
return (value).equalsIgnoreCase((String) anotherValue);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class GreaterThan implements Matcher {
|
||||
|
||||
private final Number value;
|
||||
|
||||
public GreaterThan(Number value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object matchValue) {
|
||||
if (matchValue == null) {
|
||||
return false;
|
||||
}
|
||||
return ((Number) matchValue).doubleValue() > value.doubleValue();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class IsNull implements Matcher {
|
||||
|
||||
@Override
|
||||
public boolean match(Object value) {
|
||||
return value == null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class LessThan implements Matcher {
|
||||
|
||||
private final Number value;
|
||||
|
||||
public LessThan(Number value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object matchValue) {
|
||||
if (matchValue == null) {
|
||||
return false;
|
||||
}
|
||||
return ((Number) matchValue).doubleValue() < value.doubleValue();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.matcher.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
|
||||
public class Not implements Matcher {
|
||||
|
||||
private final Matcher matcher;
|
||||
|
||||
public Not(Matcher matcher) {
|
||||
this.matcher = matcher;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(Object value) {
|
||||
return !matcher.match(value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
import it.integry.integrywmsnative.core.coollection.query.criteria.Criteria;
|
||||
import it.integry.integrywmsnative.core.coollection.query.criteria.CriteriaList;
|
||||
import it.integry.integrywmsnative.core.coollection.query.order.Order;
|
||||
import it.integry.integrywmsnative.core.coollection.query.order.OrderCriteria;
|
||||
import it.integry.integrywmsnative.core.coollection.query.specification.custom.AndSpecification;
|
||||
import it.integry.integrywmsnative.core.coollection.query.specification.custom.OrSpecification;
|
||||
|
||||
public class Query<T> {
|
||||
|
||||
private final Collection<T> collection;
|
||||
private CriteriaList<T> criterias;
|
||||
private OrderCriteria<T> orderCriteria;
|
||||
|
||||
public Query(Collection<T> collection) {
|
||||
this.collection = collection;
|
||||
criterias = new CriteriaList<T>();
|
||||
}
|
||||
|
||||
public Query<T> where(String method, Matcher matcher) {
|
||||
Criteria<T> criteria = new Criteria<T>(method, matcher);
|
||||
criterias.add(criteria);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Query<T> and(String method, Matcher matcher) {
|
||||
Criteria<T> criteria = new Criteria<T>(method, matcher);
|
||||
criteria.setSpecification(new AndSpecification<T>());
|
||||
criterias.add(criteria);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Query<T> or(String method, Matcher matcher) {
|
||||
Criteria<T> criteria = new Criteria<T>(method, matcher);
|
||||
criteria.setSpecification(new OrSpecification<T>());
|
||||
criterias.add(criteria);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Query<T> orderBy(String method, Order order) {
|
||||
orderCriteria = new OrderCriteria<T>(method, order);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Query<T> orderBy(String method) {
|
||||
return orderBy(method, Order.ASC);
|
||||
}
|
||||
|
||||
public List<T> all() {
|
||||
List<T> all = new ArrayList<T>();
|
||||
for (T item : collection) {
|
||||
if (criterias.match(item)) {
|
||||
all.add(item);
|
||||
}
|
||||
}
|
||||
if (orderCriteria != null) {
|
||||
all = orderCriteria.sort(all);
|
||||
}
|
||||
return all;
|
||||
}
|
||||
|
||||
public T first() {
|
||||
List<T> all = cloneCollection(collection);
|
||||
if (orderCriteria != null) {
|
||||
all = orderCriteria.sort(all);
|
||||
}
|
||||
for (T item : all) {
|
||||
if (criterias.match(item)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<T> cloneCollection(Collection<T> collection) {
|
||||
List<T> list = new ArrayList<T>();
|
||||
for (T item : collection) {
|
||||
list.add(item);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.criteria;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.matcher.Matcher;
|
||||
import it.integry.integrywmsnative.core.coollection.query.specification.Specification;
|
||||
import it.integry.integrywmsnative.core.coollection.reflection.Phanton;
|
||||
|
||||
public class Criteria<T> {
|
||||
|
||||
private final String method;
|
||||
private final Matcher matcher;
|
||||
private Specification<T> specification;
|
||||
|
||||
public Criteria(String method, Matcher matcher) {
|
||||
this.method = method;
|
||||
this.matcher = matcher;
|
||||
}
|
||||
|
||||
public void setSpecification(Specification<T> specification) {
|
||||
this.specification = specification;
|
||||
}
|
||||
|
||||
public Specification<T> specification() {
|
||||
return specification;
|
||||
}
|
||||
|
||||
public boolean match(T item) {
|
||||
try {
|
||||
Object value = Phanton.from(item).call(method);
|
||||
return matcher.match(value);
|
||||
} catch (Exception err) {
|
||||
throw new RuntimeException(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.criteria;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CriteriaList<T> {
|
||||
|
||||
private List<Criteria<T>> criterias;
|
||||
|
||||
public CriteriaList() {
|
||||
criterias = new ArrayList<Criteria<T>>();
|
||||
}
|
||||
|
||||
public void add(Criteria<T> criteria) {
|
||||
criterias.add(criteria);
|
||||
}
|
||||
|
||||
public boolean match(T item) {
|
||||
if (criterias.size() == 0) {
|
||||
return true;
|
||||
}
|
||||
if (criterias.size() == 1) {
|
||||
return criterias.get(0).match(item);
|
||||
}
|
||||
boolean matched = true;
|
||||
for (int i = criterias.size() - 1; i > 0; i--) {
|
||||
Criteria<T> one = criterias.get(i);
|
||||
Criteria<T> other = criterias.get(i - 1);
|
||||
matched = matched && one.specification().match(item, one, other);
|
||||
}
|
||||
return matched;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.order;
|
||||
|
||||
public enum Order {
|
||||
ASC, DESC
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.order;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.reflection.Phanton;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
public class OrderComparator<T> implements Comparator<T> {
|
||||
|
||||
private final String method;
|
||||
|
||||
public OrderComparator(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public int compare(T one, T other) {
|
||||
Object oneValue = Phanton.from(one).call(method);
|
||||
Object otherValue = Phanton.from(other).call(method);
|
||||
if (oneValue == null || otherValue == null) {
|
||||
return 0;
|
||||
}
|
||||
if (oneValue instanceof Comparable) {
|
||||
return ((Comparable<Object>) oneValue).compareTo(otherValue);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.order;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class OrderCriteria<T> {
|
||||
|
||||
private final String method;
|
||||
private final Order order;
|
||||
|
||||
public OrderCriteria(String method, Order order) {
|
||||
this.method = method;
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public List<T> sort(List<T> list) {
|
||||
Collections.sort(list, new OrderComparator<T>(method));
|
||||
if (order == Order.DESC) {
|
||||
Collections.reverse(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.specification;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.query.criteria.Criteria;
|
||||
|
||||
public interface Specification<T> {
|
||||
|
||||
boolean match(T item, Criteria<T> one, Criteria<T> other);
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.specification.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.query.criteria.Criteria;
|
||||
import it.integry.integrywmsnative.core.coollection.query.specification.Specification;
|
||||
|
||||
public class AndSpecification<T> implements Specification<T> {
|
||||
|
||||
@Override
|
||||
public boolean match(T item, Criteria<T> one, Criteria<T> other) {
|
||||
return one.match(item) && other.match(item);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.query.specification.custom;
|
||||
|
||||
import it.integry.integrywmsnative.core.coollection.query.criteria.Criteria;
|
||||
import it.integry.integrywmsnative.core.coollection.query.specification.Specification;
|
||||
|
||||
public class OrSpecification<T> implements Specification<T> {
|
||||
|
||||
@Override
|
||||
public boolean match(T item, Criteria<T> one, Criteria<T> other) {
|
||||
return one.match(item) || other.match(item);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.coollection.reflection;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class Phanton<T> {
|
||||
|
||||
private final T target;
|
||||
private Class<?> clazz;
|
||||
|
||||
private Phanton(T target) {
|
||||
this.target = target;
|
||||
clazz = target.getClass();
|
||||
}
|
||||
|
||||
public static <T> Phanton<T> from(T target) {
|
||||
return new Phanton<T>(target);
|
||||
}
|
||||
|
||||
public Object call(String name) {
|
||||
return invoke(name);
|
||||
}
|
||||
|
||||
private Object invoke(String name) {
|
||||
for (final Field field : clazz.getDeclaredFields()) {
|
||||
try {
|
||||
if (name.equals(field.getName())) {
|
||||
field.setAccessible(Boolean.TRUE);
|
||||
return field.get(target);
|
||||
}
|
||||
} catch (final IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("No such property with name " + name);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,231 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.data_recover;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
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 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;
|
||||
|
||||
public class ColliDataRecover {
|
||||
|
||||
public static class RecoverDTO {
|
||||
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 RecoverDTO setId(int id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getNumCollo() {
|
||||
return numCollo;
|
||||
}
|
||||
|
||||
public RecoverDTO setNumCollo(int numCollo) {
|
||||
this.numCollo = numCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSerCollo() {
|
||||
return serCollo;
|
||||
}
|
||||
|
||||
public RecoverDTO setSerCollo(String serCollo) {
|
||||
this.serCollo = serCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDataCollo() {
|
||||
return dataCollo;
|
||||
}
|
||||
|
||||
public RecoverDTO setDataCollo(String dataCollo) {
|
||||
this.dataCollo = dataCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGestioneCollo() {
|
||||
return gestioneCollo;
|
||||
}
|
||||
|
||||
public RecoverDTO setGestioneCollo(String gestioneCollo) {
|
||||
this.gestioneCollo = gestioneCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFiltro() {
|
||||
return filtro;
|
||||
}
|
||||
|
||||
public RecoverDTO setFiltro(String filtro) {
|
||||
this.filtro = filtro;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<OrdineUscitaInevasoDTO> getTestateOrdini() {
|
||||
return testateOrdini;
|
||||
}
|
||||
|
||||
public RecoverDTO 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());
|
||||
}
|
||||
}
|
||||
|
||||
private static Context mContext;
|
||||
|
||||
private static List<RecoverDTO> mtbColtsSessions = new ArrayList<>();
|
||||
|
||||
public static void init(Context context) {
|
||||
mContext = context;
|
||||
|
||||
if(isFilePresent(CommonConst.Files.RECOVER_COLLO_FILE)) {
|
||||
loadLocalFile();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean thereIsAnExistantSession() {
|
||||
return mtbColtsSessions.size() > 0;
|
||||
}
|
||||
|
||||
public static List<Integer> getAllSessionIDs() {
|
||||
if(thereIsAnExistantSession()) {
|
||||
|
||||
return Stream.of(mtbColtsSessions)
|
||||
.map(RecoverDTO::getId)
|
||||
.toList();
|
||||
|
||||
} else return null;
|
||||
}
|
||||
|
||||
public static RecoverDTO getSession(Integer sessionID) {
|
||||
|
||||
if(sessionID == null) return null;
|
||||
|
||||
return getIfExists(sessionID);
|
||||
}
|
||||
|
||||
private static RecoverDTO getIfExists(int id) {
|
||||
Optional<RecoverDTO> recoverDTOOptional = Stream.of(mtbColtsSessions)
|
||||
.filter(x -> x.getId() == id)
|
||||
.findSingle();
|
||||
|
||||
|
||||
return recoverDTOOptional.isPresent() ? recoverDTOOptional.get() : null;
|
||||
}
|
||||
|
||||
public static int startNewSession(MtbColt mtbColtSession, List<OrdineUscitaInevasoDTO> testateOrdini) {
|
||||
Integer newId = null;
|
||||
|
||||
while(newId == null) {
|
||||
int randomId = new Random().nextInt(1000);
|
||||
RecoverDTO dto = getIfExists(randomId);
|
||||
if(dto == null) newId = randomId;
|
||||
}
|
||||
|
||||
|
||||
RecoverDTO recoverDTO = new RecoverDTO()
|
||||
.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 static void closeSession(int ID) {
|
||||
RecoverDTO dto = getIfExists(ID);
|
||||
|
||||
if(dto != null) {
|
||||
mtbColtsSessions.remove(dto);
|
||||
updateLocalFile();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static 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<RecoverDTO>>(){}.getType();
|
||||
mtbColtsSessions = gson.fromJson(jsonString, listType);
|
||||
|
||||
inputStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
UtilityExceptions.defaultException(mContext, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static 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 static boolean isFilePresent(String fileName) {
|
||||
String path = mContext.getFilesDir().getAbsolutePath() + "/" + fileName;
|
||||
File file = new File(path);
|
||||
return file.exists();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -22,28 +22,27 @@ 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 final Context mContext;
|
||||
private final Context mApplicationContext;
|
||||
private List<ColliDataRecoverDTO> mtbColtsSessions = new ArrayList<>();
|
||||
|
||||
@Inject
|
||||
public ColliDataRecoverService(Context context) {
|
||||
this.mContext = context;
|
||||
public ColliDataRecoverService(Context applicationContext) {
|
||||
this.mApplicationContext = applicationContext;
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void init() {
|
||||
if(isFilePresent(CommonConst.Files.RECOVER_COLLO_FILE)) {
|
||||
loadLocalFile();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean thereIsAnExistantSession() {
|
||||
return mtbColtsSessions.size() > 0;
|
||||
return mtbColtsSessions != null && mtbColtsSessions.size() > 0;
|
||||
}
|
||||
|
||||
public List<Integer> getAllSessionIDs() {
|
||||
@@ -111,7 +110,7 @@ public class ColliDataRecoverService {
|
||||
Gson gson = new Gson();
|
||||
|
||||
try {
|
||||
inputStream = mContext.openFileInput(CommonConst.Files.RECOVER_COLLO_FILE);
|
||||
inputStream = mApplicationContext.openFileInput(CommonConst.Files.RECOVER_COLLO_FILE);
|
||||
|
||||
byte[] bytes = IOUtils.readInputStreamFully(inputStream);
|
||||
String jsonString = new String(bytes);
|
||||
@@ -122,7 +121,7 @@ public class ColliDataRecoverService {
|
||||
inputStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
UtilityExceptions.defaultException(mContext, e);
|
||||
// UtilityExceptions.defaultException(mContext, e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,17 +133,17 @@ public class ColliDataRecoverService {
|
||||
String jsonText = gson.toJson(mtbColtsSessions);
|
||||
|
||||
try {
|
||||
outputStream = mContext.openFileOutput(CommonConst.Files.RECOVER_COLLO_FILE, Context.MODE_PRIVATE);
|
||||
outputStream = mApplicationContext.openFileOutput(CommonConst.Files.RECOVER_COLLO_FILE, Context.MODE_PRIVATE);
|
||||
outputStream.write(jsonText.getBytes());
|
||||
outputStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
UtilityExceptions.defaultException(mContext, e);
|
||||
// UtilityExceptions.defaultException(mContext, e);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isFilePresent(String fileName) {
|
||||
String path = mContext.getFilesDir().getAbsolutePath() + "/" + fileName;
|
||||
String path = mApplicationContext.getFilesDir().getAbsolutePath() + "/" + fileName;
|
||||
File file = new File(path);
|
||||
return file.exists();
|
||||
}
|
||||
|
||||
@@ -4,24 +4,28 @@ import androidx.room.Database;
|
||||
import androidx.room.RoomDatabase;
|
||||
import androidx.room.TypeConverters;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.converter.BigDecimalConverter;
|
||||
import it.integry.integrywmsnative.core.data_store.db.converter.DateConverter;
|
||||
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.MtbColrDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
|
||||
@Database(entities = {ArticoloGriglia.class, Griglia.class, Ordine.class, ArticoloOrdine.class}, version = 1, exportSchema = false)
|
||||
@Database(entities = {ArticoloGriglia.class, Griglia.class, Ordine.class, ArticoloOrdine.class, SqlMtbColt.class, SqlMtbColr.class}, version = 8, exportSchema = false)
|
||||
@TypeConverters({
|
||||
DateConverter.class
|
||||
DateConverter.class,
|
||||
BigDecimalConverter.class
|
||||
})
|
||||
public abstract class AppDatabase extends RoomDatabase {
|
||||
|
||||
// private AppDatabase mRoomInstance;
|
||||
|
||||
public abstract ArticoloGrigliaDao articoloGrigliaDao();
|
||||
|
||||
public abstract GrigliaDao grigliaDao();
|
||||
@@ -30,26 +34,9 @@ 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 abstract MtbColtDao mtbColtDao();
|
||||
|
||||
// public AppDatabase(Application application) {
|
||||
// mRoomInstance = Room.databaseBuilder(application,
|
||||
// AppDatabase.class, "integry_wms")
|
||||
// .fallbackToDestructiveMigration()
|
||||
// .build();
|
||||
// }
|
||||
public abstract MtbColrDao mtbColrDao();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -11,15 +11,21 @@ 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.MtbColrDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.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.MtbColrRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.MtbColtRepository;
|
||||
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;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.implementations.SqlMtbColrDataSource;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.implementations.SqlMtbColtDataSource;
|
||||
|
||||
@Module
|
||||
public class RoomModule {
|
||||
@@ -66,6 +72,18 @@ public class RoomModule {
|
||||
return appDatabase.articoloOrdineDao();
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
MtbColtDao providesMtbColtDao(AppDatabase appDatabase) {
|
||||
return appDatabase.mtbColtDao();
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
MtbColrDao providesMtbColrDao(AppDatabase appDatabase) {
|
||||
return appDatabase.mtbColrDao();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -96,4 +114,16 @@ public class RoomModule {
|
||||
return new OrdineDataSource(ordineDao);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
MtbColtRepository providesMtbColtRepository(MtbColtDao mtbColtDao) {
|
||||
return new SqlMtbColtDataSource(mtbColtDao);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
MtbColrRepository providesMtbColrRepository(MtbColrDao mtbColrDao) {
|
||||
return new SqlMtbColrDataSource(mtbColrDao);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.converter;
|
||||
|
||||
import androidx.room.TypeConverter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class BigDecimalConverter {
|
||||
@TypeConverter
|
||||
public static BigDecimal fromFloat(Float value) {
|
||||
return value == null ? null : BigDecimal.valueOf(value.doubleValue());
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
public static Float dateToTimestamp(BigDecimal value) {
|
||||
return value == null ? null : value.floatValue();
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,10 @@ import androidx.room.Dao;
|
||||
import androidx.room.Delete;
|
||||
import androidx.room.Insert;
|
||||
import androidx.room.Query;
|
||||
import androidx.room.RawQuery;
|
||||
import androidx.room.Update;
|
||||
import androidx.sqlite.db.SupportSQLiteQuery;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
@@ -21,10 +22,13 @@ public interface ArticoloGrigliaDao {
|
||||
|
||||
@Insert
|
||||
void insertAll(List<ArticoloGriglia> articoli);
|
||||
|
||||
@Insert
|
||||
Long insert(ArticoloGriglia articolo);
|
||||
|
||||
@Update
|
||||
void updateAll(List<ArticoloGriglia> articoli);
|
||||
|
||||
@Update
|
||||
void update(ArticoloGriglia articolo);
|
||||
|
||||
@@ -37,12 +41,18 @@ public interface ArticoloGrigliaDao {
|
||||
@Query("SELECT * FROM articoli_griglia WHERE cod_mart = :codMart AND id_griglia = :idGriglia LIMIT 1")
|
||||
ArticoloGriglia findArticoloByCodMartAndGriglia(String codMart, int idGriglia);
|
||||
|
||||
@Query("SELECT * FROM articoli_griglia WHERE (cod_mart = :scan OR bar_code =:scan )AND id_griglia = :idGriglia LIMIT 1")
|
||||
@Query("SELECT * FROM articoli_griglia WHERE (cod_mart = :scan OR bar_code =:scan) AND id_griglia = :idGriglia LIMIT 1")
|
||||
ArticoloGriglia findArticoloByScanAndGriglia(String scan, int idGriglia);
|
||||
|
||||
@Query("SELECT articolo_griglia_id FROM articoli_griglia WHERE (cod_mart = :codMart AND bar_code =:barCode )AND id_griglia = :idGriglia LIMIT 1")
|
||||
@Query("SELECT articolo_griglia_id FROM articoli_griglia WHERE (cod_mart = :codMart AND bar_code =:barCode) AND id_griglia = :idGriglia LIMIT 1")
|
||||
Integer getIdArticoloByGrigliaAndBarcodeAndCodMart(int idGriglia, String barCode, String codMart);
|
||||
|
||||
@RawQuery(observedEntities = ArticoloGriglia.class)
|
||||
List<ArticoloGriglia> getArticoli(SupportSQLiteQuery query);
|
||||
|
||||
@Query("SELECT * FROM articoli_griglia WHERE id_griglia = :grigliaId")
|
||||
List<ArticoloGriglia> getArticoliFromGriglia(int grigliaId);
|
||||
|
||||
@Query("SELECT * FROM articoli_griglia WHERE id_griglia = :grigliaId AND new_no_promo = 1")
|
||||
List<ArticoloGriglia> getNewArticoliInGriglia(int grigliaId);
|
||||
}
|
||||
|
||||
@@ -8,9 +8,8 @@ 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.ArticoloOrdine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.ArticoloOrdineWrapper;
|
||||
|
||||
@Dao
|
||||
public interface ArticoloOrdineDao {
|
||||
@@ -34,8 +33,17 @@ public interface ArticoloOrdineDao {
|
||||
@Update
|
||||
void update(ArticoloOrdine articolo);
|
||||
|
||||
@Query("SELECT * FROM articoli_ordine where id_ordine = :ordineId")
|
||||
List<ArticoloOrdine> findArticoliByOrdine(int ordineId);
|
||||
@Query("SELECT articoli_ordine.*," +
|
||||
"articoli_griglia.gg_scadenza," +
|
||||
"articoli_griglia.giacenza," +
|
||||
"articoli_griglia.qta_prevista_vendita," +
|
||||
"articoli_griglia.qta_proposta " +
|
||||
"FROM articoli_ordine " +
|
||||
"INNER JOIN ordini on articoli_ordine.id_ordine = ordini.ordine_id " +
|
||||
"LEFT OUTER JOIN articoli_griglia " +
|
||||
"on articoli_ordine.cod_mart = articoli_griglia.cod_mart and ordini.id_griglia = articoli_griglia.id_griglia and articoli_ordine.bar_code = articoli_griglia.bar_code " +
|
||||
"where id_ordine = :ordineId")
|
||||
List<ArticoloOrdineWrapper> findArticoliByOrdine(int ordineId);
|
||||
|
||||
@Query("SELECt * from articoli_ordine where cod_mart = :codMart and id_ordine = :ordineId LIMIT 1")
|
||||
ArticoloOrdine findArticoloByCodMartAndOrdine(int ordineId, String codMart);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Delete;
|
||||
import androidx.room.Insert;
|
||||
import androidx.room.Query;
|
||||
import androidx.room.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
|
||||
@Dao
|
||||
public interface MtbColrDao {
|
||||
@Query("SELECT * from mtb_colr ")
|
||||
List<SqlMtbColr> getAll();
|
||||
|
||||
@Insert
|
||||
Long insert(SqlMtbColr mtbColr);
|
||||
|
||||
@Update
|
||||
void update(SqlMtbColr mtbColr);
|
||||
|
||||
@Delete
|
||||
void delete(SqlMtbColr mtbColr);
|
||||
|
||||
@Query("SELECT * from mtb_colr where id_collo = :idDocument")
|
||||
List<SqlMtbColr> getDocumentRows(int idDocument);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||
|
||||
import androidx.room.Dao;
|
||||
import androidx.room.Delete;
|
||||
import androidx.room.Insert;
|
||||
import androidx.room.Query;
|
||||
import androidx.room.Update;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
import it.integry.integrywmsnative.core.data_store.db.view_model.OrdineWithGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.DocInternoWrapper;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.OrdineWrapper;
|
||||
|
||||
@Dao
|
||||
public interface MtbColtDao {
|
||||
@Query("SELECT * from mtb_colt")
|
||||
List<SqlMtbColt> getAll();
|
||||
|
||||
@Insert
|
||||
Long insert(SqlMtbColt mtbColt);
|
||||
|
||||
@Update
|
||||
void update(SqlMtbColt mtbColt);
|
||||
|
||||
@Delete
|
||||
void delete(SqlMtbColt mtbColt);
|
||||
|
||||
@Query("SELECT mtb_colt.*, count(mtb_colr.id) as countArticoli from mtb_colt left outer join mtb_colr on (mtb_colr.id_collo = mtb_colt.id) where" +
|
||||
" cod_dtip_provv = :codDtip " +
|
||||
" AND ( cod_anag = :codAnag OR (cod_anag is null and :codAnag is null)) " +
|
||||
" AND ( cod_vdes = :codVdes OR (cod_vdes is null and :codVdes is null)) " +
|
||||
" AND ( mtb_colt.data_doc = :dataDoc OR (mtb_colt.data_doc is null and :dataDoc is null)) " +
|
||||
" AND ( mtb_colt.num_doc = :numDoc OR (mtb_colt.num_doc is null and :numDoc is null)) " +
|
||||
" and cod_dtip is null group by mtb_colt.id")
|
||||
List<DocInternoWrapper> getLocalDocumentsByCodDtip(String codDtip, String codAnag, String codVdes, Date dataDoc, String numDoc);
|
||||
|
||||
@Query("SELECT ifnull(MAX(num_collo),0) +1 as num_collo from mtb_colt")
|
||||
Integer getNextNumCollo();
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import androidx.room.ForeignKey;
|
||||
import androidx.room.Index;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
|
||||
@Entity(
|
||||
@@ -25,7 +27,7 @@ import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
public class ArticoloGriglia {
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
@ColumnInfo(name = "articolo_griglia_id")
|
||||
private int articoloGrigliaId;
|
||||
private Integer articoloGrigliaId;
|
||||
|
||||
@ColumnInfo(name = "cod_mart")
|
||||
private String codMart;
|
||||
@@ -54,14 +56,29 @@ public class ArticoloGriglia {
|
||||
@ColumnInfo(name = "qta_min_ordinabile")
|
||||
private float qtaMinOrdinabile;
|
||||
|
||||
@ColumnInfo(name = "gg_scadenza")
|
||||
private int ggScadenza;
|
||||
|
||||
@ColumnInfo(name = "giacenza")
|
||||
private float giacenza;
|
||||
|
||||
@ColumnInfo(name = "qta_prevista_vendita")
|
||||
private float qtaPrevistaVendita;
|
||||
|
||||
@ColumnInfo(name = "qta_proposta")
|
||||
private float qtaProposta;
|
||||
|
||||
@ColumnInfo(name = "id_griglia")
|
||||
private int idGriglia;
|
||||
|
||||
public int getArticoloGrigliaId() {
|
||||
@ColumnInfo(name = "new_no_promo")
|
||||
private boolean newNoPromo = false;
|
||||
|
||||
public Integer getArticoloGrigliaId() {
|
||||
return articoloGrigliaId;
|
||||
}
|
||||
|
||||
public void setArticoloGrigliaId(int articoloGrigliaId) {
|
||||
public void setArticoloGrigliaId(Integer articoloGrigliaId) {
|
||||
this.articoloGrigliaId = articoloGrigliaId;
|
||||
}
|
||||
|
||||
@@ -145,6 +162,46 @@ public class ArticoloGriglia {
|
||||
this.idGriglia = idGriglia;
|
||||
}
|
||||
|
||||
public int getGgScadenza() {
|
||||
return ggScadenza;
|
||||
}
|
||||
|
||||
public void setGgScadenza(int ggScadenza) {
|
||||
this.ggScadenza = ggScadenza;
|
||||
}
|
||||
|
||||
public float getGiacenza() {
|
||||
return giacenza;
|
||||
}
|
||||
|
||||
public void setGiacenza(float giacenza) {
|
||||
this.giacenza = giacenza;
|
||||
}
|
||||
|
||||
public float getQtaPrevistaVendita() {
|
||||
return qtaPrevistaVendita;
|
||||
}
|
||||
|
||||
public void setQtaPrevistaVendita(float qtaPrevistaVendita) {
|
||||
this.qtaPrevistaVendita = qtaPrevistaVendita;
|
||||
}
|
||||
|
||||
public float getQtaProposta() {
|
||||
return qtaProposta;
|
||||
}
|
||||
|
||||
public void setQtaProposta(float qtaProposta) {
|
||||
this.qtaProposta = qtaProposta;
|
||||
}
|
||||
|
||||
public boolean isNewNoPromo() {
|
||||
return newNoPromo;
|
||||
}
|
||||
|
||||
public void setNewNoPromo(boolean newNoPromo) {
|
||||
this.newNoPromo = newNoPromo;
|
||||
}
|
||||
|
||||
public ArticoloOrdine convertToArticoloOrdine(Ordine ordine) {
|
||||
ArticoloOrdine articolo = new ArticoloOrdine();
|
||||
|
||||
@@ -160,6 +217,12 @@ public class ArticoloGriglia {
|
||||
articolo.setUntMis(this.getUntMis());
|
||||
articolo.setDescrizione(this.getDescrizione());
|
||||
articolo.setDataIns(UtilityDate.getDateInstance());
|
||||
articolo.setGgScadenza(this.getGgScadenza());
|
||||
articolo.setGiacenza(BigDecimal.valueOf(this.getGiacenza()));
|
||||
articolo.setQtaPrevistaVendita(BigDecimal.valueOf(this.getQtaPrevistaVendita()));
|
||||
articolo.setQtaProposta(BigDecimal.valueOf(this.getQtaProposta()));
|
||||
articolo.setNewNoPromo(this.isNewNoPromo());
|
||||
|
||||
articolo.setQtaOrd(0);
|
||||
|
||||
return articolo;
|
||||
|
||||
@@ -3,16 +3,19 @@ package it.integry.integrywmsnative.core.data_store.db.entity;
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.ForeignKey;
|
||||
import androidx.room.Ignore;
|
||||
import androidx.room.Index;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Date;
|
||||
|
||||
@Entity(
|
||||
tableName = "articoli_ordine",
|
||||
indices = {
|
||||
@Index(value = "id_ordine"),
|
||||
@Index(value = {"id_ordine","cod_mart"}, unique = true)
|
||||
@Index(value = {"id_ordine", "cod_mart"}, unique = true)
|
||||
},
|
||||
foreignKeys = {
|
||||
@ForeignKey(
|
||||
@@ -22,11 +25,11 @@ import java.util.Date;
|
||||
onDelete = ForeignKey.CASCADE
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
||||
public class ArticoloOrdine {
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
@ColumnInfo(name = "articolo_ordine_id")
|
||||
private int articoloOrdineId;
|
||||
private Integer articoloOrdineId;
|
||||
|
||||
@ColumnInfo(name = "cod_mart")
|
||||
private String codMart;
|
||||
@@ -64,11 +67,30 @@ public class ArticoloOrdine {
|
||||
@ColumnInfo(name = "data_ins")
|
||||
private Date dataIns;
|
||||
|
||||
public int getArticoloOrdineId() {
|
||||
@ColumnInfo(name = "new_no_promo")
|
||||
private boolean newNoPromo;
|
||||
|
||||
@Ignore
|
||||
private int ggScadenza = 0;
|
||||
|
||||
@Ignore
|
||||
private BigDecimal giacenza = BigDecimal.ZERO;
|
||||
|
||||
@Ignore
|
||||
private BigDecimal qtaPrevistaVendita = BigDecimal.ZERO;
|
||||
|
||||
@Ignore
|
||||
private BigDecimal qtaProposta = BigDecimal.ZERO;
|
||||
|
||||
@Ignore
|
||||
private int bgTint;
|
||||
|
||||
|
||||
public Integer getArticoloOrdineId() {
|
||||
return articoloOrdineId;
|
||||
}
|
||||
|
||||
public void setArticoloOrdineId(int articoloOrdineId) {
|
||||
public void setArticoloOrdineId(Integer articoloOrdineId) {
|
||||
this.articoloOrdineId = articoloOrdineId;
|
||||
}
|
||||
|
||||
@@ -167,4 +189,81 @@ public class ArticoloOrdine {
|
||||
public void setDataIns(Date dataIns) {
|
||||
this.dataIns = dataIns;
|
||||
}
|
||||
|
||||
public int getGgScadenza() {
|
||||
return ggScadenza;
|
||||
}
|
||||
|
||||
public ArticoloOrdine setGgScadenza(int ggScadenza) {
|
||||
this.ggScadenza = ggScadenza;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getGiacenza() {
|
||||
return giacenza;
|
||||
}
|
||||
|
||||
public ArticoloOrdine setGiacenza(BigDecimal giacenza) {
|
||||
this.giacenza = giacenza;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaPrevistaVendita() {
|
||||
return qtaPrevistaVendita;
|
||||
}
|
||||
|
||||
public ArticoloOrdine setQtaPrevistaVendita(BigDecimal qtaPrevistaVendita) {
|
||||
this.qtaPrevistaVendita = qtaPrevistaVendita;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaProposta() {
|
||||
return qtaProposta;
|
||||
}
|
||||
|
||||
public ArticoloOrdine setQtaProposta(BigDecimal qtaProposta) {
|
||||
this.qtaProposta = qtaProposta;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnfPrevistaVendita() {
|
||||
return qtaPrevistaVendita.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaPrevistaVendita.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnfProposta() {
|
||||
return qtaProposta.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaProposta.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnfGiacenza() {
|
||||
return giacenza.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : giacenza.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
||||
}
|
||||
|
||||
public boolean isNewNoPromo() {
|
||||
return newNoPromo;
|
||||
}
|
||||
|
||||
public void setNewNoPromo(boolean newNoPromo) {
|
||||
this.newNoPromo = newNoPromo;
|
||||
}
|
||||
|
||||
public float getCnfDaRic() {
|
||||
return qtaCnf > 0.f ? merceDaRic * qtaCnf : 0;
|
||||
}
|
||||
|
||||
public int checkQtaProposta() {
|
||||
int check = 0;
|
||||
if (!qtaProposta.equals(BigDecimal.ZERO)) {
|
||||
check = BigDecimal.valueOf(qtaOrd).compareTo(qtaProposta);
|
||||
}
|
||||
return check;
|
||||
}
|
||||
|
||||
public int getBgTint() {
|
||||
return bgTint;
|
||||
}
|
||||
|
||||
public ArticoloOrdine setBgTint(int bgTint) {
|
||||
this.bgTint = bgTint;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.room.PrimaryKey;
|
||||
@Index(value = "cod_alis", unique = true)
|
||||
}
|
||||
)
|
||||
|
||||
public class Griglia {
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
@ColumnInfo(name = "griglia_id")
|
||||
|
||||
@@ -0,0 +1,438 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.entity;
|
||||
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.ForeignKey;
|
||||
import androidx.room.Index;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Entity(
|
||||
tableName = "mtb_colr",
|
||||
indices = {
|
||||
@Index(value = {"data_collo", "ser_collo", "num_collo", "gestione","riga"}, unique = true),
|
||||
@Index(value = {"id_collo"})
|
||||
},
|
||||
foreignKeys = {
|
||||
@ForeignKey(
|
||||
entity = SqlMtbColt.class,
|
||||
parentColumns = "id",
|
||||
childColumns = "id_collo",
|
||||
onDelete = ForeignKey.CASCADE
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
public class SqlMtbColr {
|
||||
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
@ColumnInfo(name = "id")
|
||||
private int id;
|
||||
|
||||
@ColumnInfo(name = "id_collo")
|
||||
private int idCollo;
|
||||
|
||||
|
||||
@ColumnInfo(name = "data_collo")
|
||||
private Date dataCollo;
|
||||
|
||||
@ColumnInfo(name = "gestione")
|
||||
private String gestione;
|
||||
|
||||
@ColumnInfo(name = "ser_collo")
|
||||
private String serCollo;
|
||||
|
||||
@ColumnInfo(name = "descrizione")
|
||||
private String descrizione;
|
||||
|
||||
@ColumnInfo(name = "num_collo")
|
||||
private Integer numCollo;
|
||||
|
||||
|
||||
@ColumnInfo(name = "riga")
|
||||
private Integer riga;
|
||||
|
||||
@ColumnInfo(name = "riga_ord")
|
||||
private Integer rigaOrd;
|
||||
|
||||
@ColumnInfo(name = "cod_mart")
|
||||
private String codMart;
|
||||
|
||||
@ColumnInfo(name = "cod_barre")
|
||||
private String codBarre;
|
||||
|
||||
@ColumnInfo(name = "cod_col")
|
||||
private String codCol;
|
||||
|
||||
@ColumnInfo(name = "cod_tagl")
|
||||
private String codTagl;
|
||||
|
||||
@ColumnInfo(name = "partita_mag")
|
||||
private String partitaMag;
|
||||
|
||||
@ColumnInfo(name = "gestione_rif")
|
||||
private String gestioneRif;
|
||||
|
||||
@ColumnInfo(name = "ser_collo_rif")
|
||||
private String serColloRif;
|
||||
|
||||
@ColumnInfo(name = "note")
|
||||
private String note;
|
||||
|
||||
@ColumnInfo(name = "data_ord")
|
||||
private Date dataOrd;
|
||||
|
||||
@ColumnInfo(name = "data_collo_rif")
|
||||
private Date dataColloRif;
|
||||
|
||||
@ColumnInfo(name = "qta_cnf")
|
||||
private Float qtaCnf;
|
||||
|
||||
@ColumnInfo(name = "qta_col")
|
||||
private Float qtaCol;
|
||||
|
||||
@ColumnInfo(name = "num_ord")
|
||||
private Integer numOrd;
|
||||
|
||||
@ColumnInfo(name = "num_etich")
|
||||
private Integer numEtich;
|
||||
|
||||
@ColumnInfo(name = "num_collo_rif")
|
||||
private Integer numColloRif;
|
||||
|
||||
@ColumnInfo(name = "datetime_row")
|
||||
private Date datetimeRow;
|
||||
|
||||
@ColumnInfo(name = "cod_jcom")
|
||||
private String codJcom;
|
||||
|
||||
@ColumnInfo(name = "num_cnf")
|
||||
private Float numCnf;
|
||||
|
||||
@ColumnInfo(name = "causale")
|
||||
private String causale;
|
||||
|
||||
@ColumnInfo(name = "utente")
|
||||
private String utente;
|
||||
|
||||
@ColumnInfo(name = "cod_anag_doc")
|
||||
private String codAnagDoc;
|
||||
|
||||
@ColumnInfo(name = "cod_dtip_doc")
|
||||
private String codDtipDoc;
|
||||
|
||||
@ColumnInfo(name = "data_doc")
|
||||
private Date dataDoc;
|
||||
|
||||
@ColumnInfo(name = "ser_doc")
|
||||
private String serDoc;
|
||||
|
||||
@ColumnInfo(name = "num_doc")
|
||||
private Integer numDoc;
|
||||
|
||||
@ColumnInfo(name = "id_riga_doc")
|
||||
private Integer idRigaDoc;
|
||||
|
||||
@ColumnInfo(name = "unt_mis")
|
||||
private String untMis;
|
||||
@ColumnInfo(name = "data_scad")
|
||||
private Date dataScad;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getIdCollo() {
|
||||
return idCollo;
|
||||
}
|
||||
|
||||
public void setIdCollo(int idCollo) {
|
||||
this.idCollo = idCollo;
|
||||
}
|
||||
|
||||
public Date getDataCollo() {
|
||||
return dataCollo;
|
||||
}
|
||||
|
||||
public void setDataCollo(Date dataCollo) {
|
||||
this.dataCollo = dataCollo;
|
||||
}
|
||||
|
||||
public String getGestione() {
|
||||
return gestione;
|
||||
}
|
||||
|
||||
public void setGestione(String gestione) {
|
||||
this.gestione = gestione;
|
||||
}
|
||||
|
||||
public String getSerCollo() {
|
||||
return serCollo;
|
||||
}
|
||||
|
||||
public void setSerCollo(String serCollo) {
|
||||
this.serCollo = serCollo;
|
||||
}
|
||||
|
||||
public Integer getNumCollo() {
|
||||
return numCollo;
|
||||
}
|
||||
|
||||
public void setNumCollo(Integer numCollo) {
|
||||
this.numCollo = numCollo;
|
||||
}
|
||||
|
||||
public Integer getRiga() {
|
||||
return riga;
|
||||
}
|
||||
|
||||
public void setRiga(Integer riga) {
|
||||
this.riga = riga;
|
||||
}
|
||||
|
||||
public Integer getRigaOrd() {
|
||||
return rigaOrd;
|
||||
}
|
||||
|
||||
public void setRigaOrd(Integer rigaOrd) {
|
||||
this.rigaOrd = rigaOrd;
|
||||
}
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public void setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
}
|
||||
|
||||
public String getCodBarre() {
|
||||
return codBarre;
|
||||
}
|
||||
|
||||
public void setCodBarre(String codBarre) {
|
||||
this.codBarre = codBarre;
|
||||
}
|
||||
|
||||
public String getCodCol() {
|
||||
return codCol;
|
||||
}
|
||||
|
||||
public void setCodCol(String codCol) {
|
||||
this.codCol = codCol;
|
||||
}
|
||||
|
||||
public String getCodTagl() {
|
||||
return codTagl;
|
||||
}
|
||||
|
||||
public void setCodTagl(String codTagl) {
|
||||
this.codTagl = codTagl;
|
||||
}
|
||||
|
||||
public String getPartitaMag() {
|
||||
return partitaMag;
|
||||
}
|
||||
|
||||
public void setPartitaMag(String partitaMag) {
|
||||
this.partitaMag = partitaMag;
|
||||
}
|
||||
|
||||
public String getGestioneRif() {
|
||||
return gestioneRif;
|
||||
}
|
||||
|
||||
public void setGestioneRif(String gestioneRif) {
|
||||
this.gestioneRif = gestioneRif;
|
||||
}
|
||||
|
||||
public String getSerColloRif() {
|
||||
return serColloRif;
|
||||
}
|
||||
|
||||
public void setSerColloRif(String serColloRif) {
|
||||
this.serColloRif = serColloRif;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
public Date getDataOrd() {
|
||||
return dataOrd;
|
||||
}
|
||||
|
||||
public void setDataOrd(Date dataOrd) {
|
||||
this.dataOrd = dataOrd;
|
||||
}
|
||||
|
||||
public Date getDataColloRif() {
|
||||
return dataColloRif;
|
||||
}
|
||||
|
||||
public void setDataColloRif(Date dataColloRif) {
|
||||
this.dataColloRif = dataColloRif;
|
||||
}
|
||||
|
||||
public Float getQtaCnf() {
|
||||
return qtaCnf;
|
||||
}
|
||||
|
||||
public void setQtaCnf(Float qtaCnf) {
|
||||
this.qtaCnf = qtaCnf;
|
||||
}
|
||||
|
||||
public Float getQtaCol() {
|
||||
return qtaCol;
|
||||
}
|
||||
|
||||
public void setQtaCol(Float qtaCol) {
|
||||
this.qtaCol = qtaCol;
|
||||
}
|
||||
|
||||
public Integer getNumOrd() {
|
||||
return numOrd;
|
||||
}
|
||||
|
||||
public void setNumOrd(Integer numOrd) {
|
||||
this.numOrd = numOrd;
|
||||
}
|
||||
|
||||
public Integer getNumEtich() {
|
||||
return numEtich;
|
||||
}
|
||||
|
||||
public void setNumEtich(Integer numEtich) {
|
||||
this.numEtich = numEtich;
|
||||
}
|
||||
|
||||
public Integer getNumColloRif() {
|
||||
return numColloRif;
|
||||
}
|
||||
|
||||
public void setNumColloRif(Integer numColloRif) {
|
||||
this.numColloRif = numColloRif;
|
||||
}
|
||||
|
||||
public Date getDatetimeRow() {
|
||||
return datetimeRow;
|
||||
}
|
||||
|
||||
public void setDatetimeRow(Date datetimeRow) {
|
||||
this.datetimeRow = datetimeRow;
|
||||
}
|
||||
|
||||
public String getCodJcom() {
|
||||
return codJcom;
|
||||
}
|
||||
|
||||
public void setCodJcom(String codJcom) {
|
||||
this.codJcom = codJcom;
|
||||
}
|
||||
|
||||
public Float getNumCnf() {
|
||||
return numCnf;
|
||||
}
|
||||
|
||||
public void setNumCnf(Float numCnf) {
|
||||
this.numCnf = numCnf;
|
||||
}
|
||||
|
||||
public String getCausale() {
|
||||
return causale;
|
||||
}
|
||||
|
||||
public void setCausale(String causale) {
|
||||
this.causale = causale;
|
||||
}
|
||||
|
||||
public String getUtente() {
|
||||
return utente;
|
||||
}
|
||||
|
||||
public void setUtente(String utente) {
|
||||
this.utente = utente;
|
||||
}
|
||||
|
||||
public String getCodAnagDoc() {
|
||||
return codAnagDoc;
|
||||
}
|
||||
|
||||
public void setCodAnagDoc(String codAnagDoc) {
|
||||
this.codAnagDoc = codAnagDoc;
|
||||
}
|
||||
|
||||
public String getCodDtipDoc() {
|
||||
return codDtipDoc;
|
||||
}
|
||||
|
||||
public void setCodDtipDoc(String codDtipDoc) {
|
||||
this.codDtipDoc = codDtipDoc;
|
||||
}
|
||||
|
||||
public Date getDataDoc() {
|
||||
return dataDoc;
|
||||
}
|
||||
|
||||
public void setDataDoc(Date dataDoc) {
|
||||
this.dataDoc = dataDoc;
|
||||
}
|
||||
|
||||
public String getSerDoc() {
|
||||
return serDoc;
|
||||
}
|
||||
|
||||
public void setSerDoc(String serDoc) {
|
||||
this.serDoc = serDoc;
|
||||
}
|
||||
|
||||
public Integer getNumDoc() {
|
||||
return numDoc;
|
||||
}
|
||||
|
||||
public void setNumDoc(Integer numDoc) {
|
||||
this.numDoc = numDoc;
|
||||
}
|
||||
|
||||
public Integer getIdRigaDoc() {
|
||||
return idRigaDoc;
|
||||
}
|
||||
|
||||
public void setIdRigaDoc(Integer idRigaDoc) {
|
||||
this.idRigaDoc = idRigaDoc;
|
||||
}
|
||||
|
||||
public String getUntMis() {
|
||||
return untMis;
|
||||
}
|
||||
|
||||
public void setUntMis(String untMis) {
|
||||
this.untMis = untMis;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public void setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
}
|
||||
|
||||
public Date getDataScad() {
|
||||
return dataScad;
|
||||
}
|
||||
|
||||
public void setDataScad(Date dataScad) {
|
||||
this.dataScad = dataScad;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,341 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.entity;
|
||||
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.Ignore;
|
||||
import androidx.room.Index;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Entity(
|
||||
tableName = "mtb_colt",
|
||||
indices = {
|
||||
@Index(value = {"data_collo", "ser_collo", "num_collo", "gestione"}, unique = true)
|
||||
}
|
||||
)
|
||||
|
||||
public class SqlMtbColt {
|
||||
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
@ColumnInfo(name = "id")
|
||||
private int id;
|
||||
|
||||
@ColumnInfo(name = "username")
|
||||
private String username;
|
||||
|
||||
@ColumnInfo
|
||||
private String gestione;
|
||||
|
||||
@ColumnInfo(name = "data_collo")
|
||||
private Date dataCollo;
|
||||
|
||||
@ColumnInfo(name = "ser_collo")
|
||||
private String serCollo;
|
||||
|
||||
@ColumnInfo(name = "num_collo")
|
||||
private Integer numCollo;
|
||||
|
||||
@ColumnInfo(name = "rif_ord")
|
||||
private String rifOrd;
|
||||
|
||||
@ColumnInfo(name = "cod_anag")
|
||||
private String codAnag;
|
||||
|
||||
@ColumnInfo(name = "cod_vdes")
|
||||
private String codVdes;
|
||||
|
||||
@ColumnInfo(name = "cod_mdep")
|
||||
private String codMdep;
|
||||
|
||||
@ColumnInfo(name = "cod_vlis")
|
||||
private String codVlis;
|
||||
|
||||
@ColumnInfo(name = "cod_dtip")
|
||||
private String codDtip;
|
||||
|
||||
@ColumnInfo(name = "cod_tcol")
|
||||
private String codTcol;
|
||||
|
||||
@ColumnInfo(name = "ser_doc")
|
||||
private String serDoc;
|
||||
|
||||
@ColumnInfo(name = "annotazioni")
|
||||
private String annotazioni;
|
||||
|
||||
@ColumnInfo(name = "posizione")
|
||||
private String posizione;
|
||||
|
||||
@ColumnInfo(name = "cod_dtip_provv")
|
||||
private String codDtipProvv;
|
||||
|
||||
@ColumnInfo(name = "ser_doc_provv")
|
||||
private String serDocProvv;
|
||||
|
||||
@ColumnInfo(name = "cod_jfas")
|
||||
private String codJfas;
|
||||
|
||||
@ColumnInfo(name = "data_ord")
|
||||
private Date dataOrd;
|
||||
|
||||
@ColumnInfo(name = "data_doc")
|
||||
private Date dataDoc;
|
||||
|
||||
@ColumnInfo(name = "data_doc_provv")
|
||||
private Date dataDocProvv;
|
||||
|
||||
@ColumnInfo(name = "cod_mgrp")
|
||||
private String codMgrp;
|
||||
|
||||
@ColumnInfo(name = "data_vers")
|
||||
private Date dataVers;
|
||||
|
||||
@ColumnInfo(name = "segno")
|
||||
private Integer segno;
|
||||
|
||||
@ColumnInfo(name = "num_ord")
|
||||
private Integer numOrd;
|
||||
|
||||
@ColumnInfo(name = "num_doc")
|
||||
private Integer numDoc;
|
||||
|
||||
@ColumnInfo(name = "num_doc_provv")
|
||||
private Integer numDocProvv;
|
||||
|
||||
@Ignore
|
||||
private List<SqlMtbColr> sqlMtbColrs = new ArrayList<>();
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getGestione() {
|
||||
return gestione;
|
||||
}
|
||||
|
||||
public void setGestione(String gestione) {
|
||||
this.gestione = gestione;
|
||||
}
|
||||
|
||||
public Date getDataCollo() {
|
||||
return dataCollo;
|
||||
}
|
||||
|
||||
public void setDataCollo(Date dataCollo) {
|
||||
this.dataCollo = dataCollo;
|
||||
}
|
||||
|
||||
public String getSerCollo() {
|
||||
return serCollo;
|
||||
}
|
||||
|
||||
public void setSerCollo(String serCollo) {
|
||||
this.serCollo = serCollo;
|
||||
}
|
||||
|
||||
public Integer getNumCollo() {
|
||||
return numCollo;
|
||||
}
|
||||
|
||||
public void setNumCollo(Integer numCollo) {
|
||||
this.numCollo = numCollo;
|
||||
}
|
||||
|
||||
public String getRifOrd() {
|
||||
return rifOrd;
|
||||
}
|
||||
|
||||
public void setRifOrd(String rifOrd) {
|
||||
this.rifOrd = rifOrd;
|
||||
}
|
||||
|
||||
public String getCodAnag() {
|
||||
return codAnag;
|
||||
}
|
||||
|
||||
public void setCodAnag(String codAnag) {
|
||||
this.codAnag = codAnag;
|
||||
}
|
||||
|
||||
public String getCodVdes() {
|
||||
return codVdes;
|
||||
}
|
||||
|
||||
public void setCodVdes(String codVdes) {
|
||||
this.codVdes = codVdes;
|
||||
}
|
||||
|
||||
public String getCodMdep() {
|
||||
return codMdep;
|
||||
}
|
||||
|
||||
public void setCodMdep(String codMdep) {
|
||||
this.codMdep = codMdep;
|
||||
}
|
||||
|
||||
public String getCodVlis() {
|
||||
return codVlis;
|
||||
}
|
||||
|
||||
public void setCodVlis(String codVlis) {
|
||||
this.codVlis = codVlis;
|
||||
}
|
||||
|
||||
public String getCodDtip() {
|
||||
return codDtip;
|
||||
}
|
||||
|
||||
public void setCodDtip(String codDtip) {
|
||||
this.codDtip = codDtip;
|
||||
}
|
||||
|
||||
public String getCodTcol() {
|
||||
return codTcol;
|
||||
}
|
||||
|
||||
public void setCodTcol(String codTcol) {
|
||||
this.codTcol = codTcol;
|
||||
}
|
||||
|
||||
public String getSerDoc() {
|
||||
return serDoc;
|
||||
}
|
||||
|
||||
public void setSerDoc(String serDoc) {
|
||||
this.serDoc = serDoc;
|
||||
}
|
||||
|
||||
public String getAnnotazioni() {
|
||||
return annotazioni;
|
||||
}
|
||||
|
||||
public void setAnnotazioni(String annotazioni) {
|
||||
this.annotazioni = annotazioni;
|
||||
}
|
||||
|
||||
public String getPosizione() {
|
||||
return posizione;
|
||||
}
|
||||
|
||||
public void setPosizione(String posizione) {
|
||||
this.posizione = posizione;
|
||||
}
|
||||
|
||||
public String getCodDtipProvv() {
|
||||
return codDtipProvv;
|
||||
}
|
||||
|
||||
public void setCodDtipProvv(String codDtipProvv) {
|
||||
this.codDtipProvv = codDtipProvv;
|
||||
}
|
||||
|
||||
public String getSerDocProvv() {
|
||||
return serDocProvv;
|
||||
}
|
||||
|
||||
public void setSerDocProvv(String serDocProvv) {
|
||||
this.serDocProvv = serDocProvv;
|
||||
}
|
||||
|
||||
public String getCodJfas() {
|
||||
return codJfas;
|
||||
}
|
||||
|
||||
public void setCodJfas(String codJfas) {
|
||||
this.codJfas = codJfas;
|
||||
}
|
||||
|
||||
public Date getDataOrd() {
|
||||
return dataOrd;
|
||||
}
|
||||
|
||||
public void setDataOrd(Date dataOrd) {
|
||||
this.dataOrd = dataOrd;
|
||||
}
|
||||
|
||||
public Date getDataDoc() {
|
||||
return dataDoc;
|
||||
}
|
||||
|
||||
public void setDataDoc(Date dataDoc) {
|
||||
this.dataDoc = dataDoc;
|
||||
}
|
||||
|
||||
public Date getDataDocProvv() {
|
||||
return dataDocProvv;
|
||||
}
|
||||
|
||||
public void setDataDocProvv(Date dataDocProvv) {
|
||||
this.dataDocProvv = dataDocProvv;
|
||||
}
|
||||
|
||||
public Date getDataVers() {
|
||||
return dataVers;
|
||||
}
|
||||
|
||||
public void setDataVers(Date dataVers) {
|
||||
this.dataVers = dataVers;
|
||||
}
|
||||
|
||||
public Integer getSegno() {
|
||||
return segno;
|
||||
}
|
||||
|
||||
public void setSegno(Integer segno) {
|
||||
this.segno = segno;
|
||||
}
|
||||
|
||||
public Integer getNumOrd() {
|
||||
return numOrd;
|
||||
}
|
||||
|
||||
public void setNumOrd(Integer numOrd) {
|
||||
this.numOrd = numOrd;
|
||||
}
|
||||
|
||||
public Integer getNumDoc() {
|
||||
return numDoc;
|
||||
}
|
||||
|
||||
public void setNumDoc(Integer numDoc) {
|
||||
this.numDoc = numDoc;
|
||||
}
|
||||
|
||||
public Integer getNumDocProvv() {
|
||||
return numDocProvv;
|
||||
}
|
||||
|
||||
public void setNumDocProvv(Integer numDocProvv) {
|
||||
this.numDocProvv = numDocProvv;
|
||||
}
|
||||
|
||||
public List<SqlMtbColr> getSqlMtbColrs() {
|
||||
return sqlMtbColrs;
|
||||
}
|
||||
|
||||
public void setSqlMtbColrs(List<SqlMtbColr> sqlMtbColrs) {
|
||||
this.sqlMtbColrs = sqlMtbColrs;
|
||||
}
|
||||
|
||||
public String getCodMgrp() {
|
||||
return codMgrp;
|
||||
}
|
||||
|
||||
public void setCodMgrp(String codMgrp) {
|
||||
this.codMgrp = codMgrp;
|
||||
}
|
||||
}
|
||||
@@ -16,4 +16,6 @@ public interface ArticoloGrigliaRepository {
|
||||
|
||||
void findArticoloByScanAndGriglia(String scan, int idGriglia, RunnableArgs<ArticoloGriglia> onSuccess, RunnableArgs<Exception> onFail);
|
||||
|
||||
void findNewArticoliInGrigla(int idGriglia, RunnableArgs<List<ArticoloGriglia>> onSuccess, RunnableArgs<Exception> onFail);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public interface MtbColrRepository {
|
||||
|
||||
void selectAll(RunnableArgs<List<SqlMtbColr>> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
void insert(SqlMtbColr mtbColr, RunnableArgs<Integer> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
void update(SqlMtbColr mtbColr, RunnableArgs<SqlMtbColr> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
void delete(SqlMtbColr mtbColr, Runnable onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
void getDocumentRows(SqlMtbColt sqlMtbColt, RunnableArgs<List<SqlMtbColr>> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
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.entity.SqlMtbColt;
|
||||
import it.integry.integrywmsnative.core.data_store.db.view_model.OrdineWithGriglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.DocInternoWrapper;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.OrdineWrapper;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public interface MtbColtRepository {
|
||||
|
||||
void selectAll(RunnableArgs<List<SqlMtbColt>> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
void insert(SqlMtbColt mtbColt, RunnableArgs<Integer> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
void update(SqlMtbColt mtbColt, RunnableArgs<SqlMtbColt> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
void delete(SqlMtbColt mtbColt, Runnable onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
void getLocalDocumentsByCodDtip(String codDtip, String codAnag, String codVdes, Date dataDoc, String numDoc, RunnableArgs<List<DocInternoWrapper>> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
void getNextNumCollo(RunnableArgs<Integer> onSuccess, RunnableArgs<Exception> onError);
|
||||
|
||||
}
|
||||
@@ -5,7 +5,14 @@ import com.annimon.stream.Stream;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@@ -24,27 +31,21 @@ public class ArticoliGrigliaDataSource extends Repository implements ArticoloGri
|
||||
this.mArticoloGrigliaDao = articoloGrigliaDao;
|
||||
}
|
||||
|
||||
public void saveArticoliToGriglia(List<ArticoloGriglia> articoli, Griglia griglia, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||
public void saveArticoliToGriglia(List<ArticoloGriglia> updatedArts, 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);
|
||||
}
|
||||
}
|
||||
var tmp = calcItemsToInsertAndUpdate(updatedArts);
|
||||
var toInsert = (List<ArticoloGriglia>) tmp.get("toInsert");
|
||||
var toUpdate = (List<ArticoloGriglia>) tmp.get("toUpdate");
|
||||
var codMarts = (List<String>) tmp.get("codMarts");
|
||||
|
||||
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);
|
||||
@@ -52,6 +53,52 @@ public class ArticoliGrigliaDataSource extends Repository implements ArticoloGri
|
||||
});
|
||||
}
|
||||
|
||||
private HashMap<String, Object> calcItemsToInsertAndUpdate(List<ArticoloGriglia> updatedArts) throws InterruptedException, ExecutionException {
|
||||
var toInsert = new ArrayList<ArticoloGriglia>();
|
||||
var toUpdate = new ArrayList<ArticoloGriglia>();
|
||||
var codMarts = new ArrayList<String>();
|
||||
|
||||
int cores = Runtime.getRuntime().availableProcessors();
|
||||
ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(cores);
|
||||
List<Callable<ArticoloGriglia>> calls = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < updatedArts.size(); i++) {
|
||||
int finalI = i;
|
||||
Callable<ArticoloGriglia> callableTask = () -> {
|
||||
var updatedArt = updatedArts.get(finalI);
|
||||
Integer id = mArticoloGrigliaDao.getIdArticoloByGrigliaAndBarcodeAndCodMart(updatedArt.getIdGriglia(), updatedArt.getBarCode(), updatedArt.getCodMart());
|
||||
|
||||
if (id != null) {
|
||||
updatedArt.setArticoloGrigliaId(id);
|
||||
}
|
||||
|
||||
return updatedArt;
|
||||
};
|
||||
|
||||
calls.add(callableTask);
|
||||
}
|
||||
|
||||
List<Future<ArticoloGriglia>> futures = executor.invokeAll(calls, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
|
||||
|
||||
for (Future<ArticoloGriglia> future : futures) {
|
||||
if (future.isDone()) {
|
||||
codMarts.add(future.get().getCodMart());
|
||||
if (future.get().getArticoloGrigliaId() == null) toInsert.add(future.get());
|
||||
else toUpdate.add(future.get());
|
||||
} else {
|
||||
future.cancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
var tmp = new HashMap<String, Object>();
|
||||
|
||||
tmp.put("toInsert", toInsert);
|
||||
tmp.put("toUpdate", toUpdate);
|
||||
tmp.put("codMarts", codMarts);
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
public void findArticoloByBarcodeAndGriglia(String barcode, int idGriglia, RunnableArgs<ArticoloGriglia> onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
@@ -89,4 +136,14 @@ public class ArticoliGrigliaDataSource extends Repository implements ArticoloGri
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void findNewArticoliInGrigla(int idGriglia, RunnableArgs<List<ArticoloGriglia>> onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
onSuccess.run(mArticoloGrigliaDao.getNewArticoliInGriglia(idGriglia));
|
||||
} catch (Exception e) {
|
||||
onFail.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
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;
|
||||
@@ -11,6 +13,7 @@ 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.data_store.db.wrappers.ArticoloOrdineWrapper;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class ArticoliOrdineDataSource extends Repository implements ArticoliOrdineRepository {
|
||||
@@ -28,13 +31,15 @@ public class ArticoliOrdineDataSource extends Repository implements ArticoliOrdi
|
||||
List<ArticoloOrdine> toUpdate = new ArrayList<>();
|
||||
List<ArticoloOrdine> toInsert = new ArrayList<>();
|
||||
for (ArticoloOrdine art : articoli) {
|
||||
if (art.getArticoloOrdineId() > 0) {
|
||||
if (art.getArticoloOrdineId() != null && art.getArticoloOrdineId() > 0) {
|
||||
toUpdate.add(art);
|
||||
} else {
|
||||
toInsert.add(art);
|
||||
}
|
||||
}
|
||||
mArticoloOrdineDao.insertAll(toInsert);
|
||||
for (ArticoloOrdine newArt : toInsert) {
|
||||
mArticoloOrdineDao.insert(newArt);
|
||||
}
|
||||
mArticoloOrdineDao.updateAll(toUpdate);
|
||||
onSuccess.run();
|
||||
|
||||
@@ -48,7 +53,7 @@ public class ArticoliOrdineDataSource extends Repository implements ArticoliOrdi
|
||||
public void saveArticoloToOrdine(ArticoloOrdine articolo, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||
execute(() -> {
|
||||
try {
|
||||
if (articolo.getArticoloOrdineId() > 0) {
|
||||
if (articolo.getArticoloOrdineId() != null && articolo.getArticoloOrdineId() > 0) {
|
||||
mArticoloOrdineDao.update(articolo);
|
||||
} else {
|
||||
mArticoloOrdineDao.insert(articolo);
|
||||
@@ -93,7 +98,15 @@ public class ArticoliOrdineDataSource extends Repository implements ArticoliOrdi
|
||||
public void findArticoliByOrdine(Ordine ordine, RunnableArgs<List<ArticoloOrdine>> onLoad, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
onLoad.run(mArticoloOrdineDao.findArticoliByOrdine(ordine.getOrdineId()));
|
||||
List<ArticoloOrdineWrapper> list = mArticoloOrdineDao.findArticoliByOrdine(ordine.getOrdineId());
|
||||
onLoad.run(Stream.of(list).map(x -> {
|
||||
ArticoloOrdine art = x.getArticoloOrdine();
|
||||
art.setGgScadenza(x.getGgScadenza());
|
||||
art.setGiacenza(x.getGiacenza());
|
||||
art.setQtaProposta(x.getQtaProposta());
|
||||
art.setQtaPrevistaVendita(x.getQtaPrevistaVendita());
|
||||
return art;
|
||||
}).toList());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
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.MtbColrDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.MtbColrRepository;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class SqlMtbColrDataSource extends Repository implements MtbColrRepository {
|
||||
|
||||
private MtbColrDao mMtbColrDao;
|
||||
|
||||
@Inject
|
||||
public SqlMtbColrDataSource(MtbColrDao mtbColrDao) {
|
||||
this.mMtbColrDao = mtbColrDao;
|
||||
}
|
||||
|
||||
public void selectAll(RunnableArgs<List<SqlMtbColr>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mMtbColrDao.getAll());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
|
||||
public void insert(SqlMtbColr mtbColr, RunnableArgs<Integer> onSuccess, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
Long id = mMtbColrDao.insert(mtbColr);
|
||||
onSuccess.run(id.intValue());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void update(SqlMtbColr mtbColr, RunnableArgs<SqlMtbColr> onSuccess, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
mMtbColrDao.update(mtbColr);
|
||||
onSuccess.run(mtbColr);
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void delete(SqlMtbColr mtbColr, Runnable onSuccess, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
mMtbColrDao.delete(mtbColr);
|
||||
onSuccess.run();
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getDocumentRows(SqlMtbColt document, RunnableArgs<List<SqlMtbColr>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mMtbColrDao.getDocumentRows(document.getId()));
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.repository.implementations;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.MtbColtRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.DocInternoWrapper;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class SqlMtbColtDataSource extends Repository implements MtbColtRepository {
|
||||
|
||||
private MtbColtDao mMtbColtDao;
|
||||
|
||||
@Inject
|
||||
public SqlMtbColtDataSource(MtbColtDao mtbColtDao) {
|
||||
this.mMtbColtDao = mtbColtDao;
|
||||
}
|
||||
|
||||
public void selectAll(RunnableArgs<List<SqlMtbColt>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mMtbColtDao.getAll());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
|
||||
public void insert(SqlMtbColt mtbColt, RunnableArgs<Integer> onSuccess, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
Long id = mMtbColtDao.insert(mtbColt);
|
||||
onSuccess.run(id.intValue());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void update(SqlMtbColt mtbColt, RunnableArgs<SqlMtbColt> onSuccess, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
mMtbColtDao.update(mtbColt);
|
||||
onSuccess.run(mtbColt);
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void delete(SqlMtbColt mtbColt, Runnable onSuccess, RunnableArgs<Exception> onError) {
|
||||
execute(() -> {
|
||||
try {
|
||||
mMtbColtDao.delete(mtbColt);
|
||||
onSuccess.run();
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getLocalDocumentsByCodDtip(String codDtip, String codAnag, String codVdes, Date dataDoc, String numDoc, RunnableArgs<List<DocInternoWrapper>> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mMtbColtDao.getLocalDocumentsByCodDtip(codDtip,codAnag,codVdes,dataDoc,numDoc));
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNextNumCollo(RunnableArgs<Integer> onSuccess, RunnableArgs<Exception> onError) {
|
||||
Runnable query = () -> {
|
||||
try {
|
||||
onSuccess.run(mMtbColtDao.getNextNumCollo());
|
||||
} catch (Exception e) {
|
||||
onError.run(e);
|
||||
}
|
||||
};
|
||||
execute(query);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -4,31 +4,23 @@ import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||
|
||||
public class ArticoloDTO {
|
||||
|
||||
private String codMart;
|
||||
public String codMart;
|
||||
public String descrizione;
|
||||
public String untMis;
|
||||
public float qtaCnf;
|
||||
public String barcode;
|
||||
public float merceDaRic;
|
||||
public float mediaSett;
|
||||
public String flagQtaMultipla;
|
||||
public String flagTracciabilita;
|
||||
public float qtaMinOrdinabile;
|
||||
public boolean newNoPromo;
|
||||
private int ggScadenza;
|
||||
private float giacenza;
|
||||
private float qtaPrevistaVendita;
|
||||
private float qtaProposta;
|
||||
|
||||
|
||||
private String descrizione;
|
||||
|
||||
|
||||
private String untMis;
|
||||
|
||||
|
||||
private float qtaCnf;
|
||||
|
||||
|
||||
private String barcode;
|
||||
|
||||
|
||||
private float merceDaRic;
|
||||
|
||||
|
||||
private float mediaSett;
|
||||
|
||||
|
||||
private String flagQtaMultipla;
|
||||
|
||||
private float qtaMinOrdinabile;
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
@@ -101,8 +93,65 @@ public class ArticoloDTO {
|
||||
this.qtaMinOrdinabile = qtaMinOrdinabile;
|
||||
}
|
||||
|
||||
public String getBarcode() {
|
||||
return barcode;
|
||||
}
|
||||
|
||||
public ArticoloGriglia toArticoloGriglia(){
|
||||
public void setBarcode(String barcode) {
|
||||
this.barcode = barcode;
|
||||
}
|
||||
|
||||
public int getGgScadenza() {
|
||||
return ggScadenza;
|
||||
}
|
||||
|
||||
public void setGgScadenza(int ggScadenza) {
|
||||
this.ggScadenza = ggScadenza;
|
||||
}
|
||||
|
||||
public float getGiacenza() {
|
||||
return giacenza;
|
||||
}
|
||||
|
||||
public void setGiacenza(float giacenza) {
|
||||
this.giacenza = giacenza;
|
||||
}
|
||||
|
||||
public float getQtaPrevistaVendita() {
|
||||
return qtaPrevistaVendita;
|
||||
}
|
||||
|
||||
public void setQtaPrevistaVendita(float qtaPrevistaVendita) {
|
||||
this.qtaPrevistaVendita = qtaPrevistaVendita;
|
||||
}
|
||||
|
||||
public float getQtaProposta() {
|
||||
return qtaProposta;
|
||||
}
|
||||
|
||||
public void setQtaProposta(float qtaProposta) {
|
||||
this.qtaProposta = qtaProposta;
|
||||
}
|
||||
|
||||
public String getFlagTracciabilita() {
|
||||
return flagTracciabilita;
|
||||
}
|
||||
|
||||
public ArticoloDTO setFlagTracciabilita(String flagTracciabilita) {
|
||||
this.flagTracciabilita = flagTracciabilita;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isNewNoPromo() {
|
||||
return newNoPromo;
|
||||
}
|
||||
|
||||
public ArticoloDTO setNewNoPromo(boolean newNoPromo) {
|
||||
this.newNoPromo = newNoPromo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ArticoloGriglia toArticoloGriglia() {
|
||||
ArticoloGriglia result = new ArticoloGriglia();
|
||||
result.setBarCode(this.getBarCode());
|
||||
result.setDescrizione(this.getDescrizione());
|
||||
@@ -113,6 +162,11 @@ public class ArticoloDTO {
|
||||
result.setMediaSett(this.getMediaSett());
|
||||
result.setFlagQtaMultipla(this.getFlagQtaMultipla());
|
||||
result.setQtaMinOrdinabile(this.getQtaMinOrdinabile());
|
||||
result.setGgScadenza(this.ggScadenza);
|
||||
result.setNewNoPromo(this.newNoPromo);
|
||||
result.setGiacenza(this.giacenza);
|
||||
result.setQtaPrevistaVendita(this.qtaPrevistaVendita);
|
||||
result.setQtaProposta(this.qtaProposta);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.wrappers;
|
||||
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Embedded;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||
|
||||
public class ArticoloOrdineWrapper {
|
||||
@Embedded
|
||||
private ArticoloOrdine articoloOrdine;
|
||||
|
||||
@ColumnInfo(name = "gg_scadenza")
|
||||
private int ggScadenza = 0;
|
||||
|
||||
@ColumnInfo(name = "giacenza")
|
||||
private BigDecimal giacenza = BigDecimal.ZERO;
|
||||
|
||||
@ColumnInfo(name = "qta_prevista_vendita")
|
||||
private BigDecimal qtaPrevistaVendita = BigDecimal.ZERO;
|
||||
|
||||
@ColumnInfo(name = "qta_proposta")
|
||||
private BigDecimal qtaProposta = BigDecimal.ZERO;
|
||||
|
||||
public ArticoloOrdine getArticoloOrdine() {
|
||||
return articoloOrdine;
|
||||
}
|
||||
|
||||
public void setArticoloOrdine(ArticoloOrdine articoloOrdine) {
|
||||
this.articoloOrdine = articoloOrdine;
|
||||
}
|
||||
|
||||
public int getGgScadenza() {
|
||||
return ggScadenza;
|
||||
}
|
||||
|
||||
public void setGgScadenza(int ggScadenza) {
|
||||
this.ggScadenza = ggScadenza;
|
||||
}
|
||||
|
||||
public BigDecimal getGiacenza() {
|
||||
return giacenza;
|
||||
}
|
||||
|
||||
public void setGiacenza(BigDecimal giacenza) {
|
||||
this.giacenza = giacenza;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaPrevistaVendita() {
|
||||
return qtaPrevistaVendita;
|
||||
}
|
||||
|
||||
public void setQtaPrevistaVendita(BigDecimal qtaPrevistaVendita) {
|
||||
this.qtaPrevistaVendita = qtaPrevistaVendita;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaProposta() {
|
||||
return qtaProposta;
|
||||
}
|
||||
|
||||
public void setQtaProposta(BigDecimal qtaProposta) {
|
||||
this.qtaProposta = qtaProposta;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package it.integry.integrywmsnative.core.data_store.db.wrappers;
|
||||
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Embedded;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
|
||||
public class DocInternoWrapper {
|
||||
@Embedded
|
||||
private SqlMtbColt document;
|
||||
|
||||
@ColumnInfo(name = "countArticoli")
|
||||
private int countArticoli = 0;
|
||||
|
||||
public SqlMtbColt getDocument() {
|
||||
return document;
|
||||
}
|
||||
|
||||
public void setDocument(SqlMtbColt document) {
|
||||
this.document = document;
|
||||
}
|
||||
|
||||
public int getCountArticoli() {
|
||||
return countArticoli;
|
||||
}
|
||||
|
||||
public void setCountArticoli(int countArticoli) {
|
||||
this.countArticoli = countArticoli;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
package it.integry.integrywmsnative.core.di;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.Bindable;
|
||||
import androidx.databinding.Observable;
|
||||
import androidx.databinding.PropertyChangeRegistry;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class BindableBigDecimal implements Observable {
|
||||
|
||||
BigDecimal mValue;
|
||||
|
||||
private transient PropertyChangeRegistry mCallbacks;
|
||||
|
||||
public BindableBigDecimal() {
|
||||
}
|
||||
|
||||
public BindableBigDecimal(BigDecimal startValue) {
|
||||
this.mValue = startValue;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addOnPropertyChangedCallback(@NonNull OnPropertyChangedCallback callback) {
|
||||
synchronized (this) {
|
||||
if (mCallbacks == null) {
|
||||
mCallbacks = new PropertyChangeRegistry();
|
||||
}
|
||||
}
|
||||
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) {
|
||||
synchronized (this) {
|
||||
if (mCallbacks == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
mCallbacks.remove(callback);
|
||||
}
|
||||
|
||||
public void resetOnPropertyChangedCallback() {
|
||||
synchronized (this) {
|
||||
if (mCallbacks == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
mCallbacks.clear();
|
||||
mCallbacks = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifies listeners that all properties of this instance have changed.
|
||||
*/
|
||||
public void notifyChange() {
|
||||
synchronized (this) {
|
||||
if (mCallbacks == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
mCallbacks.notifyCallbacks(this, 0, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifies listeners that a specific property has changed. The getter for the property
|
||||
* that changes should be marked with {@link Bindable} to generate a field in
|
||||
* <code>BR</code> to be used as <code>fieldId</code>.
|
||||
*
|
||||
* @param fieldId The generated BR id for the Bindable field.
|
||||
*/
|
||||
public void notifyPropertyChanged(int fieldId) {
|
||||
synchronized (this) {
|
||||
if (mCallbacks == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
mCallbacks.notifyCallbacks(this, fieldId, null);
|
||||
}
|
||||
|
||||
public BigDecimal get() {
|
||||
return mValue;
|
||||
}
|
||||
|
||||
public void set(BigDecimal value) {
|
||||
this.set(value, false);
|
||||
}
|
||||
|
||||
public void set(BigDecimal value, boolean forceRefresh) {
|
||||
if ((mValue == null) || !mValue.equals(value) || forceRefresh) {
|
||||
this.mValue = value;
|
||||
notifyChange();
|
||||
}
|
||||
}
|
||||
|
||||
public static void registerListener(BindableBigDecimal bindableBigDecimal, RunnableArgs<BigDecimal> onValueChanged) {
|
||||
bindableBigDecimal.addOnPropertyChangedCallback(new OnPropertyChangedCallback() {
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
if(onValueChanged != null) onValueChanged.run(bindableBigDecimal.get());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void resetListeners(BindableBigDecimal bindableBigDecimal){
|
||||
BigDecimal oldValue = bindableBigDecimal.get();
|
||||
bindableBigDecimal = new BindableBigDecimal();
|
||||
bindableBigDecimal.set(oldValue);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
package it.integry.integrywmsnative.core.di;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.BaseObservable;
|
||||
import androidx.databinding.Bindable;
|
||||
import androidx.databinding.Observable;
|
||||
import androidx.databinding.PropertyChangeRegistry;
|
||||
|
||||
public class BindableBoolean implements Observable {
|
||||
public class BindableBoolean implements Observable {
|
||||
|
||||
boolean mValue;
|
||||
|
||||
@@ -105,5 +104,9 @@ public class BindableBoolean implements Observable {
|
||||
notifyChange();
|
||||
}
|
||||
}
|
||||
|
||||
public void toggle() {
|
||||
set(!get());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package it.integry.integrywmsnative.core.di;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
import androidx.databinding.Observable;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class BindableInteger extends BaseObservable {
|
||||
Integer mValue;
|
||||
@@ -34,4 +37,19 @@ public class BindableInteger extends BaseObservable {
|
||||
return mValue == null;
|
||||
}
|
||||
|
||||
public static void registerListener(BindableInteger bindableInteger, RunnableArgs<Integer> onValueChanged) {
|
||||
bindableInteger.addOnPropertyChangedCallback(new OnPropertyChangedCallback() {
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
if(onValueChanged != null) onValueChanged.run(bindableInteger.get());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void resetListeners(BindableInteger bindableInteger){
|
||||
Integer oldValue = bindableInteger.get();
|
||||
bindableInteger = new BindableInteger();
|
||||
bindableInteger.set(oldValue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,20 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
|
||||
public class BindableString extends BaseObservable {
|
||||
String value;
|
||||
private boolean isHtml = false;
|
||||
|
||||
public BindableString(){};
|
||||
public BindableString(boolean isHtml){
|
||||
this.isHtml = isHtml;
|
||||
};
|
||||
public BindableString(String startingValue ,boolean isHtml){
|
||||
this.isHtml = isHtml;
|
||||
this.set(startingValue);
|
||||
};
|
||||
|
||||
public boolean isHtml() {
|
||||
return isHtml;
|
||||
}
|
||||
|
||||
public String get() {
|
||||
return value != null ? value : "";
|
||||
|
||||
@@ -2,6 +2,8 @@ package it.integry.integrywmsnative.core.di;
|
||||
|
||||
import android.app.DatePickerDialog;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
@@ -37,18 +39,20 @@ import java.util.Locale;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
|
||||
public class Converters {
|
||||
|
||||
|
||||
@BindingConversion
|
||||
public static String convertBindableToString(BindableString bindableString) {
|
||||
if(bindableString != null) return bindableString.get();
|
||||
if (bindableString != null) return bindableString.get();
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -72,7 +76,8 @@ public class Converters {
|
||||
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()));
|
||||
if (bindableInteger != null)
|
||||
bindableInteger.set(Integer.parseInt(s.toString()));
|
||||
}
|
||||
};
|
||||
view.setTag(R.id.bound_observable, new Pair<>(bindableInteger, watcher));
|
||||
@@ -84,6 +89,28 @@ public class Converters {
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindEditText(AppCompatTextView view, final ObservableField<String> observableField) {
|
||||
Pair<ObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != observableField) {
|
||||
if (pair != null) {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
if (observableField != null) observableField.set(s.toString());
|
||||
}
|
||||
};
|
||||
view.setTag(R.id.bound_observable, new Pair<>(observableField, watcher));
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
String newValue = observableField.get();
|
||||
if (!view.getText().toString().equals(newValue)) {
|
||||
view.setText(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindEditText(EditText view, final BindableString bindableString) {
|
||||
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
@@ -101,11 +128,56 @@ public class Converters {
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
String newValue = bindableString.get();
|
||||
boolean isHtml = bindableString.isHtml();
|
||||
if (!view.getText().toString().equals(newValue)) {
|
||||
view.setText(isHtml ? Html.fromHtml(newValue) : newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindEditText(EditText view, final ObservableField<String> observableString) {
|
||||
Pair<ObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != observableString) {
|
||||
if (pair != null) {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
observableString.set(s.toString());
|
||||
}
|
||||
};
|
||||
view.setTag(R.id.bound_observable, new Pair<>(observableString, watcher));
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
String newValue = observableString.get();
|
||||
if (!view.getText().toString().equals(newValue)) {
|
||||
view.setText(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindEditText(AutoCompleteTextView view, final ObservableField<String> observableString) {
|
||||
Pair<ObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != observableString) {
|
||||
if (pair != null) {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
observableString.set(s.toString());
|
||||
}
|
||||
};
|
||||
view.setTag(R.id.bound_observable, new Pair<>(observableString, watcher));
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
String newValue = observableString.get();
|
||||
if (!view.getText().toString().equals(newValue)) {
|
||||
view.setText(newValue, false);
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindTextInputEditText(TextInputEditText view, final BindableString bindableString) {
|
||||
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
@@ -139,7 +211,8 @@ public class Converters {
|
||||
@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());
|
||||
if (!UtilityString.isNullOrEmpty(s.toString()))
|
||||
value = new BigDecimal(s.toString());
|
||||
observableBigDecimal.set(value);
|
||||
}
|
||||
};
|
||||
@@ -149,11 +222,65 @@ public class Converters {
|
||||
BigDecimal newValue = observableBigDecimal.get();
|
||||
BigDecimal viewValue = view.getText().toString().trim().length() > 0 ? new BigDecimal(view.getText().toString()) : null;
|
||||
|
||||
if(!UtilityBigDecimal.equalsTo(viewValue, newValue)) {
|
||||
if (!UtilityBigDecimal.equalsTo(viewValue, newValue)) {
|
||||
view.setText(UtilityNumber.decimalToString(newValue));
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindTextInputEditTextBigDecimal(TextInputEditText view, final BindableBigDecimal bindableBigDecimal) {
|
||||
Pair<BindableBigDecimal, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != bindableBigDecimal) {
|
||||
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());
|
||||
bindableBigDecimal.set(value);
|
||||
}
|
||||
};
|
||||
view.setTag(R.id.bound_observable, new Pair<>(bindableBigDecimal, watcher));
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
BigDecimal newValue = bindableBigDecimal.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 bindTextInputEditTextInteger(TextInputEditText 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) {
|
||||
Integer value = null;
|
||||
if (!UtilityString.isNullOrEmpty(s.toString()))
|
||||
value = Integer.valueOf(s.toString());
|
||||
bindableInteger.set(value);
|
||||
}
|
||||
};
|
||||
view.setTag(R.id.bound_observable, new Pair<>(bindableInteger, watcher));
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
Integer newValue = bindableInteger.get();
|
||||
Integer viewValue = view.getText().toString().trim().length() > 0 ? Integer.valueOf(view.getText().toString()) : Integer.valueOf(0);
|
||||
|
||||
if (!(viewValue.compareTo(newValue) == 0)) {
|
||||
view.setText(newValue.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindTextInputEditTextString(TextInputEditText view, final ObservableField<String> observableString) {
|
||||
Pair<ObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
@@ -173,13 +300,13 @@ public class Converters {
|
||||
String newValue = observableString.get();
|
||||
String viewValue = view.getText().toString();
|
||||
|
||||
if(!viewValue.equalsIgnoreCase(newValue)) {
|
||||
if (!viewValue.equalsIgnoreCase(newValue)) {
|
||||
view.setText(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter({"binding"})
|
||||
public static void bindTextInputEditTextDate(TextInputEditText view, final ObservableField<Date> observableDate) {
|
||||
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
|
||||
public static void bindTextInputEditTextDate(TextInputEditText view, final ObservableField<Date> observableDate, BaseDialogFragment parentFragment, boolean warningOnOldDates) {
|
||||
Pair<ObservableField<Date>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != observableDate) {
|
||||
if (pair != null) {
|
||||
@@ -197,7 +324,7 @@ public class Converters {
|
||||
// Get Current Date
|
||||
Calendar c = UtilityDate.getCalendarInstance();
|
||||
|
||||
if(observableDate.get() != null) {
|
||||
if (observableDate.get() != null) {
|
||||
c.setTime(observableDate.get());
|
||||
}
|
||||
|
||||
@@ -208,16 +335,28 @@ public class Converters {
|
||||
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);
|
||||
|
||||
if (parentFragment != null && warningOnOldDates && resultDate.before(new Date())) {
|
||||
DialogSimpleMessageView
|
||||
.makeWarningDialog(new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
||||
view.setText(UtilityDate.formatDate(resultDate, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
observableDate.set(resultDate);
|
||||
}, () -> {
|
||||
|
||||
})
|
||||
.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
||||
} else {
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -286,8 +425,9 @@ public class Converters {
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
String newValue = bindableString.get();
|
||||
boolean isHtml = bindableString.isHtml();
|
||||
if (!view.getText().toString().equals(newValue)) {
|
||||
view.setText(newValue);
|
||||
view.setText(isHtml ? Html.fromHtml(newValue) : newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +536,7 @@ public class Converters {
|
||||
|
||||
|
||||
@BindingAdapter("visibility")
|
||||
public static void bindView(View view, final ObservableField<Boolean> bindableBoolean) {
|
||||
public static void bindViewVisibility(View view, final ObservableField<Boolean> bindableBoolean) {
|
||||
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||
view.setTag(R.id.bound_observable, bindableBoolean);
|
||||
}
|
||||
@@ -411,6 +551,44 @@ public class Converters {
|
||||
}
|
||||
|
||||
|
||||
@BindingAdapter("visibility")
|
||||
public static void bindViewVisibility(View view, boolean bool) {
|
||||
view.setVisibility(bool ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
|
||||
@BindingAdapter({"reverse_visibility"})
|
||||
public static void bindViewReverseVisibility(View view, final BindableBoolean bindableBoolean) {
|
||||
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||
view.setTag(R.id.bound_observable, bindableBoolean);
|
||||
}
|
||||
bindableBoolean.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
view.setVisibility(bindableBoolean.get() ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
view.setVisibility(bindableBoolean.get() ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
@BindingAdapter("reverse_visibility")
|
||||
public static void bindViewReverseVisibility(View view, final ObservableField<Boolean> bindableBoolean) {
|
||||
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||
view.setTag(R.id.bound_observable, bindableBoolean);
|
||||
}
|
||||
bindableBoolean.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
view.setVisibility(bindableBoolean.get() ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
view.setVisibility(bindableBoolean.get() ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
@BindingAdapter("android:layout_weight")
|
||||
public static void setLayoutWeight(View view, final Float weight) {
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package it.integry.integrywmsnative.core.di.binders;
|
||||
|
||||
public class AutoCompleteTextViewBinders {
|
||||
|
||||
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
|
||||
public class MyExceptionHandler implements
|
||||
java.lang.Thread.UncaughtExceptionHandler {
|
||||
private final Context myContext;
|
||||
private final Class<?> myActivityClass;
|
||||
|
||||
public MyExceptionHandler(Context context, Class<?> c) {
|
||||
|
||||
myContext = context;
|
||||
myActivityClass = c;
|
||||
}
|
||||
|
||||
public void uncaughtException(Thread thread, Throwable exception) {
|
||||
|
||||
StringWriter stackTrace = new StringWriter();
|
||||
exception.printStackTrace(new PrintWriter(stackTrace));
|
||||
System.err.println(stackTrace);// You can use LogCat too
|
||||
// Intent intent = new Intent(myContext, myActivityClass);
|
||||
// String s = stackTrace.toString();
|
||||
// //you can use this String to know what caused the exception and in which Activity
|
||||
// intent.putExtra("uncaughtException",
|
||||
// "Exception is: " + stackTrace.toString());
|
||||
// intent.putExtra("stacktrace", s);
|
||||
// myContext.startActivity(intent);
|
||||
//for restarting the Activity
|
||||
// Process.killProcess(Process.myPid());
|
||||
// System.exit(0);
|
||||
}
|
||||
}
|
||||
@@ -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,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));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@ 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));
|
||||
public NoResultFromBarcodeException(String barcode) {
|
||||
super(UtilityResources.getString(R.string.no_result_from_barcode) + " (" + barcode + ")");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
public class NotValidLicenseException extends Exception {
|
||||
|
||||
public NotValidLicenseException() {
|
||||
super("Licenza 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 TooManyLUFoundInMonoLUPositionException extends Exception {
|
||||
|
||||
public TooManyLUFoundInMonoLUPositionException() {
|
||||
super(UtilityResources.getString(R.string.too_much_lu_found_message_in_mono_lu));
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,78 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.exception.MyExceptionHandler;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
|
||||
public class BaseActivity extends AppCompatActivity {
|
||||
|
||||
@Inject
|
||||
public DialogProgressView mCurrentProgress;
|
||||
|
||||
protected Dialog mCurrentProgress;
|
||||
private boolean progressOpened;
|
||||
|
||||
public BaseActivity() {
|
||||
Thread.setDefaultUncaughtExceptionHandler(new MyExceptionHandler(this, BaseActivity.class));
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@Nullable View parent, @NonNull String name, @NonNull Context context, @NonNull AttributeSet attrs) {
|
||||
var v = super.onCreateView(parent, name, context, attrs);
|
||||
|
||||
MainApplication.appComponent
|
||||
.baseActivityComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
public void onLoadingStarted() {
|
||||
BarcodeManager.disable();
|
||||
this.openProgress();
|
||||
}
|
||||
|
||||
public void onLoadingEnded() {
|
||||
this.closeProgress();
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
public void onError(Exception ex) {
|
||||
this.runOnUiThread(() -> {
|
||||
this.closeProgress();
|
||||
UtilityExceptions.defaultException(this, ex, mCurrentProgress);
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void openProgress() {
|
||||
BarcodeManager.disable();
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
||||
this.progressOpened = true;
|
||||
runOnUiThread(() -> {
|
||||
this.mCurrentProgress.show(getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
BarcodeManager.enable();
|
||||
if (progressOpened) {
|
||||
this.progressOpened = false;
|
||||
runOnUiThread(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,18 +95,4 @@ public class BaseActivity extends AppCompatActivity {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void openProgress() {
|
||||
if (this.mCurrentProgress == null) {
|
||||
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(this);
|
||||
}
|
||||
}
|
||||
|
||||
protected void closeProgress() {
|
||||
if (mCurrentProgress != null) {
|
||||
mCurrentProgress.dismiss();
|
||||
mCurrentProgress = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface BaseActivityComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
BaseActivityComponent create();
|
||||
}
|
||||
|
||||
void inject(BaseActivity baseActivity);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import dagger.Module;
|
||||
|
||||
@Module(subcomponents = BaseActivityComponent.class)
|
||||
public class BaseActivityModule {
|
||||
}
|
||||
@@ -1,17 +1,53 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
|
||||
public class BaseDialogFragment extends DialogFragment {
|
||||
|
||||
@Inject
|
||||
public DialogProgressView mCurrentProgress;
|
||||
private boolean progressOpened;
|
||||
|
||||
private boolean mBarcodeListener = false;
|
||||
|
||||
public BaseDialogFragment() {
|
||||
super();
|
||||
|
||||
|
||||
@Override
|
||||
public void show(FragmentManager manager, String tag) {
|
||||
try {
|
||||
FragmentTransaction ft = manager.beginTransaction();
|
||||
ft.add(this, tag);
|
||||
ft.commit();
|
||||
} catch (IllegalStateException e) {
|
||||
Log.d("ABSDIALOGFRAG", "Exception", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
MainApplication.appComponent
|
||||
.baseDialogFragmentComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
if (BarcodeManager.isEnabled() && BarcodeManager.isKeyboardEmulator()) {
|
||||
getDialog().setOnKeyListener((dialog, keyCode, event) -> {
|
||||
if (mBarcodeListener && (event.getAction() == KeyEvent.ACTION_DOWN || event.getAction() == KeyEvent.ACTION_MULTIPLE) && !isControlKey(event)) {
|
||||
@@ -22,6 +58,42 @@ public class BaseDialogFragment extends DialogFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public void onLoadingStarted() {
|
||||
BarcodeManager.disable();
|
||||
this.openProgress();
|
||||
}
|
||||
|
||||
public void onLoadingEnded() {
|
||||
this.closeProgress();
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
private void openProgress() {
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
||||
this.progressOpened = true;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
if (progressOpened) {
|
||||
this.progressOpened = false;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void onError(Exception ex) {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.onLoadingEnded();
|
||||
UtilityExceptions.defaultException(requireActivity(), ex);
|
||||
});
|
||||
}
|
||||
|
||||
private boolean isControlKey(KeyEvent keyEvent) {
|
||||
int keyCode = keyEvent.getKeyCode();
|
||||
return (
|
||||
@@ -34,4 +106,6 @@ public class BaseDialogFragment extends DialogFragment {
|
||||
public void setBarcodeListener(boolean listen) {
|
||||
this.mBarcodeListener = listen;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface BaseDialogFragmentComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
BaseDialogFragmentComponent create();
|
||||
}
|
||||
|
||||
void inject(BaseDialogFragment baseDialogFragment);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import dagger.Module;
|
||||
|
||||
@Module(subcomponents = BaseDialogFragmentComponent.class)
|
||||
public class BaseDialogFragmentModule {
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
|
||||
public abstract class BaseFragment extends Fragment {
|
||||
|
||||
@Inject
|
||||
public DialogProgressView mCurrentProgress;
|
||||
|
||||
protected ElevatedToolbar mToolbar;
|
||||
|
||||
protected final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
private boolean progressOpened;
|
||||
|
||||
|
||||
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||
mToolbar = toolbar;
|
||||
}
|
||||
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = super.onCreateView(inflater, container, savedInstanceState);
|
||||
|
||||
MainApplication.appComponent
|
||||
.baseFragmentComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
public void onLoadingStarted() {
|
||||
BarcodeManager.disable();
|
||||
this.openProgress();
|
||||
}
|
||||
|
||||
public void onLoadingEnded() {
|
||||
this.closeProgress();
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
private void openProgress() {
|
||||
Log.d("PROGRESS DIALOG", "OPENED");
|
||||
new Thread(() -> {
|
||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
||||
this.progressOpened = true;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
Log.d("PROGRESS DIALOG", "CLOSED");
|
||||
new Thread(() -> {
|
||||
if (progressOpened) {
|
||||
this.progressOpened = false;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
public void onError(Exception ex) {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.closeProgress();
|
||||
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
for (Runnable onPreDestroy : mOnPreDestroyList) {
|
||||
onPreDestroy.run();
|
||||
}
|
||||
}
|
||||
|
||||
protected void popMe() {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
((IPoppableActivity) requireActivity()).pop();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface BaseFragmentComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
BaseFragmentComponent create();
|
||||
}
|
||||
|
||||
void inject(BaseFragment baseFragment);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import dagger.Module;
|
||||
|
||||
@Module(subcomponents = BaseFragmentComponent.class)
|
||||
public class BaseFragmentModule {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import androidx.databinding.Observable;
|
||||
|
||||
public abstract class OnGeneralChangedCallback extends Observable.OnPropertyChangedCallback implements Runnable{
|
||||
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
run();
|
||||
}
|
||||
|
||||
// public abstract void run();
|
||||
|
||||
}
|
||||
@@ -1,28 +1,28 @@
|
||||
package it.integry.integrywmsnative.core.expansion;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableList;
|
||||
import androidx.databinding.ObservableList.OnListChangedCallback;
|
||||
|
||||
public abstract class OnListGeneralChangedCallback extends ObservableList.OnListChangedCallback {
|
||||
public abstract class OnListGeneralChangedCallback<T> extends OnListChangedCallback<ObservableList<T>> {
|
||||
|
||||
|
||||
@Override
|
||||
public void onItemRangeChanged(ObservableList sender, int positionStart, int itemCount) {
|
||||
public void onItemRangeChanged(ObservableList<T> sender, int positionStart, int itemCount) {
|
||||
onChanged(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeInserted(ObservableList sender, int positionStart, int itemCount) {
|
||||
public void onItemRangeInserted(ObservableList<T> sender, int positionStart, int itemCount) {
|
||||
onChanged(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeMoved(ObservableList sender, int fromPosition, int toPosition, int itemCount) {
|
||||
public void onItemRangeMoved(ObservableList<T> sender, int fromPosition, int toPosition, int itemCount) {
|
||||
onChanged(sender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeRemoved(ObservableList sender, int positionStart, int itemCount) {
|
||||
public void onItemRangeRemoved(ObservableList<T> sender, int positionStart, int itemCount) {
|
||||
onChanged(sender);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user