Compare commits
385 Commits
v1.30.04__
...
v1.36.02(3
| Author | SHA1 | Date | |
|---|---|---|---|
| d520e18a30 | |||
| 19122ed637 | |||
| 138500a16f | |||
| 8d93da11b1 | |||
| 9db04fcd02 | |||
| 70b2fbd47b | |||
| 9361d786b4 | |||
| c7db59b70f | |||
| 1008e2aece | |||
| d2703fd495 | |||
| 68f576fb93 | |||
| 69758da7e2 | |||
| b832a593f4 | |||
| c115a6f9f1 | |||
| 35210db708 | |||
| 51728a8103 | |||
| 3961721241 | |||
| 5d5ca02c16 | |||
| be8739c167 | |||
| 8c6b19a064 | |||
| 8751b7c698 | |||
| 42b16975d6 | |||
| 23da1b3e94 | |||
| d003a0322e | |||
| 1e129d1ea9 | |||
| a7dbe55ad2 | |||
| 99f21b19f1 | |||
| eeb06e105e | |||
| 5988667944 | |||
| 77e3d00bef | |||
| 4b475ef1e5 | |||
| 1ec0611e2a | |||
| bd81385cac | |||
| 6dbcdb0475 | |||
| e1fddc8682 | |||
| a046f736b0 | |||
| 696ea31d7d | |||
| 3d9e33464a | |||
| ab74a9cbad | |||
| d56dcc0ed2 | |||
| 7e73aceeb7 | |||
| d63c80d6b7 | |||
| bc9016cf93 | |||
| ff128a1de2 | |||
| fa6ad5a150 | |||
| a8aaf69c57 | |||
| 9c86598f03 | |||
| 031cbc8d0a | |||
| df63fbe4af | |||
| 1372e831f7 | |||
| c31700d9cb | |||
| e6ecebd49a | |||
| dfec2f2bd3 | |||
| 3d425b6b02 | |||
| 318a8f645e | |||
| 8ec314044f | |||
| 2965b18a5f | |||
| 24f6341ff6 | |||
| 589a179a1b | |||
| afc2aef691 | |||
| 19e4a14c95 | |||
| 8237466adf | |||
| 3c1471ee8d | |||
| 099d5fa54d | |||
| 8b04f3e696 | |||
| 04ef20c69a | |||
| d08ec43d29 | |||
| 64e5200912 | |||
| 9e79653769 | |||
| 1fee2c901a | |||
| 3713bb5e49 | |||
| fdeb98b82a | |||
| 3e68dd2d36 | |||
| 1a964d7a97 | |||
| 43df6fc9f5 | |||
| 10f7ecd79b | |||
| 9a60b1ff86 | |||
| 386d51ffd7 | |||
| d3804a4601 | |||
| 04720c1d97 | |||
| 0826aa0445 | |||
| 7ceb51a54b | |||
| e8351ca75b | |||
| f8ceb1fb2d | |||
| 4ef49f3523 | |||
| 21ed15a2ea | |||
| aacec1dfde | |||
| ac7e0443a6 | |||
| 4bbb0d5cbb | |||
| 05c28d62d8 | |||
| bf2ac81ab8 | |||
| 17a78ef044 | |||
| 3c78c2787a | |||
| c7358b536e | |||
| 4f9fe14f7e | |||
| 0934765176 | |||
| b7d3cb18b9 | |||
| 227c67dc23 | |||
| da3c9eae6e | |||
| bf37a1acaf | |||
| 2a8974e9c6 | |||
| c34d7dc777 | |||
| 461a2f705e | |||
| 705dd96a0e | |||
| 10128a1bae | |||
| 54d40ca06e | |||
| e4aa2d19d9 | |||
| 6251c0f1ac | |||
| 3caed63b7f | |||
| 75bc046cf5 | |||
| 97d27b047d | |||
| 44e00f4f98 | |||
| 81b053ee06 | |||
| f1b5a7ec1b | |||
| 2d4211d329 | |||
| c5ba78eeda | |||
| 1faaef7062 | |||
| 762c5fd5b5 | |||
| 9af5970ec7 | |||
| 3a5836ba4b | |||
| 72b0e29ae6 | |||
| e0cc802b62 | |||
| 2d4d9cef4e | |||
| 4a8a21b970 | |||
| 5103a53c11 | |||
| 11c4cba70c | |||
| b1dba20973 | |||
| 920c22083b | |||
| f9230ac341 | |||
| 6344c4b77d | |||
| d4c111dedc | |||
| 65dda1d5c0 | |||
| 4a7406fda1 | |||
| ef17e7a0c7 | |||
| c45850555e | |||
| 303690eed2 | |||
| ae62b26edf | |||
| 2e39754c20 | |||
| 0ae6bbcd96 | |||
| 529455931d | |||
| 46d0510ed8 | |||
| b02e12d76e | |||
| c6bbde2b67 | |||
| cfbb27a67b | |||
| 35283fc11b | |||
| c3d62f88b4 | |||
| fc8469bf07 | |||
| 400f1440db | |||
| ad12e7e65b | |||
| a63e3817b5 | |||
| cbd772bf7e | |||
| e90bd46a42 | |||
| 96bd5d516c | |||
| d9306e13c2 | |||
| fc80baeaee | |||
| c0b49b68f7 | |||
| 73242bc208 | |||
| d4b60a51bd | |||
| 1bc687c79a | |||
| 3a6b0949d4 | |||
| bfc03a4ef9 | |||
| 4dfa796790 | |||
| f0db805c84 | |||
| 0cc742e103 | |||
| d01319c417 | |||
| c0b9496041 | |||
| d4e7832f80 | |||
| cb4f9e68f5 | |||
| ac4a5b1d34 | |||
| 39ebc9d367 | |||
| 7ef0299282 | |||
| 6a998d6605 | |||
| 9eb4b0a621 | |||
| f55080f7ca | |||
| 7fb6109e18 | |||
| f419944699 | |||
| 8de54a504b | |||
| 6f2be2b459 | |||
| fa413aba25 | |||
| ab6eeb91a6 | |||
| 16cbe01157 | |||
| 16cb685bb3 | |||
| 28501c5509 | |||
| 79c4bdad48 | |||
| 68007ebc8e | |||
| c5eec26f8d | |||
| 5c3f8d8717 | |||
| 43aa0f0324 | |||
| 4ab7bf27d7 | |||
| 28f4ac4414 | |||
| 60414c949e | |||
| ff09147968 | |||
| 17e66af99a | |||
| 762ab2719d | |||
| 95f282cd4d | |||
| 029979c463 | |||
| e748161dda | |||
| c2c2a1f984 | |||
| fd13f2f1b4 | |||
| ac6cca1eda | |||
| dc46b36624 | |||
| 42aa655021 | |||
| b89085a9c3 | |||
| 557644f024 | |||
| 258ed9d7ca | |||
| be7d3775cc | |||
| 93ffb191b5 | |||
| 8eb58a4d64 | |||
| 4bc8374ea3 | |||
| f76295c3f6 | |||
| b8486b677f | |||
| 1ad2d9ca9b | |||
| a57eadeab3 | |||
| 1c34b120db | |||
| c6c19ca04b | |||
| 987d667350 | |||
| e704bd1597 | |||
| 0f08d704ac | |||
| b340c2270d | |||
| d3c518b7df | |||
| d8a0594600 | |||
| 7af451724a | |||
| 6cbfb1d81b | |||
| a8c28d7624 | |||
| 3c7792febb | |||
| 4f2dfb82e6 | |||
| cd2c04ad0c | |||
| a1d8e98dfe | |||
| 80fb6737fe | |||
| eadd93dfaf | |||
| 12919613ab | |||
| 7da729205c | |||
| 1bfb734139 | |||
| 09ae517903 | |||
| 0735312c98 | |||
| c31e1ae79a | |||
| 3a9b6a99eb | |||
| 3da92d4630 | |||
| 1d54680db6 | |||
| 384214e084 | |||
| 03dc6e93be | |||
| 2ba4e5d11e | |||
| 78c6e98084 | |||
| 968eed44cb | |||
| ee784b27c6 | |||
| bac849324f | |||
| d823856ac5 | |||
| a49ee430e2 | |||
| d8672e1c22 | |||
| d8c6464830 | |||
| af5d19eb55 | |||
| 8fe0a1fd07 | |||
| b0a7a93f85 | |||
| 10f888b5d5 | |||
| 95807fbfbc | |||
| 4317e083a6 | |||
| 0c54a32e39 | |||
| 62dc62aa99 | |||
| 603fd6ad96 | |||
| 2182a970ac | |||
| 9b823fdca8 | |||
| 904c825472 | |||
| a15d225998 | |||
| 62f8ee61d3 | |||
| e3b8373bb9 | |||
| 0cdbbc096c | |||
| 895c21cee4 | |||
| d541761ac6 | |||
| 1df84ba046 | |||
| 72773deaf1 | |||
| 165568b7e3 | |||
| 3396e295fa | |||
| 0f3f593abd | |||
| df48ea3b32 | |||
| 5e52d83c40 | |||
| 0a71f54814 | |||
| c18828cdda | |||
| 92073fa8bb | |||
| 4131dd7e97 | |||
| 3c4fdea0ec | |||
| 71c73e8cde | |||
| 1a66d4f541 | |||
| d9c33dc5f5 | |||
| 1edcba63aa | |||
| 2566311f96 | |||
| c01cbc1bac | |||
| 9c95b107d5 | |||
| c2e1c048be | |||
| c3bfe70093 | |||
| a6cb8c9c9c | |||
| 5908e076a4 | |||
| 4445e9aff2 | |||
| 9cd0855dcf | |||
| d807ab1f31 | |||
| 69b88b1f6d | |||
| 35f1495ebc | |||
| 7fdc964687 | |||
| 8322303351 | |||
| a7f5f5f505 | |||
| 9b1a00d09c | |||
| 72ebf8f135 | |||
| be58e333b6 | |||
| 42620bd324 | |||
| d4deade046 | |||
| 846393304a | |||
| c3ceae8027 | |||
| 7b4d7db265 | |||
| 1c6cf9a02b | |||
| fd2d4fb47b | |||
| 094f9b68f6 | |||
| be418d3d26 | |||
| 25813a6362 | |||
| 51c5d3a0c7 | |||
| e964220655 | |||
| e493f1796b | |||
| 4882645311 | |||
| 468f1e5b58 | |||
| 79add4f60a | |||
| 975763f400 | |||
| 5eac3f14cc | |||
| bed5b36ade | |||
| 7678ce1a50 | |||
| b3faf38455 | |||
| 283cb59d42 | |||
| 1867ac8742 | |||
| d210e3b3e0 | |||
| 8bb2f48090 | |||
| 15b4d728e6 | |||
| 3018123110 | |||
| b02eaf02a8 | |||
| ad9795a3a3 | |||
| 170411383f | |||
| 9e87130d6c | |||
| 0f6a9cdae2 | |||
| 79ec6430f6 | |||
| 0c46fb09c1 | |||
| 8aad7337bf | |||
| c49197d002 | |||
| 16f611c147 | |||
| 7b623913d8 | |||
| 0a8997f30b | |||
| 702d0a7348 | |||
| f4ae1fbed3 | |||
| 8c0639be9b | |||
| c9ea13a1d2 | |||
| bef5423a06 | |||
| 22b072aff7 | |||
| 50acee47e9 | |||
| ba041d1133 | |||
| 21c26ab3ad | |||
| 5288ad8bb0 | |||
| 0ccff458f7 | |||
| a1c8a52dd2 | |||
| e6e8b22554 | |||
| 9371e5824f | |||
| bda1328dec | |||
| 2030893249 | |||
| fa695ca9a4 | |||
| 8b9c9437ae | |||
| 6f026145ef | |||
| 0744d3713e | |||
| 3275422af8 | |||
| a49aab1fb0 | |||
| e25cc9e825 | |||
| 92e9529cc5 | |||
| 7990f38c37 | |||
| 134dff5aba | |||
| 0c359e5110 | |||
| 7b913e607e | |||
| ee5d30ff80 | |||
| 6c41506a97 | |||
| ab14d6736c | |||
| b6c82c869e | |||
| f3f04e9473 | |||
| ef753f9bcd | |||
| e764ad1148 | |||
| 82cc4f989c | |||
| 650d1670de | |||
| 6ca7943d78 | |||
| 013646eae3 | |||
| 341359d871 | |||
| 545081444c | |||
| b35819c9c9 | |||
| ec44275e41 | |||
| f5d78edfd1 |
17
.idea/deploymentTargetDropDown.xml
generated
17
.idea/deploymentTargetDropDown.xml
generated
@@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="deploymentTargetDropDown">
|
|
||||||
<runningDeviceTargetSelectedWithDropDown>
|
|
||||||
<Target>
|
|
||||||
<type value="RUNNING_DEVICE_TARGET" />
|
|
||||||
<deviceKey>
|
|
||||||
<Key>
|
|
||||||
<type value="SERIAL_NUMBER" />
|
|
||||||
<value value="20119B1E55" />
|
|
||||||
</Key>
|
|
||||||
</deviceKey>
|
|
||||||
</Target>
|
|
||||||
</runningDeviceTargetSelectedWithDropDown>
|
|
||||||
<timeTargetWasSelectedWithDropDown value="2022-12-12T15:40:54.351888Z" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
15
.idea/git_toolbox_prj.xml
generated
Normal file
15
.idea/git_toolbox_prj.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GitToolBoxProjectSettings">
|
||||||
|
<option name="commitMessageIssueKeyValidationOverride">
|
||||||
|
<BoolValueOverride>
|
||||||
|
<option name="enabled" value="true" />
|
||||||
|
</BoolValueOverride>
|
||||||
|
</option>
|
||||||
|
<option name="commitMessageValidationEnabledOverride">
|
||||||
|
<BoolValueOverride>
|
||||||
|
<option name="enabled" value="true" />
|
||||||
|
</BoolValueOverride>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
8
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
8
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="AutoCloseableResource" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="METHOD_MATCHER_CONFIG" value="java.util.Formatter,format,java.io.Writer,append,com.google.common.base.Preconditions,checkNotNull,org.hibernate.Session,close,java.io.PrintWriter,printf,java.io.PrintStream,printf,com.annimon.stream.Stream,of" />
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
||||||
6
.idea/kotlinc.xml
generated
Normal file
6
.idea/kotlinc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="KotlinJpsPluginSettings">
|
||||||
|
<option name="version" value="1.9.0" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
10
.idea/migrations.xml
generated
Normal file
10
.idea/migrations.xml
generated
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectMigrations">
|
||||||
|
<option name="MigrateToGradleLocalJavaHome">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="app_base" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android App">
|
||||||
<module name="WMS.app" />
|
<module name="WMS.app.main" />
|
||||||
<option name="DEPLOY" value="true" />
|
<option name="DEPLOY" value="true" />
|
||||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||||
@@ -8,13 +8,12 @@
|
|||||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||||
<option name="ALL_USERS" value="false" />
|
<option name="ALL_USERS" value="false" />
|
||||||
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
||||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS.dynamic_vgalimenti" />
|
<option name="CLEAR_APP_STORAGE" value="false" />
|
||||||
|
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS.dynamic__base,WMS.dynamic_vgalimenti" />
|
||||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||||
<option name="MODE" value="default_activity" />
|
<option name="MODE" value="default_activity" />
|
||||||
<option name="CLEAR_LOGCAT" value="true" />
|
<option name="CLEAR_LOGCAT" value="false" />
|
||||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
|
||||||
<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="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
|
||||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||||
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
|
||||||
@@ -46,7 +45,7 @@
|
|||||||
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
||||||
<option name="STARTUP_PROFILING_ENABLED" value="false" />
|
<option name="STARTUP_PROFILING_ENABLED" value="false" />
|
||||||
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
|
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
|
||||||
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Callstack Sample" />
|
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Java/Kotlin Method Sample (legacy)" />
|
||||||
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
|
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
|
||||||
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
|
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
|
||||||
</Profilers>
|
</Profilers>
|
||||||
61
.idea/runConfigurations/app_vglimenti.xml
generated
61
.idea/runConfigurations/app_vglimenti.xml
generated
@@ -1,61 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="app_vglimenti" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
|
||||||
<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="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="" />
|
|
||||||
<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="Callstack Sample" />
|
|
||||||
<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>
|
|
||||||
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 322
|
def appVersionCode = 395
|
||||||
def appVersionName = '1.30.04'
|
def appVersionName = '1.36.02'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
@@ -31,12 +31,10 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileSdkVersion 32
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "it.integry.integrywmsnative"
|
applicationId "it.integry.integrywmsnative"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 32
|
targetSdkVersion 33
|
||||||
versionCode appVersionCode
|
versionCode appVersionCode
|
||||||
versionName appVersionName
|
versionName appVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
@@ -62,10 +60,11 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android.buildFeatures.dataBinding true
|
android.buildFeatures.dataBinding true
|
||||||
|
android.buildFeatures.buildConfig true
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
coreLibraryDesugaringEnabled true
|
coreLibraryDesugaringEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,18 +84,15 @@ android {
|
|||||||
options.compilerArgs << "-Xmaxerrs" << "10000"
|
options.compilerArgs << "-Xmaxerrs" << "10000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dynamicFeatures = [":dynamic__base", ":dynamic_vgalimenti"]
|
|
||||||
lint {
|
lint {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
namespace 'it.integry.integrywmsnative'
|
namespace 'it.integry.integrywmsnative'
|
||||||
|
compileSdk 33
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||||
exclude group: 'com.android.support', module: 'support-annotations'
|
exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
@@ -112,32 +108,32 @@ dependencies {
|
|||||||
implementation 'com.google.firebase:firebase-core'
|
implementation 'com.google.firebase:firebase-core'
|
||||||
implementation 'com.google.firebase:firebase-crashlytics'
|
implementation 'com.google.firebase:firebase-crashlytics'
|
||||||
implementation 'com.google.firebase:firebase-perf'
|
implementation 'com.google.firebase:firebase-perf'
|
||||||
implementation 'com.google.android.gms:play-services-basement:18.1.0'
|
implementation 'com.google.android.gms:play-services-basement:18.2.0'
|
||||||
|
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation 'com.google.android.material:material:1.6.1'
|
implementation 'com.google.android.material:material:1.9.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
implementation 'androidx.recyclerview:recyclerview:1.3.1'
|
||||||
|
|
||||||
implementation('androidx.preference:preference-ktx:1.2.0') {
|
implementation('androidx.preference:preference-ktx:1.2.1') {
|
||||||
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel'
|
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel'
|
||||||
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
|
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
|
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||||
implementation 'com.annimon:stream:1.2.2'
|
implementation 'com.annimon:stream:1.2.2'
|
||||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
|
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
|
||||||
// implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
// implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||||
implementation 'org.apache.commons:commons-text:1.9'
|
implementation 'org.apache.commons:commons-text:1.9'
|
||||||
|
|
||||||
//MVVM
|
//MVVM
|
||||||
def dagger2_version = '2.40.1'
|
def dagger2_version = '2.46.1'
|
||||||
api "com.google.dagger:dagger:$dagger2_version"
|
api "com.google.dagger:dagger:$dagger2_version"
|
||||||
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
||||||
api "com.google.dagger:dagger-android:$dagger2_version"
|
api "com.google.dagger:dagger-android:$dagger2_version"
|
||||||
@@ -156,12 +152,11 @@ dependencies {
|
|||||||
implementation 'com.github.pedromassango:doubleClick:3.0'
|
implementation 'com.github.pedromassango:doubleClick:3.0'
|
||||||
|
|
||||||
//SQLite ROOM
|
//SQLite ROOM
|
||||||
def room_version = "2.4.3"
|
def room_version = "2.5.2"
|
||||||
|
|
||||||
implementation "androidx.room:room-runtime:$room_version"
|
implementation "androidx.room:room-runtime:$room_version"
|
||||||
annotationProcessor "androidx.room:room-compiler:$room_version"
|
annotationProcessor "androidx.room:room-compiler:$room_version"
|
||||||
implementation "androidx.room:room-rxjava3:$room_version"
|
implementation "androidx.room:room-rxjava3:$room_version"
|
||||||
androidTestImplementation "androidx.room:room-testing:2.4.3"
|
|
||||||
|
|
||||||
//AppUpdate
|
//AppUpdate
|
||||||
implementation 'com.github.javiersantos:AppUpdater:2.7'
|
implementation 'com.github.javiersantos:AppUpdater:2.7'
|
||||||
@@ -188,9 +183,6 @@ dependencies {
|
|||||||
// RxJava is also required.
|
// RxJava is also required.
|
||||||
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
||||||
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||||
|
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.0'
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"formatVersion": 1,
|
"formatVersion": 1,
|
||||||
"database": {
|
"database": {
|
||||||
"version": 13,
|
"version": 13,
|
||||||
"identityHash": "bc3841159bac7a7731fe39a5fa4f0f4e",
|
"identityHash": "bef89b513f0a4d5ecd9c2111e2e614a4",
|
||||||
"entities": [
|
"entities": [
|
||||||
{
|
{
|
||||||
"tableName": "articoli_griglia",
|
"tableName": "articoli_griglia",
|
||||||
@@ -112,10 +112,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKey": {
|
"primaryKey": {
|
||||||
|
"autoGenerate": true,
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"articolo_griglia_id"
|
"articolo_griglia_id"
|
||||||
],
|
]
|
||||||
"autoGenerate": true
|
|
||||||
},
|
},
|
||||||
"indices": [
|
"indices": [
|
||||||
{
|
{
|
||||||
@@ -172,10 +172,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKey": {
|
"primaryKey": {
|
||||||
|
"autoGenerate": true,
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"griglia_id"
|
"griglia_id"
|
||||||
],
|
]
|
||||||
"autoGenerate": true
|
|
||||||
},
|
},
|
||||||
"indices": [
|
"indices": [
|
||||||
{
|
{
|
||||||
@@ -262,10 +262,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKey": {
|
"primaryKey": {
|
||||||
|
"autoGenerate": true,
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"ordine_id"
|
"ordine_id"
|
||||||
],
|
]
|
||||||
"autoGenerate": true
|
|
||||||
},
|
},
|
||||||
"indices": [],
|
"indices": [],
|
||||||
"foreignKeys": []
|
"foreignKeys": []
|
||||||
@@ -366,10 +366,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKey": {
|
"primaryKey": {
|
||||||
|
"autoGenerate": true,
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"articolo_ordine_id"
|
"articolo_ordine_id"
|
||||||
],
|
]
|
||||||
"autoGenerate": true
|
|
||||||
},
|
},
|
||||||
"indices": [
|
"indices": [
|
||||||
{
|
{
|
||||||
@@ -580,10 +580,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKey": {
|
"primaryKey": {
|
||||||
|
"autoGenerate": true,
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"id"
|
"id"
|
||||||
],
|
]
|
||||||
"autoGenerate": true
|
|
||||||
},
|
},
|
||||||
"indices": [
|
"indices": [
|
||||||
{
|
{
|
||||||
@@ -829,10 +829,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKey": {
|
"primaryKey": {
|
||||||
|
"autoGenerate": true,
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"id"
|
"id"
|
||||||
],
|
]
|
||||||
"autoGenerate": true
|
|
||||||
},
|
},
|
||||||
"indices": [
|
"indices": [
|
||||||
{
|
{
|
||||||
@@ -874,7 +874,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"tableName": "inventari",
|
"tableName": "inventari",
|
||||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `id_inventario` INTEGER, `cod_mdep` TEXT NOT NULL, `data_inventario` INTEGER, `data_reg` INTEGER, `data_ver` INTEGER, `filtro` TEXT, `flag_stato` TEXT, `flag_operazione` TEXT, `cod_anag` TEXT, `cod_dtip` TEXT, `inserito_da` TEXT, `registrato_da` TEXT, `verificato_da` TEXT, `data_ora_inizio` INTEGER, `data_ora_fine` INTEGER, `causale` TEXT, `zona` TEXT, `remote_sync_date` INTEGER)",
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `id_inventario` INTEGER, `cod_mdep` TEXT NOT NULL, `data_inventario` INTEGER, `data_reg` INTEGER, `data_ver` INTEGER, `filtro` TEXT, `flag_stato` TEXT, `flag_operazione` TEXT, `cod_anag` TEXT, `cod_dtip` TEXT, `inserito_da` TEXT, `registrato_da` TEXT, `verificato_da` TEXT, `data_ora_inizio` INTEGER, `data_ora_fine` INTEGER, `causale` TEXT, `zona` TEXT, `new` INTEGER, `remote_sync_date` INTEGER)",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldPath": "id",
|
"fieldPath": "id",
|
||||||
@@ -984,6 +984,12 @@
|
|||||||
"affinity": "TEXT",
|
"affinity": "TEXT",
|
||||||
"notNull": false
|
"notNull": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldPath": "isNew",
|
||||||
|
"columnName": "new",
|
||||||
|
"affinity": "INTEGER",
|
||||||
|
"notNull": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldPath": "remoteSyncDate",
|
"fieldPath": "remoteSyncDate",
|
||||||
"columnName": "remote_sync_date",
|
"columnName": "remote_sync_date",
|
||||||
@@ -992,10 +998,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKey": {
|
"primaryKey": {
|
||||||
|
"autoGenerate": true,
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"_id"
|
"_id"
|
||||||
],
|
]
|
||||||
"autoGenerate": true
|
|
||||||
},
|
},
|
||||||
"indices": [
|
"indices": [
|
||||||
{
|
{
|
||||||
@@ -1107,10 +1113,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKey": {
|
"primaryKey": {
|
||||||
|
"autoGenerate": true,
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"_id"
|
"_id"
|
||||||
],
|
]
|
||||||
"autoGenerate": true
|
|
||||||
},
|
},
|
||||||
"indices": [
|
"indices": [
|
||||||
{
|
{
|
||||||
@@ -1150,7 +1156,7 @@
|
|||||||
"views": [],
|
"views": [],
|
||||||
"setupQueries": [
|
"setupQueries": [
|
||||||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
||||||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'bc3841159bac7a7731fe39a5fa4f0f4e')"
|
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'bef89b513f0a4d5ecd9c2111e2e614a4')"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,24 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
<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.REQUEST_INSTALL_PACKAGES" />
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
||||||
|
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||||
|
android:maxSdkVersion="32" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
|
android:maxSdkVersion="32"
|
||||||
|
tools:ignore="ScopedStorage" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".MainApplication"
|
android:name=".MainApplication"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
@@ -23,28 +33,28 @@
|
|||||||
android:requestLegacyExternalStorage="true">
|
android:requestLegacyExternalStorage="true">
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.spedizione.SpedizioneActivity"
|
android:name=".gest.spedizione.SpedizioneActivity"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity"
|
android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.prod_dettaglio_linea.ProdDettaglioLineaActivity"
|
android:name=".gest.prod_dettaglio_linea.ProdDettaglioLineaActivity"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.contab_doc_interni.edit_form.DocInterniEditFormActivity"
|
android:name=".gest.contab_doc_interni.edit_form.DocInterniEditFormActivity"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.picking_resi.PickingResiActivity"
|
android:name=".gest.picking_resi.PickingResiActivity"
|
||||||
android:screenOrientation="portrait"
|
android:theme="@style/Light"
|
||||||
android:theme="@style/Light" />
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.main.MainActivity"
|
android:name=".gest.main.MainActivity"
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
@@ -56,30 +66,31 @@
|
|||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
|
||||||
android:name=".gest.accettazione_picking.AccettazionePickingActivity"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:theme="@style/Light"
|
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.login.LoginActivity"
|
android:name=".gest.login.LoginActivity"
|
||||||
android:theme="@style/Light" />
|
android:theme="@style/Light"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
|
<activity
|
||||||
|
android:name=".gest.accettazione_ordini_picking.AccettazioneOrdiniPickingActivity"
|
||||||
|
android:theme="@style/Light"
|
||||||
|
android:windowSoftInputMode="adjustNothing"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.lista_bancali.ListaBancaliActivity"
|
android:name=".gest.lista_bancali.ListaBancaliActivity"
|
||||||
android:label="@string/activity_lista_bancali_title"
|
android:label="@string/activity_lista_bancali_title"
|
||||||
android:screenOrientation="portrait"
|
android:theme="@style/Light"
|
||||||
android:theme="@style/Light" />
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.contenuto_bancale.ContenutoBancaleActivity"
|
android:name=".gest.contenuto_bancale.ContenutoBancaleActivity"
|
||||||
android:label="@string/activity_contenuto_bancale_title"
|
android:label="@string/activity_contenuto_bancale_title"
|
||||||
android:screenOrientation="portrait"
|
android:theme="@style/Light"
|
||||||
android:theme="@style/Light" />
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.inventario.picking.PickingInventarioActivity"
|
android:name=".gest.inventario.picking.PickingInventarioActivity"
|
||||||
android:label="@string/activity_picking_inventario_title"
|
android:label="@string/activity_picking_inventario_title"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:windowSoftInputMode="adjustNothing"
|
android:windowSoftInputMode="adjustNothing"
|
||||||
android:theme="@style/Light"/>
|
android:theme="@style/Light"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden"/>
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="firebase_crashlytics_collection_enabled"
|
android:name="firebase_crashlytics_collection_enabled"
|
||||||
@@ -97,6 +108,11 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".gest.accettazione_bolla_picking.AccettazioneBollaPickingActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/Light" />
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name=".core.update.GenericFileProvider"
|
android:name=".core.update.GenericFileProvider"
|
||||||
android:authorities="${applicationId}.core.update.GenericFileProvider"
|
android:authorities="${applicationId}.core.update.GenericFileProvider"
|
||||||
|
|||||||
@@ -3,11 +3,13 @@ package it.integry.integrywmsnative;
|
|||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.context.AppContext;
|
import it.integry.integrywmsnative.core.context.AppContext;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.RoomModule;
|
import it.integry.integrywmsnative.core.data_store.db.RoomModule;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
|
|
||||||
|
|
||||||
public class MainApplication extends Application {
|
public class MainApplication extends Application {
|
||||||
@@ -19,6 +21,8 @@ public class MainApplication extends Application {
|
|||||||
public static MainApplicationModule appModule;
|
public static MainApplicationModule appModule;
|
||||||
public static RoomModule roomModule;
|
public static RoomModule roomModule;
|
||||||
|
|
||||||
|
private Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
AppContext appContext;
|
AppContext appContext;
|
||||||
|
|
||||||
@@ -40,6 +44,9 @@ public class MainApplication extends Application {
|
|||||||
appComponent.inject(this);
|
appComponent.inject(this);
|
||||||
|
|
||||||
res = getResources();
|
res = getResources();
|
||||||
|
|
||||||
|
defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
|
||||||
|
Thread.setDefaultUncaughtExceptionHandler(_unCaughtExceptionHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called by the system when the device configuration changes while your component is running.
|
// Called by the system when the device configuration changes while your component is running.
|
||||||
@@ -61,4 +68,22 @@ public class MainApplication extends Application {
|
|||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// handler listener
|
||||||
|
private final Thread.UncaughtExceptionHandler _unCaughtExceptionHandler =
|
||||||
|
new Thread.UncaughtExceptionHandler() {
|
||||||
|
@Override
|
||||||
|
public void uncaughtException(Thread thread, Throwable ex) {
|
||||||
|
// re-throw critical exception further to the os (important)
|
||||||
|
defaultUncaughtExceptionHandler.uncaughtException(thread, ex);
|
||||||
|
|
||||||
|
try {
|
||||||
|
UtilityLogger.error(new Exception(ex));
|
||||||
|
MainApplication.exit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e("Uncaught error", "Exception Logger failed!", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,14 @@ import it.integry.integrywmsnative.core.expansion.BaseDialogFragmentComponent;
|
|||||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragmentModule;
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragmentModule;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseFragmentComponent;
|
import it.integry.integrywmsnative.core.expansion.BaseFragmentComponent;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseFragmentModule;
|
import it.integry.integrywmsnative.core.expansion.BaseFragmentModule;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneComponent;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.MainAccettazioneBollaElencoComponent;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneModule;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.MainAccettazioneBollaElencoModule;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.AccettazionePickingComponent;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.AccettazioneBollaPickingComponent;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_picking.AccettazionePickingModule;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_picking.AccettazioneBollaPickingModule;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_ordini_elenco.MainAccettazioneOrdiniElencoComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_ordini_elenco.MainAccettazioneOrdiniElencoModule;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_ordini_picking.AccettazioneOrdiniPickingComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_ordini_picking.AccettazioneOrdiniPickingModule;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniComponent;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniComponent;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniModule;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniModule;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoComponent;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoComponent;
|
||||||
@@ -65,19 +69,27 @@ import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceCompo
|
|||||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.ProdRientroMerceOrderDetailComponent;
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.ProdRientroMerceOrderDetailComponent;
|
||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeComponent;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeComponent;
|
||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeModule;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeModule;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale_su_mag_prossimita.ProdVersamentoMaterialeInBufferComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale_su_mag_prossimita.ProdVersamentoMaterialeInBufferModule;
|
||||||
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditComponent;
|
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditComponent;
|
||||||
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditModule;
|
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditModule;
|
||||||
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.dialog.DialogEditArticoloComponent;
|
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.dialog.edit_articolo.DialogEditArticoloComponent;
|
||||||
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.dialog.DialogEditArticoloModule;
|
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.dialog.edit_articolo.DialogEditArticoloModule;
|
||||||
|
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.dialog.selectArtFromList.DialogSelectArtToOrderComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.dialog.selectArtFromList.DialogSelectArtToOrderModule;
|
||||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaComponent;
|
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaComponent;
|
||||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaModule;
|
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaModule;
|
||||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.dialogs.DialogScanGrigliaAcquistoComponent;
|
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.dialogs.DialogScanGrigliaAcquistoComponent;
|
||||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeComponent;
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeComponent;
|
||||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeModule;
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeModule;
|
||||||
|
import it.integry.integrywmsnative.gest.settings.MainSettingsComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.settings.MainSettingsModule;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.SpedizioneComponent;
|
import it.integry.integrywmsnative.gest.spedizione.SpedizioneComponent;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.SpedizioneModule;
|
import it.integry.integrywmsnative.gest.spedizione.SpedizioneModule;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.dialogs.print_sscc_list.DialogPrintOrderSSCCListComponent;
|
import it.integry.integrywmsnative.gest.spedizione.dialogs.print_sscc_list.DialogPrintOrderSSCCListComponent;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.dialogs.print_sscc_list.DialogPrintOrderSSCCListModule;
|
import it.integry.integrywmsnative.gest.spedizione.dialogs.print_sscc_list.DialogPrintOrderSSCCListModule;
|
||||||
|
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.info_situazione_articolo.DialogInfoSituazioneArticoloComponent;
|
||||||
|
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.info_situazione_articolo.DialogInfoSituazioneArticoloModule;
|
||||||
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.DialogRowInfoProdFabbisognoLineeProdComponent;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.prod_fabbisogno_linee_prod.DialogRowInfoProdFabbisognoLineeProdModule;
|
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.UltimeConsegneClienteComponent;
|
||||||
@@ -92,8 +104,14 @@ import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetM
|
|||||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalModule;
|
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteComponent;
|
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteModule;
|
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsComponent;
|
import it.integry.integrywmsnative.view.dialogs.ask_unknown_barcode_notes.DialogAskUnknownBarcodeNotesComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsModule;
|
import it.integry.integrywmsnative.view.dialogs.ask_unknown_barcode_notes.DialogAskUnknownBarcodeNotesModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.bind_product_barcode_with_package.DialogBindProductBarcodeWithPackageComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.bind_product_barcode_with_package.DialogBindProductBarcodeWithPackageModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromMtbAartListComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromMtbAartListModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotComponent;
|
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotModule;
|
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialogComponent;
|
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialogComponent;
|
||||||
@@ -101,6 +119,8 @@ import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdC
|
|||||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdModule;
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUComponent;
|
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUModule;
|
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_to_return.DialogInputQuantityToReturnComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_to_return.DialogInputQuantityToReturnModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Component;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Component;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Module;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Module;
|
||||||
import it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCComponent;
|
import it.integry.integrywmsnative.view.dialogs.printSsccUl.DialogPrintUlSSCCComponent;
|
||||||
@@ -122,7 +142,7 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
|||||||
LoginModule.class,
|
LoginModule.class,
|
||||||
MainActivityModule.class,
|
MainActivityModule.class,
|
||||||
MainFragmentModule.class,
|
MainFragmentModule.class,
|
||||||
MainAccettazioneModule.class,
|
MainAccettazioneOrdiniElencoModule.class,
|
||||||
ListaBancaliModule.class,
|
ListaBancaliModule.class,
|
||||||
ContenutoBancaleModule.class,
|
ContenutoBancaleModule.class,
|
||||||
PVOrdiniAcquistoGrigliaModule.class,
|
PVOrdiniAcquistoGrigliaModule.class,
|
||||||
@@ -131,7 +151,7 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
|||||||
RettificaGiacenzeModule.class,
|
RettificaGiacenzeModule.class,
|
||||||
ElencoInventariModule.class,
|
ElencoInventariModule.class,
|
||||||
SpedizioneModule.class,
|
SpedizioneModule.class,
|
||||||
AccettazionePickingModule.class,
|
AccettazioneOrdiniPickingModule.class,
|
||||||
UltimeConsegneClienteModule.class,
|
UltimeConsegneClienteModule.class,
|
||||||
UltimiArriviFornitoreModule.class,
|
UltimiArriviFornitoreModule.class,
|
||||||
PickingResiModule.class,
|
PickingResiModule.class,
|
||||||
@@ -148,7 +168,7 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
|||||||
ProdOrdineProduzioneElencoModule.class,
|
ProdOrdineProduzioneElencoModule.class,
|
||||||
ProdRecuperoMaterialeModule.class,
|
ProdRecuperoMaterialeModule.class,
|
||||||
ProdVersamentoMaterialeModule.class,
|
ProdVersamentoMaterialeModule.class,
|
||||||
DialogChooseArtsFromListaArtsModule.class,
|
DialogChooseArtsFromMtbColrListModule.class,
|
||||||
DocInterniModule.class,
|
DocInterniModule.class,
|
||||||
DialogSelectDocInfoModule.class,
|
DialogSelectDocInfoModule.class,
|
||||||
DocInterniEditFormModule.class,
|
DocInterniEditFormModule.class,
|
||||||
@@ -166,6 +186,16 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
|||||||
BottomSheetInventarioActionsModule.class,
|
BottomSheetInventarioActionsModule.class,
|
||||||
BottomSheetInventarioRowActionsModule.class,
|
BottomSheetInventarioRowActionsModule.class,
|
||||||
BottomSheetMtbColrEditModalModule.class,
|
BottomSheetMtbColrEditModalModule.class,
|
||||||
|
DialogChooseArtsFromMtbAartListModule.class,
|
||||||
|
MainSettingsModule.class,
|
||||||
|
DialogInfoSituazioneArticoloModule.class,
|
||||||
|
DialogSelectArtToOrderModule.class,
|
||||||
|
MainAccettazioneBollaElencoModule.class,
|
||||||
|
AccettazioneBollaPickingModule.class,
|
||||||
|
DialogBindProductBarcodeWithPackageModule.class,
|
||||||
|
DialogAskUnknownBarcodeNotesModule.class,
|
||||||
|
ProdVersamentoMaterialeInBufferModule.class,
|
||||||
|
DialogInputQuantityToReturnModule.class
|
||||||
})
|
})
|
||||||
public interface MainApplicationComponent {
|
public interface MainApplicationComponent {
|
||||||
|
|
||||||
@@ -183,7 +213,7 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
MainFragmentComponent.Factory mainFragmentComponent();
|
MainFragmentComponent.Factory mainFragmentComponent();
|
||||||
|
|
||||||
MainAccettazioneComponent.Factory mainAccettazioneComponent();
|
MainAccettazioneOrdiniElencoComponent.Factory mainAccettazioneOrdiniComponent();
|
||||||
|
|
||||||
ListaBancaliComponent.Factory listaBancaliComponent();
|
ListaBancaliComponent.Factory listaBancaliComponent();
|
||||||
|
|
||||||
@@ -201,7 +231,7 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
SpedizioneComponent.Factory spedizioneComponent();
|
SpedizioneComponent.Factory spedizioneComponent();
|
||||||
|
|
||||||
AccettazionePickingComponent.Factory accettazionePickingComponent();
|
AccettazioneOrdiniPickingComponent.Factory accettazionePickingComponent();
|
||||||
|
|
||||||
UltimeConsegneClienteComponent.Factory ultimeConsegneClienteComponent();
|
UltimeConsegneClienteComponent.Factory ultimeConsegneClienteComponent();
|
||||||
|
|
||||||
@@ -243,13 +273,11 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
ProdVersamentoMaterialeComponent.Factory prodVersamentoMaterialeComponent();
|
ProdVersamentoMaterialeComponent.Factory prodVersamentoMaterialeComponent();
|
||||||
|
|
||||||
DialogChooseArtsFromListaArtsComponent.Factory dialogChooseArtsFromListaArtsComponent();
|
DialogChooseArtsFromMtbColrListComponent.Factory dialogChooseArtsFromListaArtsComponent();
|
||||||
|
|
||||||
DocInterniComponent.Factory docInterniComponent();
|
DocInterniComponent.Factory docInterniComponent();
|
||||||
|
|
||||||
DialogSelectDocInfoComponent.Factory dialogSelectMgrpDtipPairComponent();
|
DialogSelectDocInfoComponent.Factory dialogSelectDocInfoNewViewComponent();
|
||||||
|
|
||||||
DialogSelectDocRowsComponent.Factory dialogSelectDocRowsComponent();
|
|
||||||
|
|
||||||
DocInterniEditFormComponent.Factory docInterniEditFormComponent();
|
DocInterniEditFormComponent.Factory docInterniEditFormComponent();
|
||||||
|
|
||||||
@@ -279,6 +307,28 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
BottomSheetMtbColrEditModalComponent.Factory bottomSheetMtbColrEditModalComponent();
|
BottomSheetMtbColrEditModalComponent.Factory bottomSheetMtbColrEditModalComponent();
|
||||||
|
|
||||||
|
DialogChooseArtsFromMtbAartListComponent.Factory dialogDialogDialogChooseArtsFromMtbAartListViewComponent();
|
||||||
|
|
||||||
|
MainSettingsComponent.Factory mainSettingsFragmentComponent();
|
||||||
|
|
||||||
|
DialogInfoSituazioneArticoloComponent.Factory dialogInfoSituazioneArticoloComponent();
|
||||||
|
|
||||||
|
DialogSelectDocRowsComponent.Factory dialogSelectDocRowsNewComponent();
|
||||||
|
|
||||||
|
DialogSelectArtToOrderComponent.Factory dialogSelectArtToOrderNewComponent();
|
||||||
|
|
||||||
|
MainAccettazioneBollaElencoComponent.Factory mainAccettazioneBollaElencoComponent();
|
||||||
|
|
||||||
|
AccettazioneBollaPickingComponent.Factory accettazioneBollaPickingComponent();
|
||||||
|
|
||||||
|
DialogBindProductBarcodeWithPackageComponent.Factory dialogBindProductBarcodeWithPackageComponent();
|
||||||
|
|
||||||
|
DialogAskUnknownBarcodeNotesComponent.Factory dialogAskUnknownBarcodeNotesComponent();
|
||||||
|
|
||||||
|
ProdVersamentoMaterialeInBufferComponent.Factory prodVersamentoMaterialeInBufferComponent();
|
||||||
|
|
||||||
|
DialogInputQuantityToReturnComponent.Factory dialogInputQuantityToReturnComponent();
|
||||||
|
|
||||||
void inject(MainApplication mainApplication);
|
void inject(MainApplication mainApplication);
|
||||||
|
|
||||||
void inject(AppContext mainApplication);
|
void inject(AppContext mainApplication);
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package it.integry.integrywmsnative;
|
|||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
|
||||||
|
|
||||||
import androidx.core.os.HandlerCompat;
|
import androidx.core.os.HandlerCompat;
|
||||||
|
|
||||||
@@ -22,13 +21,18 @@ import it.integry.integrywmsnative.core.menu.MenuService;
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.AziendaRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.AziendaRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliAccettazioneRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliLavorazioneRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.CommessaRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.CommessaRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.DepositoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.DepositoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.DocumentiRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.DocumentRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.EntityRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.EntityRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoAutomaticoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoBufferRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||||
@@ -69,7 +73,7 @@ public class MainApplicationModule {
|
|||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
public Handler providesMainThreadHandler() {
|
public Handler providesMainThreadHandler() {
|
||||||
return HandlerCompat.createAsync(Looper.getMainLooper());
|
return HandlerCompat.createAsync(mApplication.getApplicationContext().getMainLooper());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@@ -86,8 +90,8 @@ public class MainApplicationModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
MainContext providesMainContextNew(MenuService menuService, AppDatabase appDatabase) {
|
MainContext providesMainContextNew(MenuService menuService, AppDatabase appDatabase, SystemRESTConsumer systemRESTConsumer) {
|
||||||
return new MainContext(mApplication.getApplicationContext(), menuService, appDatabase);
|
return new MainContext(mApplication.getApplicationContext(), menuService, appDatabase, systemRESTConsumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@@ -178,8 +182,11 @@ public class MainApplicationModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
ColliMagazzinoRESTConsumer provideColliMagazzinoRESTConsumer(SystemRESTConsumer systemRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer, EntityRESTConsumer entityRESTConsumer) {
|
ColliMagazzinoRESTConsumer provideColliMagazzinoRESTConsumer(SystemRESTConsumer systemRESTConsumer,
|
||||||
return new ColliMagazzinoRESTConsumer(systemRESTConsumer, articoloRESTConsumer, entityRESTConsumer);
|
ArticoloRESTConsumer articoloRESTConsumer,
|
||||||
|
EntityRESTConsumer entityRESTConsumer,
|
||||||
|
SettingsManager settingsManager) {
|
||||||
|
return new ColliMagazzinoRESTConsumer(systemRESTConsumer, articoloRESTConsumer, entityRESTConsumer, settingsManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@@ -250,8 +257,38 @@ public class MainApplicationModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
DocumentiRESTConsumer provideDocumentiRESTConsumer() {
|
DocumentRESTConsumer provideDocumentiRESTConsumer() {
|
||||||
return new DocumentiRESTConsumer();
|
return new DocumentRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
ColliAccettazioneRESTConsumer provideColliAccettazioneRESTConsumer() {
|
||||||
|
return new ColliAccettazioneRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
ColliSpedizioneRESTConsumer provideColliSpedizioneRESTConsumer() {
|
||||||
|
return new ColliSpedizioneRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
ColliLavorazioneRESTConsumer provideColliLavorazioneRESTConsumer(SettingsManager settingsManager) {
|
||||||
|
return new ColliLavorazioneRESTConsumer(settingsManager);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
MagazzinoAutomaticoRESTConsumer provideMagazzinoAutomaticoRESTConsumer() {
|
||||||
|
return new MagazzinoAutomaticoRESTConsumer();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
MagazzinoBufferRESTConsumer provideMagazzinoBufferRESTConsumer() {
|
||||||
|
return new MagazzinoBufferRESTConsumer();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,9 @@ public class CommonConst {
|
|||||||
public static class Login {
|
public static class Login {
|
||||||
|
|
||||||
public static class Azienda {
|
public static class Azienda {
|
||||||
|
public static String protocol = "https";
|
||||||
public static String host = "www2.studioml.it";
|
public static String host = "www2.studioml.it";
|
||||||
public static int port = 80;
|
public static int port = 443;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import java.util.List;
|
|||||||
import it.integry.barcode_base_android_library.interfaces.BarcodeReaderInterface;
|
import it.integry.barcode_base_android_library.interfaces.BarcodeReaderInterface;
|
||||||
import it.integry.barcode_base_android_library.model.BarcodeSetting;
|
import it.integry.barcode_base_android_library.model.BarcodeSetting;
|
||||||
import it.integry.honeywellscannerlibrary.HoneyWellBarcodeReader;
|
import it.integry.honeywellscannerlibrary.HoneyWellBarcodeReader;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
|
||||||
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
||||||
import it.integry.keyobardemulatorscannerlibrary.KeyboardEmulatorBarcodeReader;
|
import it.integry.keyobardemulatorscannerlibrary.KeyboardEmulatorBarcodeReader;
|
||||||
import it.integry.pointmobilescannerlibrary.PointMobileBarcodeReader;
|
import it.integry.pointmobilescannerlibrary.PointMobileBarcodeReader;
|
||||||
@@ -136,12 +135,12 @@ public class BarcodeManager {
|
|||||||
|
|
||||||
public static void disable() {
|
public static void disable() {
|
||||||
mEnabled = false;
|
mEnabled = false;
|
||||||
UtilityLogger.trace("Barcode reader disabled");
|
// UtilityLogger.info("Barcode reader disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void enable() {
|
public static void enable() {
|
||||||
mEnabled = true;
|
mEnabled = true;
|
||||||
UtilityLogger.trace("Barcode reader enabled");
|
// UtilityLogger.info("Barcode reader enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isEnabled() {
|
public static boolean isEnabled() {
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityHashMap;
|
|
||||||
|
|
||||||
public class BaseCustomConfiguration implements ICustomConfiguration {
|
|
||||||
|
|
||||||
|
|
||||||
public static class Keys {
|
|
||||||
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<>() {{
|
|
||||||
put(Keys.FLAG_SHOW_COD_FORN_IN_SPEDIZIONE, true);
|
|
||||||
put(Keys.FLAG_SPEDIZIONE_GROUP_BY_GRP_MERC, false);
|
|
||||||
}};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T> T getConfig(int key) {
|
|
||||||
return UtilityHashMap.getValue(configurations, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.util.Pair;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ClassRouter {
|
|
||||||
|
|
||||||
public enum PATH {
|
|
||||||
FILTRO_ORDINI_VENDITA,
|
|
||||||
ORDINI_VENDITA,
|
|
||||||
CUSTOM_CONFIGURATION,
|
|
||||||
BARCODE_CUSTOMIZATION
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Context context;
|
|
||||||
|
|
||||||
private static List<Pair<PATH, Object>> mRouteClasses = new ArrayList<>();
|
|
||||||
|
|
||||||
public static void init() {
|
|
||||||
// ClassRouter.context = context;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean checkIClassExists(PATH path) {
|
|
||||||
boolean methodAlreadyDeclared = false;
|
|
||||||
|
|
||||||
for(int i = 0; i < mRouteClasses.size() && !methodAlreadyDeclared; i++) {
|
|
||||||
if(mRouteClasses.get(i).first == path) methodAlreadyDeclared = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return methodAlreadyDeclared;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private static int getClassIndex(PATH path) {
|
|
||||||
for(int i = 0; i < mRouteClasses.size(); i++) {
|
|
||||||
if(mRouteClasses.get(i).first == path) return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void registerPath(PATH path, Class clazz) {
|
|
||||||
if(checkIClassExists(path)) {
|
|
||||||
//throw new MethodPathAlreadyDeclaredException(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
mRouteClasses.add(new Pair<>(path, clazz.newInstance()));
|
|
||||||
} catch (IllegalAccessException | InstantiationException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void deregisterPath(PATH path) {
|
|
||||||
if(checkIClassExists(path)) {
|
|
||||||
mRouteClasses.remove(getClassIndex(path));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static <T> T getInstance(PATH path) {
|
|
||||||
try {
|
|
||||||
|
|
||||||
if (!checkIClassExists(path)) {
|
|
||||||
// throw new MethodPathNotRegisteredException(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
Object instance = mRouteClasses.get(getClassIndex(path)).second;
|
|
||||||
|
|
||||||
return (T)instance;
|
|
||||||
|
|
||||||
} catch (Exception ex) {
|
|
||||||
// UtilityExceptions.defaultException(null, ex, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,8 @@ package it.integry.integrywmsnative.core.class_router.configs;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneFragment;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.MainAccettazioneBollaElencoFragment;
|
||||||
|
import it.integry.integrywmsnative.gest.accettazione_ordini_elenco.MainAccettazioneOrdiniElencoFragment;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniFragment;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.DocInterniFragment;
|
||||||
import it.integry.integrywmsnative.gest.inventario.ElencoInventariFragment;
|
import it.integry.integrywmsnative.gest.inventario.ElencoInventariFragment;
|
||||||
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.OrdiniUscitaElencoFragment;
|
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.OrdiniUscitaElencoFragment;
|
||||||
@@ -13,8 +14,10 @@ import it.integry.integrywmsnative.gest.prod_linee_produzione.ProdLineeProduzion
|
|||||||
import it.integry.integrywmsnative.gest.prod_recupero_materiale.ProdRecuperoMaterialeFragment;
|
import it.integry.integrywmsnative.gest.prod_recupero_materiale.ProdRecuperoMaterialeFragment;
|
||||||
import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceFragment;
|
import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceFragment;
|
||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeFragment;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeFragment;
|
||||||
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale_su_mag_prossimita.ProdVersamentoMaterialeInBufferFragment;
|
||||||
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaFragment;
|
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaFragment;
|
||||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeFragment;
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeFragment;
|
||||||
|
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.info_situazione_articolo.DialogInfoSituazioneArticoloView;
|
||||||
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteFragment;
|
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteFragment;
|
||||||
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreFragment;
|
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreFragment;
|
||||||
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceFragment;
|
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceFragment;
|
||||||
@@ -34,10 +37,18 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_accettazione)
|
.setID(R.id.nav_accettazione)
|
||||||
.setCodMenu("MG044")
|
.setCodMenu("MG044")
|
||||||
.setTitleText(R.string.accettazione_title_fragment)
|
.setTitleText(R.string.accettazione_ordine_title_fragment)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_accettazione)
|
.setTitleIcon(R.drawable.ic_dashboard_accettazione_ordini)
|
||||||
.setDrawerIcon(R.drawable.ic_black_download)
|
.setDrawerIcon(R.drawable.ic_black_download)
|
||||||
.setFragmentFactory(MainAccettazioneFragment::newInstance))
|
.setFragmentFactory(MainAccettazioneOrdiniElencoFragment::newInstance))
|
||||||
|
|
||||||
|
.addItem(new MenuItem()
|
||||||
|
.setID(R.id.nav_accettazione_bolle)
|
||||||
|
.setCodMenu("MG065")
|
||||||
|
.setTitleText(R.string.accettazione_bolle_title_fragment)
|
||||||
|
.setTitleIcon(R.drawable.ic_dashboard_accettazione_bolle)
|
||||||
|
.setDrawerIcon(R.drawable.ic_black_download)
|
||||||
|
.setFragmentFactory(MainAccettazioneBollaElencoFragment::newInstance))
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_resi_fornitore)
|
.setID(R.id.nav_resi_fornitore)
|
||||||
@@ -57,8 +68,16 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.setCodMenu("MG046")
|
.setCodMenu("MG046")
|
||||||
.setTitleText(R.string.vendita_title_fragment)
|
.setTitleText(R.string.vendita_title_fragment)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_spedizione)
|
.setTitleIcon(R.drawable.ic_dashboard_spedizione)
|
||||||
.setDrawerIcon(R.drawable.ic_black_upload)
|
.setDrawerIcon(R.drawable.ic_upload)
|
||||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1, null)))
|
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1, DialogInfoSituazioneArticoloView.class)))
|
||||||
|
|
||||||
|
.addItem(new MenuItem()
|
||||||
|
.setID(R.id.nav_rettifica_spedizione)
|
||||||
|
.setCodMenu("MG064")
|
||||||
|
.setTitleText(R.string.rettifica_spedizione_fragment_title)
|
||||||
|
.setTitleIcon(R.drawable.ic_dashboard_rettifica_spedizione)
|
||||||
|
.setDrawerIcon(R.drawable.ic_rettifica_spedizione_drawer)
|
||||||
|
.setFragmentFactory(() -> RettificaGiacenzeFragment.newInstance(GestioneEnum.VENDITA)))
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_free_picking)
|
.setID(R.id.nav_free_picking)
|
||||||
@@ -99,9 +118,9 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_free_lav_picking)
|
.setID(R.id.nav_free_lav_picking)
|
||||||
.setCodMenu("MG051")
|
.setCodMenu("MG051")
|
||||||
.setTitleText(it.integry.integrywmsnative.R.string.free_lav_picking)
|
.setTitleText(R.string.free_lav_picking)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_prod_picking_libero)
|
.setTitleIcon(R.drawable.ic_dashboard_prod_picking_libero)
|
||||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_barcode_scanner)
|
.setDrawerIcon(R.drawable.ic_black_barcode_scanner)
|
||||||
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(GestioneEnum.LAVORAZIONE)))
|
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(GestioneEnum.LAVORAZIONE)))
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
@@ -109,7 +128,7 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.setCodMenu("MG052")
|
.setCodMenu("MG052")
|
||||||
.setTitleText(R.string.prod_fabbisogno_linee_prod_title)
|
.setTitleText(R.string.prod_fabbisogno_linee_prod_title)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_prod_versamento_merce)
|
.setTitleIcon(R.drawable.ic_dashboard_prod_versamento_merce)
|
||||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_load_shelf)
|
.setDrawerIcon(R.drawable.ic_black_load_shelf)
|
||||||
.setFragmentFactory(ProdFabbisognoLineeProdFragment::newInstance))
|
.setFragmentFactory(ProdFabbisognoLineeProdFragment::newInstance))
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
@@ -129,20 +148,28 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.setFragmentFactory(ProdRecuperoMaterialeFragment::newInstance))
|
.setFragmentFactory(ProdRecuperoMaterialeFragment::newInstance))
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(it.integry.integrywmsnative.R.id.nav_prod_rientro_merce)
|
.setID(R.id.nav_prod_rientro_merce)
|
||||||
.setCodMenu("MG059")
|
.setCodMenu("MG059")
|
||||||
.setTitleText(it.integry.integrywmsnative.R.string.rientro_merce_fragment_title)
|
.setTitleText(R.string.rientro_merce_fragment_title)
|
||||||
.setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_prod_accettazione_produzione)
|
.setTitleIcon(R.drawable.ic_dashboard_prod_accettazione_produzione)
|
||||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_external)
|
.setDrawerIcon(R.drawable.ic_black_external)
|
||||||
.setFragmentFactory(ProdRientroMerceFragment::newInstance))
|
.setFragmentFactory(ProdRientroMerceFragment::newInstance))
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(it.integry.integrywmsnative.R.id.nav_prod_linee)
|
.setID(R.id.nav_prod_linee)
|
||||||
.setCodMenu("MG061")
|
.setCodMenu("MG061")
|
||||||
.setTitleText(it.integry.integrywmsnative.R.string.nav_prod_linee_title)
|
.setTitleText(R.string.nav_prod_linee_title)
|
||||||
.setTitleIcon(R.drawable.ic_production_line)
|
.setTitleIcon(R.drawable.ic_production_line)
|
||||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_production_line)
|
.setDrawerIcon(R.drawable.ic_production_line)
|
||||||
.setFragmentFactory(ProdLineeProduzioneFragment::newInstance))
|
.setFragmentFactory(ProdLineeProduzioneFragment::newInstance))
|
||||||
|
|
||||||
|
.addItem(new MenuItem()
|
||||||
|
.setID(R.id.nav_prod_versamento_materiale_in_buffer)
|
||||||
|
.setCodMenu("MG066")
|
||||||
|
.setTitleText(R.string.prod_versamento_materiale_in_buffer_title_fragment)
|
||||||
|
.setTitleIcon(R.drawable.ic_dashboard_prod_versamento_materiale)
|
||||||
|
.setDrawerIcon(R.drawable.ic_black_external)
|
||||||
|
.setFragmentFactory(ProdVersamentoMaterialeInBufferFragment::newInstance))
|
||||||
).addGroup(
|
).addGroup(
|
||||||
new MenuGroup()
|
new MenuGroup()
|
||||||
.setGroupText(R.string.internal_handling)
|
.setGroupText(R.string.internal_handling)
|
||||||
@@ -192,7 +219,7 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.setID(it.integry.integrywmsnative.R.id.nav_pv_doc_interni)
|
.setID(it.integry.integrywmsnative.R.id.nav_pv_doc_interni)
|
||||||
.setTitleText(it.integry.integrywmsnative.R.string.doc_interni)
|
.setTitleText(it.integry.integrywmsnative.R.string.doc_interni)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_contab_doc_interni)
|
.setTitleIcon(R.drawable.ic_dashboard_contab_doc_interni)
|
||||||
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_contab_doc_interni)
|
.setDrawerIcon(R.drawable.ic_documents_outline)
|
||||||
.setFragmentFactory(DocInterniFragment::newInstance))
|
.setFragmentFactory(DocInterniFragment::newInstance))
|
||||||
|
|
||||||
// .addItem(new MenuItem()
|
// .addItem(new MenuItem()
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.exceptions;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
|
||||||
|
|
||||||
public class MethodPathNotRegisteredException extends Exception {
|
|
||||||
|
|
||||||
public MethodPathNotRegisteredException(ClassRouter.PATH path) {
|
|
||||||
super(String.format("Path %s is not registered", path.toString()));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.interfaces;
|
|
||||||
|
|
||||||
public interface IBarcodeCustomization {
|
|
||||||
|
|
||||||
boolean shouldForceToEan13(String barcode);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.interfaces;
|
|
||||||
|
|
||||||
public interface ICustomConfiguration {
|
|
||||||
|
|
||||||
<T>T getConfig(int key);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.interfaces;
|
|
||||||
|
|
||||||
public interface IFiltroOrdiniVendita {
|
|
||||||
|
|
||||||
boolean shoudShowCodMdepFilter();
|
|
||||||
|
|
||||||
boolean shoudShowIdViaggioFilter();
|
|
||||||
|
|
||||||
boolean shoudShowAgenteFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.class_router.interfaces;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
|
||||||
|
|
||||||
public interface IOrdiniVendita {
|
|
||||||
|
|
||||||
void distribuisciCollo(MtbColt mtbColt, List<OrdineUscitaInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.core.context;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||||
import com.orhanobut.logger.AndroidLogAdapter;
|
import com.orhanobut.logger.AndroidLogAdapter;
|
||||||
import com.orhanobut.logger.DiskLogAdapter;
|
import com.orhanobut.logger.DiskLogAdapter;
|
||||||
@@ -34,6 +35,8 @@ public class AppContext {
|
|||||||
@Inject
|
@Inject
|
||||||
SettingsManager mSettingsManager;
|
SettingsManager mSettingsManager;
|
||||||
|
|
||||||
|
private File logsFolder;
|
||||||
|
|
||||||
public AppContext(Context context) {
|
public AppContext(Context context) {
|
||||||
this.mApplicationContext = context;
|
this.mApplicationContext = context;
|
||||||
|
|
||||||
@@ -53,6 +56,10 @@ public class AppContext {
|
|||||||
this.initLogger();
|
this.initLogger();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public File getLogFilePath() {
|
||||||
|
return logsFolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void initSettings() {
|
private void initSettings() {
|
||||||
Stash.init(mApplicationContext);
|
Stash.init(mApplicationContext);
|
||||||
@@ -82,10 +89,35 @@ public class AppContext {
|
|||||||
private void initLogger() {
|
private void initLogger() {
|
||||||
Logger.addLogAdapter(new AndroidLogAdapter());
|
Logger.addLogAdapter(new AndroidLogAdapter());
|
||||||
|
|
||||||
File logsFolder = new File(mApplicationContext.getExternalFilesDir(null).getAbsolutePath());
|
logsFolder = new File(mApplicationContext.getExternalFilesDir(null).getAbsolutePath());
|
||||||
int maxBytesSize = 5 * 1024 * 1024;
|
int maxBytesSize = 5 * 1024 * 1024;
|
||||||
Logger.addLogAdapter(new DiskLogAdapter(logsFolder, maxBytesSize));
|
Logger.addLogAdapter(new DiskLogAdapter(logsFolder, maxBytesSize));
|
||||||
|
|
||||||
|
removeOldLogs(logsFolder);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void removeOldLogs(File logsFolder) {
|
||||||
|
var files = logsFolder.listFiles();
|
||||||
|
|
||||||
|
if (files == null || files.length <= 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var logFiles = Stream.of(files)
|
||||||
|
.sortBy(x -> -1 * x.lastModified())
|
||||||
|
.skip(1)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
for (var logFile : logFiles) {
|
||||||
|
boolean isDeleted = logFile.delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
files = logsFolder.listFiles();
|
||||||
|
|
||||||
|
if (files == null || files.length > 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
final boolean isRenamed = files[0].renameTo(new File(files[0].getParentFile().getAbsolutePath() + "/" + "logs_0.csv"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,15 +6,16 @@ import android.text.SpannableString;
|
|||||||
import android.text.Spanned;
|
import android.text.Spanned;
|
||||||
import android.text.SpannedString;
|
import android.text.SpannedString;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import com.google.firebase.installations.FirebaseInstallations;
|
||||||
|
|
||||||
import java.net.ConnectException;
|
import java.net.ConnectException;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
|
||||||
import it.integry.integrywmsnative.core.data_store.db.AppDatabase;
|
import it.integry.integrywmsnative.core.data_store.db.AppDatabase;
|
||||||
import it.integry.integrywmsnative.core.menu.MenuService;
|
import it.integry.integrywmsnative.core.menu.MenuService;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityThread;
|
import it.integry.integrywmsnative.core.utility.UtilityThread;
|
||||||
@@ -25,13 +26,15 @@ public class MainContext {
|
|||||||
private final Context applicationContext;
|
private final Context applicationContext;
|
||||||
private final MenuService menuService;
|
private final MenuService menuService;
|
||||||
private final AppDatabase appDatabase;
|
private final AppDatabase appDatabase;
|
||||||
|
private final SystemRESTConsumer systemRESTConsumer;
|
||||||
|
|
||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
|
|
||||||
public MainContext(Context applicationContext, MenuService menuService, AppDatabase appDatabase) {
|
public MainContext(Context applicationContext, MenuService menuService, AppDatabase appDatabase, SystemRESTConsumer systemRESTConsumer) {
|
||||||
this.applicationContext = applicationContext;
|
this.applicationContext = applicationContext;
|
||||||
this.menuService = menuService;
|
this.menuService = menuService;
|
||||||
this.appDatabase = appDatabase;
|
this.appDatabase = appDatabase;
|
||||||
|
this.systemRESTConsumer = systemRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
@@ -42,11 +45,13 @@ public class MainContext {
|
|||||||
exception.printStackTrace();
|
exception.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initDBData(() -> {
|
|
||||||
this.initMenu(() -> {
|
|
||||||
|
|
||||||
this.initReflections();
|
this.initDeviceId(() -> {
|
||||||
if (mListener != null) mListener.onContextInitialized();
|
this.initDBData(() -> {
|
||||||
|
this.initMenu(() -> {
|
||||||
|
|
||||||
|
if (mListener != null) mListener.onContextInitialized();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -55,6 +60,25 @@ public class MainContext {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void initDeviceId(Runnable onComplete) {
|
||||||
|
if (SettingsManager.i().getUserSession().getDeviceId() != null) {
|
||||||
|
onComplete.run();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FirebaseInstallations.getInstance().getId().addOnCompleteListener(fid -> {
|
||||||
|
SettingsManager.i().getUserSession().setDeviceId(fid.getResult());
|
||||||
|
SettingsManager.update();
|
||||||
|
|
||||||
|
systemRESTConsumer.registerDevice(onComplete, ex -> {
|
||||||
|
if (mListener != null) mListener.onError(new SpannedString(ex.getMessage()));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void logout(Runnable onLoggedOut) {
|
public void logout(Runnable onLoggedOut) {
|
||||||
menuService.invalidateCache();
|
menuService.invalidateCache();
|
||||||
UtilityThread.executeParallel(() -> {
|
UtilityThread.executeParallel(() -> {
|
||||||
@@ -103,30 +127,6 @@ public class MainContext {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initReflections() {
|
|
||||||
ClassRouter.init();
|
|
||||||
|
|
||||||
try {
|
|
||||||
String initMethod = "init";
|
|
||||||
|
|
||||||
Class dynamicContextClass = Class.forName("it.integry.wms.dynamic_customization.DynamicContext");
|
|
||||||
|
|
||||||
Method[] methods = dynamicContextClass.getMethods();
|
|
||||||
for (Method m : methods) {
|
|
||||||
if (initMethod.equals(m.getName())) {
|
|
||||||
// for static methods we can use null as instance of class
|
|
||||||
final Object newInstance = dynamicContextClass.newInstance();
|
|
||||||
|
|
||||||
m.invoke(newInstance, applicationContext);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
// UtilityExceptions.defaultException(mContext, e, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public MainContext setListener(Listener listener) {
|
public MainContext setListener(Listener listener) {
|
||||||
this.mListener = listener;
|
this.mListener = listener;
|
||||||
|
|||||||
@@ -39,6 +39,9 @@ public class ColliDataRecoverService {
|
|||||||
if(isFilePresent(CommonConst.Files.RECOVER_COLLO_FILE)) {
|
if(isFilePresent(CommonConst.Files.RECOVER_COLLO_FILE)) {
|
||||||
loadLocalFile();
|
loadLocalFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(mtbColtsSessions == null)
|
||||||
|
mtbColtsSessions = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean thereIsAnExistantSession() {
|
public boolean thereIsAnExistantSession() {
|
||||||
@@ -47,7 +50,6 @@ public class ColliDataRecoverService {
|
|||||||
|
|
||||||
public List<Integer> getAllSessionIDs() {
|
public List<Integer> getAllSessionIDs() {
|
||||||
if(thereIsAnExistantSession()) {
|
if(thereIsAnExistantSession()) {
|
||||||
|
|
||||||
return Stream.of(mtbColtsSessions)
|
return Stream.of(mtbColtsSessions)
|
||||||
.map(ColliDataRecoverDTO::getId)
|
.map(ColliDataRecoverDTO::getId)
|
||||||
.toList();
|
.toList();
|
||||||
@@ -56,7 +58,6 @@ public class ColliDataRecoverService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ColliDataRecoverDTO getSession(Integer sessionID) {
|
public ColliDataRecoverDTO getSession(Integer sessionID) {
|
||||||
|
|
||||||
if(sessionID == null) return null;
|
if(sessionID == null) return null;
|
||||||
|
|
||||||
return getIfExists(sessionID);
|
return getIfExists(sessionID);
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import it.integry.integrywmsnative.core.data_store.db.dao.InventarioRowDao;
|
|||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||||
@@ -40,8 +41,7 @@ import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
|||||||
InventarioRoomDTO.class,
|
InventarioRoomDTO.class,
|
||||||
InventarioRowRoomDTO.class
|
InventarioRowRoomDTO.class
|
||||||
},
|
},
|
||||||
version = 13,
|
version = 17)
|
||||||
exportSchema = true)
|
|
||||||
@TypeConverters({
|
@TypeConverters({
|
||||||
DateConverter.class,
|
DateConverter.class,
|
||||||
BigDecimalConverter.class,
|
BigDecimalConverter.class,
|
||||||
@@ -66,13 +66,19 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
AppDatabase.class, "integry_wms")
|
AppDatabase.class, "integry_wms")
|
||||||
.addMigrations(MIGRATION_10_11)
|
.addMigrations(MIGRATION_10_11)
|
||||||
.addMigrations(MIGRATION_11_12)
|
.addMigrations(MIGRATION_11_12)
|
||||||
.addMigrations(MIGRATION_12_13);
|
.addMigrations(MIGRATION_12_13)
|
||||||
|
.addMigrations(MIGRATION_13_14)
|
||||||
|
.addMigrations(MIGRATION_14_15)
|
||||||
|
.addMigrations(MIGRATION_15_16)
|
||||||
|
.addMigrations(MIGRATION_16_17);
|
||||||
|
|
||||||
sInstance = builder.build();
|
sInstance = builder.build();
|
||||||
}
|
}
|
||||||
return sInstance;
|
return sInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract RawDao rawDao();
|
||||||
|
|
||||||
public abstract ArticoloGrigliaDao articoloGrigliaDao();
|
public abstract ArticoloGrigliaDao articoloGrigliaDao();
|
||||||
|
|
||||||
public abstract GrigliaDao grigliaDao();
|
public abstract GrigliaDao grigliaDao();
|
||||||
@@ -90,6 +96,7 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
public abstract InventarioRowDao inventarioRowDao();
|
public abstract InventarioRowDao inventarioRowDao();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static final Migration MIGRATION_10_11 = new Migration(10, 11) {
|
static final Migration MIGRATION_10_11 = new Migration(10, 11) {
|
||||||
@Override
|
@Override
|
||||||
public void migrate(SupportSQLiteDatabase database) {
|
public void migrate(SupportSQLiteDatabase database) {
|
||||||
@@ -126,4 +133,53 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||||||
database.execSQL("CREATE INDEX IF NOT EXISTS index_inventario_rows__parent_id ON inventario_rows (parent_id)");
|
database.execSQL("CREATE INDEX IF NOT EXISTS index_inventario_rows__parent_id ON inventario_rows (parent_id)");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static final Migration MIGRATION_13_14 = new Migration(13, 14) {
|
||||||
|
@Override
|
||||||
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
|
database.execSQL("ALTER TABLE inventari"
|
||||||
|
+ " ADD COLUMN new INTEGER");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static final Migration MIGRATION_14_15 = new Migration(14, 15) {
|
||||||
|
@Override
|
||||||
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
|
// rimuovo vincoli "not null" dai campi id_griglia e cod_alis
|
||||||
|
database.execSQL("DROP TABLE IF EXISTS ordini_tmp;");
|
||||||
|
database.execSQL("CREATE TABLE ordini_tmp (ordine_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, data_ins INTEGER, annotazioni TEXT, transmitted INTEGER NOT NULL, transmission_date INTEGER, gestione TEXT, data_ord INTEGER, num_ord INTEGER, cod_mdep TEXT, id_griglia INTEGER, cod_alis TEXT);");
|
||||||
|
database.execSQL("INSERT INTO ordini_tmp(ordine_id,data_ins,annotazioni,transmitted,transmission_date,gestione,data_ord,num_ord,cod_mdep,id_griglia,cod_alis) SELECT ordini.ordine_id,ordini.data_ins,ordini.annotazioni,ordini.transmitted,ordini.transmission_date,ordini.gestione,ordini.data_ord,ordini.num_ord,ordini.cod_mdep,ordini.id_griglia,griglie.cod_alis from ordini left outer join griglie on ordini.id_griglia = griglie.griglia_id;");
|
||||||
|
database.execSQL("DROP TABLE ordini;");
|
||||||
|
database.execSQL("ALTER TABLE ordini_tmp RENAME TO ordini;");
|
||||||
|
// aggiungo campo cod_alis sulle righe dell'ordine
|
||||||
|
database.execSQL("DROP TABLE IF EXISTS art_ord_tmp;");
|
||||||
|
database.execSQL("CREATE TABLE IF NOT EXISTS art_ord_tmp( articolo_ordine_id INTEGER PRIMARY KEY AUTOINCREMENT, cod_mart TEXT, descrizione TEXT, unt_mis TEXT, qta_cnf REAL NOT NULL, bar_code TEXT, merce_da_ric REAL NOT NULL, media_sett REAL NOT NULL, flag_qta_multipla TEXT, qta_min_ordinabile REAL NOT NULL, id_ordine INTEGER NOT NULL, qta_ord REAL NOT NULL, data_ins INTEGER, new_no_promo INTEGER NOT NULL, system_note TEXT, cod_alis TEXT , FOREIGN KEY(id_ordine) REFERENCES ordini(ordine_id) ON UPDATE NO ACTION ON DELETE CASCADE );");
|
||||||
|
database.execSQL("INSERT INTO art_ord_tmp(articolo_ordine_id, cod_mart, descrizione, unt_mis, qta_cnf, bar_code, merce_da_ric, media_sett, flag_qta_multipla, qta_min_ordinabile, id_ordine, qta_ord, data_ins, new_no_promo, system_note, cod_alis) SELECT articolo_ordine_id, cod_mart, descrizione, unt_mis, qta_cnf, bar_code, merce_da_ric, media_sett, flag_qta_multipla, qta_min_ordinabile, id_ordine, qta_ord, data_ins, new_no_promo, system_note, null from articoli_ordine;");
|
||||||
|
database.execSQL("DROP TABLE articoli_ordine;");
|
||||||
|
database.execSQL("ALTER TABLE art_ord_tmp RENAME TO articoli_ordine;");
|
||||||
|
database.execSQL("CREATE INDEX IF NOT EXISTS index_articoli_ordine_id_ordine ON articoli_ordine (id_ordine);");
|
||||||
|
database.execSQL("CREATE UNIQUE INDEX IF NOT EXISTS index_articoli_ordine_id_ordine_cod_mart ON articoli_ordine (id_ordine, cod_mart);");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
static final Migration MIGRATION_15_16 = new Migration(15, 16) {
|
||||||
|
@Override
|
||||||
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
static final Migration MIGRATION_16_17 = new Migration(16, 17) {
|
||||||
|
@Override
|
||||||
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
|
database.execSQL("ALTER TABLE inventario_rows RENAME TO _inventario_rows_old;");
|
||||||
|
database.execSQL("DROP INDEX index_inventario_rows__id;");
|
||||||
|
database.execSQL("DROP INDEX index_inventario_rows_parent_id;");
|
||||||
|
|
||||||
|
database.execSQL("CREATE TABLE inventario_rows (_id INTEGER PRIMARY KEY AUTOINCREMENT, parent_id INTEGER, cod_mart TEXT, partita_mag TEXT, descrizione TEXT, qta REAL NOT NULL DEFAULT 0, num_cnf REAL NOT NULL DEFAULT 0, qta_cnf REAL NOT NULL DEFAULT 0, unt_mis TEXT NOT NULL DEFAULT '0', data_ora_inv INTEGER, scan_cod_barre TEXT, zona TEXT, remote_sync_date INTEGER, FOREIGN KEY(parent_id) REFERENCES inventari(_id) ON UPDATE NO ACTION ON DELETE CASCADE);");
|
||||||
|
|
||||||
|
database.execSQL("INSERT INTO inventario_rows SELECT * FROM _inventario_rows_old;");
|
||||||
|
|
||||||
|
database.execSQL("CREATE INDEX index_inventario_rows__id ON inventario_rows (_id);");
|
||||||
|
database.execSQL("CREATE INDEX index_inventario_rows_parent_id ON inventario_rows (parent_id)");
|
||||||
|
database.execSQL("DROP TABLE _inventario_rows_old;");
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import it.integry.integrywmsnative.core.data_store.db.dao.InventarioRowDao;
|
|||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColrDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.MtbColtDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
import it.integry.integrywmsnative.core.data_store.db.dao.OrdineDao;
|
||||||
|
import it.integry.integrywmsnative.core.data_store.db.dao.RawDao;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGrigliaRepository;
|
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGrigliaRepository;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaRepository;
|
import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaRepository;
|
||||||
@@ -53,7 +54,11 @@ public class RoomModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
@Provides
|
||||||
|
RawDao providesRawDao(AppDatabase appDatabase) {
|
||||||
|
return appDatabase.rawDao();
|
||||||
|
}
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
@Provides
|
@Provides
|
||||||
@@ -104,12 +109,6 @@ public class RoomModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
@Provides
|
@Provides
|
||||||
InventarioRowMapper providesInventarioRowMapper() {
|
InventarioRowMapper providesInventarioRowMapper() {
|
||||||
@@ -123,71 +122,58 @@ public class RoomModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
InventarioLocalDataSource providesInventarioLocalDataSource(ExecutorService executorService, InventarioDao inventarioDao) {
|
InventarioLocalDataSource providesInventarioLocalDataSource(ExecutorService executorService, InventarioDao inventarioDao) {
|
||||||
return new InventarioLocalDataSource(executorService, inventarioDao);
|
return new InventarioLocalDataSource(executorService, inventarioDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
InventarioRowLocalDataSource providesInventarioRowLocalDataSource(ExecutorService executorService, InventarioRowDao inventarioRowDao) {
|
InventarioRowLocalDataSource providesInventarioRowLocalDataSource(ExecutorService executorService, InventarioRowDao inventarioRowDao) {
|
||||||
return new InventarioRowLocalDataSource(executorService, inventarioRowDao);
|
return new InventarioRowLocalDataSource(executorService, inventarioRowDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
ArticoloGrigliaRepository providesArticoloGrigliaRepository(ExecutorService executorService, Handler handler, ArticoloGrigliaDao articoloGrigliaDao) {
|
ArticoloGrigliaRepository providesArticoloGrigliaRepository(ExecutorService executorService, Handler handler, ArticoloGrigliaDao articoloGrigliaDao) {
|
||||||
return new ArticoliGrigliaDataSource(executorService, handler, articoloGrigliaDao);
|
return new ArticoliGrigliaDataSource(executorService, handler, articoloGrigliaDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
ArticoliOrdineRepository providesArticoliOrdineRepository(ExecutorService executorService, Handler handler, ArticoloOrdineDao articoloOrdineDao) {
|
ArticoliOrdineRepository providesArticoliOrdineRepository(ExecutorService executorService, Handler handler, ArticoloOrdineDao articoloOrdineDao) {
|
||||||
return new ArticoliOrdineDataSource(executorService, handler, articoloOrdineDao);
|
return new ArticoliOrdineDataSource(executorService, handler, articoloOrdineDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
GrigliaRepository providesGrigliaRepository(ExecutorService executorService, Handler handler, GrigliaDao grigliaDao) {
|
GrigliaRepository providesGrigliaRepository(ExecutorService executorService, Handler handler, GrigliaDao grigliaDao) {
|
||||||
return new GrigliaDataSource(executorService, handler, grigliaDao);
|
return new GrigliaDataSource(executorService, handler, grigliaDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
OrdineRepository providesOrdineRepository(ExecutorService executorService, Handler handler, OrdineDao ordineDao) {
|
OrdineRepository providesOrdineRepository(ExecutorService executorService, Handler handler, OrdineDao ordineDao) {
|
||||||
return new OrdineDataSource(executorService, handler, ordineDao);
|
return new OrdineDataSource(executorService, handler, ordineDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
MtbColtRepository providesMtbColtRepository(ExecutorService executorService, Handler handler, MtbColtDao mtbColtDao) {
|
MtbColtRepository providesMtbColtRepository(ExecutorService executorService, Handler handler, MtbColtDao mtbColtDao) {
|
||||||
return new SqlMtbColtDataSource(executorService, handler, mtbColtDao);
|
return new SqlMtbColtDataSource(executorService, handler, mtbColtDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
MtbColrDataSource providesMtbColrRepository(ExecutorService executorService, Handler handler, MtbColrDao mtbColrDao) {
|
MtbColrDataSource providesMtbColrRepository(ExecutorService executorService, Handler handler, MtbColrDao mtbColrDao) {
|
||||||
return new SqlMtbColrDataSource(executorService, handler, mtbColrDao);
|
return new SqlMtbColrDataSource(executorService, handler, mtbColrDao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
InventarioRepository providesInventarioRepository(ExecutorService executorService, Handler handler,
|
InventarioRepository providesInventarioRepository(ExecutorService executorService, Handler handler,
|
||||||
InventarioLocalDataSource inventarioLocalDataSource,
|
InventarioLocalDataSource inventarioLocalDataSource,
|
||||||
InventarioRESTConsumer inventarioRESTConsumer,
|
InventarioRESTConsumer inventarioRESTConsumer,
|
||||||
InventarioMapper inventarioMapper) {
|
InventarioMapper inventarioMapper) {
|
||||||
return new InventarioRepository(inventarioLocalDataSource, inventarioRESTConsumer, inventarioMapper, handler);
|
return new InventarioRepository(inventarioLocalDataSource, inventarioRESTConsumer, inventarioMapper, handler, executorService);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
InventarioRowRepository providesInventarioRowRepository(ExecutorService executorService, Handler handler,
|
InventarioRowRepository providesInventarioRowRepository(ExecutorService executorService, Handler handler,
|
||||||
InventarioRowLocalDataSource inventarioRowLocalDataSource,
|
InventarioRowLocalDataSource inventarioRowLocalDataSource,
|
||||||
|
|||||||
@@ -24,6 +24,6 @@ public interface MtbColrDao {
|
|||||||
@Delete
|
@Delete
|
||||||
void delete(SqlMtbColr mtbColr);
|
void delete(SqlMtbColr mtbColr);
|
||||||
|
|
||||||
@Query("SELECT * from mtb_colr where id_collo = :idDocument")
|
@Query("SELECT * FROM mtb_colr WHERE id_collo = :idDocument ORDER BY id DESC")
|
||||||
List<SqlMtbColr> getDocumentRows(long idDocument);
|
List<SqlMtbColr> getDocumentRows(long idDocument);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.core.data_store.db.dao;
|
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
import androidx.room.Dao;
|
import androidx.room.Dao;
|
||||||
import androidx.room.Delete;
|
import androidx.room.Delete;
|
||||||
import androidx.room.Insert;
|
import androidx.room.Insert;
|
||||||
@@ -33,7 +34,7 @@ public interface MtbColtDao {
|
|||||||
" AND ( mtb_colt.data_doc = :dataDoc OR (mtb_colt.data_doc is null and :dataDoc 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 ( 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")
|
" and cod_dtip is null group by mtb_colt.id")
|
||||||
List<DocInternoWrapper> getLocalDocumentsByCodDtip(String codDtip, String codAnag, String codVdes, Date dataDoc, String numDoc);
|
LiveData<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")
|
@Query("SELECT ifnull(MAX(num_collo),0) +1 as num_collo from mtb_colt")
|
||||||
Integer getNextNumCollo();
|
Integer getNextNumCollo();
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public interface OrdineDao {
|
|||||||
@Query("SELECT ordini.* from ordini where ordini.transmitted = 1")
|
@Query("SELECT ordini.* from ordini where ordini.transmitted = 1")
|
||||||
List<Ordine> getAllTrasnmitted();
|
List<Ordine> getAllTrasnmitted();
|
||||||
|
|
||||||
@Query("SELECT ordini.*, count(articolo_ordine_id) as countArticoli from ordini left join articoli_ordine ON ordini.ordine_id = articoli_ordine.id_ordine where ordini.transmitted = 0 and ordini.cod_alis = :codAlis group by ordini.ordine_id")
|
@Query("SELECT ordini.*, count(articolo_ordine_id) as countArticoli from ordini left join articoli_ordine ON ordini.ordine_id = articoli_ordine.id_ordine where ordini.transmitted = 0 and ((:codAlis is null and ordini.cod_alis is null) OR (ordini.cod_alis = :codAlis)) group by ordini.ordine_id")
|
||||||
List<OrdineWrapper> getAllOpenOrdersByGriglia(String codAlis);
|
List<OrdineWrapper> getAllOpenOrdersByGriglia(String codAlis);
|
||||||
|
|
||||||
@Insert
|
@Insert
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.dao;
|
||||||
|
|
||||||
|
import androidx.room.Dao;
|
||||||
|
import androidx.room.RawQuery;
|
||||||
|
import androidx.sqlite.db.SupportSQLiteQuery;
|
||||||
|
|
||||||
|
@Dao
|
||||||
|
public interface RawDao {
|
||||||
|
|
||||||
|
@RawQuery
|
||||||
|
int vacuumDb(SupportSQLiteQuery supportSQLiteQuery);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -73,6 +73,9 @@ public class ArticoloOrdine {
|
|||||||
@ColumnInfo(name = "system_note")
|
@ColumnInfo(name = "system_note")
|
||||||
private String systemNote;
|
private String systemNote;
|
||||||
|
|
||||||
|
@ColumnInfo(name = "cod_alis")
|
||||||
|
private String codAlis;
|
||||||
|
|
||||||
@Ignore
|
@Ignore
|
||||||
private int ggScadenza = 0;
|
private int ggScadenza = 0;
|
||||||
|
|
||||||
@@ -85,9 +88,15 @@ public class ArticoloOrdine {
|
|||||||
@Ignore
|
@Ignore
|
||||||
private BigDecimal qtaProposta = BigDecimal.ZERO;
|
private BigDecimal qtaProposta = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
@Ignore
|
||||||
|
private BigDecimal ctMaxOrd = BigDecimal.ZERO;
|
||||||
|
|
||||||
@Ignore
|
@Ignore
|
||||||
private int bgTint;
|
private int bgTint;
|
||||||
|
|
||||||
|
@Ignore
|
||||||
|
private boolean invalid = false;
|
||||||
|
|
||||||
|
|
||||||
public Integer getArticoloOrdineId() {
|
public Integer getArticoloOrdineId() {
|
||||||
return articoloOrdineId;
|
return articoloOrdineId;
|
||||||
@@ -230,15 +239,15 @@ public class ArticoloOrdine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getQtaCnfPrevistaVendita() {
|
public BigDecimal getQtaCnfPrevistaVendita() {
|
||||||
return qtaPrevistaVendita.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaPrevistaVendita.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
return qtaPrevistaVendita == null || qtaPrevistaVendita.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaPrevistaVendita.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getQtaCnfProposta() {
|
public BigDecimal getQtaCnfProposta() {
|
||||||
return qtaProposta.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaProposta.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
return qtaProposta == null || qtaProposta.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : qtaProposta.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getQtaCnfGiacenza() {
|
public BigDecimal getQtaCnfGiacenza() {
|
||||||
return giacenza.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : giacenza.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
return giacenza == null || giacenza.equals(BigDecimal.ZERO) ? BigDecimal.ZERO : giacenza.divide(BigDecimal.valueOf(qtaCnf), 0, RoundingMode.CEILING);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNewNoPromo() {
|
public boolean isNewNoPromo() {
|
||||||
@@ -250,12 +259,12 @@ public class ArticoloOrdine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public float getCnfDaRic() {
|
public float getCnfDaRic() {
|
||||||
return qtaCnf > 0.f ? merceDaRic * qtaCnf : 0;
|
return qtaCnf > 0.f ? merceDaRic / qtaCnf : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int checkQtaProposta() {
|
public int checkQtaProposta() {
|
||||||
int check = 0;
|
int check = 0;
|
||||||
if (!qtaProposta.equals(BigDecimal.ZERO)) {
|
if (qtaProposta != null && !qtaProposta.equals(BigDecimal.ZERO)) {
|
||||||
check = BigDecimal.valueOf(qtaOrd).compareTo(qtaProposta);
|
check = BigDecimal.valueOf(qtaOrd).compareTo(qtaProposta);
|
||||||
}
|
}
|
||||||
return check;
|
return check;
|
||||||
@@ -277,4 +286,30 @@ public class ArticoloOrdine {
|
|||||||
public void setSystemNote(String systemNote) {
|
public void setSystemNote(String systemNote) {
|
||||||
this.systemNote = systemNote;
|
this.systemNote = systemNote;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCodAlis() {
|
||||||
|
return codAlis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodAlis(String codAlis) {
|
||||||
|
this.codAlis = codAlis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getCtMaxOrd() {
|
||||||
|
return ctMaxOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdine setCtMaxOrd(BigDecimal ctMaxOrd) {
|
||||||
|
this.ctMaxOrd = ctMaxOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isInvalid() {
|
||||||
|
return invalid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdine setInvalid(boolean invalid) {
|
||||||
|
this.invalid = invalid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ public class InventarioRoomDTO extends BaseSyncDTO implements EntityModelInterfa
|
|||||||
public static final String DATA_ORA_FINE = "data_ora_fine";
|
public static final String DATA_ORA_FINE = "data_ora_fine";
|
||||||
public static final String CAUSALE = "causale";
|
public static final String CAUSALE = "causale";
|
||||||
public static final String ZONA = "zona";
|
public static final String ZONA = "zona";
|
||||||
|
public static final String IS_NEW = "new";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The unique ID of the cheese. */
|
/** The unique ID of the cheese. */
|
||||||
@@ -95,6 +96,9 @@ public class InventarioRoomDTO extends BaseSyncDTO implements EntityModelInterfa
|
|||||||
@ColumnInfo(name = Columns.ZONA)
|
@ColumnInfo(name = Columns.ZONA)
|
||||||
private String zona;
|
private String zona;
|
||||||
|
|
||||||
|
@ColumnInfo(name = Columns.IS_NEW)
|
||||||
|
private Boolean isNew = Boolean.TRUE;
|
||||||
|
|
||||||
@Ignore
|
@Ignore
|
||||||
private List<InventarioRowRoomDTO> inventarioRowList;
|
private List<InventarioRowRoomDTO> inventarioRowList;
|
||||||
|
|
||||||
@@ -235,6 +239,14 @@ public class InventarioRoomDTO extends BaseSyncDTO implements EntityModelInterfa
|
|||||||
this.zona = zona;
|
this.zona = zona;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean isNew() {
|
||||||
|
return isNew;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNew(Boolean aNew) {
|
||||||
|
isNew = aNew;
|
||||||
|
}
|
||||||
|
|
||||||
public List<InventarioRowRoomDTO> getInventarioRowList() {
|
public List<InventarioRowRoomDTO> getInventarioRowList() {
|
||||||
return inventarioRowList;
|
return inventarioRowList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ import it.integry.integrywmsnative.core.data_store.db.interfaces.EntityModelInte
|
|||||||
@ForeignKey(
|
@ForeignKey(
|
||||||
entity = InventarioRoomDTO.class,
|
entity = InventarioRoomDTO.class,
|
||||||
parentColumns = {BaseSyncDTO.Columns.ID},
|
parentColumns = {BaseSyncDTO.Columns.ID},
|
||||||
childColumns = {InventarioRowRoomDTO.Columns.PARENT_ID}
|
childColumns = {InventarioRowRoomDTO.Columns.PARENT_ID},
|
||||||
|
onDelete = ForeignKey.CASCADE
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package it.integry.integrywmsnative.core.data_store.db.entity;
|
package it.integry.integrywmsnative.core.data_store.db.entity;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.room.ColumnInfo;
|
import androidx.room.ColumnInfo;
|
||||||
import androidx.room.Entity;
|
import androidx.room.Entity;
|
||||||
@@ -52,10 +51,10 @@ public class Ordine {
|
|||||||
private boolean orderNewProducts = false;
|
private boolean orderNewProducts = false;
|
||||||
|
|
||||||
@ColumnInfo(name = "id_griglia")
|
@ColumnInfo(name = "id_griglia")
|
||||||
private int idGriglia;
|
@Nullable
|
||||||
|
private Integer idGriglia;
|
||||||
|
|
||||||
@ColumnInfo(name = "cod_alis")
|
@ColumnInfo(name = "cod_alis")
|
||||||
@NonNull
|
|
||||||
private String codAlis;
|
private String codAlis;
|
||||||
|
|
||||||
public int getOrdineId() {
|
public int getOrdineId() {
|
||||||
@@ -82,11 +81,11 @@ public class Ordine {
|
|||||||
this.annotazioni = annotazioni;
|
this.annotazioni = annotazioni;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getIdGriglia() {
|
public Integer getIdGriglia() {
|
||||||
return idGriglia;
|
return idGriglia;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIdGriglia(int idGriglia) {
|
public void setIdGriglia(Integer idGriglia) {
|
||||||
this.idGriglia = idGriglia;
|
this.idGriglia = idGriglia;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import androidx.room.ForeignKey;
|
|||||||
import androidx.room.Index;
|
import androidx.room.Index;
|
||||||
import androidx.room.PrimaryKey;
|
import androidx.room.PrimaryKey;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Entity(
|
@Entity(
|
||||||
@@ -138,7 +138,7 @@ public class SqlMtbColr {
|
|||||||
@ColumnInfo(name = "unt_mis")
|
@ColumnInfo(name = "unt_mis")
|
||||||
private String untMis;
|
private String untMis;
|
||||||
@ColumnInfo(name = "data_scad")
|
@ColumnInfo(name = "data_scad")
|
||||||
private Date dataScad;
|
private LocalDate dataScad;
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
@@ -428,11 +428,11 @@ public class SqlMtbColr {
|
|||||||
this.descrizione = descrizione;
|
this.descrizione = descrizione;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataScad() {
|
public LocalDate getDataScad() {
|
||||||
return dataScad;
|
return dataScad;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDataScad(Date dataScad) {
|
public void setDataScad(LocalDate dataScad) {
|
||||||
this.dataScad = dataScad;
|
this.dataScad = dataScad;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.data_store.db.repository;
|
package it.integry.integrywmsnative.core.data_store.db.repository;
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -17,7 +19,7 @@ public interface MtbColtRepository {
|
|||||||
|
|
||||||
void delete(SqlMtbColt mtbColt, Runnable 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);
|
LiveData<List<DocInternoWrapper>> getDocuments(String codDtip, String codAnag, String codVdes, Date dataDoc, String numDoc);
|
||||||
|
|
||||||
void getNextNumCollo(RunnableArgs<Integer> onSuccess, RunnableArgs<Exception> onError);
|
void getNextNumCollo(RunnableArgs<Integer> onSuccess, RunnableArgs<Exception> onError);
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ 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.entity.Ordine;
|
||||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
|
||||||
public class ArticoliOrdineDataSource extends BaseDataSource implements ArticoliOrdineRepository {
|
public class ArticoliOrdineDataSource extends BaseDataSource implements ArticoliOrdineRepository {
|
||||||
|
|
||||||
@@ -53,6 +54,7 @@ public class ArticoliOrdineDataSource extends BaseDataSource implements Articoli
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void saveArticoloToOrdine(ArticoloOrdine articolo, Runnable onSuccess, RunnableArgs<Exception> onError) {
|
public void saveArticoloToOrdine(ArticoloOrdine articolo, Runnable onSuccess, RunnableArgs<Exception> onError) {
|
||||||
|
articolo.setDataIns(UtilityDate.getDateInstance());
|
||||||
if (articolo.getArticoloOrdineId() != null && articolo.getArticoloOrdineId() > 0) {
|
if (articolo.getArticoloOrdineId() != null && articolo.getArticoloOrdineId() > 0) {
|
||||||
execute(() -> mArticoloOrdineDao.update(articolo), onSuccess, onError);
|
execute(() -> mArticoloOrdineDao.update(articolo), onSuccess, onError);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package it.integry.integrywmsnative.core.data_store.db.repository.datasource;
|
|||||||
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
@@ -50,10 +52,8 @@ public class SqlMtbColtDataSource extends BaseDataSource implements MtbColtRepos
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getLocalDocumentsByCodDtip(String codDtip, String codAnag, String codVdes, Date dataDoc, String numDoc, RunnableArgs<List<DocInternoWrapper>> onSuccess, RunnableArgs<Exception> onError) {
|
public LiveData<List<DocInternoWrapper>> getDocuments(String codDtip, String codAnag, String codVdes, Date dataDoc, String numDoc) {
|
||||||
execute(() -> mMtbColtDao.getLocalDocumentsByCodDtip(codDtip, codAnag, codVdes, dataDoc, numDoc),
|
return mMtbColtDao.getLocalDocumentsByCodDtip(codDtip, codAnag, codVdes, dataDoc, numDoc);
|
||||||
onSuccess,
|
|
||||||
onError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
package it.integry.integrywmsnative.core.data_store.db.respository_new;
|
package it.integry.integrywmsnative.core.data_store.db.respository_new;
|
||||||
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData;
|
import androidx.lifecycle.LiveData;
|
||||||
import androidx.lifecycle.MutableLiveData;
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
@@ -17,9 +21,13 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|||||||
import it.integry.integrywmsnative.core.mapper.InventarioMapper;
|
import it.integry.integrywmsnative.core.mapper.InventarioMapper;
|
||||||
import it.integry.integrywmsnative.core.model.MtbInvent;
|
import it.integry.integrywmsnative.core.model.MtbInvent;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.InventarioRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.InventarioRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityLiveData;
|
||||||
|
|
||||||
public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioRoomDTO, InventarioMapper, InventarioLocalDataSource, InventarioRESTConsumer> {
|
public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioRoomDTO, InventarioMapper, InventarioLocalDataSource, InventarioRESTConsumer> {
|
||||||
|
|
||||||
|
private final ExecutorService executorService;
|
||||||
|
|
||||||
private final Handler handler;
|
private final Handler handler;
|
||||||
|
|
||||||
private final MutableLiveData<List<InventarioRoomDTO>> internalLiveData = new MutableLiveData<>();
|
private final MutableLiveData<List<InventarioRoomDTO>> internalLiveData = new MutableLiveData<>();
|
||||||
@@ -28,22 +36,54 @@ public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioR
|
|||||||
public InventarioRepository(InventarioLocalDataSource localDataSource,
|
public InventarioRepository(InventarioLocalDataSource localDataSource,
|
||||||
InventarioRESTConsumer remoteDataSource,
|
InventarioRESTConsumer remoteDataSource,
|
||||||
InventarioMapper dataMapper,
|
InventarioMapper dataMapper,
|
||||||
Handler handler) {
|
Handler handler,
|
||||||
|
ExecutorService executorService) {
|
||||||
super(dataMapper, localDataSource, remoteDataSource);
|
super(dataMapper, localDataSource, remoteDataSource);
|
||||||
this.handler = handler;
|
this.handler = handler;
|
||||||
|
this.executorService = executorService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public LiveData<List<InventarioRoomDTO>> retrieve() {
|
public LiveData<List<InventarioRoomDTO>> retrieve(Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||||
localDataSource.makeSynchronousRetrieveAllLive(false)
|
localDataSource.makeSynchronousRetrieveAllLive(false)
|
||||||
.observeOn(Schedulers.io())
|
.observeOn(Schedulers.io())
|
||||||
.subscribe(internalLiveData::postValue);
|
.subscribe(internalLiveData::postValue);
|
||||||
// refresh(onComplete, onError);
|
|
||||||
|
UtilityLiveData.observeOnce(internalLiveData, inventories -> {
|
||||||
|
refresh(onComplete, onError);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
return internalLiveData;
|
return internalLiveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void refresh(Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||||
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
var startRetrieve = new Date();
|
||||||
|
var remoteData = remoteDataSource.makeSynchronousRetrieveRequest();
|
||||||
|
Log.d("Time INVENTORY RETRIEVE", ((new Date().getTime() - startRetrieve.getTime()) / 1000) + " secs");
|
||||||
|
|
||||||
|
if (remoteData == null) remoteData = new ArrayList<>();
|
||||||
|
|
||||||
|
List<MtbInvent> finalRemoteData = remoteData;
|
||||||
|
|
||||||
|
resolveFetch(finalRemoteData, internalLiveData.getValue(),
|
||||||
|
(remoteItem, localItem) -> Objects.equals(remoteItem.getIdInventario(), localItem.getIdInventario()),
|
||||||
|
(remoteItem, localItem) -> {
|
||||||
|
remoteItem.setRemoteSyncDate(localItem.getRemoteSyncDate());
|
||||||
|
remoteItem.setNew(false);
|
||||||
|
}, () -> handler.post(onComplete), ex -> handler.post(() -> onError.run(ex)),
|
||||||
|
SettingsManager.iDB().isFlagIsInventarioCacheEnabled());
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
onError.run(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void insert(InventarioRoomDTO inventarioDTO, Runnable onComplete, RunnableArgs<Exception> onError) {
|
public void insert(InventarioRoomDTO inventarioDTO, Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||||
localDataSource.makeInsertRequest(inventarioDTO, localResult -> {
|
localDataSource.makeInsertRequest(inventarioDTO, localResult -> {
|
||||||
if (onComplete != null) handler.post(onComplete);
|
if (onComplete != null) handler.post(onComplete);
|
||||||
@@ -60,7 +100,7 @@ public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioR
|
|||||||
}, onError);
|
}, onError);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void delete(InventarioRoomDTO inventarioDTO, Runnable onComplete, RunnableArgs<Exception> onError){
|
public void delete(InventarioRoomDTO inventarioDTO, Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||||
localDataSource.makeDeleteRequest(inventarioDTO, onComplete, onError);
|
localDataSource.makeDeleteRequest(inventarioDTO, onComplete, onError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ public abstract class _BaseRepository<
|
|||||||
RunnableArgssWithReturn<B, B, Boolean> keyComparator,
|
RunnableArgssWithReturn<B, B, Boolean> keyComparator,
|
||||||
RunnableArgss<B, B> dataCopy,
|
RunnableArgss<B, B> dataCopy,
|
||||||
Runnable onComplete,
|
Runnable onComplete,
|
||||||
RunnableArgs<Exception> onError) {
|
RunnableArgs<Exception> onError,
|
||||||
|
boolean isCacheEnabled) {
|
||||||
List<B> finalRemoteData = dataMapper.mapRestsToRooms(remoteData);
|
List<B> finalRemoteData = dataMapper.mapRestsToRooms(remoteData);
|
||||||
|
|
||||||
if (localData == null) localData = new ArrayList<>();
|
if (localData == null) localData = new ArrayList<>();
|
||||||
@@ -53,12 +54,14 @@ public abstract class _BaseRepository<
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var dataToUpdate = finalRemoteData.stream()
|
var dataToUpdate = finalRemoteData.stream()
|
||||||
.filter(x -> x.getId() != null && finalLocalData.stream().noneMatch(x::equals))
|
.filter(x -> x.getId() != null && finalLocalData.stream().noneMatch(x::equals))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
var dataToDelete = finalLocalData.stream()
|
var dataToDelete = finalLocalData.stream()
|
||||||
.filter(x -> x.isSyncronized() && finalRemoteData.stream().noneMatch(y -> keyComparator.run(y, x)))
|
.filter(x -> (!isCacheEnabled || x.isSyncronized()) && finalRemoteData.stream().noneMatch(y -> keyComparator.run(y, x)))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
var dataToInsert = finalRemoteData.stream()
|
var dataToInsert = finalRemoteData.stream()
|
||||||
|
|||||||
@@ -1,218 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.data_store.db.view_model;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
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.utility.UtilityDate;
|
|
||||||
|
|
||||||
public class ArticoloDTO {
|
|
||||||
|
|
||||||
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 float qtaOrd;
|
|
||||||
|
|
||||||
|
|
||||||
public String getCodMart() {
|
|
||||||
return codMart;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCodMart(String codMart) {
|
|
||||||
this.codMart = codMart;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescrizione() {
|
|
||||||
return descrizione;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescrizione(String descrizione) {
|
|
||||||
this.descrizione = descrizione;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUntMis() {
|
|
||||||
return untMis;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUntMis(String untMis) {
|
|
||||||
this.untMis = untMis;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getQtaCnf() {
|
|
||||||
return qtaCnf;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQtaCnf(float qtaCnf) {
|
|
||||||
this.qtaCnf = qtaCnf;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBarCode() {
|
|
||||||
return barcode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBarCode(String barCode) {
|
|
||||||
this.barcode = barCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getMerceDaRic() {
|
|
||||||
return merceDaRic;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMerceDaRic(float merceDaRic) {
|
|
||||||
this.merceDaRic = merceDaRic;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getMediaSett() {
|
|
||||||
return mediaSett;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMediaSett(float mediaSett) {
|
|
||||||
this.mediaSett = mediaSett;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFlagQtaMultipla() {
|
|
||||||
return flagQtaMultipla;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFlagQtaMultipla(String flagQtaMultipla) {
|
|
||||||
this.flagQtaMultipla = flagQtaMultipla;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getQtaMinOrdinabile() {
|
|
||||||
return qtaMinOrdinabile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQtaMinOrdinabile(float qtaMinOrdinabile) {
|
|
||||||
this.qtaMinOrdinabile = qtaMinOrdinabile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBarcode() {
|
|
||||||
return barcode;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 float getQtaOrd() {
|
|
||||||
return qtaOrd;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArticoloDTO setQtaOrd(float qtaOrd) {
|
|
||||||
this.qtaOrd = qtaOrd;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArticoloOrdine convertToArticoloOrdine(Ordine ordine) {
|
|
||||||
ArticoloOrdine articolo = new ArticoloOrdine();
|
|
||||||
|
|
||||||
articolo.setIdOrdine(ordine.getOrdineId());
|
|
||||||
|
|
||||||
articolo.setBarCode(this.getBarCode());
|
|
||||||
articolo.setCodMart(this.getCodMart());
|
|
||||||
articolo.setMediaSett(this.getMediaSett());
|
|
||||||
articolo.setFlagQtaMultipla(this.getFlagQtaMultipla());
|
|
||||||
articolo.setQtaMinOrdinabile(this.getQtaMinOrdinabile());
|
|
||||||
articolo.setMerceDaRic(this.getMerceDaRic());
|
|
||||||
articolo.setQtaCnf(this.getQtaCnf());
|
|
||||||
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.setSystemNote(generateSystemNote());
|
|
||||||
articolo.setQtaOrd(this.getQtaOrd());
|
|
||||||
|
|
||||||
return articolo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String generateSystemNote() {
|
|
||||||
HashMap<String, String> pairs = new HashMap<>();
|
|
||||||
pairs.put("qta_proposta", String.valueOf(qtaProposta));
|
|
||||||
pairs.put("giacenza", String.valueOf(giacenza));
|
|
||||||
|
|
||||||
return new JSONObject(pairs).toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public int getSortByBarcodeCondition(String barcode) {
|
|
||||||
if (codMart.equalsIgnoreCase(barcode))
|
|
||||||
return 1;
|
|
||||||
if (barcode != null) {
|
|
||||||
if (barcode.equalsIgnoreCase(barcode))
|
|
||||||
return 2;
|
|
||||||
if (StringUtils.leftPad(barcode, 13, "0").equalsIgnoreCase(barcode))
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
return 100;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,224 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.view_model;
|
||||||
|
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ArticoloOrdinabileDTO {
|
||||||
|
|
||||||
|
|
||||||
|
private String codAlis;
|
||||||
|
private String codMart;
|
||||||
|
private String descrizione;
|
||||||
|
private String untMis;
|
||||||
|
private float qtaCnf;
|
||||||
|
private float merceDaRic;
|
||||||
|
private float mediaSett;
|
||||||
|
private String flagQtaMultipla;
|
||||||
|
private String flagTracciabilita;
|
||||||
|
private String flagQtaCnfFissa;
|
||||||
|
private boolean newNoPromo;
|
||||||
|
private float qtaMinOrdinabile;
|
||||||
|
private int ggScadenza;
|
||||||
|
private BigDecimal giacenza;
|
||||||
|
private BigDecimal qtaPrevistaVendita;
|
||||||
|
private BigDecimal qtaProposta;
|
||||||
|
private float qtaOrd;
|
||||||
|
|
||||||
|
private float ctMaxOrd;
|
||||||
|
|
||||||
|
private List<String> barcode;
|
||||||
|
|
||||||
|
private String selectedBarcode;
|
||||||
|
|
||||||
|
public String getCodAlis() {
|
||||||
|
return codAlis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setCodAlis(String codAlis) {
|
||||||
|
this.codAlis = codAlis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizione() {
|
||||||
|
return descrizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setDescrizione(String descrizione) {
|
||||||
|
this.descrizione = descrizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUntMis() {
|
||||||
|
return untMis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setUntMis(String untMis) {
|
||||||
|
this.untMis = untMis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getQtaCnf() {
|
||||||
|
return qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setQtaCnf(float qtaCnf) {
|
||||||
|
this.qtaCnf = qtaCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getMerceDaRic() {
|
||||||
|
return merceDaRic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setMerceDaRic(float merceDaRic) {
|
||||||
|
this.merceDaRic = merceDaRic;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getMediaSett() {
|
||||||
|
return mediaSett;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setMediaSett(float mediaSett) {
|
||||||
|
this.mediaSett = mediaSett;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagQtaMultipla() {
|
||||||
|
return flagQtaMultipla;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setFlagQtaMultipla(String flagQtaMultipla) {
|
||||||
|
this.flagQtaMultipla = flagQtaMultipla;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagTracciabilita() {
|
||||||
|
return flagTracciabilita;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setFlagTracciabilita(String flagTracciabilita) {
|
||||||
|
this.flagTracciabilita = flagTracciabilita;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagQtaCnfFissa() {
|
||||||
|
return flagQtaCnfFissa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setFlagQtaCnfFissa(String flagQtaCnfFissa) {
|
||||||
|
this.flagQtaCnfFissa = flagQtaCnfFissa;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNewNoPromo() {
|
||||||
|
return newNoPromo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setNewNoPromo(boolean newNoPromo) {
|
||||||
|
this.newNoPromo = newNoPromo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getQtaMinOrdinabile() {
|
||||||
|
return qtaMinOrdinabile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setQtaMinOrdinabile(float qtaMinOrdinabile) {
|
||||||
|
this.qtaMinOrdinabile = qtaMinOrdinabile;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getGgScadenza() {
|
||||||
|
return ggScadenza;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setGgScadenza(int ggScadenza) {
|
||||||
|
this.ggScadenza = ggScadenza;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getGiacenza() {
|
||||||
|
return giacenza;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setGiacenza(BigDecimal giacenza) {
|
||||||
|
this.giacenza = giacenza;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaPrevistaVendita() {
|
||||||
|
return qtaPrevistaVendita;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setQtaPrevistaVendita(BigDecimal qtaPrevistaVendita) {
|
||||||
|
this.qtaPrevistaVendita = qtaPrevistaVendita;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaProposta() {
|
||||||
|
return qtaProposta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setQtaProposta(BigDecimal qtaProposta) {
|
||||||
|
this.qtaProposta = qtaProposta;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getQtaOrd() {
|
||||||
|
return qtaOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setQtaOrd(float qtaOrd) {
|
||||||
|
this.qtaOrd = qtaOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getCtMaxOrd() {
|
||||||
|
return ctMaxOrd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setCtMaxOrd(float ctMaxOrd) {
|
||||||
|
this.ctMaxOrd = ctMaxOrd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getBarcode() {
|
||||||
|
return barcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setBarcode(List<String> barcode) {
|
||||||
|
this.barcode = barcode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String generateSystemNote() {
|
||||||
|
HashMap<String, String> pairs = new HashMap<>();
|
||||||
|
pairs.put("qta_proposta", String.valueOf(qtaProposta));
|
||||||
|
pairs.put("giacenza", String.valueOf(giacenza));
|
||||||
|
|
||||||
|
return new JSONObject(pairs).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSelectedBarcode() {
|
||||||
|
return selectedBarcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloOrdinabileDTO setSelectedBarcode(String selectedBarcode) {
|
||||||
|
this.selectedBarcode = selectedBarcode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.data_store.db.view_model;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
|
|
||||||
|
|
||||||
public class GrigliaDTO {
|
|
||||||
private String descrLisa;
|
|
||||||
private String descrDepo;
|
|
||||||
private List<ArticoloDTO> grigliaAcquistiChild;
|
|
||||||
|
|
||||||
|
|
||||||
public String getDescrLisa() {
|
|
||||||
return descrLisa;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescrLisa(String descrLisa) {
|
|
||||||
this.descrLisa = descrLisa;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescrDepo() {
|
|
||||||
return descrDepo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescrDepo(String descrDepo) {
|
|
||||||
this.descrDepo = descrDepo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ArticoloDTO> getGrigliaAcquistiChild() {
|
|
||||||
return grigliaAcquistiChild;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGrigliaAcquistiChild(List<ArticoloDTO> grigliaAcquistiChild) {
|
|
||||||
this.grigliaAcquistiChild = grigliaAcquistiChild;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.data_store.db.view_model;
|
|
||||||
|
|
||||||
import androidx.room.Embedded;
|
|
||||||
import androidx.room.Ignore;
|
|
||||||
|
|
||||||
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.di.BindableBoolean;
|
|
||||||
|
|
||||||
public class OrdineWithGriglia {
|
|
||||||
|
|
||||||
@Embedded
|
|
||||||
private Ordine ordine;
|
|
||||||
@Embedded
|
|
||||||
private Griglia griglia;
|
|
||||||
|
|
||||||
|
|
||||||
public Ordine getOrdine() {
|
|
||||||
return ordine;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrdine(Ordine ordine) {
|
|
||||||
this.ordine = ordine;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Griglia getGriglia() {
|
|
||||||
return griglia;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGriglia(Griglia griglia) {
|
|
||||||
this.griglia = griglia;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package it.integry.integrywmsnative.core.data_store.db.view_model;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class OrdiniAcquistoGrigliaDTO {
|
||||||
|
private String descrLisa;
|
||||||
|
|
||||||
|
private String descrDepo;
|
||||||
|
|
||||||
|
private List<ArticoloOrdinabileDTO> articoli;
|
||||||
|
|
||||||
|
public String getDescrLisa() {
|
||||||
|
return descrLisa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrdiniAcquistoGrigliaDTO setDescrLisa(String descrLisa) {
|
||||||
|
this.descrLisa = descrLisa;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrDepo() {
|
||||||
|
return descrDepo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrdiniAcquistoGrigliaDTO setDescrDepo(String descrDepo) {
|
||||||
|
this.descrDepo = descrDepo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ArticoloOrdinabileDTO> getArticoli() {
|
||||||
|
return articoli;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrdiniAcquistoGrigliaDTO setArticoli(List<ArticoloOrdinabileDTO> articoli) {
|
||||||
|
this.articoli = articoli;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -18,7 +18,6 @@ public class BindableBoolean implements Observable {
|
|||||||
this.mValue = startValue;
|
this.mValue = startValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addOnPropertyChangedCallback(@NonNull OnPropertyChangedCallback callback) {
|
public void addOnPropertyChangedCallback(@NonNull OnPropertyChangedCallback callback) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
package it.integry.integrywmsnative.core.di;
|
package it.integry.integrywmsnative.core.di;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.math.RoundingMode;
|
|
||||||
|
|
||||||
import androidx.databinding.BaseObservable;
|
import androidx.databinding.BaseObservable;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.CommonConst;
|
import it.integry.integrywmsnative.core.CommonConst;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||||
|
|
||||||
@@ -20,7 +19,7 @@ public class BindableFloat extends BaseObservable {
|
|||||||
|
|
||||||
if(numberOfDigits > CommonConst.Config.NUMBER_OF_DECIMAL_DIGITS) numberOfDigits = CommonConst.Config.NUMBER_OF_DECIMAL_DIGITS;
|
if(numberOfDigits > CommonConst.Config.NUMBER_OF_DECIMAL_DIGITS) numberOfDigits = CommonConst.Config.NUMBER_OF_DECIMAL_DIGITS;
|
||||||
|
|
||||||
return new BigDecimal(get());
|
return BigDecimal.valueOf(get());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Float get(boolean defaultIfNull) {
|
public Float get(boolean defaultIfNull) {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import com.google.android.material.textfield.TextInputLayout;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.text.DecimalFormatSymbols;
|
import java.text.DecimalFormatSymbols;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@@ -456,8 +457,8 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
|
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
|
||||||
public static void bindEditTextDate(EditText view, final ObservableField<Date> observableDate, BaseDialogFragment parentFragment, boolean warningOnOldDates) {
|
public static void bindEditTextDate(EditText view, final ObservableField<LocalDate> observableDate, BaseDialogFragment parentFragment, boolean warningOnOldDates) {
|
||||||
Pair<ObservableField<Date>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
Pair<ObservableField<LocalDate>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
if (pair == null || pair.first != observableDate) {
|
if (pair == null || pair.first != observableDate) {
|
||||||
if (pair != null) {
|
if (pair != null) {
|
||||||
view.removeTextChangedListener(pair.second);
|
view.removeTextChangedListener(pair.second);
|
||||||
@@ -472,37 +473,33 @@ public class Converters {
|
|||||||
|
|
||||||
RunnableArgs<View> onClick = v -> {
|
RunnableArgs<View> onClick = v -> {
|
||||||
// Get Current Date
|
// Get Current Date
|
||||||
Calendar c = UtilityDate.getCalendarInstance();
|
LocalDate selectedDate = observableDate.get() != null ? observableDate.get() : UtilityDate.getNow();
|
||||||
|
|
||||||
if (observableDate.get() != null) {
|
|
||||||
c.setTime(observableDate.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var datePicker =
|
var datePicker =
|
||||||
MaterialDatePicker.Builder.datePicker()
|
MaterialDatePicker.Builder.datePicker()
|
||||||
.setSelection(c.getTimeInMillis())
|
.setSelection(UtilityDate.localDateToMillisTime(selectedDate))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
datePicker.addOnDismissListener(dialog -> {
|
datePicker.addOnDismissListener(dialog -> {
|
||||||
if(datePicker.getSelection() != null) {
|
if(datePicker.getSelection() != null) {
|
||||||
var timeInMillis = datePicker.getSelection();
|
var selectedTimeInMillis = datePicker.getSelection();
|
||||||
|
var nowTime = UtilityDate.millisTimeToLocalDate(selectedTimeInMillis, null);
|
||||||
|
|
||||||
var calendar = UtilityDate.getCalendarInstance();
|
|
||||||
calendar.setTimeInMillis(timeInMillis);
|
|
||||||
|
|
||||||
if (parentFragment != null && warningOnOldDates && calendar.before(UtilityDate.getCalendarInstance())) {
|
if (parentFragment != null && warningOnOldDates && nowTime.isBefore(UtilityDate.getNow())) {
|
||||||
DialogSimpleMessageView
|
DialogSimpleMessageView
|
||||||
.makeWarningDialog(new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
.makeWarningDialog(new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
|
||||||
view.setText(UtilityDate.formatDate(calendar.getTime(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
view.setText(UtilityDate.formatDate(nowTime, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
observableDate.set(calendar.getTime());
|
observableDate.set(nowTime);
|
||||||
}, () -> {
|
}, () -> {
|
||||||
|
|
||||||
})
|
})
|
||||||
.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
|
||||||
} else {
|
} else {
|
||||||
view.setText(UtilityDate.formatDate(calendar.getTime(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
view.setText(UtilityDate.formatDate(nowTime, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
observableDate.set(calendar.getTime());
|
observableDate.set(nowTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -521,7 +518,7 @@ public class Converters {
|
|||||||
((TextInputLayout) view.getParent().getParent()).setOnClickListener(onClick::run);
|
((TextInputLayout) view.getParent().getParent()).setOnClickListener(onClick::run);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Date newValue = observableDate.get();
|
var newValue = observableDate.get();
|
||||||
view.setText(UtilityDate.formatDate(newValue, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
view.setText(UtilityDate.formatDate(newValue, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package it.integry.integrywmsnative.core.exception;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public final class EmptyOrderException extends Exception {
|
||||||
|
public EmptyOrderException() {
|
||||||
|
super(UtilityResources.getString(R.string.empty_order));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.exception;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.os.Environment;
|
|
||||||
import android.os.Looper;
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.MainApplication;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
|
||||||
import it.integry.integrywmsnative.view.dialogs.exception.DialogException;
|
|
||||||
|
|
||||||
public class ExceptionsHandler implements Thread.UncaughtExceptionHandler {
|
|
||||||
|
|
||||||
private final static String TAG = ExceptionsHandler.class.getSimpleName();
|
|
||||||
|
|
||||||
private final Activity context;
|
|
||||||
|
|
||||||
public static void init(Activity context) {
|
|
||||||
new ExceptionsHandler(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
private ExceptionsHandler(Activity context) {
|
|
||||||
this.context = context;
|
|
||||||
|
|
||||||
//if (!BuildConfig.DEBUG) {
|
|
||||||
Thread.setDefaultUncaughtExceptionHandler(this);
|
|
||||||
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void uncaughtException(final Thread thread, final Throwable ex) {
|
|
||||||
try {
|
|
||||||
UtilityLogger.error(new Exception(ex));
|
|
||||||
} catch (Exception e) {
|
|
||||||
Log.e(TAG, "Exception Logger failed!", e);
|
|
||||||
MainApplication.exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
appendToFile(new Exception(ex));
|
|
||||||
new Thread() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Looper.prepare();
|
|
||||||
DialogException.make(context, context::finish).show();
|
|
||||||
Looper.loop();
|
|
||||||
}
|
|
||||||
}.start();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void appendToFile(Exception e) {
|
|
||||||
try {
|
|
||||||
File yourFile = new File(Environment.getExternalStorageDirectory(), "log.txt");
|
|
||||||
|
|
||||||
FileWriter fstream = new FileWriter(yourFile.getPath(), true);
|
|
||||||
BufferedWriter out = new BufferedWriter(fstream);
|
|
||||||
PrintWriter pWriter = new PrintWriter(out, true);
|
|
||||||
e.printStackTrace(pWriter);
|
|
||||||
}
|
|
||||||
catch (Exception ie) {
|
|
||||||
throw new RuntimeException("Could not write Exception to file", ie);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package it.integry.integrywmsnative.core.exception;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public final class ExpiredProductListException extends Exception {
|
||||||
|
public ExpiredProductListException() {
|
||||||
|
super(UtilityResources.getString(R.string.expired_list_session));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.integrywmsnative.core.exception;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public class GridNotSelectedException extends Exception {
|
||||||
|
|
||||||
|
public GridNotSelectedException() {
|
||||||
|
super(UtilityResources.getString(R.string.grid_not_selected));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.core.exception;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public final class InvalidProductOrderedException extends Exception {
|
||||||
|
|
||||||
|
public InvalidProductOrderedException() {
|
||||||
|
super(UtilityResources.getString(R.string.invalid_product_ordered));
|
||||||
|
}
|
||||||
|
|
||||||
|
public InvalidProductOrderedException(String product) {
|
||||||
|
super(UtilityResources.getString(R.string.invalid_product_ordered) + " (" + product + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package it.integry.integrywmsnative.core.exception;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public class MaxQtyExceededException extends Exception {
|
||||||
|
|
||||||
|
public MaxQtyExceededException() {
|
||||||
|
super(UtilityResources.getString(R.string.max_qty_exceeded));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.core.exception;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public final class MultipleResultFromBarcodeException extends Exception {
|
||||||
|
|
||||||
|
public MultipleResultFromBarcodeException() {
|
||||||
|
super(UtilityResources.getString(R.string.multiple_results_from_barcode));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MultipleResultFromBarcodeException(String barcode) {
|
||||||
|
super(UtilityResources.getString(R.string.multiple_results_from_barcode) + " (" + barcode + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.core.exception;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
|
|
||||||
|
public final class NoResultFromCodMartException extends Exception {
|
||||||
|
|
||||||
|
public NoResultFromCodMartException() {
|
||||||
|
super(UtilityResources.getString(R.string.no_result_from_cod_mart));
|
||||||
|
}
|
||||||
|
|
||||||
|
public NoResultFromCodMartException(String codMart) {
|
||||||
|
super(UtilityResources.getString(R.string.no_result_from_cod_mart) + " (" + codMart + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -37,21 +37,19 @@ public class BaseActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
public void onLoadingEnded() {
|
public void onLoadingEnded() {
|
||||||
this.closeProgress();
|
this.closeProgress();
|
||||||
BarcodeManager.enable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onError(Exception ex) {
|
public void onError(Exception ex) {
|
||||||
this.runOnUiThread(() -> {
|
this.runOnUiThread(() -> {
|
||||||
this.closeProgress();
|
this.closeProgress();
|
||||||
UtilityExceptions.defaultException(this, ex);
|
UtilityExceptions.defaultException(this, ex);
|
||||||
BarcodeManager.enable();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||||
this.progressOpened = true;
|
this.progressOpened = true;
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
this.mCurrentProgress.show(getSupportFragmentManager(), "tag");
|
this.mCurrentProgress.show(getSupportFragmentManager(), "tag");
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.core.expansion;
|
package it.integry.integrywmsnative.core.expansion;
|
||||||
|
|
||||||
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
@@ -18,7 +19,7 @@ import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
|||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||||
|
|
||||||
public class BaseDialogFragment extends DialogFragment {
|
public class BaseDialogFragment extends DialogFragment implements DialogInterface.OnShowListener {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public DialogProgressView mCurrentProgress;
|
public DialogProgressView mCurrentProgress;
|
||||||
@@ -26,6 +27,20 @@ public class BaseDialogFragment extends DialogFragment {
|
|||||||
|
|
||||||
private boolean mBarcodeListener = false;
|
private boolean mBarcodeListener = false;
|
||||||
|
|
||||||
|
private boolean cancelable = true;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCancelable() {
|
||||||
|
return cancelable;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCancelable(boolean cancelable) {
|
||||||
|
super.setCancelable(cancelable);
|
||||||
|
this.cancelable = cancelable;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void show(FragmentManager manager, String tag) {
|
public void show(FragmentManager manager, String tag) {
|
||||||
@@ -41,20 +56,7 @@ public class BaseDialogFragment extends DialogFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
this.initialize();
|
||||||
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)) {
|
|
||||||
return BarcodeManager.onKeyDown(event.getKeyCode(), event);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onLoadingStarted() {
|
public void onLoadingStarted() {
|
||||||
@@ -68,7 +70,7 @@ public class BaseDialogFragment extends DialogFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||||
this.progressOpened = true;
|
this.progressOpened = true;
|
||||||
requireActivity().runOnUiThread(() -> {
|
requireActivity().runOnUiThread(() -> {
|
||||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
@@ -107,4 +109,26 @@ public class BaseDialogFragment extends DialogFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onShow(DialogInterface dialogInterface) {
|
||||||
|
this.initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initialize() {
|
||||||
|
MainApplication.appComponent
|
||||||
|
.baseDialogFragmentComponent()
|
||||||
|
.create()
|
||||||
|
.inject(this);
|
||||||
|
|
||||||
|
if (BarcodeManager.isEnabled() && BarcodeManager.isKeyboardEmulator() && getDialog() != null) {
|
||||||
|
getDialog().setOnKeyListener((dialog, keyCode, event) -> {
|
||||||
|
if (mBarcodeListener && (event.getAction() == KeyEvent.ACTION_DOWN || event.getAction() == KeyEvent.ACTION_MULTIPLE) && !isControlKey(event)) {
|
||||||
|
return BarcodeManager.onKeyDown(event.getKeyCode(), event);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public abstract class BaseFragment extends Fragment {
|
|||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
if (!progressOpened && !this.mCurrentProgress.isAdded()) {
|
if (!progressOpened && !this.mCurrentProgress.isAdded() && !this.mCurrentProgress.isInLayout()) {
|
||||||
this.progressOpened = true;
|
this.progressOpened = true;
|
||||||
executorService.execute(() -> {
|
executorService.execute(() -> {
|
||||||
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package it.integry.integrywmsnative.core.expansion;
|
||||||
|
|
||||||
|
public interface RunnableArgsssss<S, T, U, V, X> {
|
||||||
|
|
||||||
|
void run(S data1, T data2, U data3, V data4, X data5);
|
||||||
|
}
|
||||||
@@ -19,9 +19,7 @@ public class MenuRESTConsumer extends _BaseRESTConsumer {
|
|||||||
menuRESTConsumerService.retrieveMenuConfig(rootCodOpz).enqueue(new Callback<>() {
|
menuRESTConsumerService.retrieveMenuConfig(rootCodOpz).enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<StbMenu>> call, Response<ServiceRESTResponse<StbMenu>> response) {
|
public void onResponse(Call<ServiceRESTResponse<StbMenu>> call, Response<ServiceRESTResponse<StbMenu>> response) {
|
||||||
analyzeAnswer(response, "retrieveMenu", (m) -> {
|
analyzeAnswer(response, "retrieveMenu", onComplete, onFailed);
|
||||||
onComplete.run(response.body().getEntity());
|
|
||||||
}, onFailed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -2,16 +2,16 @@ package it.integry.integrywmsnative.core.model;
|
|||||||
|
|
||||||
import androidx.databinding.Observable;
|
import androidx.databinding.Observable;
|
||||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsItemModel;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListItemModel;
|
||||||
|
|
||||||
public class CheckableMtbColr {
|
public class CheckableMtbColr {
|
||||||
|
|
||||||
|
|
||||||
private DialogChooseArtsFromListaArtsItemModel item;
|
private DialogChooseArtsFromMtbColrListItemModel item;
|
||||||
private BindableBoolean checked = new BindableBoolean(false);
|
private BindableBoolean checked = new BindableBoolean(false);
|
||||||
private BindableBoolean hidden = new BindableBoolean(false);
|
private BindableBoolean hidden = new BindableBoolean(false);
|
||||||
|
|
||||||
public CheckableMtbColr(DialogChooseArtsFromListaArtsItemModel item) {
|
public CheckableMtbColr(DialogChooseArtsFromMtbColrListItemModel item) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
|
|
||||||
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
@@ -22,11 +22,11 @@ public class CheckableMtbColr {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public DialogChooseArtsFromListaArtsItemModel getItem() {
|
public DialogChooseArtsFromMtbColrListItemModel getItem() {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CheckableMtbColr setItem(DialogChooseArtsFromListaArtsItemModel item) {
|
public CheckableMtbColr setItem(DialogChooseArtsFromMtbColrListItemModel item) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
|
|
||||||
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
@@ -60,8 +60,4 @@ public class CheckableMtbColr {
|
|||||||
this.hidden = hidden;
|
this.hidden = hidden;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void toggleCheck() {
|
|
||||||
this.checked.set(!this.checked.get());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
@@ -141,7 +142,7 @@ public class DtbDocr {
|
|||||||
|
|
||||||
private MtbAart mtbAart;
|
private MtbAart mtbAart;
|
||||||
|
|
||||||
private String dataScadPartitaMag;
|
private LocalDate dataScadPartitaMag;
|
||||||
|
|
||||||
public String getCodAnag() {
|
public String getCodAnag() {
|
||||||
return codAnag;
|
return codAnag;
|
||||||
@@ -741,15 +742,12 @@ public class DtbDocr {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataScadPartitaMag() {
|
public LocalDate getDataScadPartitaMag() {
|
||||||
return dataScadPartitaMag;
|
return dataScadPartitaMag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataScadPartitaMagD() {
|
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataScadPartitaMag());
|
|
||||||
}
|
|
||||||
|
|
||||||
public DtbDocr setDataScadPartitaMag(String dataScadPartitaMag) {
|
public DtbDocr setDataScadPartitaMag(LocalDate dataScadPartitaMag) {
|
||||||
this.dataScadPartitaMag = dataScadPartitaMag;
|
this.dataScadPartitaMag = dataScadPartitaMag;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -860,4 +860,267 @@ public class MtbAart extends EntityBase {
|
|||||||
this.numCnfImpegnata = numCnfImpegnata;
|
this.numCnfImpegnata = numCnfImpegnata;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public MtbUntMis getFirstUntMis() {
|
||||||
|
return getMtbUntMis() != null && !getMtbUntMis().isEmpty() ? getMtbUntMis().get(0) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
|
MtbAart mtbAart = (MtbAart) o;
|
||||||
|
|
||||||
|
if (!getCodMart().equals(mtbAart.getCodMart())) return false;
|
||||||
|
if (getDescrizione() != null ? !getDescrizione().equals(mtbAart.getDescrizione()) : mtbAart.getDescrizione() != null)
|
||||||
|
return false;
|
||||||
|
if (getUntMis() != null ? !getUntMis().equals(mtbAart.getUntMis()) : mtbAart.getUntMis() != null)
|
||||||
|
return false;
|
||||||
|
if (getBarCode() != null ? !getBarCode().equals(mtbAart.getBarCode()) : mtbAart.getBarCode() != null)
|
||||||
|
return false;
|
||||||
|
if (getPesoKg() != null ? !getPesoKg().equals(mtbAart.getPesoKg()) : mtbAart.getPesoKg() != null)
|
||||||
|
return false;
|
||||||
|
if (getQtaCnf() != null ? !getQtaCnf().equals(mtbAart.getQtaCnf()) : mtbAart.getQtaCnf() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodAliq() != null ? !getCodAliq().equals(mtbAart.getCodAliq()) : mtbAart.getCodAliq() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodScoArt() != null ? !getCodScoArt().equals(mtbAart.getCodScoArt()) : mtbAart.getCodScoArt() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodTcolUi() != null ? !getCodTcolUi().equals(mtbAart.getCodTcolUi()) : mtbAart.getCodTcolUi() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodTcolUl() != null ? !getCodTcolUl().equals(mtbAart.getCodTcolUl()) : mtbAart.getCodTcolUl() != null)
|
||||||
|
return false;
|
||||||
|
if (getArticoloComposto() != null ? !getArticoloComposto().equals(mtbAart.getArticoloComposto()) : mtbAart.getArticoloComposto() != null)
|
||||||
|
return false;
|
||||||
|
if (getEsposizioneComp() != null ? !getEsposizioneComp().equals(mtbAart.getEsposizioneComp()) : mtbAart.getEsposizioneComp() != null)
|
||||||
|
return false;
|
||||||
|
if (getDescrizioneEstesa() != null ? !getDescrizioneEstesa().equals(mtbAart.getDescrizioneEstesa()) : mtbAart.getDescrizioneEstesa() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodUltForn() != null ? !getCodUltForn().equals(mtbAart.getCodUltForn()) : mtbAart.getCodUltForn() != null)
|
||||||
|
return false;
|
||||||
|
if (getDataUltCar() != null ? !getDataUltCar().equals(mtbAart.getDataUltCar()) : mtbAart.getDataUltCar() != null)
|
||||||
|
return false;
|
||||||
|
if (getValUltCar() != null ? !getValUltCar().equals(mtbAart.getValUltCar()) : mtbAart.getValUltCar() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodUltClie() != null ? !getCodUltClie().equals(mtbAart.getCodUltClie()) : mtbAart.getCodUltClie() != null)
|
||||||
|
return false;
|
||||||
|
if (getDataUltScar() != null ? !getDataUltScar().equals(mtbAart.getDataUltScar()) : mtbAart.getDataUltScar() != null)
|
||||||
|
return false;
|
||||||
|
if (getValUltScar() != null ? !getValUltScar().equals(mtbAart.getValUltScar()) : mtbAart.getValUltScar() != null)
|
||||||
|
return false;
|
||||||
|
if (getTipoCodice() != null ? !getTipoCodice().equals(mtbAart.getTipoCodice()) : mtbAart.getTipoCodice() != null)
|
||||||
|
return false;
|
||||||
|
if (getNote() != null ? !getNote().equals(mtbAart.getNote()) : mtbAart.getNote() != null)
|
||||||
|
return false;
|
||||||
|
if (getPosizione() != null ? !getPosizione().equals(mtbAart.getPosizione()) : mtbAart.getPosizione() != null)
|
||||||
|
return false;
|
||||||
|
if (getColliPedana() != null ? !getColliPedana().equals(mtbAart.getColliPedana()) : mtbAart.getColliPedana() != null)
|
||||||
|
return false;
|
||||||
|
if (getUntMis2() != null ? !getUntMis2().equals(mtbAart.getUntMis2()) : mtbAart.getUntMis2() != null)
|
||||||
|
return false;
|
||||||
|
if (getRapConv2() != null ? !getRapConv2().equals(mtbAart.getRapConv2()) : mtbAart.getRapConv2() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagInclListino() != null ? !getFlagInclListino().equals(mtbAart.getFlagInclListino()) : mtbAart.getFlagInclListino() != null)
|
||||||
|
return false;
|
||||||
|
if (getUntMis3() != null ? !getUntMis3().equals(mtbAart.getUntMis3()) : mtbAart.getUntMis3() != null)
|
||||||
|
return false;
|
||||||
|
if (getRapConv3() != null ? !getRapConv3().equals(mtbAart.getRapConv3()) : mtbAart.getRapConv3() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMartStat() != null ? !getCodMartStat().equals(mtbAart.getCodMartStat()) : mtbAart.getCodMartStat() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMcon() != null ? !getCodMcon().equals(mtbAart.getCodMcon()) : mtbAart.getCodMcon() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMgrp() != null ? !getCodMgrp().equals(mtbAart.getCodMgrp()) : mtbAart.getCodMgrp() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMsfa() != null ? !getCodMsfa().equals(mtbAart.getCodMsfa()) : mtbAart.getCodMsfa() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMsgr() != null ? !getCodMsgr().equals(mtbAart.getCodMsgr()) : mtbAart.getCodMsgr() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMstp() != null ? !getCodMstp().equals(mtbAart.getCodMstp()) : mtbAart.getCodMstp() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodMtip() != null ? !getCodMtip().equals(mtbAart.getCodMtip()) : mtbAart.getCodMtip() != null)
|
||||||
|
return false;
|
||||||
|
if (getDescrizioneStat() != null ? !getDescrizioneStat().equals(mtbAart.getDescrizioneStat()) : mtbAart.getDescrizioneStat() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagStato() != null ? !getFlagStato().equals(mtbAart.getFlagStato()) : mtbAart.getFlagStato() != null)
|
||||||
|
return false;
|
||||||
|
if (getCambioDiviCar() != null ? !getCambioDiviCar().equals(mtbAart.getCambioDiviCar()) : mtbAart.getCambioDiviCar() != null)
|
||||||
|
return false;
|
||||||
|
if (getCambioDiviScar() != null ? !getCambioDiviScar().equals(mtbAart.getCambioDiviScar()) : mtbAart.getCambioDiviScar() != null)
|
||||||
|
return false;
|
||||||
|
if (getGgScadPartita() != null ? !getGgScadPartita().equals(mtbAart.getGgScadPartita()) : mtbAart.getGgScadPartita() != null)
|
||||||
|
return false;
|
||||||
|
if (getVolumeMc() != null ? !getVolumeMc().equals(mtbAart.getVolumeMc()) : mtbAart.getVolumeMc() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagEsponiPrz() != null ? !getFlagEsponiPrz().equals(mtbAart.getFlagEsponiPrz()) : mtbAart.getFlagEsponiPrz() != null)
|
||||||
|
return false;
|
||||||
|
if (getDataUltVar() != null ? !getDataUltVar().equals(mtbAart.getDataUltVar()) : mtbAart.getDataUltVar() != null)
|
||||||
|
return false;
|
||||||
|
if (getPercSfrido() != null ? !getPercSfrido().equals(mtbAart.getPercSfrido()) : mtbAart.getPercSfrido() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodBarreImb() != null ? !getCodBarreImb().equals(mtbAart.getCodBarreImb()) : mtbAart.getCodBarreImb() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagCalcPrz() != null ? !getFlagCalcPrz().equals(mtbAart.getFlagCalcPrz()) : mtbAart.getFlagCalcPrz() != null)
|
||||||
|
return false;
|
||||||
|
if (getEsposizioneCompAcq() != null ? !getEsposizioneCompAcq().equals(mtbAart.getEsposizioneCompAcq()) : mtbAart.getEsposizioneCompAcq() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagCalcPrzAcq() != null ? !getFlagCalcPrzAcq().equals(mtbAart.getFlagCalcPrzAcq()) : mtbAart.getFlagCalcPrzAcq() != null)
|
||||||
|
return false;
|
||||||
|
if (getDiacod() != null ? !getDiacod().equals(mtbAart.getDiacod()) : mtbAart.getDiacod() != null)
|
||||||
|
return false;
|
||||||
|
if (getPlu() != null ? !getPlu().equals(mtbAart.getPlu()) : mtbAart.getPlu() != null)
|
||||||
|
return false;
|
||||||
|
if (getPartIvaProd() != null ? !getPartIvaProd().equals(mtbAart.getPartIvaProd()) : mtbAart.getPartIvaProd() != null)
|
||||||
|
return false;
|
||||||
|
if (getRagSocProd() != null ? !getRagSocProd().equals(mtbAart.getRagSocProd()) : mtbAart.getRagSocProd() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagRapConvVariabile() != null ? !getFlagRapConvVariabile().equals(mtbAart.getFlagRapConvVariabile()) : mtbAart.getFlagRapConvVariabile() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagMovArtMag() != null ? !getFlagMovArtMag().equals(mtbAart.getFlagMovArtMag()) : mtbAart.getFlagMovArtMag() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagTracciabilita() != null ? !getFlagTracciabilita().equals(mtbAart.getFlagTracciabilita()) : mtbAart.getFlagTracciabilita() != null)
|
||||||
|
return false;
|
||||||
|
if (getTaraKg() != null ? !getTaraKg().equals(mtbAart.getTaraKg()) : mtbAart.getTaraKg() != null)
|
||||||
|
return false;
|
||||||
|
if (getColliStrato() != null ? !getColliStrato().equals(mtbAart.getColliStrato()) : mtbAart.getColliStrato() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagQtaCnfFissa() != null ? !getFlagQtaCnfFissa().equals(mtbAart.getFlagQtaCnfFissa()) : mtbAart.getFlagQtaCnfFissa() != null)
|
||||||
|
return false;
|
||||||
|
if (getFlagColliPedanaFisso() != null ? !getFlagColliPedanaFisso().equals(mtbAart.getFlagColliPedanaFisso()) : mtbAart.getFlagColliPedanaFisso() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodCconCosti() != null ? !getCodCconCosti().equals(mtbAart.getCodCconCosti()) : mtbAart.getCodCconCosti() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodCconRicavi() != null ? !getCodCconRicavi().equals(mtbAart.getCodCconRicavi()) : mtbAart.getCodCconRicavi() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodDgrpArt() != null ? !getCodDgrpArt().equals(mtbAart.getCodDgrpArt()) : mtbAart.getCodDgrpArt() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodDiviCar() != null ? !getCodDiviCar().equals(mtbAart.getCodDiviCar()) : mtbAart.getCodDiviCar() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodDiviScar() != null ? !getCodDiviScar().equals(mtbAart.getCodDiviScar()) : mtbAart.getCodDiviScar() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrCat() != null ? !getCodEcrCat().equals(mtbAart.getCodEcrCat()) : mtbAart.getCodEcrCat() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrMcat() != null ? !getCodEcrMcat().equals(mtbAart.getCodEcrMcat()) : mtbAart.getCodEcrMcat() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrRep() != null ? !getCodEcrRep().equals(mtbAart.getCodEcrRep()) : mtbAart.getCodEcrRep() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrStipo() != null ? !getCodEcrStipo().equals(mtbAart.getCodEcrStipo()) : mtbAart.getCodEcrStipo() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodEcrTipo() != null ? !getCodEcrTipo().equals(mtbAart.getCodEcrTipo()) : mtbAart.getCodEcrTipo() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodGrpBolla() != null ? !getCodGrpBolla().equals(mtbAart.getCodGrpBolla()) : mtbAart.getCodGrpBolla() != null)
|
||||||
|
return false;
|
||||||
|
if (getIngredienti() != null ? !getIngredienti().equals(mtbAart.getIngredienti()) : mtbAart.getIngredienti() != null)
|
||||||
|
return false;
|
||||||
|
if (getIdArtEqui() != null ? !getIdArtEqui().equals(mtbAart.getIdArtEqui()) : mtbAart.getIdArtEqui() != null)
|
||||||
|
return false;
|
||||||
|
if (getDescrCassa() != null ? !getDescrCassa().equals(mtbAart.getDescrCassa()) : mtbAart.getDescrCassa() != null)
|
||||||
|
return false;
|
||||||
|
if (getCodNcIntracee() != null ? !getCodNcIntracee().equals(mtbAart.getCodNcIntracee()) : mtbAart.getCodNcIntracee() != null)
|
||||||
|
return false;
|
||||||
|
if (getMarchio() != null ? !getMarchio().equals(mtbAart.getMarchio()) : mtbAart.getMarchio() != null)
|
||||||
|
return false;
|
||||||
|
if (getSezione() != null ? !getSezione().equals(mtbAart.getSezione()) : mtbAart.getSezione() != null)
|
||||||
|
return false;
|
||||||
|
if (getUntMisRifPeso() != mtbAart.getUntMisRifPeso()) return false;
|
||||||
|
if (getQtaEsistente() != null ? !getQtaEsistente().equals(mtbAart.getQtaEsistente()) : mtbAart.getQtaEsistente() != null)
|
||||||
|
return false;
|
||||||
|
if (getQtaImpegnata() != null ? !getQtaImpegnata().equals(mtbAart.getQtaImpegnata()) : mtbAart.getQtaImpegnata() != null)
|
||||||
|
return false;
|
||||||
|
if (getNumCnfEsistente() != null ? !getNumCnfEsistente().equals(mtbAart.getNumCnfEsistente()) : mtbAart.getNumCnfEsistente() != null)
|
||||||
|
return false;
|
||||||
|
if (getNumCnfImpegnata() != null ? !getNumCnfImpegnata().equals(mtbAart.getNumCnfImpegnata()) : mtbAart.getNumCnfImpegnata() != null)
|
||||||
|
return false;
|
||||||
|
return getMtbUntMis() != null ? getMtbUntMis().equals(mtbAart.getMtbUntMis()) : mtbAart.getMtbUntMis() == null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = getCodMart().hashCode();
|
||||||
|
result = 31 * result + (getDescrizione() != null ? getDescrizione().hashCode() : 0);
|
||||||
|
result = 31 * result + (getUntMis() != null ? getUntMis().hashCode() : 0);
|
||||||
|
result = 31 * result + (getBarCode() != null ? getBarCode().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPesoKg() != null ? getPesoKg().hashCode() : 0);
|
||||||
|
result = 31 * result + (getQtaCnf() != null ? getQtaCnf().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodAliq() != null ? getCodAliq().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodScoArt() != null ? getCodScoArt().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodTcolUi() != null ? getCodTcolUi().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodTcolUl() != null ? getCodTcolUl().hashCode() : 0);
|
||||||
|
result = 31 * result + (getArticoloComposto() != null ? getArticoloComposto().hashCode() : 0);
|
||||||
|
result = 31 * result + (getEsposizioneComp() != null ? getEsposizioneComp().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDescrizioneEstesa() != null ? getDescrizioneEstesa().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodUltForn() != null ? getCodUltForn().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDataUltCar() != null ? getDataUltCar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getValUltCar() != null ? getValUltCar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodUltClie() != null ? getCodUltClie().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDataUltScar() != null ? getDataUltScar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getValUltScar() != null ? getValUltScar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getTipoCodice() != null ? getTipoCodice().hashCode() : 0);
|
||||||
|
result = 31 * result + (getNote() != null ? getNote().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPosizione() != null ? getPosizione().hashCode() : 0);
|
||||||
|
result = 31 * result + (getColliPedana() != null ? getColliPedana().hashCode() : 0);
|
||||||
|
result = 31 * result + (getUntMis2() != null ? getUntMis2().hashCode() : 0);
|
||||||
|
result = 31 * result + (getRapConv2() != null ? getRapConv2().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagInclListino() != null ? getFlagInclListino().hashCode() : 0);
|
||||||
|
result = 31 * result + (getUntMis3() != null ? getUntMis3().hashCode() : 0);
|
||||||
|
result = 31 * result + (getRapConv3() != null ? getRapConv3().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMartStat() != null ? getCodMartStat().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMcon() != null ? getCodMcon().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMgrp() != null ? getCodMgrp().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMsfa() != null ? getCodMsfa().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMsgr() != null ? getCodMsgr().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMstp() != null ? getCodMstp().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodMtip() != null ? getCodMtip().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDescrizioneStat() != null ? getDescrizioneStat().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagStato() != null ? getFlagStato().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCambioDiviCar() != null ? getCambioDiviCar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCambioDiviScar() != null ? getCambioDiviScar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getGgScadPartita() != null ? getGgScadPartita().hashCode() : 0);
|
||||||
|
result = 31 * result + (getVolumeMc() != null ? getVolumeMc().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagEsponiPrz() != null ? getFlagEsponiPrz().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDataUltVar() != null ? getDataUltVar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPercSfrido() != null ? getPercSfrido().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodBarreImb() != null ? getCodBarreImb().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagCalcPrz() != null ? getFlagCalcPrz().hashCode() : 0);
|
||||||
|
result = 31 * result + (getEsposizioneCompAcq() != null ? getEsposizioneCompAcq().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagCalcPrzAcq() != null ? getFlagCalcPrzAcq().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDiacod() != null ? getDiacod().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPlu() != null ? getPlu().hashCode() : 0);
|
||||||
|
result = 31 * result + (getPartIvaProd() != null ? getPartIvaProd().hashCode() : 0);
|
||||||
|
result = 31 * result + (getRagSocProd() != null ? getRagSocProd().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagRapConvVariabile() != null ? getFlagRapConvVariabile().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagMovArtMag() != null ? getFlagMovArtMag().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagTracciabilita() != null ? getFlagTracciabilita().hashCode() : 0);
|
||||||
|
result = 31 * result + (getTaraKg() != null ? getTaraKg().hashCode() : 0);
|
||||||
|
result = 31 * result + (getColliStrato() != null ? getColliStrato().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagQtaCnfFissa() != null ? getFlagQtaCnfFissa().hashCode() : 0);
|
||||||
|
result = 31 * result + (getFlagColliPedanaFisso() != null ? getFlagColliPedanaFisso().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodCconCosti() != null ? getCodCconCosti().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodCconRicavi() != null ? getCodCconRicavi().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodDgrpArt() != null ? getCodDgrpArt().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodDiviCar() != null ? getCodDiviCar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodDiviScar() != null ? getCodDiviScar().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrCat() != null ? getCodEcrCat().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrMcat() != null ? getCodEcrMcat().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrRep() != null ? getCodEcrRep().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrStipo() != null ? getCodEcrStipo().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodEcrTipo() != null ? getCodEcrTipo().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodGrpBolla() != null ? getCodGrpBolla().hashCode() : 0);
|
||||||
|
result = 31 * result + (getIngredienti() != null ? getIngredienti().hashCode() : 0);
|
||||||
|
result = 31 * result + (getIdArtEqui() != null ? getIdArtEqui().hashCode() : 0);
|
||||||
|
result = 31 * result + (getDescrCassa() != null ? getDescrCassa().hashCode() : 0);
|
||||||
|
result = 31 * result + (getCodNcIntracee() != null ? getCodNcIntracee().hashCode() : 0);
|
||||||
|
result = 31 * result + (getMarchio() != null ? getMarchio().hashCode() : 0);
|
||||||
|
result = 31 * result + (getSezione() != null ? getSezione().hashCode() : 0);
|
||||||
|
result = 31 * result + (getUntMisRifPeso() != null ? getUntMisRifPeso().hashCode() : 0);
|
||||||
|
result = 31 * result + (getQtaEsistente() != null ? getQtaEsistente().hashCode() : 0);
|
||||||
|
result = 31 * result + (getQtaImpegnata() != null ? getQtaImpegnata().hashCode() : 0);
|
||||||
|
result = 31 * result + (getNumCnfEsistente() != null ? getNumCnfEsistente().hashCode() : 0);
|
||||||
|
result = 31 * result + (getNumCnfImpegnata() != null ? getNumCnfImpegnata().hashCode() : 0);
|
||||||
|
result = 31 * result + (getMtbUntMis() != null ? getMtbUntMis().hashCode() : 0);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
|
||||||
|
|
||||||
public class MtbAartWithFornitore extends MtbAart {
|
|
||||||
|
|
||||||
private String codArtFor;
|
|
||||||
|
|
||||||
public String getCodArtFor() {
|
|
||||||
return codArtFor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbAartWithFornitore setCodArtFor(String codArtFor) {
|
|
||||||
this.codArtFor = codArtFor;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
@@ -36,7 +37,7 @@ public class MtbColr extends EntityBase {
|
|||||||
private BigDecimal numCnf;
|
private BigDecimal numCnf;
|
||||||
private String insPartitaMag;
|
private String insPartitaMag;
|
||||||
private String mtbPartitaMag_descrizione;
|
private String mtbPartitaMag_descrizione;
|
||||||
private String dataScadPartita;
|
private LocalDate dataScadPartita;
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
private String untMis;
|
private String untMis;
|
||||||
private Integer causale;
|
private Integer causale;
|
||||||
@@ -361,25 +362,15 @@ public class MtbColr extends EntityBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getDataScadPartitaS() {
|
public LocalDate getDataScadPartita() {
|
||||||
return dataScadPartita;
|
return dataScadPartita;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataScadPartitaD() {
|
public MtbColr setDataScadPartita(LocalDate dataScadPartita) {
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataScadPartitaS());
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbColr setDataScadPartita(String dataScadPartita) {
|
|
||||||
this.dataScadPartita = dataScadPartita;
|
this.dataScadPartita = dataScadPartita;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbColr setDataScadPartita(Date dataScadPartita) {
|
|
||||||
this.dataScadPartita = UtilityDate.formatDate(dataScadPartita, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String getDescrizione() {
|
public String getDescrizione() {
|
||||||
return descrizione;
|
return descrizione;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,28 +68,6 @@ public class MtbColt extends EntityBase {
|
|||||||
private Boolean disablePrint;
|
private Boolean disablePrint;
|
||||||
private String ragSocCliente;
|
private String ragSocCliente;
|
||||||
|
|
||||||
public void generaFiltroOrdine() throws Exception {
|
|
||||||
|
|
||||||
if (this.gestione == null) {
|
|
||||||
throw new Exception("Impossibile creare il filtro dell'ordine se la gestione non è valorizzata");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.dataOrd == null) {
|
|
||||||
throw new Exception("Impossibile creare il filtro dell'ordine se la data dell'ordine non è valorizzata");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.numOrd == null) {
|
|
||||||
throw new Exception("Impossibile creare il filtro dell'ordine se il numero dell'ordine non è valorizzato");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Date dateOrd = UtilityDate.recognizeDate(this.dataOrd);
|
|
||||||
String dateYMD = UtilityDate.formatDate(dateOrd, UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH);
|
|
||||||
|
|
||||||
this.filtroOrdini = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ROOT><FILTER><DTB_ORDT><GESTIONE type=\"V\">" + this.gestione + "</GESTIONE><DATA_ORD type=\"D\">" + dateYMD + "</DATA_ORD><NUM_ORD type=\"N\">" + this.numOrd + "</NUM_ORD></DTB_ORDT></FILTER></ROOT>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private ObservableArrayList<MtbColr> mtbColr = new ObservableArrayList<>();
|
private ObservableArrayList<MtbColr> mtbColr = new ObservableArrayList<>();
|
||||||
|
|
||||||
public ObservableArrayList<MtbColr> getMtbColr() {
|
public ObservableArrayList<MtbColr> getMtbColr() {
|
||||||
@@ -119,30 +97,22 @@ public class MtbColt extends EntityBase {
|
|||||||
|
|
||||||
String codAnagToUse = null;
|
String codAnagToUse = null;
|
||||||
switch (gestioneEnum) {
|
switch (gestioneEnum) {
|
||||||
case ACQUISTO:
|
case ACQUISTO, LAVORAZIONE, PRODUZIONE -> {
|
||||||
case LAVORAZIONE:
|
|
||||||
case PRODUZIONE:
|
|
||||||
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
|
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
|
||||||
|
|
||||||
Optional<InternalCodAnagsDTO> optCodAnagForn = Stream.of(SettingsManager.iDB().getInternalCodAnags())
|
Optional<InternalCodAnagsDTO> optCodAnagForn = Stream.of(SettingsManager.iDB().getInternalCodAnags())
|
||||||
.filter(InternalCodAnagsDTO::isFornitore)
|
.filter(InternalCodAnagsDTO::isFornitore)
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
||||||
if (optCodAnagForn.isEmpty()) break;
|
if (optCodAnagForn.isEmpty()) break;
|
||||||
|
|
||||||
codAnagToUse = optCodAnagForn.get().getCodAnag();
|
codAnagToUse = optCodAnagForn.get().getCodAnag();
|
||||||
break;
|
}
|
||||||
case VENDITA:
|
case VENDITA -> {
|
||||||
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
|
if (SettingsManager.iDB().getInternalCodAnags() == null) break;
|
||||||
|
|
||||||
Optional<InternalCodAnagsDTO> optCodAnagClie = Stream.of(SettingsManager.iDB().getInternalCodAnags())
|
Optional<InternalCodAnagsDTO> optCodAnagClie = Stream.of(SettingsManager.iDB().getInternalCodAnags())
|
||||||
.filter(InternalCodAnagsDTO::isCliente)
|
.filter(InternalCodAnagsDTO::isCliente)
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
||||||
if (optCodAnagClie.isEmpty()) break;
|
if (optCodAnagClie.isEmpty()) break;
|
||||||
|
|
||||||
codAnagToUse = optCodAnagClie.get().getCodAnag();
|
codAnagToUse = optCodAnagClie.get().getCodAnag();
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setCodAnag(codAnagToUse);
|
setCodAnag(codAnagToUse);
|
||||||
@@ -600,33 +570,6 @@ public class MtbColt extends EntityBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (filtroOrdineDtos != null && filtroOrdineDtos.size() > 0) {
|
|
||||||
|
|
||||||
for (int i = 0; i < filtroOrdineDtos.size(); i++) {
|
|
||||||
FiltroOrdineDTO x = filtroOrdineDtos.get(i);
|
|
||||||
|
|
||||||
try {
|
|
||||||
whereCond.append("(");
|
|
||||||
whereCond.append(String.format("d.g = %s AND d.d = %s and d.n = %s",
|
|
||||||
UtilityDB.valueToString(x.getGestioneOrd()),
|
|
||||||
UtilityDB.valueToString(UtilityDate.formatDate(x.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH)),
|
|
||||||
UtilityDB.valueToString(x.getNumOrd())));
|
|
||||||
|
|
||||||
if (!UtilityString.isNullOrEmpty(x.getDataConsS())) {
|
|
||||||
whereCond.append(String.format(" AND dr.dc = %s",
|
|
||||||
UtilityDB.valueToString(UtilityDate.formatDate(x.getDataConsD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH))));
|
|
||||||
}
|
|
||||||
|
|
||||||
whereCond.append(")");
|
|
||||||
if (i < filtroOrdineDtos.size() - 1) {
|
|
||||||
whereCond.append(" OR ");
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}*/
|
|
||||||
whereCond = TextUtils.join(" OR ", conditions);
|
whereCond = TextUtils.join(" OR ", conditions);
|
||||||
|
|
||||||
this.filtroOrdini = xmlPrefix + whereCond + xmlSuffix;
|
this.filtroOrdini = xmlPrefix + whereCond + xmlSuffix;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
|
||||||
public class MtbDepoPosizione {
|
public class MtbDepoPosizione {
|
||||||
|
|
||||||
@@ -11,6 +12,8 @@ public class MtbDepoPosizione {
|
|||||||
private String flagLineaProduzione;
|
private String flagLineaProduzione;
|
||||||
private Integer priorita;
|
private Integer priorita;
|
||||||
|
|
||||||
|
private String tipoMagazAutomatico;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MtbDepoPosizione clone() {
|
public MtbDepoPosizione clone() {
|
||||||
@@ -85,4 +88,17 @@ public class MtbDepoPosizione {
|
|||||||
this.priorita = priorita;
|
this.priorita = priorita;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTipoMagazAutomatico() {
|
||||||
|
return tipoMagazAutomatico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbDepoPosizione setTipoMagazAutomatico(String tipoMagazAutomatico) {
|
||||||
|
this.tipoMagazAutomatico = tipoMagazAutomatico;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isMagazzinoAutomatico() {
|
||||||
|
return !UtilityString.isNullOrEmpty(getTipoMagazAutomatico());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
|
||||||
|
|
||||||
public class MtbPartitaMag extends EntityBase{
|
public class MtbPartitaMag extends EntityBase{
|
||||||
private String codMart;
|
private String codMart;
|
||||||
|
|
||||||
private String partitaMag;
|
private String partitaMag;
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
private String dataIns;
|
private LocalDateTime dataIns;
|
||||||
private String dataScad;
|
private LocalDate dataScad;
|
||||||
private Integer scelta;
|
private Integer scelta;
|
||||||
private BigDecimal costoUntUmMag;
|
private BigDecimal costoUntUmMag;
|
||||||
private BigDecimal valUntUmMag;
|
private BigDecimal valUntUmMag;
|
||||||
@@ -62,33 +61,24 @@ public class MtbPartitaMag extends EntityBase{
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataIns() {
|
public LocalDateTime getDataIns() {
|
||||||
return dataIns;
|
return dataIns;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbPartitaMag setDataIns(String dataIns) {
|
public MtbPartitaMag setDataIns(LocalDateTime dataIns) {
|
||||||
this.dataIns = dataIns;
|
this.dataIns = dataIns;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataScadS() {
|
public LocalDate getDataScad() {
|
||||||
return dataScad;
|
return dataScad;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataScadD() {
|
public MtbPartitaMag setDataScad(LocalDate dataScad) {
|
||||||
return UtilityDate.recognizeDateWithExceptionHandler(getDataScadS());
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbPartitaMag setDataScad(String dataScad) {
|
|
||||||
this.dataScad = dataScad;
|
this.dataScad = dataScad;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbPartitaMag setDataScad(Date dataScad) {
|
|
||||||
this.dataScad = UtilityDate.formatDate(dataScad, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getScelta() {
|
public Integer getScelta() {
|
||||||
return scelta;
|
return scelta;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public class MtbUntMis extends EntityBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getCifreDec() {
|
public BigDecimal getCifreDec() {
|
||||||
|
if(isFlagDig()) return BigDecimal.ZERO;
|
||||||
return cifreDec;
|
return cifreDec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by ValerioC on 06/03/2018.
|
* Created by ValerioC on 06/03/2018.
|
||||||
@@ -10,7 +12,7 @@ import java.util.Date;
|
|||||||
public class MvwSitArtUdcDetInventario {
|
public class MvwSitArtUdcDetInventario {
|
||||||
|
|
||||||
private String gestione;
|
private String gestione;
|
||||||
private Date dataCollo;
|
private LocalDate dataCollo;
|
||||||
private String serCollo;
|
private String serCollo;
|
||||||
private Integer numCollo;
|
private Integer numCollo;
|
||||||
private Integer segno;
|
private Integer segno;
|
||||||
@@ -25,6 +27,7 @@ public class MvwSitArtUdcDetInventario {
|
|||||||
private String diacod;
|
private String diacod;
|
||||||
private String descrizioneEstesa;
|
private String descrizioneEstesa;
|
||||||
private String partitaMag;
|
private String partitaMag;
|
||||||
|
private LocalDate dataScad;
|
||||||
private String codJcom;
|
private String codJcom;
|
||||||
private String commessa;
|
private String commessa;
|
||||||
private String untMis;
|
private String untMis;
|
||||||
@@ -36,7 +39,6 @@ public class MvwSitArtUdcDetInventario {
|
|||||||
private String codJfas;
|
private String codJfas;
|
||||||
private MtbAart mtbAart;
|
private MtbAart mtbAart;
|
||||||
|
|
||||||
|
|
||||||
public String getGestione() {
|
public String getGestione() {
|
||||||
return gestione;
|
return gestione;
|
||||||
}
|
}
|
||||||
@@ -46,11 +48,11 @@ public class MvwSitArtUdcDetInventario {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataCollo() {
|
public LocalDate getDataCollo() {
|
||||||
return dataCollo;
|
return dataCollo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MvwSitArtUdcDetInventario setDataCollo(Date dataCollo) {
|
public MvwSitArtUdcDetInventario setDataCollo(LocalDate dataCollo) {
|
||||||
this.dataCollo = dataCollo;
|
this.dataCollo = dataCollo;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -181,6 +183,15 @@ public class MvwSitArtUdcDetInventario {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalDate getDataScad() {
|
||||||
|
return dataScad;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MvwSitArtUdcDetInventario setDataScad(LocalDate dataScad) {
|
||||||
|
this.dataScad = dataScad;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCodJcom() {
|
public String getCodJcom() {
|
||||||
return codJcom;
|
return codJcom;
|
||||||
}
|
}
|
||||||
@@ -270,4 +281,22 @@ public class MvwSitArtUdcDetInventario {
|
|||||||
this.mtbAart = mtbAart;
|
this.mtbAart = mtbAart;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MtbColr toMtbColr() {
|
||||||
|
return new MtbColr()
|
||||||
|
.setCodJcom(getCodJcom())
|
||||||
|
.setCodMart(getCodMart())
|
||||||
|
.setDataCollo(UtilityDate.toDate(getDataCollo()))
|
||||||
|
.setNumCollo(getNumCollo())
|
||||||
|
.setSerCollo(getSerCollo())
|
||||||
|
.setGestione(getGestione())
|
||||||
|
.setMtbAart(getMtbAart())
|
||||||
|
.setNumCnf(getNumCnf())
|
||||||
|
.setQtaCnf(getQtaCnf())
|
||||||
|
.setQtaCol(getQtaCol())
|
||||||
|
.setPartitaMag(getPartitaMag())
|
||||||
|
.setPesoNettoKg(getPesoNettoKg())
|
||||||
|
.setPesoLordoKg(getPesoLordoKg())
|
||||||
|
.setUntMis(getUntMis());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model.dto;
|
||||||
|
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class AlreadyRegisteredUDCDTO {
|
||||||
|
|
||||||
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
|
private boolean canBeRecovered;
|
||||||
|
|
||||||
|
public MtbColt getMtbColt() {
|
||||||
|
return mtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlreadyRegisteredUDCDTO setMtbColt(MtbColt mtbColt) {
|
||||||
|
this.mtbColt = mtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCanBeRecovered() {
|
||||||
|
return canBeRecovered;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlreadyRegisteredUDCDTO setCanBeRecovered(boolean canBeRecovered) {
|
||||||
|
this.canBeRecovered = canBeRecovered;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -54,7 +54,7 @@ public class PickDataDTO {
|
|||||||
if (!UtilityString.isNullOrEmpty(partitaMag)) {
|
if (!UtilityString.isNullOrEmpty(partitaMag)) {
|
||||||
MtbPartitaMag mtbPartitaMag = new MtbPartitaMag()
|
MtbPartitaMag mtbPartitaMag = new MtbPartitaMag()
|
||||||
.setPartitaMag(partitaMag)
|
.setPartitaMag(partitaMag)
|
||||||
.setDataScad(UtilityDate.recognizeDateWithExceptionHandler(dataScad));
|
.setDataScad(UtilityDate.recognizeLocalDateWithExceptionHandler(dataScad));
|
||||||
|
|
||||||
manualPickDTO.setMtbPartitaMag(mtbPartitaMag);
|
manualPickDTO.setMtbPartitaMag(mtbPartitaMag);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ public class HttpInterceptor implements Interceptor {
|
|||||||
final String PROFILE_DB = SettingsManager.i().getUserSession() == null ? null : SettingsManager.i().getUserSession().getProfileDB();
|
final String PROFILE_DB = SettingsManager.i().getUserSession() == null ? null : SettingsManager.i().getUserSession().getProfileDB();
|
||||||
final String USERNAME = SettingsManager.i().getUser().getUsername();
|
final String USERNAME = SettingsManager.i().getUser().getUsername();
|
||||||
final String PASSWORD = SettingsManager.i().getUser().getPassword();
|
final String PASSWORD = SettingsManager.i().getUser().getPassword();
|
||||||
|
final String DEVICE_ID = SettingsManager.i().getUserSession().getDeviceId();
|
||||||
|
|
||||||
final Request request = chain.request();
|
final Request request = chain.request();
|
||||||
final HttpUrl url = request.url().newBuilder()
|
final HttpUrl url = request.url().newBuilder()
|
||||||
@@ -36,6 +37,7 @@ public class HttpInterceptor implements Interceptor {
|
|||||||
.addHeader("Accept", "*/*")
|
.addHeader("Accept", "*/*")
|
||||||
.addHeader("username", USERNAME != null ? USERNAME : "")
|
.addHeader("username", USERNAME != null ? USERNAME : "")
|
||||||
.addHeader("password", PASSWORD != null ? PASSWORD : "")
|
.addHeader("password", PASSWORD != null ? PASSWORD : "")
|
||||||
|
.addHeader("device_id", DEVICE_ID != null ? DEVICE_ID : "")
|
||||||
.url(url).build();
|
.url(url).build();
|
||||||
|
|
||||||
return chain.proceed(newRequest);
|
return chain.proceed(newRequest);
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package it.integry.integrywmsnative.core.rest;
|
package it.integry.integrywmsnative.core.rest;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
|
||||||
|
|
||||||
import java.lang.reflect.Modifier;
|
import java.security.KeyManagementException;
|
||||||
import java.time.LocalDate;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.rest.deserializer.LocalDateDeserializer;
|
import javax.net.ssl.SSLContext;
|
||||||
import it.integry.integrywmsnative.core.rest.deserializer.LocalDateTimeDeserializer;
|
import javax.net.ssl.TrustManager;
|
||||||
import it.integry.integrywmsnative.core.rest.serializer.LocalDateSerializer;
|
import javax.net.ssl.X509TrustManager;
|
||||||
import it.integry.integrywmsnative.core.rest.serializer.LocalDateTimeSerializer;
|
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityGson;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import retrofit2.Retrofit;
|
import retrofit2.Retrofit;
|
||||||
import retrofit2.converter.gson.GsonConverterFactory;
|
import retrofit2.converter.gson.GsonConverterFactory;
|
||||||
@@ -26,25 +25,25 @@ public class RESTBuilder {
|
|||||||
private static final boolean ADD_LOGGER_INTERCEPTOR = false;
|
private static final boolean ADD_LOGGER_INTERCEPTOR = false;
|
||||||
|
|
||||||
public static <T> T getService(final Class<T> service) {
|
public static <T> T getService(final Class<T> service) {
|
||||||
return getService(service, SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true);
|
return getService(service, SettingsManager.i().getServer().getProtocol(), SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> T getService(final Class<T> service, int timeout) {
|
public static <T> T getService(final Class<T> service, int timeout) {
|
||||||
return getService(service, SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true, true, timeout);
|
return getService(service, SettingsManager.i().getServer().getProtocol(), SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true, true, timeout);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> T getService(final Class<T> service, String host, int port, boolean addInterceptors) {
|
public static <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addInterceptors) {
|
||||||
return getService(service, host, port, addInterceptors, true, 60);
|
return getService(service, protocol, host, port, addInterceptors, true, 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> T getService(final Class<T> service, String host, int port, boolean addInterceptors, boolean addEmsApi) {
|
public static <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addInterceptors, boolean addEmsApi) {
|
||||||
return getService(service, host, port, addInterceptors, addEmsApi, 60);
|
return getService(service, protocol, host, port, addInterceptors, addEmsApi, 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> T getService(final Class<T> service, String host, int port, boolean addInterceptors, boolean addEmsApi, int timeout) {
|
public static <T> T getService(final Class<T> service, String protocol, String host, int port, boolean addInterceptors, boolean addEmsApi, int timeout) {
|
||||||
OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder();
|
OkHttpClient.Builder clientBuilder = getDefaultHttpClient();
|
||||||
|
|
||||||
clientBuilder.connectTimeout(timeout, TimeUnit.SECONDS);
|
clientBuilder.connectTimeout(timeout, TimeUnit.SECONDS);
|
||||||
clientBuilder.readTimeout(timeout, TimeUnit.SECONDS);
|
clientBuilder.readTimeout(timeout, TimeUnit.SECONDS);
|
||||||
@@ -57,22 +56,12 @@ public class RESTBuilder {
|
|||||||
|
|
||||||
OkHttpClient client = clientBuilder.build();
|
OkHttpClient client = clientBuilder.build();
|
||||||
|
|
||||||
String endpoint = "http://" + host + ":" + port + "/" + (addEmsApi ? "ems-api/" : "");
|
String endpoint = protocol + "://" + host + (port > 0 ? ":" + port : "") + "/" + (addEmsApi ? "ems-api/" : "");
|
||||||
|
|
||||||
Gson gson = new GsonBuilder()
|
|
||||||
.setDateFormat("dd/MM/yyyy HH:mm:ss")
|
|
||||||
.registerTypeAdapter(LocalDate.class, new LocalDateDeserializer())
|
|
||||||
.registerTypeAdapter(LocalDate.class, new LocalDateSerializer())
|
|
||||||
.registerTypeAdapter(LocalDateTime.class, new LocalDateTimeDeserializer())
|
|
||||||
.registerTypeAdapter(LocalDateTime.class, new LocalDateTimeSerializer())
|
|
||||||
.excludeFieldsWithModifiers(Modifier.TRANSIENT)
|
|
||||||
.create();
|
|
||||||
|
|
||||||
Retrofit retrofit = new Retrofit.Builder()
|
Gson gson = UtilityGson.createObject();
|
||||||
.addConverterFactory(GsonConverterFactory.create(gson))
|
|
||||||
.baseUrl(endpoint)
|
Retrofit retrofit = new Retrofit.Builder().addConverterFactory(GsonConverterFactory.create(gson)).baseUrl(endpoint).client(client).build();
|
||||||
.client(client)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
return retrofit.create(service);
|
return retrofit.create(service);
|
||||||
}
|
}
|
||||||
@@ -85,4 +74,39 @@ public class RESTBuilder {
|
|||||||
public static int getDefaultPort() {
|
public static int getDefaultPort() {
|
||||||
return SettingsManager.i().getServer().getPort();
|
return SettingsManager.i().getServer().getPort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static OkHttpClient.Builder getDefaultHttpClient() {
|
||||||
|
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
|
new X509TrustManager() {
|
||||||
|
@Override
|
||||||
|
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
|
||||||
|
return new java.security.cert.X509Certificate[]{};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
SSLContext sslContext = null;
|
||||||
|
try {
|
||||||
|
sslContext = SSLContext.getInstance("SSL");
|
||||||
|
sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
|
||||||
|
} catch (KeyManagementException | NoSuchAlgorithmException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
OkHttpClient.Builder client = new OkHttpClient.Builder()
|
||||||
|
.sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustAllCerts[0])
|
||||||
|
.hostnameVerifier((hostname, session) -> true);
|
||||||
|
|
||||||
|
return client;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
import com.annimon.stream.Collectors;
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -14,9 +14,14 @@ import javax.inject.Singleton;
|
|||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbGrup;
|
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCodMartRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.UpdateBarcodeImballoRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
@@ -31,23 +36,28 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
this.systemRESTConsumer = systemRESTConsumer;
|
this.systemRESTConsumer = systemRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getByBarcodeProd(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void searchByBarcode(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
articoloRESTConsumerService.getByBarcodeProd(barcodeProd).enqueue(new Callback<>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
|
||||||
analyzeAnswer(response, "getByBarcodeProd", (m) -> {
|
|
||||||
List<MtbAart> aartList = response.body().getEntityList();
|
|
||||||
aartList = aartList != null ? Stream.of(aartList).filter(x -> x.getFlagStato().equalsIgnoreCase("A")).toList() : null;
|
|
||||||
onComplete.run(aartList);
|
|
||||||
}, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
var request = new SearchArticoloByBarcodeRequestDTO()
|
||||||
public void onFailure(Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
|
.setBarcode(barcodeProd)
|
||||||
onFailed.run(new Exception(t));
|
.setOnlyActive(true);
|
||||||
}
|
|
||||||
});
|
articoloRESTConsumerService
|
||||||
|
.searchByBarcode(request)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> call, Response<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "searchByBarcode", (m) -> {
|
||||||
|
onComplete.run(response.body().getDto().getArts());
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -57,24 +67,28 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
public static void getByCodMartsStatic(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void getByCodMartsStatic(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
String joinedCods = Stream.of(codMartToFind)
|
var codMarts = Stream.of(codMartToFind)
|
||||||
.collect(Collectors.joining(","));
|
.withoutNulls()
|
||||||
|
.distinct().toList();
|
||||||
|
|
||||||
|
|
||||||
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
articoloRESTConsumer.getByCodMart(joinedCods).enqueue(new Callback<>() {
|
articoloRESTConsumer
|
||||||
@Override
|
.getByCodMart(new RetrieveArticoloByCodMartRequestDTO()
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
.setCodMarts(codMarts))
|
||||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
.enqueue(new Callback<>() {
|
||||||
onComplete.run(response.body().getEntityList());
|
@Override
|
||||||
}, onFailed);
|
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||||
}
|
analyzeAnswer(response, "getByCodMart", (m) -> {
|
||||||
|
onComplete.run(response.body().getEntityList());
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
|
||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,22 +113,25 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void getByCodMart(String codMartToFind, RunnableArgs<MtbAart> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getByCodMart(String codMartToFind, RunnableArgs<MtbAart> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
articoloRESTConsumer.getByCodMart(codMartToFind).enqueue(new Callback<>() {
|
articoloRESTConsumer.getByCodMart(
|
||||||
@Override
|
new RetrieveArticoloByCodMartRequestDTO()
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
.setCodMarts(Collections.singletonList(codMartToFind)))
|
||||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
.enqueue(new Callback<>() {
|
||||||
if (response.body().getEntityList() != null && !response.body().getEntityList().isEmpty()) {
|
@Override
|
||||||
onComplete.run(response.body().getEntityList().get(0));
|
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||||
} else onComplete.run(null);
|
analyzeAnswer(response, "getByCodMart", (m) -> {
|
||||||
|
if (response.body().getEntityList() != null && !response.body().getEntityList().isEmpty()) {
|
||||||
|
onComplete.run(response.body().getEntityList().get(0));
|
||||||
|
} else onComplete.run(null);
|
||||||
|
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
|
||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -131,8 +148,80 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbGrup>>() {
|
Type typeOfObjectsList = new TypeToken<ArrayList<MtbGrup>>() {
|
||||||
}.getType();
|
}.getType();
|
||||||
this.systemRESTConsumer.processSql("SELECT * FROM mtb_grup " + whereCond, typeOfObjectsList, onComplete, onFailed);
|
|
||||||
|
|
||||||
|
this.systemRESTConsumer.processSql("SELECT * FROM mtb_grup " + whereCond, typeOfObjectsList, onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void getUntMisArts(List<String> inputUntMis, RunnableArgs<List<MtbUntMis>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
List<HashMap<String, Object>> whereCondList = Stream.of(inputUntMis)
|
||||||
|
.distinct()
|
||||||
|
.withoutNulls()
|
||||||
|
.map(x -> {
|
||||||
|
HashMap<String, Object> data = new HashMap<>();
|
||||||
|
data.put("unt_mis", x);
|
||||||
|
return data;
|
||||||
|
})
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
var whereCond = whereCondList.isEmpty() ? "" : " WHERE " + UtilityQuery.concatFieldListInWhereCond(whereCondList);
|
||||||
|
|
||||||
|
Type typeOfObjectsList = new TypeToken<ArrayList<MtbUntMis>>() {
|
||||||
|
}.getType();
|
||||||
|
this.systemRESTConsumer.processSql("SELECT * FROM mtb_unt_mis " + whereCond, typeOfObjectsList, onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fillMtbAartsWithMtbUntMis(List<MtbAart> inputMtbAart, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
var inputUntMis = new ArrayList<String>();
|
||||||
|
|
||||||
|
if (inputMtbAart != null && !inputMtbAart.isEmpty()) {
|
||||||
|
inputUntMis.addAll(Stream.of(inputMtbAart)
|
||||||
|
.map(MtbAart::getUntMis)
|
||||||
|
.withoutNulls()
|
||||||
|
.distinct()
|
||||||
|
.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (inputUntMis.isEmpty()) {
|
||||||
|
onComplete.run(inputMtbAart);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
getUntMisArts(inputUntMis, mtbUntMiss -> {
|
||||||
|
for (var item : inputMtbAart) {
|
||||||
|
var mtbUntMis = Stream.of(mtbUntMiss).filter(x -> x.getUntMis().equalsIgnoreCase(item.getUntMis()))
|
||||||
|
.findFirstOrElse(null);
|
||||||
|
|
||||||
|
if (mtbUntMis != null)
|
||||||
|
item.setMtbUntMis(Collections.singletonList(mtbUntMis));
|
||||||
|
}
|
||||||
|
|
||||||
|
onComplete.run(inputMtbAart);
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void updateBarcodeImballo(String codMart, String newBarcodeImballo, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
|
|
||||||
|
var request = new UpdateBarcodeImballoRequestDTO()
|
||||||
|
.setCodMart(codMart)
|
||||||
|
.setNewBarcodeImballo(newBarcodeImballo);
|
||||||
|
|
||||||
|
articoloRESTConsumerService
|
||||||
|
.updateBarcodeImballo(request)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "updateBarcodeImballo", m -> {
|
||||||
|
onComplete.run();
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,19 +5,26 @@ import java.util.List;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCodMartRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.UpdateBarcodeImballoRequestDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.GET;
|
import retrofit2.http.GET;
|
||||||
import retrofit2.http.POST;
|
import retrofit2.http.POST;
|
||||||
import retrofit2.http.Query;
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
public interface ArticoloRESTConsumerService {
|
public interface ArticoloRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("wms/articolo/searchByBarcode")
|
||||||
|
Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> searchByBarcode(@Body() SearchArticoloByBarcodeRequestDTO searchArticoloByBarcodeRequest);
|
||||||
|
|
||||||
@POST("SM2getArticoloByBarcode")
|
@POST("wms/articolo/retrieveByCodMart")
|
||||||
Call<ServiceRESTResponse<MtbAart>> getByBarcodeProd(@Query("barcode") String barcodeProd);
|
Call<ServiceRESTResponse<MtbAart>> getByCodMart(@Body RetrieveArticoloByCodMartRequestDTO retrieveArticoloByCodMartRequest);
|
||||||
|
|
||||||
@GET("SM2getArticoloByCodMart")
|
@POST("wms/articolo/updateBarcodeImballo")
|
||||||
Call<ServiceRESTResponse<MtbAart>> getByCodMart(@Query("codMart") String barcodeProd);
|
Call<ServiceRESTResponse<Void>> updateBarcodeImballo(@Body UpdateBarcodeImballoRequestDTO updateBarcodeImballoRequest);
|
||||||
|
|
||||||
@GET("getProductLotStatus")
|
@GET("getProductLotStatus")
|
||||||
Call<ServiceRESTResponse<List<StatoArticoloDTO>>> getStatoPartita(@Query("codMart") String codMart, @Query("partitaMag") String partitaMag);
|
Call<ServiceRESTResponse<List<StatoArticoloDTO>>> getStatoPartita(@Query("codMart") String codMart, @Query("partitaMag") String partitaMag);
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
|||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||||
import it.integry.integrywmsnative.core.class_router.ClassRouter;
|
|
||||||
import it.integry.integrywmsnative.core.class_router.interfaces.IBarcodeCustomization;
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||||
@@ -18,15 +16,6 @@ public class BarcodeRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
public void decodeEan128(BarcodeScanDTO barcodeObj, RunnableArgs<Ean128Model> onComplete, RunnableArgs<Exception> onFailed) {
|
public void decodeEan128(BarcodeScanDTO barcodeObj, RunnableArgs<Ean128Model> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
IBarcodeCustomization barcodeCustomization = ClassRouter.getInstance(ClassRouter.PATH.BARCODE_CUSTOMIZATION);
|
|
||||||
|
|
||||||
if (barcodeCustomization != null && barcodeCustomization.shouldForceToEan13(barcodeObj.getStringValue())) {
|
|
||||||
Ean128Model ean128Model = new Ean128Model();
|
|
||||||
ean128Model.Gtin = barcodeObj.getStringValue();
|
|
||||||
onComplete.run(ean128Model);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String ean128 = barcodeObj.getStringValue().replaceAll("" + ((char) 29), "|");
|
String ean128 = barcodeObj.getStringValue().replaceAll("" + ((char) 29), "|");
|
||||||
|
|
||||||
BarcodeRESTConsumerService barcodeRESTConsumerService = RESTBuilder.getService(BarcodeRESTConsumerService.class);
|
BarcodeRESTConsumerService barcodeRESTConsumerService = RESTBuilder.getService(BarcodeRESTConsumerService.class);
|
||||||
|
|||||||
@@ -0,0 +1,117 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliCaricoRESTConsumerInterface;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class ColliAccettazioneRESTConsumer extends _BaseRESTConsumer implements ColliCaricoRESTConsumerInterface {
|
||||||
|
|
||||||
|
public void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.createUDC(createUDCRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Response<ServiceRESTResponse<CreateUDCResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/createUDC", data -> onComplete.run(data.getMtbColt()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs<CloseUDCResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.closeUDC(closeUDCRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Response<ServiceRESTResponse<CloseUDCResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/closeUDC", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.insertUDCRow(insertUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Response<ServiceRESTResponse<InsertUDCRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/insertUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.editUDCRow(editUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDCRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/editUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliAccettazioneRESTConsumerService colliAccettazioneRESTConsumerService = RESTBuilder.getService(ColliAccettazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliAccettazioneRESTConsumerService.deleteUDCRow(deleteUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "accettazione/deleteUDCRow", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface ColliAccettazioneRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("wms/accettazione/createUDC")
|
||||||
|
Call<ServiceRESTResponse<CreateUDCResponseDTO>> createUDC(@Body CreateUDCRequestDTO createUDCRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/accettazione/closeUDC")
|
||||||
|
Call<ServiceRESTResponse<CloseUDCResponseDTO>> closeUDC(@Body CloseUDCRequestDTO closeUDCRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/accettazione/insertUDCRow")
|
||||||
|
Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> insertUDCRow(@Body InsertUDCRowRequestDTO insertUDCRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/accettazione/editUDCRow")
|
||||||
|
Call<ServiceRESTResponse<EditUDCRowResponseDTO>> editUDCRow(@Body EditUDCRowRequestDTO editUDCRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/accettazione/deleteUDCRow")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUDCRow(@Body DeleteUDCRowRequestDTO deleteUDCRowRequestDTO);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,267 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliCaricoRESTConsumerInterface;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliScaricoRESTConsumerInterface;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSFromArtRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class ColliLavorazioneRESTConsumer extends _BaseRESTConsumer implements ColliCaricoRESTConsumerInterface, ColliScaricoRESTConsumerInterface {
|
||||||
|
|
||||||
|
|
||||||
|
private final SettingsManager settingsManager;
|
||||||
|
|
||||||
|
public ColliLavorazioneRESTConsumer(SettingsManager settingsManager) {
|
||||||
|
this.settingsManager = settingsManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void createUDC(CreateUDCRequestDTO createUDCRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.createUDC(createUDCRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Response<ServiceRESTResponse<CreateUDCResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/createUDC", data -> onComplete.run(data.getMtbColt()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CreateUDCResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void closeUDC(CloseUDCRequestDTO closeUDCRequestDTO, RunnableArgs<CloseUDCResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.closeUDC(closeUDCRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Response<ServiceRESTResponse<CloseUDCResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/closeUDC", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CloseUDCResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertUDCRow(InsertUDCRowRequestDTO insertUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.insertUDCRow(insertUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Response<ServiceRESTResponse<InsertUDCRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/insertUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editUDCRow(EditUDCRowRequestDTO editUDCRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.editUDCRow(editUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDCRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/editUDCRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<EditUDCRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createUDS(CreateUDSRequestDTO createUDSRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.createUDS(createUDSRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CreateUDSResponseDTO>> call, Response<ServiceRESTResponse<CreateUDSResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/createUDS", data -> onComplete.run(data.getMtbColt()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CreateUDSResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void closeUDS(CloseUDSRequestDTO closeUDSRequestDTO, RunnableArgs<CloseUDSResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.closeUDS(closeUDSRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CloseUDSResponseDTO>> call, Response<ServiceRESTResponse<CloseUDSResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/closeUDS", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CloseUDSResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.insertUDSRow(insertUDSRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> call, Response<ServiceRESTResponse<InsertUDSRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/insertUDSRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.editUDSRow(editUDSRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<EditUDSRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDSRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/editUDSRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<EditUDSRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.deleteUDSRow(deleteUDSRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/deleteUDSRow", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteUDCRow(DeleteUDCRowRequestDTO deleteUDCRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.deleteUDCRow(deleteUDCRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/deleteUDCRow", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void createColloScaricoDaArticolo(MtbAart mtbAart,
|
||||||
|
String partitaMag,
|
||||||
|
MtbDepoPosizione posizione,
|
||||||
|
BigDecimal qta, BigDecimal qtaCnf, BigDecimal numCnf,
|
||||||
|
BigDecimal pesoNettoKg, BigDecimal pesoLordoKg,
|
||||||
|
Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
CreateUDSFromArtRequestDTO createUDSFromArtRequestDTO = new CreateUDSFromArtRequestDTO()
|
||||||
|
.setCodMart(mtbAart.getCodMart())
|
||||||
|
.setCodMdep(settingsManager.getSettings().getUserSession().getDepo().getCodMdep())
|
||||||
|
.setPartitaMag(partitaMag)
|
||||||
|
.setPosizione(posizione != null ? posizione.getPosizione() : null)
|
||||||
|
.setQta(qta)
|
||||||
|
.setQtaCnf(qtaCnf)
|
||||||
|
.setNumCnf(numCnf)
|
||||||
|
.setPesoLordoKg(pesoLordoKg)
|
||||||
|
.setPesoNettoKg(pesoNettoKg);
|
||||||
|
|
||||||
|
if (posizione != null && posizione.isFlagLineaProduzione()) {
|
||||||
|
createUDSFromArtRequestDTO
|
||||||
|
.setCodJfas(posizione.getPosizione());
|
||||||
|
}
|
||||||
|
ColliLavorazioneRESTConsumerService colliLavorazioneRESTConsumerService = RESTBuilder.getService(ColliLavorazioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliLavorazioneRESTConsumerService.createUDSFromArt(createUDSFromArtRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "lavorazione/createUDSFromArt", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CloseUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.CreateUDCResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.DeleteUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.udc.EditUDCRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSFromArtRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDCRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface ColliLavorazioneRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/createUDC")
|
||||||
|
Call<ServiceRESTResponse<CreateUDCResponseDTO>> createUDC(@Body CreateUDCRequestDTO createUDCRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/createUDS")
|
||||||
|
Call<ServiceRESTResponse<CreateUDSResponseDTO>> createUDS(@Body CreateUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/closeUDC")
|
||||||
|
Call<ServiceRESTResponse<CloseUDCResponseDTO>> closeUDC(@Body CloseUDCRequestDTO createUDCRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/closeUDS")
|
||||||
|
Call<ServiceRESTResponse<CloseUDSResponseDTO>> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/insertUDCRow")
|
||||||
|
Call<ServiceRESTResponse<InsertUDCRowResponseDTO>> insertUDCRow(@Body InsertUDCRowRequestDTO insertUDCRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/insertUDSRow")
|
||||||
|
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/editUDCRow")
|
||||||
|
Call<ServiceRESTResponse<EditUDCRowResponseDTO>> editUDCRow(@Body EditUDCRowRequestDTO editUDCRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/editUDSRow")
|
||||||
|
Call<ServiceRESTResponse<EditUDSRowResponseDTO>> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/deleteUDSRow")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/deleteUDCRow")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUDCRow(@Body DeleteUDCRowRequestDTO deleteUDCRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/lavorazione/createUDSFromArt")
|
||||||
|
Call<ServiceRESTResponse<Void>> createUDSFromArt(@Body CreateUDSFromArtRequestDTO createUDSFromArtRequestDTO);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,8 +4,6 @@ import androidx.databinding.ObservableArrayList;
|
|||||||
|
|
||||||
import com.annimon.stream.Optional;
|
import com.annimon.stream.Optional;
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.google.gson.Gson;
|
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -29,11 +27,13 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.DistribuzioneColloDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
@@ -50,18 +50,23 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
private final SystemRESTConsumer mSystemRESTConsumer;
|
private final SystemRESTConsumer mSystemRESTConsumer;
|
||||||
private final ArticoloRESTConsumer mArticoloRESTConsumer;
|
private final ArticoloRESTConsumer mArticoloRESTConsumer;
|
||||||
private final EntityRESTConsumer mEntityRESTConsumer;
|
private final EntityRESTConsumer mEntityRESTConsumer;
|
||||||
|
private final SettingsManager mSettingsManager;
|
||||||
|
|
||||||
public ColliMagazzinoRESTConsumer(SystemRESTConsumer systemRESTConsumer,
|
public ColliMagazzinoRESTConsumer(SystemRESTConsumer systemRESTConsumer,
|
||||||
ArticoloRESTConsumer articoloRESTConsumer,
|
ArticoloRESTConsumer articoloRESTConsumer,
|
||||||
EntityRESTConsumer entityRESTConsumer) {
|
EntityRESTConsumer entityRESTConsumer,
|
||||||
|
SettingsManager settingsManager) {
|
||||||
this.mSystemRESTConsumer = systemRESTConsumer;
|
this.mSystemRESTConsumer = systemRESTConsumer;
|
||||||
this.mArticoloRESTConsumer = articoloRESTConsumer;
|
this.mArticoloRESTConsumer = articoloRESTConsumer;
|
||||||
this.mEntityRESTConsumer = entityRESTConsumer;
|
this.mEntityRESTConsumer = entityRESTConsumer;
|
||||||
|
this.mSettingsManager = settingsManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveCollo(MtbColt mtbColtToSave, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void saveCollo(MtbColt mtbColtToSave, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
MtbColt mtbColtToSaveClone = (MtbColt) mtbColtToSave.clone();
|
MtbColt mtbColtToSaveClone = (MtbColt) mtbColtToSave.clone();
|
||||||
mtbColtToSave.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
mtbColtToSaveClone.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
|
mtbColtToSaveClone.setOnlyPkMaster(false);
|
||||||
|
|
||||||
|
|
||||||
mtbColtToSaveClone.setMtbColr(new ObservableArrayList<>());
|
mtbColtToSaveClone.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
@@ -169,6 +174,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
saveCollo(newMtbColt, onComplete, onFailed);
|
saveCollo(newMtbColt, onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void createColliScaricoDaOrdineLavorazione(MtbColt sourceMtbColt, MtbColr sourceMtbColr, MtbDepoPosizione posizione, List<OrdineLavorazioneDTO> ordini, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void createColliScaricoDaOrdineLavorazione(MtbColt sourceMtbColt, MtbColr sourceMtbColr, MtbDepoPosizione posizione, List<OrdineLavorazioneDTO> ordini, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
MtbColt newMtbColt = new MtbColt()
|
MtbColt newMtbColt = new MtbColt()
|
||||||
@@ -272,56 +278,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
saveCollo(mtbColtToCreate, onComplete, onFailed);
|
saveCollo(mtbColtToCreate, onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteCollo(MtbColt mtbColtToDelete, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
|
|
||||||
mtbColtToDelete.setOperation(CommonModelConsts.OPERATION.DELETE);
|
|
||||||
|
|
||||||
saveCollo(mtbColtToDelete, value -> {
|
|
||||||
if (onComplete != null) onComplete.run();
|
|
||||||
}, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void distribuisciCollo(MtbColt mtbColtToDistribute, DistribuzioneColloDTO.CriterioDistribuzione criterioDistribuzione, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
|
|
||||||
DistribuzioneColloDTO distribuzioneColloDTO = new DistribuzioneColloDTO()
|
|
||||||
.setCriterioDistribuzione(criterioDistribuzione)
|
|
||||||
.setDataCollo(mtbColtToDistribute.getDataColloS())
|
|
||||||
.setNumCollo(mtbColtToDistribute.getNumCollo())
|
|
||||||
.setGestione(mtbColtToDistribute.getGestione())
|
|
||||||
.setSerCollo(mtbColtToDistribute.getSerCollo());
|
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
|
||||||
colliMagazzinoRESTConsumerService.distribuisciCollo(distribuzioneColloDTO)
|
|
||||||
.enqueue(new Callback<ServiceRESTResponse<JsonObject>>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<JsonObject>> call, Response<ServiceRESTResponse<JsonObject>> response) {
|
|
||||||
analyzeAnswerList(response, "DistribuzioneCollo", obj -> {
|
|
||||||
|
|
||||||
Gson gson = new Gson();
|
|
||||||
List<JsonObject> jsons = response.body().getEntityList();
|
|
||||||
|
|
||||||
List<MtbColt> newList = new ArrayList<>();
|
|
||||||
|
|
||||||
if (jsons != null) {
|
|
||||||
for (int i = 0; i < jsons.size(); i++) {
|
|
||||||
JsonObject jsonTmp = jsons.get(i);
|
|
||||||
|
|
||||||
newList.add(gson.fromJson(jsonTmp, MtbColt.class));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onComplete.run(newList);
|
|
||||||
}, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(Call<ServiceRESTResponse<JsonObject>> call, Throwable t) {
|
|
||||||
onFailed.run(new Exception(t));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void getBySSCC(String ssccString, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getBySSCC(String ssccString, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
colliMagazzinoRESTConsumerService.getColloByBarcode(ssccString, onlyResiduo, throwExcIfNull).enqueue(new Callback<>() {
|
colliMagazzinoRESTConsumerService.getColloByBarcode(ssccString, onlyResiduo, throwExcIfNull).enqueue(new Callback<>() {
|
||||||
@@ -350,6 +306,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void fillMtbAartsOfMtbColts(List<MtbColt> mtbColts, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void fillMtbAartsOfMtbColts(List<MtbColt> mtbColts, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
fillMtbAartsOfMtbColtsStatic(mtbColts, onComplete, onFailed);
|
fillMtbAartsOfMtbColtsStatic(mtbColts, onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void fillMtbAartsOfMtbColtsStatic(List<MtbColt> mtbColts, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void fillMtbAartsOfMtbColtsStatic(List<MtbColt> mtbColts, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
List<String> codMarts = new ArrayList<>();
|
List<String> codMarts = new ArrayList<>();
|
||||||
|
|
||||||
@@ -494,52 +451,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void canLUBeDeleted(MtbColt mtbColt, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
|
|
||||||
HashMap<String, Object> params = new HashMap<>();
|
|
||||||
params.put("mtb_colt.gestione", mtbColt.getGestione());
|
|
||||||
params.put("mtb_colt.ser_collo", mtbColt.getSerCollo());
|
|
||||||
params.put("mtb_colt.num_collo", mtbColt.getNumCollo());
|
|
||||||
params.put("mtb_colt.data_collo", mtbColt.getDataColloD());
|
|
||||||
|
|
||||||
String whereCond = UtilityQuery.concatFieldsInWhereCond(params);
|
|
||||||
|
|
||||||
|
|
||||||
String query = "SELECT mtb_colt.* " +
|
|
||||||
"FROM mtb_colt " +
|
|
||||||
"LEFT OUTER JOIN " +
|
|
||||||
" (SELECT gestione, " +
|
|
||||||
" data_collo, " +
|
|
||||||
" num_collo, " +
|
|
||||||
" ser_collo, " +
|
|
||||||
" cod_mart, " +
|
|
||||||
" cod_col, " +
|
|
||||||
" cod_tagl, " +
|
|
||||||
" partita_mag, " +
|
|
||||||
" SUM(qta_col) sum_qta_col " +
|
|
||||||
" FROM mtb_colr " +
|
|
||||||
" GROUP BY gestione, " +
|
|
||||||
" data_collo, " +
|
|
||||||
" num_collo, " +
|
|
||||||
" ser_collo, " +
|
|
||||||
" cod_mart, " +
|
|
||||||
" cod_col, " +
|
|
||||||
" cod_tagl, " +
|
|
||||||
" partita_mag) sum_mtb_colr ON mtb_colt.gestione = sum_mtb_colr.gestione " +
|
|
||||||
"AND mtb_colt.num_collo = sum_mtb_colr.num_collo " +
|
|
||||||
"AND mtb_colt.data_collo = sum_mtb_colr.data_collo " +
|
|
||||||
"AND mtb_colt.ser_collo = sum_mtb_colr.ser_collo " +
|
|
||||||
"AND sum_mtb_colr.sum_qta_col > 0 " +
|
|
||||||
"WHERE sum_mtb_colr.num_collo IS NULL " +
|
|
||||||
" AND " + whereCond;
|
|
||||||
|
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {
|
|
||||||
}.getType();
|
|
||||||
this.mSystemRESTConsumer.<ArrayList<MtbColt>>processSql(query, typeOfObjectsList, data -> {
|
|
||||||
onComplete.run(data != null && data.size() > 0);
|
|
||||||
}, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void retrieveBasketColli(RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void retrieveBasketColli(RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
@@ -743,4 +654,64 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
onComplete.run(data.get(0));
|
onComplete.run(data.get(0));
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void canULBeDeleted(MtbColt mtbColt, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
CanULBeDeletedRequestDTO canULBeDeletedRequestDTO = new CanULBeDeletedRequestDTO()
|
||||||
|
.setMtbColt(mtbColt);
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliMagazzinoRESTConsumerService.canULBeDeleted(canULBeDeletedRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Boolean>> call, Response<ServiceRESTResponse<Boolean>> response) {
|
||||||
|
analyzeAnswer(response, "generic/canULBeDeleted", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Boolean>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteUL(DeleteULRequestDTO deleteULRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliMagazzinoRESTConsumerService.deleteUL(deleteULRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "generic/deleteUL", Void -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printUL(PrintULRequestDTO printULRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliMagazzinoRESTConsumerService.printUL(printULRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "generic/printUL", Void -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.rest.model.DistribuzioneColloDTO;
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintULRequestDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.GET;
|
import retrofit2.http.GET;
|
||||||
@@ -19,9 +19,6 @@ import retrofit2.http.Query;
|
|||||||
|
|
||||||
public interface ColliMagazzinoRESTConsumerService {
|
public interface ColliMagazzinoRESTConsumerService {
|
||||||
|
|
||||||
@POST("wms/distribuzioneRigheCollo")
|
|
||||||
Call<ServiceRESTResponse<JsonObject>> distribuisciCollo(@Body DistribuzioneColloDTO distribuzioneCollo);
|
|
||||||
|
|
||||||
@POST("getColloByBarcode")
|
@POST("getColloByBarcode")
|
||||||
Call<ServiceRESTResponse<MtbColt>> getColloByBarcode(@Query("codBarreCollo") String sscc, @Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull);
|
Call<ServiceRESTResponse<MtbColt>> getColloByBarcode(@Query("codBarreCollo") String sscc, @Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull);
|
||||||
|
|
||||||
@@ -49,4 +46,14 @@ public interface ColliMagazzinoRESTConsumerService {
|
|||||||
@POST("wms/confirmGiacenzaUL")
|
@POST("wms/confirmGiacenzaUL")
|
||||||
Call<ServiceRESTResponse<Object>> confirmGiacenzaUL(@Body MtbColt mtbColt);
|
Call<ServiceRESTResponse<Object>> confirmGiacenzaUL(@Body MtbColt mtbColt);
|
||||||
|
|
||||||
|
|
||||||
|
@POST("wms/generic/canULBeDeleted")
|
||||||
|
Call<ServiceRESTResponse<Boolean>> canULBeDeleted(@Body CanULBeDeletedRequestDTO canULBeDeletedRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/generic/deleteUL")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUL(@Body DeleteULRequestDTO deleteULRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/generic/printUL")
|
||||||
|
Call<ServiceRESTResponse<Void>> printUL(@Body PrintULRequestDTO printULRequestDTO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.interfaces.ColliScaricoRESTConsumerInterface;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class ColliSpedizioneRESTConsumer extends _BaseRESTConsumer implements ColliScaricoRESTConsumerInterface {
|
||||||
|
|
||||||
|
|
||||||
|
public void createUDS(CreateUDSRequestDTO createUDSRequestDTO, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliSpedizioneRESTConsumerService.createUDS(createUDSRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CreateUDSResponseDTO>> call, Response<ServiceRESTResponse<CreateUDSResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "spedizione/createUDS", data -> onComplete.run(data.getMtbColt()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CreateUDSResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void closeUDS(CloseUDSRequestDTO closeUDSRequestDTO, RunnableArgs<CloseUDSResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliSpedizioneRESTConsumerService.closeUDS(closeUDSRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<CloseUDSResponseDTO>> call, Response<ServiceRESTResponse<CloseUDSResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "spedizione/closeUDS", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<CloseUDSResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void insertUDSRow(InsertUDSRowRequestDTO insertUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliSpedizioneRESTConsumerService.insertUDSRow(insertUDSRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> call, Response<ServiceRESTResponse<InsertUDSRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "spedizione/insertUDSRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void editUDSRow(EditUDSRowRequestDTO editUDSRowRequestDTO, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliSpedizioneRESTConsumerService.editUDSRow(editUDSRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<EditUDSRowResponseDTO>> call, Response<ServiceRESTResponse<EditUDSRowResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "spedizione/editUDSRow", data -> onComplete.run(data.getSavedMtbColr()), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<EditUDSRowResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteUDSRow(DeleteUDSRowRequestDTO deleteUDSRowRequestDTO, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliSpedizioneRESTConsumerService colliSpedizioneRESTConsumerService = RESTBuilder.getService(ColliSpedizioneRESTConsumerService.class);
|
||||||
|
|
||||||
|
colliSpedizioneRESTConsumerService.deleteUDSRow(deleteUDSRowRequestDTO)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "spedizione/deleteUDSRow", data -> onComplete.run(), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.CreateUDSResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.EditUDSRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.InsertUDSRowResponseDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.PrintULRequestDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface ColliSpedizioneRESTConsumerService {
|
||||||
|
|
||||||
|
@POST("wms/spedizione/createUDS")
|
||||||
|
Call<ServiceRESTResponse<CreateUDSResponseDTO>> createUDS(@Body CreateUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/closeUDS")
|
||||||
|
Call<ServiceRESTResponse<CloseUDSResponseDTO>> closeUDS(@Body CloseUDSRequestDTO createUDSRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/printUDS")
|
||||||
|
Call<ServiceRESTResponse<Void>> printUDS(@Body PrintULRequestDTO printULRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/insertUDSRow")
|
||||||
|
Call<ServiceRESTResponse<InsertUDSRowResponseDTO>> insertUDSRow(@Body InsertUDSRowRequestDTO insertUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/editUDSRow")
|
||||||
|
Call<ServiceRESTResponse<EditUDSRowResponseDTO>> editUDSRow(@Body EditUDSRowRequestDTO editUDSRowRequestDTO);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/deleteUDSRow")
|
||||||
|
Call<ServiceRESTResponse<Void>> deleteUDSRow(@Body DeleteUDSRowRequestDTO deleteUDSRowRequestDTO);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
@@ -9,12 +11,13 @@ import it.integry.integrywmsnative.core.model.DtbDoct;
|
|||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.LoadColliDTO;
|
import it.integry.integrywmsnative.core.rest.model.LoadColliDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.documento.RetrieveDocumentoArtsResponseDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class DocumentiRESTConsumer extends _BaseRESTConsumer {
|
public class DocumentRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
|
|
||||||
public void createDocsFromColli(List<LoadColliDTO> listColli, RunnableArgs<List<DtbDoct>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void createDocsFromColli(List<LoadColliDTO> listColli, RunnableArgs<List<DtbDoct>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
@@ -48,4 +51,21 @@ public class DocumentiRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void loadDocumentAvailableArts(String codDtip, String codMgrp, String codAnagForn, RunnableArgs<RetrieveDocumentoArtsResponseDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
var inventarioRESTConsumerService = RESTBuilder.getService(DocumentiRESTConsumerService.class);
|
||||||
|
inventarioRESTConsumerService.retrieveArts(codDtip, codMgrp, codAnagForn)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(@NonNull Call<ServiceRESTResponse<RetrieveDocumentoArtsResponseDTO>> call, @NonNull Response<ServiceRESTResponse<RetrieveDocumentoArtsResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "loadDocumentoArts", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(@NonNull Call<ServiceRESTResponse<RetrieveDocumentoArtsResponseDTO>> call, @NonNull Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,9 +5,12 @@ import java.util.List;
|
|||||||
import it.integry.integrywmsnative.core.model.DtbDoct;
|
import it.integry.integrywmsnative.core.model.DtbDoct;
|
||||||
import it.integry.integrywmsnative.core.rest.model.LoadColliDTO;
|
import it.integry.integrywmsnative.core.rest.model.LoadColliDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.documento.RetrieveDocumentoArtsResponseDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.GET;
|
||||||
import retrofit2.http.POST;
|
import retrofit2.http.POST;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
public interface DocumentiRESTConsumerService {
|
public interface DocumentiRESTConsumerService {
|
||||||
|
|
||||||
@@ -17,4 +20,13 @@ public interface DocumentiRESTConsumerService {
|
|||||||
@POST("createDocFromColli")
|
@POST("createDocFromColli")
|
||||||
Call<ServiceRESTResponse<DtbDoct>> createDocFromColli(@Body LoadColliDTO listColli);
|
Call<ServiceRESTResponse<DtbDoct>> createDocFromColli(@Body LoadColliDTO listColli);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@GET("wms/documento/arts")
|
||||||
|
Call<ServiceRESTResponse<RetrieveDocumentoArtsResponseDTO>> retrieveArts(
|
||||||
|
@Query("codDtip") String codDtip,
|
||||||
|
@Query("codMgrp") String codMgrp,
|
||||||
|
@Query("codAnagForn") String codAnagForn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import it.integry.integrywmsnative.core.model.EntityBase;
|
|||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.EsitoType;
|
import it.integry.integrywmsnative.core.rest.model.EsitoType;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityGson;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
@@ -83,7 +84,7 @@ public class EntityRESTConsumer extends _BaseRESTConsumer {
|
|||||||
if (response.body() != null) {
|
if (response.body() != null) {
|
||||||
|
|
||||||
ArrayList<T> responseList = new ArrayList<>();
|
ArrayList<T> responseList = new ArrayList<>();
|
||||||
Gson gson = new Gson();
|
Gson gson = UtilityGson.createObject();
|
||||||
// Type typeOfObjectsList = new TypeToken<T>() {}.getType();
|
// Type typeOfObjectsList = new TypeToken<T>() {}.getType();
|
||||||
|
|
||||||
for (ServiceRESTResponse<JsonObject> jsonSingleObject : response.body()) {
|
for (ServiceRESTResponse<JsonObject> jsonSingleObject : response.body()) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
@@ -11,6 +12,7 @@ import it.integry.integrywmsnative.core.model.StbGestSetup;
|
|||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.GestSetupDTO;
|
import it.integry.integrywmsnative.core.rest.model.GestSetupDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.settings.StbGestSetupReader;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
@@ -20,28 +22,26 @@ import retrofit2.Response;
|
|||||||
public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
public void getValue(String gestName, String sectionName, String keySection, RunnableArgs<GestSetupDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getValue(String gestName, String sectionName, String keySection, RunnableArgs<GestSetupDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
getValueStatic(gestName, sectionName, keySection, onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void getValueStatic(String gestName, String sectionName, String keySection, RunnableArgs<GestSetupDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
GestSetupRESTConsumerService service = RESTBuilder.getService(GestSetupRESTConsumerService.class);
|
GestSetupRESTConsumerService service = RESTBuilder.getService(GestSetupRESTConsumerService.class);
|
||||||
service.getGestSetupValue(gestName, sectionName, keySection).enqueue(new Callback<ServiceRESTResponse<GestSetupDTO>>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(Call<ServiceRESTResponse<GestSetupDTO>> call, Response<ServiceRESTResponse<GestSetupDTO>> response) {
|
|
||||||
analyzeAnswer(response, "GestSetup", onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
service.getGestSetupValue(gestName, sectionName, keySection)
|
||||||
public void onFailure(Call<ServiceRESTResponse<GestSetupDTO>> call, Throwable t) {
|
.enqueue(new Callback<>() {
|
||||||
Log.e("GestSetup", t.toString());
|
@Override
|
||||||
// UtilityLogger.errorMe(new Exception(t));
|
public void onResponse(Call<ServiceRESTResponse<GestSetupDTO>> call, Response<ServiceRESTResponse<GestSetupDTO>> response) {
|
||||||
if (onFailed != null) onFailed.run(new Exception(t));
|
analyzeAnswer(response, "GestSetup", onComplete, onFailed);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<GestSetupDTO>> call, Throwable t) {
|
||||||
|
Log.e("GestSetup", t.toString());
|
||||||
|
// UtilityLogger.errorMe(new Exception(t));
|
||||||
|
if (onFailed != null) onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void getBooleanValue(String gestName, String sectionName, String keySection, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getBooleanValue(String gestName, String sectionName, String keySection, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
getValueStatic(gestName, sectionName, keySection, value -> {
|
getValue(gestName, sectionName, keySection, value -> {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
onComplete.run("S".equalsIgnoreCase(value.value));
|
onComplete.run("S".equalsIgnoreCase(value.value));
|
||||||
} else onComplete.run(false);
|
} else onComplete.run(false);
|
||||||
@@ -50,7 +50,7 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void getValueStatic(String gestName, String sectionName, String keySection, String codMdep, RunnableArgs<GestSetupDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getValue(String gestName, String sectionName, String keySection, String codMdep, RunnableArgs<GestSetupDTO> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
GestSetupRESTConsumerService service = RESTBuilder.getService(GestSetupRESTConsumerService.class);
|
GestSetupRESTConsumerService service = RESTBuilder.getService(GestSetupRESTConsumerService.class);
|
||||||
service.getGestSetupValue(gestName, sectionName, keySection, codMdep).enqueue(new Callback<ServiceRESTResponse<GestSetupDTO>>() {
|
service.getGestSetupValue(gestName, sectionName, keySection, codMdep).enqueue(new Callback<ServiceRESTResponse<GestSetupDTO>>() {
|
||||||
@Override
|
@Override
|
||||||
@@ -67,8 +67,8 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void getBooleanValue(String gestName, String sectionName, String keySection, String codMdep, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getBooleanValue(String gestName, String sectionName, String keySection, String codMdep, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
getValueStatic(gestName, sectionName, keySection, codMdep, value -> {
|
getValue(gestName, sectionName, keySection, codMdep, value -> {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
onComplete.run("S".equalsIgnoreCase(value.value));
|
onComplete.run("S".equalsIgnoreCase(value.value));
|
||||||
} else onComplete.run(false);
|
} else onComplete.run(false);
|
||||||
@@ -78,12 +78,25 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void getValues(String codMdep, List<StbGestSetup> stbGestSetupList, RunnableArgs<List<StbGestSetup>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getValues(String codMdep, List<StbGestSetupReader> stbGestSetupList, RunnableArgs<List<StbGestSetupReader>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
var stbGestSetups = stbGestSetupList.stream().map(x -> (StbGestSetup) x).collect(Collectors.toList());
|
||||||
|
|
||||||
GestSetupRESTConsumerService service = RESTBuilder.getService(GestSetupRESTConsumerService.class);
|
GestSetupRESTConsumerService service = RESTBuilder.getService(GestSetupRESTConsumerService.class);
|
||||||
service.getGestSetupValues(codMdep, stbGestSetupList).enqueue(new Callback<>() {
|
service.getGestSetupValues(codMdep, stbGestSetups).enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<List<StbGestSetup>>> call, Response<ServiceRESTResponse<List<StbGestSetup>>> response) {
|
public void onResponse(Call<ServiceRESTResponse<List<StbGestSetup>>> call, Response<ServiceRESTResponse<List<StbGestSetup>>> response) {
|
||||||
analyzeAnswer(response, "GestSetup", onComplete, onFailed);
|
analyzeAnswer(response, "GestSetup", data -> {
|
||||||
|
|
||||||
|
for (StbGestSetup stbGestSetup : data) {
|
||||||
|
stbGestSetupList.stream().filter(x -> stbGestSetup.getGestName().equalsIgnoreCase(x.getGestName()) &&
|
||||||
|
stbGestSetup.getSection().equalsIgnoreCase(x.getSection()) &&
|
||||||
|
stbGestSetup.getKeySection().equalsIgnoreCase(x.getKeySection()))
|
||||||
|
.findFirst()
|
||||||
|
.ifPresent(x -> x.setValue(stbGestSetup.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
onComplete.run(stbGestSetupList);
|
||||||
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -2,11 +2,8 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
|||||||
|
|
||||||
import com.annimon.stream.Optional;
|
import com.annimon.stream.Optional;
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.google.gson.reflect.TypeToken;
|
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
@@ -15,7 +12,14 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
import it.integry.integrywmsnative.core.model.MvwSitArtUdcDetInventario;
|
import it.integry.integrywmsnative.core.model.MvwSitArtUdcDetInventario;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.giacenza.InstantItemSituationIncomingItemDto;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.giacenza.InstantItemSituationResponseDto;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class GiacenzaRESTConsumer extends _BaseRESTConsumer {
|
public class GiacenzaRESTConsumer extends _BaseRESTConsumer {
|
||||||
@@ -30,38 +34,153 @@ public class GiacenzaRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void getGiacenzeInPosizione(MtbDepoPosizione posizione, RunnableArgs<List<MvwSitArtUdcDetInventario>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getGiacenzeInPosizione(MtbDepoPosizione posizione, RunnableArgs<List<MvwSitArtUdcDetInventario>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
GiacenzaRESTConsumerService giacenzaRESTConsumerService = RESTBuilder.getService(GiacenzaRESTConsumerService.class);
|
||||||
|
giacenzaRESTConsumerService.retrieveAvailableItems(posizione.getPosizione()).enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> call, Response<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> response) {
|
||||||
|
analyzeAnswer(response, "getGiacenzeInPosizione", inventarioList -> {
|
||||||
|
|
||||||
HashMap<String, Object> params = new HashMap<>();
|
List<String> codMarts = Stream.of(inventarioList)
|
||||||
params.put("posizione", posizione.getPosizione());
|
.map(x -> x.getCodMart().trim())
|
||||||
String whereCond = UtilityQuery.concatFieldsInWhereCond(params);
|
.toList();
|
||||||
String query = "SELECT * from mvw_sitart_udc_det_inventario" +
|
|
||||||
" WHERE " + whereCond;
|
mArticoloRESTConsumer.getByCodMarts(codMarts, mtbAarts -> {
|
||||||
|
for (var row : inventarioList) {
|
||||||
|
|
||||||
|
MtbAart foundMtbAart = null;
|
||||||
|
Optional<MtbAart> mtbAartOpt = Stream.of(mtbAarts)
|
||||||
|
.filter(x -> x.getCodMart().equalsIgnoreCase(row.getCodMart()))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
if (mtbAartOpt.isPresent()) {
|
||||||
|
foundMtbAart = mtbAartOpt.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
row.setMtbAart(foundMtbAart);
|
||||||
|
}
|
||||||
|
|
||||||
|
onComplete.run(inventarioList);
|
||||||
|
}, onFailed);
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getGiacenzeByArticolo(String codMart, String partitaMag, RunnableArgs<List<MvwSitArtUdcDetInventario>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
GiacenzaRESTConsumerService giacenzaRESTConsumerService = RESTBuilder.getService(GiacenzaRESTConsumerService.class);
|
||||||
|
var serviceRESTResponseCall =
|
||||||
|
UtilityString.isNullOrEmpty(partitaMag) ?
|
||||||
|
giacenzaRESTConsumerService.retrieveAvailableItemsByArt(codMart) :
|
||||||
|
giacenzaRESTConsumerService.retrieveAvailableItemsByArt(codMart, partitaMag);
|
||||||
|
serviceRESTResponseCall.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> call, Response<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> response) {
|
||||||
|
analyzeAnswer(response, "getGiacenzeByArticolo", inventarioList -> {
|
||||||
|
|
||||||
|
List<String> codMarts = Stream.of(inventarioList)
|
||||||
|
.map(x -> x.getCodMart().trim())
|
||||||
|
.distinct()
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
mArticoloRESTConsumer.getByCodMarts(codMarts, mtbAarts -> {
|
||||||
|
for (var row : inventarioList) {
|
||||||
|
|
||||||
|
MtbAart foundMtbAart = null;
|
||||||
|
Optional<MtbAart> mtbAartOpt = Stream.of(mtbAarts)
|
||||||
|
.filter(x -> x.getCodMart().equalsIgnoreCase(row.getCodMart()))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
if (mtbAartOpt.isPresent()) {
|
||||||
|
foundMtbAart = mtbAartOpt.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
row.setMtbAart(foundMtbAart);
|
||||||
|
}
|
||||||
|
|
||||||
|
onComplete.run(inventarioList);
|
||||||
|
}, onFailed);
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<MvwSitArtUdcDetInventario>>() {
|
public void getInstantItemSituation(String codMdep, String codMart, String partitaMag, String codJcom, RunnableArgs<InstantItemSituationResponseDto> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
}.getType();
|
GiacenzaRESTConsumerService giacenzaRESTConsumerService = RESTBuilder.getService(GiacenzaRESTConsumerService.class);
|
||||||
this.mSystemRESTConsumer.<ArrayList<MvwSitArtUdcDetInventario>>processSql(query, typeOfObjectsList, inventarioList -> {
|
|
||||||
List<String> codMarts = Stream.of(inventarioList)
|
|
||||||
.map(x -> x.getCodMart().trim())
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
mArticoloRESTConsumer.getByCodMarts(codMarts, mtbAarts -> {
|
giacenzaRESTConsumerService.retrieveInstantItemSituation(codMdep, codMart, partitaMag, codJcom)
|
||||||
for (var row : inventarioList) {
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<InstantItemSituationResponseDto>> call, Response<ServiceRESTResponse<InstantItemSituationResponseDto>> response) {
|
||||||
|
analyzeAnswer(response, "getInstantItemSituation", data -> {
|
||||||
|
|
||||||
MtbAart foundMtbAart = null;
|
fillInstantItemSituationWithMtbAarts(data, onComplete, onFailed);
|
||||||
Optional<MtbAart> mtbAartOpt = Stream.of(mtbAarts)
|
}, onFailed);
|
||||||
.filter(x -> x.getCodMart().equalsIgnoreCase(row.getCodMart()))
|
|
||||||
.findFirst();
|
|
||||||
|
|
||||||
if (mtbAartOpt.isPresent()) {
|
|
||||||
foundMtbAart = mtbAartOpt.get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
row.setMtbAart(foundMtbAart);
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<InstantItemSituationResponseDto>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fillInstantItemSituationWithMtbAarts(InstantItemSituationResponseDto data, RunnableArgs<InstantItemSituationResponseDto> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
var inputCodMarts = new ArrayList<String>();
|
||||||
|
|
||||||
|
if (data.getIncomingItems() != null && !data.getIncomingItems().isEmpty()) {
|
||||||
|
inputCodMarts.addAll(Stream.of(data.getIncomingItems())
|
||||||
|
.map(InstantItemSituationIncomingItemDto::getCodMart)
|
||||||
|
.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.getAvailableItems() != null && !data.getAvailableItems().isEmpty()) {
|
||||||
|
inputCodMarts.addAll(Stream.of(data.getAvailableItems())
|
||||||
|
.map(MvwSitArtUdcDetInventario::getCodMart)
|
||||||
|
.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (inputCodMarts.isEmpty()) {
|
||||||
|
onComplete.run(data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mArticoloRESTConsumer.getByCodMarts(inputCodMarts, mtbAarts -> {
|
||||||
|
|
||||||
|
mArticoloRESTConsumer.fillMtbAartsWithMtbUntMis(mtbAarts, newMtbAarts -> {
|
||||||
|
if (data.getIncomingItems() != null && !data.getIncomingItems().isEmpty()) {
|
||||||
|
for (var item : data.getIncomingItems()) {
|
||||||
|
var mtbAart = Stream.of(newMtbAarts).filter(x -> x.getCodMart().equalsIgnoreCase(item.getCodMart()))
|
||||||
|
.findFirstOrElse(null);
|
||||||
|
|
||||||
|
if (mtbAart != null)
|
||||||
|
item.setMtbAart(mtbAart);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onComplete.run(inventarioList);
|
if (data.getAvailableItems() != null && !data.getAvailableItems().isEmpty()) {
|
||||||
|
for (var item : data.getAvailableItems()) {
|
||||||
|
var mtbAart = Stream.of(newMtbAarts).filter(x -> x.getCodMart().equalsIgnoreCase(item.getCodMart()))
|
||||||
|
.findFirstOrElse(null);
|
||||||
|
|
||||||
|
if (mtbAart != null)
|
||||||
|
item.setMtbAart(mtbAart);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onComplete.run(data);
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
|
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,34 @@
|
|||||||
package it.integry.integrywmsnative.core.rest.consumers;
|
package it.integry.integrywmsnative.core.rest.consumers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MvwSitArtUdcDetInventario;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.giacenza.InstantItemSituationResponseDto;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
public interface GiacenzaRESTConsumerService {
|
public interface GiacenzaRESTConsumerService {
|
||||||
|
|
||||||
|
@GET("wms/giacenza/availableItemsByPosizione")
|
||||||
|
Call<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> retrieveAvailableItems(
|
||||||
|
@Query("posizione") String posizione);
|
||||||
|
|
||||||
|
@GET("wms/giacenza/availableItemsByArticolo")
|
||||||
|
Call<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> retrieveAvailableItemsByArt(
|
||||||
|
@Query("codMart") String codMart);
|
||||||
|
|
||||||
|
@GET("wms/giacenza/availableItemsByArticolo")
|
||||||
|
Call<ServiceRESTResponse<List<MvwSitArtUdcDetInventario>>> retrieveAvailableItemsByArt(
|
||||||
|
@Query("codMart") String codMart,
|
||||||
|
@Query("partitaMag") String partitaMag);
|
||||||
|
|
||||||
|
@GET("wms/giacenza/instantItemSituation")
|
||||||
|
Call<ServiceRESTResponse<InstantItemSituationResponseDto>> retrieveInstantItemSituation(
|
||||||
|
@Query("codMdep") String codMdep,
|
||||||
|
@Query("codMart") String codMart,
|
||||||
|
@Query("partitaMag") String partitaMag,
|
||||||
|
@Query("codJcom") String codJcom);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
@@ -42,7 +44,7 @@ public class InventarioRESTConsumer extends _BaseRESTConsumer {
|
|||||||
.enqueue(new Callback<>() {
|
.enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(@NonNull Call<ServiceRESTResponse<RetrieveInventarioArtsResponseDTO>> call, @NonNull Response<ServiceRESTResponse<RetrieveInventarioArtsResponseDTO>> response) {
|
public void onResponse(@NonNull Call<ServiceRESTResponse<RetrieveInventarioArtsResponseDTO>> call, @NonNull Response<ServiceRESTResponse<RetrieveInventarioArtsResponseDTO>> response) {
|
||||||
analyzeAnswer(response, "loadInventario", onComplete, onFailed);
|
analyzeAnswer(response, "loadInventarioArts", onComplete, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -52,25 +54,36 @@ public class InventarioRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<MtbInvent> makeSynchronousRetrieveRequest() throws Exception {
|
||||||
|
var inventarioRESTConsumerService = RESTBuilder.getService(InventarioRESTConsumerService.class, 120);
|
||||||
|
|
||||||
|
var response = inventarioRESTConsumerService.retrieve()
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
var data = analyzeAnswer(response, "retrieveInventario");
|
||||||
|
if (data == null) return null;
|
||||||
|
return data.getInventories();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void makeInsertRequest(MtbInvent inventarioToInsert, final Runnable onComplete, final RunnableArgs<Exception> onFailed) {
|
public void makeInsertRequest(MtbInvent inventarioToInsert, final Runnable onComplete, final RunnableArgs<Exception> onFailed) {
|
||||||
var request = new InsertInventarioRequestDTO()
|
var request = new InsertInventarioRequestDTO()
|
||||||
.setMtbInvent(inventarioToInsert);
|
.setMtbInvent(inventarioToInsert);
|
||||||
|
|
||||||
var inventarioRESTConsumerService = RESTBuilder.getService(InventarioRESTConsumerService.class, 120);
|
var inventarioRESTConsumerService = RESTBuilder.getService(InventarioRESTConsumerService.class, 300);
|
||||||
inventarioRESTConsumerService
|
inventarioRESTConsumerService
|
||||||
.insert(inventarioToInsert.getIdInventario(), request)
|
.insert(inventarioToInsert.getIdInventario(), request)
|
||||||
.enqueue(new Callback<>() {
|
.enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
analyzeAnswer(response, "insertInventario", ignored -> onComplete.run(), onFailed);
|
analyzeAnswer(response, "insertInventario", ignored -> onComplete.run(), onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.inventario.InsertInventarioRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.inventario.InsertInventarioRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.inventario.RetrieveInventariResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.inventario.RetrieveInventarioArtsResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.inventario.RetrieveInventarioArtsResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.inventario.RetrieveInventarioResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.inventario.RetrieveInventarioResponseDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@@ -12,6 +13,9 @@ import retrofit2.http.Path;
|
|||||||
|
|
||||||
public interface InventarioRESTConsumerService {
|
public interface InventarioRESTConsumerService {
|
||||||
|
|
||||||
|
@GET("wms/inventario/")
|
||||||
|
Call<ServiceRESTResponse<RetrieveInventariResponseDTO>> retrieve();
|
||||||
|
|
||||||
@GET("wms/inventario/{inventoryId}")
|
@GET("wms/inventario/{inventoryId}")
|
||||||
Call<ServiceRESTResponse<RetrieveInventarioResponseDTO>> retrieve(
|
Call<ServiceRESTResponse<RetrieveInventarioResponseDTO>> retrieve(
|
||||||
@Path("inventoryId") long inventoryId);
|
@Path("inventoryId") long inventoryId);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user