Compare commits

...

402 Commits

Author SHA1 Message Date
47a1ab8223 Finish v1.8.9(239) 2021-10-14 17:17:12 +02:00
7a9bd15cfa -> v1.18.9 (239) 2021-10-14 17:16:52 +02:00
f902439086 Implementato nuovo servizio di printEtichettaSSCC 2021-10-14 17:16:04 +02:00
e7334d358b Finish v1.8.8(238) 2021-10-13 16:16:03 +02:00
262986f02c Finish v1.8.8(238) 2021-10-13 16:16:02 +02:00
76188aa792 -> v1.18.8 (238) 2021-10-13 16:15:57 +02:00
eb67d2fc65 Fix su controllo fake giacenza 2021-10-13 16:15:20 +02:00
6e176c0b7f Finish v1.18.7(237) 2021-10-11 19:09:20 +02:00
83b2327247 Finish v1.18.7(237) 2021-10-11 19:09:20 +02:00
7605c4d70a -> v1.18.7 (237) 2021-10-11 19:09:11 +02:00
5a8935675c Riduzione caratteri usati nel filtro_ordini 2021-10-11 19:08:11 +02:00
1645fba77c Finish v1.18.6(236) 2021-10-07 10:53:32 +02:00
6929a386db Finish v1.18.6(236) 2021-10-07 10:53:32 +02:00
93c3350cb2 -> v1.18.6 (236) 2021-10-07 10:53:26 +02:00
2b97faaa65 Fix su decimali nel caso di FlagDig 2021-10-07 10:52:44 +02:00
9260379c5f Invalidata la cache del menu durante il logout 2021-09-30 15:23:54 +02:00
35e7fd60be Finish v1.18.5(235) 2021-09-30 13:35:49 +02:00
1bbe5818f8 Finish v1.18.5(235) 2021-09-30 13:35:48 +02:00
65d372c04c -> v1.18.5 (235) 2021-09-30 13:35:42 +02:00
be1c5ecd0b Sistemato caricamento menu laterale (Drawer) 2021-09-30 13:35:09 +02:00
30e16fb765 Finish v1.18.4(234) 2021-09-27 19:08:16 +02:00
effff99e9a Finish v1.18.4(234) 2021-09-27 19:08:15 +02:00
c40bb8d7b0 -> v1.18.4 (234) 2021-09-27 19:08:08 +02:00
a7063c70eb Invertito boolean di fakeGiacenza in Spedizione 2021-09-27 19:07:03 +02:00
512f5b0de3 Finish v1.18.3(233) 2021-09-27 12:50:13 +02:00
e306c28723 Finish v1.18.3(233) 2021-09-27 12:50:12 +02:00
f361701ad9 -> v1.18.3 (233) 2021-09-27 12:50:05 +02:00
aa00c440b0 Fix su qta_cnf in Fabbisogno linee prod 2021-09-27 12:49:24 +02:00
df2a566322 Finish v1.8.2(232) 2021-09-27 10:53:59 +02:00
eb83f8babb Finish v1.8.2(232) 2021-09-27 10:53:59 +02:00
e21946fe23 -> v1.18.2 (232) 2021-09-27 10:53:51 +02:00
30b5053a22 Risolto controllo su UL e CodArt in AddExtraItems 2021-09-27 10:53:06 +02:00
914618cfeb Finish v1.8.1(231) 2021-09-27 10:28:33 +02:00
53ebf6ff14 Finish v1.8.1(231) 2021-09-27 10:28:33 +02:00
34c2065041 -> v1.18.1 (231) 2021-09-27 10:28:26 +02:00
db7ceedb4a Rimosso controllo errato su ean128 2021-09-27 10:27:54 +02:00
1ef70c4f3a Sistemato arrotondamento decimali in fase di picking uscita 2021-09-24 12:12:37 +02:00
e1eae00e01 Finish v1.18.0(230) 2021-09-23 11:44:29 +02:00
f8533daeed Finish v1.18.0(230) 2021-09-23 11:44:28 +02:00
ff4d71e616 -> v1.18.0 (230) 2021-09-23 11:44:22 +02:00
8015961054 Finish MenuRefactoring 2021-09-23 11:42:02 +02:00
a9164109da Fix su refMtbColr 2021-09-23 11:41:32 +02:00
4a884b92ad Sistemata libreria Honeywell 2021-09-15 19:15:30 +02:00
6f15169157 Vario ed eliminazione delle personalizzazioni non più necessarie 2021-09-15 18:56:52 +02:00
eb99c9d8cf Aggiunto controllo su data scadenza < oggi 2021-09-10 12:22:04 +02:00
0cc31a4a8e Implementato controllo su barcode UL/Articolo in fase di add extra item. 2021-09-09 16:49:40 +02:00
a6664102db Vario 2021-09-02 09:56:15 +02:00
eaeef05e64 Vario 2021-08-12 11:02:50 +02:00
98b6a32126 Rename 2021-08-11 15:20:42 +02:00
fcddda8e3f Refactoring di Versamento e Recupero materiale produzione 2021-08-11 15:19:35 +02:00
9033548455 Refactoring dialog filtro accettazione ordini produzione 2021-08-06 15:35:25 +02:00
18b4b08e1b Refactoring accettazione ordini produzione 2021-08-06 13:30:03 +02:00
627d3646a6 Refactoring activity lista bancali 2021-08-06 11:37:26 +02:00
8d87970a75 Renaming 2021-08-06 10:22:48 +02:00
ea6b26e00f Refactoring activity contenuto bancale 2021-08-05 19:11:44 +02:00
624a880ad5 Refactoring main list accettazione 2021-08-05 18:24:50 +02:00
fbcda5eaf6 Implementato servizio di retrieve menu 2021-08-05 15:25:06 +02:00
fbe095b7f7 Refactoring splash screen 2021-08-05 13:07:05 +02:00
d4bd92ec90 Finish v1.17.9(229) 2021-07-26 11:52:29 +02:00
c3ee5519b4 Finish v1.17.9(229) 2021-07-26 11:52:28 +02:00
1394725286 -> v1.17.9 (928) 2021-07-26 11:52:22 +02:00
b4cf8f629c Implementato Assegna lotto su collo scarico 2021-07-26 11:42:21 +02:00
ec49384b58 Finish v1.17.8(228) 2021-07-21 17:49:30 +02:00
0404863e3d Finish v1.17.8(228) 2021-07-21 17:49:29 +02:00
b71d627f99 -> v1.17.8 (228) 2021-07-21 17:49:24 +02:00
403541c8e0 Fix su background color del DialogInputQuantity 2021-07-21 17:48:51 +02:00
f1e2a3a536 Finish v1.17.7(227) 2021-07-20 18:31:33 +02:00
23bb284cff Finish v1.17.7(227) 2021-07-20 18:31:32 +02:00
449955f182 -> v1.17.7 (227) 2021-07-20 18:31:27 +02:00
15d3b1858a Migliorie a Rientro Merce 2021-07-20 18:30:57 +02:00
cfb3acc33d Finish v1.17.6(226) 2021-07-20 13:07:07 +02:00
61768fb2d0 Finish v1.17.6(226) 2021-07-20 13:07:06 +02:00
d782e8667a -> v1.17.6 (226) 2021-07-20 13:07:01 +02:00
e3d366b7a5 Fix su rendering in Rientro Merce da produzione 2021-07-20 13:06:17 +02:00
c64112835b Merge tag 'v.1.17.5(225)' into develop
Finish v.1.17.5(225)
2021-07-20 12:01:09 +02:00
7ebc5de620 Finish v.1.17.5(225) 2021-07-20 12:01:08 +02:00
aa93dc489e -> 1.17.5 (225) 2021-07-20 12:00:58 +02:00
6c1be3a7bc Finish v1.7.4(224) 2021-07-20 10:31:34 +02:00
18593c7fa0 Merge branch 'master' into develop 2021-07-20 10:31:34 +02:00
3a6b87ba47 -> v1.7.4 (224) 2021-07-20 10:31:28 +02:00
95ee04fc2a Finish v1.17.4(223) 2021-07-20 10:01:54 +02:00
1d3113ce2e Merge branch 'master' into develop 2021-07-20 10:01:54 +02:00
ef3bac3b0b Revert build gradle 2021-07-20 10:01:47 +02:00
d5f590bfda Finish v1.17.4(222) 2021-07-19 19:17:58 +02:00
1b0f9fb4de Finish v1.17.4(222) 2021-07-19 19:17:57 +02:00
b1e309dc1c -> v1.17.4 (222) 2021-07-19 19:17:52 +02:00
6da020c5cc Implementato rientro merce da produzione 2021-07-19 19:17:19 +02:00
da4d66ecfe Merge tag 'v1.17.3(221)' into develop
Finish v1.17.3(221)
2021-07-16 11:36:36 +02:00
18efcb31a0 Finish v1.17.3(221) 2021-07-16 11:36:35 +02:00
d31cb71f9e -> 1.17.3 (221) 2021-07-16 11:36:29 +02:00
86c99a99ca Merge tag 'zebra_tc210k' into develop
Finish zebra_tc210k
2021-07-16 11:34:21 +02:00
ba1a70e73e Finish zebra_tc210k 2021-07-16 11:34:20 +02:00
c822c3e0ef [SAPORIVERI]
Aggiunto alla libreria scanner zebra il modello TC210K
2021-07-16 11:34:14 +02:00
42746b3656 Finish v1.17.2(220) 2021-06-08 15:58:21 +02:00
2782c4b477 Finish v1.17.2(220) 2021-06-08 15:58:20 +02:00
5f13f7a634 -> v1.17.2 (220) 2021-06-08 15:58:13 +02:00
e811514764 Fix su thread in posizionamento merce 2021-06-08 15:57:39 +02:00
21137b1224 Finish v1.17.1(219) 2021-05-21 09:21:48 +02:00
7da0a5ade9 Finish v1.17.1(219) 2021-05-21 09:21:47 +02:00
86d92b947d -> v1.17.1 (219) 2021-05-21 09:21:35 +02:00
374127dfe9 Finish v1.17.0(218) 2021-05-20 15:11:00 +02:00
91b43d1974 Finish v1.17.0(218) 2021-05-20 15:10:59 +02:00
c167893544 -> v1.17.0 (218) 2021-05-20 15:10:55 +02:00
4c9a1bbaa9 Implementata barra di ricerca nel dialog di selezione articoli da prelevare 2021-05-20 15:09:51 +02:00
f970eb6cac Finish v1.16.35(217)#2 2021-05-19 11:32:42 +02:00
1e1163c04d Finish v1.16.35(217)#2 2021-05-19 11:32:41 +02:00
48f1307095 Revert "Aggiornati build.gradle"
This reverts commit 97bf8c291a.

# Conflicts:
#	dynamic_frudis/build.gradle
#	dynamic_ime/build.gradle
#	dynamic_saporiveri/build.gradle
#	dynamic_saporiveri_pv/build.gradle
#	dynamic_vgalimenti/build.gradle
2021-05-19 11:32:14 +02:00
64fdda43db Merge branch 'master' into develop 2021-05-19 09:49:58 +02:00
6611617a81 Finish Hotfix-Script 2021-05-19 09:49:57 +02:00
f488e6bad0 Fix scripts 2021-05-19 09:49:52 +02:00
266b3d707f Merge branch 'master' into develop 2021-05-18 17:48:36 +02:00
a726631925 Finish Hotfix-Script 2021-05-18 17:48:36 +02:00
0b634154e4 Fix scripts 2021-05-18 17:48:31 +02:00
3e4d4300f1 Merge branch 'master' into develop 2021-05-18 16:28:23 +02:00
fb527c443f Finish Hotfix-Script 2021-05-18 16:28:23 +02:00
259c719344 Fix scripts 2021-05-18 16:26:52 +02:00
178787d907 Merge branch 'master' into develop 2021-05-18 15:52:54 +02:00
a51cf2e899 Finish Hotfix-Script 2021-05-18 15:52:53 +02:00
9f587ac8b1 Fix scripts 2021-05-18 15:52:48 +02:00
df97d5c4a2 Merge branch 'master' into develop 2021-05-18 15:39:34 +02:00
697bd1e85e Finish Hotfix-Script 2021-05-18 15:39:33 +02:00
5ace80ba28 Fix scripts 2021-05-18 15:39:28 +02:00
1c8abcaa58 Merge branch 'master' into develop 2021-05-18 13:04:52 +02:00
96ab52821c Finish Hotfix-Script 2021-05-18 13:04:52 +02:00
ecd58dea14 Fix scripts 2021-05-18 13:04:46 +02:00
9cdc4f299e Merge branch 'master' into develop 2021-05-18 12:34:36 +02:00
39af233380 Finish Hotfix-Script 2021-05-18 12:34:35 +02:00
2576d423da Fix scripts 2021-05-18 12:34:30 +02:00
234c21c7a1 Finish v1.16.35(217) 2021-05-18 11:47:01 +02:00
6d5b6b0260 Finish v1.16.35(217) 2021-05-18 11:47:01 +02:00
f03976595c -> v1.16.35 (217) 2021-05-18 11:46:56 +02:00
54dbade661 Fix su thread in fase di apertura del dialog di caricamento 2021-05-18 11:46:25 +02:00
6d54bda9b4 Merge branch 'master' into develop 2021-05-17 18:41:51 +02:00
4c244c1927 Finish Hotfix-BuildGradle 2021-05-17 18:41:50 +02:00
ee3ee54e69 Aggiornati build.gradle 2021-05-17 18:41:45 +02:00
82d4607375 Merge branch 'master' into develop 2021-05-17 18:32:26 +02:00
7ecdbd1f11 Finish Hotfix-BuildGradle 2021-05-17 18:32:25 +02:00
a4c30b7fdd Aggiornati build.gradle 2021-05-17 18:32:20 +02:00
3ca75ca11a Merge branch 'master' into develop 2021-05-17 17:59:53 +02:00
f2f8594a18 Finish Hotfix-BuildGradle 2021-05-17 17:59:52 +02:00
7b7b3e554b Aggiornati build.gradle 2021-05-17 17:59:47 +02:00
7913771b2a Merge branch 'master' into develop 2021-05-17 17:50:13 +02:00
ebcd8eea0a Finish Hotfix-GradleVersion 2021-05-17 17:50:13 +02:00
97bf8c291a Aggiornati build.gradle 2021-05-17 17:50:07 +02:00
e4f783862b Finish v1.16.34(216)#2 2021-05-17 17:35:11 +02:00
653d4def4e Finish v1.16.34(216)#2 2021-05-17 17:35:10 +02:00
3cf63fc1f1 Rimossa libreria per la scansione dei barcode tramite fotocamera 2021-05-17 17:34:41 +02:00
45ddca1928 Finish v1.16.34(216) 2021-05-13 17:47:58 +02:00
f4ff33a942 Finish v1.16.34(216) 2021-05-13 17:47:54 +02:00
ca5b5d3151 -> v1.16.34 (216) 2021-05-13 17:47:47 +02:00
e22f7cf5c7 Riabilitato filtro paese 2021-05-13 17:45:52 +02:00
8ea38fd31c Sistemato ricaricamento ordini di uscita senza perdere l'istanza del filtro applicato. 2021-05-13 17:39:29 +02:00
ea7acf6053 Refactoring DialogFiltroVenditaAvanzato 2021-05-13 15:33:58 +02:00
3a0d4d290c Aggiornamenti vari.
Implementata gestione di partite multiple all'interno di una UL.
2021-05-13 09:44:43 +02:00
c8053831db Finish v1.16.33(215) 2021-05-07 13:04:51 +02:00
e0c07ea06e Finish v1.16.33(215) 2021-05-07 13:04:50 +02:00
3e79b52e23 -> v1.16.33 (215) 2021-05-07 13:04:44 +02:00
7d7712e57a Ordinamento ordini uscita 2021-05-07 13:03:45 +02:00
6d7a047e8e Finish v1.16.32(214) 2021-05-04 17:34:36 +02:00
72e4f2a0b9 Finish v1.16.32(214) 2021-05-04 17:34:35 +02:00
ef6cdc6a86 -> v1.16.32 (214) 2021-05-04 17:34:30 +02:00
23b86e68cc Fix su scansione barcode ean13 in dialog input quantity 2021-05-04 17:34:00 +02:00
2e46f9f665 Finish v1.16.31(213) 2021-04-26 12:01:38 +02:00
88b1c56360 Finish v1.16.31(213) 2021-04-26 12:01:37 +02:00
1d71ac10bd -> v1.16.31 (213) 2021-04-26 12:01:29 +02:00
8eb677ecdf Sostituito getBySSCC con get generica dei colli. 2021-04-26 12:01:00 +02:00
74efbac452 Finish v1.16.30(212) 2021-04-23 15:25:16 +02:00
9c6375083f Finish v1.16.30(212) 2021-04-23 15:25:16 +02:00
b24d5271a4 -> v1.16.30 (212) 2021-04-23 15:23:54 +02:00
b5626e5b08 Fix su refMtbColr in Spedizione 2021-04-23 15:23:28 +02:00
fd2e1fa4f4 Finish v1.16.29(211) 2021-04-23 12:59:11 +02:00
a3f5072646 Finish v1.16.29(211) 2021-04-23 12:59:10 +02:00
1258e8c3e6 -> v1.16.29 (211) 2021-04-23 12:58:58 +02:00
ccef0fe528 Fix su qtaDaPrelevare in spedizione 2021-04-23 12:58:03 +02:00
9bb5d1adce Finish v1.16.28(210) 2021-04-16 18:33:55 +02:00
ac446d953c Finish v1.16.28(210) 2021-04-16 18:33:53 +02:00
407ff0b264 -> v1.16.28 (210) 2021-04-16 18:33:49 +02:00
10e748b9d4 Fix su getValue nel caso di integer in gest setup 2021-04-16 18:33:16 +02:00
e30273fe42 Finish v1.16.27(209) 2021-04-15 12:10:26 +02:00
44564245a7 Finish v1.16.27(209) 2021-04-15 12:10:25 +02:00
920f306907 -> v1.16.27 (209) 2021-04-15 12:10:20 +02:00
90aa52ab55 Fix versamento merce 2021-04-15 12:09:43 +02:00
93f3eb65f0 Finish v1.16.26(208) 2021-04-14 12:25:51 +02:00
eb94944928 Finish v1.16.26(208) 2021-04-14 12:25:50 +02:00
28698ba306 -> v1.16.26 (208) 2021-04-14 12:25:45 +02:00
c713bbebbc Fix su creazione collo involontaria in DialogScanOrCreateUL 2021-04-14 12:25:09 +02:00
38e2a02766 Finish v1.16.25(207) 2021-04-14 11:41:26 +02:00
dd8bf264a4 Finish v1.16.25(207) 2021-04-14 11:41:25 +02:00
9488c1994d -> v1.16.25 (207) 2021-04-14 11:41:20 +02:00
16099cdaf6 Fix su mtbPartitaMag in servizio spostaArtsTraUL 2021-04-14 11:40:06 +02:00
f061f2bfc9 Finish v1.16.24(206)#2 2021-04-12 15:34:42 +02:00
f7253fd44c Finish v1.16.24(206)#2 2021-04-12 15:34:42 +02:00
e12d371567 Finish v1.16.24(206) 2021-04-12 13:44:17 +02:00
5596f71c03 Merge branch 'master' into develop 2021-04-12 13:44:17 +02:00
8669b812f5 -> v1.16.24 (206) 2021-04-12 13:44:10 +02:00
3243484dd0 Ripristinato stato del filtro nell'elenco di ordini in uscita 2021-04-12 13:43:39 +02:00
37114dc4d1 Finish v1.16.23(205) 2021-04-12 12:48:26 +02:00
d5af79abba Finish v1.16.23(205) 2021-04-12 12:48:25 +02:00
b50aa7a9d2 -> v1.16.23 (205) 2021-04-12 12:48:19 +02:00
cc333c3147 Mini refactoring DialogAskCliente 2021-04-12 12:47:28 +02:00
fc5044134c Finish v1.16.22(204) 2021-04-12 09:39:10 +02:00
93a3e39332 Merge branch 'master' into develop 2021-04-12 09:39:10 +02:00
3eaf187136 -> v1.16.22 (204) 2021-04-12 09:39:03 +02:00
36f9fa1e36 Fix su null in ColliDataRecover 2021-04-12 09:37:45 +02:00
0f89913609 Finish v1.16.21(203) 2021-04-09 16:51:41 +02:00
4cda247ddc Finish v1.16.21(203) 2021-04-09 16:51:41 +02:00
e88ea0a45c -> v1.16.21 (203) 2021-04-09 16:51:36 +02:00
726cf80dc0 Implementata setup per ricalcolo qta 2021-04-09 16:51:02 +02:00
a779d8b94d Finish v1.16.20(202) 2021-04-08 18:18:32 +02:00
f41e1f3a02 Finish v1.16.20(202) 2021-04-08 18:18:31 +02:00
aa75a77913 -> v1.16.20 (202) 2021-04-08 18:18:24 +02:00
639be21ab5 Revert su ricalcolo qta_cnf in caso di peso variabile 2021-04-08 18:17:17 +02:00
dfc241e7f6 Finish v1.16.19(201) 2021-04-06 13:36:15 +02:00
7948c7fa97 Finish v1.16.19(201) 2021-04-06 13:36:14 +02:00
2ae311c28a -> v1.16.19 (201) 2021-04-06 13:36:06 +02:00
56ba43183c Fix su causale in Picking Libero.
Fix su nome utente in MtbColt e MtbColr.
2021-04-06 13:35:36 +02:00
b93b309ea8 Finish v1.16.18(200) 2021-04-06 12:22:43 +02:00
f5a2d012e5 Finish v1.16.18(200) 2021-04-06 12:22:42 +02:00
bf07e3d0f0 -> v1.16.18 (200) 2021-04-06 12:22:33 +02:00
91f075976d Completato refactoring di DialogScanOrCreateLU 2021-04-06 12:21:49 +02:00
ee70faefa9 Completato refactoring Versamento Merce (+ gestione non conformi) 2021-04-02 18:43:19 +02:00
13cca99b09 Fix su rendering lista ordini uscita 2021-03-17 12:26:15 +01:00
e55b6f4934 Finish v1.16.17(199) 2021-03-16 17:55:28 +01:00
62d4b6f724 Finish v1.16.17(199) 2021-03-16 17:55:28 +01:00
19b0465569 -> v1.16.17 (199) 2021-03-16 17:55:22 +01:00
d4f44c1ab7 Fix vari 2021-03-16 17:53:39 +01:00
6bf183d73c Finish v1.16.16(198) 2021-03-15 16:02:56 +01:00
a939f0ba08 Finish v1.16.16(198) 2021-03-15 16:02:56 +01:00
08b44cb45b -> v1.16.116 (198) 2021-03-15 16:02:51 +01:00
fef57622cf Implementato blocco per scansione EAN128 nel caso non sia abilitato il Picking Manuale 2021-03-15 15:54:52 +01:00
cbf36ec962 Fix su qta negative in accettazione 2021-03-15 13:09:40 +01:00
adc7343352 Implementato flag per impostare automaticamente la qta ordinata in fase di picking per Spedizione.
Migliorata gestione dell'update dei campi nel caso si scansiona un ean con peso in fase di inserimento qta.
2021-03-12 17:05:20 +01:00
94b2959d29 Implementata lettura barcode pedane in gestione resi 2021-03-12 13:33:54 +01:00
11903d1a34 Refactoring ultimi arrivi fornitori 2021-03-11 15:45:42 +01:00
ff448b36b9 Refactoring ultime consegne cliente 2021-03-11 13:11:06 +01:00
aa8a54547c Implementato versamento in depositi diversi da quello dell'utente loggato 2021-03-10 16:11:50 +01:00
e1d1878131 Migliorato SimpleDialog 2021-03-10 12:33:58 +01:00
81bc85f854 Finish v1.16.15(197) 2021-03-08 16:46:28 +01:00
00c90021b5 Finish v1.16.15(197) 2021-03-08 16:46:28 +01:00
89e046cc78 -> v1.16.15 (197) 2021-03-08 16:46:22 +01:00
2b2cf3656c Sistemata cancellazione colli in fase di picking per fabbisogno linea prod. 2021-03-08 16:45:39 +01:00
47a2c36e04 Finish v1.16.14(196) 2021-03-05 15:36:29 +01:00
bca0d0cc52 Finish v1.16.14(196) 2021-03-05 15:36:28 +01:00
594a6fc9d2 -> v1.16.14 (196) 2021-03-05 15:36:23 +01:00
e633dcbc4d Fix su where cond flag_evaso_prod 2021-03-05 15:35:42 +01:00
99de98db28 Risolto problema di confezioni 0 quando scansiono un codice ean peso e il peso è sotto il peso medio. 2021-03-05 12:12:44 +01:00
cce8ea5ca0 Sistemato actionDone su soft keyboard 2021-03-05 12:01:38 +01:00
2cb693cafc Finish v1.16.13(195) 2021-03-04 18:28:54 +01:00
cc54dfb452 Finish v1.16.13(195) 2021-03-04 18:28:54 +01:00
68d97a167d -> v1.16.13 (195) 2021-03-04 18:28:49 +01:00
adde82c191 Fix su dialogFragment 2021-03-04 18:27:42 +01:00
5b1f681a11 Cambiato titolo del fabbisogno linee prod 2021-03-04 15:32:59 +01:00
8035cf15a8 Finish v1.16.12(194) 2021-03-03 16:54:03 +01:00
d277bf3e8e Finish v1.16.12(194) 2021-03-03 16:54:02 +01:00
5d4130f131 -> v1.16.12 (194) 2021-03-03 16:53:57 +01:00
d51c62143c Gestito flag di showSecondaryUntMis nelle Settings dell'app 2021-03-03 16:53:31 +01:00
26a887c5aa Aggiunta seconda unità di misura in Accettazione 2021-03-03 16:36:14 +01:00
838b3b8bb8 Finish v1.16.11(193) 2021-03-03 10:26:59 +01:00
0a0de9d938 Finish v1.16.11(193) 2021-03-03 10:26:58 +01:00
eea134ce82 -> v1.16.11 (193) 2021-03-03 10:26:53 +01:00
1020a31b89 Completata finestra di info sulle righe in picking uscita 2021-03-03 10:26:20 +01:00
0133a9232f Fix salvataggio id riga collo in Picking Libero 2021-03-03 10:00:12 +01:00
3ff98fcda1 Finish v1.16.10(192) 2021-03-02 09:19:20 +01:00
58b4ebb420 Finish v1.16.10(192) 2021-03-02 09:19:19 +01:00
fc0cb423e3 -> v1.16.10 (192) 2021-03-02 09:19:13 +01:00
451f45b1a1 Fix main toolbar 2021-02-26 11:51:24 +01:00
b672ca1d37 Finish v1.16.9(191) 2021-02-24 12:48:08 +01:00
c4c4013995 Finish v1.16.9(191) 2021-02-24 12:48:07 +01:00
e9230aba11 -> v1.16.9 (191) 2021-02-24 12:48:03 +01:00
d044c2ab26 Fix su dialog dismiss in DialogScanArt.
Rivista implementazione di destroy fragment.
2021-02-24 12:47:33 +01:00
843679620b Finish v1.16.8(190) 2021-02-23 16:48:40 +01:00
7346357b8e Finish v1.16.8(190) 2021-02-23 16:48:40 +01:00
b29a64a75a -> v1.16.8 (190) 2021-02-23 16:48:35 +01:00
163a8cb27a Fix su raggruppamento per partita nel calcolo dei fabbisogni per produzione 2021-02-23 16:48:07 +01:00
8311f56154 Finish v1.16.7(189) 2021-02-23 16:21:22 +01:00
0a76cc856c Finish v1.16.7(189) 2021-02-23 16:21:21 +01:00
0ed536b0d5 -> v1.16.7 (189) 2021-02-23 16:21:16 +01:00
c8f8ccd64f Ripristinate etichette colorate per indicare stato evasione ordini.
Possibile fix su onCreate di DialogScanArt.
2021-02-23 16:20:48 +01:00
ecd0678aab Finish v1.16.6(188) 2021-02-22 16:30:24 +01:00
3d7fb9e14f Finish v1.16.6(188) 2021-02-22 16:30:23 +01:00
489687d392 -> v1.16.6 (188) 2021-02-22 16:30:18 +01:00
5aa360af7c Fix su gestione impostata erroneamente in Spedizione 2021-02-22 16:29:47 +01:00
e43ba3341f Finish v1.16.5(187) 2021-02-19 17:09:17 +01:00
db21ce554a Finish v1.16.5(187) 2021-02-19 17:09:16 +01:00
86c9f3464c -> v1.16.5 (187) 2021-02-19 17:09:09 +01:00
6376668d15 Fix su fabbisogno per linee di produzione: non veniva calcolata la qta già scaricata dagli ordini 2021-02-19 17:08:28 +01:00
669bc1a8f5 Finish v1.16.4(186) 2021-02-18 15:08:50 +01:00
d78d99094f Finish v1.16.4(186) 2021-02-18 15:08:49 +01:00
c2c23c37a4 -> v1.16.4 (186) 2021-02-18 15:08:41 +01:00
b30bdb3df1 Sbloccata possibilità di imputare una quantità a peso variabile maggiore della qta ordinata. 2021-02-18 13:07:44 +01:00
8e7ad53ec9 Sistemati ricalcoli di qta_cnf e num_cnf in caso di barcode a peso in Accettazione. 2021-02-17 17:55:57 +01:00
e36441db73 Finish v1.16.3(185) 2021-02-17 12:47:00 +01:00
97c63fb01d Finish v1.16.3(185) 2021-02-17 12:46:59 +01:00
cddc7681b0 -> v1.16.3 (185) 2021-02-17 12:46:52 +01:00
3663b2bf4e Rimossa domanda di posizionamento nel caso si apre una UL e non viene creata da 0. 2021-02-17 12:46:13 +01:00
91f4658fe3 Fix per click manuale in Spedizione 2021-02-17 11:05:17 +01:00
8fba80c764 Implementata scansione barcode su Elenco ordini uscita 2021-02-17 10:22:45 +01:00
6dbc0c5894 Fix su gestione fabbisogni 2021-02-16 09:43:48 +01:00
14035b4c92 Creata gestione fabbisogni linea di produzione 2021-02-15 19:18:03 +01:00
278f13ca6d Finish v1.16.2(184) 2021-02-10 12:13:42 +01:00
52eb9ee0b7 Finish v1.16.2(184) 2021-02-10 12:13:41 +01:00
e89c786233 -> v1.16.2 (184) 2021-02-10 12:13:35 +01:00
96439282cf Fix su link download APK 2021-02-10 12:12:47 +01:00
13577f3c43 Finish v1.16.1(183) 2021-02-09 16:43:48 +01:00
f6dcbace57 Finish v1.16.1(183) 2021-02-09 16:43:47 +01:00
2d0115723c -> v1.16.1 (183) 2021-02-09 16:43:41 +01:00
5f90810a0f Fix su lista nulla in getOrdiniInevasi 2021-02-09 16:43:04 +01:00
b4fd56d8e2 Finish v1.16.0(182) 2021-02-08 17:19:15 +01:00
ed2a36d66a Finish v1.16.0(182) 2021-02-08 17:19:14 +01:00
702ce4b79e -> v1.16.0 (182) 2021-02-08 17:19:09 +01:00
99aac144f5 Completato picking Extra-Items da altre UL. 2021-02-08 17:15:37 +01:00
766ae1ae01 Finish v1.15.0(181) 2021-02-05 19:43:30 +01:00
d16cec069c Finish v1.15.0(181) 2021-02-05 19:43:29 +01:00
0729b8ce87 -> v1.15.0 (181) 2021-02-05 19:43:23 +01:00
92a2cdaec6 Resettato peso in vendita 2021-02-05 19:40:00 +01:00
497bc54ebd Fix su ean peso in DialogInputQuantity 2021-02-05 15:52:16 +01:00
b00cd1f097 Refactoring elenco ordini uscita.
Vario.
2021-02-04 17:02:27 +01:00
cfc3649807 Fix su ricalcoli qtaDaEvadere nel caso di qtaCnf variabile 2021-02-01 17:45:41 +01:00
5ddd2e6235 Migliorata gestione delle variabili qta all'interno di DialogInputQuantity.
Fix su visualizzazione Diacon in DialogInputQuantity.
2021-02-01 15:42:14 +01:00
2174a19c0f Cambiato filename build 2021-01-25 09:51:53 +01:00
44cdbf929f Finish v1.14.3(180) 2021-01-21 19:07:12 +01:00
65c0e520c5 Finish v1.14.3(180) 2021-01-21 19:07:12 +01:00
062abb4ea3 -> v1.14.3 (180) 2021-01-21 19:07:07 +01:00
1d759cdcbf Rimossa domanda destinatario se non esiste alcun destinatario 2021-01-21 19:06:22 +01:00
15e1793962 Finish v1.14.2(179) 2021-01-21 18:13:02 +01:00
55fee02f36 Finish v1.14.2(179) 2021-01-21 18:13:02 +01:00
575ac2577f -> -> v1.14.2 (179) 2021-01-21 18:12:55 +01:00
3fc5cd3660 Fix per maggio 2021-01-21 18:10:42 +01:00
d77fbff509 Finish v1.14.1(178) 2021-01-21 15:53:35 +01:00
58865ca34b Finish v1.14.1(178) 2021-01-21 15:53:34 +01:00
23aa7f5261 -> v1.14.1 (178) 2021-01-21 15:53:27 +01:00
65532a3185 In picking libero è stata aggiunta la possibilità di scansionare un barcode che indichi un cliente o una commessa. 2021-01-19 19:23:31 +01:00
1440c52322 Aggiunta la possibilità di recuperare una UL in accettazione che non ha alcuna UL che la referenzi 2021-01-19 13:43:29 +01:00
4e36053ba6 Rimosso definitivamente DialogInputQuantity.
Fix su scansione barcodes posizioni.
2021-01-19 10:06:13 +01:00
c7777b261d Finish v1.14.0(177) 2020-12-31 12:23:19 +01:00
7b0a86bb81 Finish v1.14.0(177) 2020-12-31 12:23:18 +01:00
ebf2bd578e -> v.1.14.0 (177) 2020-12-31 12:23:13 +01:00
f90e2acc3e Implementato pulsante chiudi ordine in Spedizione 2020-12-31 12:22:13 +01:00
035f058bc3 Finish v1.13.30(176) 2020-12-28 12:18:26 +01:00
73e57e9430 Finish v1.13.30(176) 2020-12-28 12:18:25 +01:00
13cc9f6053 -> v1.13.30 (176) 2020-12-28 12:18:20 +01:00
d9844315a3 Sistemato salvataggio causale in Rettifica Giacenze nel caso in cui si preme il tasto Back nella videata del collo 2020-12-28 12:17:43 +01:00
ade37f07d6 Merge remote-tracking branch 'origin/develop' into develop 2020-12-22 13:29:26 +01:00
f02e9921cb Finish v1.13.29(175) 2020-12-22 13:29:17 +01:00
e8ce7a9eeb Finish v1.13.19(175) 2020-12-22 13:29:06 +01:00
61b0049a87 Finish v1.13.19(175) 2020-12-22 13:29:05 +01:00
5c4d72dae2 -> v1.13.20 (176) 2020-12-22 13:28:58 +01:00
39f52bf3dd Rimosse alcune viste non più utilizzate.
Aggiunta history dei lotti accettati.
2020-12-22 13:20:31 +01:00
e50aa1f014 Finish v1.13.28(174) 2020-12-17 13:03:50 +01:00
b1d06605cd Finish v1.13.28(174) 2020-12-17 13:03:50 +01:00
ed55eb4279 -> v1.13.28(174) 2020-12-17 13:03:42 +01:00
9ac96ac8fd Risolta anomalia del filtro ordine quando si recupera una UL.
Risolta anomalia dello spazio nel campo del Lotto.
2020-12-17 13:03:00 +01:00
5be3fd9c25 Merge branch 'master' into develop 2020-12-10 16:26:34 +01:00
bab558252a Finish Hotfix-QtaDaEvadere 2020-12-10 16:26:33 +01:00
c256b39119 Fix su qta da evadere in Accettazione.
-> v1.13.27 (173)
2020-12-10 16:26:28 +01:00
af76627c50 Finish v1.13.26(172) 2020-11-27 11:11:15 +01:00
f9544566e9 Finish v1.13.26(172) 2020-11-27 11:11:14 +01:00
4f02c3a4bc -> v1.13.26 (172) 2020-11-27 11:11:09 +01:00
ea8d8835cd Sostituita query load doc rows con vista 2020-11-27 11:09:53 +01:00
61e07e8f76 Finish v1.13.25(171) 2020-11-23 13:01:16 +01:00
962e1f7fa4 Finish v1.13.25(171) 2020-11-23 13:01:15 +01:00
07d889bcd5 -> v1.13.25 (171) 2020-11-23 13:01:07 +01:00
170db3eb0a Fix su unt mis accettazione 2020-11-23 13:00:39 +01:00
856a807e3e Finish v1.13.24(170) 2020-11-17 18:30:00 +01:00
c56aa812ff Finish v1.13.24(170) 2020-11-17 18:30:00 +01:00
770f014a70 -> v1.13.24 (170) 2020-11-17 18:29:56 +01:00
f6ff7aa80d Aggiunto controllo su refMtbColt 2020-11-17 18:29:15 +01:00
4cd3e7e102 Finish v1.13.23(169) 2020-11-17 10:40:22 +01:00
69bf5e319e Finish v1.13.23(169) 2020-11-17 10:40:21 +01:00
88fe4d82cd -> v1.13.23 (169) 2020-11-17 10:40:16 +01:00
c8cd794cfc Risolto problema di refMtbColt nulla in alcuni casi particolari della spedizione 2020-11-17 10:39:37 +01:00
5dcc567eab Merge branch 'master' into develop 2020-11-16 15:13:16 +01:00
89eafaf6ca Finish Hotfix-QueryDoc 2020-11-16 15:13:15 +01:00
6fc7f80ed4 -> v1.13.22 (168) 2020-11-16 15:13:08 +01:00
2464d44222 Merge branch 'master' into develop 2020-11-13 11:50:31 +01:00
96d544f2ad Finish Hotfix-Docs 2020-11-13 11:50:31 +01:00
e85ddc6580 Fix sum num_cnf query load righe doc 2020-11-13 11:50:25 +01:00
89f6b9ce71 Finish v1.13.21(167) 2020-11-13 10:25:30 +01:00
c7d0ed1747 Finish v1.13.21(167) 2020-11-13 10:25:30 +01:00
b84b3c28f3 -> v1.13.21 (167) 2020-11-13 10:25:23 +01:00
3a3bf4c2dd Fix su scannedMtbColr nullo in spedizione. 2020-11-13 10:24:42 +01:00
4809a96e5b Finish v1.13.20(166) 2020-11-11 12:33:21 +01:00
5f206feb12 Finish v1.13.20(166) 2020-11-11 12:33:20 +01:00
575762da2f -> v1.13.20 (166) 2020-11-11 12:33:14 +01:00
a96078c9e6 Risolto problema di picking diverso dal collo suggerito. 2020-11-11 12:32:38 +01:00
b1941d5c34 Aggiornato Gradle.
Sistemati i testi dei bottoni in dialog base.
Implementato logout nel dialog di errore all'avvio dell'app.
2020-11-11 10:48:08 +01:00
4dc688af14 Finish v1.13.19(165) 2020-11-10 15:21:50 +01:00
6675757317 Finish v1.13.19(165) 2020-11-10 15:21:50 +01:00
1310b34a8d Aggiunto supporto a Zebra TC20.
Fix vari.
2020-11-10 15:20:50 +01:00
4e8fe26c6b Merge branch 'master' into develop 2020-11-09 15:24:02 +01:00
32ff7bfa39 Finish v1.13.18(164) 2020-11-09 15:24:01 +01:00
c8cfa486e1 -> v1.13.18 (164) 2020-11-09 15:23:38 +01:00
0356c912e6 Finish v1.13.17(163) 2020-11-09 13:21:38 +01:00
7f448bbbb3 Finish v1.13.17(163) 2020-11-09 13:21:37 +01:00
f940b6f239 -> v1.13.17 (163) 2020-11-09 13:21:32 +01:00
a3de73dc66 Implementato suggerimento data scad in base alla shelf life del prodotto 2020-11-09 13:20:49 +01:00
9fa1aa156e Finish Refactoring_PickingResi 2020-11-09 12:29:17 +01:00
03e1a186b8 Completato refactoring picking resi 2020-11-09 12:29:12 +01:00
598372675f Merge branch 'develop' into feature/Refactoring_PickingResi
# Conflicts:
#	app/src/main/java/it/integry/integrywmsnative/MainApplicationComponent.java
2020-11-05 18:31:13 +01:00
ffccd2f3d3 Sistemata scansione barcode in DialogInputQuantityV2 2020-11-05 18:29:52 +01:00
4252e13323 Finish v1.13.16(162) 2020-11-05 12:52:26 +01:00
f9483e14be Ricreato caricamento lista principale 2020-11-04 12:40:28 +01:00
568 changed files with 25390 additions and 18258 deletions

View File

@@ -1,24 +1,12 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="java.util" alias="false" withSubpackages="false" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
<package name="io.ktor" alias="false" withSubpackages="true" />
</value>
</option>
<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
</value>
</option>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
@@ -127,5 +115,8 @@
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>

View File

@@ -7,7 +7,8 @@
<option name="ARTIFACT_NAME" value="" />
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic_agricoper,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="true" />

View File

@@ -1,59 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="app_frudis" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
<module name="WMS_Native.app" />
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
<option name="DEPLOY_AS_INSTANT" value="false" />
<option name="ARTIFACT_NAME" value="" />
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="true" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
<option name="FORCE_STOP_RUNNING_APP" value="true" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
<option name="DEBUGGER_TYPE" value="Auto" />
<Auto>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Auto>
<Hybrid>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Hybrid>
<Java />
<Native>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Native>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="true" />
<option name="STARTUP_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Sample Java Methods" />
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
</Profilers>
<option name="DEEP_LINK" value="" />
<option name="ACTIVITY_CLASS" value="" />
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
<method v="2">
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -1,59 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="app_gramm" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
<module name="WMS_Native.app" />
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
<option name="DEPLOY_AS_INSTANT" value="false" />
<option name="ARTIFACT_NAME" value="" />
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_frudis,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_frudis,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="true" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="false" />
<option name="FORCE_STOP_RUNNING_APP" value="true" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
<option name="DEBUGGER_TYPE" value="Auto" />
<Auto>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Auto>
<Hybrid>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Hybrid>
<Java />
<Native>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Native>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
<option name="STARTUP_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Sample Java Methods" />
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
</Profilers>
<option name="DEEP_LINK" value="" />
<option name="ACTIVITY_CLASS" value="" />
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
<method v="2">
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -1,59 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="app_ime" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
<module name="WMS_Native.app" />
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
<option name="DEPLOY_AS_INSTANT" value="false" />
<option name="ARTIFACT_NAME" value="" />
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_saporiveri,dynamic_saporiveri_pv,dynamic_vgalimenti" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="true" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="false" />
<option name="FORCE_STOP_RUNNING_APP" value="true" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
<option name="DEBUGGER_TYPE" value="Auto" />
<Auto>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Auto>
<Hybrid>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Hybrid>
<Java />
<Native>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Native>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
<option name="STARTUP_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Sample Java Methods" />
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
</Profilers>
<option name="DEEP_LINK" value="" />
<option name="ACTIVITY_CLASS" value="" />
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
<method v="2">
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -1,59 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="app_saporiveri" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
<module name="WMS_Native.app" />
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
<option name="DEPLOY_AS_INSTANT" value="false" />
<option name="ARTIFACT_NAME" value="" />
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri_pv,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri_pv,dynamic_vgalimenti" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="true" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
<option name="FORCE_STOP_RUNNING_APP" value="true" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
<option name="DEBUGGER_TYPE" value="Auto" />
<Auto>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Auto>
<Hybrid>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Hybrid>
<Java />
<Native>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Native>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
<option name="STARTUP_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Sample Java Methods" />
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
</Profilers>
<option name="DEEP_LINK" value="" />
<option name="ACTIVITY_CLASS" value="" />
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
<method v="2">
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -1,59 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="app_saporiveri_pv" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
<module name="WMS_Native.app" />
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
<option name="DEPLOY_AS_INSTANT" value="false" />
<option name="ARTIFACT_NAME" value="" />
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_vgalimenti,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_vgalimenti" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="true" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
<option name="FORCE_STOP_RUNNING_APP" value="true" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
<option name="DEBUGGER_TYPE" value="Auto" />
<Auto>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Auto>
<Hybrid>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Hybrid>
<Java />
<Native>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Native>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
<option name="STARTUP_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Sample Java Methods" />
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
</Profilers>
<option name="DEEP_LINK" value="" />
<option name="ACTIVITY_CLASS" value="" />
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
<method v="2">
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -7,7 +7,8 @@
<option name="ARTIFACT_NAME" value="" />
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv" />
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="WMS_Native.dynamic__base,WMS_Native.dynamic_agricoper,WMS_Native.dynamic_frudis,WMS_Native.dynamic_gramm,WMS_Native.dynamic_ime,WMS_Native.dynamic_saporiveri,WMS_Native.dynamic_saporiveri_pv,dynamic__base,dynamic_frudis,dynamic_gramm,dynamic_ime,dynamic_saporiveri,dynamic_saporiveri_pv" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="true" />

View File

@@ -2,13 +2,12 @@ apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
android {
def appVersionCode = 162
def appVersionName = '1.13.16'
def appVersionCode = 239
def appVersionName = '1.18.9'
signingConfigs {
release {
@@ -16,21 +15,24 @@ android {
keyPassword 'inpmiy'
storeFile file('Integry.jks')
storePassword 'inpmiy'
enableV3Signing true
enableV4Signing true
}
}
applicationVariants.all { variant ->
variant.outputs.all { output ->
output.outputFileName = "android-release_v2.apk"
output.outputFileName = "android-release.apk"
}
}
compileSdkVersion 29
compileSdkVersion 30
defaultConfig {
applicationId "it.integry.integrywmsnative"
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 30
versionCode appVersionCode
versionName appVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -51,8 +53,9 @@ android {
android.buildFeatures.dataBinding true
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
productFlavors {
}
@@ -60,8 +63,8 @@ android {
build {
doLast {
delete "$projectDir/build/outputs/apk/release/version_v2.txt"
file("$projectDir/build/outputs/apk/release/version_v2.txt").text = appVersionCode + '\n' + appVersionName
delete "$projectDir/build/outputs/apk/release/version.txt"
file("$projectDir/build/outputs/apk/release/version.txt").text = appVersionCode + '\n' + appVersionName
}
}
@@ -75,7 +78,7 @@ android {
abortOnError false
}
dynamicFeatures = [":dynamic__base", ":dynamic_vgalimenti", ":dynamic_ime", ":dynamic_frudis", ":dynamic_saporiveri_pv", ":dynamic_saporiveri", ':dynamic_gramm']
dynamicFeatures = [":dynamic__base", ":dynamic_vgalimenti"]
}
@@ -91,35 +94,33 @@ dependencies {
//Firebase
// Import the Firebase BoM
implementation platform('com.google.firebase:firebase-bom:25.12.0')
implementation platform('com.google.firebase:firebase-bom:26.3.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-core'
implementation 'com.google.firebase:firebase-crash'
implementation 'com.google.firebase:firebase-perf'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.android.gms:play-services-basement:17.4.0'
implementation 'com.google.firebase:firebase-perf'
implementation 'com.google.android.gms:play-services-basement:17.6.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.3.0-alpha03'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'androidx.recyclerview:recyclerview:1.2.0'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.annimon:stream:1.2.1'
implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0'
implementation 'com.annimon:stream:1.2.2'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.3.1'
implementation 'org.apache.commons:commons-text:1.9'
//MVVM
def dagger2_version = '2.29.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation "androidx.lifecycle:lifecycle-common-java8:2.2.0"
api "com.google.dagger:dagger:$dagger2_version"
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
api "com.google.dagger:dagger-android:$dagger2_version"
@@ -130,16 +131,16 @@ dependencies {
implementation 'com.github.clans:fab:1.6.4'
//CUSTOM VIEWS
implementation 'com.github.NaimishTrivedi:FBToast:1.0'
implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
implementation 'com.github.cachapa:ExpandableLayout:2.9.2'
implementation 'com.github.frankiesardo:linearlistview:1.0.1@aar'
implementation 'com.fede987:status-bar-alert:1.0.1'
implementation 'com.fxn769:stash:1.2'
testImplementation 'junit:junit:4.13.1'
implementation 'com.github.fede87:StatusBarAlert:1.0.1'
implementation 'com.github.akshay2211:Stash:master'
testImplementation 'junit:junit:4.13.2'
implementation 'com.github.zhukic:sectioned-recyclerview:1.2.3'
implementation 'com.github.pedromassango:doubleClick:3.0'
//SQLite ROOM
def room_version = "2.2.5"
def room_version = "2.3.0"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
@@ -153,11 +154,12 @@ dependencies {
implementation project(':barcode_base_android_library')
implementation project(':honeywellscannerlibrary')
implementation project(':keyobardemulatorscannerlibrary')
implementation project(':barcode_kaiteki')
androidTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
androidTestImplementation 'org.testng:testng:7.3.0'
androidTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
androidTestImplementation 'org.testng:testng:7.4.0'
}
repositories {
mavenCentral()
google()
maven { url 'https://jitpack.io' }
}

View File

@@ -14,14 +14,6 @@
}
},
"oauth_client": [
{
"client_id": "963231271247-b50hgcd89u9ksfc7189mri044kq8aq1p.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "it.integry.integrywmsnative",
"certificate_hash": "864b69dcc40196befa65638a868cec1c61245fa6"
}
},
{
"client_id": "963231271247-59qdc1vobbnjfp135ce4hv12c53s9hse.apps.googleusercontent.com",
"client_type": 1,
@@ -30,6 +22,14 @@
"certificate_hash": "3b6d97a981f446f5011049d781aeb9960f9352af"
}
},
{
"client_id": "963231271247-b50hgcd89u9ksfc7189mri044kq8aq1p.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "it.integry.integrywmsnative",
"certificate_hash": "864b69dcc40196befa65638a868cec1c61245fa6"
}
},
{
"client_id": "963231271247-6jof105pci1g0g7m2e7kjbtrtk2443g4.apps.googleusercontent.com",
"client_type": 3
@@ -41,20 +41,13 @@
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "963231271247-6jof105pci1g0g7m2e7kjbtrtk2443g4.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
}

View File

@@ -7,6 +7,7 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:name=".MainApplication"
@@ -17,23 +18,25 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
android:usesCleartextTraffic="true"
android:fullBackupContent="@xml/backup_descriptor">
<activity
android:name=".gest.spedizione.SpedizioneActivity"
android:screenOrientation="portrait"
android:theme="@style/Light"
android:windowSoftInputMode="adjustNothing" />
<activity android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity" />
<activity android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity"
android:screenOrientation="portrait"
android:theme="@style/Light"
android:windowSoftInputMode="adjustNothing" />
<activity
android:name=".gest.picking_resi.PickingResiActivity"
android:label="@string/activity_ultime_consegne_title"
android:screenOrientation="portrait"
android:theme="@style/Light" />
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:name=".gest.main.MainActivity"
android:theme="@style/Light"
android:windowSoftInputMode="adjustPan">
android:windowSoftInputMode="adjustNothing">
<intent-filter>
<action android:name="android.intent.action.CLIENTBARCODEACTIVITY" />
@@ -47,7 +50,6 @@
android:windowSoftInputMode="adjustNothing" />
<activity
android:name=".gest.login.LoginActivity"
android:screenOrientation="portrait"
android:theme="@style/Light" />
<activity
android:name=".gest.lista_bancali.ListaBancaliActivity"

View File

@@ -4,6 +4,8 @@ import android.app.Application;
import android.content.res.Configuration;
import android.content.res.Resources;
import javax.inject.Inject;
import it.integry.integrywmsnative.core.context.AppContext;
import it.integry.integrywmsnative.core.data_store.db.RoomModule;
@@ -17,7 +19,8 @@ public class MainApplication extends Application {
public static MainApplicationModule appModule;
public static RoomModule roomModule;
private AppContext appContext = new AppContext(this);
@Inject
AppContext appContext;
@@ -27,14 +30,15 @@ public class MainApplication extends Application {
public void onCreate() {
super.onCreate();
appModule = new MainApplicationModule(MainApplication.this, this);
appModule = new MainApplicationModule(this);
roomModule = new RoomModule(this);
appComponent = DaggerMainApplicationComponent.builder()
.mainApplicationModule(appModule)
.roomModule(roomModule)
.build();
appContext.init();
appComponent.inject(this);
res = getResources();
}

View File

@@ -3,40 +3,138 @@ package it.integry.integrywmsnative;
import javax.inject.Singleton;
import dagger.Component;
import it.integry.integrywmsnative.core.context.AppContext;
import it.integry.integrywmsnative.core.data_store.db.RoomModule;
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneComponent;
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneModule;
import it.integry.integrywmsnative.gest.accettazione_picking.AccettazionePickingComponent;
import it.integry.integrywmsnative.gest.accettazione_picking.AccettazionePickingModule;
import it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleComponent;
import it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleModule;
import it.integry.integrywmsnative.gest.lista_bancali.ListaBancaliComponent;
import it.integry.integrywmsnative.gest.lista_bancali.ListaBancaliModule;
import it.integry.integrywmsnative.gest.main.MainActivityComponent;
import it.integry.integrywmsnative.gest.main.MainActivityModule;
import it.integry.integrywmsnative.gest.main.MainFragmentComponent;
import it.integry.integrywmsnative.gest.main.MainFragmentModule;
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.OrdiniUscitaElencoComponent;
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.OrdiniUscitaElencoModule;
import it.integry.integrywmsnative.gest.picking_libero.PickingLiberoComponent;
import it.integry.integrywmsnative.gest.picking_libero.PickingLiberoModule;
import it.integry.integrywmsnative.gest.picking_resi.PickingResiComponent;
import it.integry.integrywmsnative.gest.picking_resi.PickingResiModule;
import it.integry.integrywmsnative.gest.prod_accettazione_ord_produzione.ProdOrdineProduzioneElencoComponent;
import it.integry.integrywmsnative.gest.prod_accettazione_ord_produzione.ProdOrdineProduzioneElencoModule;
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdComponent;
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdModule;
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.dialog_ask_mag_prossimita.DialogAskMagazzinoProssimitaComponent;
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.dialog_ask_mag_prossimita.DialogAskMagazzinoProssimitaModule;
import it.integry.integrywmsnative.gest.prod_recupero_materiale.ProdRecuperoMaterialeComponent;
import it.integry.integrywmsnative.gest.prod_recupero_materiale.ProdRecuperoMaterialeModule;
import it.integry.integrywmsnative.gest.prod_rientro_merce.ProdRientroMerceComponent;
import it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail.ProdRientroMerceOrderDetailComponent;
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeComponent;
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeModule;
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditComponent;
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditModule;
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdineAcquistoGrigliaComponent;
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdineAcquistoGrigliaModule;
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaComponent;
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaModule;
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeComponent;
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeModule;
import it.integry.integrywmsnative.gest.spedizione.SpedizioneComponent;
import it.integry.integrywmsnative.gest.spedizione.SpedizioneModule;
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.prod_fabbisogno_linee_prod.DialogRowInfoProdFabbisognoLineeProdComponent;
import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.prod_fabbisogno_linee_prod.DialogRowInfoProdFabbisognoLineeProdModule;
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteComponent;
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteModule;
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreComponent;
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreModule;
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceComponent;
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceModule;
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsComponent;
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsModule;
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotComponent;
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotModule;
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdComponent;
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdModule;
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Component;
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2Module;
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtComponent;
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtModule;
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUComponent;
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUModule;
// Definition of the Application graph
@Singleton
@Component(modules = {
MainApplicationModule.class,
RoomModule.class,
SplashActivityModule.class,
MainApplicationModule.class,
MainActivityModule.class,
PVOrdineAcquistoGrigliaModule.class,
MainFragmentModule.class,
MainAccettazioneModule.class,
ListaBancaliModule.class,
ContenutoBancaleModule.class,
PVOrdiniAcquistoGrigliaModule.class,
PVOrdineAcquistoEditModule.class,
PickingLiberoModule.class,
RettificaGiacenzeModule.class,
SpedizioneModule.class,
AccettazionePickingModule.class})
AccettazionePickingModule.class,
UltimeConsegneClienteModule.class,
UltimiArriviFornitoreModule.class,
PickingResiModule.class,
OrdiniUscitaElencoModule.class,
DialogInputQuantityV2Module.class,
DialogInputLUProdModule.class,
DialogScanArtModule.class,
DialogScanOrCreateLUModule.class,
ProdFabbisognoLineeProdModule.class,
VersamentoMerceModule.class,
DialogAskMagazzinoProssimitaModule.class,
DialogChooseBatchLotModule.class,
DialogRowInfoProdFabbisognoLineeProdModule.class,
ProdOrdineProduzioneElencoModule.class,
ProdRecuperoMaterialeModule.class,
ProdVersamentoMaterialeModule.class,
DialogChooseArtsFromListaArtsModule.class
})
public interface MainApplicationComponent {
SplashActivityComponent.Factory splashActivityComponent();
MainActivityComponent.Factory mainActivityComponent();
PVOrdineAcquistoGrigliaComponent.Factory pvOrdineAcquistoGrigliaComponent();
MainFragmentComponent.Factory mainFragmentComponent();
MainAccettazioneComponent.Factory mainAccettazioneComponent();
ListaBancaliComponent.Factory listaBancaliComponent();
ContenutoBancaleComponent.Factory contenutoBancaleComponent();
PVOrdiniAcquistoGrigliaComponent.Factory pvOrdineAcquistoGrigliaComponent();
PVOrdineAcquistoEditComponent.Factory pvOrdineAcquistoEditComponent();
PickingLiberoComponent.Factory pickingLiberoComponent();
RettificaGiacenzeComponent.Factory rettificaGiacenzeComponent();
SpedizioneComponent.Factory spedizioneComponent();
AccettazionePickingComponent.Factory accettazionePickingComponent();
UltimeConsegneClienteComponent.Factory ultimeConsegneClienteComponent();
UltimiArriviFornitoreComponent.Factory ultimiArriviFornitoreComponent();
PickingResiComponent.Factory pickingResiComponent();
OrdiniUscitaElencoComponent.Factory prodOrdineLavorazioneElencoComponent();
DialogInputQuantityV2Component.Factory dialogInputQuantityV2Component();
DialogInputLUProdComponent.Factory dialogInputLUProdComponent();
DialogScanArtComponent.Factory dialogScanArtComponent();
DialogScanOrCreateLUComponent.Factory dialogScanOrCreateLUComponent();
ProdFabbisognoLineeProdComponent.Factory prodFabbisognoLineeProdComponent();
VersamentoMerceComponent.Factory versamentoMerceComponent();
DialogAskMagazzinoProssimitaComponent.Factory dialogAskMagazzinoProssimitaComponent();
DialogChooseBatchLotComponent.Factory dialogChooseBatchLotComponent();
DialogRowInfoProdFabbisognoLineeProdComponent.Factory dialogRowInfoProdFabbisognoLineeProdComponent();
ProdRientroMerceComponent.Factory prodRientroMerceComponent();
ProdRientroMerceOrderDetailComponent.Factory prodRientroMerceOrderDetailComponent();
ProdOrdineProduzioneElencoComponent.Factory prodOrdineProduzioneElencoComponent();
ProdRecuperoMaterialeComponent.Factory prodRecuperoMaterialeComponent();
ProdVersamentoMaterialeComponent.Factory prodVersamentoMaterialeComponent();
DialogChooseArtsFromListaArtsComponent.Factory dialogChooseArtsFromListaArtsComponent();
void inject(MainApplication mainApplication);
void inject(AppContext mainApplication);
}

View File

@@ -1,29 +1,37 @@
package it.integry.integrywmsnative;
import android.app.Application;
import android.content.Context;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import it.integry.integrywmsnative.core.context.AppContext;
import it.integry.integrywmsnative.core.context.MainContext;
import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
import it.integry.integrywmsnative.core.data_store.db.AppDatabase;
import it.integry.integrywmsnative.core.menu.MenuRESTConsumer;
import it.integry.integrywmsnative.core.menu.MenuService;
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.DepositoRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.EntityRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.rest.ProdFabbisognoLineeProdRESTConsumer;
@Module
public class MainApplicationModule {
private final Context mContext;
private final Application mApplication;
public MainApplicationModule(Context context, Application application) {
this.mContext = context;
public MainApplicationModule(Application application) {
this.mApplication = application;
}
@@ -35,14 +43,34 @@ public class MainApplicationModule {
@Provides
@Singleton
ColliDataRecoverService provideColliDataRecoverService() {
return new ColliDataRecoverService(mContext);
AppContext providesAppContext() {
return new AppContext(mApplication);
}
@Provides
@Singleton
OrdiniRESTConsumer provideOrdiniRESTConsumer() {
return new OrdiniRESTConsumer();
MainContext providesMainContextNew(MenuService menuService, AppDatabase appDatabase) {
return new MainContext(mApplication.getApplicationContext(), menuService, appDatabase);
}
@Provides
@Singleton
ColliDataRecoverService provideColliDataRecoverService() {
ColliDataRecoverService colliDataRecoverService = new ColliDataRecoverService(mApplication.getApplicationContext());
colliDataRecoverService.init();
return colliDataRecoverService;
}
@Provides
@Singleton
MenuService provideMenuService(MenuRESTConsumer menuRESTConsumer) {
return new MenuService(menuRESTConsumer);
}
@Provides
@Singleton
OrdiniRESTConsumer provideOrdiniRESTConsumer(SystemRESTConsumer systemRESTConsumer, EntityRESTConsumer entityRESTConsumer) {
return new OrdiniRESTConsumer(systemRESTConsumer, entityRESTConsumer);
}
@Provides
@@ -59,8 +87,38 @@ public class MainApplicationModule {
@Provides
@Singleton
ColliMagazzinoRESTConsumer provideColliMagazzinoRESTConsumer() {
return new ColliMagazzinoRESTConsumer();
DepositoRESTConsumer provideDepositoRESTConsumer(EntityRESTConsumer entityRESTConsumer) {
return new DepositoRESTConsumer(entityRESTConsumer);
}
@Provides
@Singleton
MenuRESTConsumer provideMenuRESTConsumer() {
return new MenuRESTConsumer();
}
@Provides
@Singleton
MagazzinoRESTConsumer provideMagazzinoRESTConsumer() {
return new MagazzinoRESTConsumer();
}
@Provides
@Singleton
MesRESTConsumer provideMesRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
return new MesRESTConsumer(systemRESTConsumer);
}
@Provides
@Singleton
EntityRESTConsumer provideEntityRESTConsumer() {
return new EntityRESTConsumer();
}
@Provides
@Singleton
ColliMagazzinoRESTConsumer provideColliMagazzinoRESTConsumer(SystemRESTConsumer systemRESTConsumer, ArticoloRESTConsumer articoloRESTConsumer, EntityRESTConsumer entityRESTConsumer) {
return new ColliMagazzinoRESTConsumer(systemRESTConsumer, articoloRESTConsumer, entityRESTConsumer);
}
@Provides
@@ -81,5 +139,17 @@ public class MainApplicationModule {
return new SystemRESTConsumer();
}
@Provides
@Singleton
PosizioniRESTConsumer providesPosizioniRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
return new PosizioniRESTConsumer(systemRESTConsumer);
}
@Provides
@Singleton
ProdFabbisognoLineeProdRESTConsumer providesProdFabbisognoLineeProdRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
return new ProdFabbisognoLineeProdRESTConsumer(systemRESTConsumer);
}
}

View File

@@ -5,30 +5,36 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.text.SpannableString;
import android.text.Spanned;
import android.view.LayoutInflater;
import android.widget.TextView;
import androidx.databinding.DataBindingUtil;
import java.util.ArrayList;
import java.util.List;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import javax.inject.Inject;
import it.integry.integrywmsnative.core.context.MainContext;
import it.integry.integrywmsnative.core.expansion.BaseActivity;
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.utility.PermissionsHelper;
import it.integry.integrywmsnative.core.utility.UtilityContext;
import it.integry.integrywmsnative.databinding.ActivitySplashBinding;
import it.integry.integrywmsnative.gest.login.LoginActivity;
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
import it.integry.integrywmsnative.gest.main.MainActivity;
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
public class SplashActivity extends BaseActivity {
public class SplashActivity extends BaseActivity implements MainContext.Listener {
private ActivitySplashBinding mBinding;
private MainContext mainContext = new MainContext(this);
// private MainContext mainContext = new MainContext(this);
@Inject
MainContext mainContext;
private RunnableArgsss<Integer, String[], List<Integer>> onRequestPermissionResult;
@@ -36,30 +42,23 @@ public class SplashActivity extends BaseActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MainApplication.appComponent
.splashActivityComponent()
.create()
.inject(this);
mainContext.setListener(this);
mBinding = DataBindingUtil.inflate(LayoutInflater.from(this), R.layout.activity_splash, null, false);
setContentView(mBinding.getRoot());
initAppVersion();
UtilityContext.initMainActivity(this);
initAppVersion();
initPermissions(this::init);
}
private void initPermissions(Runnable onComplete) {
PermissionsHelper.askPermissions(this, () -> {
onComplete.run();
}, permanentlyDenied -> {
if(permanentlyDenied) {
DialogSimpleMessageHelper.makeErrorDialog(this,
new SpannableString(getText(R.string.permissions_permanently_denied)), null, () -> {
this.finish();
}).show();
} else {
initPermissions(onComplete);
}
});
}
private void initAppVersion() {
try {
PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
@@ -67,7 +66,7 @@ public class SplashActivity extends BaseActivity {
String debugText = "";
if(BuildConfig.DEBUG) debugText += "\n[DEBUG VERSION]";
if (BuildConfig.DEBUG) debugText += "\n[DEBUG VERSION]";
mBinding.appVersionTextview.setText("v" + version + debugText);
} catch (PackageManager.NameNotFoundException e) {
@@ -75,15 +74,39 @@ public class SplashActivity extends BaseActivity {
}
}
private void initPermissions(Runnable onComplete) {
PermissionsHelper.askPermissions(this, onComplete, permanentlyDenied -> {
if (permanentlyDenied) {
onError(new SpannableString(getText(R.string.permissions_permanently_denied)));
} else {
initPermissions(onComplete);
}
});
}
private void init() {
if(!SettingsManager.i().isUserLoggedIn()){
if (!SettingsManager.i().isUserLoggedIn()) {
startLoginActivity();
} else {
mainContext.init(this::startMainActivity);
mainContext.init();
}
}
@Override
public void onDBDataLoading(String item) {
mBinding.loadingInfoTextview.setText("Caricamento " + item);
}
@Override
public void onMenuLoading() {
mBinding.loadingInfoTextview.setText("Caricamento menù");
}
@Override
public void onContextInitialized() {
startMainActivity();
}
public void setOnRequestPermissionsResult(RunnableArgsss<Integer, String[], List<Integer>> onRequestPermissionResult) {
@@ -93,9 +116,10 @@ public class SplashActivity extends BaseActivity {
@Override
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
if(this.onRequestPermissionResult != null) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (this.onRequestPermissionResult != null) {
List<Integer> grantResultsList = new ArrayList<>();
for(int i = 0; i < grantResults.length; i++) {
for (int i = 0; i < grantResults.length; i++) {
grantResultsList.add(grantResults[i]);
}
@@ -104,20 +128,26 @@ public class SplashActivity extends BaseActivity {
}
private void startLoginActivity(){
private void startLoginActivity() {
this.finish();
Intent myIntent = new Intent(this, LoginActivity.class);
startActivity(myIntent);
}
private void startMainActivity(){
private void startMainActivity() {
this.finish();
Intent myIntent = new Intent(this, MainActivity.class);
startActivity(myIntent);
}
@Override
public void onError(Spanned message) {
DialogSimpleMessageView.makeErrorDialog(
message, null, this::finish, R.string.logout, () -> {
this.mainContext.logout(MainApplication::exit);
})
.show(this.getSupportFragmentManager(), "tag");
}
}

View File

@@ -0,0 +1,15 @@
package it.integry.integrywmsnative;
import dagger.Subcomponent;
@Subcomponent
public interface SplashActivityComponent {
@Subcomponent.Factory
interface Factory {
SplashActivityComponent create();
}
void inject(SplashActivity mainActivity);
}

View File

@@ -0,0 +1,7 @@
package it.integry.integrywmsnative;
import dagger.Module;
@Module(subcomponents = SplashActivityComponent.class)
public class SplashActivityModule {
}

View File

@@ -1,33 +1,27 @@
package it.integry.integrywmsnative.core.barcode_reader;
import android.content.Context;
import android.view.KeyEvent;
import androidx.appcompat.app.AppCompatActivity;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.List;
import it.integry.barcode_base_android_library.exception.BarcodeAdapterNotFoundException;
import it.integry.barcode_base_android_library.interfaces.BarcodeReaderInterface;
import it.integry.honeywellscannerlibrary.HoneyWellBarcodeReader;
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
import it.integry.integrywmsnative.core.utility.UtilityLogger;
import it.integry.keyobardemulatorscannerlibrary.KeyboardEmulatorBarcodeReader;
import it.integry.pointmobilescannerlibrary.PointMobileBarcodeReader;
import it.integry.zebrascannerlibrary.ZebraBarcodeReader;
public class BarcodeManager {
private static AppCompatActivity context;
private static BarcodeReaderInterface mCurrentBarcodeInterface;
private static List<BarcodeCallbackDTO> mBarcodeCallbacksStacktrace = new ArrayList<>();
private static final List<BarcodeCallbackDTO> mBarcodeCallbacksStacktrace = new ArrayList<>();
private static boolean mEnabled = true;
private static Class<? extends BarcodeReaderInterface>[] registeredBarcodeReaderInterfaces = new Class[]{
private static final Class<? extends BarcodeReaderInterface>[] registeredBarcodeReaderInterfaces = new Class[]{
PointMobileBarcodeReader.class,
ZebraBarcodeReader.class,
HoneyWellBarcodeReader.class,
@@ -35,71 +29,58 @@ public class BarcodeManager {
};
public static void init(AppCompatActivity context) {
BarcodeManager.context = context;
public static void init(Context applicationContext) throws Exception {
initBarcodeReader();
initBarcodeReader(applicationContext);
}
private static void initBarcodeReader() {
private static void initBarcodeReader(Context applicationContext) throws Exception {
for (Class<? extends BarcodeReaderInterface> readerInterface : registeredBarcodeReaderInterfaces){
for (Class<? extends BarcodeReaderInterface> readerInterface : registeredBarcodeReaderInterfaces) {
Constructor<?> cons = null;
try {
cons = Class.forName(readerInterface.getName()).getConstructors()[0];
BarcodeReaderInterface object = (BarcodeReaderInterface) cons.newInstance(context);
Constructor<?> cons = Class.forName(readerInterface.getName()).getConstructors()[0];
BarcodeReaderInterface object = (BarcodeReaderInterface) cons.newInstance(applicationContext);
if(object.isRightAdapter()) {
if (object.isRightAdapter()) {
mCurrentBarcodeInterface = object;
break;
}
} catch (Exception e) {
UtilityExceptions.defaultException(context,e);
}
}
if(mCurrentBarcodeInterface != null) {
if (mCurrentBarcodeInterface != null) {
try {
mCurrentBarcodeInterface.init(() -> {
mCurrentBarcodeInterface.register(data -> {
BarcodeCallbackDTO callback = getValidCallback();
if(callback != null && mEnabled) {
if (callback != null && mEnabled) {
callback.getOnScanSuccessfull().run(data);
}
}, ex -> {
BarcodeCallbackDTO callback = getValidCallback();
if(callback != null && mEnabled) {
if (callback != null && mEnabled) {
callback.getOnScanFailed().run(ex);
}
});
});
} catch (BarcodeAdapterNotFoundException ex) {
UtilityExceptions.defaultException(context, ex);
}
}
}
private static BarcodeCallbackDTO getValidCallback() {
if(mBarcodeCallbacksStacktrace.size() > 0) {
return mBarcodeCallbacksStacktrace.get(mBarcodeCallbacksStacktrace.size() -1);
if (mBarcodeCallbacksStacktrace.size() > 0) {
return mBarcodeCallbacksStacktrace.get(mBarcodeCallbacksStacktrace.size() - 1);
} else {
return null;
}
}
public static boolean onKeyDown(int keyCode, KeyEvent keyEvent){
public static boolean onKeyDown(int keyCode, KeyEvent keyEvent) {
if (mCurrentBarcodeInterface != null)
mCurrentBarcodeInterface.onKeyEvent(keyEvent);
return true;
@@ -113,8 +94,8 @@ public class BarcodeManager {
int newID = -1;
if(mBarcodeCallbacksStacktrace.size() > 0) {
newID = mBarcodeCallbacksStacktrace.get(mBarcodeCallbacksStacktrace.size() -1).getID() + 1;
if (mBarcodeCallbacksStacktrace.size() > 0) {
newID = mBarcodeCallbacksStacktrace.get(mBarcodeCallbacksStacktrace.size() - 1).getID() + 1;
} else {
newID = 1;
}
@@ -131,7 +112,7 @@ public class BarcodeManager {
//Rimuovo la callback con l'ID trovato e tutte quelle con >ID in modo che rimuovo tutte le call aggiunte successivamente
for (int i = 0; i < mBarcodeCallbacksStacktrace.size(); i++) {
if(mBarcodeCallbacksStacktrace.get(i).getID() == ID || callbackObjFound) {
if (mBarcodeCallbacksStacktrace.get(i).getID() == ID || callbackObjFound) {
mBarcodeCallbacksStacktrace.remove(i);
callbackObjFound = true;

View File

@@ -6,8 +6,6 @@ import android.util.Pair;
import java.util.ArrayList;
import java.util.List;
import it.integry.integrywmsnative.core.class_router.exceptions.MethodPathNotRegisteredException;
public class ClassRouter {
public enum PATH {
@@ -21,8 +19,8 @@ public class ClassRouter {
private static List<Pair<PATH, Object>> mRouteClasses = new ArrayList<>();
public static void init(Context context) {
ClassRouter.context = context;
public static void init() {
// ClassRouter.context = context;
}
private static boolean checkIClassExists(PATH path) {
@@ -51,9 +49,7 @@ public class ClassRouter {
try {
mRouteClasses.add(new Pair<>(path, clazz.newInstance()));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InstantiationException e) {
} catch (IllegalAccessException | InstantiationException e) {
e.printStackTrace();
}
}
@@ -69,15 +65,15 @@ public class ClassRouter {
try {
if (!checkIClassExists(path)) {
throw new MethodPathNotRegisteredException(path);
// throw new MethodPathNotRegisteredException(path);
}
Object instance = mRouteClasses.get(getClassIndex(path)).second;
return (T)instance;
} catch (MethodPathNotRegisteredException ex) {
// UtilityExceptions.defaultException(null, ex, true);
} catch (Exception ex) {
// UtilityExceptions.defaultException(null, ex, true);
}
return null;

View File

@@ -32,6 +32,8 @@ public class BaseMenuConfiguration {
@IdRes
private int mGroupId;
private String codMenu;
private List<MenuItem> mItems = new ArrayList<>();
public @IdRes int getGroupId() {
@@ -52,6 +54,15 @@ public class BaseMenuConfiguration {
return this;
}
public String getCodMenu() {
return codMenu;
}
public MenuGroup setCodMenu(String codMenu) {
this.codMenu = codMenu;
return this;
}
public List<MenuItem> getItems() {
return mItems;
}
@@ -67,6 +78,7 @@ public class BaseMenuConfiguration {
@StringRes private int mTitleText;
@DrawableRes private int mTitleIcon;
@DrawableRes private int mDrawerIcon;
private String codMenu;
private RunnableWithReturn<Fragment> fragmentFactory;
public int getID() {
@@ -105,6 +117,15 @@ public class BaseMenuConfiguration {
return this;
}
public String getCodMenu() {
return codMenu;
}
public MenuItem setCodMenu(String codMenu) {
this.codMenu = codMenu;
return this;
}
public RunnableWithReturn<Fragment> getFragmentFactory() {
return fragmentFactory;
}

View File

@@ -3,15 +3,16 @@ package it.integry.integrywmsnative.core.class_router.configs;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneFragment;
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.OrdiniUscitaElencoFragment;
import it.integry.integrywmsnative.gest.picking_libero.PickingLiberoFragment;
import it.integry.integrywmsnative.gest.prod_accettazione_ord_produzione.ProdOrdineProduzioneElencoFragment;
import it.integry.integrywmsnative.gest.prod_pick_ord_lavorazione.ProdOrdineLavorazioneElencoFragment;
import it.integry.integrywmsnative.gest.prod_fabbisogno_linee_prod.ProdFabbisognoLineeProdFragment;
import it.integry.integrywmsnative.gest.prod_recupero_materiale.ProdRecuperoMaterialeFragment;
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ProdVersamentoMaterialeFragment;
import it.integry.integrywmsnative.gest.pv_ordini_acquisto.PVOrdiniAcquistoGrigliaFragment;
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeFragment;
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreFragment;
import it.integry.integrywmsnative.gest.ultime_consegne_cliente.UltimeConsegneClienteFragment;
import it.integry.integrywmsnative.gest.vendita.MainVenditaFragment;
import it.integry.integrywmsnative.gest.ultimi_arrivi_fornitore.UltimiArriviFornitoreFragment;
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceFragment;
public class MenuConfiguration extends BaseMenuConfiguration {
@@ -24,9 +25,11 @@ public class MenuConfiguration extends BaseMenuConfiguration {
new MenuGroup()
.setGroupText(R.string.purchase)
.setGroupId(R.id.nav_group_acquisto)
.setCodMenu("MM008")
.addItem(new MenuItem()
.setID(R.id.nav_accettazione)
.setCodMenu("MG044")
.setTitleText(R.string.accettazione_title_fragment)
.setTitleIcon(R.drawable.ic_dashboard_accettazione)
.setDrawerIcon(R.drawable.ic_black_download)
@@ -34,6 +37,7 @@ public class MenuConfiguration extends BaseMenuConfiguration {
.addItem(new MenuItem()
.setID(R.id.nav_resi_fornitore)
.setCodMenu("MG045")
.setTitleText(R.string.fragment_ultime_arrivi_fornitore_title)
.setTitleIcon(R.drawable.ic_latest_delivery)
.setDrawerIcon(R.drawable.ic_black_latest_delivery)
@@ -42,16 +46,19 @@ public class MenuConfiguration extends BaseMenuConfiguration {
new MenuGroup()
.setGroupText(R.string.checkout)
.setGroupId(R.id.nav_group_spedizione)
.setCodMenu("MM010")
.addItem(new MenuItem()
.setID(R.id.nav_spedizione)
.setCodMenu("MG046")
.setTitleText(R.string.vendita_title_fragment)
.setTitleIcon(R.drawable.ic_dashboard_spedizione)
.setDrawerIcon(R.drawable.ic_black_upload)
.setFragmentFactory(MainVenditaFragment::newInstance))
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1, null)))
.addItem(new MenuItem()
.setID(R.id.nav_free_picking)
.setCodMenu("MG047")
.setTitleText(R.string.free_picking)
.setTitleIcon(R.drawable.ic_dashboard_picking_libero)
.setDrawerIcon(R.drawable.ic_black_barcode_scanner)
@@ -59,6 +66,7 @@ public class MenuConfiguration extends BaseMenuConfiguration {
.addItem(new MenuItem()
.setID(R.id.nav_resi_cliente)
.setCodMenu("MG048")
.setTitleText(R.string.fragment_ultime_consegne_cliente_title)
.setTitleIcon(R.drawable.ic_latest_delivery_customer)
.setDrawerIcon(R.drawable.ic_black_latest_delivery)
@@ -66,9 +74,11 @@ public class MenuConfiguration extends BaseMenuConfiguration {
).addGroup(new MenuGroup()
.setGroupText(R.string.manufacture)
.setGroupId(R.id.nav_group_produzione)
.setCodMenu("MM009")
.addItem(new MenuItem()
.setID(R.id.nav_prod_ordine_produzione)
.setCodMenu("MG049")
.setTitleText(R.string.prod_ordine_produzione_title_fragment)
.setTitleIcon(R.drawable.ic_dashboard_prod_accettazione_produzione)
.setDrawerIcon(R.drawable.ic_black_external)
@@ -76,20 +86,31 @@ public class MenuConfiguration extends BaseMenuConfiguration {
.addItem(new MenuItem()
.setID(R.id.nav_prod_ordine_lavorazione)
.setCodMenu("MG050")
.setTitleText(R.string.prod_ordine_lavorazione_title_fragment)
.setTitleIcon(R.drawable.ic_dashboard_prod_picking_lavorazione)
.setDrawerIcon(R.drawable.ic_black_external)
.setFragmentFactory(ProdOrdineLavorazioneElencoFragment::newInstance))
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.PRODUZIONE, GestioneEnum.LAVORAZIONE, -1, null)))
.addItem(new MenuItem()
.setID(R.id.nav_free_lav_picking)
.setCodMenu("MG051")
.setTitleText(it.integry.integrywmsnative.R.string.free_lav_picking)
.setTitleIcon(R.drawable.ic_dashboard_prod_picking_libero)
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_barcode_scanner)
.setFragmentFactory(() -> PickingLiberoFragment.newInstance(GestioneEnum.LAVORAZIONE)))
.addItem(new MenuItem()
.setID(R.id.nav_prod_posizionamento_da_ord)
.setCodMenu("MG052")
.setTitleText(R.string.prod_fabbisogno_linee_prod_title)
.setTitleIcon(R.drawable.ic_dashboard_prod_versamento_merce)
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_load_shelf)
.setFragmentFactory(ProdFabbisognoLineeProdFragment::newInstance))
.addItem(new MenuItem()
.setID(R.id.nav_prod_versamento_materiale)
.setCodMenu("MG053")
.setTitleText(R.string.prod_versamento_materiale_title_fragment)
.setTitleIcon(R.drawable.ic_dashboard_prod_versamento_materiale)
.setDrawerIcon(R.drawable.ic_black_external)
@@ -97,18 +118,20 @@ public class MenuConfiguration extends BaseMenuConfiguration {
.addItem(new MenuItem()
.setID(R.id.nav_prod_recupero_materiale)
.setCodMenu("MG054")
.setTitleText(R.string.prod_recupero_materiale_title_fragment)
.setTitleIcon(R.drawable.ic_dashboard_prod_recupero_materiale)
.setDrawerIcon(R.drawable.ic_black_external)
.setFragmentFactory(ProdRecuperoMaterialeFragment::newInstance))
)
.addGroup(
).addGroup(
new MenuGroup()
.setGroupText(R.string.internal_handling)
.setGroupId(R.id.nav_group_movimentazione_interna)
.setCodMenu("MM011")
.addItem(new MenuItem()
.setID(R.id.nav_versamento_merce)
.setCodMenu("MG055")
.setTitleText(R.string.versamento_merce_fragment_title)
.setTitleIcon(R.drawable.ic_dashboard_versamento_merce)
.setDrawerIcon(R.drawable.ic_black_load_shelf)
@@ -116,12 +139,33 @@ public class MenuConfiguration extends BaseMenuConfiguration {
.addItem(new MenuItem()
.setID(R.id.nav_rettifica_giacenze)
.setCodMenu("MG056")
.setTitleText(R.string.rettifica_giacenze_fragment_title)
.setTitleIcon(R.drawable.ic_dashboard_rettifica_giacenze)
.setDrawerIcon(R.drawable.ic_black_empty_box)
.setFragmentFactory(RettificaGiacenzeFragment::newInstance))
).addGroup(
new MenuGroup()
.setCodMenu("MM012")
.setGroupText(it.integry.integrywmsnative.R.string.punto_vendita)
.setGroupId(it.integry.integrywmsnative.R.id.nav_group_puntivendita)
.addItem(new MenuItem()
.setCodMenu("MG057")
.setID(it.integry.integrywmsnative.R.id.nav_pv_ordini_acquisto)
.setTitleText(it.integry.integrywmsnative.R.string.generate_orders)
.setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_purchase_orders_pv)
.setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_purchase_orders_pv)
.setFragmentFactory(PVOrdiniAcquistoGrigliaFragment::newInstance))
// .addItem(new MenuItem()
// .setID(it.integry.integrywmsnative.R.id.nav_pv_ordini_acquisto_trasmessi)
// .setTitleText(it.integry.integrywmsnative.R.string.transmitted_orders)
// .setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_trasmitted_orders_list)
// .setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_trasmitted_orders_list)
// .setFragmentClass(PVOrdiniAcquistoTransmittedListFragment.newInstance()))
);
}

View File

@@ -1,16 +1,13 @@
package it.integry.integrywmsnative.core.class_router.interfaces;
import android.app.Dialog;
import android.app.ProgressDialog;
import java.util.List;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
public interface IOrdiniVendita {
void distribuisciCollo(MtbColt mtbColt, List<OrdineVenditaInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed);
void distribuisciCollo(MtbColt mtbColt, List<OrdineUscitaInevasoDTO> testateOrdini, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed);
}

View File

@@ -6,8 +6,12 @@ import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.orhanobut.logger.AndroidLogAdapter;
import com.orhanobut.logger.Logger;
import javax.inject.Inject;
import javax.inject.Singleton;
import it.integry.integrywmsnative.BuildConfig;
import it.integry.integrywmsnative.core.data_recover.ColliDataRecover;
import it.integry.integrywmsnative.MainApplication;
import it.integry.integrywmsnative.core.data_store.db.AppDatabase;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.settings.Stash;
import it.integry.integrywmsnative.core.utility.UtilityContext;
@@ -15,17 +19,26 @@ import it.integry.integrywmsnative.core.utility.UtilityResources;
import it.integry.integrywmsnative.core.utility.UtilityString;
import it.integry.integrywmsnative.core.utility.UtilityToast;
@Singleton
public class AppContext {
//Note: this is the Application Context NOT the Activity Context
private final Context mContext;
private final Context mApplicationContext;
@Inject
AppDatabase mAppDatabase;
public AppContext(Context context) {
this.mContext = context;
this.mApplicationContext = context;
MainApplication.appComponent
.inject(this);
}
@Inject
public void init() {
this.initUtilities();
@@ -34,15 +47,13 @@ public class AppContext {
this.initCrashlytics();
this.initLogger();
this.initRecoverColli();
}
private void initSettings() {
Stash.init(mContext);
SettingsManager.init(mContext);
Stash.init(mApplicationContext);
SettingsManager.init(mApplicationContext);
}
private void initCrashlytics() {
@@ -60,18 +71,14 @@ public class AppContext {
}
private void initUtilities() {
UtilityContext.initApplicationContext(mContext);
UtilityResources.init(mContext);
UtilityToast.init(mContext);
UtilityContext.initApplicationContext(mApplicationContext);
UtilityResources.init(mApplicationContext);
UtilityToast.init(mApplicationContext);
}
private void initLogger() {
Logger.addLogAdapter(new AndroidLogAdapter());
}
private void initRecoverColli() {
ColliDataRecover.init(mContext);
}
}

View File

@@ -1,56 +1,110 @@
package it.integry.integrywmsnative.core.context;
import android.content.Context;
import android.text.Html;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.SpannedString;
import java.lang.reflect.Method;
import java.net.ConnectException;
import androidx.appcompat.app.AppCompatActivity;
import javax.inject.Singleton;
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
import it.integry.integrywmsnative.core.class_router.ClassRouter;
import it.integry.integrywmsnative.core.data_store.db.AppDatabase;
import it.integry.integrywmsnative.core.menu.MenuService;
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
import it.integry.integrywmsnative.core.utility.UtilityThread;
@Singleton
public class MainContext {
private final AppCompatActivity mContext;
private final Context applicationContext;
private final MenuService menuService;
private final AppDatabase appDatabase;
public MainContext(AppCompatActivity context) {
this.mContext = context;
private Listener mListener;
public MainContext(Context applicationContext, MenuService menuService, AppDatabase appDatabase) {
this.applicationContext = applicationContext;
this.menuService = menuService;
this.appDatabase = appDatabase;
}
public void init() {
public void init(Runnable onContextInitialized) {
try {
BarcodeManager.init(applicationContext);
} catch (Exception exception) {
BarcodeManager.init(mContext);
}
this.initDBData(() -> {
onContextInitialized.run();
});
this.initMenu(() -> {
this.initReflections();
if (mListener != null) mListener.onContextInitialized();
});
});
this.initServerStatusChecker();
}
public void logout(Runnable onLoggedOut) {
menuService.invalidateCache();
UtilityThread.executeParallel(() -> {
SettingsManager.i().setUser(null);
SettingsManager.i().setUserSession(null);
SettingsManager.update();
appDatabase.clearAllTables();
onLoggedOut.run();
}, true);
}
private void initServerStatusChecker() {
ServerStatusChecker.init();
}
private void initDBData(Runnable onComplete) {
SettingsManager.loadDBVariables(onComplete, ex -> {
DialogSimpleMessageHelper.makeErrorDialog(mContext,
new SpannableString(ex.getMessage()), null, mContext::finish).show();
SettingsManager.loadDBVariables(item -> {
if (mListener != null) mListener.onDBDataLoading(item);
},
onComplete,
ex -> {
Spanned message = null;
if (ex.getCause() != null && ex.getCause() instanceof ConnectException) {
message = Html.fromHtml("Impossibile collegarsi all'host <b>" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "</b>. Riprovare più tardi.");
} else if (ex.getMessage().startsWith("Status 404:")) {
message = Html.fromHtml("Errore 404. Non è stato possibile soddisfare la richiesta sull'host <b>" + SettingsManager.i().getServer().getHost() + ":" + SettingsManager.i().getServer().getPort() + "</b>. Riprovare più tardi.");
} else {
message = new SpannableString(ex.getMessage());
}
if (mListener != null) mListener.onError(message);
}
);
}
private void initMenu(Runnable onComplete) {
if (mListener != null) mListener.onMenuLoading();
this.menuService.init(onComplete, ex -> {
if (mListener != null) mListener.onError(new SpannedString(ex.getMessage()));
});
}
private void initReflections() {
ClassRouter.init(mContext);
ClassRouter.init();
try {
String initMethod = "init";
@@ -63,14 +117,29 @@ public class MainContext {
// for static methods we can use null as instance of class
final Object newInstance = dynamicContextClass.newInstance();
m.invoke(newInstance, (Context) mContext);
m.invoke(newInstance, applicationContext);
break;
}
}
} catch (Exception e) {
UtilityExceptions.defaultException(mContext, e, true);
// UtilityExceptions.defaultException(mContext, e, true);
}
}
public MainContext setListener(Listener listener) {
this.mListener = listener;
return this;
}
public interface Listener {
void onDBDataLoading(String item);
void onMenuLoading();
void onContextInitialized();
void onError(Spanned message);
}
}

View File

@@ -1,235 +0,0 @@
package it.integry.integrywmsnative.core.data_recover;
import android.content.Context;
import com.annimon.stream.Optional;
import com.annimon.stream.Stream;
import com.google.android.gms.common.util.IOUtils;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import it.integry.integrywmsnative.core.CommonConst;
import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
public class ColliDataRecover {
public static class RecoverDTO {
private int id;
private int numCollo;
private String serCollo;
private String dataCollo;
private String gestioneCollo;
private String filtro;
private List<OrdineVenditaInevasoDTO> testateOrdini;
public int getId() {
return id;
}
public RecoverDTO setId(int id) {
this.id = id;
return this;
}
public int getNumCollo() {
return numCollo;
}
public RecoverDTO setNumCollo(int numCollo) {
this.numCollo = numCollo;
return this;
}
public String getSerCollo() {
return serCollo;
}
public RecoverDTO setSerCollo(String serCollo) {
this.serCollo = serCollo;
return this;
}
public String getDataCollo() {
return dataCollo;
}
public RecoverDTO setDataCollo(String dataCollo) {
this.dataCollo = dataCollo;
return this;
}
public String getGestioneCollo() {
return gestioneCollo;
}
public RecoverDTO setGestioneCollo(String gestioneCollo) {
this.gestioneCollo = gestioneCollo;
return this;
}
public String getFiltro() {
return filtro;
}
public RecoverDTO setFiltro(String filtro) {
this.filtro = filtro;
return this;
}
public List<OrdineVenditaInevasoDTO> getTestateOrdini() {
return testateOrdini;
}
public RecoverDTO setTestateOrdini(List<OrdineVenditaInevasoDTO> testateOrdini) {
this.testateOrdini = testateOrdini;
return this;
}
public MtbColt getMtbColt() {
return new MtbColt()
.setNumCollo(getNumCollo())
.setSerCollo(getSerCollo())
.setGestione(getGestioneCollo())
.setDataCollo(getDataCollo())
.setFiltroOrdini(getFiltro());
}
}
private static Context mContext;
private static List<RecoverDTO> mtbColtsSessions = new ArrayList<>();
public static void init(Context context) {
mContext = context;
if(isFilePresent(CommonConst.Files.RECOVER_COLLO_FILE)) {
loadLocalFile();
}
}
public static boolean thereIsAnExistantSession() {
return mtbColtsSessions.size() > 0;
}
public static List<Integer> getAllSessionIDs() {
if(thereIsAnExistantSession()) {
return Stream.of(mtbColtsSessions)
.map(RecoverDTO::getId)
.toList();
} else return null;
}
public static RecoverDTO getSession(Integer sessionID) {
if(sessionID == null) return null;
return getIfExists(sessionID);
}
private static RecoverDTO getIfExists(int id) {
Optional<RecoverDTO> recoverDTOOptional = Stream.of(mtbColtsSessions)
.filter(x -> x.getId() == id)
.findSingle();
return recoverDTOOptional.isPresent() ? recoverDTOOptional.get() : null;
}
public static int startNewSession(MtbColt mtbColtSession, List<OrdineVenditaInevasoDTO> testateOrdini) {
Integer newId = null;
while(newId == null) {
int randomId = new Random().nextInt(1000);
RecoverDTO dto = getIfExists(randomId);
if(dto == null) newId = randomId;
}
RecoverDTO recoverDTO = new RecoverDTO()
.setId(newId)
.setDataCollo(mtbColtSession.getDataColloS())
.setNumCollo(mtbColtSession.getNumCollo())
.setSerCollo(mtbColtSession.getSerCollo())
.setGestioneCollo(mtbColtSession.getGestione())
.setFiltro(mtbColtSession.getFiltroOrdini())
.setTestateOrdini(testateOrdini);
mtbColtsSessions.add(recoverDTO);
updateLocalFile();
return newId;
}
public static void closeSession(int ID) {
RecoverDTO dto = getIfExists(ID);
if(dto != null) {
mtbColtsSessions.remove(dto);
updateLocalFile();
}
}
private static void loadLocalFile() {
InputStream inputStream;
Gson gson = new Gson();
try {
inputStream = mContext.openFileInput(CommonConst.Files.RECOVER_COLLO_FILE);
byte[] bytes = IOUtils.readInputStreamFully(inputStream);
String jsonString = new String(bytes);
Type listType = new TypeToken<ArrayList<RecoverDTO>>(){}.getType();
mtbColtsSessions = gson.fromJson(jsonString, listType);
inputStream.close();
} catch (Exception e) {
e.printStackTrace();
UtilityExceptions.defaultException(mContext, e);
}
}
private static void updateLocalFile() {
FileOutputStream outputStream;
Gson gson = new Gson();
String jsonText = gson.toJson(mtbColtsSessions);
try {
outputStream = mContext.openFileOutput(CommonConst.Files.RECOVER_COLLO_FILE, Context.MODE_PRIVATE);
outputStream.write(jsonText.getBytes());
outputStream.close();
} catch (Exception e) {
e.printStackTrace();
UtilityExceptions.defaultException(mContext, e);
}
}
private static boolean isFilePresent(String fileName) {
String path = mContext.getFilesDir().getAbsolutePath() + "/" + fileName;
File file = new File(path);
return file.exists();
}
}

View File

@@ -3,7 +3,7 @@ package it.integry.integrywmsnative.core.data_recover;
import java.util.List;
import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
public class ColliDataRecoverDTO {
@@ -14,7 +14,7 @@ public class ColliDataRecoverDTO {
private String gestioneCollo;
private String filtro;
private List<OrdineVenditaInevasoDTO> testateOrdini;
private List<OrdineUscitaInevasoDTO> testateOrdini;
public int getId() {
return id;
@@ -70,11 +70,11 @@ public class ColliDataRecoverDTO {
return this;
}
public List<OrdineVenditaInevasoDTO> getTestateOrdini() {
public List<OrdineUscitaInevasoDTO> getTestateOrdini() {
return testateOrdini;
}
public ColliDataRecoverDTO setTestateOrdini(List<OrdineVenditaInevasoDTO> testateOrdini) {
public ColliDataRecoverDTO setTestateOrdini(List<OrdineUscitaInevasoDTO> testateOrdini) {
this.testateOrdini = testateOrdini;
return this;
}

View File

@@ -21,27 +21,26 @@ import javax.inject.Singleton;
import it.integry.integrywmsnative.core.CommonConst;
import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
@Singleton
public class ColliDataRecoverService {
private final Context mContext;
private final Context mApplicationContext;
private List<ColliDataRecoverDTO> mtbColtsSessions = new ArrayList<>();
@Inject
public ColliDataRecoverService(Context context) {
this.mContext = context;
public ColliDataRecoverService(Context applicationContext) {
this.mApplicationContext = applicationContext;
}
@Inject
public void init() {
if(isFilePresent(CommonConst.Files.RECOVER_COLLO_FILE)) {
loadLocalFile();
}
}
public boolean thereIsAnExistantSession() {
return mtbColtsSessions.size() > 0;
}
@@ -72,7 +71,7 @@ public class ColliDataRecoverService {
return recoverDTOOptional.isPresent() ? recoverDTOOptional.get() : null;
}
public int startNewSession(MtbColt mtbColtSession, List<OrdineVenditaInevasoDTO> testateOrdini) {
public int startNewSession(MtbColt mtbColtSession, List<OrdineUscitaInevasoDTO> testateOrdini) {
Integer newId = null;
while(newId == null) {
@@ -111,7 +110,7 @@ public class ColliDataRecoverService {
Gson gson = new Gson();
try {
inputStream = mContext.openFileInput(CommonConst.Files.RECOVER_COLLO_FILE);
inputStream = mApplicationContext.openFileInput(CommonConst.Files.RECOVER_COLLO_FILE);
byte[] bytes = IOUtils.readInputStreamFully(inputStream);
String jsonString = new String(bytes);
@@ -122,7 +121,7 @@ public class ColliDataRecoverService {
inputStream.close();
} catch (Exception e) {
e.printStackTrace();
UtilityExceptions.defaultException(mContext, e);
// UtilityExceptions.defaultException(mContext, e);
}
}
@@ -134,17 +133,17 @@ public class ColliDataRecoverService {
String jsonText = gson.toJson(mtbColtsSessions);
try {
outputStream = mContext.openFileOutput(CommonConst.Files.RECOVER_COLLO_FILE, Context.MODE_PRIVATE);
outputStream = mApplicationContext.openFileOutput(CommonConst.Files.RECOVER_COLLO_FILE, Context.MODE_PRIVATE);
outputStream.write(jsonText.getBytes());
outputStream.close();
} catch (Exception e) {
e.printStackTrace();
UtilityExceptions.defaultException(mContext, e);
// UtilityExceptions.defaultException(mContext, e);
}
}
private boolean isFilePresent(String fileName) {
String path = mContext.getFilesDir().getAbsolutePath() + "/" + fileName;
String path = mApplicationContext.getFilesDir().getAbsolutePath() + "/" + fileName;
File file = new File(path);
return file.exists();
}

View File

@@ -8,7 +8,6 @@ import androidx.room.Update;
import java.util.List;
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloGriglia;
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
import it.integry.integrywmsnative.core.data_store.db.wrappers.GrigliaWrapper;
@@ -17,7 +16,7 @@ public interface GrigliaDao {
@Query("SELECT * from griglie")
List<Griglia> getAll();
@Query("SELECT *, COUNT(articoli_griglia.articolo_griglia_id) as countArticoli from griglie LEFT JOIN articoli_griglia ON (griglie.griglia_id = articoli_griglia.id_griglia) where cod_alis = :codAlis GROUP BY griglie.griglia_id")
@Query("SELECT griglie.*, COUNT(articoli_griglia.articolo_griglia_id) as countArticoli from griglie LEFT JOIN articoli_griglia ON (griglie.griglia_id = articoli_griglia.id_griglia) where cod_alis = :codAlis GROUP BY griglie.griglia_id")
GrigliaWrapper findByCodAlis(String codAlis);
@Insert

View File

@@ -6,7 +6,7 @@ import androidx.room.ForeignKey;
import androidx.room.Index;
import androidx.room.PrimaryKey;
import java.util.Date;
import it.integry.integrywmsnative.core.utility.UtilityDate;
@Entity(
tableName = "articoli_griglia",
@@ -159,7 +159,7 @@ public class ArticoloGriglia {
articolo.setQtaCnf(this.getQtaCnf());
articolo.setUntMis(this.getUntMis());
articolo.setDescrizione(this.getDescrizione());
articolo.setDataIns(new Date());
articolo.setDataIns(UtilityDate.getDateInstance());
articolo.setQtaOrd(0);
return articolo;

View File

@@ -11,6 +11,7 @@ import androidx.room.PrimaryKey;
@Index(value = "cod_alis", unique = true)
}
)
public class Griglia {
@PrimaryKey(autoGenerate = true)
@ColumnInfo(name = "griglia_id")

View File

@@ -0,0 +1,110 @@
package it.integry.integrywmsnative.core.di;
import androidx.annotation.NonNull;
import androidx.databinding.Bindable;
import androidx.databinding.Observable;
import androidx.databinding.PropertyChangeRegistry;
import java.math.BigDecimal;
public class BindableBigDecimal implements Observable {
BigDecimal mValue;
private transient PropertyChangeRegistry mCallbacks;
public BindableBigDecimal() {
}
public BindableBigDecimal(BigDecimal startValue) {
this.mValue = startValue;
}
@Override
public void addOnPropertyChangedCallback(@NonNull OnPropertyChangedCallback callback) {
synchronized (this) {
if (mCallbacks == null) {
mCallbacks = new PropertyChangeRegistry();
}
}
mCallbacks.add(callback);
}
public void addOnPropertyChangedCallback(@NonNull Runnable callback) {
synchronized (this) {
if (mCallbacks == null) {
mCallbacks = new PropertyChangeRegistry();
}
}
mCallbacks.add(new OnPropertyChangedCallback() {
@Override
public void onPropertyChanged(Observable sender, int propertyId) {
callback.run();
}
});
}
@Override
public void removeOnPropertyChangedCallback(@NonNull OnPropertyChangedCallback callback) {
synchronized (this) {
if (mCallbacks == null) {
return;
}
}
mCallbacks.remove(callback);
}
public void resetOnPropertyChangedCallback() {
synchronized (this) {
if (mCallbacks == null) {
return;
}
}
mCallbacks.clear();
mCallbacks = null;
}
/**
* Notifies listeners that all properties of this instance have changed.
*/
public void notifyChange() {
synchronized (this) {
if (mCallbacks == null) {
return;
}
}
mCallbacks.notifyCallbacks(this, 0, null);
}
/**
* Notifies listeners that a specific property has changed. The getter for the property
* that changes should be marked with {@link Bindable} to generate a field in
* <code>BR</code> to be used as <code>fieldId</code>.
*
* @param fieldId The generated BR id for the Bindable field.
*/
public void notifyPropertyChanged(int fieldId) {
synchronized (this) {
if (mCallbacks == null) {
return;
}
}
mCallbacks.notifyCallbacks(this, fieldId, null);
}
public BigDecimal get() {
return mValue;
}
public void set(BigDecimal value) {
this.set(value, false);
}
public void set(BigDecimal value, boolean forceRefresh) {
if (!mValue.equals(value) || forceRefresh) {
this.mValue = value;
notifyChange();
}
}
}

View File

@@ -1,7 +1,6 @@
package it.integry.integrywmsnative.core.di;
import androidx.annotation.NonNull;
import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;
import androidx.databinding.Observable;
import androidx.databinding.PropertyChangeRegistry;

View File

@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.core.di;
import android.app.DatePickerDialog;
import android.content.res.ColorStateList;
import android.text.SpannableString;
import android.util.Log;
import android.view.View;
import android.widget.AutoCompleteTextView;
@@ -37,11 +38,13 @@ import java.util.Locale;
import it.integry.integrywmsnative.MainApplication;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
import it.integry.integrywmsnative.core.utility.UtilityDate;
import it.integry.integrywmsnative.core.utility.UtilityNumber;
import it.integry.integrywmsnative.core.utility.UtilityString;
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
public class Converters {
@@ -84,6 +87,28 @@ public class Converters {
}
}
@BindingAdapter("binding")
public static void bindEditText(AppCompatTextView view, final ObservableField<String> observableField) {
Pair<ObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
if (pair == null || pair.first != observableField) {
if (pair != null) {
view.removeTextChangedListener(pair.second);
}
TextWatcherAdapter watcher = new TextWatcherAdapter() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if(observableField != null) observableField.set(s.toString());
}
};
view.setTag(R.id.bound_observable, new Pair<>(observableField, watcher));
view.addTextChangedListener(watcher);
}
String newValue = observableField.get();
if (!view.getText().toString().equals(newValue)) {
view.setText(newValue);
}
}
@BindingAdapter("binding")
public static void bindEditText(EditText view, final BindableString bindableString) {
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
@@ -106,6 +131,50 @@ public class Converters {
}
}
@BindingAdapter("binding")
public static void bindEditText(EditText view, final ObservableField<String> observableString) {
Pair<ObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
if (pair == null || pair.first != observableString) {
if (pair != null) {
view.removeTextChangedListener(pair.second);
}
TextWatcherAdapter watcher = new TextWatcherAdapter() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
observableString.set(s.toString());
}
};
view.setTag(R.id.bound_observable, new Pair<>(observableString, watcher));
view.addTextChangedListener(watcher);
}
String newValue = observableString.get();
if (!view.getText().toString().equals(newValue)) {
view.setText(newValue);
}
}
@BindingAdapter("binding")
public static void bindEditText(AutoCompleteTextView view, final ObservableField<String> observableString) {
Pair<ObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
if (pair == null || pair.first != observableString) {
if (pair != null) {
view.removeTextChangedListener(pair.second);
}
TextWatcherAdapter watcher = new TextWatcherAdapter() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
observableString.set(s.toString());
}
};
view.setTag(R.id.bound_observable, new Pair<>(observableString, watcher));
view.addTextChangedListener(watcher);
}
String newValue = observableString.get();
if (!view.getText().toString().equals(newValue)) {
view.setText(newValue, false);
}
}
@BindingAdapter("binding")
public static void bindTextInputEditText(TextInputEditText view, final BindableString bindableString) {
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
@@ -171,15 +240,15 @@ public class Converters {
view.addTextChangedListener(watcher);
}
String newValue = observableString.get();
String viewValue = view.getText().toString().trim();
String viewValue = view.getText().toString();
if(!viewValue.equalsIgnoreCase(newValue)) {
view.setText(newValue);
}
}
@BindingAdapter({"binding"})
public static void bindTextInputEditTextDate(TextInputEditText view, final ObservableField<Date> observableDate) {
@BindingAdapter(value = {"binding", "parentView", "warningOnOldDates"}, requireAll = false)
public static void bindTextInputEditTextDate(TextInputEditText view, final ObservableField<Date> observableDate, BaseDialogFragment parentFragment, boolean warningOnOldDates) {
Pair<ObservableField<Date>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
if (pair == null || pair.first != observableDate) {
if (pair != null) {
@@ -208,8 +277,20 @@ public class Converters {
DatePickerDialog datePickerDialog = new DatePickerDialog(view.getContext(),
(cView, year, month, day) -> {
Date resultDate = new GregorianCalendar(year, month, day).getTime();
if(parentFragment != null && warningOnOldDates && resultDate.before(new Date())) {
DialogSimpleMessageView
.makeWarningDialog(new SpannableString("Hai scelto una data precedente a quella odierna. Continuare?"), null, () -> {
view.setText(UtilityDate.formatDate(resultDate, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
observableDate.set(resultDate);
}, () -> {
})
.show(parentFragment.requireActivity().getSupportFragmentManager(), "tag");
} else {
view.setText(UtilityDate.formatDate(resultDate, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
observableDate.set(resultDate);
}
}, mYear, mMonth, mDay);
datePickerDialog.show();
};

View File

@@ -0,0 +1,6 @@
package it.integry.integrywmsnative.core.di.binders;
public class AutoCompleteTextViewBinders {
}

View File

@@ -0,0 +1,12 @@
package it.integry.integrywmsnative.core.exception;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.utility.UtilityResources;
public class AlreadyAttachedDocumentToLUException extends Exception {
public AlreadyAttachedDocumentToLUException() {
super(UtilityResources.getString(R.string.lu_already_attache_to_doc));
}
}

View File

@@ -0,0 +1,11 @@
package it.integry.integrywmsnative.core.exception;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.utility.UtilityResources;
public class InvalidLUMultiCodMdepException extends Exception {
public InvalidLUMultiCodMdepException() {
super(UtilityResources.getString(R.string.error_multiple_cod_mdep_ord));
}
}

View File

@@ -1,36 +0,0 @@
package it.integry.integrywmsnative.core.exception;
import android.content.Context;
import android.content.Intent;
import java.io.PrintWriter;
import java.io.StringWriter;
public class MyExceptionHandler implements
java.lang.Thread.UncaughtExceptionHandler {
private final Context myContext;
private final Class<?> myActivityClass;
public MyExceptionHandler(Context context, Class<?> c) {
myContext = context;
myActivityClass = c;
}
public void uncaughtException(Thread thread, Throwable exception) {
StringWriter stackTrace = new StringWriter();
exception.printStackTrace(new PrintWriter(stackTrace));
System.err.println(stackTrace);// You can use LogCat too
// Intent intent = new Intent(myContext, myActivityClass);
// String s = stackTrace.toString();
// //you can use this String to know what caused the exception and in which Activity
// intent.putExtra("uncaughtException",
// "Exception is: " + stackTrace.toString());
// intent.putExtra("stacktrace", s);
// myContext.startActivity(intent);
//for restarting the Activity
// Process.killProcess(Process.myPid());
// System.exit(0);
}
}

View File

@@ -0,0 +1,12 @@
package it.integry.integrywmsnative.core.exception;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.utility.UtilityResources;
public class NoArtsInLUException extends Exception {
public NoArtsInLUException() {
super(UtilityResources.getString(R.string.no_items_found_message));
}
}

View File

@@ -0,0 +1,12 @@
package it.integry.integrywmsnative.core.exception;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.utility.UtilityResources;
public class NoOrderFoundException extends Exception {
public NoOrderFoundException() {
super(UtilityResources.getString(R.string.no_orders_found_message));
}
}

View File

@@ -5,6 +5,6 @@ import it.integry.integrywmsnative.core.utility.UtilityResources;
public class NoPrintersFoundException extends Exception {
public NoPrintersFoundException() {
super(UtilityResources.getString(R.string.exception_printer_not_found));
super(UtilityResources.getString(R.string.exception_no_printer_found));
}
}

View File

@@ -0,0 +1,11 @@
package it.integry.integrywmsnative.core.exception;
import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.utility.UtilityResources;
public class TooManyLUFoundInMonoLUPositionException extends Exception {
public TooManyLUFoundInMonoLUPositionException() {
super(UtilityResources.getString(R.string.too_much_lu_found_message_in_mono_lu));
}
}

View File

@@ -6,7 +6,7 @@ import android.view.KeyEvent;
import androidx.appcompat.app.AppCompatActivity;
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
import it.integry.integrywmsnative.core.exception.MyExceptionHandler;
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
import it.integry.integrywmsnative.core.utility.UtilityProgress;
public class BaseActivity extends AppCompatActivity {
@@ -15,7 +15,7 @@ public class BaseActivity extends AppCompatActivity {
protected Dialog mCurrentProgress;
public BaseActivity() {
Thread.setDefaultUncaughtExceptionHandler(new MyExceptionHandler(this, BaseActivity.class));
//Thread.setDefaultUncaughtExceptionHandler(new MyExceptionHandler(this, BaseActivity.class));
}
@Override
@@ -39,17 +39,45 @@ public class BaseActivity extends AppCompatActivity {
}
protected void openProgress() {
runOnUiThread(() -> {
BarcodeManager.disable();
if (this.mCurrentProgress == null) {
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(this);
}
});
}
protected void closeProgress() {
runOnUiThread(() -> {
BarcodeManager.enable();
if (mCurrentProgress != null) {
mCurrentProgress.dismiss();
mCurrentProgress = null;
}
});
}
public void onLoadingStarted() {
new Thread(() -> {
BarcodeManager.disable();
this.openProgress();
}).start();
}
public void onLoadingEnded() {
new Thread(() -> {
this.closeProgress();
BarcodeManager.enable();
}).start();
}
public void onError(Exception ex) {
this.runOnUiThread(() -> {
this.closeProgress();
UtilityExceptions.defaultException(this, ex, mCurrentProgress);
BarcodeManager.enable();
});
}
}

View File

@@ -0,0 +1,109 @@
package it.integry.integrywmsnative.core.expansion;
import android.app.Dialog;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
import it.integry.integrywmsnative.core.utility.UtilityProgress;
public class BaseDialogFragment extends DialogFragment {
private boolean mBarcodeListener = false;
private Dialog mCurrentProgress;
public BaseDialogFragment() {
super();
}
@Override
public void show(FragmentManager manager, String tag) {
try {
FragmentTransaction ft = manager.beginTransaction();
ft.add(this, tag);
ft.commit();
} catch (IllegalStateException e) {
Log.d("ABSDIALOGFRAG", "Exception", e);
}
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
if (BarcodeManager.isEnabled() && BarcodeManager.isKeyboardEmulator()) {
getDialog().setOnKeyListener((dialog, keyCode, event) -> {
if (mBarcodeListener && (event.getAction() == KeyEvent.ACTION_DOWN || event.getAction() == KeyEvent.ACTION_MULTIPLE) && !isControlKey(event)) {
return BarcodeManager.onKeyDown(event.getKeyCode(), event);
}
return false;
});
}
}
private boolean isControlKey(KeyEvent keyEvent) {
int keyCode = keyEvent.getKeyCode();
return (
keyCode == KeyEvent.KEYCODE_BACK ||
keyCode == KeyEvent.KEYCODE_SHIFT_LEFT ||
keyCode == KeyEvent.KEYCODE_DEL
);
}
public void setBarcodeListener(boolean listen) {
this.mBarcodeListener = listen;
}
public void onLoadingStarted() {
BarcodeManager.disable();
this.openProgress();
}
public void onLoadingEnded() {
this.closeProgress();
BarcodeManager.enable();
}
protected void openProgress() {
// new Thread(() -> {
requireActivity().runOnUiThread(() -> {
if (this.mCurrentProgress == null) {
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(getActivity());
}
});
// }).start();
}
protected void closeProgress() {
// new Thread(() -> {
requireActivity().runOnUiThread(() -> {
if (mCurrentProgress != null) {
mCurrentProgress.dismiss();
mCurrentProgress = null;
}
});
// }).start();
}
public void onError(Exception ex) {
requireActivity().runOnUiThread(() -> {
this.closeProgress();
UtilityExceptions.defaultException(requireActivity(), ex);
});
}
}

View File

@@ -0,0 +1,93 @@
package it.integry.integrywmsnative.core.expansion;
import android.app.Dialog;
import androidx.fragment.app.Fragment;
import java.util.ArrayList;
import java.util.List;
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
import it.integry.integrywmsnative.core.utility.UtilityProgress;
import it.integry.integrywmsnative.ui.ElevatedToolbar;
public abstract class BaseFragment extends Fragment {
protected Dialog mCurrentProgress;
protected ElevatedToolbar mToolbar;
protected final List<Runnable> mOnPreDestroyList = new ArrayList<>();
public void setScrollToolbar(ElevatedToolbar toolbar) {
mToolbar = toolbar;
}
public void addOnPreDestroy(Runnable onPreDestroy) {
this.mOnPreDestroyList.add(onPreDestroy);
}
public void onLoadingStarted() {
new Thread(() -> {
BarcodeManager.disable();
this.openProgress();
}).start();
}
public void onLoadingEnded() {
new Thread(() -> {
this.closeProgress();
BarcodeManager.enable();
}).start();
}
public void onError(Exception ex) {
this.getActivity().runOnUiThread(() -> {
this.closeProgress();
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
BarcodeManager.enable();
});
}
@Override
public void onDestroy() {
super.onDestroy();
for (Runnable onPreDestroy : mOnPreDestroyList) {
onPreDestroy.run();
}
}
protected void openProgress() {
getActivity().runOnUiThread(() -> {
if (this.mCurrentProgress == null) {
this.mCurrentProgress = UtilityProgress.createDefaultProgressDialog(getActivity());
}
});
}
protected void closeProgress() {
getActivity().runOnUiThread(() -> {
if (mCurrentProgress != null) {
mCurrentProgress.dismiss();
mCurrentProgress = null;
}
});
}
protected void popMe() {
((IPoppableActivity) requireActivity()).pop();
}
}

View File

@@ -0,0 +1,7 @@
package it.integry.integrywmsnative.core.expansion;
public interface RunnableArgsWithReturn<T, R> {
R run(T data);
}

View File

@@ -0,0 +1,6 @@
package it.integry.integrywmsnative.core.expansion;
public interface RunnableArgssss<S, T, U, V> {
void run(S data1, T data2, U data3, V data4);
}

View File

@@ -7,6 +7,7 @@ import androidx.databinding.ObservableList;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import java.util.List;
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
@@ -38,6 +39,28 @@ public abstract class ExtendedRecyclerView<T, VH extends RecyclerView.ViewHolder
return mDataset.size();
}
public void clearDataset() {
mDataset.clear();
notifyDataSetChanged();
}
public void updateDataset(List<T> updatedDataset) {
mDataset.clear();
if(updatedDataset != null && !updatedDataset.isEmpty()) {
mDataset.addAll(updatedDataset);
}
notifyDataSetChanged();
}
public void addDataset(List<T> insertDataset) {
if(insertDataset != null && !insertDataset.isEmpty()) {
mDataset.addAll(insertDataset);
notifyDataSetChanged();
}
}
public ExtendedRecyclerView<T, VH> setEmptyView(View emptyView) {
this.mEmptyView = emptyView;
this.checkIfEmpty();

View File

@@ -0,0 +1,56 @@
package it.integry.integrywmsnative.core.expansion.view;
import android.view.View;
import androidx.databinding.ObservableArrayList;
import androidx.databinding.ObservableList;
import androidx.recyclerview.widget.RecyclerView;
import com.zhukic.sectionedrecyclerview.SectionedRecyclerViewAdapter;
import java.util.ArrayList;
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
public abstract class ExtendedSectionedRecyclerView<T, SH extends RecyclerView.ViewHolder, VH extends RecyclerView.ViewHolder>
extends SectionedRecyclerViewAdapter<SH, VH> {
protected ArrayList<T> mDataset = new ArrayList<>();
private View mEmptyView;
public ExtendedSectionedRecyclerView(ObservableArrayList<T> myDataset) {
mDataset.addAll(myDataset);
myDataset.addOnListChangedCallback(new OnListGeneralChangedCallback() {
@Override
public void onChanged(ObservableList sender) {
mDataset.clear();
mDataset.addAll(sender);
notifyDataSetChanged();
notifyDataChanged();
checkIfEmpty();
}
});
checkIfEmpty();
}
public ExtendedSectionedRecyclerView<T, SH, VH> setEmptyView(View emptyView) {
this.mEmptyView = emptyView;
this.checkIfEmpty();
return this;
}
@Override
public int getItemSize() {
return this.mDataset.size();
}
private void checkIfEmpty() {
if (mEmptyView != null) {
final boolean emptyViewVisible = getItemSize() == 0;
mEmptyView.setVisibility(emptyViewVisible ? View.VISIBLE : View.GONE);
}
}
}

View File

@@ -0,0 +1,7 @@
package it.integry.integrywmsnative.core.interfaces;
public interface IDestroyableFragment {
void addOnPreDestroy(Runnable onPreDestroy);
}

View File

@@ -1,6 +1,6 @@
package it.integry.integrywmsnative.core.interfaces;
public interface IFilterableFragment {
public interface IFilterableFragment extends IDestroyableFragment {
void onFilterClick();

View File

@@ -2,10 +2,8 @@ package it.integry.integrywmsnative.core.interfaces;
import it.integry.integrywmsnative.ui.ElevatedToolbar;
public interface IScrollableFragment {
public interface IScrollableFragment extends IDestroyableFragment {
void setScrollToolbar(ElevatedToolbar toolbar);
void setOnPreDestroy(Runnable onPreDestroy);
}

View File

@@ -2,7 +2,7 @@ package it.integry.integrywmsnative.core.interfaces;
import androidx.appcompat.widget.SearchView;
public interface ISearcableFragment extends SearchView.OnQueryTextListener {
public interface ISearcableFragment extends SearchView.OnQueryTextListener, IDestroyableFragment {
void onSearchEnabled();

View File

@@ -1,8 +1,8 @@
package it.integry.integrywmsnative.core.interfaces;
public interface ISelectAllFragment {
public interface ISelectAllFragment extends IDestroyableFragment {
boolean isEnabled();
boolean isSelectAllButtonEnabled();
void onSelectAll();

View File

@@ -2,14 +2,13 @@ package it.integry.integrywmsnative.core.interfaces;
import android.content.Context;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.AppCompatTextView;
/**
* Created by GiuseppeS on 07/03/2018.
*/
public interface ITitledFragment {
public interface ITitledFragment extends IDestroyableFragment {
void onCreateActionBar(AppCompatTextView titleText, Context context);

View File

@@ -1,10 +1,15 @@
package it.integry.integrywmsnative.core.interfaces.viewmodel_listeners;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.MtbColt;
public interface ILUBaseOperationsListener {
void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete);
void onLUOpened(MtbColt mtbColt);
void onLUClosed();
void onRowSaved();
}

View File

@@ -1,7 +1,9 @@
package it.integry.integrywmsnative.core.interfaces.viewmodel_listeners;
public interface ILoadingListener {
void onLoadingStarted();
void onLoadingEnded();
}

View File

@@ -0,0 +1,34 @@
package it.integry.integrywmsnative.core.menu;
import javax.inject.Singleton;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.StbMenu;
import it.integry.integrywmsnative.core.rest.RESTBuilder;
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
@Singleton
public class MenuRESTConsumer extends _BaseRESTConsumer {
public void retrieveMenu(String rootCodOpz, RunnableArgs<StbMenu> onComplete, RunnableArgs<Exception> onFailed) {
MenuRESTConsumerService menuRESTConsumerService = RESTBuilder.getService(MenuRESTConsumerService.class);
menuRESTConsumerService.retrieveMenuConfig(rootCodOpz).enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<StbMenu>> call, Response<ServiceRESTResponse<StbMenu>> response) {
analyzeAnswer(response, "retrieveMenu", (m) -> {
onComplete.run(response.body().getEntity());
}, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<StbMenu>> call, Throwable t) {
onFailed.run(new Exception(t));
}
});
}
}

View File

@@ -0,0 +1,13 @@
package it.integry.integrywmsnative.core.menu;
import it.integry.integrywmsnative.core.model.StbMenu;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
public interface MenuRESTConsumerService {
@GET("retrieveMenuConfig")
Call<ServiceRESTResponse<StbMenu>> retrieveMenuConfig(@Query("rootCodOpz") String rootCodOpz);
}

View File

@@ -0,0 +1,81 @@
package it.integry.integrywmsnative.core.menu;
import com.annimon.stream.Stream;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import javax.inject.Singleton;
import it.integry.integrywmsnative.core.class_router.configs.BaseMenuConfiguration;
import it.integry.integrywmsnative.core.class_router.configs.MenuConfiguration;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.menu.exception.MenuNotFoundException;
import it.integry.integrywmsnative.core.model.StbMenu;
@Singleton
public class MenuService {
private static final String MENU_COD_OPZ = "MM007";
private final MenuRESTConsumer menuRESTConsumer;
private List<StbMenu> mInternalCachedMenu;
private List<StbMenu> mInternalCachedFlatMenu;
@Inject
public MenuService(MenuRESTConsumer menuRESTConsumer) {
this.menuRESTConsumer = menuRESTConsumer;
}
public void init(Runnable onMenuInitialized, RunnableArgs<Exception> onFailed) {
menuRESTConsumer.retrieveMenu(MENU_COD_OPZ, menu -> {
if(menu != null) {
this.mInternalCachedMenu = menu.getStbMenuChildren();
this.mInternalCachedFlatMenu = new ArrayList<>();
flattenMenu(this.mInternalCachedMenu);
}
onMenuInitialized.run();
}, onFailed);
}
public List<StbMenu> getMenu() throws Exception {
if(mInternalCachedMenu == null) throw new MenuNotFoundException();
return mInternalCachedMenu;
}
public boolean isGroupEnabled(MenuConfiguration.MenuGroup androidMenuGroup) throws Exception {
List<StbMenu> dbMenu = getMenu();
return Stream.of(this.mInternalCachedFlatMenu)
.anyMatch(x -> x.getCodOpz().equalsIgnoreCase(androidMenuGroup.getCodMenu()));
}
public boolean isItemEnabled(BaseMenuConfiguration.MenuItem androidMenuItem) throws Exception {
List<StbMenu> dbMenu = getMenu();
return Stream.of(this.mInternalCachedFlatMenu)
.anyMatch(x -> x.getCodOpz().equalsIgnoreCase(androidMenuItem.getCodMenu()));
}
private void flattenMenu(List<StbMenu> menu) {
for(StbMenu stbMenu : menu) {
this.mInternalCachedFlatMenu.add(stbMenu);
if(stbMenu.getStbMenuChildren() != null && !stbMenu.getStbMenuChildren().isEmpty()) {
flattenMenu(stbMenu.getStbMenuChildren());
}
}
}
public void invalidateCache() {
this.mInternalCachedMenu = null;
this.mInternalCachedFlatMenu = null;
}
}

View File

@@ -0,0 +1,8 @@
package it.integry.integrywmsnative.core.menu.exception;
public class MenuNotFoundException extends Exception{
public MenuNotFoundException() {
super("Non è stato possibile caricare il menù");
}
}

View File

@@ -1,73 +0,0 @@
package it.integry.integrywmsnative.core.model;
import androidx.databinding.Observable;
import java.util.List;
import it.integry.integrywmsnative.core.di.BindableBoolean;
import it.integry.integrywmsnative.core.di.BindableFloat;
import it.integry.integrywmsnative.gest.prod_versamento_materiale.core.ChooseOrdsLavFromListItemModel;
public class CheckableOrdineLavoro {
private ChooseOrdsLavFromListItemModel item;
private BindableBoolean checked = new BindableBoolean(false);
private String testata;
public CheckableOrdineLavoro(ChooseOrdsLavFromListItemModel item) {
this.item = item;
}
public ChooseOrdsLavFromListItemModel getItem() {
return item;
}
public CheckableOrdineLavoro setItem(ChooseOrdsLavFromListItemModel item) {
this.item = item;
return this;
}
public BindableBoolean getChecked() {
return checked;
}
public CheckableOrdineLavoro setChecked(BindableBoolean checked) {
this.checked = checked;
return this;
}
public BindableFloat getQtaCol() {
return item.getOrdineLav().getQtaColVersamento();
}
public void setQtaCol(float qtaCnf) {
this.item.getOrdineLav().setQtaColVersamento(qtaCnf);
}
public void toggleCheck() {
this.checked.set(!this.checked.get());
}
public boolean isChecked() {
return checked.get();
}
public String getTestata() {
return testata;
}
public void setTestata(String testata) {
this.testata = testata;
}
public BindableFloat getNumCnf() {
return item.getOrdineLav().getNumCnfVersamento();
}
public void setNumCnf(float numCnf) {
this.item.getOrdineLav().setNumCnfVersamento(numCnf);
}
}

View File

@@ -141,6 +141,8 @@ public class DtbDocr {
private MtbAart mtbAart;
private String dataScadPartitaMag;
public String getCodAnag() {
return codAnag;
}
@@ -739,6 +741,19 @@ public class DtbDocr {
return this;
}
public String getDataScadPartitaMag() {
return dataScadPartitaMag;
}
public Date getDataScadPartitaMagD() {
return UtilityDate.recognizeDateWithExceptionHandler(getDataScadPartitaMag());
}
public DtbDocr setDataScadPartitaMag(String dataScadPartitaMag) {
this.dataScadPartitaMag = dataScadPartitaMag;
return this;
}
public MtbAart getMtbAart() {
return mtbAart;
}

View File

@@ -0,0 +1,348 @@
package it.integry.integrywmsnative.core.model;
import java.math.BigDecimal;
public class DtbOrdSteps extends EntityBase {
private String dataOrd;
private String gestione;
private Integer idRiga;
private Integer idStep;
private Integer numOrd;
private String activityId;
private String codAnag;
private String codDtip;
private String codJfas;
private String codMdep;
private String codProdPri;
private String dataDoc;
private String dataFine;
private String dataIniz;
private String descrizioneAttivita;
private String flagTipoTempo;
private Integer hrNum;
private BigDecimal hrTime;
private String idRigaDoc;
private String note;
private String numDoc;
private Integer numFase;
private BigDecimal qtaAllocata;
private BigDecimal qtaDisp;
private BigDecimal qtaDispImmessa;
private BigDecimal qtaImmesse;
private BigDecimal qtaInProd;
private BigDecimal qtaLav;
private BigDecimal qtaProd;
private BigDecimal qtaScartate;
private BigDecimal qtaTrasferite;
private BigDecimal rapConvLav;
private String serDoc;
private String untMisLav;
public String getDataOrd() {
return dataOrd;
}
public DtbOrdSteps setDataOrd(String dataOrd) {
this.dataOrd = dataOrd;
return this;
}
public String getGestione() {
return gestione;
}
public DtbOrdSteps setGestione(String gestione) {
this.gestione = gestione;
return this;
}
public Integer getIdRiga() {
return idRiga;
}
public DtbOrdSteps setIdRiga(Integer idRiga) {
this.idRiga = idRiga;
return this;
}
public Integer getIdStep() {
return idStep;
}
public DtbOrdSteps setIdStep(Integer idStep) {
this.idStep = idStep;
return this;
}
public Integer getNumOrd() {
return numOrd;
}
public DtbOrdSteps setNumOrd(Integer numOrd) {
this.numOrd = numOrd;
return this;
}
public String getActivityId() {
return activityId;
}
public DtbOrdSteps setActivityId(String activityId) {
this.activityId = activityId;
return this;
}
public String getCodAnag() {
return codAnag;
}
public DtbOrdSteps setCodAnag(String codAnag) {
this.codAnag = codAnag;
return this;
}
public String getCodDtip() {
return codDtip;
}
public DtbOrdSteps setCodDtip(String codDtip) {
this.codDtip = codDtip;
return this;
}
public String getCodJfas() {
return codJfas;
}
public DtbOrdSteps setCodJfas(String codJfas) {
this.codJfas = codJfas;
return this;
}
public String getCodMdep() {
return codMdep;
}
public DtbOrdSteps setCodMdep(String codMdep) {
this.codMdep = codMdep;
return this;
}
public String getCodProdPri() {
return codProdPri;
}
public DtbOrdSteps setCodProdPri(String codProdPri) {
this.codProdPri = codProdPri;
return this;
}
public String getDataDoc() {
return dataDoc;
}
public DtbOrdSteps setDataDoc(String dataDoc) {
this.dataDoc = dataDoc;
return this;
}
public String getDataFine() {
return dataFine;
}
public DtbOrdSteps setDataFine(String dataFine) {
this.dataFine = dataFine;
return this;
}
public String getDataIniz() {
return dataIniz;
}
public DtbOrdSteps setDataIniz(String dataIniz) {
this.dataIniz = dataIniz;
return this;
}
public String getDescrizioneAttivita() {
return descrizioneAttivita;
}
public DtbOrdSteps setDescrizioneAttivita(String descrizioneAttivita) {
this.descrizioneAttivita = descrizioneAttivita;
return this;
}
public String getFlagTipoTempo() {
return flagTipoTempo;
}
public DtbOrdSteps setFlagTipoTempo(String flagTipoTempo) {
this.flagTipoTempo = flagTipoTempo;
return this;
}
public Integer getHrNum() {
return hrNum;
}
public DtbOrdSteps setHrNum(Integer hrNum) {
this.hrNum = hrNum;
return this;
}
public BigDecimal getHrTime() {
return hrTime;
}
public DtbOrdSteps setHrTime(BigDecimal hrTime) {
this.hrTime = hrTime;
return this;
}
public String getIdRigaDoc() {
return idRigaDoc;
}
public DtbOrdSteps setIdRigaDoc(String idRigaDoc) {
this.idRigaDoc = idRigaDoc;
return this;
}
public String getNote() {
return note;
}
public DtbOrdSteps setNote(String note) {
this.note = note;
return this;
}
public String getNumDoc() {
return numDoc;
}
public DtbOrdSteps setNumDoc(String numDoc) {
this.numDoc = numDoc;
return this;
}
public Integer getNumFase() {
return numFase;
}
public DtbOrdSteps setNumFase(Integer numFase) {
this.numFase = numFase;
return this;
}
public BigDecimal getQtaAllocata() {
return qtaAllocata;
}
public DtbOrdSteps setQtaAllocata(BigDecimal qtaAllocata) {
this.qtaAllocata = qtaAllocata;
return this;
}
public BigDecimal getQtaDisp() {
return qtaDisp;
}
public DtbOrdSteps setQtaDisp(BigDecimal qtaDisp) {
this.qtaDisp = qtaDisp;
return this;
}
public BigDecimal getQtaDispImmessa() {
return qtaDispImmessa;
}
public DtbOrdSteps setQtaDispImmessa(BigDecimal qtaDispImmessa) {
this.qtaDispImmessa = qtaDispImmessa;
return this;
}
public BigDecimal getQtaImmesse() {
return qtaImmesse;
}
public DtbOrdSteps setQtaImmesse(BigDecimal qtaImmesse) {
this.qtaImmesse = qtaImmesse;
return this;
}
public BigDecimal getQtaInProd() {
return qtaInProd;
}
public DtbOrdSteps setQtaInProd(BigDecimal qtaInProd) {
this.qtaInProd = qtaInProd;
return this;
}
public BigDecimal getQtaLav() {
return qtaLav;
}
public DtbOrdSteps setQtaLav(BigDecimal qtaLav) {
this.qtaLav = qtaLav;
return this;
}
public BigDecimal getQtaProd() {
return qtaProd;
}
public DtbOrdSteps setQtaProd(BigDecimal qtaProd) {
this.qtaProd = qtaProd;
return this;
}
public BigDecimal getQtaScartate() {
return qtaScartate;
}
public DtbOrdSteps setQtaScartate(BigDecimal qtaScartate) {
this.qtaScartate = qtaScartate;
return this;
}
public BigDecimal getQtaTrasferite() {
return qtaTrasferite;
}
public DtbOrdSteps setQtaTrasferite(BigDecimal qtaTrasferite) {
this.qtaTrasferite = qtaTrasferite;
return this;
}
public BigDecimal getRapConvLav() {
return rapConvLav;
}
public DtbOrdSteps setRapConvLav(BigDecimal rapConvLav) {
this.rapConvLav = rapConvLav;
return this;
}
public String getSerDoc() {
return serDoc;
}
public DtbOrdSteps setSerDoc(String serDoc) {
this.serDoc = serDoc;
return this;
}
public String getUntMisLav() {
return untMisLav;
}
public DtbOrdSteps setUntMisLav(String untMisLav) {
this.untMisLav = untMisLav;
return this;
}
}

View File

@@ -3,7 +3,7 @@ package it.integry.integrywmsnative.core.model;
import java.math.BigDecimal;
import java.util.Date;
public class GtbAnag {
public class GtbAnag extends EntityBase {
private String codAnag;
private String ragSoc;
@@ -45,6 +45,10 @@ public class GtbAnag {
private String precode;
private Boolean insDestinatario;
public GtbAnag() {
this.type = "gtb_anag";
}
public String getCodAnag() {
return codAnag;
}

View File

@@ -0,0 +1,180 @@
package it.integry.integrywmsnative.core.model;
import androidx.annotation.NonNull;
import java.math.BigDecimal;
public class JtbFasi extends EntityBase {
private String codJfas;
private String codJfasParent;
private String descrizione;
private String descrizEstesa;
private String codMfas;
private String pathIcona;
private String umAllocazione;
private BigDecimal maxAllocazione;
private String codJCal;
private String idJfas;
private String flagAttivo;
private String flagCheck;
private String umProd;
private BigDecimal prodStd;
private String codMdepLav;
private String tipoProd;
public JtbFasi() {
this.type = "jtb_fasi";
}
public String getCodJfas() {
return codJfas;
}
public JtbFasi setCodJfas(String codJfas) {
this.codJfas = codJfas;
return this;
}
public String getCodJfasParent() {
return codJfasParent;
}
public JtbFasi setCodJfasParent(String codJfasParent) {
this.codJfasParent = codJfasParent;
return this;
}
public String getDescrizione() {
return descrizione;
}
public JtbFasi setDescrizione(String descrizione) {
this.descrizione = descrizione;
return this;
}
public String getDescrizEstesa() {
return descrizEstesa;
}
public JtbFasi setDescrizEstesa(String descrizEstesa) {
this.descrizEstesa = descrizEstesa;
return this;
}
public String getCodMfas() {
return codMfas;
}
public JtbFasi setCodMfas(String codMfas) {
this.codMfas = codMfas;
return this;
}
public String getPathIcona() {
return pathIcona;
}
public JtbFasi setPathIcona(String pathIcona) {
this.pathIcona = pathIcona;
return this;
}
public String getUmAllocazione() {
return umAllocazione;
}
public JtbFasi setUmAllocazione(String umAllocazione) {
this.umAllocazione = umAllocazione;
return this;
}
public BigDecimal getMaxAllocazione() {
return maxAllocazione;
}
public JtbFasi setMaxAllocazione(BigDecimal maxAllocazione) {
this.maxAllocazione = maxAllocazione;
return this;
}
public String getCodJCal() {
return codJCal;
}
public JtbFasi setCodJCal(String codJCal) {
this.codJCal = codJCal;
return this;
}
public String getIdJfas() {
return idJfas;
}
public JtbFasi setIdJfas(String idJfas) {
this.idJfas = idJfas;
return this;
}
public String getFlagAttivo() {
return flagAttivo;
}
public JtbFasi setFlagAttivo(String flagAttivo) {
this.flagAttivo = flagAttivo;
return this;
}
public String getFlagCheck() {
return flagCheck;
}
public JtbFasi setFlagCheck(String flagCheck) {
this.flagCheck = flagCheck;
return this;
}
public String getUmProd() {
return umProd;
}
public JtbFasi setUmProd(String umProd) {
this.umProd = umProd;
return this;
}
public BigDecimal getProdStd() {
return prodStd;
}
public JtbFasi setProdStd(BigDecimal prodStd) {
this.prodStd = prodStd;
return this;
}
public String getCodMdepLav() {
return codMdepLav;
}
public JtbFasi setCodMdepLav(String codMdepLav) {
this.codMdepLav = codMdepLav;
return this;
}
public String getTipoProd() {
return tipoProd;
}
public JtbFasi setTipoProd(String tipoProd) {
this.tipoProd = tipoProd;
return this;
}
@NonNull
@Override
public String toString() {
return String.format("%s - %s", getCodJfas(), getDescrizione());
}
}

View File

@@ -9,7 +9,7 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
* Created by GiuseppeS on 06/03/2018.
*/
public class MtbAart extends EntityBase{
public class MtbAart extends EntityBase {
private String codMart;
private String descrizione;

View File

@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import java.util.Date;
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.utility.UtilityDate;
public class MtbColr extends EntityBase {
@@ -52,10 +53,16 @@ public class MtbColr extends EntityBase {
private MtbAart mtbAart;
private MtbPartitaMag mtbPartitaMag;
private transient int id;
private transient MtbColr refMtbColr;
public MtbColr() {
type = "mtb_colr";
if(SettingsManager.i().isUserLoggedIn()) {
setUtente(SettingsManager.i().getUser().getFullname());
}
}
@@ -511,6 +518,15 @@ public class MtbColr extends EntityBase {
return this;
}
public int getId() {
return id;
}
public MtbColr setId(int id) {
this.id = id;
return this;
}
public MtbColr getRefMtbColr() {
return refMtbColr;
}

View File

@@ -54,6 +54,7 @@ public class MtbColt extends EntityBase {
private BigDecimal lunghezzaCm;
private BigDecimal larghezzaCm;
private BigDecimal altezzaCm;
private String codJcom;
private List<MtbCols> mtbCols;
@@ -98,6 +99,10 @@ public class MtbColt extends EntityBase {
type = "mtb_colt";
setDataCollo(UtilityDate.getDateInstance());
setSerCollo("/");
if(SettingsManager.i().isUserLoggedIn()) {
setPreparatoDa(SettingsManager.i().getUser().getFullname());
}
}
public MtbColt initDefaultFields() {
@@ -380,6 +385,18 @@ public class MtbColt extends EntityBase {
return dataVers;
}
public Date getDataVersD() {
return UtilityDate.recognizeDateWithExceptionHandler(getDataVers());
}
public String getTimeVers() {
Date dataColloD = getDataVersD();
if(dataColloD != null){
return UtilityDate.formatDate(dataColloD, UtilityDate.COMMONS_DATE_FORMATS.TIME);
} else return null;
}
public MtbColt setDataVers(String dataVers) {
this.dataVers = dataVers;
@@ -500,6 +517,15 @@ public class MtbColt extends EntityBase {
return this;
}
public String getCodJcom() {
return codJcom;
}
public MtbColt setCodJcom(String codJcom) {
this.codJcom = codJcom;
return this;
}
public void generaFiltroOrdineFromDTO(List<FiltroOrdineDTO> filtroOrdineDtos) {
String xmlPrefix = "{\"whereCond\": \"";
@@ -514,13 +540,13 @@ public class MtbColt extends EntityBase {
try {
whereCond.append("(");
whereCond.append(String.format("dtb_ordt.gestione = %s AND dtb_ordt.data_ord = %s and dtb_ordt.num_ord = %s",
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 dtb_ordr.data_cons = %s",
whereCond.append(String.format(" AND dr.dc = %s",
UtilityDB.valueToString(UtilityDate.formatDate(x.getDataConsD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH))));
}
@@ -528,8 +554,6 @@ public class MtbColt extends EntityBase {
if(i < filtroOrdineDtos.size()-1) {
whereCond.append(" OR ");
}
//whereCond.append("<DTB_ORDT COND=\"OR\"><GESTIONE type=\"V\">" + x.getGestioneOrd() + "</GESTIONE><DATA_ORD type=\"D\">" + UtilityDate.formatDate(x.getDataOrdD(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH) + "</DATA_ORD><NUM_ORD type=\"N\">" + x.getNumOrd() + "</NUM_ORD></DTB_ORDT>");
} catch (Exception e) {
e.printStackTrace();
}

View File

@@ -5,7 +5,7 @@ import java.util.Date;
import it.integry.integrywmsnative.core.utility.UtilityDate;
public class MtbPartitaMag {
public class MtbPartitaMag extends EntityBase{
private String codMart;
private String partitaMag;
@@ -30,6 +30,10 @@ public class MtbPartitaMag {
private String partitaMagSec;
private BigDecimal qtaAttesa;
public MtbPartitaMag() {
this.type = "mtb_partita_mag";
}
public String getCodMart() {
return codMart;

View File

@@ -105,4 +105,6 @@ public class MtbTCol {
this.circuito = circuito;
return this;
}
}

View File

@@ -0,0 +1,60 @@
package it.integry.integrywmsnative.core.model;
import java.util.Date;
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
import it.integry.integrywmsnative.core.utility.UtilityDate;
public class OrdineInevasoDTO {
private String data;
private Integer numero;
private String gestione;
private String codMdep;
public String getDataOrdS() {
return data;
}
public Date getDataOrdD() {
return UtilityDate.recognizeDateWithExceptionHandler(getDataOrdS());
}
public OrdineInevasoDTO setData(String data) {
this.data = data;
return this;
}
public Integer getNumOrd() {
return numero;
}
public OrdineInevasoDTO setNumero(Integer numero) {
this.numero = numero;
return this;
}
public String getGestione() {
return gestione;
}
public GestioneEnum getGestioneEnum() {
return GestioneEnum.fromString(getGestione());
}
public OrdineInevasoDTO setGestione(String gestione) {
this.gestione = gestione;
return this;
}
public String getCodMdep() {
return codMdep;
}
public OrdineInevasoDTO setCodMdep(String codMdep) {
this.codMdep = codMdep;
return this;
}
}

View File

@@ -0,0 +1,217 @@
package it.integry.integrywmsnative.core.model;
import java.util.ArrayList;
import java.util.List;
public class StbMenu extends EntityBase {
public StbMenu() {
this.type = "stb_menu";
}
private String codOpz;
private String codParent;
private String tipoAzienda;
private String descrizione;
private String descrizioneEstesa;
private String entityName;
private String flagAttivo;
private String flagPrinterSetup;
private String gestName;
private String note;
private String objectType;
private String openType;
private String parameter;
private String pictureMenu;
private String pictureSelect;
private Integer pos;
private Integer posCliente;
private Integer posTipoAzienda;
private String urlDescrizione;
private final List<StbMenu> stbMenuChildren = new ArrayList<>();
public String getCodOpz() {
return codOpz;
}
public StbMenu setCodOpz(String codOpz) {
this.codOpz = codOpz;
return this;
}
public String getCodParent() {
return codParent;
}
public StbMenu setCodParent(String codParent) {
this.codParent = codParent;
return this;
}
public String getTipoAzienda() {
return tipoAzienda;
}
public StbMenu setTipoAzienda(String tipoAzienda) {
this.tipoAzienda = tipoAzienda;
return this;
}
public String getDescrizione() {
return descrizione;
}
public StbMenu setDescrizione(String descrizione) {
this.descrizione = descrizione;
return this;
}
public String getDescrizioneEstesa() {
return descrizioneEstesa;
}
public StbMenu setDescrizioneEstesa(String descrizioneEstesa) {
this.descrizioneEstesa = descrizioneEstesa;
return this;
}
public String getEntityName() {
return entityName;
}
public StbMenu setEntityName(String entityName) {
this.entityName = entityName;
return this;
}
public String getFlagAttivo() {
return flagAttivo;
}
public StbMenu setFlagAttivo(String flagAttivo) {
this.flagAttivo = flagAttivo;
return this;
}
public String getFlagPrinterSetup() {
return flagPrinterSetup;
}
public StbMenu setFlagPrinterSetup(String flagPrinterSetup) {
this.flagPrinterSetup = flagPrinterSetup;
return this;
}
public String getGestName() {
return gestName;
}
public StbMenu setGestName(String gestName) {
this.gestName = gestName;
return this;
}
public String getNote() {
return note;
}
public StbMenu setNote(String note) {
this.note = note;
return this;
}
public String getObjectType() {
return objectType;
}
public StbMenu setObjectType(String objectType) {
this.objectType = objectType;
return this;
}
public String getOpenType() {
return openType;
}
public StbMenu setOpenType(String openType) {
this.openType = openType;
return this;
}
public String getParameter() {
return parameter;
}
public StbMenu setParameter(String parameter) {
this.parameter = parameter;
return this;
}
public String getPictureMenu() {
return pictureMenu;
}
public StbMenu setPictureMenu(String pictureMenu) {
this.pictureMenu = pictureMenu;
return this;
}
public String getPictureSelect() {
return pictureSelect;
}
public StbMenu setPictureSelect(String pictureSelect) {
this.pictureSelect = pictureSelect;
return this;
}
public Integer getPos() {
return pos;
}
public StbMenu setPos(Integer pos) {
this.pos = pos;
return this;
}
public Integer getPosCliente() {
return posCliente;
}
public StbMenu setPosCliente(Integer posCliente) {
this.posCliente = posCliente;
return this;
}
public Integer getPosTipoAzienda() {
return posTipoAzienda;
}
public StbMenu setPosTipoAzienda(Integer posTipoAzienda) {
this.posTipoAzienda = posTipoAzienda;
return this;
}
public String getType() {
return type;
}
public StbMenu setType(String type) {
this.type = type;
return this;
}
public String getUrlDescrizione() {
return urlDescrizione;
}
public StbMenu setUrlDescrizione(String urlDescrizione) {
this.urlDescrizione = urlDescrizione;
return this;
}
public List<StbMenu> getStbMenuChildren() {
return stbMenuChildren;
}
}

View File

@@ -10,9 +10,19 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
public class PickDataDTO {
private MtbColt refMtbColt;
private MtbColt sourceMtbColt;
private ManualPickDTO manualPickDTO;
public MtbColt getRefMtbColt() {
return refMtbColt;
}
public PickDataDTO setRefMtbColt(MtbColt refMtbColt) {
this.refMtbColt = refMtbColt;
return this;
}
public MtbColt getSourceMtbColt() {
return sourceMtbColt;
}

View File

@@ -3,10 +3,8 @@ package it.integry.integrywmsnative.core.rest;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.sql.Date;
import java.util.concurrent.TimeUnit;
import it.integry.integrywmsnative.core.rest.deserializer.DateDeserializer;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
@@ -19,12 +17,10 @@ import retrofit2.converter.gson.GsonConverterFactory;
public class RESTBuilder {
public static <T> T getService(final Class<T> service) {
// return getService(service, "192.168.2.13", 8080);
return getService(service, SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true);
}
public static <T> T getService(final Class<T> service, int timeout) {
// return getService(service, "192.168.2.13", 8080);
return getService(service, SettingsManager.i().getServer().getHost(), SettingsManager.i().getServer().getPort(), true, true, timeout);
}
@@ -53,19 +49,15 @@ public class RESTBuilder {
String endpoint = "http://" + host + ":" + port + "/" + (addEmsApi ? "ems-api/" : "");
Gson gson = new GsonBuilder()
.registerTypeAdapter(Date.class, new DateDeserializer())
.setDateFormat("dd/MM/yyyy HH:mm:ss")
.create();
Retrofit retrofit = new Retrofit.Builder()
.addConverterFactory(GsonConverterFactory.create(gson))
.baseUrl(endpoint)
.client(client)
.build();
return retrofit.create(service);
}
}

View File

@@ -18,7 +18,8 @@ import retrofit2.Response;
@Singleton
public class ArticoloRESTConsumer extends _BaseRESTConsumer {
public static void getByBarcodeProdStatic(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
public void getByBarcodeProd(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
articoloRESTConsumerService.getByBarcodeProd(barcodeProd).enqueue(new Callback<ServiceRESTResponse<MtbAart>>() {
@Override
@@ -35,12 +36,12 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
});
}
public void getByBarcodeProd(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
getByBarcodeProdStatic(barcodeProd, onComplete, onFailed);
public void getByCodMarts(List<String> codMartToFind, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
getByCodMartsStatic(codMartToFind, onComplete, onFailed);
}
public static void getByCodMart(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)
.collect(Collectors.joining(","));
@@ -63,4 +64,26 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
}
public void getByCodMart(String codMartToFind, RunnableArgs<MtbAart> onComplete, RunnableArgs<Exception> onFailed) {
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
articoloRESTConsumer.getByCodMart(codMartToFind).enqueue(new Callback<ServiceRESTResponse<MtbAart>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
analyzeAnswer(response, "getByCodMart", (m) -> {
if(response.body().getEntityList() != null && !response.body().getEntityList().isEmpty()) {
onComplete.run(response.body().getEntityList().get(0));
} else onComplete.run(null);
}, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<MtbAart>> call, Throwable t) {
onFailed.run(new Exception(t));
}
});
}
}

View File

@@ -16,7 +16,7 @@ import retrofit2.Response;
@Singleton
public class BarcodeRESTConsumer extends _BaseRESTConsumer {
public static void decodeEan128Static(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);
@@ -42,8 +42,4 @@ public class BarcodeRESTConsumer extends _BaseRESTConsumer {
}
});
}
public void decodeEan128(BarcodeScanDTO barcodeObj, RunnableArgs<Ean128Model> onComplete, RunnableArgs<Exception> onFailed) {
BarcodeRESTConsumer.decodeEan128Static(barcodeObj, onComplete, onFailed);
}
}

View File

@@ -11,7 +11,6 @@ import org.jetbrains.annotations.NotNull;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -32,6 +31,7 @@ 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.ServiceRESTResponse;
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
import it.integry.integrywmsnative.core.utility.UtilityDate;
@@ -45,23 +45,19 @@ import retrofit2.Response;
@Singleton
public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
public static void saveColloStatic(MtbColt mtbColtToSave, final ISimpleOperationCallback<MtbColt> callback) {
for (int i = 0; i < mtbColtToSave.getMtbColr().size(); i++) {
mtbColtToSave.getMtbColr().get(i)
.setMtbAart(null)
.setMtbPartitaMag(null);
}
EntityRESTConsumer.processEntity(mtbColtToSave, callback, MtbColt.class);
private final SystemRESTConsumer mSystemRESTConsumer;
private final ArticoloRESTConsumer mArticoloRESTConsumer;
private final EntityRESTConsumer mEntityRESTConsumer;
public ColliMagazzinoRESTConsumer(SystemRESTConsumer systemRESTConsumer,
ArticoloRESTConsumer articoloRESTConsumer,
EntityRESTConsumer entityRESTConsumer) {
this.mSystemRESTConsumer = systemRESTConsumer;
this.mArticoloRESTConsumer = articoloRESTConsumer;
this.mEntityRESTConsumer = entityRESTConsumer;
}
public void saveCollo(MtbColt mtbColtToSave, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
ColliMagazzinoRESTConsumer.saveColloStatic(mtbColtToSave, onComplete, onFailed);
}
public static void saveColloStatic(MtbColt mtbColtToSave, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
MtbColt mtbColtToSaveClone = (MtbColt) mtbColtToSave.clone();
mtbColtToSave.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
@@ -74,7 +70,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
.setMtbPartitaMag(null));
}
EntityRESTConsumer.processEntity(mtbColtToSaveClone, new ISimpleOperationCallback<MtbColt>() {
this.mEntityRESTConsumer.processEntity(mtbColtToSaveClone, new ISimpleOperationCallback<MtbColt>() {
@Override
public void onSuccess(MtbColt value) {
if (onComplete != null) onComplete.run(value);
@@ -88,8 +84,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
public static void saveColli(List<MtbColt> mtbColtsToSave, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
public void saveColli(List<MtbColt> mtbColtsToSave, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
for (MtbColt mtbColt : mtbColtsToSave) {
mtbColt.setMtbCols(null);
@@ -101,21 +96,11 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
}
EntityRESTConsumer.processEntityList(mtbColtsToSave, new ISimpleOperationCallback<List<MtbColt>>() {
@Override
public void onSuccess(List<MtbColt> value) {
if (onComplete != null) onComplete.run(value);
}
@Override
public void onFailed(Exception ex) {
if (onFailed != null) onFailed.run(ex);
}
}, true, MtbColt.class);
this.mEntityRESTConsumer.processEntityList(mtbColtsToSave, true, MtbColt.class, onComplete, onFailed);
}
public static void createColloLavorazione(int segno, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
public void createColloLavorazione(int segno, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
MtbColt mtbColtToCreate = new MtbColt()
.setSegno(segno)
.setGestione(GestioneEnum.LAVORAZIONE);
@@ -126,20 +111,14 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
.setOperation(CommonModelConsts.OPERATION.INSERT);
saveColloStatic(mtbColtToCreate, new ISimpleOperationCallback<MtbColt>() {
@Override
public void onSuccess(MtbColt value) {
saveCollo(mtbColtToCreate, value -> {
if (onComplete != null) onComplete.run(value);
}
@Override
public void onFailed(Exception ex) {
}, ex -> {
if (onFailed != null) onFailed.run(ex);
}
});
}
public static void createColloScaricoDaCarico(MtbColt sourceMtbColt, MtbDepoPosizione posizione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
public void createColloScaricoDaCarico(MtbColt sourceMtbColt, MtbDepoPosizione posizione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
MtbColt newMtbColt = new MtbColt()
.initDefaultFields()
@@ -189,20 +168,10 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
saveColloStatic(newMtbColt, new ISimpleOperationCallback<MtbColt>() {
@Override
public void onSuccess(MtbColt value) {
if (onComplete != null) onComplete.run(value);
saveCollo(newMtbColt, onComplete, onFailed);
}
@Override
public void onFailed(Exception ex) {
if (onFailed != null) onFailed.run(ex);
}
});
}
public static 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()
.initDefaultFields()
@@ -210,8 +179,8 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
.setGestione(GestioneEnum.LAVORAZIONE)
.setSegno(-1)
.setCodTcol(sourceMtbColt.getCodTcol())
.setPesoKg(sourceMtbColt.getPesoKg())
.setPesoNettoKg(sourceMtbColt.getPesoNettoKg())
// .setPesoKg(sourceMtbColt.getPesoKg())
// .setPesoNettoKg(sourceMtbColt.getPesoNettoKg())
.setLarghezzaCm(sourceMtbColt.getLarghezzaCm())
.setLunghezzaCm(sourceMtbColt.getLunghezzaCm())
.setAltezzaCm(sourceMtbColt.getAltezzaCm())
@@ -252,7 +221,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
.setPartitaMag(original.getPartitaMag())
.setOperation(CommonModelConsts.OPERATION.INSERT);
for (OrdineLavorazioneDTO ordLav : ordini) {
if (ordLav.getQtaColVersamento().getBigDecimal().compareTo(BigDecimal.ZERO) > 0){
if (ordLav.getQtaColVersamento().getBigDecimal().compareTo(BigDecimal.ZERO) > 0) {
MtbColr ordColr = (MtbColr) mtbColrClone.clone();
ordColr.setQtaCol(ordLav.getQtaColVersamento().getBigDecimal());
ordColr.setNumCnf(ordLav.getNumCnfVersamento().getBigDecimal());
@@ -265,27 +234,15 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
saveColloStatic(newMtbColt, new ISimpleOperationCallback<MtbColt>() {
@Override
public void onSuccess(MtbColt value) {
if (onComplete != null) onComplete.run(value);
}
@Override
public void onFailed(Exception ex) {
if (onFailed != null) onFailed.run(ex);
}
});
saveCollo(newMtbColt, onComplete, onFailed);
}
public static void createColloFromEtichettaAnonima(BarcodeScanDTO barcodeScanDTO, GestioneEnum gestione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
public void createColloFromEtichettaAnonima(BarcodeScanDTO barcodeScanDTO, GestioneEnum gestione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
createColloFromEtichettaAnonima(barcodeScanDTO.getStringValue(), gestione, onComplete, onFailed);
}
public static void createColloFromEtichettaAnonima(String barcode, GestioneEnum gestione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
public void createColloFromEtichettaAnonima(String barcode, GestioneEnum gestione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
MtbColt mtbColtToCreate = new MtbColt()
.setGestione(gestione);
@@ -311,39 +268,16 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
mtbColtToCreate
.setOperation(CommonModelConsts.OPERATION.INSERT);
saveColloStatic(mtbColtToCreate, new ISimpleOperationCallback<MtbColt>() {
@Override
public void onSuccess(MtbColt value) {
if (onComplete != null) onComplete.run(value);
}
@Override
public void onFailed(Exception ex) {
if (onFailed != null) onFailed.run(ex);
}
});
saveCollo(mtbColtToCreate, onComplete, onFailed);
}
public void deleteCollo(MtbColt mtbColtToDelete, Runnable onComplete, RunnableArgs<Exception> onFailed) {
ColliMagazzinoRESTConsumer.deleteColloStatic(mtbColtToDelete, onComplete, onFailed);
}
public static void deleteColloStatic(MtbColt mtbColtToDelete, Runnable onComplete, RunnableArgs<Exception> onFailed) {
mtbColtToDelete.setOperation(CommonModelConsts.OPERATION.DELETE);
saveColloStatic(mtbColtToDelete, new ISimpleOperationCallback<MtbColt>() {
@Override
public void onSuccess(MtbColt value) {
saveCollo(mtbColtToDelete, value -> {
if (onComplete != null) onComplete.run();
}
@Override
public void onFailed(Exception ex) {
if (onFailed != null) onFailed.run(ex);
}
});
}, onFailed);
}
public static void distribuisciCollo(MtbColt mtbColtToDistribute, DistribuzioneColloDTO.CriterioDistribuzione criterioDistribuzione, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
@@ -375,7 +309,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
}
onComplete.run(newList);
}, onFailed);
}
@@ -389,10 +322,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
public void getBySSCC(String ssccString, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
ColliMagazzinoRESTConsumer.getBySSCCStatic(ssccString, onlyResiduo, throwExcIfNull, onComplete, onFailed);
}
public static void getBySSCCStatic(String ssccString, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
colliMagazzinoRESTConsumerService.getColloByBarcode(ssccString, onlyResiduo, throwExcIfNull).enqueue(new Callback<ServiceRESTResponse<MtbColt>>() {
@Override
@@ -402,7 +331,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
List<MtbColt> mtbColtList = new ArrayList<>();
mtbColtList.add(mtbColt);
fillMtbAartsOfMtbColts(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed);
fillMtbAartsOfMtbColtsStatic(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed);
} else {
onComplete.run(mtbColt);
}
@@ -417,8 +346,11 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
});
}
public void fillMtbAartsOfMtbColts(List<MtbColt> mtbColts, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
fillMtbAartsOfMtbColtsStatic(mtbColts, onComplete, onFailed);
}
public static void fillMtbAartsOfMtbColts(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<>();
for (MtbColt mtbColt : mtbColts) {
@@ -430,7 +362,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
ArticoloRESTConsumer.getByCodMart(codMarts, arts -> {
ArticoloRESTConsumer.getByCodMartsStatic(codMarts, arts -> {
if (arts != null && arts.size() > 0) {
for (MtbColt mtbColt : mtbColts) {
@@ -459,10 +391,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
public void getMultipleByTestate(List<MtbColt> testate, boolean onlyResiduo, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
ColliMagazzinoRESTConsumer.getMultipleByTestateStatic(testate, onlyResiduo, onComplete, onFailed);
}
public static void getMultipleByTestateStatic(List<MtbColt> testate, boolean onlyResiduo, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
ArrayList<MtbColt> resultMtbColt = new ArrayList<>();
cyclicGetMultipleByTestate(testate.iterator(), onlyResiduo, resultMtbColt, () -> {
onComplete.run(resultMtbColt);
@@ -470,9 +398,9 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
private static void cyclicGetMultipleByTestate(@NotNull Iterator<MtbColt> sourceMtbColts, boolean onlyResiduo, ArrayList<MtbColt> resultMtbColt, Runnable onComplete, RunnableArgs<Exception> onAbort) {
private void cyclicGetMultipleByTestate(@NotNull Iterator<MtbColt> sourceMtbColts, boolean onlyResiduo, ArrayList<MtbColt> resultMtbColt, Runnable onComplete, RunnableArgs<Exception> onAbort) {
if (sourceMtbColts.hasNext()) {
getByTestataStatic(sourceMtbColts.next(), onlyResiduo, false, mtbColt -> {
getByTestata(sourceMtbColts.next(), onlyResiduo, false, mtbColt -> {
resultMtbColt.add(mtbColt);
cyclicGetMultipleByTestate(sourceMtbColts, onlyResiduo, resultMtbColt, onComplete, onAbort);
}, onAbort);
@@ -488,103 +416,79 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
.setDataCollo(dataCollo)
.setSerCollo(serCollo);
ColliMagazzinoRESTConsumer.getByTestataStatic(mtbColtToRetrieve, onlyResiduo, throwExcIfNull, onComplete, onFailed);
getByTestata(mtbColtToRetrieve, onlyResiduo, throwExcIfNull, onComplete, onFailed);
}
public void getByTestata(MtbColt testata, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
ColliMagazzinoRESTConsumer.getByTestataStatic(testata, onlyResiduo, throwExcIfNull, onComplete, onFailed);
}
testata.setMtbColr(new ObservableArrayList<>());
public static void getByTestataStatic(MtbColt testata, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
String ssccString = null;
if (testata.getSerCollo().equalsIgnoreCase(CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE)) {
ssccString = "U";
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
colliMagazzinoRESTConsumerService.getColloInGiac(onlyResiduo, throwExcIfNull, testata).enqueue(new Callback<ServiceRESTResponse<MtbColt>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
analyzeAnswer(response, "getColloInGiac", mtbColt -> {
SimpleDateFormat sdf = new SimpleDateFormat("yy");
ssccString += sdf.format(testata.getDataColloD());
ssccString += String.format("%07d", testata.getNumCollo());
if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
List<MtbColt> mtbColtList = new ArrayList<>();
mtbColtList.add(mtbColt);
fillMtbAartsOfMtbColtsStatic(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed);
} else {
ssccString = "";
switch (testata.getGestioneEnum()) {
case ACQUISTO:
ssccString += "1";
break;
case LAVORAZIONE:
ssccString += "2";
break;
case VENDITA:
ssccString += "3";
break;
onComplete.run(mtbColt);
}
SimpleDateFormat sdf = new SimpleDateFormat("yy");
ssccString += sdf.format(testata.getDataColloD());
ssccString += String.format("%05d", testata.getNumCollo());
ssccString += "0";
}, onFailed);
}
getBySSCCStatic(ssccString, onlyResiduo, throwExcIfNull, onComplete, onFailed);
@Override
public void onFailure(Call<ServiceRESTResponse<MtbColt>> call, Throwable t) {
onFailed.run(new Exception(t));
}
public static void changePosizione(MtbColt mtbColtToSave, MtbDepoPosizione posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
MtbColt mtbColtToSaveClone = (MtbColt) mtbColtToSave.clone();
mtbColtToSaveClone.setOperation(CommonModelConsts.OPERATION.UPDATE);
mtbColtToSaveClone.setMtbColr(new ObservableArrayList<>());
if (posizione == null) mtbColtToSaveClone.setPosizione(null);
else mtbColtToSaveClone.setPosizione(posizione.getPosizione());
ColliMagazzinoRESTConsumer.saveColloStatic(mtbColtToSaveClone, mtbColt -> {
if (onComplete != null) onComplete.run();
}, ex -> {
if (onFailed != null) onFailed.run(ex);
});
}
public void updateRiga(MtbColr mtbColrToUpdate, Runnable onComplete, RunnableArgs<Exception> onFailed) {
updateRigaStatic(mtbColrToUpdate, onComplete, onFailed);
public void changePosizione(MtbColt mtbColtToMove, MtbDepoPosizione posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
String codMdep = posizione.getCodMdep();
String posizioneString = posizione.getPosizione();
MtbColt mtbColtToMoveClone = (MtbColt) mtbColtToMove.clone();
for (int i = 0; i < mtbColtToMoveClone.getMtbColr().size(); i++) {
mtbColtToMoveClone.getMtbColr().get(i)
.setMtbAart(null)
.setMtbPartitaMag(null);
}
public static void updateRigaStatic(MtbColr mtbColrToUpdate, Runnable onComplete, RunnableArgs<Exception> onFailed) {
MtbColt mtbColt = new MtbColt()
.setGestione(mtbColrToUpdate.getGestioneEnum())
.setNumCollo(mtbColrToUpdate.getNumCollo())
.setSerCollo(mtbColrToUpdate.getSerCollo())
.setDataCollo(mtbColrToUpdate.getDataColloS());
mtbColt.getMtbColr().add(mtbColrToUpdate);
mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
mtbColrToUpdate.setOperation(CommonModelConsts.OPERATION.UPDATE);
EntityRESTConsumer.processEntity(mtbColt, value -> {
if(onComplete != null) onComplete.run();
}, onFailed, MtbColt.class);
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
colliMagazzinoRESTConsumerService
.spostaULInPosizione(codMdep,
posizioneString,
mtbColtToMoveClone)
.enqueue(new Callback<ServiceRESTResponse<Object>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
analyzeAnswer(response, "changePosizione", mtbColts -> {
onComplete.run();
}, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
if (onFailed != null) onFailed.run(new Exception(t));
}
});
}
public void updateDataFine(MtbColt mtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
ColliMagazzinoRESTConsumer.updateDataFineStatic(mtbColt, onComplete, onFailed);
}
public static void updateDataFineStatic(MtbColt mtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
MtbColt cloneMtbColt = (MtbColt) mtbColt.clone();
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.UPDATE);
cloneMtbColt.setOraFinePrep(UtilityDate.getDateInstance());
cloneMtbColt.setMtbColr(new ObservableArrayList<>());
ColliMagazzinoRESTConsumer.saveColloStatic(cloneMtbColt, value -> {
saveCollo(cloneMtbColt, value -> {
onComplete.run();
}, ex -> {
if (onFailed != null) onFailed.run(ex);
@@ -593,10 +497,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
}
public void canLUBeDeleted(MtbColt mtbColt, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
ColliMagazzinoRESTConsumer.canLUBeDeletedStatic(mtbColt, onComplete, onFailed);
}
public static void canLUBeDeletedStatic(MtbColt mtbColt, RunnableArgs<Boolean> onComplete, RunnableArgs<Exception> onFailed) {
HashMap<String, Object> params = new HashMap<>();
params.put("mtb_colt.gestione", mtbColt.getGestione());
@@ -638,7 +538,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {
}.getType();
SystemRESTConsumer.<ArrayList<MtbColt>>processSqlStatic(query, typeOfObjectsList, data -> {
this.mSystemRESTConsumer.<ArrayList<MtbColt>>processSql(query, typeOfObjectsList, data -> {
onComplete.run(data != null && data.size() > 0);
}, onFailed);
}
@@ -650,7 +550,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
@Override
public void onResponse(Call<ServiceRESTResponse<List<MtbColt>>> call, Response<ServiceRESTResponse<List<MtbColt>>> response) {
analyzeAnswer(response, "getColliInBasket", mtbColts -> {
fillMtbAartsOfMtbColts(mtbColts, onComplete, onFailed);
fillMtbAartsOfMtbColtsStatic(mtbColts, onComplete, onFailed);
}, onFailed);
}
@@ -661,12 +561,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
});
}
public static void creaRettificaColloStatic(MtbColr sourceMtbColrOriginal, BigDecimal newNumCnf, BigDecimal newQtaTot, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
public void creaRettificaCollo(MtbColr sourceMtbColrOriginal, BigDecimal newNumCnf, BigDecimal newQtaTot, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
MtbColr sourceMtbColr = (MtbColr) sourceMtbColrOriginal.clone();
sourceMtbColr.setMtbPartitaMag(null);
sourceMtbColr.setMtbAart(null);
@@ -680,25 +575,75 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
colliMagazzinoRESTConsumerService.creaRettificaCollo(
SettingsManager.i().getUserSession().getDepo().getCodMdep(),
rettificaULDTO
).enqueue(new Callback<ServiceRESTResponse<MtbColr>>() {
).enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<MtbColr>> call, Response<ServiceRESTResponse<MtbColr>> response) {
analyzeAnswer(response, "creaRettificaCollo", data -> {
onComplete.run(data);
}, onFailed);
analyzeAnswer(response, "creaRettificaCollo", onComplete, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<MtbColr>> call, Throwable t) {
if(onFailed != null) onFailed.run(new Exception(t));
if (onFailed != null) onFailed.run(new Exception(t));
}
});
}
public void spostaArtsTraUL(MtbColt sourceMtbColt, MtbColt destMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
MtbColt mtbColtToMoveClone = (MtbColt) sourceMtbColt.clone();
MtbColt mtbColtDestClone = (MtbColt) destMtbColt.clone();
for (int i = 0; i < mtbColtToMoveClone.getMtbColr().size(); i++) {
mtbColtToMoveClone.getMtbColr().get(i)
.setMtbAart(null)
.setMtbPartitaMag(null);
}
mtbColtDestClone.setMtbColr(null);
SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO = new SpostaArtsTraULRequestDTO()
.setSourceMtbColt(mtbColtToMoveClone)
.setDestinationMtbColt(mtbColtDestClone);
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
colliMagazzinoRESTConsumerService.spostaArtsTraUL(spostaArtsTraULRequestDTO).enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
analyzeAnswer(response, "spostaArtsTraUL", data -> {
onComplete.run();
}, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
if (onFailed != null) onFailed.run(new Exception(t));
}
});
}
public void assegnaLottoSuColloScarico(MtbColt sourceMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
MtbColt sourceMtbColtClone = (MtbColt) sourceMtbColt.clone();
public void creaRettificaCollo(MtbColr sourceMtbColrOriginal, BigDecimal newNumCnf, BigDecimal newQtaTot, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
creaRettificaColloStatic(sourceMtbColrOriginal, newNumCnf, newQtaTot, onComplete, onFailed);
for (int i = 0; i < sourceMtbColtClone.getMtbColr().size(); i++) {
sourceMtbColtClone.getMtbColr().get(i)
.setMtbAart(null)
.setMtbPartitaMag(null);
}
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
colliMagazzinoRESTConsumerService.assegnaLottoSuColloScarico(sourceMtbColtClone).enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
analyzeAnswer(response, "assegnaLottoSuColloScarico", data -> {
onComplete.run();
}, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<MtbColt>> call, Throwable t) {
if (onFailed != null) onFailed.run(new Exception(t));
}
});
}
}

View File

@@ -9,6 +9,7 @@ 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.ServiceRESTResponse;
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
@@ -17,16 +18,28 @@ import retrofit2.http.Query;
public interface ColliMagazzinoRESTConsumerService {
@POST("SM2DistribuzioneRigheCollo")
@POST("wms/distribuzioneRigheCollo")
Call<ServiceRESTResponse<JsonObject>> distribuisciCollo(@Body DistribuzioneColloDTO distribuzioneCollo);
@POST("getColloByBarcode")
Call<ServiceRESTResponse<MtbColt>> getColloByBarcode(@Query("codBarreCollo") String sscc, @Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull);
@POST("getColloInGiac")
Call<ServiceRESTResponse<MtbColt>> getColloInGiac(@Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull, @Body MtbColt mtbColt);
@GET("getColliInBasket")
Call<ServiceRESTResponse<List<MtbColt>>> getColliInBasket(@Query("codMdep") String codMdep);
@POST("creaRettificaCollo")
Call<ServiceRESTResponse<MtbColr>> creaRettificaCollo(@Query("codMdep") String codMdep, @Body RettificaULDTO rettificaULDTO);
@POST("wms/spostaULInPosizione")
Call<ServiceRESTResponse<Object>> spostaULInPosizione(@Query("codMdep") String codMdep, @Query("posizione") String posizione, @Body MtbColt mtbColtToMove);
@POST("wms/spostaArtsTraUL")
Call<ServiceRESTResponse<Object>> spostaArtsTraUL(@Body SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO);
@POST("wms/assegnaLottoSuColloScarico")
Call<ServiceRESTResponse<MtbColt>> assegnaLottoSuColloScarico(@Body MtbColt mtbColt);
}

View File

@@ -2,31 +2,39 @@ package it.integry.integrywmsnative.core.rest.consumers;
import java.util.List;
import javax.inject.Singleton;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.CommonModelConsts;
import it.integry.integrywmsnative.core.model.MtbDepo;
import it.integry.integrywmsnative.core.utility.UtilityLogger;
public class DepositoRESTConsumer {
@Singleton
public class DepositoRESTConsumer extends _BaseRESTConsumer {
public static void getDepoByCodMdep(String codMdep, RunnableArgs<MtbDepo> onComplete) {
private final EntityRESTConsumer entityRESTConsumer;
public DepositoRESTConsumer(EntityRESTConsumer entityRESTConsumer) {
this.entityRESTConsumer = entityRESTConsumer;
}
public void getDepoByCodMdep(String codMdep, RunnableArgs<MtbDepo> onComplete, RunnableArgs<Exception> onFailed) {
MtbDepo mtbDepo = new MtbDepo();
mtbDepo.setCodMdep(codMdep);
mtbDepo.setOperation(CommonModelConsts.OPERATION.SELECT);
mtbDepo.setOnlyPkMaster(false);
EntityRESTConsumer.selectEntity(mtbDepo, new ISimpleOperationCallback<List<MtbDepo>>() {
this.entityRESTConsumer.selectEntity(mtbDepo, new ISimpleOperationCallback<>() {
@Override
public void onSuccess(List<MtbDepo> value) {
if(value != null && value.size() > 0) {
if (value != null && value.size() > 0) {
onComplete.run(value.get(0));
}
}
@Override
public void onFailed(Exception ex) {
UtilityLogger.errorMe(ex);
onFailed.run(ex);
}
}, MtbDepo.class);
}

View File

@@ -4,42 +4,26 @@ import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Singleton;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.EntityBase;
import it.integry.integrywmsnative.core.rest.RESTBuilder;
import it.integry.integrywmsnative.core.rest.model.EsitoType;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import it.integry.integrywmsnative.core.model.EntityBase;
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class EntityRESTConsumer {
public static <T extends EntityBase> void processEntity(T entityToSave, RunnableArgs<T> onComplete, RunnableArgs<Exception> onFailed, Class<T> type) {
processEntity(entityToSave, new ISimpleOperationCallback<T>() {
@Override
public void onSuccess(T value) {
if(onComplete != null) onComplete.run(value);
}
@Override
public void onFailed(Exception ex) {
if(onFailed != null) onFailed.run(ex);
}
}, type);
}
@Singleton
public class EntityRESTConsumer extends _BaseRESTConsumer {
public static <T extends EntityBase> void processEntity(T entityToSave, final ISimpleOperationCallback<T> callback, Class<T> type) {
public <T extends EntityBase> void processEntity(T entityToSave, final ISimpleOperationCallback<T> callback, Class<T> type) {
RunnableArgs<Exception> tmpFailed = ex -> {
if (callback != null) callback.onFailed(ex);
@@ -48,7 +32,7 @@ public class EntityRESTConsumer {
EntityRESTConsumerService service = RESTBuilder.getService(EntityRESTConsumerService.class);
service
.processEntity(entityToSave)
.enqueue(new Callback<ServiceRESTResponse<JsonObject>>() {
.enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<JsonObject>> call, Response<ServiceRESTResponse<JsonObject>> response) {
if (response.isSuccessful()) {
@@ -82,16 +66,16 @@ public class EntityRESTConsumer {
}
public static <T extends EntityBase> void processEntityList(List<T> entitiesToSave, final ISimpleOperationCallback<List<T>> callback, boolean singleTransaction, Class<T> type) {
public <T extends EntityBase> void processEntityList(List<T> entitiesToSave, boolean singleTransaction, Class<T> type, final RunnableArgs<List<T>> onComplete, final RunnableArgs<Exception> onFailed) {
RunnableArgs<Exception> tmpFailed = ex -> {
// UtilityExceptions.defaultException(null, ex);
if (callback != null) callback.onFailed(ex);
if (onFailed != null) onFailed.run(ex);
};
EntityRESTConsumerService service = RESTBuilder.getService(EntityRESTConsumerService.class);
Call<List<ServiceRESTResponse<JsonObject>>> request = service.processEntityList(singleTransaction, entitiesToSave);
request.enqueue(new Callback<List<ServiceRESTResponse<JsonObject>>>() {
request.enqueue(new Callback<>() {
@Override
public void onResponse(Call<List<ServiceRESTResponse<JsonObject>>> call, Response<List<ServiceRESTResponse<JsonObject>>> response) {
if (response.isSuccessful()) {
@@ -115,7 +99,7 @@ public class EntityRESTConsumer {
}
}
callback.onSuccess(responseList);
onComplete.run(responseList);
} else {
Log.e("EntityRESTConsumer", response.message());
tmpFailed.run(new Exception(response.message()));
@@ -136,7 +120,7 @@ public class EntityRESTConsumer {
}
public static <T extends EntityBase> void selectEntity(T entityToSave, final ISimpleOperationCallback<List<T>> callback, Class type) {
public <T extends EntityBase> void selectEntity(T entityToSave, final ISimpleOperationCallback<List<T>> callback, Class type) {
EntityRESTConsumerService service = RESTBuilder.getService(EntityRESTConsumerService.class);
Call<ServiceRESTResponse<JsonObject>> request = service.processEntity(entityToSave);

View File

@@ -6,15 +6,18 @@ import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Singleton;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.MtbTCol;
import it.integry.integrywmsnative.core.utility.UtilityDB;
@Singleton
public class MagazzinoRESTConsumer extends _BaseRESTConsumer {
public static void getTipoCollo(String codTcol, RunnableArgs<MtbTCol> onComplete, RunnableArgs<Exception> onFailed) {
public void getTipoCollo(String codTcol, RunnableArgs<MtbTCol> onComplete, RunnableArgs<Exception> onFailed) {
String baseSql = "SELECT * " +
"FROM mtb_tcol " +
"WHERE cod_tcol = " + UtilityDB.valueToString(codTcol);
@@ -36,7 +39,11 @@ public class MagazzinoRESTConsumer extends _BaseRESTConsumer {
});
}
public static void getTipiCollo(RunnableArgs<List<MtbTCol>> onComplete, RunnableArgs<Exception> onFailed) {
public void getTipiCollo(RunnableArgs<List<MtbTCol>> onComplete, RunnableArgs<Exception> onFailed) {
getTipiColloStatic(onComplete, onFailed);
}
public static void getTipiColloStatic(RunnableArgs<List<MtbTCol>> onComplete, RunnableArgs<Exception> onFailed) {
String baseSql = "SELECT * " +
"FROM mtb_tcol ";

View File

@@ -1,23 +1,42 @@
package it.integry.integrywmsnative.core.rest.consumers;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.inject.Singleton;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.JtbFasi;
import it.integry.integrywmsnative.core.rest.RESTBuilder;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import it.integry.integrywmsnative.core.utility.UtilityDB;
import it.integry.integrywmsnative.core.utility.UtilityDate;
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
@Singleton
public class MesRESTConsumer extends _BaseRESTConsumer {
public static void getOrdiniLavorazioneMateriale(String codJfas, String idMateriale, RunnableArgs<List<OrdineLavorazioneDTO>> onComplete, RunnableArgs<Exception> onFailed){
private final SystemRESTConsumer mSystemRESTConsumer;
public MesRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
this.mSystemRESTConsumer = systemRESTConsumer;
}
public void getOrdiniLavorazioneMateriale(String codJfas, String idMateriale, RunnableArgs<List<OrdineLavorazioneDTO>> onComplete, RunnableArgs<Exception> onFailed) {
MesRESTConsumerService mesRESTConsumerService = RESTBuilder.getService(MesRESTConsumerService.class);
mesRESTConsumerService.getOrdiniLavorazioneMateriale(codJfas,idMateriale).enqueue(new Callback<ServiceRESTResponse<List<OrdineLavorazioneDTO>>>() {
mesRESTConsumerService.getOrdiniLavorazioneMateriale(codJfas, idMateriale)
.enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Response<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> response) {
analyzeAnswer(response, "getAvailablePosizioni", (m) -> onComplete.run(response.body().getDto()), onFailed);
analyzeAnswer(response, "getOrdiniLavorazioneMateriale", (m) -> onComplete.run(response.body().getDto()), onFailed);
}
@Override
@@ -25,7 +44,50 @@ public class MesRESTConsumer extends _BaseRESTConsumer {
onFailed.run(new Exception(t));
}
});
}
public void getOrdiniLavorazione(String flagEvaso, String codJfas, RunnableArgs<List<OrdineLavorazioneDTO>> onComplete, RunnableArgs<Exception> onFailed) {
MesRESTConsumerService mesRESTConsumerService = RESTBuilder.getService(MesRESTConsumerService.class);
mesRESTConsumerService.getOrdiniLavorazione(flagEvaso, codJfas)
.enqueue(new Callback<ServiceRESTResponse<List<OrdineLavorazioneDTO>>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Response<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> response) {
analyzeAnswer(response, "getOrdiniLavorazione", (m) -> onComplete.run(response.body().getDto()), onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Throwable t) {
onFailed.run(new Exception(t));
}
});
}
public void getOrdiniLavorazione(Date dateStart, String flagEvaso, String codJfas, RunnableArgs<List<OrdineLavorazioneDTO>> onComplete, RunnableArgs<Exception> onFailed) {
MesRESTConsumerService mesRESTConsumerService = RESTBuilder.getService(MesRESTConsumerService.class);
mesRESTConsumerService.getOrdiniLavorazione(UtilityDate.formatDate(dateStart, UtilityDate.COMMONS_DATE_FORMATS.YMD_DASH), flagEvaso, codJfas)
.enqueue(new Callback<ServiceRESTResponse<List<OrdineLavorazioneDTO>>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Response<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> response) {
analyzeAnswer(response, "getOrdiniLavorazione", (m) -> onComplete.run(response.body().getDto()), onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> call, Throwable t) {
onFailed.run(new Exception(t));
}
});
}
public void getLineeProduzione(String codJfasParent, RunnableArgs<List<JtbFasi>> onComplete, RunnableArgs<Exception> onFailed) {
Type typeOfObjectsList = new TypeToken<ArrayList<JtbFasi>>() {}.getType();
this.mSystemRESTConsumer.processSql(
"SELECT * FROM jtb_fasi WHERE cod_jfas_parent = " + UtilityDB.valueToString(codJfasParent),
typeOfObjectsList,
onComplete,
onFailed);
}
}

View File

@@ -11,7 +11,15 @@ import retrofit2.http.Query;
public interface MesRESTConsumerService {
@GET("mes/getOrdiniLavorazioneMateriale")
@GET("mes_v2/getOrdiniLavorazioneMateriale")
Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> getOrdiniLavorazioneMateriale(@Query("codJfas") String codJfas, @Query("idMateriale") String idMateriale);
@GET("mes_v2/getOrdiniLavorazione")
Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> getOrdiniLavorazione(@Query("flagEvaso") String flagEvaso, @Query("codJfas") String codJfas);
@GET("mes_v2/getOrdiniLavorazione")
Call<ServiceRESTResponse<List<OrdineLavorazioneDTO>>> getOrdiniLavorazione(@Query("startDate") String startDate, @Query("flagEvaso") String flagEvaso, @Query("codJfas") String codJfas);
}

View File

@@ -1,19 +1,35 @@
package it.integry.integrywmsnative.core.rest.consumers;
import com.annimon.stream.Optional;
import com.annimon.stream.Stream;
import com.google.gson.reflect.TypeToken;
import com.orhanobut.logger.Logger;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Random;
import javax.inject.Singleton;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.CommonModelConsts;
import it.integry.integrywmsnative.core.model.MtbColr;
import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
import it.integry.integrywmsnative.core.rest.RESTBuilder;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import it.integry.integrywmsnative.core.utility.UtilityLogger;
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
import it.integry.integrywmsnative.core.rest.model.GetPickingListDTO;
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
import it.integry.integrywmsnative.core.utility.UtilityDB;
import it.integry.integrywmsnative.core.utility.UtilityLogger;
import it.integry.integrywmsnative.core.utility.UtilityQuery;
import it.integry.integrywmsnative.core.utility.UtilityString;
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
@@ -21,8 +37,115 @@ import retrofit2.Response;
@Singleton
public class OrdiniRESTConsumer extends _BaseRESTConsumer {
public static void retrieveListaArticoliFromOrdiniUscita(List<OrdineVenditaInevasoDTO> orders, RunnableArgs<List<SitArtOrdDTO>> onComplete, RunnableArgs<Exception> onFailed) {
private final SystemRESTConsumer mSystemRESTConsumer;
private final EntityRESTConsumer mEntityRESTConsumer;
public OrdiniRESTConsumer(SystemRESTConsumer systemRESTConsumer, EntityRESTConsumer entityRESTConsumer) {
this.mSystemRESTConsumer = systemRESTConsumer;
this.mEntityRESTConsumer = entityRESTConsumer;
}
public void getSuggestedPickingList(String codMdep, List<SitArtOrdDTO> sitArtOrdList, RunnableArgs<List<PickingObjectDTO>> onComplete, RunnableArgs<Exception> onFailed) {
OrdiniRESTConsumerService service = RESTBuilder.getService(OrdiniRESTConsumerService.class, 90);
service
.getSuggestedPickingList(codMdep, sitArtOrdList)
.enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<List<PickingObjectDTO>>> call, Response<ServiceRESTResponse<List<PickingObjectDTO>>> response) {
analyzeAnswer(response, "getSuggestedPickingList", pickingObjects -> {
List<MtbPartitaMag> batchLotsToSearch = new ArrayList<>();
for (PickingObjectDTO pickingObjectDTO : pickingObjects) {
for (MtbColt mtbColt : pickingObjectDTO.getMtbColts()) {
Stream.of(mtbColt.getMtbColr())
.filter(x -> !UtilityString.isNullOrEmpty(x.getPartitaMag()))
.forEach(x -> {
if (!Stream.of(batchLotsToSearch).anyMatch(batchLotToSearch -> batchLotToSearch.getCodMart().equalsIgnoreCase(x.getCodMart()) && batchLotToSearch.getPartitaMag().equalsIgnoreCase(x.getPartitaMag()))) {
MtbPartitaMag mtbPartitaMag = new MtbPartitaMag()
.setCodMart(x.getCodMart())
.setPartitaMag(x.getPartitaMag());
mtbPartitaMag.setOperation(CommonModelConsts.OPERATION.SELECT_OBJECT);
mtbPartitaMag.setOnlyPkMaster(false);
batchLotsToSearch.add(mtbPartitaMag);
}
});
}
}
Random rand = new Random();
retrievePartiteMag(batchLotsToSearch, partite -> {
for (PickingObjectDTO pickingObjectDTO : pickingObjects) {
for (MtbColt mtbColt : pickingObjectDTO.getMtbColts()) {
for (MtbColr mtbColr : mtbColt.getMtbColr()) {
mtbColr.setId(rand.nextInt());
Optional<MtbPartitaMag> optionalMtbPartitaMag = Stream.of(partite)
.filter(x -> x.getCodMart().equalsIgnoreCase(mtbColr.getCodMart())
&& (!UtilityString.isNullOrEmpty(x.getPartitaMag()) && x.getPartitaMag().equalsIgnoreCase(mtbColr.getPartitaMag())))
.findFirst();
if (optionalMtbPartitaMag.isPresent()) mtbColr.setMtbPartitaMag(optionalMtbPartitaMag.get());
}
}
}
onComplete.run(pickingObjects);
}, onFailed);
}, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<List<PickingObjectDTO>>> call, Throwable t) {
UtilityLogger.errorMe(new Exception(t));
onFailed.run(new Exception(t));
}
});
}
private void retrievePartiteMag(List<MtbPartitaMag> partitaMag, RunnableArgs<List<MtbPartitaMag>> onComplete, RunnableArgs<Exception> onFailed) {
this.mEntityRESTConsumer.processEntityList(partitaMag, true, MtbPartitaMag.class, onComplete, onFailed);
}
public void getOrdiniInevasi(String codMdep, GestioneEnum gestione, RunnableArgs<List<OrdineUscitaInevasoDTO>> onComplete, RunnableArgs<Exception> onFailed) {
OrdiniRESTConsumerService service = RESTBuilder.getService(OrdiniRESTConsumerService.class);
service.getOrdiniInevasi(codMdep, gestione.getText())
.enqueue(new Callback<ServiceRESTResponse<List<OrdineUscitaInevasoDTO>>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<List<OrdineUscitaInevasoDTO>>> call, Response<ServiceRESTResponse<List<OrdineUscitaInevasoDTO>>> response) {
analyzeAnswer(response, "getOrdiniInevasi", responseDtoList -> {
if (responseDtoList == null) responseDtoList = new ArrayList<>();
onComplete.run(responseDtoList);
}, ex -> {
Logger.e(ex, "Errore durante il caricamento degli ordini di lavorazione");
if (onFailed != null) onFailed.run(ex);
});
}
@Override
public void onFailure(Call<ServiceRESTResponse<List<OrdineUscitaInevasoDTO>>> call, Throwable t) {
Logger.e(t, "Errore durante il caricamento degli ordini di lavorazione");
if (onFailed != null) onFailed.run(new Exception(t));
}
});
}
public void retrieveListaArticoliFromOrdiniUscita(List<OrdineUscitaInevasoDTO> orders, RunnableArgs<List<SitArtOrdDTO>> onComplete, RunnableArgs<Exception> onFailed) {
List<GetPickingListDTO> getPickingListDTOs = Stream.of(orders)
.map(x -> new GetPickingListDTO()
.setData(x.getDataOrdS())
@@ -37,7 +160,7 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
service.getArticoliFromOrdini(getPickingListDTOs).enqueue(new Callback<ServiceRESTResponse<List<SitArtOrdDTO>>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<List<SitArtOrdDTO>>> call, Response<ServiceRESTResponse<List<SitArtOrdDTO>>> response) {
analyzeAnswer(response, "retrieveListaArticoliFromOrdiniVendita", onComplete, onFailed);
analyzeAnswer(response, "retrieveListaArticoliFromOrdiniUscita", onComplete, onFailed);
}
@Override
@@ -48,25 +171,46 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
});
}
public void getSuggestedPickingList(String codMdep, List<SitArtOrdDTO> sitArtOrdList, RunnableArgs<List<PickingObjectDTO>> onComplete, RunnableArgs<Exception> onFailed) {
OrdiniRESTConsumerService service = RESTBuilder.getService(OrdiniRESTConsumerService.class, 90);
public void getBancaliGiaRegistrati(List<OrdineInevasoDTO> orders, GestioneEnum gestione, int segno, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
String whereCondGestione = "";
service
.getSuggestedPickingList(codMdep, sitArtOrdList)
.enqueue(new Callback<ServiceRESTResponse<List<PickingObjectDTO>>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<List<PickingObjectDTO>>> call, Response<ServiceRESTResponse<List<PickingObjectDTO>>> response) {
analyzeAnswer(response, "getSuggestedPickingList", onComplete, onFailed);
if (gestione != null) {
whereCondGestione = "mtb_colt.gestione = " + UtilityDB.valueToString(gestione.getText()) + " ";
} else {
whereCondGestione = "(mtb_colt.gestione = 'V' OR mtb_colt.gestione = 'L') ";
}
@Override
public void onFailure(Call<ServiceRESTResponse<List<PickingObjectDTO>>> call, Throwable t) {
UtilityLogger.errorMe(new Exception(t));
onFailed.run(new Exception(t));
String baseSql = "SELECT DISTINCT mtb_colt.* " +
"FROM mtb_colt, " +
" mtb_colr " +
"WHERE mtb_colt.gestione = mtb_colr.gestione " +
" AND mtb_colt.ser_collo = mtb_colr.ser_collo " +
" AND mtb_colt.data_collo = mtb_colr.data_collo " +
" AND mtb_colt.num_collo = mtb_colr.num_collo " +
" AND " + whereCondGestione +
" AND mtb_colt.segno = " + UtilityDB.valueToString(segno) + " " +
" AND mtb_colt.data_doc IS NULL AND ";
List<HashMap<String, Object>> whereCondMapList = new ArrayList<>();
for (OrdineInevasoDTO ordineInevaso : orders) {
HashMap<String, Object> whereCondMap = new HashMap<>();
whereCondMap.put("mtb_colr.data_ord", ordineInevaso.getDataOrdD());
whereCondMap.put("mtb_colr.num_ord", ordineInevaso.getNumOrd());
whereCondMap.put("mtb_colr.gestione", ordineInevaso.getGestione());
whereCondMapList.add(whereCondMap);
}
baseSql += "(" + UtilityQuery.concatFieldListInWhereCond(whereCondMapList) + ")";
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {
}.getType();
this.mSystemRESTConsumer.<List<MtbColt>>processSql(baseSql, typeOfObjectsList, value -> {
if (onComplete != null) onComplete.run(value);
}, ex -> {
if (onFailed != null) onFailed.run(ex);
});
}
}

View File

@@ -4,10 +4,12 @@ import java.util.List;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
import it.integry.integrywmsnative.core.rest.model.GetPickingListDTO;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
@@ -18,4 +20,7 @@ public interface OrdiniRESTConsumerService {
@POST("wms/getSuggestedPickingList")
Call<ServiceRESTResponse<List<PickingObjectDTO>>> getSuggestedPickingList(@Query("codMdep") String codMdep, @Body List<SitArtOrdDTO> sitArtOrdDTOList);
@GET("SM2GetOrdiniVenditaInevasi")
Call<ServiceRESTResponse<List<OrdineUscitaInevasoDTO>>> getOrdiniInevasi(@Query("codMdep") String codMdep, @Query("gestione") String gestione);
}

View File

@@ -6,7 +6,6 @@ import com.annimon.stream.Stream;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
@@ -18,6 +17,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.DtbOrdt;
import it.integry.integrywmsnative.core.rest.RESTBuilder;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import it.integry.integrywmsnative.core.utility.UtilityDate;
import it.integry.integrywmsnative.core.utility.UtilityLogger;
import it.integry.integrywmsnative.core.utility.UtilityThread;
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.dto.ArtDTO;
@@ -59,7 +59,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
});
griglia.setGrigliaAcquistiChild(listaArticoli);
onSuccess.run(griglia);
});
}, false);
}, onFailed);
}
@@ -84,7 +84,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
}
ordineDTO.setChiaveGriglia(griglia.getCodAlis());
ordineDTO.setDataConsD(new Date());
ordineDTO.setDataConsD(UtilityDate.getDateInstance());
ordineDTO.setArtRows(artRows);
saveDTO.setGestione("O");
saveDTO.setOrdineDTO(ordineDTO);
@@ -101,7 +101,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
if (dtoList.size() > 0){
DtbOrdt dto = dtoList.get(0);
ordine.setTransmitted(true);
ordine.setTransmissionDate(new Date());
ordine.setTransmissionDate(UtilityDate.getDateInstance());
ordine.setGestione(dto.getGestione());
ordine.setDataOrdS(dto.getDataOrd());
ordine.setCodMdep(dto.getCodMdep());

View File

@@ -6,22 +6,51 @@ import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import it.integry.integrywmsnative.core.rest.RESTBuilder;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import javax.inject.Singleton;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
import it.integry.integrywmsnative.core.settings.SettingsManager;
import it.integry.integrywmsnative.core.rest.RESTBuilder;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import it.integry.integrywmsnative.core.utility.UtilityDB;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
@Singleton
public class PosizioniRESTConsumer extends _BaseRESTConsumer{
private final SystemRESTConsumer mSystemRESTConsumer;
public PosizioniRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
this.mSystemRESTConsumer = systemRESTConsumer;
}
public void getPosizioneFromString(String posizione, RunnableArgs<MtbDepoPosizione> onComplete, RunnableArgs<Exception> onFailed) {
String sql = "SELECT TOP 1 mtb_depo_posizioni.*," +
" CASE WHEN jtb_fasi.cod_jfas IS NULL THEN 'N' ELSE 'S' END AS flag_linea_produzione " +
" FROM mtb_depo_posizioni " +
" LEFT OUTER JOIN jtb_fasi " +
" ON mtb_depo_posizioni.posizione = jtb_fasi.cod_jfas " +
" WHERE posizione = " + UtilityDB.valueToString(posizione);
SystemRESTConsumer.processSqlStatic(sql, MtbDepoPosizione.class, new ISimpleOperationCallback<MtbDepoPosizione>() {
@Override
public void onSuccess(MtbDepoPosizione value) {
if(onComplete != null) onComplete.run(value);
}
@Override
public void onFailed(Exception ex) {
if(onFailed != null) onFailed.run(ex);
}
});
}
public static void getAvailablePosizioni(RunnableArgs<List<MtbDepoPosizione>> onComplete, RunnableArgs<Exception> onFailed) {
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
// String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
String codMdep = null;
PosizioniRESTConsumerService posizioniRESTConsumerService = RESTBuilder.getService(PosizioniRESTConsumerService.class);
posizioniRESTConsumerService.getAvailablePosizioni(codMdep).enqueue(new Callback<ServiceRESTResponse<List<MtbDepoPosizione>>>() {
@@ -40,11 +69,8 @@ public class PosizioniRESTConsumer extends _BaseRESTConsumer{
}
public static void getBancaliInPosizione(MtbDepoPosizione mtbDepoPosizione, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
String sql = "SELECT * FROM mtb_colt WHERE cod_mdep = " + UtilityDB.valueToString(mtbDepoPosizione.getCodMdep()) + " AND posizione = " + UtilityDB.valueToString(mtbDepoPosizione.getPosizione());
public void getBancaliInPosizione(MtbDepoPosizione mtbDepoPosizione, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
String sql = "SELECT * FROM mtb_colt WHERE segno > 0 AND cod_mdep = " + UtilityDB.valueToString(mtbDepoPosizione.getCodMdep()) + " AND posizione = " + UtilityDB.valueToString(mtbDepoPosizione.getPosizione());
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {}.getType();

View File

@@ -4,16 +4,19 @@ import android.util.Log;
import com.annimon.stream.Stream;
import java.util.HashMap;
import java.util.List;
import javax.inject.Singleton;
import it.integry.integrywmsnative.BuildConfig;
import it.integry.integrywmsnative.core.exception.NoPrintersFoundException;
import it.integry.integrywmsnative.core.rest.RESTBuilder;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.core.rest.RESTBuilder;
import it.integry.integrywmsnative.core.rest.model.JasperDTO;
import it.integry.integrywmsnative.core.rest.model.JasperPairDTO;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import it.integry.integrywmsnative.core.utility.UtilityLogger;
import it.integry.integrywmsnative.core.utility.UtilityString;
import retrofit2.Call;
@@ -29,67 +32,18 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
}
public static void getAvailablePrintersStatic(final ISimpleOperationCallback<List<String>> callback) {
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
printerService.getAvailablePrinters().enqueue(new Callback<ServiceRESTResponse<List<String>>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<List<String>>> call, Response<ServiceRESTResponse<List<String>>> response) {
analyzeAnswer(response, "GetAvailablePrinters", callback);
}
@Override
public void onFailure(Call<ServiceRESTResponse<List<String>>> call, Throwable t) {
}
});
}
public void getAvailablePrinters(String codMdep, final RunnableArgs<List<String>> onComplete, final RunnableArgs<Exception> onFailed) {
getAvailablePrintersStatic(codMdep, onComplete, onFailed);
}
public static void getAvailablePrintersStatic(String codMdep, final RunnableArgs<List<String>> onComplete, RunnableArgs<Exception> onFailed) {
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
printerService.getAvailablePrinters(codMdep).enqueue(new Callback<ServiceRESTResponse<List<String>>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<List<String>>> call, Response<ServiceRESTResponse<List<String>>> response) {
analyzeAnswer(response, "GetAvailablePrinters", new ISimpleOperationCallback<List<String>>() {
@Override
public void onSuccess(List<String> value) {
onComplete.run(value != null ? Stream.of(value).withoutNulls().toList() : null);
}
@Override
public void onFailed(Exception ex) {
onFailed.run(ex);
}
});
}
@Override
public void onFailure(Call<ServiceRESTResponse<List<String>>> call, Throwable t) {
Log.e("GetAvailablePrinters", t.toString());
UtilityLogger.errorMe(new Exception(t));
onFailed.run(new Exception(t));
}
});
}
public void getAvailablePrinters(String codMdep, Type printerType, RunnableArgs<List<String>> onComplete, RunnableArgs<Exception> onFailed) {
PrinterRESTConsumer.getAvailablePrintersStatic(codMdep, printerType, onComplete, onFailed);
}
public static void getAvailablePrintersStatic(String codMdep, Type printerType, RunnableArgs<List<String>> onComplete, RunnableArgs<Exception> onFailed) {
String printerTypeStr = printerType != null ? printerType.toString() : null;
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
printerService.getAvailablePrinters(codMdep, printerTypeStr).enqueue(new Callback<ServiceRESTResponse<List<String>>>() {
printerService.getAvailablePrinters(codMdep, printerTypeStr).enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<List<String>>> call, Response<ServiceRESTResponse<List<String>>> response) {
analyzeAnswer(response, "GetAvailablePrinters", onComplete, onFailed);
analyzeAnswer(response, "GetAvailablePrinters", printerList -> {
printerList = Stream.of(printerList).filter(x -> !UtilityString.isNullOrEmpty(x)).toList();
onComplete.run(printerList);
}, onFailed);
}
@Override
@@ -101,48 +55,68 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
});
}
public void printCollo(String printerName, MtbColt testataColloToPrint, int quantity, String reportName, Runnable onComplete, RunnableArgs<Exception> onFailed) {
printColloStatic(printerName, testataColloToPrint, quantity, reportName, onComplete, onFailed);
}
public void printCollo(Type printerType, MtbColt testataColloToPrint, Runnable onComplete, RunnableArgs<Exception> onFailed) {
public static void printColloStatic(String printerName, MtbColt testataColloToPrint, int quantity, String reportName, Runnable onComplete, RunnableArgs<Exception> onFailed) {
if(BuildConfig.DEBUG) {
if (BuildConfig.DEBUG) {
onComplete.run();
return;
}
if(UtilityString.isNullOrEmpty(printerName)) {
onFailed.run(new Exception("Nessuna stampante configurata: valore null"));
return;
}
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
printerService.printCollo(
printerName,
testataColloToPrint.getDataColloS(),
testataColloToPrint.getGestione(),
testataColloToPrint.getSerCollo(),
testataColloToPrint.getNumCollo(),
quantity,
reportName)
Call<ServiceRESTResponse<Object>> callable = null;
if (printerType != null)
callable = printerService.printCollo(printerType.toString(), testataColloToPrint);
else
callable = printerService.printCollo(testataColloToPrint);
.enqueue(new Callback<ServiceRESTResponse<Object>>() {
callable.enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
analyzeAnswer(response, "PrintCollo", data -> {
analyzeAnswer(response, "printCollo", data -> {
onComplete.run();
}, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
if(t.getMessage().contains("Printer not found")) {
if (t.getMessage().contains("Printer not found")) {
onFailed.run(new NoPrintersFoundException());
} else onFailed.run(new Exception(t));
}
});
}
public void printReport(String printerName, String reportName, HashMap<String, Object> params, int quantity, Runnable onComplete, RunnableArgs<Exception> onFailed) {
if (BuildConfig.DEBUG) {
onComplete.run();
return;
}
JasperDTO jasperDTO = new JasperDTO();
jasperDTO.setReportName(reportName);
Stream.of(params)
.forEach(x -> jasperDTO.getParams().add(new JasperPairDTO(x.getKey(), x.getValue())));
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
printerService
.processPrintReport(printerName, quantity, jasperDTO)
.enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
analyzeAnswer(response, "printReport", data -> {
onComplete.run();
}, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
if (t.getMessage().contains("Printer not found")) {
onFailed.run(new NoPrintersFoundException());
} else onFailed.run(new Exception(t));
}
});
}
}

View File

@@ -2,18 +2,16 @@ package it.integry.integrywmsnative.core.rest.consumers;
import java.util.List;
import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.core.rest.model.JasperDTO;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Body;
import retrofit2.http.POST;
import retrofit2.http.Query;
public interface PrinterRESTConsumerService {
@POST("getAvailablePrinters")
Call<ServiceRESTResponse<List<String>>> getAvailablePrinters();
@POST("getAvailablePrinters")
Call<ServiceRESTResponse<List<String>>> getAvailablePrinters(@Query("codMdep") String codMdep);
@@ -21,17 +19,23 @@ public interface PrinterRESTConsumerService {
Call<ServiceRESTResponse<List<String>>> getAvailablePrinters(@Query("codMdep") String codMdep, @Query("printerType") String printerType);
@POST("pkgPrintLabel")
@FormUrlEncoded
Call<ServiceRESTResponse<Object>> printCollo(
@POST("processPrintReport")
Call<ServiceRESTResponse<Object>> processPrintReport(
@Query("printerName") String printerName,
@Field("dataCollo") String dataCollo,
@Field("gestione") String gestione,
@Field("serCollo") String serCollo,
@Field("numCollo") int numCollo,
@Query("printQuantity") int printQuantity,
@Query("reportName") String reportName
@Query("numberOfCopies") int printQuantity,
@Body JasperDTO jasperDTO
);
@POST("wms/printEtichettaSSCC")
Call<ServiceRESTResponse<Object>> printCollo(
@Query("printerType") String printerType,
@Body MtbColt mtbColtToPrint
);
@POST("wms/printEtichettaSSCC")
Call<ServiceRESTResponse<Object>> printCollo(
@Body MtbColt mtbColtToPrint
);
}

View File

@@ -5,6 +5,7 @@ import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.orhanobut.logger.Logger;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
@@ -41,37 +42,30 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
nativeSqlDTO.nativeSql = nativeSql;
SystemRESTConsumerService service = RESTBuilder.getService(SystemRESTConsumerService.class);
service.processSql(nativeSqlDTO).enqueue(new Callback<ServiceRESTResponse<Object>>() {
service.processSql(nativeSqlDTO).enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
analyzeAnswer(response, "ProcessSql", new ISimpleOperationCallback<Object>() {
@Override
public void onSuccess(Object value) {
analyzeAnswer(response, "ProcessSql", o -> {
Gson gson = new Gson();
String json = gson.toJson(value);
String json = gson.toJson(o);
InputStream ims = new ByteArrayInputStream(json.getBytes());
Reader reader = new InputStreamReader(ims);
T gsonObj = gson.fromJson(reader, clazz);
onComplete.run(gsonObj);
}
@Override
public void onFailed(Exception ex) {
onFailed.run(ex);
}
});
}, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
Log.e("ProcessSql", t.toString());
Logger.e(t, "ProcessSQL");
onFailed.run(new Exception(t));
}
});
}
public static <T> void processSqlStatic(String nativeSql, final Type clazz, final ISimpleOperationCallback<T> callback) {
processSqlStatic(nativeSql, clazz, data -> {
@@ -80,28 +74,24 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
}
public <T> void processSql(String nativeSql, final Type clazz, final ISimpleOperationCallback<T> callback) {
processSqlStatic(nativeSql, clazz, data -> {
callback.onSuccess((T) data);
}, callback::onFailed);
public <T> void processSql(String nativeSql, final Type clazz, final RunnableArgs<T> onComplete, final RunnableArgs<Exception> onFailed) {
processSqlStatic(nativeSql, clazz, onComplete, onFailed);
}
public static void getAvailableProfiles(final ISimpleOperationCallback<List<String>> callback){
public static void getAvailableProfiles(final RunnableArgs<List<String>> onSuccess, RunnableArgs<Exception> onFailed) {
SystemRESTConsumerService service = RESTBuilder.getService(SystemRESTConsumerService.class);
service.getAvailableProfiles(SettingsManager.i().getUser().getUsername(), SettingsManager.i().getUser().getPassword()).enqueue(new Callback<ServiceRESTResponse<List<String>>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<List<String>>> call, Response<ServiceRESTResponse<List<String>>> response) {
analyzeAnswer(response, "ProfilesAvailable", callback);
analyzeAnswer(response, "ProfilesAvailable", onSuccess, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<List<String>>> call, final Throwable t) {
Log.e("ProfilesAvailable", t.toString());
callback.onFailed(new Exception(t));
onFailed.run(new Exception(t));
UtilityLogger.errorMe(new Exception(t));
}
});
@@ -110,23 +100,19 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
}
public static void getAvailableCodMdeps(final ISimpleOperationCallback<List<AvailableCodMdepsDTO>> callback){
public static void getAvailableCodMdeps(final RunnableArgs<List<AvailableCodMdepsDTO>> onSuccess, RunnableArgs<Exception> onFailed) {
SystemRESTConsumerService service = RESTBuilder.getService(SystemRESTConsumerService.class);
service.getAvailableCodMdeps().enqueue(new Callback<ServiceRESTResponse<List<AvailableCodMdepsDTO>>>() {
service.getAvailableCodMdeps().enqueue(new Callback<>() {
@Override
public void onResponse(Call<ServiceRESTResponse<List<AvailableCodMdepsDTO>>> call, Response<ServiceRESTResponse<List<AvailableCodMdepsDTO>>> response) {
analyzeAnswer(response, "CodMdepsAvailable", callback);
analyzeAnswer(response, "CodMdepsAvailable", onSuccess, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<List<AvailableCodMdepsDTO>>> call, final Throwable t) {
Log.e("CodMdepsAvailable", t.toString());
callback.onFailed(new Exception(t));
// UtilityLogger.errorMe(new Exception(t));
onFailed.run(new Exception(t));
}
});
}
@@ -142,7 +128,7 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
String currentAzienda = UtilityString.isNullOrEmpty(SettingsManager.i().getUserSession().getProfileDB()) ? "" : " [" + SettingsManager.i().getUserSession().getProfileDB() + "]";
String dest = "";
if(BuildConfig.DEBUG) {
if (BuildConfig.DEBUG) {
dest = TextUtils.join(";", CommonConst.Mail.forErrorsDebug);
} else {
dest = TextUtils.join(";", CommonConst.Mail.forErrors);
@@ -158,10 +144,10 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
.setHtml(true);
sendMail(mailDTO, () -> {
if(onComplete != null) onComplete.run();
if (onComplete != null) onComplete.run();
}, ex -> {
Log.e(SystemRESTConsumer.class.getName(), "", ex);
if(onFailed != null) onFailed.run(ex);
if (onFailed != null) onFailed.run(ex);
});
}
@@ -172,12 +158,12 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
service.sendMail(mailDTO).enqueue(new Callback<ServiceRESTResponse<String>>() {
@Override
public void onResponse(Call<ServiceRESTResponse<String>> call, Response<ServiceRESTResponse<String>> response) {
if(onComplete != null) onComplete.run();
if (onComplete != null) onComplete.run();
}
@Override
public void onFailure(Call<ServiceRESTResponse<String>> call, Throwable t) {
if(onFailed != null) {
if (onFailed != null) {
onFailed.run(new Exception(t));
}
}
@@ -185,21 +171,21 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
}
public static void getAzienda(RunnableArgs<Azienda> onComplete, RunnableArgs<Exception> onFailed) {
String sql = "SELECT TOP 1 * FROM azienda";
Type typeOfObjectsList = new TypeToken<ArrayList<Azienda>>() {}.getType();
Type typeOfObjectsList = new TypeToken<ArrayList<Azienda>>() {
}.getType();
SystemRESTConsumer.processSqlStatic(sql, typeOfObjectsList, new ISimpleOperationCallback<List<Azienda>>() {
@Override
public void onSuccess(List<Azienda> value) {
if(onComplete != null) onComplete.run(value.get(0));
if (onComplete != null) onComplete.run(value.get(0));
}
@Override
public void onFailed(Exception ex) {
if(onFailed != null) onFailed.run(ex);
if (onFailed != null) onFailed.run(ex);
}
});

View File

@@ -14,96 +14,78 @@ import retrofit2.Response;
public class _BaseRESTConsumer {
public static <T> void analyzeAnswer(Response<ServiceRESTResponse<T>> response, String logTitle, final ISimpleOperationCallback<T> callback) {
public static <T> void analyzeAnswer(Response<ServiceRESTResponse<T>> response, String logTitle, RunnableArgs<T> onComplete, RunnableArgs<Exception> onFailed) {
if (response.isSuccessful()) {
if (response.body() != null) {
if (response.body().getEsito() == EsitoType.OK) {
if (!UtilityString.isNullOrEmpty(response.body().getErrorMessage())) {
callback.onFailed(new Exception(response.body().getErrorMessage()));
onFailed.run(new Exception(response.body().getErrorMessage()));
} else {
T dataObj = response.body().getDto() != null ?
response.body().getDto() :
response.body().getEntity();
callback.onSuccess(dataObj);
onComplete.run(dataObj);
}
} else {
Log.e(logTitle, response.body().getErrorMessage());
// callback.onFailed(new Exception(response.body().getErrorMessage()));
callback.onFailed(CommonRESTException.tryRecognizeException(response.body().getErrorMessage()));
onFailed.run(CommonRESTException.tryRecognizeException(response.body().getErrorMessage()));
}
} else {
Log.e(logTitle, response.message());
callback.onFailed(new Exception(response.message()));
onFailed.run(new Exception(response.message()));
}
} else {
if (response.code() == 404) {
Log.e(logTitle, "Errore " + response.code() + ": risorsa non trovata");
onFailed.run(new Exception("Errore " + response.code() + ": risorsa non trovata (" + logTitle + ")"));
} else {
Log.e(logTitle, "Status " + response.code() + ": " + response.message());
callback.onFailed(new Exception("Status " + response.code() + ": " + response.message()));
}
}
public static <T> void analyzeAnswer(Response<ServiceRESTResponse<T>> response, String logTitle, RunnableArgs<T> onComplete, RunnableArgs<Exception> onFailed) {
analyzeAnswer(response, logTitle, new ISimpleOperationCallback<T>() {
@Override
public void onSuccess(T value) {
onComplete.run(value);
}
@Override
public void onFailed(Exception ex) {
onFailed.run(ex);
}
});
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
}
public static <T> void analyzeAnswerList(Response<ServiceRESTResponse<T>> response, String logTitle, final ISimpleOperationCallback<List<T>> callback) {
if (response.isSuccessful()) {
if (response.body() != null) {
if (response.body().getEsito() == EsitoType.OK) {
if (!UtilityString.isNullOrEmpty(response.body().getErrorMessage())) {
callback.onFailed(new Exception(response.body().getErrorMessage()));
} else {
List<T> dataObj = response.body().getEntityList();
callback.onSuccess(dataObj);
}
} else {
Log.e(logTitle, response.body().getErrorMessage());
callback.onFailed(new Exception(response.body().getErrorMessage()));
}
} else {
Log.e(logTitle, response.message());
callback.onFailed(new Exception(response.message()));
}
} else {
Log.e(logTitle, "Status " + response.code() + ": " + response.message());
callback.onFailed(new Exception("Status " + response.code() + ": " + response.message()));
}
}
public static <T> void analyzeAnswerList(Response<ServiceRESTResponse<T>> response, String logTitle, RunnableArgs<List<T>> onComplete, RunnableArgs<Exception> onFailed) {
analyzeAnswerList(response, logTitle, new ISimpleOperationCallback<List<T>>() {
@Override
public void onSuccess(List<T> value) {
onComplete.run(value);
}
if (response.isSuccessful()) {
if (response.body() != null) {
if (response.body().getEsito() == EsitoType.OK) {
if (!UtilityString.isNullOrEmpty(response.body().getErrorMessage())) {
onFailed.run(new Exception(response.body().getErrorMessage()));
} else {
@Override
public void onFailed(Exception ex) {
onFailed.run(ex);
List<T> dataObj = response.body().getEntityList();
onComplete.run(dataObj);
}
} else {
Log.e(logTitle, response.body().getErrorMessage());
onFailed.run(new Exception(response.body().getErrorMessage()));
}
} else {
Log.e(logTitle, response.message());
onFailed.run(new Exception(response.message()));
}
} else {
if (response.code() == 404) {
Log.e(logTitle, "Errore " + response.code() + ": risorsa non trovata");
onFailed.run(new Exception("Errore " + response.code() + ": risorsa non trovata (" + logTitle + ")"));
} else {
Log.e(logTitle, "Status " + response.code() + ": " + response.message());
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
}
}
});
}
public static <T> void analyzeListOfAnswers(Response<List<ServiceRESTResponse<T>>> responseList, String logTitle, RunnableArgs<List<T>> onComplete, RunnableArgs<Exception> onFailed) {
if (responseList.isSuccessful()) {
if (responseList.body() != null) {
List<T> analyzedList = new ArrayList<>();
for (ServiceRESTResponse<T> response : responseList.body()){
for (ServiceRESTResponse<T> response : responseList.body()) {
if (response.getEsito() == EsitoType.OK) {
if (!UtilityString.isNullOrEmpty(response.getErrorMessage())) {
onFailed.run(new Exception(response.getErrorMessage()));
@@ -111,7 +93,7 @@ public class _BaseRESTConsumer {
T dataObj = response.getDto() != null ?
response.getDto() :
response.getEntity();
if (dataObj !=null ) analyzedList.add(dataObj);
if (dataObj != null) analyzedList.add(dataObj);
}
} else {
@@ -125,9 +107,14 @@ public class _BaseRESTConsumer {
Log.e(logTitle, responseList.message());
onFailed.run(new Exception(responseList.message()));
}
} else {
if (responseList.code() == 404) {
Log.e(logTitle, "Errore " + responseList.code() + ": risorsa non trovata");
onFailed.run(new Exception("Errore " + responseList.code() + ": risorsa non trovata (" + logTitle + ")"));
} else {
Log.e(logTitle, "Status " + responseList.code() + ": " + responseList.message());
onFailed.run(new Exception("Status " + responseList.code() + ": " + responseList.message()));
}
}
}
}

View File

@@ -9,6 +9,7 @@ import java.lang.reflect.Type;
import java.util.Date;
import it.integry.integrywmsnative.core.utility.UtilityDate;
import it.integry.integrywmsnative.core.utility.UtilityString;
public class DateDeserializer implements JsonDeserializer<Date> {
@@ -16,6 +17,8 @@ public class DateDeserializer implements JsonDeserializer<Date> {
public Date deserialize(JsonElement element, Type arg1, JsonDeserializationContext arg2) throws JsonParseException {
String date = element.getAsString();
if (UtilityString.isNullOrEmpty(date)) return null;
return UtilityDate.recognizeDateWithExceptionHandler(date);
}
}

View File

@@ -3,6 +3,7 @@ package it.integry.integrywmsnative.core.rest.model;
public class Ean13PesoModel {
private String precode;
//TODO: Change to bigdecimal
private Float peso;
public String getPrecode() {

View File

@@ -0,0 +1,28 @@
package it.integry.integrywmsnative.core.rest.model;
import java.util.ArrayList;
import java.util.List;
public class JasperDTO {
private String reportName;
private List<JasperPairDTO> params = new ArrayList<>();
public String getReportName() {
return reportName;
}
public JasperDTO setReportName(String reportName) {
this.reportName = reportName;
return this;
}
public List<JasperPairDTO> getParams() {
return params;
}
public JasperDTO setParams(List<JasperPairDTO> params) {
this.params = params;
return this;
}
}

View File

@@ -0,0 +1,30 @@
package it.integry.integrywmsnative.core.rest.model;
public class JasperPairDTO {
private String name;
private Object value;
public JasperPairDTO(String name, Object value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public JasperPairDTO setName(String name) {
this.name = name;
return this;
}
public Object getValue() {
return value;
}
public JasperPairDTO setValue(Object value) {
this.value = value;
return this;
}
}

View File

@@ -1,23 +1,18 @@
package it.integry.integrywmsnative.gest.vendita.dto;
package it.integry.integrywmsnative.core.rest.model;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import it.integry.integrywmsnative.core.di.BindableBoolean;
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
import it.integry.integrywmsnative.core.utility.UtilityDate;
public class OrdineVenditaInevasoDTO {
public class OrdineUscitaInevasoDTO extends OrdineInevasoDTO {
private String data;
private Integer numero;
private Integer idViaggio;
private String gestione;
private String listino;
private String termCons;
private String codAuto;
private String codMdep;
private String descrizioneAuto;
private String codVvet;
private String descrizioneVettore;
@@ -49,64 +44,25 @@ public class OrdineVenditaInevasoDTO {
private String nomeAgente;
private String codJfas;
public BindableBoolean selected;
public OrdineVenditaInevasoDTO() {
this.selected = new BindableBoolean(false);
}
public String getDataOrdS() {
return data;
}
public Date getDataOrdD() {
return UtilityDate.recognizeDateWithExceptionHandler(getDataOrdS());
}
public OrdineVenditaInevasoDTO setData(String data) {
this.data = data;
return this;
}
public Integer getNumOrd() {
return numero;
}
public OrdineVenditaInevasoDTO setNumero(Integer numero) {
this.numero = numero;
return this;
}
public Integer getIdViaggio() {
return idViaggio;
}
public OrdineVenditaInevasoDTO setIdViaggio(Integer idViaggio) {
public OrdineUscitaInevasoDTO setIdViaggio(Integer idViaggio) {
this.idViaggio = idViaggio;
return this;
}
public String getGestione() {
return gestione;
}
public GestioneEnum getGestioneEnum() {
return GestioneEnum.fromString(getGestione());
}
public OrdineVenditaInevasoDTO setGestione(String gestione) {
this.gestione = gestione;
return this;
}
public String getListino() {
return listino;
}
public OrdineVenditaInevasoDTO setListino(String listino) {
public OrdineUscitaInevasoDTO setListino(String listino) {
this.listino = listino;
return this;
}
@@ -115,7 +71,7 @@ public class OrdineVenditaInevasoDTO {
return termCons;
}
public OrdineVenditaInevasoDTO setTermCons(String termCons) {
public OrdineUscitaInevasoDTO setTermCons(String termCons) {
this.termCons = termCons;
return this;
}
@@ -124,25 +80,16 @@ public class OrdineVenditaInevasoDTO {
return codAuto;
}
public OrdineVenditaInevasoDTO setCodAuto(String codAuto) {
public OrdineUscitaInevasoDTO setCodAuto(String codAuto) {
this.codAuto = codAuto;
return this;
}
public String getCodMdep() {
return codMdep;
}
public OrdineVenditaInevasoDTO setCodMdep(String codMdep) {
this.codMdep = codMdep;
return this;
}
public String getDescrizioneAuto() {
return descrizioneAuto;
}
public OrdineVenditaInevasoDTO setDescrizioneAuto(String descrizioneAuto) {
public OrdineUscitaInevasoDTO setDescrizioneAuto(String descrizioneAuto) {
this.descrizioneAuto = descrizioneAuto;
return this;
}
@@ -151,7 +98,7 @@ public class OrdineVenditaInevasoDTO {
return codVvet;
}
public OrdineVenditaInevasoDTO setCodVvet(String codVvet) {
public OrdineUscitaInevasoDTO setCodVvet(String codVvet) {
this.codVvet = codVvet;
return this;
}
@@ -160,7 +107,7 @@ public class OrdineVenditaInevasoDTO {
return descrizioneVettore;
}
public OrdineVenditaInevasoDTO setDescrizioneVettore(String descrizioneVettore) {
public OrdineUscitaInevasoDTO setDescrizioneVettore(String descrizioneVettore) {
this.descrizioneVettore = descrizioneVettore;
return this;
}
@@ -173,7 +120,7 @@ public class OrdineVenditaInevasoDTO {
return UtilityDate.recognizeDateWithExceptionHandler(getDataInizTraspS());
}
public OrdineVenditaInevasoDTO setDataInizTrasp(String dataInizTrasp) {
public OrdineUscitaInevasoDTO setDataInizTrasp(String dataInizTrasp) {
this.dataInizTrasp = dataInizTrasp;
return this;
}
@@ -182,7 +129,7 @@ public class OrdineVenditaInevasoDTO {
return descrizionePaga;
}
public OrdineVenditaInevasoDTO setDescrizionePaga(String descrizionePaga) {
public OrdineUscitaInevasoDTO setDescrizionePaga(String descrizionePaga) {
this.descrizionePaga = descrizionePaga;
return this;
}
@@ -191,7 +138,7 @@ public class OrdineVenditaInevasoDTO {
return rifOrd;
}
public OrdineVenditaInevasoDTO setRifOrd(String rifOrd) {
public OrdineUscitaInevasoDTO setRifOrd(String rifOrd) {
this.rifOrd = rifOrd;
return this;
}
@@ -200,7 +147,7 @@ public class OrdineVenditaInevasoDTO {
return codAnagOrd;
}
public OrdineVenditaInevasoDTO setCodAnagOrd(String codAnagOrd) {
public OrdineUscitaInevasoDTO setCodAnagOrd(String codAnagOrd) {
this.codAnagOrd = codAnagOrd;
return this;
}
@@ -209,7 +156,7 @@ public class OrdineVenditaInevasoDTO {
return codJcom;
}
public OrdineVenditaInevasoDTO setCodJcom(String codJcom) {
public OrdineUscitaInevasoDTO setCodJcom(String codJcom) {
this.codJcom = codJcom;
return this;
}
@@ -218,7 +165,7 @@ public class OrdineVenditaInevasoDTO {
return descrizioneCom;
}
public OrdineVenditaInevasoDTO setDescrizioneCom(String descrizioneCom) {
public OrdineUscitaInevasoDTO setDescrizioneCom(String descrizioneCom) {
this.descrizioneCom = descrizioneCom;
return this;
}
@@ -227,7 +174,7 @@ public class OrdineVenditaInevasoDTO {
return ragSocCom;
}
public OrdineVenditaInevasoDTO setRagSocCom(String ragSocCom) {
public OrdineUscitaInevasoDTO setRagSocCom(String ragSocCom) {
this.ragSocCom = ragSocCom;
return this;
}
@@ -236,7 +183,7 @@ public class OrdineVenditaInevasoDTO {
return ragSocOrd;
}
public OrdineVenditaInevasoDTO setRagSocOrd(String ragSocOrd) {
public OrdineUscitaInevasoDTO setRagSocOrd(String ragSocOrd) {
this.ragSocOrd = ragSocOrd;
return this;
}
@@ -245,7 +192,7 @@ public class OrdineVenditaInevasoDTO {
return destinatario;
}
public OrdineVenditaInevasoDTO setDestinatario(String destinatario) {
public OrdineUscitaInevasoDTO setDestinatario(String destinatario) {
this.destinatario = destinatario;
return this;
}
@@ -254,7 +201,7 @@ public class OrdineVenditaInevasoDTO {
return citta;
}
public OrdineVenditaInevasoDTO setCitta(String citta) {
public OrdineUscitaInevasoDTO setCitta(String citta) {
this.citta = citta;
return this;
}
@@ -263,7 +210,7 @@ public class OrdineVenditaInevasoDTO {
return provincia;
}
public OrdineVenditaInevasoDTO setProvincia(String provincia) {
public OrdineUscitaInevasoDTO setProvincia(String provincia) {
this.provincia = provincia;
return this;
}
@@ -272,7 +219,7 @@ public class OrdineVenditaInevasoDTO {
return indirizzo;
}
public OrdineVenditaInevasoDTO setIndirizzo(String indirizzo) {
public OrdineUscitaInevasoDTO setIndirizzo(String indirizzo) {
this.indirizzo = indirizzo;
return this;
}
@@ -281,7 +228,7 @@ public class OrdineVenditaInevasoDTO {
return pesoTotale;
}
public OrdineVenditaInevasoDTO setPesoTotale(BigDecimal pesoTotale) {
public OrdineUscitaInevasoDTO setPesoTotale(BigDecimal pesoTotale) {
this.pesoTotale = pesoTotale;
return this;
}
@@ -290,7 +237,7 @@ public class OrdineVenditaInevasoDTO {
return numCnfdaEvadere;
}
public OrdineVenditaInevasoDTO setNumCnfdaEvadere(BigDecimal numCnfdaEvadere) {
public OrdineUscitaInevasoDTO setNumCnfdaEvadere(BigDecimal numCnfdaEvadere) {
this.numCnfdaEvadere = numCnfdaEvadere;
return this;
}
@@ -299,7 +246,7 @@ public class OrdineVenditaInevasoDTO {
return numCnfDisp;
}
public OrdineVenditaInevasoDTO setNumCnfDisp(BigDecimal numCnfDisp) {
public OrdineUscitaInevasoDTO setNumCnfDisp(BigDecimal numCnfDisp) {
this.numCnfDisp = numCnfDisp;
return this;
}
@@ -312,7 +259,7 @@ public class OrdineVenditaInevasoDTO {
return UtilityDate.recognizeDateWithExceptionHandler(getDataConsS());
}
public OrdineVenditaInevasoDTO setDataCons(String dataCons) {
public OrdineUscitaInevasoDTO setDataCons(String dataCons) {
this.dataCons = dataCons;
return this;
}
@@ -321,7 +268,7 @@ public class OrdineVenditaInevasoDTO {
return barcode;
}
public OrdineVenditaInevasoDTO setBarcode(String barcode) {
public OrdineUscitaInevasoDTO setBarcode(String barcode) {
this.barcode = barcode;
return this;
}
@@ -330,7 +277,7 @@ public class OrdineVenditaInevasoDTO {
return numRighe;
}
public OrdineVenditaInevasoDTO setNumRighe(Integer numRighe) {
public OrdineUscitaInevasoDTO setNumRighe(Integer numRighe) {
this.numRighe = numRighe;
return this;
}
@@ -339,7 +286,7 @@ public class OrdineVenditaInevasoDTO {
return righeInPartenza;
}
public OrdineVenditaInevasoDTO setRigheInPartenza(Integer righeInPartenza) {
public OrdineUscitaInevasoDTO setRigheInPartenza(Integer righeInPartenza) {
this.righeInPartenza = righeInPartenza;
return this;
}
@@ -348,7 +295,7 @@ public class OrdineVenditaInevasoDTO {
return saldoContabile;
}
public OrdineVenditaInevasoDTO setSaldoContabile(BigDecimal saldoContabile) {
public OrdineUscitaInevasoDTO setSaldoContabile(BigDecimal saldoContabile) {
this.saldoContabile = saldoContabile;
return this;
}
@@ -357,7 +304,7 @@ public class OrdineVenditaInevasoDTO {
return codVzon;
}
public OrdineVenditaInevasoDTO setCodVzon(String codVzon) {
public OrdineUscitaInevasoDTO setCodVzon(String codVzon) {
this.codVzon = codVzon;
return this;
}
@@ -366,7 +313,7 @@ public class OrdineVenditaInevasoDTO {
return ragSocOrdV;
}
public OrdineVenditaInevasoDTO setRagSocOrdV(String ragSocOrdV) {
public OrdineUscitaInevasoDTO setRagSocOrdV(String ragSocOrdV) {
this.ragSocOrdV = ragSocOrdV;
return this;
}
@@ -375,7 +322,7 @@ public class OrdineVenditaInevasoDTO {
return colliRiservati;
}
public OrdineVenditaInevasoDTO setColliRiservati(int colliRiservati) {
public OrdineUscitaInevasoDTO setColliRiservati(int colliRiservati) {
this.colliRiservati = colliRiservati;
return this;
}
@@ -384,7 +331,7 @@ public class OrdineVenditaInevasoDTO {
return existColloBoolean;
}
public OrdineVenditaInevasoDTO setExistColloBoolean(boolean existColloBoolean) {
public OrdineUscitaInevasoDTO setExistColloBoolean(boolean existColloBoolean) {
this.existColloBoolean = existColloBoolean;
return this;
}
@@ -393,7 +340,7 @@ public class OrdineVenditaInevasoDTO {
return flagEvaso;
}
public OrdineVenditaInevasoDTO setFlagEvaso(boolean flagEvaso) {
public OrdineUscitaInevasoDTO setFlagEvaso(boolean flagEvaso) {
this.flagEvaso = flagEvaso;
return this;
}
@@ -402,7 +349,7 @@ public class OrdineVenditaInevasoDTO {
return nomeAgente;
}
public OrdineVenditaInevasoDTO setNomeAgente(String nomeAgente) {
public OrdineUscitaInevasoDTO setNomeAgente(String nomeAgente) {
this.nomeAgente = nomeAgente;
return this;
}
@@ -411,36 +358,27 @@ public class OrdineVenditaInevasoDTO {
return codJfas;
}
public OrdineVenditaInevasoDTO setCodJfas(String codJfas) {
public OrdineUscitaInevasoDTO setCodJfas(String codJfas) {
this.codJfas = codJfas;
return this;
}
public boolean isSelected() {
return selected.get();
}
public OrdineVenditaInevasoDTO setSelected(boolean selected) {
this.selected.set(selected);
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
OrdineVenditaInevasoDTO that = (OrdineVenditaInevasoDTO) o;
OrdineUscitaInevasoDTO that = (OrdineUscitaInevasoDTO) o;
if (!data.equals(that.data)) return false;
if (!numero.equals(that.numero)) return false;
if (!getDataOrdS().equals(that.getDataOrdS())) return false;
if (!getNumOrd().equals(that.getNumOrd())) return false;
return getGestione().equals(that.getGestione());
}
@Override
public int hashCode() {
int result = data.hashCode();
result = 31 * result + numero.hashCode();
int result = getDataOrdS().hashCode();
result = 31 * result + getNumOrd().hashCode();
result = 31 * result + getGestione().hashCode();
return result;
}

View File

@@ -1,6 +1,7 @@
package it.integry.integrywmsnative.core.rest.model;
import java.math.BigDecimal;
import java.util.HashMap;
public class SitArtOrdDTO {
@@ -25,6 +26,8 @@ public class SitArtOrdDTO {
private String codMsfa;
private String descrizioneMsfa;
private final HashMap<String, Object> extraInfo = new HashMap<>();
public String getCodJcom() {
return codJcom;
}
@@ -196,4 +199,8 @@ public class SitArtOrdDTO {
this.descrizioneMsfa = descrizioneMsfa;
return this;
}
public HashMap<String, Object> getExtraInfo() {
return extraInfo;
}
}

View File

@@ -0,0 +1,30 @@
package it.integry.integrywmsnative.core.rest.model;
import it.integry.integrywmsnative.core.model.MtbColt;
public class SpostaArtsTraULRequestDTO {
private MtbColt sourceMtbColt;
private MtbColt destinationMtbColt;
public MtbColt getSourceMtbColt() {
return sourceMtbColt;
}
public SpostaArtsTraULRequestDTO setSourceMtbColt(MtbColt sourceMtbColt) {
this.sourceMtbColt = sourceMtbColt;
return this;
}
public MtbColt getDestinationMtbColt() {
return destinationMtbColt;
}
public SpostaArtsTraULRequestDTO setDestinationMtbColt(MtbColt destinationMtbColt) {
this.destinationMtbColt = destinationMtbColt;
return this;
}
}

Some files were not shown because too many files have changed in this diff Show More