Compare commits

...

724 Commits

Author SHA1 Message Date
jenkins
005cfae6dc 20240609_074254 2024-06-09 07:42:54 +02:00
b8c4caaa9b Sistemato getActivity per i clienti 2024-06-07 19:05:46 +02:00
fad75298f9 Fix link email creazione ticket 2024-06-07 19:05:03 +02:00
f125e339f5 [CARELLI] Importazione Griglie di Vendita 2024-06-07 19:04:22 +02:00
f69848f748 Quando si registra un nuovo utente inviare un'email a Helpdesk. 2024-06-07 19:02:40 +02:00
27a1c0efe9 Aggiunto controllo nella creazione dei FRUMA se il documento inserito esiste realmente. 2024-06-07 18:57:31 +02:00
2bed8730c5 - Aggiunto wtbJreptSetup 'STAMPA_LISTINI_VENDITA_RANGE_PEDANE' 2024-06-07 17:34:40 +02:00
cf56f61962 modifiche a mrp per gestire i fabbisogni a data 2024-06-06 18:14:00 +02:00
81d05fa0ae Export documenti DAS 2024-06-06 16:39:52 +02:00
067a059532 Export documenti DAS 2024-06-06 16:39:44 +02:00
94ac3fb90c aggiunta nuova colonna su mtb_part 2024-06-06 15:10:56 +02:00
cdc3bb92cc Controllo sul null 2024-06-06 15:10:10 +02:00
8153291184 Merge branch 'master' into develop 2024-06-06 11:34:47 +02:00
6f20b34196 Finish Hotfix-61 2024-06-06 11:34:46 +02:00
6d01cfd280 Fix json in response 2024-06-06 11:34:40 +02:00
1a1cbaed28 Merge branch 'master' into develop 2024-06-06 10:52:04 +02:00
d18f51ca6d Finish Hotfix-61 2024-06-06 10:52:04 +02:00
abd843ad7a Fix download allegati 2024-06-06 10:51:55 +02:00
43297555f0 filtrate le attività per persona di riferimento 2024-06-06 09:42:07 +02:00
a4717ba245 Merge remote-tracking branch 'origin/develop' into develop 2024-06-05 17:49:11 +02:00
a51325ede0 Fixato scheduler Spring 2024-06-05 17:47:21 +02:00
4a81d6e988 Modificata regola assegnazione commessa su righe ordine (Fatto in modo che sulle righe dell'ordine di produzione non venga assegnata la commessa) 2024-06-05 17:41:46 +02:00
c9f9c63ef2 Finish Hotfix-61 2024-06-05 17:19:07 +02:00
a6958eee39 Merge branch 'master' into develop 2024-06-05 17:19:07 +02:00
b6eec691f5 Aggiunto filtro che imposta l'encoding su request e response 2024-06-05 17:18:58 +02:00
90cbc94e6a Trying to fix content type 2024-06-05 17:11:15 +02:00
02ca6eea4a eliminato _ da pattern per cancellazione viste e tabelle temporanee 2024-06-05 12:37:14 +02:00
9629be196a Finish Hotfix-61 2024-06-05 11:24:14 +02:00
3e461bc692 Merge branch 'master' into develop 2024-06-05 11:24:14 +02:00
1878ce5673 [rOSSOGRAGANO]
provedura salvataggio ddt in massa
2024-06-05 11:24:06 +02:00
4b55c57da1 Merge branch 'master' into develop 2024-06-05 10:39:59 +02:00
7814e3c0db Finish Hotfix-61 2024-06-05 10:39:58 +02:00
129e52a116 Fix colli tosca 2024-06-05 10:36:22 +02:00
d97e582802 Merge branch 'master' into develop 2024-06-05 10:02:59 +02:00
e98bf98a3b Finish Hotfix-61 2024-06-05 10:02:59 +02:00
12b9e432aa aggiunto valore di default per il parametro requestMethod nelle pianificate 2024-06-05 10:02:42 +02:00
b411e331a9 Merge remote-tracking branch 'origin/develop' into develop 2024-06-05 09:58:35 +02:00
d1d5c7ca21 aggiunto valore di default per il parametro requestMethod nelle pianificate 2024-06-05 09:58:26 +02:00
c348be1365 Merge remote-tracking branch 'origin/develop' into develop 2024-06-05 09:08:07 +02:00
ddff8bb078 Gestione quantità multipla SMETAR 2024-06-05 09:07:58 +02:00
0b7ece1c48 Finish Hotfix-61 2024-06-04 22:16:08 +02:00
8722de1d68 Merge branch 'master' into develop 2024-06-04 22:16:08 +02:00
b1b2e00b87 Fix onlyPkMaster in sync entity 2024-06-04 22:16:01 +02:00
d895eccda3 Merge branch 'master' into develop 2024-06-04 21:25:37 +02:00
bf57c1442e Finish Hotfix-61 2024-06-04 21:25:36 +02:00
dbd9bad7e7 Fix onlyPkMaster in sync entity 2024-06-04 21:25:30 +02:00
c466abb836 Merge branch 'master' into develop 2024-06-04 21:01:25 +02:00
203808d323 Finish Hotfix-61 2024-06-04 21:01:24 +02:00
7189cae9e3 Fix onlyPkMaster in sync entity 2024-06-04 21:01:19 +02:00
ebce20e389 Merge branch 'master' into develop 2024-06-04 20:38:50 +02:00
d1c5d4d29f Finish Hotfix-61 2024-06-04 20:38:49 +02:00
90f5a08c50 Fix onlyPkMaster in sync entity 2024-06-04 20:38:41 +02:00
966bc1e9b3 Merge branch 'master' into develop 2024-06-04 20:34:59 +02:00
6179d07564 Finish Hotfix-61 2024-06-04 20:34:59 +02:00
946168517e Fix onlyPkMaster in sync entity 2024-06-04 20:34:53 +02:00
ec6b888840 Merge branch 'master' into develop 2024-06-04 20:14:45 +02:00
3fdf558b6c Finish Hotfix-61 2024-06-04 20:14:44 +02:00
c57344e334 Fix onlyPkMaster in sync entity 2024-06-04 20:14:37 +02:00
4c5b847c14 Merge branch 'master' into develop 2024-06-04 19:40:55 +02:00
30faa66519 Finish Hotfix-61 2024-06-04 19:40:54 +02:00
476ff92f30 [ROSSOGARGANO]
creato certificato di consegna anche se qtaCol = 0
2024-06-04 19:40:48 +02:00
18dd9dc8a3 Merge branch 'master' into develop 2024-06-04 18:59:24 +02:00
d292ab6ac0 Finish Hotfix-61 2024-06-04 18:59:24 +02:00
9a90387df6 Fix call pianificate 2024-06-04 18:59:18 +02:00
c1909b58ab Merge branch 'master' into develop 2024-06-04 18:37:25 +02:00
9b77c4a693 Finish Hotfix-61 2024-06-04 18:37:24 +02:00
cf672c349b Fix call pianificate 2024-06-04 18:37:18 +02:00
800f1d84d9 Merge branch 'master' into develop 2024-06-04 18:24:45 +02:00
f72c0962c8 Finish Hotfix-61 2024-06-04 18:24:45 +02:00
d4303b053f Fix call pianificate 2024-06-04 18:24:30 +02:00
6737226d91 sistemato salvataggio listini con listino di riferimento e varie migration 2024-06-04 18:11:07 +02:00
b0492de6d4 Merge remote-tracking branch 'origin/develop' into develop 2024-06-04 18:08:59 +02:00
9ab0e5fc0f Merge branch 'master' into develop 2024-06-04 11:36:55 +02:00
6a605f9db0 Finish Hotfix-61 2024-06-04 11:36:54 +02:00
a7fbe6e491 Fix doppio slash in automation method call 2024-06-04 11:10:59 +02:00
b4252581b5 Merge remote-tracking branch 'origin/develop' into develop 2024-06-04 10:39:33 +02:00
fcde03ce4b Merge branch 'master' into develop 2024-06-03 19:26:04 +02:00
363258f6ac Finish Hotfix-61 2024-06-03 19:26:03 +02:00
06580f507b Fix getDTO in ResponseJSONObjectMapper 2024-06-03 19:25:57 +02:00
82db179601 Creazione servizio per archiviazione file allegati in zip 2024-06-03 18:31:39 +02:00
565336e454 piccoli miglioramenti a registrazione e verifica inventario 2024-06-03 16:23:24 +02:00
692a68d65e aggiunta setup per impedire la visualizzazione del report degli aggiornamenti agli utenti non amministratori 2024-06-03 13:02:40 +02:00
db819a69f1 Merge remote-tracking branch 'origin/develop' into develop 2024-06-03 12:23:22 +02:00
6fe25e1405 aggiunto modificato da nella procedura di importazione listini di pazienza 2024-06-03 12:23:19 +02:00
165770699e Merge branch 'master' into develop 2024-06-03 10:26:45 +02:00
3ae6180584 Finish Hotfix-61 2024-06-03 10:26:44 +02:00
bb11ae9d36 Fix su invio email di errore in caso di headless delle export 2024-06-03 10:26:24 +02:00
8e56d53796 Merge branch 'master' into develop 2024-06-03 10:14:24 +02:00
6d2f268ff3 Finish FixJacksonValNull 2024-06-03 10:14:24 +02:00
5362c4f39a Fix jackson inclusione valori null in risposte 2024-06-03 10:14:17 +02:00
875821df08 Merge branch 'master' into develop 2024-06-03 09:54:07 +02:00
51ae525983 Finish Hotfix-61 2024-06-03 09:54:07 +02:00
141f7b6751 se ora ins act è nulla inserire data ins act 2024-06-03 09:54:00 +02:00
4c5c628d23 nuova funzione di suggestCode ean14 2024-05-31 17:39:13 +02:00
1d8449773d [Migrations]
- Aggiunto "REPORT_NAME" a "RILEVAZIONI_STEUP" per la stampa dell'ispezioni di Carelli
- Fix setup_query "ATTACH_LIBERI", problema con la query, campi data_doc e num_doc
2024-05-31 16:32:01 +02:00
5479e9dbcd Personalizzazione importo ordini EDI per data decorrenza CONAD GRAMM 2024-05-30 17:50:12 +02:00
52a0b1df5c Merge remote-tracking branch 'origin/develop' into develop 2024-05-30 16:32:47 +02:00
e0f5c9814a Modifica procedura chiusura commessa MAGGIO 2024-05-30 16:32:43 +02:00
39b928b118 Merge remote-tracking branch 'origin/develop' into develop 2024-05-30 15:51:47 +02:00
378fc24198 [ROSSOGARGANO - Piano accettazione]
fix stampa con calibro null
2024-05-30 15:51:25 +02:00
b6737aca0f visualizzare descrizione sottoattivtà solo se aperta 2024-05-30 15:10:42 +02:00
12115880a1 Merge remote-tracking branch 'origin/develop' into develop 2024-05-30 13:20:09 +02:00
b3a248d754 Fix procedura esportazione tracciato tosca 2024-05-30 13:19:51 +02:00
c41502a829 Aggiunto controllo su null 2024-05-30 13:18:05 +02:00
47f3ebcf4d Creata procedura di esportazione ordini per Gioiella 2024-05-30 09:48:47 +02:00
b7646d8ce3 Modifica tracciato EURITMO e GS per gestione data decorrenza per clienti GRAMM (CONAD, ASPIAG, GS e IPERMONTEBELLO) 2024-05-30 09:39:01 +02:00
e2e2e09bbb Modifica tracciato EURITMO e GS per gestione data decorrenza per clienti GRAMM (CONAD, ASPIAG, GS e IPERMONTEBELLO) 2024-05-30 09:38:25 +02:00
98e024ed5a Modifica tracciato EURITMO e GS per gestione data decorrenza per clienti GRAMM (CONAD, ASPIAG, GS e IPERMONTEBELLO) 2024-05-30 09:12:26 +02:00
a2fe597ed6 Merge remote-tracking branch 'origin/develop' into develop 2024-05-29 18:24:18 +02:00
946089e307 Gestione tara nel calcolo del peso in Gestione documenti/trasporto 2024-05-29 18:24:10 +02:00
990e0e7fdc Merge branch 'master' into develop 2024-05-29 16:33:49 +02:00
d16225e111 Finish Hotfix-61 2024-05-29 16:33:49 +02:00
d4530567d7 sistemata lettura campo in esportazione slim2k 2024-05-29 16:33:25 +02:00
a82106edf0 Merge remote-tracking branch 'origin/develop' into develop 2024-05-29 13:04:24 +02:00
5c3e25b41c Aggiunta descrizione su campo flag_sezione in MSSQL 2024-05-29 13:04:17 +02:00
ce74ff45d7 Configurazione SUIT_PUGLIA_FARMES 2024-05-29 13:04:00 +02:00
b66938e367 Configurazione SUIT_PUGLIA_FARMES 2024-05-29 13:03:52 +02:00
067c7c24fc [ROSSOGARGANO - Piano accettazione]
Gestione calibri e stampe etichette
2024-05-29 12:31:19 +02:00
ebb9db1b92 Merge tag 'Hotfix-62' into develop
Finish Hotfix-62
2024-05-28 18:10:27 +02:00
c5ef5c6f83 Finish Hotfix-62 2024-05-28 18:10:25 +02:00
ff96e73483 [CARELLI] Fix path in importazione listini e promozioni di vendita 2024-05-28 18:09:32 +02:00
6fe75d1b57 aggiunto controllo su inevasi per le rotture di stock 2024-05-28 18:01:26 +02:00
f306d53d3a Fix data in esportazione tracciato tosca 2024-05-28 17:26:35 +02:00
d7c73745ff [GRAMM] Aggiunta setup che consente di disabilitare il picking libero quando si spara un'etichetta cartone 2024-05-28 17:25:55 +02:00
d479180337 [ORDIFY] Aggiunta setup abilitare l'inserimento del codice hash dispositivo nel campo rif_ord in fase di esportazione dell'ordine 2024-05-28 17:24:22 +02:00
a664c1b7e5 Merge remote-tracking branch 'origin/develop' into develop 2024-05-28 17:12:05 +02:00
f89eb0fc2f Implementata clean delle tabelle e delle viste temporanee 2024-05-28 17:11:16 +02:00
9d403f87f4 aggiunto campo tipo_codice_imballo nella tabella mtb_aart
aggiunto campo tipo_cod_barre nella tabella mtb_aart_bar_code
2024-05-28 16:03:23 +02:00
6b47fb3ad3 Merge branch 'master' into develop 2024-05-28 14:45:40 +02:00
b78180374e Finish Hotfix-61 2024-05-28 14:45:39 +02:00
d148de7617 modificata procedura di esportazione ordini per slim2k 2024-05-28 14:45:31 +02:00
a6fd50b523 Merge branch 'master' into develop 2024-05-27 15:27:59 +02:00
95a49495c3 Finish Hotfix-61 2024-05-27 15:27:59 +02:00
457e9e2a45 ritornare indietro con la regola perché per le logiche di Steup questa regola non va bene 2024-05-27 15:27:52 +02:00
b30d0deeda [ROSSOGARGANO]
Aggiunta setup per suggerimento lotto in creazione ordine da mrp
2024-05-27 12:11:09 +02:00
34c441eaff Merge tag 'Carelli_Inventari_FixCodMdep' into develop
Finish Carelli_Inventari_FixCodMdep
2024-05-27 12:02:00 +02:00
4f3b0c81c7 Finish Carelli_Inventari_FixCodMdep 2024-05-27 12:01:59 +02:00
6729807363 [PvmService]
- Fix condizione where su cod_mdep
2024-05-27 12:01:41 +02:00
cdedd25c23 Unificata e migliorata logica di creazione delle mail di errore con un template unico 2024-05-27 10:40:53 +02:00
c0ae8f98f8 Merge remote-tracking branch 'origin/develop' into develop 2024-05-27 10:13:25 +02:00
83e770fb00 DAS 2024-05-27 10:13:21 +02:00
a2de1582cc Merge branch 'refs/heads/develop' into feature/Spring5
# Conflicts:
#	ems-core/src/main/java/it/integry/ems/sync/SyncManager.java
2024-05-27 09:42:13 +02:00
0296fc1666 [ROSSSOGARGANO]
- inserimento automatico barcode_ul
[CARELLI - STEUP]
gestiti nuovi campi segnalazioni
2024-05-27 09:40:56 +02:00
4fd700d771 [ROSSSOGARGANO]
- inserimento automatico barcode_ul
[CARELLI - STEUP]
gestiti nuovi campi segnalazioni
2024-05-27 09:40:50 +02:00
cc5401f193 Unificata e migliorata logica di creazione delle mail di errore con un template unico 2024-05-24 18:50:11 +02:00
c0654f4ab3 Merge remote-tracking branch 'origin/develop' into develop 2024-05-24 17:56:54 +02:00
475fbe7c2c Finish MRP_RimossoCodMdep 2024-05-24 17:33:26 +02:00
842cece89f Merge branch 'develop' into feature/MRP_RimossoCodMdep 2024-05-24 17:33:07 +02:00
035fe7c8bc [MrpDailyMaterialReqService]
- Commentato toMatch con il codMdep
2024-05-24 17:32:59 +02:00
7e54ca7b92 Merge tag 'Materica_CrmService_FixSalvaAttivita' into develop
Finish Materica_CrmService_FixSalvaAttivita
2024-05-24 17:30:23 +02:00
4892d75946 Finish Materica_CrmService_FixSalvaAttivita 2024-05-24 17:30:22 +02:00
3c821317f5 [CrmService]
- Fix effectiveTime null
- Pulizia codice
2024-05-24 17:30:09 +02:00
8073f9cd28 Merge branch 'develop' into feature/MRP_RimossoCodMdep 2024-05-24 17:26:35 +02:00
55933b974e [VGALIMENTI] Creato tracciato per tosca 2024-05-24 15:29:33 +02:00
b192f0db5d Finish StampaOrdineTwoB 2024-05-24 11:09:58 +02:00
5e975a62b9 Merge branch 'develop' into feature/StampaOrdineTwoB 2024-05-24 11:09:53 +02:00
65cbe8644b [AGRIBOOK] Fix query cronologia raccolte 2024-05-24 09:28:05 +02:00
997cd9ee31 Gestito correttamente ritorno importazione listino MS 2024-05-23 16:29:52 +02:00
78b68dc135 Merge remote-tracking branch 'origin/develop' into develop 2024-05-23 15:30:29 +02:00
0b62b93484 Modifica messaggio errorre import documenti STEF 2024-05-23 15:30:22 +02:00
3831cfd4c7 Esportazione documenti DAS Accise 2024-05-23 15:30:15 +02:00
efa2b3a8af Modifica messaggio errorre import documenti STEF 2024-05-23 15:29:43 +02:00
862ca8fbbd Merge remote-tracking branch 'origin/develop' into develop 2024-05-23 15:19:18 +02:00
6cca2bf89e Importazione packing list Eviosys 2024-05-23 15:19:09 +02:00
2620d061b4 sistemate note listino nella procedura di aggiornamento massiva 2024-05-23 15:17:02 +02:00
bf4a4359f7 Merge remote-tracking branch 'origin/develop' into develop 2024-05-23 12:32:43 +02:00
075d441ecc aggiunto campo iban nella tabella jtb_flav 2024-05-23 12:30:40 +02:00
ed0a654e9a Merge branch 'develop' into feature/MRP_RimossoCodMdep 2024-05-23 12:23:59 +02:00
a37a878c92 Finish OrdiKids 2024-05-23 12:00:31 +02:00
32d888472f Merge branch 'develop' into feature/OrdiKids 2024-05-23 11:36:47 +02:00
68f7123eec - Aggiunto NomeNegozioRequired nei settings di Ordikids
- Creazione migration setup NomeNegozioRequired
2024-05-23 11:36:32 +02:00
099093c66a Aggiornato metodo di lettura file xlsx 2024-05-23 10:56:46 +02:00
8796b14d39 Modifica procedura Trasporti Verttore 2024-05-22 18:16:22 +02:00
01737e7fa8 Merge remote-tracking branch 'origin/develop' into develop 2024-05-22 18:16:05 +02:00
2cb14e2452 Modifica Maggio chiusura commessa 2024-05-22 18:15:59 +02:00
f18aacd809 stampa ordine con immagini 2024-05-22 17:05:41 +02:00
a805edc181 Merge branch 'develop' into feature/OrdiKids 2024-05-22 09:36:39 +02:00
1bb2416059 Merge branch 'master' into develop 2024-05-21 18:27:23 +02:00
2342bbf4d4 Finish FixBooleanDefaultValue 2024-05-21 18:27:22 +02:00
13bc0e665e Corretto valore default per campi boolean nelle entity 2024-05-21 18:27:16 +02:00
396b6b7d80 Merge tag 'Hotfix-60' into develop
Finish Hotfix-60
2024-05-21 17:45:47 +02:00
9c09c36a0b Finish Hotfix-60 2024-05-21 17:45:46 +02:00
c4dae52dff Sistemato problema default su flag_add_trasp 2024-05-21 17:45:28 +02:00
5f96e7b0dd sistemata migration 2024-05-21 16:11:20 +02:00
5a2e7b75b4 Aggiunto nuovo campo nella lista degli articoli 2024-05-21 15:51:43 +02:00
1d39fb8ad1 Query Custom Qtà multipla su smetar 2024-05-21 15:07:38 +02:00
9c0e1258a3 Aggiunto numero minimo di capi ordinabile per colore 2024-05-21 13:51:23 +02:00
513a3ad610 Merge branch 'develop' into feature/MRP_RimossoCodMdep 2024-05-21 11:40:10 +02:00
c7f17f771b aggiunta linea dell'ordine di lavoro 2024-05-21 11:39:48 +02:00
a9fd75ff52 - Commentato setCodMdep 2024-05-21 09:45:22 +02:00
ef3e7d0fa6 Merge branch 'master' into develop 2024-05-20 16:46:04 +02:00
9c802252c6 Finish ModifVtbViaggi 2024-05-20 16:46:03 +02:00
4928fd1f0c Aggiunte colonne posizione e confermato in vtb_viaggi 2024-05-20 16:45:55 +02:00
9d80c66605 modificato report riepilogo documenti di vendita 2024-05-20 13:22:15 +02:00
8607c70bbe Finish Hotfix-59 2024-05-20 12:31:55 +02:00
a7d235e53a Merge tag 'Hotfix-59' into develop
Finish Hotfix-59
2024-05-20 12:31:55 +02:00
0ca0182687 Set flag_calc_peso_intra a N 2024-05-20 12:31:44 +02:00
2190cf2221 Set flag_calc_peso_intra a N 2024-05-20 12:31:31 +02:00
63b067cb7e Corretti nomi colonne in MtbLisv 2024-05-17 19:02:27 +02:00
abf274f0c5 Kit mannutenzione SMETAR 2024-05-17 18:43:35 +02:00
fd01e0446d Sistemata importazione promozioni apulia 2024-05-17 13:52:32 +02:00
4a371cda80 se l'attività viene pianificata ad un solo utente modificare l'utete sull'attività 2024-05-17 13:35:07 +02:00
d1da0d0f9e Merge remote-tracking branch 'origin/develop' into develop 2024-05-17 12:41:42 +02:00
6fe356bad7 sistemata query 2024-05-17 12:41:38 +02:00
40d9aa1790 Aggiunta parametro per permettere stampa di più copie in pdf 2024-05-17 10:37:57 +02:00
b7cac443c1 sistemata sintassi 2024-05-17 10:29:16 +02:00
93fbd9d154 Fix query storico raccolte agribook 2024-05-17 09:48:39 +02:00
a60a6c028c Merge branch 'master' into develop 2024-05-16 15:12:58 +02:00
37bb46db79 Finish Hotfix-59 2024-05-16 15:12:57 +02:00
db56a05559 sistemata query per giacenza progressiva 2024-05-16 15:12:51 +02:00
a35003d750 migration getlistiniVendita 2024-05-16 15:12:25 +02:00
cd3caf9b76 [Inventario]
- Aggiunto userName nella RowInventarioDto per mostrarlo nel modulo inventario
- Creata join sulla getInventari
2024-05-16 13:11:17 +02:00
864f4303a0 Finish Hotfix-59 2024-05-16 13:06:38 +02:00
c4eadb03b9 Merge branch 'master' into develop 2024-05-16 13:06:38 +02:00
a9e7ccb870 -risolta verifica inventario
-inserite cancellazioni listini di apulia
2024-05-16 13:06:32 +02:00
ff518e3525 aggiunti nuovi campi nei listini e sistemata verifica inventario 2024-05-16 11:00:45 +02:00
03b03e8831 Merge branch 'develop' into feature/Spring5 2024-05-15 17:17:22 +02:00
ee96e8e91b aggiunta cancellazione movimenti contabili 2024-05-15 16:39:30 +02:00
31e1df6786 Migliorato recupero scontrini 2024-05-15 16:39:14 +02:00
f75c2c7fc9 Aggiunta campo flag_calc_peso_intra su tipi documento e flag_sezione su dtb_docr 2024-05-15 16:11:00 +02:00
3b115b5e08 Aggiunta campo flag_calc_peso_intra su tipi documento e flag_sezione su dtb_docr 2024-05-15 16:10:52 +02:00
542a0d7a8a Finish Hotfix-58 2024-05-15 10:38:33 +02:00
0c869066b4 Merge tag 'Hotfix-58' into develop
Finish Hotfix-58
2024-05-15 10:38:33 +02:00
6ec4bf91e0 Modifica CMR per problema su note contatto mancanti 2024-05-15 10:38:17 +02:00
e8d316cb83 Finish Hotfix-58 2024-05-15 09:42:21 +02:00
0c8d4e2dc4 Merge branch 'master' into develop 2024-05-15 09:42:21 +02:00
63c7ed7faf aggiunta regola per completare cod_art_for anche nella mtb_lisa 2024-05-15 09:42:15 +02:00
82bcf9ee15 Fix deserializzazione entity 2024-05-14 17:33:19 +02:00
e8d116cbb8 Merge branch 'develop' into feature/Spring5 2024-05-14 17:33:15 +02:00
eeac0a0348 Finish Hotfix-58 2024-05-14 16:44:06 +02:00
2a01d0ed7d Merge branch 'master' into develop 2024-05-14 16:44:06 +02:00
0567665ca1 Fix su salvataggio elementi object storage 2024-05-14 16:44:00 +02:00
1b38a00056 Riattivato filtro per conversione entity in json 2024-05-14 16:06:04 +02:00
47cfdb6e7f Merge branch 'master' into develop 2024-05-14 12:19:12 +02:00
a86664ee2e Finish Hotfix-58 2024-05-14 12:19:11 +02:00
e420cd2d54 Fix menu 2024-05-14 12:19:06 +02:00
b1d1c548b4 Merge branch 'develop' into feature/Spring5 2024-05-14 12:02:34 +02:00
3a99747e2a [WMS]
- corrette sottrazioni di variabile null
[CARELLI - STEUP]
- download descrizioni attivita in login
- salvataggio priorita e persona rif
2024-05-14 12:02:08 +02:00
1d859f3c73 Merge branch 'refs/heads/develop' into feature/Spring5 2024-05-14 11:43:11 +02:00
55c97f3441 Finish Hotfix-58 2024-05-14 11:39:12 +02:00
c6d88346d1 Merge branch 'master' into develop 2024-05-14 11:39:12 +02:00
03b3a25b86 Migration per AnsiPadding 2024-05-14 11:39:05 +02:00
5c46e4aed5 Aggiunta campo Flag_calc_peso_intra 2024-05-13 18:33:06 +02:00
7743569034 Aggiunta campo Flag_calc_peso_intra 2024-05-13 18:32:59 +02:00
b1d10af821 Aggiunta campo Flag_calc_peso_intra 2024-05-13 18:20:34 +02:00
cf526b8003 Aggiunta campo Flag_calc_peso_intra 2024-05-13 18:02:03 +02:00
4311b93611 Merge remote-tracking branch 'origin/develop' into develop 2024-05-13 18:01:53 +02:00
432e52536b Aggiunta campo Flag_calc_peso_intra 2024-05-13 18:01:44 +02:00
3f062c9370 Finish FixMES 2024-05-13 17:50:11 +02:00
9cc3abe964 Merge branch 'master' into develop 2024-05-13 17:50:11 +02:00
b1a7ea4482 Corretto inserimento data chiusura lotto in caso di terminazione linea 2024-05-13 17:50:00 +02:00
37219b4fb6 [AGRIBOOK] Modificate logiche gestione previsione raccolta 2024-05-13 17:30:58 +02:00
4d38fd8fb3 Aggiunta campo Flag_calc_peso_intra 2024-05-13 15:27:14 +02:00
0376b4c790 Aggiunta campo Flag_calc_peso_intra 2024-05-13 15:27:02 +02:00
88b73f950d Merge branch 'master' into develop 2024-05-13 11:17:12 +02:00
21ab0fdc0d Finish Hotfix-58 2024-05-13 11:17:11 +02:00
21021cec1f Aggiunta setup per controllo ordini multipli su mes 2024-05-13 11:17:02 +02:00
4187aabd11 Modifiche spring5 2024-05-13 11:07:19 +02:00
7d23d4c288 Merge branch 'develop' into feature/Spring5 2024-05-13 09:22:24 +02:00
d7da677fdb [Monitoraggio Linee]
- Migration per FLAG_SUGGESTCODEPARTITAMAG_ORDLAV
- Migration per COD_MART_SFRIDO, ANNOTAZIONI_SFRIDO, ETICHETTA_SFRIDO
2024-05-10 18:16:07 +02:00
53d546f99a upload allegati 2024-05-10 17:19:37 +02:00
8fce6a446f Gestione quantità multipla 2024-05-10 16:33:34 +02:00
08d48a4601 Aggiunto controllo per qta lav null in dtb ord steps 2024-05-10 15:45:29 +02:00
d31d55b00e [AGRIBOOK] Aggiunta lista prevRaccNumeroSettimane in retrieveOrders 2024-05-10 15:43:14 +02:00
ec4d0076b6 Settato dateTimeRow in fase di salvataggio colli 2024-05-10 15:40:04 +02:00
1365aadaf0 Aggiunta importazione sugli scontrini di reso il riferimento dello scontrino di vendita 2024-05-10 15:31:01 +02:00
957bcfb52f Ripristinato update jackson 2024-05-10 13:04:14 +02:00
007f0c5808 Merge branch 'refs/heads/develop' into feature/Spring5 2024-05-10 11:44:55 +02:00
fa9c1f83eb Sostituito check di annotation Master tramite il nuovo scan mapping 2024-05-10 11:11:09 +02:00
98d479e82c Merge branch 'develop' into feature/Spring5
# Conflicts:
#	pom.xml
2024-05-10 11:03:27 +02:00
9fa386ea8c Ricostruito metodo di calcolo dei query fields da inserire nel prepared statement in fase di insert entity 2024-05-10 10:51:05 +02:00
df20c13204 Aggiunta vista per fabbisogni sfusi biolevante 2024-05-09 17:08:49 +02:00
2d24a1beb3 Aggiornato swagger2 alla versione 3 2024-05-09 15:45:06 +02:00
ecb6175c64 Merge remote-tracking branch 'origin/develop' into develop 2024-05-09 15:12:48 +02:00
5b1a866996 Revert versione di Jackson 2024-05-09 15:12:40 +02:00
1004c66965 Aggiunta quantità multipla ordinabile in importazione listini di acquisto 2024-05-09 13:20:01 +02:00
1fbf875c16 Gestita assegnazione data consegna del cliente per MERCADONA 2024-05-09 13:19:02 +02:00
ad8109ed65 Gestito ordinamento DESC su acquisizione cliente in allega fatture passive 2024-05-09 13:18:17 +02:00
05ae4be472 Merge remote-tracking branch 'origin/develop' into develop 2024-05-09 13:18:06 +02:00
406513488b Gestito ordinamento DESC su acquisizione cliente in allega fatture passive 2024-05-09 13:18:01 +02:00
71fdc5c9ea Merge branch 'develop' into feature/Spring5 2024-05-09 11:52:23 +02:00
d2e68c7c9b [IMPORTANT] Aggiornamento di Sping Framework alla versione 5 2024-05-09 11:42:44 +02:00
2bdbbcfa75 aggiunte note ordine 2024-05-09 10:53:03 +02:00
6ba4d0d310 Configurazione per swagger 2.9.2 2024-05-08 19:32:14 +02:00
e14cbb49c3 [IMPORTANT] Aggiornamento di alcune librerie (MinIO, Guava, Firebase, Jackson) 2024-05-08 18:15:32 +02:00
b5a7ba0054 Controllo regola checkCanDeleteOrder se steps non presenti 2024-05-08 16:44:24 +02:00
74ec8ff9eb Aggiunta voce di menu fabb_olio_linea 2024-05-08 11:04:39 +02:00
d1726b65ff [WMS] Refactoring per autenticatione OAuth 2024-05-07 18:55:12 +02:00
91994256d7 Correzione query getRowDb 2024-05-07 18:08:26 +02:00
cdc3f0076a Update su funzione f_getCostSpes e aggiunta setup per escludere i colli dalla giacenza mrp 2024-05-07 16:57:03 +02:00
0fa7eb5568 Spostata modifica MES_GetWorkOrders in nuova migrazione 2024-05-07 15:50:06 +02:00
ca0559bf7f Eliminta valorizzazione di data doc nella registrazione delle distinte perché a causa delle importFromParent andava a sovrascrivere ( solo nel caso di scadenze già chiuse prima della registrazione delle distinte) la data scad presente nella ctb_scad 2024-05-07 13:55:09 +02:00
1a02d73154 aggiunta setup 2024-05-07 13:39:34 +02:00
e899ea74b9 Aggiunto controllo su import ordini EDI che permette al cliente MERCADONA di assegnare la data consegna del file piuttosto che calcolarla 2024-05-06 16:35:32 +02:00
f8623173cb modifiche a procedura di allinemanto posture 2024-05-06 16:15:31 +02:00
67c9211123 Modifiche creazione ordini mes smetar e regole di cancellazione lotto 2024-05-06 12:47:07 +02:00
e76bc1e38e correzioni creazione documenti di carico scarico e accettazione ortofrutta 2024-05-03 19:38:28 +02:00
49576b0558 Gestione note fattura in generazione xml fattura elettronica 2024-05-03 18:50:27 +02:00
9a6b6f88d9 Fix query attività da installare 2024-05-03 10:10:32 +02:00
8388e939d3 Servizio accettazione materia prima ortofrutta 2024-05-02 20:02:26 +02:00
932bc290d4 salvato json che arriva da Tuidi 2024-05-02 18:59:18 +02:00
fdc7f9bf10 nuova gestione cespiti 2024-05-02 17:06:29 +02:00
e88489166b Aggiunta setup 2024-05-02 16:49:58 +02:00
83ae87b5d4 Merge remote-tracking branch 'origin/develop' into develop 2024-04-30 18:53:33 +02:00
1e278e4d7b [AGRIBOOK] Implementate settings 2024-04-30 18:53:24 +02:00
9cb671fc43 Aggiunto ordinamento per cod_anag desc in acquisizione codice fornitore fatture passive 2024-04-30 17:33:18 +02:00
aedf5cde77 Merge remote-tracking branch 'origin/develop' into develop 2024-04-29 16:52:57 +02:00
2a5831c971 Modifica export documenti STEF 2024-04-29 16:52:52 +02:00
84cc42cc40 modifiche a procedura di importazione listini di apulia 2024-04-26 17:11:16 +02:00
144b26bd5d modificata regola affinchè parta anche quando codJfas è valorizzato 2024-04-26 12:56:04 +02:00
0fbfffbdea aggiunta vista 2024-04-26 12:55:22 +02:00
a599c46cfc Merge remote-tracking branch 'origin/develop' into develop 2024-04-24 19:46:48 +02:00
1c2ec14677 Aggiunto parametro lotto in CreateUDSRequestDTO 2024-04-24 19:46:41 +02:00
b0d18a151d Nascosto esegui per stato skipped in migrazioni 2024-04-24 17:00:45 +02:00
2d2d5d6bae Aggiunto pulsante per eseguire migrazioni su profilo specifico 2024-04-24 16:50:31 +02:00
374fe08fe2 Gestione criterio prod modificato 2024-04-24 13:02:43 +02:00
3f8bb86e15 Migrations Gestione criterio prod modificato 2024-04-24 11:52:44 +02:00
1e2190b1ad Aggiunto controllo su esistenza trigger in migration 2024-04-23 19:36:05 +02:00
09bb658367 Merge tag 'Biolevante_MRP_ReverseOrderGestione' into develop
Finish Biolevante_MRP_ReverseOrderGestione
2024-04-23 18:14:30 +02:00
c91e4f83e0 Finish Biolevante_MRP_ReverseOrderGestione 2024-04-23 18:14:30 +02:00
8c0fbede36 Migrations Gestione criterio prod modificato 2024-04-23 18:06:51 +02:00
61788b2c7f Fix registrazione imballi WMS 2024-04-23 18:04:51 +02:00
58e8c56d37 [MrpDailyMaterialReq]
- Reso l'ordinamendo gestione DESC come da richiesta
- Pulizia codice
2024-04-23 16:35:31 +02:00
9b615738f3 Registrazione imballi WMS 2024-04-23 16:31:20 +02:00
8577366285 revisione file 2024-04-23 15:00:34 +02:00
65b82c29d4 aggiunta setup 2024-04-23 13:44:39 +02:00
e86d728acd Merge tag 'Biolevante_MRP_AggiuntaPriorita' into develop
Finish Biolevante_MRP_AggiuntaPriorita
2024-04-23 13:18:24 +02:00
87b3030b9e Finish Biolevante_MRP_AggiuntaPriorita 2024-04-23 13:18:23 +02:00
dfc61ec50c [MrpDailyMaterialReq]
- Aggiunto Priorita al DTO
- Inserito nelle varie query il campo priorita come numero fisso per impostare l'ordine come da richiesta
2024-04-23 13:18:12 +02:00
70b72d950a Finish Feature-ListinoRif 2024-04-23 12:38:48 +02:00
6302fbd5a9 Merge branch 'develop' into feature/Feature-ListinoRif 2024-04-23 12:38:42 +02:00
e1a3dc034e modificata logica dei listini di riferimento aggiunta versione del listino rif 2024-04-23 12:38:29 +02:00
4e934ed31c Aggiunto campo flag_esclusi_gruppo in fabbisogni 2024-04-23 11:49:10 +02:00
3f5d3a9d64 Aggiunto campo flag_esclusi_gruppo in fabbisogni 2024-04-23 11:49:02 +02:00
e72b00fe17 Sistemato problema valorizzazione cod_barre_imb 2024-04-23 09:38:30 +02:00
5e73631377 Sistemato problema valorizzazione cod_barre_imb 2024-04-23 09:38:21 +02:00
df04dba03f Finish Hotfix-57 2024-04-22 17:22:06 +02:00
ed35819ae5 Merge tag 'Hotfix-57' into develop
Finish Hotfix-57
2024-04-22 17:22:06 +02:00
2aac7353e2 Salvataggio invenatario in Farmmes Scrofaie 2024-04-22 17:21:47 +02:00
1cb380de45 Carelli: aggiunto intercode per alcune tipologie di promozioni 2024-04-22 15:31:27 +02:00
27bc8a2b32 Finish Hotfix-56 2024-04-22 12:55:48 +02:00
2e367f398f Merge tag 'Hotfix-56' into develop
Finish Hotfix-56
2024-04-22 12:55:48 +02:00
f022e89a73 Salvataggio TRASFERIMENTO_A_CESPITE in Farmmes Scrofaie 2024-04-22 12:55:29 +02:00
5b46046b87 Finish Hotfix-56 2024-04-22 12:02:34 +02:00
b62104ae91 Merge branch 'master' into develop 2024-04-22 12:02:34 +02:00
76a2e5b8ba Sistemato invio variazioni nel caso in cui nello stesso giorno c'è un inizio e una fine promo 2024-04-22 10:44:51 +02:00
4f9eb6ea13 Merge branch 'master' into develop 2024-04-22 09:58:04 +02:00
0c0e0d2ba6 Finish Hotfix-56 2024-04-22 09:58:03 +02:00
fc51f4fc74 Fix check versione menu 2024-04-22 09:57:54 +02:00
8583f29082 Gestita cancellazione TRASFERIMENTO_A_CESPITE in Farmmes Scrofaie 2024-04-19 18:20:26 +02:00
fc6a944f61 Merge remote-tracking branch 'origin/develop' into develop 2024-04-19 17:30:57 +02:00
1d0234f9ed Registrazione imballi WMS 2024-04-19 17:30:48 +02:00
75bd2abe12 Finish feature/Carelli_Inventari_FixOrdinamentoERimozionePagination 2024-04-19 16:42:50 +02:00
06bce9f7e2 [Inventario]
- Fix ordinamento inventari (prima erano ordinati ma per profilo/db e non globalmente)
- Rimozione pagination
2024-04-19 16:42:40 +02:00
2a9bebc416 Merge remote-tracking branch 'origin/develop' into develop 2024-04-19 15:57:16 +02:00
0a021baf09 Gestione utente su CLATV 2024-04-19 15:57:10 +02:00
34331c2312 Fix query ArtsInGiacenza 2024-04-19 15:54:00 +02:00
8eef4083c8 In aggiunta cronologia delle raccolte in retrieveOrders di Agribook 2024-04-19 15:47:04 +02:00
869da4fa6c Ingrandita mtb_partita_mag.descrizione, sistemato report scheda costi aggiunta percentuale provvigioni, aggiunta nuova voce di menù 2024-04-19 13:54:00 +02:00
7048d0a4d9 varie migration per modifiche ordini di acquisto carelli 2024-04-18 18:57:06 +02:00
e029bb2e89 Fix data StampaSchedaCosti 2024-04-18 16:02:27 +02:00
6cd612fbb8 Modifica query getActivity 2024-04-18 15:40:40 +02:00
41c9f25c6b Merge remote-tracking branch 'origin/develop' into develop 2024-04-18 15:23:57 +02:00
3b4ade02a5 Aggiunto dataIniz in stampaSchedaCosti 2024-04-18 15:21:57 +02:00
bf4a70b0e5 Merge remote-tracking branch 'origin/develop' into develop 2024-04-18 15:16:15 +02:00
30ec953aa1 Scarichi manuali da WINGEST 2024-04-18 15:16:05 +02:00
5edade9076 Merge remote-tracking branch 'origin/develop' into develop 2024-04-18 15:06:35 +02:00
225501b1a5 Fix query stampaSchedaCosti 2024-04-18 15:06:32 +02:00
9df682b4ef Merge branch 'master' into develop 2024-04-18 13:27:21 +02:00
9d6a23658f Finish Hotfix-56 2024-04-18 13:27:21 +02:00
408b106c2f tornare indietro con la modifica della getlistinoacquisto 2024-04-18 13:27:15 +02:00
713989bcb9 Modificato tipo di errore 2024-04-18 12:25:16 +02:00
7ce4703235 Merge branch 'master' into develop 2024-04-18 11:03:18 +02:00
a1013c878a Finish Hotfix-56 2024-04-18 11:03:18 +02:00
27ff4b1d69 sistemata setup 2024-04-18 11:03:13 +02:00
61d03a9ece aggiornamento getListiniAcquisto 2024-04-18 11:02:30 +02:00
baf5d9151f Finish Hotfix-56 2024-04-18 10:10:35 +02:00
eb02131482 Merge branch 'master' into develop 2024-04-18 10:10:35 +02:00
504910cbc7 Import Gelorent: aggiunta setup con codice fornitore e gestita nuova tabella per intercode.
Cambio tipo documento modificata la data di registrazione del movimento alla data di importazione
2024-04-18 10:10:29 +02:00
47c0fadb40 Calcolo disponbilità e ANSI NULL a Follies 2024-04-18 09:03:17 +02:00
203b14064f Calcolo disponbilità e ANSI NULL a Follies 2024-04-17 18:31:19 +02:00
fe7e9aee68 Calcolo disponbilità e ANSI NULL a Follies 2024-04-17 18:21:16 +02:00
bf1307c3a8 Calcolo disponbilità 2024-04-17 18:21:00 +02:00
e65a9eab8f Fix harvestHystoryDto 2024-04-17 17:54:06 +02:00
fb27d1a17c In inserimento tiket aggiunto esito "DA FARE" per sotto attività 2024-04-17 17:05:19 +02:00
6ffc809fac Finish Hotfix-56 2024-04-16 18:01:42 +02:00
8a11d7b4b6 Merge branch 'master' into develop 2024-04-16 18:01:42 +02:00
1336cbda98 sistemata cast 2024-04-16 18:01:29 +02:00
f30cf71f27 Finish Hotfix-56 2024-04-16 16:14:55 +02:00
8ff6dc4cd4 Merge branch 'master' into develop 2024-04-16 16:14:55 +02:00
4a9681ae26 corretta numerazione del reverse 2024-04-16 16:14:49 +02:00
bf80b77374 Merge branch 'master' into develop 2024-04-16 13:57:27 +02:00
c9c8450cbb Finish Hotfix-56 2024-04-16 13:57:26 +02:00
df0d3d4972 modificata la lettura della qta_cnf e inserita setup per leggere la qta presente nel listino anche quando è 1 2024-04-16 13:56:02 +02:00
026f76cb4a Rimosso suffisso QM al last upd menu 2024-04-16 11:18:47 +02:00
338c13947d Modifica vista analisi costi produzione 2024-04-15 19:10:53 +02:00
81eb1ec9a5 Lanci produzione: Filtro su num_fase in visualizzazione materiali 2024-04-15 13:17:04 +02:00
4b625ab9ea Personalizzazione stampa report ordine di produzione di default 2024-04-12 17:57:07 +02:00
9f76cf6762 Passare parametri obbligatori 2024-04-12 12:52:35 +02:00
427839fe52 Merge remote-tracking branch 'origin/develop' into develop 2024-04-12 09:58:32 +02:00
6146eb074b aggiunta migration 2024-04-12 09:58:30 +02:00
69309bf40b Merge branch 'master' into develop 2024-04-11 17:04:18 +02:00
8a48701cbf Finish Hotfix-56 2024-04-11 17:04:18 +02:00
a369bf0297 Fix localdate 2024-04-11 17:04:09 +02:00
d863468175 cancellata migration 2024-04-11 16:36:12 +02:00
abf19e0c0d sistemata migration 2024-04-11 16:27:39 +02:00
4d6998371f Varie migration 2024-04-11 16:04:43 +02:00
ce600f5bd0 PIG-UP: sistemato problema righe duplicate 2024-04-11 11:25:41 +02:00
912a208dfe gestito correttamente il cambio del tipo documento nella generazione dell'autofattura 2024-04-11 10:19:26 +02:00
cf5f52e696 inserimenti setup 2024-04-10 19:18:44 +02:00
af40f38ca3 Finish Hotfix-56 2024-04-10 17:51:07 +02:00
bc9de1344d Merge branch 'master' into develop 2024-04-10 17:51:07 +02:00
5c33542b35 Sistemare val premio nell'importazione dei listini di apulia e aggiunta possibilità di importare la percentuale del premio 2024-04-10 17:50:59 +02:00
64d077df8b Sistemare val premio nell'importazione dei listini di apulia e aggiunta possibilità di importare la percentuale del premio 2024-04-10 17:48:57 +02:00
5c7254a827 migliorato messaggio d'errore 2024-04-10 16:02:01 +02:00
10508da2f4 Merge remote-tracking branch 'origin/develop' into develop 2024-04-10 15:10:18 +02:00
248ecaf778 [WMSGenericService]
- Se presente viene presa la maxDataCollo dei colli di carico, altrimenti la data odierna, come data_collo degli ordini di scarico
2024-04-10 15:10:07 +02:00
d42c139490 Merge branch 'master' into develop 2024-04-10 13:14:32 +02:00
051f3b5ce5 Finish Hotfix-56 2024-04-10 13:14:31 +02:00
4d1b79b1b5 Fix numIreg da short a int 2024-04-10 13:14:26 +02:00
446a57b1e2 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	ems-core/src/main/java/it/integry/ems/migration/model/Migration_20240408151803.java
2024-04-10 10:45:43 +02:00
22d812a305 Migration per AnsiPadding 2024-04-10 10:45:09 +02:00
21cc84f7a1 Migration per AnsiPadding 2024-04-10 10:45:00 +02:00
7604bd0b4a Merge branch 'master' into develop 2024-04-10 10:34:31 +02:00
f88d409265 Finish Hotfix-56 2024-04-10 10:34:30 +02:00
3d394e7591 Fix date 2024-04-10 10:34:25 +02:00
d8e4f45827 Piccola utility db 2024-04-10 10:30:17 +02:00
9a75993848 cvw_mov_black_list 2024-04-09 18:44:34 +02:00
daf4bc347e Sistemati controlli su anno contabile a cavallo, aggiunga migration per setupGest, importazione Rosso gargano 2024-04-09 18:12:45 +02:00
840805f39f Merge remote-tracking branch 'origin/develop' into develop 2024-04-09 18:12:01 +02:00
4c4a3a99c2 Sistemato problema codice EAN imballo su EAN 128 della funzione f_getEAN128UL 2024-04-09 17:02:18 +02:00
6f0ec7ad47 Sistemato problema codice EAN imballo su EAN 128 della funzione f_getEAN128UL 2024-04-09 17:02:01 +02:00
92c10d50c8 [UtilityService]
- Fix se il currentObject è null
2024-04-09 15:39:42 +02:00
44e78b336f aggiornamento vista 2024-04-09 14:45:45 +02:00
688af6c815 Refactor UtilityController 2024-04-09 13:19:57 +02:00
5629a09ab8 Finish Hotfix-56 2024-04-09 12:07:31 +02:00
19bdd5e160 Merge branch 'master' into develop 2024-04-09 12:07:31 +02:00
338da4bbdb Migration per AnsiPadding 2024-04-09 12:07:21 +02:00
5ae6961b2f Aumentata dimensione descrizione CTB_BENI 2024-04-09 10:40:18 +02:00
b2f7dd77bb Merge remote-tracking branch 'origin/develop' into develop 2024-04-09 10:38:17 +02:00
1ebb61c1b4 Aumentata dimensione descrizione CTB_BENI 2024-04-09 10:38:08 +02:00
ea4d196ca2 Aumentata dimensione descrizione CTB_BENI 2024-04-09 10:37:52 +02:00
caad874c62 Merge remote-tracking branch 'origin/develop' into develop 2024-04-09 09:57:30 +02:00
bd8942617f Aggiunto servizio per permettere all'utente di registrarsi da task 2024-04-09 09:57:24 +02:00
033dee9393 Merge remote-tracking branch 'origin/develop' into develop 2024-04-08 17:39:29 +02:00
bdafc2ad36 allineamento query setup 2024-04-08 17:39:25 +02:00
e0e233b50e Fix user service 2024-04-08 15:30:45 +02:00
e448d220a0 Finish Hotfix-56 2024-04-08 15:22:13 +02:00
79022c1612 Merge branch 'master' into develop 2024-04-08 15:22:13 +02:00
23f34e4846 Mmigration per AnsiPadding 2024-04-08 15:21:38 +02:00
961a7bd278 allineamento query setup 2024-04-08 15:19:00 +02:00
efd595f45b Merge remote-tracking branch 'origin/develop' into develop 2024-04-08 12:25:14 +02:00
d683d75924 modifiche per permettere all'utene di accedere a task 2024-04-08 12:13:14 +02:00
119bcd82bf Attivata paginazione in tabella migrazioni 2024-04-08 12:05:33 +02:00
4fa27e5ec0 Modifica gitignore 2024-04-08 09:42:36 +02:00
ec507dc606 Merge branch 'master' into develop 2024-04-05 18:20:05 +02:00
14871e6175 Finish Hotfix-56 2024-04-05 18:20:05 +02:00
5f4ace9e96 [VGALIMENTI - CONTROLLO GIACENZE]
Corretta conversione LocalDate in Date per dataColloRif
2024-04-05 18:19:57 +02:00
410e2f272c Modifica gitignore 2024-04-05 13:28:18 +02:00
23df2f7bb2 Merge remote-tracking branch 'origin/develop' into develop 2024-04-05 13:25:40 +02:00
107e5cefca Aggiunto servizio per estrarre descrizioni attività 2024-04-05 13:25:29 +02:00
c49b5ac309 Aggiunta gestione imballi WMS 2024-04-05 13:24:13 +02:00
f69f9cd94a Aggiornato gitignore 2024-04-05 10:32:27 +02:00
f1e5a1cb25 Controllo data documento futura 2024-04-04 17:56:35 +02:00
cb0b718e84 Controllo data documento futura 2024-04-04 17:56:21 +02:00
7f35e6782e Controllo annullamento serie su duplicazione ordine di vendita 2024-04-04 17:33:02 +02:00
9445b1f468 Controllo annullamento serie su duplicazione ordine di vendita 2024-04-04 17:32:48 +02:00
7b65dce59e Merge branch 'master' into develop 2024-04-04 15:23:04 +02:00
cf4fc241ab Finish Hotfix-56 2024-04-04 15:23:03 +02:00
b200eeb8ed modifica per importazione listini format 2024-04-04 15:22:55 +02:00
b10cb1d551 Merge branch 'master' into develop 2024-04-04 15:16:48 +02:00
1d97a93b87 Finish Hotfix-56 2024-04-04 15:16:47 +02:00
a1f23f4fc5 ISCC 2024-04-04 15:16:40 +02:00
5860943104 corretta query 2024-04-04 15:09:40 +02:00
9063db3fd0 Merge branch 'master' into develop 2024-04-04 15:08:42 +02:00
884a279a4a Finish Hotfix-57 2024-04-04 15:08:42 +02:00
8ab0cd5465 Fix 2024-04-04 15:08:36 +02:00
fe5f517c25 Merge branch 'master' into develop 2024-04-04 14:58:05 +02:00
2b14a047a3 Finish Hotfix-56 2024-04-04 14:58:05 +02:00
af17a976a8 Merge remote-tracking branch 'origin/develop' into develop 2024-04-04 14:57:51 +02:00
925bc99566 Merge branch 'master' into hotfix/Hotfix-56 2024-04-04 14:57:07 +02:00
bd82ff80c1 ISCC 2024-04-04 14:56:35 +02:00
104b537177 ISCC 2024-04-04 14:55:39 +02:00
6dcb21a301 Rossogargano 2024-04-04 14:53:08 +02:00
9cfb59d501 Merge remote-tracking branch 'origin/develop' into develop 2024-04-04 13:41:07 +02:00
141e7ace37 Merge branch 'master' into develop 2024-04-04 13:40:32 +02:00
0df3fc3349 controllo su scadenze con data documento errata, modifiche per rossogargano 2024-04-04 13:39:39 +02:00
414a8bb1c3 Finish Hotfix-56 2024-04-04 13:21:38 +02:00
71fd011c65 Migration Ansi padding 2024-04-04 13:21:33 +02:00
b1cf1de005 Migration Ansi padding 2024-04-04 13:20:18 +02:00
54a7597709 Merge branch 'master' into develop 2024-04-04 12:48:17 +02:00
a424adb64b Finish Hotfix-56 2024-04-04 12:48:17 +02:00
0ae6cc1dd2 Fix su date 2024-04-04 12:48:11 +02:00
351184cda2 Fix codJflav in getRicorrenze 2024-04-04 12:09:58 +02:00
582e67ea3d Merge branch 'master' into develop 2024-04-04 11:08:42 +02:00
d649fb5651 Finish Hotfix-56 2024-04-04 11:08:03 +02:00
3e7f7d2bff corretta insert previsioni meteo con prepared statement 2024-04-04 11:07:24 +02:00
e4ac77e77b Merge remote-tracking branch 'origin/develop' into develop 2024-04-04 11:04:33 +02:00
f3eedecfec corretta insert previsioni meteo con prepared statement 2024-04-04 11:04:14 +02:00
eee2e9f893 Finish Hotfix-56 2024-04-04 10:58:55 +02:00
fd069a68e7 Merge branch 'master' into develop 2024-04-04 10:58:55 +02:00
f81cf7e3e1 Fix date 2024-04-04 10:58:32 +02:00
57bcedf022 Finish Hotfix-56 2024-04-03 14:12:01 +02:00
e03f1aaef8 Merge branch 'master' into develop 2024-04-03 14:12:01 +02:00
587f62bc15 modifiche a procedura di gelorent per poterla utilizzare su format 2024-04-03 14:11:49 +02:00
27627e2821 Merge branch 'master' into develop 2024-04-03 12:16:28 +02:00
50e59c7217 Finish Hotfix-56 2024-04-03 12:16:28 +02:00
22f8f09c56 Fix su menu e date 2024-04-03 12:16:23 +02:00
a0358d356d Merge branch 'master' into develop 2024-04-03 10:51:38 +02:00
09e77e0eff Finish Hotfix-56 2024-04-03 10:51:37 +02:00
44989dea5a Fix su date mtbcolt 2024-04-03 10:51:32 +02:00
a58a583652 Merge branch 'master' into develop 2024-04-03 10:18:49 +02:00
761f0e6a46 Finish Hotfix-56 2024-04-03 10:18:48 +02:00
6783b2b7a8 Fix sull'autocomplete della data collo 2024-04-03 10:18:42 +02:00
81720caad7 Merge branch 'master' into develop 2024-04-02 18:44:50 +02:00
b48f6275d7 Finish Hotfix-56 2024-04-02 18:44:49 +02:00
e9bbd723de corretto controllo su nomeazienda ordini follie
corretta conversione date da sql a localDate
2024-04-02 18:43:49 +02:00
db58dc9ac9 Merge branch 'master' into develop 2024-04-02 16:20:52 +02:00
1b05113975 Finish Hotfix-56 2024-04-02 16:20:52 +02:00
18184b447a Vario 2024-04-02 16:20:44 +02:00
75b1da5144 Vario 2024-04-02 16:20:04 +02:00
e5259ea78f Creata setup ABILITA_SCONTO in Ordify > Setup 2024-04-02 15:11:21 +02:00
19e64aadfe Aggiustati file templates 2024-04-02 10:51:36 +02:00
1a00d3653f Finish Licor_ContrattiDiAcquisto_FixDataOff 2024-03-29 16:03:42 +01:00
17633ccda7 [ContrattoDiAcquistoService]
- Se nuovo contratto, setto la dataOff se non presente
2024-03-29 16:03:35 +01:00
457d216a0b Cambiata condizione su date pianificazione 2024-03-29 09:38:12 +01:00
cbdff104e9 Cambiata condizione su date pianificazione 2024-03-29 09:25:16 +01:00
83eaa1b8f6 Leggere la qta cnf dal listino di acquisto 2024-03-28 17:14:39 +01:00
e796c9e803 Fix migrations 2024-03-28 14:58:41 +01:00
4d2d98774c Correzione tabella migrations ims webui 2024-03-28 12:03:16 +01:00
7220f525d3 Migrato IPR in .idea folder 2024-03-28 10:28:35 +01:00
7ccd45159f Merge remote-tracking branch 'origin/develop' into develop 2024-03-28 10:10:16 +01:00
6357cc17de Aggiunto servizio per estrarre le aziende a cui non si installa da più di un mese 2024-03-28 10:10:03 +01:00
d3046994c7 Varie ed eventiali 2024-03-28 09:49:41 +01:00
f799ff947a Merge remote-tracking branch 'origin/develop' into develop 2024-03-28 09:07:23 +01:00
d822ecd017 Gestito Num.Conf su importazione documenti DIALOGO 2024-03-28 09:07:18 +01:00
95ed2de093 Modifiche per salvataggio attività 2024-03-27 17:47:59 +01:00
3ec11a877f Merge remote-tracking branch 'origin/develop' into develop 2024-03-27 17:41:09 +01:00
0714023504 Modifiche per salvataggio attività 2024-03-27 17:41:05 +01:00
9423bbd30a - Migration GRUPPI_CONTROLLO_DATI_SCHEDATECNICA 2024-03-27 17:31:03 +01:00
a6f304c527 Fix LocalDate su MtbCols 2024-03-27 16:32:34 +01:00
bff1705c5b Merge branch 'master' into develop 2024-03-27 10:13:34 +01:00
d4407e1f50 Finish Hotfix-56 2024-03-27 10:13:33 +01:00
2327be0f5d Modificati parametri connessione db per alcuni clienti 2024-03-27 10:13:28 +01:00
914bd5996c Corretta deserializzazione delle LocalDate in presenza dei dati di timezone 2024-03-27 09:45:02 +01:00
9e92c26926 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	ems-core/src/main/java/it/integry/ems_model/entity/StbGestSetup.java
2024-03-27 09:44:21 +01:00
4aa69f081d Merge remote-tracking branch 'origin/develop' into develop 2024-03-27 09:36:40 +01:00
3f01ab6502 importazione listini apulia gestione premi, verifica resi aggiunte wdtb_doct e range date configurabile 2024-03-26 23:03:49 +01:00
6558af7968 Aggionto campo in Azienda 2024-03-26 19:12:13 +01:00
7c0077e4a6 correzione registrazione movimento contabile e importazione rosso gargano 2024-03-26 18:12:57 +01:00
e090363418 aggiunto esito attività 2024-03-26 18:10:53 +01:00
3fab54e2e7 Fix regole dopo aver modificato i campi dataCollo da Date a LocalDate in MtbColr e MtbColt 2024-03-26 13:41:27 +01:00
4208c4a73d Gestione plafond reso 2024-03-26 13:27:36 +01:00
14b841d002 Merge remote-tracking branch 'origin/develop' into develop 2024-03-26 13:27:21 +01:00
eb9ca71fcd Gestione plafond reso 2024-03-26 13:27:16 +01:00
eaa448ccdd Modificati campi dataCollo da Date a LocalDate in MtbColr e MtbColt 2024-03-26 13:27:05 +01:00
7305bbb207 Modificati campi dataCollo da Date a LocalDate in MtbColr e MtbColt 2024-03-26 13:24:31 +01:00
dfb90e6de0 Merge remote-tracking branch 'origin/develop' into develop 2024-03-26 13:02:20 +01:00
b1b6d7edf1 Aggiunta campo flag_tipologia in vtb_agen_budget 2024-03-26 13:02:13 +01:00
f04f35dffd Merge remote-tracking branch 'origin/develop' into develop 2024-03-26 12:38:00 +01:00
3bf17e5415 Aggiornamento funzione ordify 2024-03-26 12:37:54 +01:00
818297e96d Finish Hotfix-56 2024-03-26 11:25:33 +01:00
1ae61bd48c Merge branch 'master' into develop 2024-03-26 11:25:33 +01:00
0315f9966a Merge remote-tracking branch 'origin/develop' into develop 2024-03-26 11:25:22 +01:00
1e3fb75a4f Fix su sysdate in mtb_colr 2024-03-26 11:25:04 +01:00
e521c73720 IPR 2024-03-26 11:24:38 +01:00
05b7707b39 Modifica servizio importazione sinfoOne scadenze 2024-03-26 09:52:27 +01:00
9d6c742298 Merge remote-tracking branch 'origin/develop' into develop 2024-03-25 15:54:11 +01:00
668d5c42c4 Modificato controllo inserimento subActivity 2024-03-25 15:54:01 +01:00
086bf3dbd2 Merge branch 'master' into develop 2024-03-25 15:03:44 +01:00
b735454d05 Finish Hotfix-56 2024-03-25 15:03:43 +01:00
bedc3edbad aggiunta qta proposta 2024-03-25 15:03:38 +01:00
ee37de67a2 Merge remote-tracking branch 'origin/develop' into develop 2024-03-25 14:41:21 +01:00
d1638842e7 aumentata la dimensione del campo annotazioni 2024-03-25 14:41:18 +01:00
2ed0767515 Merge branch 'master' into develop 2024-03-25 11:59:28 +01:00
3eb61b3aec Finish FixDupListiniVen 2024-03-25 11:59:27 +01:00
e3866a6dcb Fix clonazione listino di vendita 2024-03-25 11:59:19 +01:00
e6074d2b14 Rimossa repo Aspose non utilizzata 2024-03-25 10:49:56 +01:00
dc773b1960 Finish Hotfix-56 2024-03-25 10:04:57 +01:00
96c7df5fff Merge branch 'master' into develop 2024-03-25 10:04:57 +01:00
1f50317d5c aggiornamento menu e tabelle azienda 2024-03-25 10:04:48 +01:00
93d881e8d2 Ripristinato Run Tomcat 2024-03-25 09:41:41 +01:00
6bd3f4ade5 Merge remote-tracking branch 'origin/develop' into develop 2024-03-22 19:18:37 +01:00
a7bfe53d37 Fix nullPoint effectiveDate in inSubActivity 2024-03-22 19:18:28 +01:00
9ba82f6cbe - Aggiunte migration
- Creazione setupuser
2024-03-22 18:17:35 +01:00
1f3e3fbc93 Merge remote-tracking branch 'origin/develop' into develop 2024-03-22 15:27:12 +01:00
20bb73d391 Merge remote-tracking branch 'origin/develop' into develop 2024-03-22 15:10:19 +01:00
354a1b8503 Aggiunto scelta tipo attività in pianificazione 2024-03-22 15:10:00 +01:00
bfadf56470 [ROSSOGARGANO]
aggiunto controller per servizio cambio lotto di produzione
2024-03-22 13:10:00 +01:00
a84a43649b Merge branch 'master' into develop 2024-03-22 10:50:31 +01:00
d48c7c9de1 Finish Hotfix-56 2024-03-22 10:50:30 +01:00
3b83dc0c24 Fix sync 2024-03-22 10:50:23 +01:00
6d43b82170 Merge branch 'master' into develop 2024-03-21 19:12:32 +01:00
c2eaec7d39 Finish Hotfix-56 2024-03-21 19:12:31 +01:00
3383ea3da8 [TOSCA]
Aggiunta migration per inserire data inizio produzione negli stabilimenti
2024-03-21 19:12:24 +01:00
b54027c46f Aggiunto throw exception in fase di salvataggio fatture passive 2024-03-21 18:12:21 +01:00
1668bdbeb8 Merge remote-tracking branch 'origin/develop' into develop 2024-03-21 15:53:48 +01:00
96b9ece8aa Query textiles 2024-03-21 15:53:42 +01:00
d157988850 Finish Hotfix-56 2024-03-21 11:53:55 +01:00
40bda3ce1e Merge branch 'master' into develop 2024-03-21 11:53:55 +01:00
f92d545f80 Aggiunto servizio per ricevere e riservare prossimo numero collo 2024-03-21 11:53:45 +01:00
42d6867be5 Implementata esportazione dati zucchetti 2024-03-21 10:05:13 +01:00
e1cdf4ed93 Merge remote-tracking branch 'origin/develop' into develop 2024-03-21 09:45:26 +01:00
6788447088 Fix importazione dati SinfoOne 2024-03-21 09:44:50 +01:00
3da77518ec modifiche menu' 2024-03-20 17:31:49 +01:00
f800ac1e92 Fix migrations 2024-03-20 12:55:10 +01:00
b6cf51ba08 Finish Hotfix-56 2024-03-20 12:54:50 +01:00
d1f5cfc441 Merge branch 'master' into develop 2024-03-20 12:54:50 +01:00
d701547928 Fix migrations 2024-03-20 12:54:45 +01:00
f7eaa877c8 Merge tag 'Hotfix-55' into develop
Finish Hotfix-55
2024-03-20 12:29:47 +01:00
b2af609989 Finish Hotfix-55 2024-03-20 12:29:46 +01:00
dae51b99e2 Controllo tabella vuota migration_status e modifica campo numero a 40 caratteri 2024-03-20 12:29:30 +01:00
3906f03b21 Controllo tabella vuota migration_status e modifica campo numero a 40 caratteri 2024-03-20 12:29:13 +01:00
5aa90e3533 Merge tag 'Hotfix-54' into develop
Finish Hotfix-54
2024-03-20 12:00:37 +01:00
198d03d9ec Finish Hotfix-54 2024-03-20 12:00:37 +01:00
1b205afa5d Aumentata lunghezza campo numero della dtb_fatture_passive_ddt a 40 caratteri 2024-03-20 12:00:21 +01:00
fcf939a4c8 Merge remote-tracking branch 'origin/develop' into develop 2024-03-20 11:47:06 +01:00
f65b8d732f Gestione scarico materiali opzionali 2024-03-20 11:46:58 +01:00
cfaddcd249 Menu 2024-03-20 10:24:39 +01:00
9747759e32 Merge branch 'master' into develop 2024-03-19 16:02:35 +01:00
575b7bf1a6 Finish Hotfix-54 2024-03-19 16:02:35 +01:00
24c4344ac3 Fix su import from parent identity 2024-03-19 16:02:30 +01:00
04ab30e4ae Merge remote-tracking branch 'origin/develop' into develop 2024-03-19 15:44:52 +01:00
20494a5621 Creata procedura di importazione dati SinfoOne 2024-03-19 15:44:48 +01:00
e7fee71255 Merge tag 'Hotfix-53' into develop
Finish Hotfix-53
2024-03-19 11:59:43 +01:00
89c2113d96 Finish Hotfix-53 2024-03-19 11:59:43 +01:00
bdc2230d17 Sistemato problema aliquota iva su kit vendita 2024-03-19 11:59:24 +01:00
515fcf1ee7 Gestita duplicazione listino di vendita 2024-03-18 18:15:34 +01:00
1c6f629b24 Fix codifica menu JSON 2024-03-18 13:36:33 +01:00
c0fbbd854a Rimossa dipendenza duplicata maven 2024-03-18 13:30:14 +01:00
4eb2235351 Implementato servizio di generazione del JSON del menù 2024-03-18 13:10:50 +01:00
902bde4637 aggiunto controllo resi sui kit, modificata query per i menu 2024-03-15 18:16:37 +01:00
1e2ac8ab13 Fix in BaseMigration 2024-03-15 13:28:21 +01:00
c637c776af Finish Biolevante_MRP_FiltroDescrizioneEstesa 2024-03-15 13:03:27 +01:00
b48e2ee6c9 [MRP V2]
- Nel campo "articolo" utilizzato nella ricerca da MRP, se presente viene utilizzata la descrizione estesa, altrimenti la descrizione
2024-03-15 13:03:20 +01:00
20558ddfb1 Finish Carelli_Inventari_ModificaDataOraInv 2024-03-15 12:58:13 +01:00
8d5428dc16 [Inventari]
- Aggiunto nella query data_ora_inv necessaria per abilitare la modifica su PVM
- Aggiunto DataOraInv al RowInventarioDTO
2024-03-15 12:57:58 +01:00
74adf88692 Merge remote-tracking branch 'origin/develop' into develop 2024-03-15 12:43:09 +01:00
a7a492b050 Fix calcolo pedane in arrivo in retrieveArtsInGiacenzaByPositions 2024-03-15 12:42:50 +01:00
110c61e4aa Importazione Rosso Gargano, importazione listini di Apulia 2024-03-15 10:51:43 +01:00
b6b5b5eaae Merge remote-tracking branch 'origin/develop' into develop 2024-03-15 10:25:16 +01:00
9708b36438 disabilitato download anagrafiche 2024-03-15 10:25:12 +01:00
9e7b299a09 Fix deserializzazione WtbJreptSetup, rimozione utilityImage ed aggiornamento utility 2024-03-14 17:17:06 +01:00
8de9774813 Merge remote-tracking branch 'origin/develop' into develop 2024-03-14 16:52:20 +01:00
4113f57a3d sistemata stb_gest_setup 2024-03-14 16:52:12 +01:00
7bf6f0d0c2 Rinominata classe StbDevice in StbDevices 2024-03-14 16:22:34 +01:00
7d9c2822e8 Completato sistema di creazione automatica entity da DB 2024-03-14 16:22:08 +01:00
5c166b72c2 eliminato controllo su debug 2024-03-14 14:04:12 +01:00
d8c154ce19 Aggiunta nuova setup 2024-03-14 14:03:59 +01:00
dd4e274579 Inserito valore default su stbGEstsetup 2024-03-14 14:03:39 +01:00
e29b5cb005 Merge branch 'master' into develop 2024-03-14 13:22:00 +01:00
f117350095 Finish Hotfix-53 2024-03-14 13:21:59 +01:00
e592e3e071 Fix sul salvataggio dei blob in EntityBase 2024-03-14 13:21:43 +01:00
cc4f3eb826 Merge remote-tracking branch 'origin/develop' into develop 2024-03-14 13:21:03 +01:00
3fc0f5dcc6 Implementato sistema di generazione Entity 2024-03-14 13:20:54 +01:00
636653be5b Aggiunta query per estrarre stato artivolo in retrieveArtsInGiacenzaByPositions 2024-03-14 13:02:09 +01:00
a48ff9a4fe Rimossi checkPreSave vuoti dalle entity 2024-03-13 18:22:07 +01:00
67e49df1c7 Migliorie in BaseMigration 2024-03-13 17:51:28 +01:00
155adef231 Aggiunto campo flag_multi_value in setup per setup con array di valori 2024-03-13 17:25:18 +01:00
d8df7edaa3 Migliorie in BaseMigration 2024-03-13 17:18:05 +01:00
66612aae14 cambiato filtro data 2024-03-13 16:36:25 +01:00
66f82f5dfa Importazione rosso gargano e varie modifiche a registrazione movimenti contabilit 2024-03-13 16:35:47 +01:00
9ab03280b3 Merge remote-tracking branch 'origin/develop' into develop 2024-03-13 16:35:08 +01:00
238927a736 ctbPagheIntercode 2024-03-13 16:35:01 +01:00
e4efb0d485 Renaming 2024-03-13 15:59:50 +01:00
a506023585 Implementati metodi isWingest / isTextiles in BaseMigration 2024-03-13 15:56:15 +01:00
ac14569c1d ctbPagheIntercode 2024-03-13 15:42:21 +01:00
25511f25b1 Finish Hotfix-53 2024-03-13 15:37:11 +01:00
d169443340 Merge branch 'master' into develop 2024-03-13 15:37:11 +01:00
9c3cdf5a7c Fix su import from parent delle entity 2024-03-13 15:36:57 +01:00
067058190e Merge branch 'master' into develop 2024-03-13 15:14:02 +01:00
a2ec93afb3 Finish Hotfix-53 2024-03-13 15:14:01 +01:00
251a2d3239 sistemato controllo su qta_acquistata nei resi 2024-03-13 15:13:55 +01:00
63cde0d928 Fix sync 2024-03-13 13:27:42 +01:00
821b4a8260 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	ems-core/src/main/java/it/integry/ems/dynamic_cache/DynamicCacheService.java
#	ems-core/src/main/java/it/integry/ems/sync/SyncManager.java
2024-03-13 13:21:57 +01:00
0b7d0cd4b0 Refactoring + Caching in sincronizzazioni online 2024-03-13 13:21:30 +01:00
859a61621b Refactoring + Caching in sincronizzazioni online 2024-03-13 13:20:23 +01:00
0a7191267b Merge remote-tracking branch 'origin/develop' into develop 2024-03-13 11:05:36 +01:00
fc1477979b Aggiunto AvailableClassMercDTO in OrdiniDiLavorazione 2024-03-13 11:05:32 +01:00
d3e66e3743 Merge branch 'master' into develop 2024-03-12 18:49:45 +01:00
1a62062356 Finish Hotfix-53 2024-03-12 18:49:44 +01:00
a67b0ad517 ottimizzazione importazione listini apulia 2024-03-12 18:49:10 +01:00
9f695f742d Merge branch 'master' into develop 2024-03-12 18:42:02 +01:00
b54dfcefdb Finish Hotfix-53 2024-03-12 18:42:01 +01:00
0b3ff4bd05 Fix su salvataggio Date nelle Entity 2024-03-12 18:41:55 +01:00
fa59da6630 Merge remote-tracking branch 'origin/develop' into develop 2024-03-12 18:10:35 +01:00
65c31627e7 Fix su vista che restituisce gli stati macchina 2024-03-12 18:10:28 +01:00
77a8827fbe Aggiunto metodo retrievePartitaMag 2024-03-12 16:42:13 +01:00
7a9eef46b1 Merge branch 'master' into develop 2024-03-12 15:29:18 +01:00
561f26f795 Finish Hotfix-53 2024-03-12 15:29:17 +01:00
f989812bfd Divise le righe in gruppi 2024-03-12 15:29:06 +01:00
831b1b38b9 Merge branch 'master' into develop 2024-03-12 15:20:45 +01:00
8af9d93cff Finish Hotfix-53 2024-03-12 15:20:45 +01:00
9c906bdd17 Divise le righe in gruppi 2024-03-12 15:20:26 +01:00
afb53e4f63 Merge tag 'Follies_OrdiniWebOrdikids_NazioneNullAlert' into develop
Finish Follies_OrdiniWebOrdikids_NazioneNullAlert
2024-03-12 13:09:09 +01:00
6e784624dd Finish Follies_OrdiniWebOrdikids_NazioneNullAlert 2024-03-12 13:09:08 +01:00
9523fde5fc - Aggiunto alert per nazione nulla 2024-03-12 13:09:01 +01:00
390be5333c Merge branch 'master' into develop 2024-03-12 12:35:45 +01:00
eb1e3c5efc Finish Hotfix-53 2024-03-12 12:35:44 +01:00
8753f6c84a Fare in modo che la procedura di importazione dei listini di apulia committi ogni listino salvato 2024-03-12 12:35:37 +01:00
848973c168 Implementati customer di Integry.
Migliorati metodi in BaseMigration.
2024-03-12 12:21:52 +01:00
954b3ed43d Merge branch 'master' into develop 2024-03-12 12:00:00 +01:00
ccd705d863 Finish Hotfix-53 2024-03-12 11:59:59 +01:00
d805ed379b Corretti JsonIgnore in EntityBase per problemi su SUBSTITUTE 2024-03-12 11:59:51 +01:00
9c68fe0eaf Merge branch 'master' into develop 2024-03-11 19:13:47 +01:00
12e05c60d1 Finish Hotfix-53 2024-03-11 19:13:46 +01:00
548d9d17a1 Rimossi campi da non serializzare nel json 2024-03-11 19:13:41 +01:00
fdb9bd07f8 Merge branch 'master' into develop 2024-03-11 18:15:53 +01:00
5a803989c5 Finish Hotfix-53 2024-03-11 18:15:53 +01:00
315c45a938 Fix password 2024-03-11 18:15:48 +01:00
376ecf5161 Merge branch 'master' into develop 2024-03-11 18:00:54 +01:00
95d0d0cf63 Finish Hotfix-53 2024-03-11 18:00:53 +01:00
6826110fa0 Aggiunta password default per backend servizi 2024-03-11 18:00:46 +01:00
2ac011c47c Merge branch 'master' into develop 2024-03-11 17:49:36 +01:00
09be88a375 Finish Hotfix-53 2024-03-11 17:49:36 +01:00
edafed5d4e modificata la creazione del resultset 2024-03-11 17:49:29 +01:00
e2029ede7a Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	ems-engine/src/main/java/it/integry/ems/system/controller/SystemMigrationController.java
2024-03-11 16:25:17 +01:00
13301ae17f Migliorati controlli per creazione query update 2024-03-11 16:24:51 +01:00
ef3e117632 Migliorati controlli per creazione query update 2024-03-11 16:24:31 +01:00
708962fb1d Merge remote-tracking branch 'origin/develop' into develop 2024-03-11 16:15:51 +01:00
1d59b05dc8 Fix encoding su creazione migration per viste, funzioni, trigger, procedure 2024-03-11 16:15:43 +01:00
5addd95c75 modificata condizione per invio dati dall'autofattura 2024-03-11 15:44:10 +01:00
995455e12c Implementato sistema di auto creazione delle migration per Viste, Funzioni, Procedure e Trigger 2024-03-11 13:21:49 +01:00
218ba0eee9 WMS 2024-03-11 10:01:20 +01:00
1183 changed files with 37087 additions and 24313 deletions

117
.gitignore vendored
View File

@@ -1,39 +1,60 @@
# Created by https://www.gitignore.io/api/intellij
# Created by https://www.toptal.com/developers/gitignore/api/intellij
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij
### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.shelf/*
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# AWS User-specific
.idea/**/aws.xml
# Gradle:
.idea/gradle.xml
.idea/libraries
# Generated files
.idea/**/contentModel.xml
# Mongo Explorer plugin:
.idea/mongoSettings.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
## File-based project format:
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
## Plugin-specific files:
# IntelliJ
/out/
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
@@ -41,20 +62,62 @@
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
*.iml
modules.xml
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/
# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml
# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/
# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$
# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml
# End of https://www.toptal.com/developers/gitignore/api/intellij
# Integry
*/target/*
*.ckie
/ts
/temp

17
.idea/compiler.xml generated
View File

@@ -6,24 +6,9 @@
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="ems-core" />
<module name="ems-engine" />
<module name="ems-core" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="ems-activity" target="1.8" />
<module name="ems-contabil" target="1.8" />
<module name="ems-document" target="1.8" />
<module name="ems-engine-customizations" target="1.8" />
<module name="ems-logistic" target="1.8" />
<module name="ems-offer" target="1.8" />
<module name="ems-order" target="1.8" />
<module name="ems-ordikids" target="1.8" />
<module name="ems-product" target="1.8" />
<module name="ems-production" target="1.8" />
<module name="ems-retail" target="1.8" />
<module name="ems-system" target="1.8" />
<module name="ems-utility" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>

26
.idea/encodings.xml generated
View File

@@ -1,36 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/ems-activity/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-activity/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-contabil/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-contabil/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-core/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-core/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-document/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-document/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-engine-customizations/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-engine-customizations/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-engine/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-engine/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-logistic/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-logistic/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-offer/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-offer/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-order/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-order/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-ordikids/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-ordikids/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-product/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-product/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-production/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-production/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-retail/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-retail/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-system/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-system/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-utility/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/ems-utility/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>

8
.idea/file.template.settings.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExportableFileTemplateSettings">
<default_templates>
<template name="IntegryMigrationClass.java" file-name="Migration_${YEAR}${MONTH}${DAY}${HOUR}${MINUTE}${SECOND}" reformat="true" live-template-enabled="false" />
</default_templates>
</component>
</project>

15
.idea/git_toolbox_prj.xml generated Normal file
View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxProjectSettings">
<option name="commitMessageIssueKeyValidationOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
<option name="commitMessageValidationEnabledOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
</component>
</project>

View File

@@ -1,8 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="AutoCloseableResource" enabled="true" level="WARNING" enabled_by_default="true">
<option name="METHOD_MATCHER_CONFIG" value="java.util.Formatter,format,java.io.Writer,append,com.google.common.base.Preconditions,checkNotNull,org.hibernate.Session,close,java.io.PrintWriter,printf,java.io.PrintStream,printf,org.apache.http.impl.client.HttpClientBuilder,build,org.apache.http.impl.client.HttpClients,createDefault,com.annimon.stream.Stream,of" />
</inspection_tool>
</profile>
</component>

View File

@@ -1,31 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="repo-sqlserver" />
<option name="name" value="repo-sqlserver" />
<option name="url" value="http://maven.lib.umd.edu/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central-http" />
<option name="name" value="central-http" />
<option name="url" value="http://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="AsposeJavaAPI" />
<option name="name" value="Aspose Java API" />
<option name="url" value="https://releases.aspose.com/java/repo/" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />

6
.idea/jenkinsSettings.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Jenkins.Application.Settings">
<option name="serverUrl" value="https://ci.studioml.it" />
</component>
</project>

4
.idea/misc.xml generated
View File

@@ -7,7 +7,9 @@
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
<option name="workspaceImportForciblyTurnedOn" value="true" />
</component>
<component name="PWA">
<option name="wasEnabledAtLeastOnce" value="true" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>

View File

@@ -0,0 +1,15 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MenuStaticCreator" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="it.integry.ems.menu.MenuStaticCreator" />
<module name="ems-core" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="it.integry.ems.menu.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>

107
.idea/runConfigurations/Tomcat.xml generated Normal file
View File

@@ -0,0 +1,107 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat" ALTERNATIVE_JRE_ENABLED="false" ALTERNATIVE_JRE_PATH="1.8" nameIsGenerated="true">
<option name="COMMON_VM_ARGUMENTS" value="-Xms512m -Xmx2048m" />
<deployment>
<artifact name="ems-engine:war exploded">
<settings>
<option name="CONTEXT_PATH" value="/ems-api" />
</settings>
</artifact>
</deployment>
<server-settings>
<option name="BASE_DIRECTORY_NAME" value="a89fc2ca-88f5-402a-95b3-33bd03a9c1ac" />
</server-settings>
<log_file alias="Tomcat Manager Log" path="%IDEA_RUN:CATALINA_BASE%/logs/manager.*" />
<log_file alias="Tomcat Host Manager Log" path="%IDEA_RUN:CATALINA_BASE%/logs/host-manager.*" />
<log_file alias="Tomcat Localhost Access Log" path="%IDEA_RUN:CATALINA_BASE%/logs/localhost_access_log.*" />
<predefined_log_file enabled="true" id="Tomcat" />
<predefined_log_file enabled="true" id="Tomcat Catalina" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="javadebug" />
</RunnerSettings>
<RunnerSettings RunnerId="JProfiler">
<option name="jreHome" value="$USER_HOME$/.jdks/openjdk-21.0.2" />
</RunnerSettings>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="JProfiler">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Profile">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<method v="2">
<option name="Make" enabled="true" />
<option name="BuildArtifacts" enabled="true">
<artifact name="ems-engine:war exploded" />
</option>
</method>
</configuration>
</component>

View File

@@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat 9 #1 (ServerDev)" type="Remote">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="serverdev" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

View File

@@ -0,0 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat 9 #2 (ServerDev)" type="Remote">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="serverdev" />
<option name="PORT" value="8002" />
<option name="AUTO_RESTART" value="false" />
<method v="2" />
</configuration>
</component>

View File

@@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat #1 (ServerTomcat)" type="Remote">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="localhost" />
<option name="PORT" value="8000" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8000" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>

107
.idea/runConfigurations/Tomcat__FAST_.xml generated Normal file
View File

@@ -0,0 +1,107 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Tomcat (FAST)" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat" ALTERNATIVE_JRE_ENABLED="false">
<option name="COMMON_VM_ARGUMENTS" value="-DDISABLE_DROOLS_COMPILE=TRUE -Xms6G -Xmx6G -XX:MaxPermSize=1G -XX:PermSize=512M" />
<deployment>
<artifact name="ems-engine:war exploded">
<settings>
<option name="CONTEXT_PATH" value="/ems-api" />
</settings>
</artifact>
</deployment>
<server-settings>
<option name="BASE_DIRECTORY_NAME" value="00c7852d-22fb-44e1-9140-8ae73b4192fd" />
</server-settings>
<log_file alias="Tomcat Manager Log" path="%IDEA_RUN:CATALINA_BASE%/logs/manager.*" />
<log_file alias="Tomcat Host Manager Log" path="%IDEA_RUN:CATALINA_BASE%/logs/host-manager.*" />
<log_file alias="Tomcat Localhost Access Log" path="%IDEA_RUN:CATALINA_BASE%/logs/localhost_access_log.*" />
<predefined_log_file enabled="true" id="Tomcat" />
<predefined_log_file enabled="true" id="Tomcat Catalina" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="javadebug" />
</RunnerSettings>
<RunnerSettings RunnerId="JProfiler">
<option name="jreHome" value="$PROJECT_DIR$/../../../Program Files/Java/jdk1.8.0_202" />
</RunnerSettings>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="JProfiler">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Profile">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<method v="2">
<option name="Make" enabled="true" />
<option name="BuildArtifacts" enabled="true">
<artifact name="ems-engine:war exploded" />
</option>
</method>
</configuration>
</component>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@@ -28,6 +28,42 @@
<element id="module-output" name="ems-engine" />
</element>
<element id="directory" name="lib">
<element id="library" level="project" name="Maven: it.integry.ims:ems-retail:1.0" />
<element id="archive" name="ems-logistic-1.0.jar">
<element id="module-output" name="ems-logistic" />
</element>
<element id="library" level="project" name="Maven: commons-codec:commons-codec:1.6" />
<element id="library" level="project" name="Maven: com.ancientprogramming.fixedformat4j:fixedformat4j:1.4.0" />
<element id="archive" name="ems-document-1.0.jar">
<element id="module-output" name="ems-document" />
</element>
<element id="library" level="project" name="Maven: xalan:xalan:2.7.2" />
<element id="library" level="project" name="Maven: xalan:serializer:2.7.2" />
<element id="library" level="project" name="Maven: org.apache.axis:axis:1.4" />
<element id="library" level="project" name="Maven: javax.xml.rpc:javax.xml.rpc-api:1.1.1" />
<element id="library" level="project" name="Maven: commons-discovery:commons-discovery:0.2" />
<element id="library" level="project" name="Maven: commons-logging:commons-logging:1.2" />
<element id="library" level="project" name="Maven: javax.xml.soap:saaj-api:1.3.5" />
<element id="library" level="project" name="Maven: wsdl4j:wsdl4j:1.6.3" />
<element id="archive" name="ems-offer-1.0.jar">
<element id="module-output" name="ems-offer" />
</element>
<element id="library" level="project" name="Maven: javax.mail:mail:1.4.7" />
<element id="library" level="project" name="Maven: org.apache.pdfbox:pdfbox:2.0.22" />
<element id="library" level="project" name="Maven: org.apache.pdfbox:fontbox:2.0.22" />
<element id="library" level="project" name="Maven: com.amazonservices.mws:MWSOrders_2013-09-01:1.0" />
<element id="library" level="project" name="Maven: com.amazonservices.mws:MaWSJavaClientLibrary:1.1" />
<element id="library" level="project" name="Maven: com.amazonservices.mws:MWSClientJavaRuntime:1.1" />
<element id="library" level="project" name="Maven: org.springframework:spring-context-support:4.2.5.RELEASE" />
<element id="archive" name="ems-order-1.0.jar">
<element id="module-output" name="ems-order" />
</element>
<element id="library" level="project" name="Maven: it.integry.ims:ems-product:1.0" />
<element id="library" level="project" name="Maven: it.integry.ims:ems-production:1.0" />
<element id="library" level="project" name="Maven: it.integry.ims:ems-system:1.0" />
<element id="archive" name="ems-contabil-1.0.jar">
<element id="module-output" name="ems-contabil" />
</element>
<element id="archive" name="ems-core-1.0.jar">
<element id="module-output" name="ems-core" />
</element>
@@ -47,7 +83,6 @@
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpcore-nio:4.3.2" />
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpmime:4.3.6" />
<element id="library" level="project" name="Maven: org.json:json:20200518" />
<element id="library" level="project" name="Maven: javax.mail:mail:1.4.7" />
<element id="library" level="project" name="Maven: net.sf.jasperreports:jasperreports:6.16.0" />
<element id="library" level="project" name="Maven: commons-digester:commons-digester:2.1" />
<element id="library" level="project" name="Maven: org.apache.commons:commons-collections4:4.2" />
@@ -63,7 +98,6 @@
<element id="library" level="project" name="Maven: net.sf.jasperreports:jasperreports-fonts:6.16.0" />
<element id="library" level="project" name="Maven: net.sf.jasperreports:jasperreports-functions:6.16.0" />
<element id="library" level="project" name="Maven: joda-time:joda-time:2.9.9" />
<element id="library" level="project" name="Maven: it.integry.font:Arial:1.0" />
<element id="library" level="project" name="Maven: it.integry.font:ArialBlack:1.0" />
<element id="library" level="project" name="Maven: it.integry.font:ArialNarrow:1.0" />
<element id="library" level="project" name="Maven: it.integry.font:Calibri:1.0" />
@@ -73,8 +107,6 @@
<element id="library" level="project" name="Maven: org.apache.xmlgraphics:batik-bridge:1.9" />
<element id="library" level="project" name="Maven: org.apache.xmlgraphics:batik-anim:1.9" />
<element id="library" level="project" name="Maven: org.apache.xmlgraphics:batik-script:1.9" />
<element id="library" level="project" name="Maven: xalan:xalan:2.7.2" />
<element id="library" level="project" name="Maven: xalan:serializer:2.7.2" />
<element id="library" level="project" name="Maven: xml-apis:xml-apis:1.3.04" />
<element id="library" level="project" name="Maven: xml-apis:xml-apis-ext:1.3.04" />
<element id="library" level="project" name="Maven: org.apache.xmlgraphics:batik-css:1.9" />
@@ -103,14 +135,9 @@
<element id="library" level="project" name="Maven: it.integry:utility-barcode:1.1" />
<element id="library" level="project" name="Maven: it.integry:utilityImage:1.0" />
<element id="library" level="project" name="Maven: it.integry:Utility:1.4" />
<element id="library" level="project" name="Maven: org.apache.pdfbox:pdfbox:2.0.22" />
<element id="library" level="project" name="Maven: org.apache.pdfbox:fontbox:2.0.22" />
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.4" />
<element id="library" level="project" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.4" />
<element id="library" level="project" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.9.4" />
<element id="library" level="project" name="Maven: com.alibaba:fastjson:2.0.47" />
<element id="library" level="project" name="Maven: com.alibaba.fastjson2:fastjson2-extension:2.0.47" />
<element id="library" level="project" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.47" />
<element id="library" level="project" name="Maven: org.springframework:spring-aop:4.2.5.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-core:4.2.5.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-instrument-tomcat:4.2.5.RELEASE" />
@@ -118,7 +145,6 @@
<element id="library" level="project" name="Maven: org.springframework:spring-orm:4.2.5.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-jdbc:4.2.5.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-tx:4.2.5.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-context-support:4.2.5.RELEASE" />
<element id="library" level="project" name="Maven: org.drools:drools-compiler:6.4.0.Final" />
<element id="library" level="project" name="Maven: org.kie:kie-api:6.4.0.Final" />
<element id="library" level="project" name="Maven: org.kie:kie-internal:6.4.0.Final" />
@@ -244,6 +270,14 @@
<element id="library" level="project" name="Maven: com.hierynomus:sshj:0.27.0" />
<element id="library" level="project" name="Maven: com.jcraft:jzlib:1.1.3" />
<element id="library" level="project" name="Maven: net.i2p.crypto:eddsa:0.2.0" />
<element id="library" level="project" name="Maven: it.integry.ims:ems-ordikids:1.0" />
<element id="library" level="project" name="Maven: it.integry.ims:ems-utility:1.0" />
<element id="archive" name="ems-activity-1.0.jar">
<element id="module-output" name="ems-activity" />
</element>
<element id="archive" name="ems-engine-customizations-1.0.jar">
<element id="module-output" name="ems-engine-customizations" />
</element>
<element id="library" level="project" name="Maven: commons-net:commons-net:3.5" />
<element id="library" level="project" name="Maven: com.thetransactioncompany:cors-filter:2.5" />
<element id="library" level="project" name="Maven: com.thetransactioncompany:java-property-utils:1.9.1" />
@@ -260,8 +294,6 @@
<element id="library" level="project" name="Maven: com.google.code.gson:gson:2.9.1" />
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpclient:4.3.6" />
<element id="library" level="project" name="Maven: org.apache.httpcomponents:httpcore:4.3.3" />
<element id="library" level="project" name="Maven: commons-logging:commons-logging:1.1.3" />
<element id="library" level="project" name="Maven: commons-codec:commons-codec:1.6" />
<element id="library" level="project" name="Maven: org.jboss.resteasy:resteasy-jaxrs:3.0.12.Final" />
<element id="library" level="project" name="Maven: org.jboss.resteasy:jaxrs-api:3.0.12.Final" />
<element id="library" level="project" name="Maven: org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:1.0.1.Final" />
@@ -279,10 +311,6 @@
<element id="library" level="project" name="Maven: org.springframework:spring-web:4.2.5.RELEASE" />
<element id="library" level="project" name="Maven: org.springframework:spring-webmvc:4.2.5.RELEASE" />
<element id="library" level="project" name="Maven: javax:javaee-web-api:7.0" />
<element id="library" level="project" name="Maven: com.amazonservices.mws:MWSOrders_2013-09-01:1.0" />
<element id="library" level="project" name="Maven: com.amazonservices.mws:MaWSJavaClientLibrary:1.1" />
<element id="library" level="project" name="Maven: com.amazonservices.mws:MWSClientJavaRuntime:1.1" />
<element id="library" level="project" name="Maven: com.ancientprogramming.fixedformat4j:fixedformat4j:1.4.0" />
</element>
</element>
<element id="directory" name="META-INF">
@@ -298,9 +326,22 @@
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="ems-engine" />
<module name="ems-order" />
<module name="ems-core" />
<module name="ems-document" />
<module name="ems-engine-customizations" />
<module name="ems-system" />
<module name="ems-logistic" />
<module name="ems-product" />
<module name="ems-retail" />
<module name="ems-engine" />
<module name="ems-contabil" />
<module name="ems-utility" />
<module name="ems-ordikids" />
<module name="ems-activity" />
<module name="ems-offer" />
<module name="ems-calendar" />
<module name="ems-production" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
@@ -412,9 +453,6 @@
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Annotator" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AutoCloseableResource" enabled="true" level="WARNING" enabled_by_default="true">
<option name="METHOD_MATCHER_CONFIG" value="java.util.Formatter,format,java.io.Writer,append,com.google.common.base.Preconditions,checkNotNull,org.hibernate.Session,close,java.io.PrintWriter,printf,java.io.PrintStream,printf,com.annimon.stream.Stream,of" />
</inspection_tool>
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<Languages>
<language minSize="53" name="Java" />
@@ -475,61 +513,61 @@
<injection language="SpEL" injector-id="java">
<display-name>Spring @Cacheable and @CacheEvict</display-name>
<single-file value="true" />
<place><![CDATA[psiMethod().withName("condition").withParameters().definedInClass("org.springframework.cache.annotation.CacheEvict")]]></place>
<place><![CDATA[psiMethod().withName("condition").withParameters().definedInClass("org.springframework.cache.annotation.CachePut")]]></place>
<place><![CDATA[psiMethod().withName("condition").withParameters().definedInClass("org.springframework.cache.annotation.Cacheable")]]></place>
<place><![CDATA[psiMethod().withName("key").withParameters().definedInClass("org.springframework.cache.annotation.CacheEvict")]]></place>
<place><![CDATA[psiMethod().withName("key").withParameters().definedInClass("org.springframework.cache.annotation.CachePut")]]></place>
<place><![CDATA[psiMethod().withName("key").withParameters().definedInClass("org.springframework.cache.annotation.Cacheable")]]></place>
<place><![CDATA[psiMethod().withName("unless").withParameters().definedInClass("org.springframework.cache.annotation.CachePut")]]></place>
<place><![CDATA[psiMethod().withName("unless").withParameters().definedInClass("org.springframework.cache.annotation.Cacheable")]]></place>
<place>psiMethod().withName(&quot;condition&quot;).withParameters().definedInClass(&quot;org.springframework.cache.annotation.CacheEvict&quot;)</place>
<place>psiMethod().withName(&quot;condition&quot;).withParameters().definedInClass(&quot;org.springframework.cache.annotation.CachePut&quot;)</place>
<place>psiMethod().withName(&quot;condition&quot;).withParameters().definedInClass(&quot;org.springframework.cache.annotation.Cacheable&quot;)</place>
<place>psiMethod().withName(&quot;key&quot;).withParameters().definedInClass(&quot;org.springframework.cache.annotation.CacheEvict&quot;)</place>
<place>psiMethod().withName(&quot;key&quot;).withParameters().definedInClass(&quot;org.springframework.cache.annotation.CachePut&quot;)</place>
<place>psiMethod().withName(&quot;key&quot;).withParameters().definedInClass(&quot;org.springframework.cache.annotation.Cacheable&quot;)</place>
<place>psiMethod().withName(&quot;unless&quot;).withParameters().definedInClass(&quot;org.springframework.cache.annotation.CachePut&quot;)</place>
<place>psiMethod().withName(&quot;unless&quot;).withParameters().definedInClass(&quot;org.springframework.cache.annotation.Cacheable&quot;)</place>
</injection>
<injection language="http-header-reference" injector-id="java">
<display-name>Spring HttpHeaders (org.springframework.http)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("header").definedInClass("org.springframework.http.ResponseEntity.HeadersBuilder"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("header").definedInClass("org.springframework.web.servlet.function.ServerResponse.HeadersBuilder"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("set", "add", "addAll", "getFirst", "containsKey", "get", "put", "getFirstDate", "setDate", "setInstant", "setZonedDateTime").definedInClass("org.springframework.http.HttpHeaders"))]]></place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;header&quot;).definedInClass(&quot;org.springframework.http.ResponseEntity.HeadersBuilder&quot;))</place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;header&quot;).definedInClass(&quot;org.springframework.web.servlet.function.ServerResponse.HeadersBuilder&quot;))</place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;set&quot;, &quot;add&quot;, &quot;addAll&quot;, &quot;getFirst&quot;, &quot;containsKey&quot;, &quot;get&quot;, &quot;put&quot;, &quot;getFirstDate&quot;, &quot;setDate&quot;, &quot;setInstant&quot;, &quot;setZonedDateTime&quot;).definedInClass(&quot;org.springframework.http.HttpHeaders&quot;))</place>
</injection>
<injection language="SpEL" injector-id="java">
<display-name>Spring Integration/Messaging</display-name>
<single-file value="true" />
<place><![CDATA[psiMethod().withName("expression").withParameters().definedInClass("org.springframework.messaging.handler.annotation.Payload")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.integration.annotation.Payload")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.messaging.handler.annotation.Payload")]]></place>
<place>psiMethod().withName(&quot;expression&quot;).withParameters().definedInClass(&quot;org.springframework.messaging.handler.annotation.Payload&quot;)</place>
<place>psiMethod().withName(&quot;value&quot;).withParameters().definedInClass(&quot;org.springframework.integration.annotation.Payload&quot;)</place>
<place>psiMethod().withName(&quot;value&quot;).withParameters().definedInClass(&quot;org.springframework.messaging.handler.annotation.Payload&quot;)</place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>Spring JDBC (org.springframework.jdbc.core.PreparedStatementCreatorFactory)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("PreparedStatementCreatorFactory").withParameters("java.lang.String").definedInClass("org.springframework.jdbc.core.PreparedStatementCreatorFactory"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("PreparedStatementCreatorFactory").withParameters("java.lang.String", "int[]").definedInClass("org.springframework.jdbc.core.PreparedStatementCreatorFactory"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("PreparedStatementCreatorFactory").withParameters("java.lang.String", "java.util.List").definedInClass("org.springframework.jdbc.core.PreparedStatementCreatorFactory"))]]></place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;PreparedStatementCreatorFactory&quot;).withParameters(&quot;java.lang.String&quot;).definedInClass(&quot;org.springframework.jdbc.core.PreparedStatementCreatorFactory&quot;))</place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;PreparedStatementCreatorFactory&quot;).withParameters(&quot;java.lang.String&quot;, &quot;int[]&quot;).definedInClass(&quot;org.springframework.jdbc.core.PreparedStatementCreatorFactory&quot;))</place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;PreparedStatementCreatorFactory&quot;).withParameters(&quot;java.lang.String&quot;, &quot;java.util.List&quot;).definedInClass(&quot;org.springframework.jdbc.core.PreparedStatementCreatorFactory&quot;))</place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>Spring JDBC (org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createCustomException").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException", "java.lang.Class").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("customTranslate").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("doTranslate").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("logTranslation").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException", "boolean").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))]]></place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;createCustomException&quot;).withParameters(&quot;java.lang.String&quot;, &quot;java.lang.String&quot;, &quot;java.sql.SQLException&quot;, &quot;java.lang.Class&quot;).definedInClass(&quot;org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator&quot;))</place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;customTranslate&quot;).withParameters(&quot;java.lang.String&quot;, &quot;java.lang.String&quot;, &quot;java.sql.SQLException&quot;).definedInClass(&quot;org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator&quot;))</place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;doTranslate&quot;).withParameters(&quot;java.lang.String&quot;, &quot;java.lang.String&quot;, &quot;java.sql.SQLException&quot;).definedInClass(&quot;org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator&quot;))</place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;logTranslation&quot;).withParameters(&quot;java.lang.String&quot;, &quot;java.lang.String&quot;, &quot;java.sql.SQLException&quot;, &quot;boolean&quot;).definedInClass(&quot;org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator&quot;))</place>
</injection>
<injection language="SpEL" injector-id="java">
<display-name>Spring Security @PostAuthorize/@PostFilter/@PreAuthorize/@PreFilter/@AuthenticationPrincipal</display-name>
<single-file value="true" />
<place><![CDATA[psiMethod().withName("expression").withParameters().definedInClass("org.springframework.security.core.annotation.AuthenticationPrincipal")]]></place>
<place><![CDATA[psiMethod().withName("expression").withParameters().definedInClass("org.springframework.security.core.annotation.CurrentSecurityContext")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PostAuthorize")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PostFilter")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PreAuthorize")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PreFilter")]]></place>
<place>psiMethod().withName(&quot;expression&quot;).withParameters().definedInClass(&quot;org.springframework.security.core.annotation.AuthenticationPrincipal&quot;)</place>
<place>psiMethod().withName(&quot;expression&quot;).withParameters().definedInClass(&quot;org.springframework.security.core.annotation.CurrentSecurityContext&quot;)</place>
<place>psiMethod().withName(&quot;value&quot;).withParameters().definedInClass(&quot;org.springframework.security.access.prepost.PostAuthorize&quot;)</place>
<place>psiMethod().withName(&quot;value&quot;).withParameters().definedInClass(&quot;org.springframework.security.access.prepost.PostFilter&quot;)</place>
<place>psiMethod().withName(&quot;value&quot;).withParameters().definedInClass(&quot;org.springframework.security.access.prepost.PreAuthorize&quot;)</place>
<place>psiMethod().withName(&quot;value&quot;).withParameters().definedInClass(&quot;org.springframework.security.access.prepost.PreFilter&quot;)</place>
</injection>
<injection language="SpEL" injector-id="java">
<display-name>Spring State Machine</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("event").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.SecurityConfigurer"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("guardExpression").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.TransitionConfigurer"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("secured").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.TransitionConfigurer"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("transition").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.SecurityConfigurer"))]]></place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;event&quot;).withParameters(&quot;java.lang.String&quot;).definedInClass(&quot;org.springframework.statemachine.config.configurers.SecurityConfigurer&quot;))</place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;guardExpression&quot;).withParameters(&quot;java.lang.String&quot;).definedInClass(&quot;org.springframework.statemachine.config.configurers.TransitionConfigurer&quot;))</place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;secured&quot;).withParameters(&quot;java.lang.String&quot;).definedInClass(&quot;org.springframework.statemachine.config.configurers.TransitionConfigurer&quot;))</place>
<place>psiParameter().ofMethod(0, psiMethod().withName(&quot;transition&quot;).withParameters(&quot;java.lang.String&quot;).definedInClass(&quot;org.springframework.statemachine.config.configurers.SecurityConfigurer&quot;))</place>
</injection>
</component>
<component name="MavenProjectsManager">
@@ -544,14 +582,6 @@
<option value="$PROJECT_DIR$/ems-logistic/pom.xml" />
</list>
</option>
<option name="ignoredFiles">
<set>
<option value="$PROJECT_DIR$/ems-document/pom.xml" />
<option value="$PROJECT_DIR$/ems-engine-customizations/pom.xml" />
<option value="$PROJECT_DIR$/ems-production/pom.xml" />
<option value="$PROJECT_DIR$/ems-retail/pom.xml" />
</set>
</option>
</component>
<component name="PWA">
<option name="wasEnabledAtLeastOnce" value="true" />
@@ -714,8 +744,21 @@
</component>
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/ems-activity/ems-activity.iml" filepath="$PROJECT_DIR$/ems-activity/ems-activity.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-contabil/ems-contabil.iml" filepath="$PROJECT_DIR$/ems-contabil/ems-contabil.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-core/ems-core.iml" filepath="$PROJECT_DIR$/ems-core/ems-core.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-document/ems-document.iml" filepath="$PROJECT_DIR$/ems-document/ems-document.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-engine/ems-engine.iml" filepath="$PROJECT_DIR$/ems-engine/ems-engine.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-engine-customizations/ems-engine-customizations.iml" filepath="$PROJECT_DIR$/ems-engine-customizations/ems-engine-customizations.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-logistic/ems-logistic.iml" filepath="$PROJECT_DIR$/ems-logistic/ems-logistic.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-offer/ems-offer.iml" filepath="$PROJECT_DIR$/ems-offer/ems-offer.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-order/ems-order.iml" filepath="$PROJECT_DIR$/ems-order/ems-order.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-ordikids/ems-ordikids.iml" filepath="$PROJECT_DIR$/ems-ordikids/ems-ordikids.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-product/ems-product.iml" filepath="$PROJECT_DIR$/ems-product/ems-product.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-production/ems-production.iml" filepath="$PROJECT_DIR$/ems-production/ems-production.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-retail/ems-retail.iml" filepath="$PROJECT_DIR$/ems-retail/ems-retail.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-system/ems-system.iml" filepath="$PROJECT_DIR$/ems-system/ems-system.iml" />
<module fileurl="file://$PROJECT_DIR$/ems-utility/ems-utility.iml" filepath="$PROJECT_DIR$/ems-utility/ems-utility.iml" />
<module fileurl="file://$PROJECT_DIR$/ims.iml" filepath="$PROJECT_DIR$/ims.iml" />
</modules>
</component>
@@ -831,44 +874,6 @@
</option>
</method>
</configuration>
<configuration default="false" name="Tomcat 7 #1 (ServerDev)" type="Remote">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="serverdev" />
<option name="PORT" value="8001" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8001" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
<configuration default="false" name="Tomcat 9 #2 (ServerDev)" type="Remote">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="serverdev" />
<option name="PORT" value="8002" />
<option name="AUTO_RESTART" value="false" />
<method v="2" />
</configuration>
<configuration default="false" name="Tomcat #1 (ServerTomcat)" type="Remote">
<module name="ems-engine" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="servertomcat" />
<option name="PORT" value="8000" />
<option name="AUTO_RESTART" value="false" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="8000" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
<configuration default="false" name="Tomcat (FAST)" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat" ALTERNATIVE_JRE_ENABLED="false" ALTERNATIVE_JRE_PATH="1.8" show_console_on_std_err="true" show_console_on_std_out="true">
<option name="COMMON_VM_ARGUMENTS" value="-DDISABLE_DROOLS_COMPILE=TRUE -Xms256m -Xmx1024m -XX:PermSize=1024m" />
<deployment>
@@ -940,21 +945,6 @@
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="JProfiler">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</STARTUP>
<SHUTDOWN>
<option name="USE_DEFAULT" value="true" />
<option name="SCRIPT" value="" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
</SHUTDOWN>
</ConfigurationWrapper>
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Profile">
<option name="USE_ENV_VARIABLES" value="true" />
<STARTUP>
@@ -1027,11 +1017,6 @@
<option name="name" value="maven-central" />
<option name="url" value="http://serverdev:9091/repository/maven-central/" />
</remote-repository>
<remote-repository>
<option name="id" value="AsposeJavaAPI" />
<option name="name" value="Aspose Java API" />
<option name="url" value="https://releases.aspose.com/java/repo/" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
@@ -1068,7 +1053,6 @@
</component>
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
<component name="WebServicesPlugin" addRequiredLibraries="true" />
<component name="libraryTable">
@@ -1120,42 +1104,6 @@
<root url="jar://$MAVEN_REPOSITORY$/c3p0/c3p0/0.9.1.1/c3p0-0.9.1.1-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: com.alibaba.fastjson2:fastjson2-extension:2.0.47" type="java-imported" external-system-id="Maven">
<properties groupId="com.alibaba.fastjson2" artifactId="fastjson2-extension" version="2.0.47" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson2/fastjson2-extension/2.0.47/fastjson2-extension-2.0.47.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson2/fastjson2-extension/2.0.47/fastjson2-extension-2.0.47-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson2/fastjson2-extension/2.0.47/fastjson2-extension-2.0.47-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: com.alibaba.fastjson2:fastjson2:2.0.47" type="java-imported" external-system-id="Maven">
<properties groupId="com.alibaba.fastjson2" artifactId="fastjson2" version="2.0.47" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson2/fastjson2/2.0.47/fastjson2-2.0.47.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson2/fastjson2/2.0.47/fastjson2-2.0.47-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson2/fastjson2/2.0.47/fastjson2-2.0.47-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: com.alibaba:fastjson:2.0.47" type="java-imported" external-system-id="Maven">
<properties groupId="com.alibaba" artifactId="fastjson" version="2.0.47" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson/2.0.47/fastjson-2.0.47.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson/2.0.47/fastjson-2.0.47-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/alibaba/fastjson/2.0.47/fastjson-2.0.47-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: com.amazonservices.mws:MWSClientJavaRuntime:1.1" type="java-imported" external-system-id="Maven">
<properties groupId="com.amazonservices.mws" artifactId="MWSClientJavaRuntime" version="1.1" />
<CLASSES>
@@ -1960,6 +1908,18 @@
<root url="jar://$MAVEN_REPOSITORY$/commons-digester/commons-digester/2.1/commons-digester-2.1-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: commons-discovery:commons-discovery:0.2" type="java-imported" external-system-id="Maven">
<properties groupId="commons-discovery" artifactId="commons-discovery" version="0.2" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/commons-discovery/commons-discovery/0.2/commons-discovery-0.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/commons-discovery/commons-discovery/0.2/commons-discovery-0.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/commons-discovery/commons-discovery/0.2/commons-discovery-0.2-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: commons-fileupload:commons-fileupload:1.3.3" type="java-imported" external-system-id="Maven">
<properties groupId="commons-fileupload" artifactId="commons-fileupload" version="1.3.3" />
<CLASSES>
@@ -1972,6 +1932,18 @@
<root url="jar://$MAVEN_REPOSITORY$/commons-fileupload/commons-fileupload/1.3.3/commons-fileupload-1.3.3-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: commons-io:commons-io:2.1" type="java-imported" external-system-id="Maven">
<properties groupId="commons-io" artifactId="commons-io" version="2.1" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.1/commons-io-2.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.1/commons-io-2.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.1/commons-io-2.1-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: commons-io:commons-io:2.2" type="java-imported" external-system-id="Maven">
<properties groupId="commons-io" artifactId="commons-io" version="2.2" />
<CLASSES>
@@ -2008,6 +1980,18 @@
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: commons-logging:commons-logging:1.2" type="java-imported" external-system-id="Maven">
<properties groupId="commons-logging" artifactId="commons-logging" version="1.2" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.2/commons-logging-1.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.2/commons-logging-1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.2/commons-logging-1.2-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: commons-net:commons-net:3.5" type="java-imported" external-system-id="Maven">
<properties groupId="commons-net" artifactId="commons-net" version="3.5" />
<CLASSES>
@@ -2320,18 +2304,6 @@
<root url="jar://$MAVEN_REPOSITORY$/io/perfmark/perfmark-api/0.19.0/perfmark-api-0.19.0-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: it.integry.font:Arial:1.0" type="java-imported" external-system-id="Maven">
<properties groupId="it.integry.font" artifactId="Arial" version="1.0" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/font/Arial/1.0/Arial-1.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/font/Arial/1.0/Arial-1.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/font/Arial/1.0/Arial-1.0-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: it.integry.font:ArialBlack:1.0" type="java-imported" external-system-id="Maven">
<properties groupId="it.integry.font" artifactId="ArialBlack" version="1.0" />
<CLASSES>
@@ -2380,6 +2352,78 @@
<root url="jar://$MAVEN_REPOSITORY$/it/integry/font/Tahoma/1.1/Tahoma-1.1-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: it.integry.ims:ems-ordikids:1.0" type="java-imported" external-system-id="Maven">
<properties groupId="it.integry.ims" artifactId="ems-ordikids" version="1.0" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-ordikids/1.0/ems-ordikids-1.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-ordikids/1.0/ems-ordikids-1.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-ordikids/1.0/ems-ordikids-1.0-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: it.integry.ims:ems-product:1.0" type="java-imported" external-system-id="Maven">
<properties groupId="it.integry.ims" artifactId="ems-product" version="1.0" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-product/1.0/ems-product-1.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-product/1.0/ems-product-1.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-product/1.0/ems-product-1.0-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: it.integry.ims:ems-production:1.0" type="java-imported" external-system-id="Maven">
<properties groupId="it.integry.ims" artifactId="ems-production" version="1.0" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-production/1.0/ems-production-1.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-production/1.0/ems-production-1.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-production/1.0/ems-production-1.0-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: it.integry.ims:ems-retail:1.0" type="java-imported" external-system-id="Maven">
<properties groupId="it.integry.ims" artifactId="ems-retail" version="1.0" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-retail/1.0/ems-retail-1.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-retail/1.0/ems-retail-1.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-retail/1.0/ems-retail-1.0-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: it.integry.ims:ems-system:1.0" type="java-imported" external-system-id="Maven">
<properties groupId="it.integry.ims" artifactId="ems-system" version="1.0" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-system/1.0/ems-system-1.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-system/1.0/ems-system-1.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-system/1.0/ems-system-1.0-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: it.integry.ims:ems-utility:1.0" type="java-imported" external-system-id="Maven">
<properties groupId="it.integry.ims" artifactId="ems-utility" version="1.0" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-utility/1.0/ems-utility-1.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-utility/1.0/ems-utility-1.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/it/integry/ims/ems-utility/1.0/ems-utility-1.0-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: it.integry:Utility:1.4" type="java-imported" external-system-id="Maven">
<properties groupId="it.integry" artifactId="Utility" version="1.4" />
<CLASSES>
@@ -2416,6 +2460,18 @@
<root url="jar://$MAVEN_REPOSITORY$/it/integry/utilityImage/1.0/utilityImage-1.0-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: javax.activation:activation:1.1" type="java-imported" external-system-id="Maven">
<properties groupId="javax.activation" artifactId="activation" version="1.1" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1/activation-1.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1/activation-1.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: javax.activation:activation:1.1.1" type="java-imported" external-system-id="Maven">
<properties groupId="javax.activation" artifactId="activation" version="1.1.1" />
<CLASSES>
@@ -2500,6 +2556,30 @@
<root url="jar://$MAVEN_REPOSITORY$/javax/transaction/jta/1.1/jta-1.1-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: javax.xml.rpc:javax.xml.rpc-api:1.1.1" type="java-imported" external-system-id="Maven">
<properties groupId="javax.xml.rpc" artifactId="javax.xml.rpc-api" version="1.1.1" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/javax/xml/rpc/javax.xml.rpc-api/1.1.1/javax.xml.rpc-api-1.1.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/javax/xml/rpc/javax.xml.rpc-api/1.1.1/javax.xml.rpc-api-1.1.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/javax/xml/rpc/javax.xml.rpc-api/1.1.1/javax.xml.rpc-api-1.1.1-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: javax.xml.soap:saaj-api:1.3.5" type="java-imported" external-system-id="Maven">
<properties groupId="javax.xml.soap" artifactId="saaj-api" version="1.3.5" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/javax/xml/soap/saaj-api/1.3.5/saaj-api-1.3.5.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/javax/xml/soap/saaj-api/1.3.5/saaj-api-1.3.5-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/javax/xml/soap/saaj-api/1.3.5/saaj-api-1.3.5-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: javax:javaee-web-api:7.0" type="java-imported" external-system-id="Maven">
<properties groupId="javax" artifactId="javaee-web-api" version="7.0" />
<CLASSES>
@@ -2752,6 +2832,18 @@
<root url="jar://$MAVEN_REPOSITORY$/org/apache/ant/ant/1.7.1/ant-1.7.1-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: org.apache.axis:axis:1.4" type="java-imported" external-system-id="Maven">
<properties groupId="org.apache.axis" artifactId="axis" version="1.4" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/axis/axis/1.4/axis-1.4.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/axis/axis/1.4/axis-1.4-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/apache/axis/axis/1.4/axis-1.4-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: org.apache.commons:commons-collections4:4.2" type="java-imported" external-system-id="Maven">
<properties groupId="org.apache.commons" artifactId="commons-collections4" version="4.2" />
<CLASSES>
@@ -4048,6 +4140,18 @@
<root url="jar://$MAVEN_REPOSITORY$/stax/stax-api/1.0.1/stax-api-1.0.1-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: wsdl4j:wsdl4j:1.6.3" type="java-imported" external-system-id="Maven">
<properties groupId="wsdl4j" artifactId="wsdl4j" version="1.6.3" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/wsdl4j/wsdl4j/1.6.3/wsdl4j-1.6.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/wsdl4j/wsdl4j/1.6.3/wsdl4j-1.6.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/wsdl4j/wsdl4j/1.6.3/wsdl4j-1.6.3-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: xalan:serializer:2.7.2" type="java-imported" external-system-id="Maven">
<properties groupId="xalan" artifactId="serializer" version="2.7.2" />
<CLASSES>

View File

@@ -19,11 +19,6 @@
<id>maven-public</id>
<url>https://maven.studioml.it/repository/maven-public/</url>
</repository>
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>https://releases.aspose.com/java/repo/</url>
</repository>
</repositories>
<properties>
@@ -159,19 +154,24 @@
<version>1.13</version>
</dependency>
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
<version>8.4.3</version>
</dependency>
<!-- SWAGGER
<!-- SWAGGER -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<artifactId>springfox-oas</artifactId>
<version>${swagger.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency> -->
</dependency>
<!-- REST CLIENT -->
<dependency>
@@ -221,7 +221,7 @@
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.10</version>
<version>0.10.2</version>
</dependency>
<!-- Mail -->
@@ -231,29 +231,17 @@
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.3.0</version>
</dependency>
<!-- JASPER REPORT -->
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.16.0</version>
<exclusions>
<exclusion>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7.js8</version>
<version>${jaspersoft.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.lowagie</groupId>-->
<!-- <artifactId>itext</artifactId>-->
<!-- <version>2.1.7.js8</version>-->
<!-- </dependency>-->
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-htmlcomponent</artifactId>
@@ -262,12 +250,12 @@
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-fonts</artifactId>
<version>6.16.0</version>
<version>${jaspersoft.version}</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-functions</artifactId>
<version>6.16.0</version>
<version>${jaspersoft.version}</version>
</dependency>
<dependency>
<groupId>it.integry.font</groupId>
@@ -394,18 +382,13 @@
<artifactId>utility-barcode</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>it.integry</groupId>
<artifactId>utilityImage</artifactId>
<version>1.0</version>
</dependency>
<!-- IntegryUtility (Barcodes, ecc) -->
<dependency>
<groupId>it.integry</groupId>
<artifactId>Utility</artifactId>
<version>1.4</version>
<version>1.5</version>
</dependency>
@@ -431,11 +414,21 @@
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-csv</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
@@ -455,11 +448,6 @@
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-instrument-tomcat</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
@@ -547,7 +535,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<version>3.14.0</version>
</dependency>
<dependency>
@@ -565,11 +553,6 @@
</dependency>
<!-- UTILS -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
@@ -696,7 +679,7 @@
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>7.0.1</version>
<version>9.2.0</version>
</dependency>
@@ -711,12 +694,6 @@
<artifactId>jcodec-javase</artifactId>
<version>0.2.5</version>
</dependency>
<dependency>
<groupId>com.annimon</groupId>
<artifactId>stream</artifactId>
<version>1.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.docx4j</groupId>
@@ -730,5 +707,11 @@
<version>0.27.0</version>
</dependency>
<dependency>
<groupId>com.github.javaparser</groupId>
<artifactId>javaparser-symbol-solver-core</artifactId>
<version>3.25.9</version>
</dependency>
</dependencies>
</project>

View File

@@ -5,7 +5,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import it.integry.WooCommerce.dto.order.WooCommerceOrderDTO;
import it.integry.WooCommerce.service.WooCommerceService;
import it.integry.common.var.CommonConstants;
import it.integry.ems.json.JSONObjectMapper;
import it.integry.ems.json.ResponseJSONObjectMapper;
import it.integry.ems.response.ServiceRestResponse;
import it.integry.ems_model.config.EmsRestConstants;
import org.apache.logging.log4j.LogManager;
@@ -26,7 +26,7 @@ public class WooCommerceController {
@Autowired
private WooCommerceService wooService;
@Autowired
private JSONObjectMapper jsonObjectMapper;
private ResponseJSONObjectMapper jsonObjectMapper;
@RequestMapping(value = EmsRestConstants.PATH_WOO_NEW_ORDER, method = RequestMethod.POST)

View File

@@ -768,7 +768,8 @@ public class WooCommerceService {
private void sendErrorMail(String errorMsg, String service, byte[] content, String filename, List<AnomalieDTO> anomalie) {
try {
mailService.sendErrorMail(multiDBTransactionManager, service, "WOOCOMMERCE", null, content, filename, anomalie);
mailService.sendErrorMailByGestNameSection(multiDBTransactionManager, service, "WOOCOMMERCE", "Errore WooCommerce",
null, content, filename, anomalie);
} catch (Exception exception) {
logger.error(service, exception);
}

View File

@@ -38,7 +38,10 @@ public class CommonConstants {
public static final DateTimeFormatter TIMESTAMP_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMddHHmmss")
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATESTAMP_FORMATTER = DateTimeFormatter.ofPattern("yyMMdd")
public static final DateTimeFormatter DATESTAMP_YMD_FORMATTER = DateTimeFormatter.ofPattern("yyMMdd")
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATESTAMP_DMY_FORMATTER = DateTimeFormatter.ofPattern("ddMMyy")
.withZone(ZoneId.systemDefault());

View File

@@ -9,21 +9,21 @@ import java.util.HashMap;
public class EmsDBConst {
private HashMap<String, Const> typesBindingTable = new HashMap<String, Const>() {{
private HashMap<String, Const> datiAziendaBindingTable = new HashMap<String, Const>() {{
}};
public Const getConsts(String azienda) {
String aziendaUp = azienda.toUpperCase();
public Const getConsts(String profileDb) {
String aziendaUp = profileDb.toUpperCase();
if (!typesBindingTable.containsKey(aziendaUp)) {
typesBindingTable.put(aziendaUp, new Const());
if (!datiAziendaBindingTable.containsKey(aziendaUp)) {
datiAziendaBindingTable.put(aziendaUp, new Const());
}
return typesBindingTable.get(aziendaUp);
return datiAziendaBindingTable.get(aziendaUp);
}
public void destroyAll() {
typesBindingTable = new HashMap<String, Const>();
datiAziendaBindingTable = new HashMap<String, Const>();
}

View File

@@ -22,6 +22,7 @@ public enum EntityImportType {
RAPPORTINI_FG("RAPPORTINI FG"),
SCONTRINI("SCONTRINI"),
MOVIMENTI_CONTABILI("MOVIMENTI CONTABILI"),
GRIGLIA_VENDITA("GRIGLIA VENDITA"),
GRIGLIA_ACQUISTO("GRIGLIA ACQUISTO");
private String text;

View File

@@ -5,17 +5,9 @@ import com.microsoft.sqlserver.jdbc.SQLServerDriver;
import it.integry.annotations.PostContextAutowired;
import it.integry.annotations.PostContextConstruct;
import it.integry.annotations.PostWebServerConstruct;
import it.integry.ems.properties.EmsProperties;
import it.integry.ems.schedule.new_cron_job.dto.AutomatedOperationTypeEnum;
import it.integry.ems.schedule.new_cron_job.dto.operations.ServiceCallAutomatedOperationDTO;
import it.integry.ems.schedule.new_cron_job.dto.operations.base_classes.BaseAutomatedOperationDTO;
import it.integry.ems.schedule.new_cron_job.service.AutomatedOperationHandlerComponent;
import it.integry.ems.settings.Model.AvailableConnectionsModel;
import it.integry.ems.settings.Model.SettingsModel;
import it.integry.ems.settings.SettingsController;
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems.utility.UtilityDebug;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.postgresql.Driver;
@@ -33,10 +25,12 @@ import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.sql.DriverManager;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import static org.reflections.scanners.Scanners.TypesAnnotated;
@Component
public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent> {
@@ -53,9 +47,6 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
@Autowired
private SettingsModel settingsModel;
@Autowired
private EmsProperties emsProperties;
private boolean contextInitialized = false;
private boolean firstStart = true;
@@ -108,6 +99,7 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
dispatchPostWebServerConstruct(multiDBTransactionManager);
} catch (Exception e) {
e.printStackTrace();
logger.error("EmsCoreContext.onPostDBLoaded", e);
}
}
@@ -115,13 +107,11 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
private void dispatchPostContextConstruct(MultiDBTransactionManager multiDBTransactionManager) throws InvocationTargetException, IllegalAccessException {
Reflections reflections = new Reflections("it.integry");
final Set<Class<?>> typesAnnotatedWith = reflections.getTypesAnnotatedWith(Component.class);
typesAnnotatedWith.addAll(reflections.getTypesAnnotatedWith(Service.class));
final Set<Class<?>> typesAnnotatedWith = reflections.get(TypesAnnotated.with(Component.class, Service.class).asClass());
List<Class<?>> classesWithPostContextConstruct = Stream.of(typesAnnotatedWith)
.filter(x -> Stream.of(x.getDeclaredMethods()).anyMatch(y -> y.isAnnotationPresent(PostContextConstruct.class)))
.sortBy(x -> Stream.of(x.getDeclaredMethods())
.filter(x -> Arrays.stream(x.getDeclaredMethods()).anyMatch(y -> y.isAnnotationPresent(PostContextConstruct.class)))
.sortBy(x -> Arrays.stream(x.getDeclaredMethods())
.filter(y -> y.isAnnotationPresent(PostContextConstruct.class))
.findFirst()
.get()
@@ -133,9 +123,9 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
logger.debug("PostContextConstruct - " + classType.getSimpleName() + " - START");
Object beanInstance = ContextLoader.getCurrentWebApplicationContext().getBean(classType);
List<Field> fieldsToInject = Stream.of(classType.getDeclaredFields())
List<Field> fieldsToInject = Arrays.stream(classType.getDeclaredFields())
.filter(y -> y.isAnnotationPresent(PostContextAutowired.class))
.toList();
.collect(Collectors.toList());
for (Field fieldToInject : fieldsToInject) {
fieldToInject.setAccessible(true);
@@ -145,7 +135,7 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
}
}
Method constructor = Stream.of(classType.getDeclaredMethods())
Method constructor = Arrays.stream(classType.getDeclaredMethods())
.filter(y -> y.isAnnotationPresent(PostContextConstruct.class))
.findFirst()
.get();
@@ -158,13 +148,11 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
private void dispatchPostWebServerConstruct(MultiDBTransactionManager multiDBTransactionManager) throws InvocationTargetException, IllegalAccessException {
Reflections reflections = new Reflections("it.integry");
final Set<Class<?>> typesAnnotatedWith = reflections.getTypesAnnotatedWith(Component.class);
typesAnnotatedWith.addAll(reflections.getTypesAnnotatedWith(Service.class));
final Set<Class<?>> typesAnnotatedWith = reflections.get(TypesAnnotated.with(Component.class, Service.class).asClass());
List<Class<?>> classesWithPostWebServerConstruct = Stream.of(typesAnnotatedWith)
.filter(x -> Stream.of(x.getDeclaredMethods()).anyMatch(y -> y.isAnnotationPresent(PostWebServerConstruct.class)))
.sortBy(x -> Stream.of(x.getDeclaredMethods())
.filter(x -> Arrays.stream(x.getDeclaredMethods()).anyMatch(y -> y.isAnnotationPresent(PostWebServerConstruct.class)))
.sortBy(x -> Arrays.stream(x.getDeclaredMethods())
.filter(y -> y.isAnnotationPresent(PostWebServerConstruct.class))
.findFirst()
.get()
@@ -176,9 +164,9 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
logger.debug("PostWebServerConstruct - " + classType.getSimpleName() + " - START");
Object beanInstance = ContextLoader.getCurrentWebApplicationContext().getBean(classType);
List<Field> fieldsToInject = Stream.of(classType.getDeclaredFields())
List<Field> fieldsToInject = Arrays.stream(classType.getDeclaredFields())
.filter(y -> y.isAnnotationPresent(PostContextAutowired.class))
.toList();
.collect(Collectors.toList());
for (Field fieldToInject : fieldsToInject) {
fieldToInject.setAccessible(true);
@@ -188,7 +176,7 @@ public class EmsCoreContext implements ApplicationListener<ContextRefreshedEvent
}
}
Method constructor = Stream.of(classType.getDeclaredMethods())
Method constructor = Arrays.stream(classType.getDeclaredMethods())
.filter(y -> y.isAnnotationPresent(PostWebServerConstruct.class))
.findFirst()
.get();

View File

@@ -3,18 +3,16 @@ package it.integry.ems._context;
import it.integry.annotations.PostContextConstruct;
import it.integry.common.var.EmsDBConst;
import it.integry.ems.datasource.DataSource;
import it.integry.ems.dynamic_cache.DynamicCacheService;
import it.integry.ems.expansion.RunnableArgs;
import it.integry.ems.settings.Model.AvailableConnectionsModel;
import it.integry.ems.settings.Model.SettingsModel;
import it.integry.ems.settings.SettingsController;
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems.user.UserCacheService;
import it.integry.ems.user.service.UserCacheService;
import it.integry.ems_model.entity.Azienda;
import it.integry.ems_model.service.SetupGest;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityHashMap;
import it.integry.ems_model.utility.UtilityString;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -22,9 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@Component
public class EmsCoreDBLoader {

View File

@@ -1,20 +1,27 @@
package it.integry.ems.adapter;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import it.integry.ems_model.config.EmsRestConstants;
import it.integry.ems_model.utility.UtilityString;
import java.io.IOException;
import java.util.Date;
public class JsonDateAdapterDeserializer extends JsonDeserializer<Date> {
public class JsonDateAdapterDeserializer extends StdDeserializer<Date> {
public JsonDateAdapterDeserializer() {
this(null);
}
protected JsonDateAdapterDeserializer(Class<?> vc) {
super(vc);
}
@Override
public Date deserialize(JsonParser jp, DeserializationContext arg1)
throws IOException, JsonProcessingException {
throws IOException {
if (UtilityString.isNullOrEmpty(jp.getText()))
return null;

View File

@@ -0,0 +1,49 @@
package it.integry.ems.configuration;
import it.integry.ems.json.ResponseJSONObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.nio.charset.StandardCharsets;
import java.util.List;
@Configuration
@EnableWebMvc
public class JsonConfig implements WebMvcConfigurer {
@Bean
public ResponseJSONObjectMapper jacksonResponseObjectMapper() {
final ResponseJSONObjectMapper objectMapper = new ResponseJSONObjectMapper();
return objectMapper;
}
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.defaultContentType(MediaType.APPLICATION_JSON);
}
@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
final MappingJackson2HttpMessageConverter httpMessageConverter = converters.stream()
.filter(x -> x instanceof MappingJackson2HttpMessageConverter)
.map(x -> (MappingJackson2HttpMessageConverter) x)
.findFirst()
.get();
httpMessageConverter.setDefaultCharset(StandardCharsets.UTF_8);
httpMessageConverter.setObjectMapper(jacksonResponseObjectMapper());
int oldIndex = converters.indexOf(httpMessageConverter);
converters.remove(oldIndex);
converters.add(0, httpMessageConverter);
}
}

View File

@@ -0,0 +1,43 @@
package it.integry.ems.configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.oas.annotations.EnableOpenApi;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
@Configuration
//@EnableSwagger2
@EnableWebMvc
@EnableOpenApi
public class SwaggerConfig implements WebMvcConfigurer {
@Bean
public Docket api() {
return new Docket(DocumentationType.OAS_30)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/swagger-ui/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/")
.resourceChain(false);
}
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/swagger-ui/")
.setViewName("forward:" + "swagger-ui/index.html");
}
}

View File

@@ -7,13 +7,14 @@ import it.integry.ems.Import.base.EntityImportResponse;
import it.integry.ems.Import.dto.ImportRequestDTO;
import it.integry.ems.download.DownloadFileHandlerService;
import it.integry.ems.download.dto.DownloadFileDto;
import it.integry.ems.dto.EntityHierarchyDTO;
import it.integry.ems.dto.CreateZipDTO;
import it.integry.ems.dto.EntityHierarchy;
import it.integry.ems.exception.MissingDataException;
import it.integry.ems.export.base.EntityExportResponse;
import it.integry.ems.export.base.EntityExportedFile;
import it.integry.ems.javabeans.RequestDataDTO;
import it.integry.ems.media.MediaImageService;
import it.integry.ems.media.MimeTypesHandler;
import it.integry.ems.metrics.service.MetricService;
import it.integry.ems.model.EntityModel;
import it.integry.ems.model.FieldModel;
import it.integry.ems.model.PKFieldModel;
@@ -58,7 +59,9 @@ import org.springframework.web.util.HtmlUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
@@ -70,6 +73,7 @@ import java.util.Date;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.ZipOutputStream;
@RestController
@Scope("request")
@@ -96,9 +100,6 @@ public class EmsController {
@Autowired
private ServiceChecker serviceChecker;
@Autowired
private MetricService metricService;
@Autowired
private SchedulerFactoryBean quartzScheduler;
@@ -183,17 +184,6 @@ public class EmsController {
}
}
@RequestMapping(value = "/metric/count", method = RequestMethod.GET)
public @ResponseBody
ServiceRestResponse metricCount(HttpServletRequest request) {
try {
return ServiceRestResponse.createPositiveResponse(metricService.getJsonCountMetric());
} catch (Exception e) {
logger.error(request.getRequestURI(), e);
return ServiceRestResponse.createNegativeResponse(e);
}
}
@RequestMapping(value = "/decodeUcs", method = RequestMethod.POST)
public @ResponseBody
String decodeUcs(@RequestBody String encodedUcs) {
@@ -859,7 +849,7 @@ public class EmsController {
}
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_DTB_DOC_PDF, method = RequestMethod.GET)
public byte[] downloadDtbDocPdf(HttpServletRequest request, HttpServletResponse response,
public byte[] downloadDtbDocPdf(HttpServletResponse response,
@RequestParam(CommonConstants.PROFILE_DB) String config,
@RequestParam String dataDoc,
@RequestParam String serDoc,
@@ -1101,6 +1091,11 @@ public class EmsController {
}
}
@RequestMapping(value = "createZipFromFiles", method = RequestMethod.POST)
public @ResponseBody
ServiceRestResponse createZipFromFiles(@RequestBody CreateZipDTO createZipDTO) throws Exception {
return ServiceRestResponse.createPositiveResponse(emsServices.createZipFromFiles(createZipDTO));
}
// @RequestMapping(value = EmsRestConstants.PATH_UPLOAD_STB_EMAIL_CONTENT, method = RequestMethod.POST)
// public ServiceRestResponse uploadStbFileAttachment(HttpServletRequest request, HttpServletResponse response,
@@ -1147,8 +1142,7 @@ public class EmsController {
@RequestMapping(value = EmsRestConstants.PATH_CLEAN_DIRECTORIES, method = RequestMethod.POST)
public @ResponseBody
ServiceRestResponse cleanDirectories(HttpServletRequest httpRequest, HttpServletResponse httpResponse,
@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
ServiceRestResponse cleanDirectories(@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
try {
emsServices.cleanDirectories();
return ServiceRestResponse.createPositiveResponse();
@@ -1167,11 +1161,9 @@ public class EmsController {
@RequestMapping(value = EmsRestConstants.PATH_GET_ENTITY_MAPPING, method = RequestMethod.GET)
public @ResponseBody
ServiceRestResponse getEntityMapping(HttpServletRequest httpRequest,
HttpServletResponse httpResponse,
@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
ServiceRestResponse getEntityMapping(@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
try {
List<EntityHierarchyDTO> mapping = emsServices.getEntityMapping();
List<EntityHierarchy> mapping = emsServices.getEntityMapping();
return ServiceRestResponse.createPositiveResponse(mapping);
} catch (Exception e) {
logger.error(e.getMessage(), e);
@@ -1181,9 +1173,7 @@ public class EmsController {
@RequestMapping(value = EmsRestConstants.PATH_GET_HISTORY_PROFILE_DB, method = RequestMethod.GET)
public @ResponseBody
ServiceRestResponse getHistoryProfileDb(HttpServletRequest httpRequest,
HttpServletResponse httpResponse,
@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
ServiceRestResponse getHistoryProfileDb(@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
try {
String historyProfileDb = settingsController.getHistoryProfileDb();
return ServiceRestResponse.createPositiveResponse(historyProfileDb);
@@ -1195,9 +1185,7 @@ public class EmsController {
@RequestMapping(value = EmsRestConstants.PATH_GET_ENTITY_DETAILS, method = RequestMethod.GET)
public @ResponseBody
ServiceRestResponse getEntityDetails(HttpServletRequest httpRequest,
HttpServletResponse httpResponse,
@RequestParam("entityName") String entityName,
ServiceRestResponse getEntityDetails(@RequestParam("entityName") String entityName,
@RequestParam(CommonConstants.PROFILE_DB) String config
) throws Exception {
try {

View File

@@ -30,6 +30,6 @@ public class EmsResponseEntityExceptionHandler extends ResponseEntityExceptionHa
logger.error("Eccezione non gestita", ex);
ServiceRestResponse serviceRestResponse = ServiceRestResponse.createNegativeResponse(ex);
return new ResponseEntity(serviceRestResponse, headers, status);
return new ResponseEntity<>(serviceRestResponse, headers, status);
}
}

View File

@@ -4,26 +4,17 @@ package it.integry.ems.devices;
import it.integry.ems.service.EntityProcessor;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems.user.UserSession;
import it.integry.ems_model.config.EmsRestConstants;
import it.integry.ems_model.entity.StbDevice;
import it.integry.ems_model.entity.StbDevices;
import it.integry.ems_model.types.OperationType;
import it.integry.ems_model.utility.Query;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityDate;
import it.integry.ems_model.utility.UtilityLocalDate;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import javax.annotation.PostConstruct;
import javax.naming.Context;
import javax.servlet.http.HttpServletRequest;
import java.sql.Connection;
import java.util.Date;
@@ -57,14 +48,14 @@ public class DevicesService {
UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), selectSql);
if(!exists) {
StbDevice stbDevice = new StbDevice()
StbDevices stbDevices = new StbDevices()
.setName(appName)
.setIdentificationId(deviceId)
.setCreatedAt(new Date())
.setLastUse(new Date());
stbDevice.setOperation(OperationType.INSERT_OR_UPDATE);
entityProcessor.processEntity(stbDevice, multiDBTransactionManager);
stbDevices.setOperation(OperationType.INSERT_OR_UPDATE);
entityProcessor.processEntity(stbDevices, multiDBTransactionManager);
}
}

View File

@@ -3,7 +3,7 @@ package it.integry.ems.directory;
import com.fasterxml.jackson.databind.node.ArrayNode;
import it.integry.common.var.CommonConstants;
import it.integry.ems.datasource.DataSource;
import it.integry.ems.json.JSONObjectMapper;
import it.integry.ems.json.ResponseJSONObjectMapper;
import it.integry.ems.properties.EmsProperties;
import it.integry.ems.response.EsitoType;
import it.integry.ems.response.FileItem;
@@ -39,10 +39,10 @@ public class EmailWatcherListener extends TimerTask {
private EmailListenerInfo emailListenerInfo;
private EmsProperties prop;
private SetupGest setupGest;
private JSONObjectMapper jsonObjectMapper;
private ResponseJSONObjectMapper jsonObjectMapper;
public EmailWatcherListener(EmailListenerInfo emailListenerInfo, EmsProperties prop,
SetupGest setupGest, JSONObjectMapper jsonObjectMapper) {
SetupGest setupGest, ResponseJSONObjectMapper jsonObjectMapper) {
super();
this.emailListenerInfo = emailListenerInfo;
this.prop = prop;

View File

@@ -12,6 +12,10 @@ public class ApplicationInfoDTO {
private String loadMenuPvm;
private List<String> salvataggiSoap;
private boolean delimitedIdentifier;
private boolean ansiPadding;
private boolean concatNullYieldsNull;
public String getName() {
return name;
}
@@ -74,4 +78,31 @@ public class ApplicationInfoDTO {
this.salvataggiSoap = salvataggiSoap;
return this;
}
public boolean isConcatNullYieldsNull() {
return concatNullYieldsNull;
}
public ApplicationInfoDTO setConcatNullYieldsNull(boolean concatNullYieldNulls) {
this.concatNullYieldsNull = concatNullYieldNulls;
return this;
}
public boolean isAnsiPadding() {
return ansiPadding;
}
public ApplicationInfoDTO setAnsiPadding(boolean ansiPadding) {
this.ansiPadding = ansiPadding;
return this;
}
public boolean isDelimitedIdentifier() {
return delimitedIdentifier;
}
public ApplicationInfoDTO setDelimitedIdentifier(boolean delimitedIdentifier) {
this.delimitedIdentifier = delimitedIdentifier;
return this;
}
}

View File

@@ -0,0 +1,108 @@
package it.integry.ems.dto;
import com.fasterxml.jackson.annotation.JsonValue;
import it.integry.ems.report.dto.JasperDTO;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.entity.MtbUntMis;
import it.integry.ems_model.entity.StbActivityFile;
import it.integry.ems_model.entity._enum.IBaseEnum;
import java.util.HashMap;
import java.util.List;
public class CreateZipDTO {
private List<String> listIdAttach;
private List<StbActivityFile> listStbActivityFile;
private String fileName;
private SaveMode saveMode = SaveMode.STB_FILES_ATTACHED;
private EntityBase entityToSaveTo;
public List<String> getListIdAttach() {
return listIdAttach;
}
public CreateZipDTO setListIdAttach(List<String> listIdAttach) {
this.listIdAttach = listIdAttach;
return this;
}
public List<StbActivityFile> getListStbActivityFile() {
return listStbActivityFile;
}
public CreateZipDTO setListStbActivityFile(List<StbActivityFile> listStbActivityFile) {
this.listStbActivityFile = listStbActivityFile;
return this;
}
public String getFileName() {
return fileName;
}
public CreateZipDTO setFileName(String fileName) {
this.fileName = fileName;
return this;
}
public SaveMode getSaveMode() {
return saveMode;
}
public CreateZipDTO setSaveMode(SaveMode saveMode) {
this.saveMode = saveMode;
return this;
}
public EntityBase getEntityToSaveTo() {
return entityToSaveTo;
}
public CreateZipDTO setEntityToSaveTo(EntityBase entityToSaveTo) {
this.entityToSaveTo = entityToSaveTo;
return this;
}
public enum SaveMode implements IBaseEnum<SaveMode> {
STB_FILES_ATTACHED((short) 0),
STB_ACTIVITY_FILE((short) 1);
private final short value;
SaveMode(final short value) {
this.value = value;
}
public static SaveMode from(Object value) {
short castValue = (short) value;
for (SaveMode b : SaveMode.values()) {
if (b.value == castValue)
return b;
}
return null;
}
@JsonValue
public short getValue() {
return this.value;
}
@Override
public Object get() {
return this.value;
}
@Override
public SaveMode fromInternal(Object val) {
return from(val);
}
@Override
public String toString() {
return String.valueOf(value);
}
}
}

View File

@@ -0,0 +1,169 @@
package it.integry.ems.dto;
import it.integry.ems_model.annotation.*;
import it.integry.ems_model.base.EntityBase;
import java.util.List;
public class EntityHierarchy {
private Class<? extends EntityBase> clazz;
private String entityName;
private String tableName;
private java.lang.reflect.Field parentField; //Used for entityChild
private boolean master;
private List<EntityHierarchy> children;
private List<Field> fields;
public Class<? extends EntityBase> getClazz() {
return clazz;
}
public EntityHierarchy setClazz(Class<? extends EntityBase> clazz) {
this.clazz = clazz;
return this;
}
public String getEntityName() {
return entityName;
}
public void setEntityName(String entityName) {
this.entityName = entityName;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public java.lang.reflect.Field getParentField() {
return parentField;
}
public EntityHierarchy setParentField(java.lang.reflect.Field parentField) {
this.parentField = parentField;
return this;
}
public boolean isMaster() {
return master;
}
public EntityHierarchy setMaster(boolean master) {
this.master = master;
return this;
}
public List<EntityHierarchy> getChildren() {
return children;
}
public void setChildren(List<EntityHierarchy> children) {
this.children = children;
}
public void addChild(EntityHierarchy child) {
this.children.add(child);
}
public void removeChild(EntityHierarchy child) {
this.children.remove(child);
}
public List<Field> getFields() {
return fields;
}
public EntityHierarchy setFields(List<Field> fields) {
this.fields = fields;
return this;
}
public static class Field {
private java.lang.reflect.Field field;
private Identity identity;
private SqlField sqlField;
private ObjectStorage objectStorage;
private Blob blob;
private Clob clob;
public java.lang.reflect.Field getField() {
return field;
}
public Field setField(java.lang.reflect.Field field) {
this.field = field;
return this;
}
public boolean isSqlField() {
return sqlField != null;
}
public boolean isObjectStorage() {
return objectStorage != null;
}
public boolean isBlob() {
return blob != null;
}
public boolean isClob() {
return clob != null;
}
public boolean isIdentity() {
return identity != null;
}
public Identity getIdentity() {
return identity;
}
public Field setIdentity(Identity identity) {
this.identity = identity;
return this;
}
public SqlField getSqlField() {
return sqlField;
}
public Field setSqlField(SqlField sqlField) {
this.sqlField = sqlField;
return this;
}
public ObjectStorage getObjectStorage() {
return objectStorage;
}
public Field setObjectStorage(ObjectStorage objectStorage) {
this.objectStorage = objectStorage;
return this;
}
public Blob getBlob() {
return blob;
}
public Field setBlob(Blob blob) {
this.blob = blob;
return this;
}
public Clob getClob() {
return clob;
}
public Field setClob(Clob clob) {
this.clob = clob;
return this;
}
}
}

View File

@@ -1,75 +0,0 @@
package it.integry.ems.dto;
import it.integry.ems_model.base.EntityBase;
import java.lang.reflect.Field;
import java.util.List;
public class EntityHierarchyDTO {
private Class<? extends EntityBase> clazz;
private String entityName;
private String tableName;
private Field field;
private boolean master;
private List<EntityHierarchyDTO> children;
public Class<? extends EntityBase> getClazz() {
return clazz;
}
public EntityHierarchyDTO setClazz(Class<? extends EntityBase> clazz) {
this.clazz = clazz;
return this;
}
public String getEntityName() {
return entityName;
}
public void setEntityName(String entityName) {
this.entityName = entityName;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public Field getField() {
return field;
}
public EntityHierarchyDTO setField(Field field) {
this.field = field;
return this;
}
public boolean isMaster() {
return master;
}
public EntityHierarchyDTO setMaster(boolean master) {
this.master = master;
return this;
}
public List<EntityHierarchyDTO> getChildren() {
return children;
}
public void setChildren(List<EntityHierarchyDTO> children) {
this.children = children;
}
public void addChild(EntityHierarchyDTO child) {
this.children.add(child);
}
public void removeChild(EntityHierarchyDTO child) {
this.children.remove(child);
}
}

View File

@@ -1,5 +1,6 @@
package it.integry.ems.dynamic_cache;
import it.integry.ems.expansion.RunnableArgsWithReturn;
import it.integry.ems.expansion.RunnableWithReturn;
import it.integry.ems.looper.service.LooperService;
import it.integry.ems.settings.Model.AvailableConnectionsModel;
@@ -12,6 +13,7 @@ import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.sql.Connection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -34,17 +36,46 @@ public class DynamicCacheService {
public enum Keys {
DATI_AZIENDA_KEY,
ENTITY_LOGGER_SETUP,
GRIGLIA_ACQUISTO_KEY
GRIGLIA_ACQUISTO_KEY,
ENTITY_SYNC_KEY
}
public void addItem(Keys key, int invalidateTimeInMins, RunnableWithReturn<Object> refreshAction) {
//cacheData.put(key, refreshAction.run());
this.looperService.add(() -> {
cacheData.put(key, refreshAction.run());
}, invalidateTimeInMins * 60 * 1000, "dynamic-cache-" + key);
}
public <T>void addDbItem(Keys key, int invalidateTimeInMins, RunnableArgsWithReturn<Connection, T> refreshAction, List<String> dbNames) {
List<String> finalDbNames = dbNames.stream().map(String::toLowerCase).collect(Collectors.toList());
RunnableWithReturn<Object> internalRefreshAction = () -> {
Map<String, List<AvailableConnectionsModel>> databases = settingsModel.getAvailableConnections()
.stream()
.filter(AvailableConnectionsModel::getInternalDb)
.filter(x -> finalDbNames.contains(x.getDbName().toLowerCase()))
.collect(Collectors.groupingBy(AvailableConnectionsModel::getDbName));
final HashMap<String, T> cachedDataByDB = new HashMap<>();
for (String dbName : databases.keySet()) {
String profileName = databases.get(dbName).get(0).getProfileName();
try (MultiDBTransactionManager multiDBTransactionManager = new MultiDBTransactionManager(profileName, false)) {
T data = refreshAction.run(multiDBTransactionManager.getPrimaryConnection());
cachedDataByDB.putIfAbsent(dbName.toLowerCase(), data);
} catch (Exception ex) {
logger.error(ex.getMessage(), ex);
}
}
return cachedDataByDB;
};
addItem(key, invalidateTimeInMins, internalRefreshAction);
}
public void addEntity(Keys key, int invalidateTimeInMins, Class<? extends EntityBase> clazz, List<String> dbNames) {
List<String> finalDbNames = dbNames.stream().map(String::toLowerCase).collect(Collectors.toList());
@@ -92,16 +123,12 @@ public class DynamicCacheService {
}
private void cacheEntityByDB(String dbName, String profileName, Class<? extends EntityBase> clazz, HashMap<String, List<? extends EntityBase>> cachedEntitiesByDB) throws Exception {
MultiDBTransactionManager multiDBTransactionManager = new MultiDBTransactionManager(profileName, false);
try {
try (MultiDBTransactionManager multiDBTransactionManager = new MultiDBTransactionManager(profileName, false)) {
String tableName = clazz.newInstance().getTableName();
String sql = "SELECT * FROM " + tableName;
List<? extends EntityBase> entities = UtilityDB.executeSimpleQueryDTO(multiDBTransactionManager.getPrimaryConnection(), sql, clazz);
cachedEntitiesByDB.putIfAbsent(dbName.toLowerCase(), entities);
} finally {
multiDBTransactionManager.closeAll();
}
}
@@ -155,4 +182,13 @@ public class DynamicCacheService {
return cachedEntityList;
}
public <T>T getDbItem(Keys key, String dbName) {
dbName = dbName.toLowerCase();
final HashMap<String, T> cacheObjectByDB = (HashMap<String, T>) cacheData.getOrDefault(key, null);
if (cacheObjectByDB == null) return null;
final T cachedEntityValue = cacheObjectByDB.getOrDefault(dbName, null);
return cachedEntityValue;
}
}

View File

@@ -3,6 +3,7 @@ package it.integry.ems.ecedi.dto;
import it.integry.ems_model.annotation.SqlField;
import it.integry.ems_model.entity.MtbColt;
import it.integry.ems_model.types.OperationType;
import it.integry.ems_model.utility.UtilityLocalDate;
import it.integry.ems_model.utility.UtilityString;
import java.math.BigDecimal;
@@ -508,7 +509,7 @@ public class EuritmoTestata {
// Chiave collo
mtbColt.setGestione("A");
mtbColt.setDataCollo(this.dataDoc);
mtbColt.setDataCollo(UtilityLocalDate.localDateFromDate(this.dataDoc));
mtbColt.setRifOrd(String.format("%s_%s", dataDocString, this.numDoc));
mtbColt.setAnnotazioni(annotazioni);

View File

@@ -0,0 +1,38 @@
package it.integry.ems.entity_development;
import it.integry.common.var.CommonConstants;
import it.integry.ems.devices.DevicesService;
import it.integry.ems.devices.dto.RegisterDeviceRequestDTO;
import it.integry.ems.entity_development.dto.CreateEntityItemRequestDTO;
import it.integry.ems.response.ServiceRestResponse;
import it.integry.ems.utility.UtilityDebug;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.*;
@RestController
@Scope("request")
@RequestMapping("entity-development")
public class EntityDevelopmentController {
private final Logger logger = LogManager.getLogger();
@Autowired
private EntityDevelopmentService entityDevelopmentService;
@RequestMapping(value = "create", method = RequestMethod.POST)
public @ResponseBody
ServiceRestResponse create(@RequestBody CreateEntityItemRequestDTO[] createEntityItemRequestList) throws Exception {
if (!UtilityDebug.isDebugExecution())
throw new Exception("Puoi eseguire questa procedura solo in ambiente DEBUG!");
if (UtilityDebug.isIntegryServerDev())
throw new Exception("Non puoi eseguire questa azione su SERVERDEV!");
entityDevelopmentService.create(createEntityItemRequestList);
return ServiceRestResponse.createPositiveResponse();
}
}

View File

@@ -0,0 +1,241 @@
package it.integry.ems.entity_development;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.NodeList;
import com.github.javaparser.ast.body.*;
import com.github.javaparser.ast.expr.*;
import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.stmt.ExpressionStmt;
import com.github.javaparser.ast.stmt.ReturnStmt;
import com.github.javaparser.ast.type.ClassOrInterfaceType;
import it.integry.ems.entity_development.dto.CreateEntityItemRequestDTO;
import it.integry.ems.entity_logger.db_schema_manager.component.SQLServerDBSchemaManager;
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseForeignKey;
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseTableColumn;
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseTableView;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems.utility.UtilityDirs;
import it.integry.ems_model.annotation.*;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityString;
import org.kie.api.definition.type.PropertyReactive;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import static com.github.javaparser.ast.Modifier.Keyword.*;
@Service
@Scope("request")
public class EntityDevelopmentService {
@Autowired
private MultiDBTransactionManager multiDBTransactionManager;
public void create(CreateEntityItemRequestDTO[] createEntityItemRequestList) throws Exception {
SQLServerDBSchemaManager sourceDBSchema = new SQLServerDBSchemaManager(multiDBTransactionManager.getPrimaryConnection());
List<AbstractMap.SimpleEntry<Boolean, CompilationUnit>> masterDetailClassesDeclaration = new ArrayList<>();
final List<CreateEntityItemRequestDTO> entityChilds = Arrays.stream(createEntityItemRequestList)
.filter(x -> !x.isMaster())
.collect(Collectors.toList());
for (CreateEntityItemRequestDTO createEntityItemRequestDTO : createEntityItemRequestList) {
final DatabaseTableView tableData = sourceDBSchema.getTable(createEntityItemRequestDTO.getTableName());
final CompilationUnit javaClassDeclaration =
createJavaClassDeclaration(createEntityItemRequestDTO, tableData, createEntityItemRequestDTO.isMaster() ? entityChilds : null);
masterDetailClassesDeclaration.add(new AbstractMap.SimpleEntry<>(createEntityItemRequestDTO.isMaster(), javaClassDeclaration));
}
final String entitiesJavaPath = UtilityDirs.getDevelopmentJavaBaseFolder() + "it\\integry\\ems_model\\entity\\";
for (AbstractMap.SimpleEntry<Boolean, CompilationUnit> booleanClassOrInterfaceDeclarationSimpleEntry : masterDetailClassesDeclaration) {
final TypeDeclaration<?> classDeclaration = booleanClassOrInterfaceDeclarationSimpleEntry.getValue().getType(0);
writeJavaClassToFile(booleanClassOrInterfaceDeclarationSimpleEntry.getValue(), entitiesJavaPath, classDeclaration.getNameAsString());
}
}
private CompilationUnit createJavaClassDeclaration(CreateEntityItemRequestDTO createEntityItemRequestDTO, final DatabaseTableView databaseTable, final List<CreateEntityItemRequestDTO> childEntities) throws Exception {
CompilationUnit javaClassCompilation = new CompilationUnit();
// addImportInstructions(javaClassCompilation);
String javaClassName = UtilityString.sqlToCamelCase(databaseTable.getTableName());
javaClassName = javaClassName.substring(0, 1).toUpperCase() + javaClassName.substring(1);
ClassOrInterfaceDeclaration javaClass = javaClassCompilation
.addClass(javaClassName)
.addExtendedType(EntityBase.class)
.setPublic(true);
if (createEntityItemRequestDTO.isMaster())
javaClass.addAnnotation(Master.class);
javaClass
.addAnnotation(PropertyReactive.class);
javaClass.addAndGetAnnotation(Table.class)
.addPair("value", new FieldAccessExpr(new NameExpr(javaClassName), "ENTITY"));
javaClass.addAndGetAnnotation(JsonTypeName.class)
.addPair("value", new FieldAccessExpr(new NameExpr(javaClassName), "ENTITY"));
final FieldDeclaration entityField = javaClass.addField(String.class, "ENTITY", PUBLIC, FINAL, STATIC);
ClassOrInterfaceType entityFieldType = entityField.getElementType().asClassOrInterfaceType();
entityFieldType.setName("String");
entityField.setVariable(0, new VariableDeclarator(entityFieldType, "ENTITY",
new StringLiteralExpr(databaseTable.getTableName())));
final FieldDeclaration serialVersionUIDField = javaClass.addField(Long.class, "serialVersionUID", PRIVATE, FINAL, STATIC);
ClassOrInterfaceType serialVersionUIDFieldType = serialVersionUIDField.getElementType().asClassOrInterfaceType();
serialVersionUIDFieldType.setName("long");
serialVersionUIDField.setVariable(0, new VariableDeclarator(serialVersionUIDFieldType, "serialVersionUID",
new LongLiteralExpr("1L")));
List<FieldDeclaration> entityFields = new ArrayList<>();
for (DatabaseTableColumn databaseColumn : databaseTable.getColumns()) {
entityFields.add(createEntityField(javaClass, databaseColumn));
}
if (childEntities != null) {
for (CreateEntityItemRequestDTO child : childEntities) {
String entityChildClassName = UtilityString.sqlToCamelCase(child.getTableName());
entityChildClassName = entityChildClassName.substring(0, 1).toUpperCase() + entityChildClassName.substring(1);
final FieldDeclaration fieldDeclaration = javaClass.addField(
"List<" + entityChildClassName + ">",
entityChildClassName.substring(0, 1).toLowerCase() + entityChildClassName.substring(1),
PRIVATE);
entityFields.add(fieldDeclaration);
fieldDeclaration.addAnnotation(EntityChild.class);
}
}
for (FieldDeclaration field : entityFields) {
field.createGetter();
field.createSetter()
.setType(javaClassName)
.getBody().ifPresent(x -> x.addStatement(new ReturnStmt("this")));
}
if (childEntities != null && !childEntities.isEmpty()) {
createDeleteChildsMethod(javaClass, childEntities);
}
return javaClassCompilation;
}
private FieldDeclaration createEntityField(ClassOrInterfaceDeclaration javaClass, DatabaseTableColumn databaseColumn) throws Exception {
final Class<?> aClass = UtilityDB.sqlTypeToJavaClass(databaseColumn.getDataType().toSqlDataType());
FieldDeclaration fieldDeclaration = javaClass.addField(aClass, UtilityString.sqlToField(databaseColumn.getColumnName()), PRIVATE);
//Create @PK annotation
if (databaseColumn.isPrimaryKey())
fieldDeclaration.addAnnotation(PK.class);
if (databaseColumn.isIdentity())
fieldDeclaration.addAnnotation(Identity.class);
//Create @SqlField annotation
final NormalAnnotationExpr sqlFieldAnnotation = fieldDeclaration.addAndGetAnnotation(SqlField.class)
.addPair("value", new StringLiteralExpr(databaseColumn.getColumnName()));
if (databaseColumn.getCharacterMaximumLength() != null)
sqlFieldAnnotation.addPair("maxLength", new IntegerLiteralExpr(databaseColumn.getCharacterMaximumLength().toString()));
sqlFieldAnnotation
.addPair("nullable", new BooleanLiteralExpr(databaseColumn.isNullable()));
// if (databaseColumn.getColumnDefault() != null)
// sqlFieldValues.add(new MemberValuePair("defaultObjectValue", new StringLiteralExpr(databaseColumn.getColumnDefault())));
//Create @FK annotations
if (databaseColumn.getForeignKeys() != null) {
for (DatabaseForeignKey fkInfo : databaseColumn.getForeignKeys()) {
String javaClassName = UtilityString.sqlToCamelCase(fkInfo.getTableName());
javaClassName = javaClassName.substring(0, 1).toUpperCase() + javaClassName.substring(1);
fieldDeclaration.addAndGetAnnotation(FK.class)
.addPair("tableName", new FieldAccessExpr(new NameExpr(javaClassName), "ENTITY"))
.addPair("columnName", new StringLiteralExpr(fkInfo.getColumnName()));
}
}
return fieldDeclaration;
}
private MethodDeclaration createDeleteChildsMethod(ClassOrInterfaceDeclaration classDefinition, final List<CreateEntityItemRequestDTO> childEntities) {
final MethodDeclaration deleteChilds = classDefinition.addMethod("deleteChilds", PROTECTED);
deleteChilds.addThrownException(Exception.class);
final BlockStmt blockStmt = deleteChilds.getBody().get();
for (CreateEntityItemRequestDTO childEntity : childEntities) {
String entityChildClassName = UtilityString.sqlToCamelCase(childEntity.getTableName());
entityChildClassName = entityChildClassName.substring(0, 1).toUpperCase() + entityChildClassName.substring(1);
String variableName = entityChildClassName.substring(0, 1).toLowerCase() + entityChildClassName.substring(1);
ClassOrInterfaceType classOrInterfaceType = new ClassOrInterfaceType()
.setName(entityChildClassName);
final VariableDeclarationExpr variableDeclarationExpr = new VariableDeclarationExpr(classOrInterfaceType, variableName);
variableDeclarationExpr.getVariable(0).setInitializer("new " + entityChildClassName + "()");
blockStmt.addStatement(
new ExpressionStmt(variableDeclarationExpr));
final NodeList<Expression> nodes = new NodeList<>();
nodes.add(new NameExpr("connection"));
nodes.add(new NameExpr("this"));
MethodCallExpr methodCallExpr = new MethodCallExpr(variableDeclarationExpr.getVariable(0).getNameAsExpression(), "deleteAllEntities", nodes);
blockStmt.addStatement(methodCallExpr);
}
return null;
}
private void writeJavaClassToFile(CompilationUnit classDefinition, String directoryPath, String nameAsString) throws Exception {
String filePath = directoryPath + nameAsString + ".java";
File f = new File(filePath);
if (f.exists()) throw new Exception("Esiste già un file per " + nameAsString);
FileOutputStream outputStream = new FileOutputStream(filePath);
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, StandardCharsets.UTF_8);
outputStreamWriter.write(classDefinition.toString());
outputStreamWriter.close();
outputStream.close();
}
}

View File

@@ -0,0 +1,25 @@
package it.integry.ems.entity_development.dto;
public class CreateEntityItemRequestDTO {
private String tableName;
private boolean master;
public String getTableName() {
return tableName;
}
public CreateEntityItemRequestDTO setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public boolean isMaster() {
return master;
}
public CreateEntityItemRequestDTO setMaster(boolean master) {
this.master = master;
return this;
}
}

View File

@@ -5,6 +5,7 @@ import com.microsoft.sqlserver.jdbc.SQLServerException;
import it.integry.ems.entity_logger.db_schema_manager.dto.*;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityHashMap;
import it.integry.ems_model.utility.UtilityLocalDate;
import it.integry.ems_model.utility.UtilityString;
import org.apache.commons.lang3.StringUtils;
@@ -32,6 +33,10 @@ public class SQLServerDBSchemaManager {
this.mPassword = password;
}
public SQLServerDBSchemaManager(Connection connection) {
this.mConnection = connection;
}
public void connect() throws SQLException {
mConnection = DriverManager.getConnection(getConnectionString(mHost), mUsername, mPassword);
mConnection.setTransactionIsolation(java.sql.Connection.TRANSACTION_READ_UNCOMMITTED);
@@ -78,43 +83,161 @@ public class SQLServerDBSchemaManager {
}
public List<DatabaseTable> getTables() throws Exception {
List<DatabaseTable> tableList = new ArrayList<>();
String sql = "SELECT TABLE_CATALOG," +
" TABLE_SCHEMA," +
" TABLE_NAME," +
" COLUMN_NAME," +
" ORDINAL_POSITION," +
" COLUMN_DEFAULT," +
" CAST(CASE WHEN IS_NULLABLE = 'YES' THEN 1 ELSE 0 END AS BIT) AS IS_NULLABLE," +
" DATA_TYPE," +
" CHARACTER_MAXIMUM_LENGTH," +
" CHARACTER_OCTET_LENGTH," +
" NUMERIC_PRECISION," +
" NUMERIC_PRECISION_RADIX," +
" NUMERIC_SCALE," +
" DATETIME_PRECISION," +
" CHARACTER_SET_CATALOG," +
" CHARACTER_SET_SCHEMA," +
" CHARACTER_SET_NAME," +
" COLLATION_CATALOG," +
" COLLATION_SCHEMA," +
" COLLATION_NAME," +
" DOMAIN_CATALOG," +
" DOMAIN_SCHEMA," +
" DOMAIN_NAME" +
" FROM INFORMATION_SCHEMA.COLUMNS" +
" INNER JOIN sys.objects ON TABLE_NAME = name " +
" WHERE type = " + UtilityDB.valueToString(DatabaseObjectTypeEnum.TABLE.getText());
public DatabaseTableView getTable(String tableName) throws Exception {
String sql = "SELECT TABLE_CATALOG,\n" +
" COLUMNS.TABLE_SCHEMA,\n" +
" COLUMNS.TABLE_NAME,\n" +
" COLUMNS.COLUMN_NAME,\n" +
" ISNULL(IS_PRIMARY_KEY, 0) AS IS_PRIMARY_KEY,\n" +
" CAST(OBJECTPROPERTY(OBJECT_ID(COLUMNS.TABLE_NAME), 'TableHasIdentity') AS BIT) AS TABLE_HAS_IDENTITY,\n" +
" ORDINAL_POSITION,\n" +
" COLUMN_DEFAULT,\n" +
" CAST(CASE WHEN IS_NULLABLE = 'YES' THEN 1 ELSE 0 END AS BIT) AS IS_NULLABLE,\n" +
" DATA_TYPE,\n" +
" CHARACTER_MAXIMUM_LENGTH,\n" +
" CHARACTER_OCTET_LENGTH,\n" +
" NUMERIC_PRECISION,\n" +
" NUMERIC_PRECISION_RADIX,\n" +
" NUMERIC_SCALE,\n" +
" DATETIME_PRECISION,\n" +
" CHARACTER_SET_CATALOG,\n" +
" CHARACTER_SET_SCHEMA,\n" +
" CHARACTER_SET_NAME,\n" +
" COLLATION_CATALOG,\n" +
" COLLATION_SCHEMA,\n" +
" COLLATION_NAME,\n" +
" DOMAIN_CATALOG,\n" +
" DOMAIN_SCHEMA,\n" +
" DOMAIN_NAME\n" +
"FROM INFORMATION_SCHEMA.COLUMNS\n" +
" INNER JOIN sys.objects ON TABLE_NAME = name\n" +
" LEFT OUTER JOIN (SELECT TABLE_NAME,\n" +
" TABLE_SCHEMA,\n" +
" COLUMN_NAME,\n" +
" CAST(1 AS BIT) AS IS_PRIMARY_KEY\n" +
" FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE\n" +
" WHERE OBJECTPROPERTY(OBJECT_ID(CONSTRAINT_SCHEMA + '.' + QUOTENAME(CONSTRAINT_NAME)),\n" +
" 'IsPrimaryKey') = 1) pk\n" +
" ON pk.TABLE_NAME = COLUMNS.TABLE_NAME AND\n" +
" pk.COLUMN_NAME = COLUMNS.COLUMN_NAME AND\n" +
" pk.TABLE_SCHEMA = COLUMNS.TABLE_SCHEMA\n" +
" WHERE type = " + UtilityDB.valueToString(DatabaseObjectTypeEnum.TABLE.getText()) +
" AND COLUMNS.TABLE_NAME = " + UtilityDB.valueToString(tableName);
List<HashMap<String, Object>> result = UtilityDB.executeSimpleQuery(this.mConnection, sql);
if (result.isEmpty())
return null;
HashMap<String, ArrayList<DatabaseForeignKey>> foreignKeysResults = getForeignKeys(tableName);
DatabaseTableView databaseTable = new DatabaseTableView()
.setTableName(tableName);
List<DatabaseTableColumn> databaseTableColumns = new ArrayList<>();
for (HashMap<String, Object> column : result) {
DatabaseTableColumn databaseTableColumn = new DatabaseTableColumn()
.setColumnName(UtilityHashMap.getValueIfExists(column, "COLUMN_NAME"))
.setOrdinalPosition(UtilityHashMap.getValueIfExists(column, "ORDINAL_POSITION"))
.setColumnDefault(UtilityHashMap.getValueIfExists(column, "COLUMN_DEFAULT"))
.setNullable(UtilityHashMap.getValueIfExists(column, "IS_NULLABLE"))
.setPrimaryKey(UtilityHashMap.getValueIfExists(column, "IS_PRIMARY_KEY"))
.setDataType(DatabaseTableColumnDataType.fromString(UtilityHashMap.getValueIfExists(column, "DATA_TYPE")))
.setCharacterMaximumLength(UtilityHashMap.getValueIfExists(column, "CHARACTER_MAXIMUM_LENGTH"))
.setCharacterOctetLength(UtilityHashMap.getValueIfExists(column, "CHARACTER_OCTET_LENGTH"))
.setNumericPrecision(UtilityHashMap.getValueIfExists(column, "NUMERIC_PRECISION"))
.setNumericPrecisionRadix(UtilityHashMap.getValueIfExists(column, "NUMERIC_PRECISION_RADIX"))
.setNumericScale(UtilityHashMap.getValueIfExists(column, "NUMERIC_SCALE"))
.setDatetimePrecision(UtilityHashMap.getValueIfExists(column, "DATETIME_PRECISION"))
.setCharacterSetCatalog(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_CATALOG"))
.setCharacterSetSchema(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_SCHEMA"))
.setCharacterSetName(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_NAME"));
databaseTableColumn.setIdentity(databaseTableColumn.isPrimaryKey() && UtilityHashMap.<Boolean>getValueIfExists(column, "TABLE_HAS_IDENTITY"));
if (foreignKeysResults.containsKey(databaseTableColumn.getColumnName()))
databaseTableColumn.setForeignKeys(foreignKeysResults.get(databaseTableColumn.getColumnName()));
databaseTableColumns.add(databaseTableColumn);
}
databaseTable.setColumns(databaseTableColumns);
return databaseTable;
}
public List<DatabaseTable> getTables() throws Exception {
return getTablesOrViews(DatabaseObjectTypeEnum.TABLE, DatabaseTable.class);
}
public List<DatabaseView> getViews() throws Exception {
return getTablesOrViews(DatabaseObjectTypeEnum.VIEW, DatabaseView.class);
}
private <T extends DatabaseTableView> List<T> getTablesOrViews(DatabaseObjectTypeEnum type, Class<T> classType) throws Exception {
List<T> tableList = new ArrayList<>();
String sql = "SELECT TABLE_CATALOG,\n" +
" COLUMNS.TABLE_SCHEMA,\n" +
" COLUMNS.TABLE_NAME,\n" +
" COLUMNS.COLUMN_NAME,\n" +
" ISNULL(IS_PRIMARY_KEY, 0) AS IS_PRIMARY_KEY,\n" +
" CAST(OBJECTPROPERTY(OBJECT_ID(COLUMNS.TABLE_NAME), 'TableHasIdentity') AS BIT) AS TABLE_HAS_IDENTITY,\n" +
" ORDINAL_POSITION,\n" +
" COLUMN_DEFAULT,\n" +
" CAST(CASE WHEN IS_NULLABLE = 'YES' THEN 1 ELSE 0 END AS BIT) AS IS_NULLABLE,\n" +
" DATA_TYPE,\n" +
" CHARACTER_MAXIMUM_LENGTH,\n" +
" CHARACTER_OCTET_LENGTH,\n" +
" NUMERIC_PRECISION,\n" +
" NUMERIC_PRECISION_RADIX,\n" +
" NUMERIC_SCALE,\n" +
" DATETIME_PRECISION,\n" +
" CHARACTER_SET_CATALOG,\n" +
" CHARACTER_SET_SCHEMA,\n" +
" CHARACTER_SET_NAME,\n" +
" COLLATION_CATALOG,\n" +
" COLLATION_SCHEMA,\n" +
" COLLATION_NAME,\n" +
" DOMAIN_CATALOG,\n" +
" DOMAIN_SCHEMA,\n" +
" DOMAIN_NAME,\n" +
" CAST(create_date AS DATE) AS CREATE_DATE\n" +
"FROM INFORMATION_SCHEMA.COLUMNS\n" +
" INNER JOIN sys.objects ON TABLE_NAME = name\n" +
" LEFT OUTER JOIN (SELECT TABLE_NAME,\n" +
" TABLE_SCHEMA,\n" +
" COLUMN_NAME,\n" +
" CAST(1 AS BIT) AS IS_PRIMARY_KEY\n" +
" FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE\n" +
" WHERE OBJECTPROPERTY(OBJECT_ID(CONSTRAINT_SCHEMA + '.' + QUOTENAME(CONSTRAINT_NAME)),\n" +
" 'IsPrimaryKey') = 1) pk\n" +
" ON pk.TABLE_NAME = COLUMNS.TABLE_NAME AND\n" +
" pk.COLUMN_NAME = COLUMNS.COLUMN_NAME AND\n" +
" pk.TABLE_SCHEMA = COLUMNS.TABLE_SCHEMA\n" +
" WHERE type = " + UtilityDB.valueToString(type.getText());
List<HashMap<String, Object>> result = UtilityDB.executeSimpleQuery(this.mConnection, sql);
final HashMap<String, HashMap<String, ArrayList<DatabaseForeignKey>>> foreignKeys = getForeignKeys();
Stream.of(result)
.groupBy(x -> UtilityHashMap.<String>getValueIfExists(x, "TABLE_NAME"))
.forEach(x -> {
DatabaseTable databaseTable = new DatabaseTable()
.setTableName(x.getKey());
T databaseTable = null;
try {
databaseTable = (T) classType.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
throw new RuntimeException(e);
}
databaseTable
.setTableName(x.getKey())
.setCreationDate(UtilityLocalDate.localDateFromDate(UtilityHashMap.getValueIfExists(x.getValue().get(0), "CREATE_DATE")));
HashMap<String, ArrayList<DatabaseForeignKey>> foreignKeysResults = foreignKeys.getOrDefault(x.getKey(), new HashMap<>());
List<DatabaseTableColumn> databaseTableColumns = new ArrayList<>();
for (HashMap<String, Object> column : x.getValue()) {
@@ -124,6 +247,7 @@ public class SQLServerDBSchemaManager {
.setOrdinalPosition(UtilityHashMap.getValueIfExists(column, "ORDINAL_POSITION"))
.setColumnDefault(UtilityHashMap.getValueIfExists(column, "COLUMN_DEFAULT"))
.setNullable(UtilityHashMap.getValueIfExists(column, "IS_NULLABLE"))
.setPrimaryKey(UtilityHashMap.getValueIfExists(column, "IS_PRIMARY_KEY"))
.setDataType(DatabaseTableColumnDataType.fromString(UtilityHashMap.getValueIfExists(column, "DATA_TYPE")))
.setCharacterMaximumLength(UtilityHashMap.getValueIfExists(column, "CHARACTER_MAXIMUM_LENGTH"))
.setCharacterOctetLength(UtilityHashMap.getValueIfExists(column, "CHARACTER_OCTET_LENGTH"))
@@ -135,6 +259,12 @@ public class SQLServerDBSchemaManager {
.setCharacterSetSchema(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_SCHEMA"))
.setCharacterSetName(UtilityHashMap.getValueIfExists(column, "CHARACTER_SET_NAME"));
Boolean tableHasIdentity = UtilityHashMap.<Boolean>getValueIfExists(column, "TABLE_HAS_IDENTITY", false);
databaseTableColumn.setIdentity(databaseTableColumn.isPrimaryKey() && tableHasIdentity != null && tableHasIdentity);
if (foreignKeysResults != null && foreignKeysResults.containsKey(databaseTableColumn.getColumnName()))
databaseTableColumn.setForeignKeys(foreignKeysResults.get(databaseTableColumn.getColumnName()));
databaseTableColumns.add(databaseTableColumn);
}
@@ -146,7 +276,91 @@ public class SQLServerDBSchemaManager {
return tableList;
}
public String createTableSyntax(DatabaseTable databaseTable) throws Exception {
private HashMap<String, HashMap<String, ArrayList<DatabaseForeignKey>>> getForeignKeys() throws Exception {
String sql = "SELECT DISTINCT\n" +
" tab1.name AS [table],\n" +
" col1.name AS [column],\n" +
" tab2.name AS [referenced_table],\n" +
" col2.name AS [referenced_column]\n" +
" FROM sys.foreign_key_columns fkc\n" +
" INNER JOIN sys.objects obj\n" +
" ON obj.object_id = fkc.constraint_object_id\n" +
" INNER JOIN sys.tables tab1\n" +
" ON tab1.object_id = fkc.parent_object_id\n" +
" INNER JOIN sys.schemas sch\n" +
" ON tab1.schema_id = sch.schema_id\n" +
" INNER JOIN sys.columns col1\n" +
" ON col1.column_id = parent_column_id AND col1.object_id = tab1.object_id\n" +
" INNER JOIN sys.tables tab2\n" +
" ON tab2.object_id = fkc.referenced_object_id\n" +
" INNER JOIN sys.columns col2\n" +
" ON col2.column_id = referenced_column_id AND col2.object_id = tab2.object_id";
List<HashMap<String, Object>> resultList = UtilityDB.executeSimpleQuery(this.mConnection, sql);
HashMap<String, HashMap<String, ArrayList<DatabaseForeignKey>>> allTablesResult = new HashMap<>();
Stream.of(resultList)
.groupBy(x -> UtilityHashMap.<String>getValueIfExists(x, "table"))
.forEach(x -> {
HashMap<String, ArrayList<DatabaseForeignKey>> hashMap = new HashMap<>();
for (HashMap<String, Object> resultRow : x.getValue()) {
if (!hashMap.containsKey(UtilityHashMap.<String>getValueIfExists(resultRow, "column")))
hashMap.put(UtilityHashMap.getValueIfExists(resultRow, "column"), new ArrayList<>());
hashMap.get(UtilityHashMap.<String>getValueIfExists(resultRow, "column"))
.add(new DatabaseForeignKey()
.setColumnName(UtilityHashMap.getValueIfExists(resultRow, "referenced_column"))
.setTableName(UtilityHashMap.getValueIfExists(resultRow, "referenced_table")));
}
allTablesResult.put(x.getKey(), hashMap);
});
return allTablesResult;
}
private HashMap<String, ArrayList<DatabaseForeignKey>> getForeignKeys(String tableName) throws Exception {
String sql = "SELECT DISTINCT\n" +
" tab1.name AS [table],\n" +
" col1.name AS [column],\n" +
" tab2.name AS [referenced_table],\n" +
" col2.name AS [referenced_column]\n" +
" FROM sys.foreign_key_columns fkc\n" +
" INNER JOIN sys.objects obj\n" +
" ON obj.object_id = fkc.constraint_object_id\n" +
" INNER JOIN sys.tables tab1\n" +
" ON tab1.object_id = fkc.parent_object_id\n" +
" INNER JOIN sys.schemas sch\n" +
" ON tab1.schema_id = sch.schema_id\n" +
" INNER JOIN sys.columns col1\n" +
" ON col1.column_id = parent_column_id AND col1.object_id = tab1.object_id\n" +
" INNER JOIN sys.tables tab2\n" +
" ON tab2.object_id = fkc.referenced_object_id\n" +
" INNER JOIN sys.columns col2\n" +
" ON col2.column_id = referenced_column_id AND col2.object_id = tab2.object_id\n" +
" WHERE tab1.name = " + UtilityDB.valueToString(tableName);
List<HashMap<String, Object>> resultList = UtilityDB.executeSimpleQuery(this.mConnection, sql);
HashMap<String, ArrayList<DatabaseForeignKey>> hashMap = new HashMap<>();
for (HashMap<String, Object> resultRow : resultList) {
if (!hashMap.containsKey(UtilityHashMap.<String>getValueIfExists(resultRow, "column")))
hashMap.put(UtilityHashMap.getValueIfExists(resultRow, "column"), new ArrayList<>());
hashMap.get(UtilityHashMap.<String>getValueIfExists(resultRow, "column"))
.add(new DatabaseForeignKey()
.setColumnName(UtilityHashMap.getValueIfExists(resultRow, "referenced_column"))
.setTableName(UtilityHashMap.getValueIfExists(resultRow, "referenced_table")));
}
return hashMap;
}
public String createTableSyntax(DatabaseTableView databaseTable) throws Exception {
StringBuilder sb = new StringBuilder();
sb.append("CREATE TABLE [" + databaseTable.getTableName() + "] (");
@@ -161,14 +375,29 @@ public class SQLServerDBSchemaManager {
return sb.toString();
}
public void createTable(DatabaseTable databaseTable) throws Exception {
public void createTable(DatabaseTableView databaseTable) throws Exception {
String sql = createTableSyntax(databaseTable);
execTableAlterSQL(sql);
this.mConnection.commit();
}
public String addTableColumnsSyntax(DatabaseTable deltaTable) throws Exception {
public void dropTable(DatabaseTable databaseTable) throws Exception {
String dropSql = "DROP TABLE " + databaseTable.getTableName();
execTableAlterSQL(dropSql);
this.mConnection.commit();
}
public void dropView(DatabaseView databaseTable) throws Exception {
String dropSql = "DROP VIEW " + databaseTable.getTableName();
execTableAlterSQL(dropSql);
this.mConnection.commit();
}
public String addTableColumnsSyntax(DatabaseTableView deltaTable) throws Exception {
StringBuilder sb = new StringBuilder();
sb.append("ALTER TABLE [" + deltaTable.getTableName() + "] ADD ");
@@ -184,7 +413,7 @@ public class SQLServerDBSchemaManager {
return sb.toString();
}
public void addTableColumns(DatabaseTable deltaTable) throws Exception {
public void addTableColumns(DatabaseTableView deltaTable) throws Exception {
String sql = addTableColumnsSyntax(deltaTable);
execTableAlterSQL(sql);
@@ -192,6 +421,27 @@ public class SQLServerDBSchemaManager {
}
public List<String> generateAlterTableToDisableAnsiPadding() throws SQLException {
return UtilityDB.executeSimpleQueryOnlyFirstColumn(this.mConnection, "SELECT 'ALTER TABLE ' + OBJECT_SCHEMA_NAME(sys.objects.object_id) + '.' + \n" +
" sys.objects.name + ' ALTER COLUMN [' + sys.columns.name + '] ' + \n" +
" sys.types.name + CASE WHEN sys.types.name IN ('text','ntext') THEN ''\n" +
" WHEN sys.types.name IN ('char','varchar') \n" +
" THEN '('+IIF(sys.columns.max_length = -1, 'MAX', CAST(sys.columns.max_length AS varchar(10)))+')'\n" +
" WHEN sys.types.name IN ('nchar','nvarchar') \n" +
" THEN '('+CAST(sys.columns.max_length/2 AS varchar(10))+')' END +\n" +
" ' ' + CASE WHEN sys.columns.is_nullable = 0 \n" +
" THEN 'NOT NULL' ELSE 'NULL' END\n" +
"FROM sys.columns\n" +
"JOIN sys.types\n" +
" ON sys.columns.user_type_id = sys.types.user_type_id\n" +
"JOIN sys.objects\n" +
" ON sys.columns.object_id = sys.objects.object_id\n" +
"WHERE is_ansi_padded = 0\n" +
" AND sys.types.name in ('char','varchar')\n" +
" AND sys.objects.type = 'U'");
}
private String generateAddColumnSyntax(DatabaseTableColumn tableColumn) {
String columnSize = null;

View File

@@ -0,0 +1,29 @@
package it.integry.ems.entity_logger.db_schema_manager.dto;
import it.integry.ems_model.annotation.SqlField;
public class DatabaseForeignKey {
@SqlField("referenced_table")
private String tableName;
@SqlField("referenced_column")
private String columnName;
public String getTableName() {
return tableName;
}
public DatabaseForeignKey setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public String getColumnName() {
return columnName;
}
public DatabaseForeignKey setColumnName(String columnName) {
this.columnName = columnName;
return this;
}
}

View File

@@ -1,37 +1,10 @@
package it.integry.ems.entity_logger.db_schema_manager.dto;
import java.util.ArrayList;
import java.util.List;
public class DatabaseTable extends DatabaseTableView {
public class DatabaseTable implements Cloneable {
private final DatabaseObjectTypeEnum type = DatabaseObjectTypeEnum.TABLE;
private String tableName;
private List<DatabaseTableColumn> columns = new ArrayList<>();
public String getTableName() {
return tableName;
}
public DatabaseTable setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public List<DatabaseTableColumn> getColumns() {
return columns;
}
public DatabaseTable setColumns(List<DatabaseTableColumn> columns) {
this.columns = columns;
return this;
}
@Override
public DatabaseTable clone() {
try {
return (DatabaseTable) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError();
}
public DatabaseObjectTypeEnum getType() {
return type;
}
}

View File

@@ -1,11 +1,15 @@
package it.integry.ems.entity_logger.db_schema_manager.dto;
import java.util.ArrayList;
public class DatabaseTableColumn {
private String columnName;
private Integer ordinalPosition;
private String columnDefault;
private boolean nullable;
private boolean primaryKey;
private boolean identity;
private DatabaseTableColumnDataType dataType;
private Integer characterMaximumLength;
private Integer characterOctetLength;
@@ -17,6 +21,8 @@ public class DatabaseTableColumn {
private String characterSetSchema;
private String characterSetName;
private ArrayList<DatabaseForeignKey> foreignKeys;
public String getColumnName() {
return columnName;
}
@@ -142,4 +148,31 @@ public class DatabaseTableColumn {
this.characterSetName = characterSetName;
return this;
}
public ArrayList<DatabaseForeignKey> getForeignKeys() {
return foreignKeys;
}
public DatabaseTableColumn setForeignKeys(ArrayList<DatabaseForeignKey> foreignKeys) {
this.foreignKeys = foreignKeys;
return this;
}
public boolean isPrimaryKey() {
return primaryKey;
}
public DatabaseTableColumn setPrimaryKey(boolean primaryKey) {
this.primaryKey = primaryKey;
return this;
}
public boolean isIdentity() {
return identity;
}
public DatabaseTableColumn setIdentity(boolean identity) {
this.identity = identity;
return this;
}
}

View File

@@ -1,5 +1,7 @@
package it.integry.ems.entity_logger.db_schema_manager.dto;
import java.sql.Types;
public enum DatabaseTableColumnDataType {
BIGINT("bigint"),
@@ -38,7 +40,7 @@ public enum DatabaseTableColumnDataType {
GEOGRAPHY("geography");
private String text;
private final String text;
private DatabaseTableColumnDataType(String text) {
this.text = text;
@@ -55,4 +57,52 @@ public enum DatabaseTableColumnDataType {
return this.text;
}
public int toSqlDataType() throws Exception {
switch (this) {
case BIGINT:
return Types.BIGINT;
case BIT:
return Types.BIT;
case DECIMAL:
return Types.DECIMAL;
case INT:
return Types.INTEGER;
case NUMERIC:
return Types.NUMERIC;
case SMALLINT:
return Types.SMALLINT;
case TINYINT:
return Types.TINYINT;
case FLOAT:
return Types.FLOAT;
case REAL:
return Types.REAL;
case DATE:
case DATETIME:
case DATETIME2:
case SMALLDATETIME:
return Types.DATE;
case TIME:
return Types.TIME;
case TIMESTAMP:
return Types.TIMESTAMP;
case CHAR:
return Types.CHAR;
case NCHAR:
return Types.NCHAR;
case VARCHAR:
case TEXT:
return Types.VARCHAR;
case NVARCHAR:
case NTEXT:
return Types.NVARCHAR;
case BINARY:
return Types.BINARY;
case VARBINARY:
return Types.VARBINARY;
}
throw new Exception("Type not recognized");
}
}

View File

@@ -0,0 +1,48 @@
package it.integry.ems.entity_logger.db_schema_manager.dto;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
public class DatabaseTableView implements Cloneable {
private String tableName;
private LocalDate creationDate;
private List<DatabaseTableColumn> columns = new ArrayList<>();
public String getTableName() {
return tableName;
}
public DatabaseTableView setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public LocalDate getCreationDate() {
return creationDate;
}
public DatabaseTableView setCreationDate(LocalDate creationDate) {
this.creationDate = creationDate;
return this;
}
public List<DatabaseTableColumn> getColumns() {
return columns;
}
public DatabaseTableView setColumns(List<DatabaseTableColumn> columns) {
this.columns = columns;
return this;
}
@Override
public DatabaseTableView clone() {
try {
return (DatabaseTableView) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError();
}
}
}

View File

@@ -0,0 +1,10 @@
package it.integry.ems.entity_logger.db_schema_manager.dto;
public class DatabaseView extends DatabaseTableView {
private final DatabaseObjectTypeEnum type = DatabaseObjectTypeEnum.VIEW;
public DatabaseObjectTypeEnum getType() {
return type;
}
}

View File

@@ -3,12 +3,8 @@ package it.integry.ems.entity_logger.service;
import com.annimon.stream.Optional;
import com.annimon.stream.Stream;
import it.integry.annotations.PostContextConstruct;
import it.integry.ems.dynamic_cache.DynamicCacheService;
import it.integry.ems.entity_logger.db_schema_manager.component.SQLServerDBSchemaManager;
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseFile;
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseTable;
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseTableColumn;
import it.integry.ems.entity_logger.db_schema_manager.dto.DatabaseTableColumnDataType;
import it.integry.ems.entity_logger.db_schema_manager.dto.*;
import it.integry.ems.looper.service.LooperService;
import it.integry.ems.settings.Model.AvailableConnectionsModel;
import it.integry.ems.settings.Model.SettingsModel;
@@ -130,16 +126,16 @@ public class EntityLoggerComponent {
for (DatabaseTable sourceTable : sourceTables) {
Optional<DatabaseTable> optDestTable = Stream.of(destTables)
java.util.Optional<DatabaseTable> optDestTable = destTables.stream()
.filter(x -> x.getTableName().equalsIgnoreCase(sourceTable.getTableName()))
.findFirst();
DatabaseTable destTable;
DatabaseTableView destTable;
StringBuilder sb = new StringBuilder();
if (optDestTable.isEmpty()) {
if (!optDestTable.isPresent()) {
Stream.of(sourceTable.getColumns())
sourceTable.getColumns()
.forEach(x -> x.setNullable(true));
int maxOrdinalPosition = Stream.of(sourceTable.getColumns())
@@ -182,7 +178,7 @@ public class EntityLoggerComponent {
} else {
destTable = optDestTable.get();
DatabaseTable cloneDatabaseTableADD = destTable.clone();
DatabaseTable cloneDatabaseTableADD = (DatabaseTable) destTable.clone();
cloneDatabaseTableADD.setColumns(new ArrayList<>());
List<DatabaseTableColumn> sourceColumns = sourceTable.getColumns();

View File

@@ -1,7 +1,7 @@
package it.integry.ems.exception;
public class MissingDataException extends Exception {
public MissingDataException(String method) {
super("Dati mancanti in " + method);
public MissingDataException(String error) {
super("Dati mancanti: " + error);
}
}

View File

@@ -1,7 +1,9 @@
package it.integry.ems.expansion;
import java.sql.SQLException;
public interface RunnableArgsWithReturn<T, R> {
R run(T data);
R run(T data) throws SQLException;
}

View File

@@ -1,6 +1,5 @@
package it.integry.ems.export.base;
import com.annimon.stream.Optional;
import com.annimon.stream.Stream;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.exc.MismatchedInputException;
@@ -20,7 +19,7 @@ import it.integry.ems.file_sharer.sharers.ftp.FTPFileSharerSettings;
import it.integry.ems.file_sharer.sharers.sftp.SFTPFileAttachment;
import it.integry.ems.file_sharer.sharers.sftp.SFTPFileSharer;
import it.integry.ems.file_sharer.sharers.sftp.SFTPFileSharerSettings;
import it.integry.ems.json.JSONObjectMapper;
import it.integry.ems.json.ResponseJSONObjectMapper;
import it.integry.ems.properties.EmsProperties;
import it.integry.ems.response.EsitoType;
import it.integry.ems.response.FileItem;
@@ -29,7 +28,6 @@ import it.integry.ems.service.HttpRestWrapper;
import it.integry.ems.service.MailService;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems.utility.UtilityDirs;
import it.integry.ems_model.entity.Azienda;
import it.integry.ems_model.entity.WtbUsersInfo;
import it.integry.ems_model.service.SetupGest;
import it.integry.ems_model.utility.UtilityString;
@@ -41,8 +39,10 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.web.context.ContextLoader;
import java.io.*;
import java.net.URL;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -251,7 +251,7 @@ public abstract class BaseEntityExporter implements IEntityExporter {
case WEBSERVICES:
JSONObjectMapper objectMapper = new JSONObjectMapper();
ResponseJSONObjectMapper objectMapper = new ResponseJSONObjectMapper();
String url = wtbUserInfo.getWsEndpoint();
@@ -399,7 +399,7 @@ public abstract class BaseEntityExporter implements IEntityExporter {
}
}
if (counterTotalSend > 0 && counterFailedSend != 0 && retException != null) {
if (counterTotalSend > 0 && counterFailedSend != counterTotalSend && retException != null) {
//Se gli invii precedenti sono andati bene usciamo
throw retException;
}
@@ -421,20 +421,10 @@ public abstract class BaseEntityExporter implements IEntityExporter {
private void sendNotificationMail(String notificationEmail) {
try {
String nomeDitta = Azienda.getDefaultAzienda(multiDBTransactionManager.getPrimaryConnection()).getNomeDitta();
String mailSubject = String.format("Esportazione di %s - %s (%s)", getType(), getFormat(), nomeDitta);
URL url = new URL("https://www2.studioml.it/ems-api/mail_models/info_mail.php");
InputStream is = url.openStream();
String htmlMailBody = IOUtils.toString(is);
htmlMailBody = htmlMailBody.replaceAll("%%USER%%", "cliente");
htmlMailBody = htmlMailBody.replaceAll("%%MESSAGE%%", String.format("come da accordi, l'esportazione %s - %s &egrave; stata completata.", getType(), getFormat()));
htmlMailBody = htmlMailBody.replaceAll("%%NOME_DITTA%%", nomeDitta);
MailService mailService = ContextLoader.getCurrentWebApplicationContext().getBean(MailService.class);
mailService.sendMailPrimary(null, null, notificationEmail, null, null, mailSubject, htmlMailBody, true, false, null, null, null);
mailService.sendInfoMail(multiDBTransactionManager, notificationEmail,
String.format("Esportazione di %s - %s", getType(), getFormat()),
String.format("come da accordi, l'esportazione %s - %s &egrave; stata completata.", getType(), getFormat()));
} catch (Exception e) {
e.printStackTrace();

View File

@@ -11,6 +11,7 @@ public enum EntityExportType {
ORDINI("ORDINI"),
ORDINI_ACQUISTO("ORDINI ACQUISTO"),
ORDINI_VENDITA("ORDINI VENDITA"),
RISORSE_UMANE("RISORSE UMANE"),
MOVIMENTI_CONTABILI("MOVIMENTI CONTABILI"),
OFFERTE("OFFERTE"),
RAPPORTINI("RAPPORTINI"),

View File

@@ -2,7 +2,7 @@ package it.integry.ems.javabeans;
import com.fasterxml.jackson.annotation.JsonInclude;
import it.integry.common.var.CommonConstants;
import it.integry.ems.json.JSONObjectMapper;
import it.integry.ems.json.ResponseJSONObjectMapper;
import it.integry.ems.model.IntegryApplicationEnum;
import it.integry.ems.user.dto.UserDTO;
import it.integry.ems_model.config.EmsRestConstants;
@@ -31,7 +31,7 @@ public class RequestDataDTO {
private HttpServletRequest request;
@Autowired
private JSONObjectMapper jsonObjectMapper;
private ResponseJSONObjectMapper jsonObjectMapper;
private String requestURI;
private String requestClientIP;
@@ -89,9 +89,9 @@ public class RequestDataDTO {
}
if (shouldIncludeNulls()) {
jsonObjectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
} else {
jsonObjectMapper.setSerializationInclusion(JsonInclude.Include.USE_DEFAULTS);
} else {
jsonObjectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
}
}

View File

@@ -1,74 +0,0 @@
package it.integry.ems.json;
import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import it.integry.ems.adapter.*;
import it.integry.ems.response.EsitoType;
import it.integry.ems.schedule.new_cron_job.controller.AutomatedOperationController;
import it.integry.ems.schedule.new_cron_job.dto.operations.base_classes.BaseAutomatedOperationDTO;
import it.integry.ems_model.base.ComposedEntityBase;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.resolver.EntitySubTypeHolder;
import org.reflections.Reflections;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.Set;
public class CommonObjectMapper extends ObjectMapper {
private static final long serialVersionUID = 1L;
protected void setupModules(SimpleModule module) {
registerModule(module);
SimpleModule moduleSubType = new SimpleModule("test", Version.unknownVersion());
Reflections reflections = new Reflections("it.integry");
Set<Class<? extends EntityBase>> clssList = reflections.getSubTypesOf(EntityBase.class);
final Set<Class<? extends ComposedEntityBase>> subTypesOfComposed = reflections.getSubTypesOf(ComposedEntityBase.class);
clssList.addAll(subTypesOfComposed);
for (Class<? extends EntityBase> clazz : clssList) {
try {
Field f = clazz.getDeclaredField("ENTITY");
f.setAccessible(true);
String keyType = (String) f.get(null);
EntitySubTypeHolder.getMapType().put(keyType, clazz);
} catch (Exception e) {
}
moduleSubType.addAbstractTypeMapping(EntityBase.class, clazz);
registerSubtypes(clazz);
}
registerModule(moduleSubType);
}
protected SimpleModule setupAdapters() {
SimpleModule module = new SimpleModule();
module.addSerializer(Date.class, new JsonDateAdapterSerializer());
module.addDeserializer(Date.class, new JsonDateAdapterDeserializer());
module.addSerializer(LocalDate.class, new JsonLocalDateAdapterSerializer());
module.addDeserializer(LocalDate.class, new JsonLocalDateAdapterDeserializer());
module.addSerializer(LocalDateTime.class, new JsonLocalDateTimeAdapterSerializer());
module.addDeserializer(LocalDateTime.class, new JsonLocalDateTimeAdapterDeserializer());
module.addSerializer(EsitoType.class, new EsitoSerialize());
module.addDeserializer(EsitoType.class, new EsitoDeserialize());
module.addDeserializer(BigDecimal.class, new BigDecimalDeserialize());
module.addDeserializer(Integer.class, new IntegerDeserializer());
module.addDeserializer(String.class, new StringUnicodeDeserialize());
module.addDeserializer(Boolean.class, new BooleanDeserializer());
module.addDeserializer(BaseAutomatedOperationDTO.class, new AutomatedOperationController.AutomatedOperationsDeserializer());
return module;
}
}

View File

@@ -1,60 +0,0 @@
package it.integry.ems.json;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
import com.fasterxml.jackson.databind.ser.FilterProvider;
import com.fasterxml.jackson.databind.ser.PropertyFilter;
import com.fasterxml.jackson.databind.ser.PropertyWriter;
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
public class JSONObjectMapper extends CommonObjectMapper {
private static final long serialVersionUID = 1L;
public JSONObjectMapper() {
SimpleModule module = setupAdapters();
PropertyFilter theFilter = new SimpleBeanPropertyFilter() {
@Override
public void serializeAsField(Object pojo, JsonGenerator jgen, SerializerProvider provider,
PropertyWriter writer) throws Exception {
if (include(writer)) {
try {
writer.serializeAsField(pojo, jgen, provider);
return;
} catch (Exception e) {
}
} else if (!jgen.canOmitFields()) { // since 2.3
writer.serializeAsOmittedField(pojo, jgen, provider);
}
}
@Override
protected boolean include(BeanPropertyWriter writer) {
return true;
}
@Override
protected boolean include(PropertyWriter writer) {
return true;
}
};
FilterProvider filters = new SimpleFilterProvider().addFilter("jsonEntityFilter", theFilter);
setFilterProvider(filters);
// setSerializationInclusion(Include.NON_NULL);
// escape dei caratteri non standard
configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true);
configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
setupModules(module);
}
}

View File

@@ -1,76 +0,0 @@
package it.integry.ems.json;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
import com.fasterxml.jackson.databind.ser.FilterProvider;
import com.fasterxml.jackson.databind.ser.PropertyFilter;
import com.fasterxml.jackson.databind.ser.PropertyWriter;
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
import it.integry.ems_model.annotation.EntityChild;
import it.integry.ems_model.annotation.PK;
import it.integry.ems_model.annotation.SqlField;
import java.lang.reflect.Field;
public class OrdikidsResponseJSONObjectMapper extends CommonObjectMapper {
private static final long serialVersionUID = 1L;
public OrdikidsResponseJSONObjectMapper() {
SimpleModule module = setupAdapters();
PropertyFilter theFilter = new SimpleBeanPropertyFilter() {
@Override
public void serializeAsField(Object pojo, JsonGenerator jgen, SerializerProvider provider,
PropertyWriter writer) throws Exception {
if (include(writer)) {
try {
if ("operation".equals(writer.getName())) {
writer.serializeAsField(pojo, jgen, provider);
return;
} else {
Field f = pojo.getClass().getDeclaredField(writer.getName());
if (f != null) {
PK pk = f.getAnnotation(PK.class);
SqlField sqlField = f.getAnnotation(SqlField.class);
EntityChild child = f.getAnnotation(EntityChild.class);
if (pk != null || child != null || (sqlField != null && sqlField.isReturned()))
writer.serializeAsField(pojo, jgen, provider);
return;
}
}
} catch (Exception e) {
}
} else if (!jgen.canOmitFields()) { // since 2.3
writer.serializeAsOmittedField(pojo, jgen, provider);
}
}
@Override
protected boolean include(BeanPropertyWriter writer) {
return true;
}
@Override
protected boolean include(PropertyWriter writer) {
return true;
}
};
FilterProvider filters = new SimpleFilterProvider().addFilter("jsonEntityFilter", theFilter);
setFilterProvider(filters);
// escape dei caratteri non standard
configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true);
configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
setupModules(module);
}
}

View File

@@ -3,6 +3,7 @@ package it.integry.ems.json;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
@@ -11,21 +12,62 @@ import com.fasterxml.jackson.databind.ser.PropertyFilter;
import com.fasterxml.jackson.databind.ser.PropertyWriter;
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
import it.integry.ems.adapter.*;
import it.integry.ems.response.EsitoType;
import it.integry.ems.schedule.new_cron_job.controller.AutomatedOperationController;
import it.integry.ems.schedule.new_cron_job.dto.operations.base_classes.BaseAutomatedOperationDTO;
import it.integry.ems_model.annotation.EntityChild;
import it.integry.ems_model.annotation.PK;
import it.integry.ems_model.annotation.SqlField;
import it.integry.ems_model.annotation.Table;
import it.integry.ems_model.base.ComposedEntityBase;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.resolver.EntitySubTypeHolder;
import it.integry.ems_model.types.OperationType;
import org.reflections.Reflections;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.AbstractMap;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
public class ResponseJSONObjectMapper extends CommonObjectMapper {
import static org.reflections.scanners.Scanners.SubTypes;
public class ResponseJSONObjectMapper extends ObjectMapper {
private static final long serialVersionUID = 1L;
public SimpleModule addDefaultAdapters(SimpleModule module) {
module.addSerializer(Date.class, new JsonDateAdapterSerializer());
module.addDeserializer(Date.class, new JsonDateAdapterDeserializer());
module.addSerializer(LocalDate.class, new JsonLocalDateAdapterSerializer());
module.addDeserializer(LocalDate.class, new JsonLocalDateAdapterDeserializer());
module.addSerializer(LocalDateTime.class, new JsonLocalDateTimeAdapterSerializer());
module.addDeserializer(LocalDateTime.class, new JsonLocalDateTimeAdapterDeserializer());
module.addSerializer(EsitoType.class, new EsitoSerialize());
module.addDeserializer(EsitoType.class, new EsitoDeserialize());
module.addDeserializer(BigDecimal.class, new BigDecimalDeserialize());
module.addDeserializer(Integer.class, new IntegerDeserializer());
module.addDeserializer(String.class, new StringUnicodeDeserialize());
module.addDeserializer(Boolean.class, new BooleanDeserializer());
module.addDeserializer(BaseAutomatedOperationDTO.class, new AutomatedOperationController.AutomatedOperationsDeserializer());
return module;
}
public ResponseJSONObjectMapper() {
SimpleModule module = setupAdapters();
PropertyFilter theFilter = new SimpleBeanPropertyFilter() {
@Override
@@ -60,7 +102,7 @@ public class ResponseJSONObjectMapper extends CommonObjectMapper {
if (onlyPkMaster && child != null)
return;
if (pk != null || child != null || (sqlField != null && sqlField.isReturned())) {
if (pk != null || child != null || (sqlField != null && sqlField.isReturned()) || !onlyPkMaster) {
writer.serializeAsField(pojo, jgen, provider);
}
@@ -92,14 +134,41 @@ public class ResponseJSONObjectMapper extends CommonObjectMapper {
setFilterProvider(filters);
setSerializationInclusion(Include.NON_NULL);
// escape dei caratteri non standard
configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true);
SimpleModule simpleModule = new SimpleModule();
simpleModule = addDefaultAdapters(simpleModule);
setupEntityModules(simpleModule);
registerModule(simpleModule);
configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
configure(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES, false);
configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false);
configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);
// configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true); // escape dei caratteri non standard
setupModules(module);
setSerializationInclusion(Include.NON_NULL);
}
public void setupEntityModules(SimpleModule module) {
Reflections reflections = new Reflections("it.integry");
final List<AbstractMap.SimpleEntry<String, Class<? extends EntityBase>>> classList = reflections.get(SubTypes.of(EntityBase.class, ComposedEntityBase.class).asClass())
.stream()
.filter(x -> x.isAnnotationPresent(Table.class))
.map(x ->
new AbstractMap.SimpleEntry<String, Class<? extends EntityBase>>(
x.getAnnotation(Table.class).value(), (Class<? extends EntityBase>) x))
.collect(Collectors.toList());
for (AbstractMap.SimpleEntry<String, Class<? extends EntityBase>> classData : classList) {
EntitySubTypeHolder.getMapType().put(classData.getKey(), classData.getValue());
module.addAbstractTypeMapping(EntityBase.class, classData.getValue());
}
registerSubtypes(classList.stream().map(AbstractMap.SimpleEntry::getValue).collect(Collectors.toList()));
}
}

View File

@@ -4,7 +4,7 @@ package it.integry.ems.license;
import com.fasterxml.jackson.core.type.TypeReference;
import it.integry.annotations.PostContextConstruct;
import it.integry.ems.datasource.DataSource;
import it.integry.ems.json.JSONObjectMapper;
import it.integry.ems.json.ResponseJSONObjectMapper;
import it.integry.ems.looper.service.LooperService;
import it.integry.ems.response.EsitoType;
import it.integry.ems.response.ServiceRestResponse;
@@ -37,7 +37,7 @@ public class LicenseComponent {
private LooperService looperService;
@Autowired
private JSONObjectMapper jsonObjectMapper;
private ResponseJSONObjectMapper jsonObjectMapper;
private final HashMap<String, LicenseStatusDTO> cachedLicenseStatus = new HashMap<>();

View File

@@ -6,12 +6,15 @@ import it.integry.ems.menu.dto.MenuConfigDTO;
import it.integry.ems.menu.dto.StbMenuDTO;
import it.integry.ems.menu.dto.StbMenuOpzDTO;
import it.integry.ems.menu.dto.StbTipoAziendaDTO;
import it.integry.ems.utility.UtilityDirs;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityLocalDate;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.List;
@@ -31,9 +34,11 @@ public class MenuStaticCreator {
connection.setTransactionIsolation(java.sql.Connection.TRANSACTION_READ_UNCOMMITTED);
connection.setAutoCommit(false);
final String baseProjectPath = new File("").getAbsolutePath() + "\\ems-core\\src\\main\\";
final String menuJsonResourceFolder = baseProjectPath + "resources\\menus\\";
createMenu(connection, UtilityDirs.getDevelopmentMenusFolder());
}
public static void createMenu(Connection connection, String menuJsonResourceFolder) throws Exception {
ObjectMapper jsonObjectMapper = new ObjectMapper();
final List<StbMenuOpzDTO> stbMenuOpzs = UtilityDB.executeSimpleQueryDTO(connection, "SELECT * FROM stb_menu_opz", StbMenuOpzDTO.class);
@@ -43,8 +48,7 @@ public class MenuStaticCreator {
final List<StbMenuDTO> stbMenus = UtilityDB.executeSimpleQueryDTO(connection, "SELECT * FROM stb_menu", StbMenuDTO.class);
final Map<String, List<StbMenuDTO>> menusByAzienda = stbMenus.stream().collect(Collectors.groupingBy(StbMenuDTO::getTipoAzienda));
MenuConfigDTO menuConfigDTO = new MenuConfigDTO(Integer.parseInt(CommonConstants.DATESTAMP_FORMATTER.format(UtilityLocalDate.getNow())))
MenuConfigDTO menuConfigDTO = new MenuConfigDTO(Integer.parseInt(CommonConstants.DATESTAMP_YMD_FORMATTER.format(UtilityLocalDate.getNow())))
.setStbMenuOpz(stbMenuOpzs)
.setStbTipoAzienda(stbTipoAziendas)
.setMenusByAzienda(menusByAzienda);
@@ -55,15 +59,15 @@ public class MenuStaticCreator {
}
private static void writeContentToFile(String filePath, String content, boolean overwrite) throws IOException {
File f = new File(filePath);
if (overwrite && f.exists()) f.delete();
FileOutputStream outputStream = new FileOutputStream(filePath);
byte[] strToBytes = content.getBytes();
outputStream.write(strToBytes);
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, StandardCharsets.UTF_8);
outputStreamWriter.write(content);
outputStreamWriter.close();
outputStream.close();
}

View File

@@ -4,6 +4,7 @@ import it.integry.common.var.CommonConstants;
import it.integry.ems.menu.service.MenuConfigurationService;
import it.integry.ems.response.ServiceRestResponse;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems.utility.UtilityDebug;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@@ -30,4 +31,17 @@ public class MenuConfigurationController {
return ServiceRestResponse.createPositiveResponse();
}
@RequestMapping(value = "generate", method = RequestMethod.POST)
public @ResponseBody
ServiceRestResponse generate() throws Exception {
if (!UtilityDebug.isDebugExecution())
throw new Exception("Puoi eseguire questa procedura solo in ambiente DEBUG!");
if (UtilityDebug.isIntegryServerDev())
throw new Exception("Non puoi eseguire questa azione su SERVERDEV!");
menuConfigurationService.generate();
return ServiceRestResponse.createPositiveResponse();
}
}

View File

@@ -23,36 +23,8 @@ public class StbMenuDTO {
@SqlField(value = "descrizione_estesa", maxLength = 8000, nullable = true)
private String descrizioneEstesa;
@SqlField(value = "entity_name", maxLength = 40, nullable = true)
private String entityName;
@SqlField(value = "flag_attivo", maxLength = 1, nullable = true, defaultObjectValue = "S")
private String flagAttivo;
@SqlField(value = "flag_printer_setup", maxLength = 1, nullable = true, defaultObjectValue = "N")
private String flagPrinterSetup;
@SqlField(value = "gest_name", maxLength = 40, nullable = true)
private String gestName;
@SqlField(value = "note", maxLength = 255, nullable = true)
private String note;
@SqlField(value = "object_type", maxLength = 5, nullable = true)
private String objectType;
@SqlField(value = "open_type", maxLength = 1, nullable = true)
private String openType;
@SqlField(value = "parameter", maxLength = 255, nullable = true)
private String parameter;
@SqlField(value = "picture_menu", maxLength = 1024, nullable = true)
private String pictureMenu;
@SqlField(value = "picture_select", maxLength = 1024, nullable = true)
private String pictureSelect;
@SqlField(value = "pos", nullable = true)
private Integer pos;
@@ -62,9 +34,6 @@ public class StbMenuDTO {
@SqlField(value = "pos_tipo_azienda", nullable = true)
private Integer posTipoAzienda;
@SqlField(value = "type", maxLength = -1, nullable = true, defaultObjectValue = "F")
private String menuType;
@SqlField(value = "url_descrizione", maxLength = 1024, nullable = true)
private String urlDescrizione;
@@ -122,15 +91,6 @@ public class StbMenuDTO {
return this;
}
public String getEntityName() {
return entityName;
}
public StbMenuDTO setEntityName(String entityName) {
this.entityName = entityName;
return this;
}
public String getFlagAttivo() {
return flagAttivo;
}
@@ -140,78 +100,6 @@ public class StbMenuDTO {
return this;
}
public String getFlagPrinterSetup() {
return flagPrinterSetup;
}
public StbMenuDTO setFlagPrinterSetup(String flagPrinterSetup) {
this.flagPrinterSetup = flagPrinterSetup;
return this;
}
public String getGestName() {
return gestName;
}
public StbMenuDTO setGestName(String gestName) {
this.gestName = gestName;
return this;
}
public String getNote() {
return note;
}
public StbMenuDTO setNote(String note) {
this.note = note;
return this;
}
public String getObjectType() {
return objectType;
}
public StbMenuDTO setObjectType(String objectType) {
this.objectType = objectType;
return this;
}
public String getOpenType() {
return openType;
}
public StbMenuDTO setOpenType(String openType) {
this.openType = openType;
return this;
}
public String getParameter() {
return parameter;
}
public StbMenuDTO setParameter(String parameter) {
this.parameter = parameter;
return this;
}
public String getPictureMenu() {
return pictureMenu;
}
public StbMenuDTO setPictureMenu(String pictureMenu) {
this.pictureMenu = pictureMenu;
return this;
}
public String getPictureSelect() {
return pictureSelect;
}
public StbMenuDTO setPictureSelect(String pictureSelect) {
this.pictureSelect = pictureSelect;
return this;
}
public Integer getPos() {
return pos;
}
@@ -239,15 +127,6 @@ public class StbMenuDTO {
return this;
}
public String getMenuType() {
return menuType;
}
public StbMenuDTO setMenuType(String menuType) {
this.menuType = menuType;
return this;
}
public String getUrlDescrizione() {
return urlDescrizione;
}
@@ -264,20 +143,10 @@ public class StbMenuDTO {
.setTipoAzienda(getTipoAzienda())
.setDescrizione(getDescrizione())
.setDescrizioneEstesa(getDescrizioneEstesa())
.setEntityName(getEntityName())
.setFlagAttivo(getFlagAttivo())
.setFlagPrinterSetup(getFlagPrinterSetup())
.setGestName(getGestName())
.setNote(getNote())
.setObjectType(getObjectType())
.setOpenType(getOpenType())
.setParameter(getParameter())
.setPictureMenu(getPictureMenu())
.setPictureSelect(getPictureSelect())
.setPos(getPos())
.setPosCliente(getPosCliente())
.setPosTipoAzienda(getPosTipoAzienda())
.setMenuType(getMenuType())
.setUrlDescrizione(getUrlDescrizione());
}
}

View File

@@ -1,8 +1,10 @@
package it.integry.ems.menu.service;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement;
import it.integry.annotations.PostContextAutowired;
import it.integry.annotations.PostContextConstruct;
import it.integry.ems.menu.MenuStaticCreator;
import it.integry.ems.menu.dto.MenuConfigDTO;
import it.integry.ems.menu.dto.StbMenuDTO;
import it.integry.ems.menu.dto.StbMenuOpzDTO;
@@ -10,7 +12,7 @@ import it.integry.ems.menu.dto.StbTipoAziendaDTO;
import it.integry.ems.settings.SettingsController;
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems.utility.UtilityDebug;
import it.integry.ems.utility.UtilityDirs;
import it.integry.ems_model.entity.Azienda;
import it.integry.ems_model.entity.StbMenu;
import it.integry.ems_model.entity.StbMenuOpz;
@@ -43,7 +45,7 @@ public class MenuConfigurationService {
@PostContextConstruct(priority = 5)
public void init() throws Exception {
if(UtilityDebug.isDebugExecution()) return;
//if(UtilityDebug.isDebugExecution()) return;
logger.debug(MenuConfigurationService.class.getSimpleName() + ": Refresh menu");
@@ -63,6 +65,8 @@ public class MenuConfigurationService {
throw ex;
}
}
logger.debug(MenuConfigurationService.class.getSimpleName() + ": Fine refresh menu");
}
private boolean isHistoryDB(AdvancedDataSource advancedDataSource) throws Exception {
@@ -90,7 +94,7 @@ public class MenuConfigurationService {
final Azienda azienda = Azienda.getDefaultAzienda(connection);
int lastMenuUpd = Integer.parseInt(azienda.getLastUpgDbMenu().replace("QM", ""));
if (menuConfig.getVersion() <= lastMenuUpd)
if (lastMenuUpd >= menuConfig.getVersion())
return;
executeStatement(connection, "DELETE FROM stb_menu",
@@ -98,10 +102,30 @@ public class MenuConfigurationService {
"DELETE FROM stb_tipo_azienda",
"DELETE FROM stb_menu_opz");
for (StbMenuOpzDTO stbMenuOpzDto : menuConfig.getStbMenuOpz()) {
StbMenuOpz stbMenuOpz = stbMenuOpzDto.toEntity();
stbMenuOpz.setOperation(OperationType.INSERT);
stbMenuOpz.manageWithParentConnection(connection);
String insertStbMenuOpzSQL = "INSERT INTO " + StbMenuOpz.ENTITY + " (cod_opz, " +
"descrizione, gest_name, entity_name, picture_menu, picture_select, object_type, flag_printer_setup, parameter, note, open_type, is_deprecated)" +
" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
try (SQLServerPreparedStatement insertBulkPs = (SQLServerPreparedStatement) connection.prepareStatement(insertStbMenuOpzSQL)) {
for (StbMenuOpzDTO stbMenuOpzDto : menuConfig.getStbMenuOpz()) {
insertBulkPs.setString(1, stbMenuOpzDto.getCodOpz());
insertBulkPs.setString(2, stbMenuOpzDto.getDescrizione());
insertBulkPs.setString(3, stbMenuOpzDto.getGestName());
insertBulkPs.setString(4, stbMenuOpzDto.getEntityName());
insertBulkPs.setString(5, stbMenuOpzDto.getPictureMenu());
insertBulkPs.setString(6, stbMenuOpzDto.getPictureSelect());
insertBulkPs.setString(7, stbMenuOpzDto.getObjectType());
insertBulkPs.setString(8, stbMenuOpzDto.getFlagPrinterSetup());
insertBulkPs.setString(9, stbMenuOpzDto.getParameter());
insertBulkPs.setString(10, stbMenuOpzDto.getNote());
insertBulkPs.setString(11, stbMenuOpzDto.getOpenType());
insertBulkPs.setString(12, stbMenuOpzDto.getIsDeprecated());
insertBulkPs.addBatch();
}
insertBulkPs.executeLargeBatch();
}
for (StbTipoAziendaDTO stbTipoAziendaDto : menuConfig.getStbTipoAzienda()) {
@@ -114,12 +138,39 @@ public class MenuConfigurationService {
if (stbMenus == null)
logger.error("Nessuna configurazione trovata per il menu " + azienda.getTipoAzienda() + " di " + azienda.getNomeDitta());
else
for (StbMenuDTO stbMenuDto : stbMenus) {
StbMenu stbMenu = stbMenuDto.toEntity();
stbMenu.setOperation(OperationType.INSERT);
stbMenu.manageWithParentConnection(connection);
else {
String insertStbMenuSql = "INSERT INTO " + StbMenu.ENTITY + " (cod_opz, descrizione, cod_parent, pos, tipo_azienda, flag_attivo, url_descrizione, " +
"pos_tipo_azienda, pos_cliente, descrizione_estesa) " +
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
try (SQLServerPreparedStatement insertBulkPs = (SQLServerPreparedStatement) connection.prepareStatement(insertStbMenuSql)) {
for (StbMenuDTO stbMenuDto : stbMenus) {
insertBulkPs.setString(1, stbMenuDto.getCodOpz());
insertBulkPs.setString(2, stbMenuDto.getDescrizione());
insertBulkPs.setString(3, stbMenuDto.getCodParent());
if(stbMenuDto.getPos() != null) insertBulkPs.setInt(4, stbMenuDto.getPos());
else insertBulkPs.setObject(4, null);
insertBulkPs.setString(5, stbMenuDto.getTipoAzienda());
insertBulkPs.setString(6, stbMenuDto.getFlagAttivo());
insertBulkPs.setString(7, stbMenuDto.getUrlDescrizione());
if(stbMenuDto.getPosTipoAzienda() != null) insertBulkPs.setInt(8, stbMenuDto.getPosTipoAzienda());
else insertBulkPs.setObject(8, null);
if(stbMenuDto.getPosCliente() != null) insertBulkPs.setInt(9, stbMenuDto.getPosCliente());
else insertBulkPs.setObject(9, null);
insertBulkPs.setString(10, stbMenuDto.getDescrizioneEstesa());
insertBulkPs.addBatch();
}
insertBulkPs.executeLargeBatch();
}
}
executeStatement(connection, "ALTER TABLE azienda ADD CONSTRAINT FK_azienda_stb_tipo_azienda FOREIGN KEY (tipo_azienda) REFERENCES stb_tipo_azienda ( tipo_azienda )",
@@ -137,9 +188,15 @@ public class MenuConfigurationService {
" AND abil.flag_Abil <> 'N') Opz2Abil\n" +
" LEFT OUTER JOIN stb_Abil ON stb_Abil.cod_opz = Opz2Abil.cod_parent AND stb_abil.user_name = Opz2Abil.user_name\n" +
"WHERE stb_abil.cod_opz IS NULL",
"UPDATE azienda SET last_upg_db_menu = " + UtilityDB.valueToString("QM" + menuConfig.getVersion()));
"UPDATE azienda SET last_upg_db_menu = " + UtilityDB.valueToString(menuConfig.getVersion()));
connection.commit();
}
public void generate() throws Exception {
try (MultiDBTransactionManager studioMlMultiDb = new MultiDBTransactionManager("INTEGRY")) {
MenuStaticCreator.createMenu(studioMlMultiDb.getPrimaryConnection(), UtilityDirs.getDevelopmentMenusFolder());
}
}
}

View File

@@ -1,47 +0,0 @@
package it.integry.ems.metrics.filter;
import it.integry.ems.metrics.service.MetricService;
import it.integry.ems_model.utility.UtilityString;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.context.support.WebApplicationContextUtils;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
@Component
public class MetricFilter implements Filter {
@Autowired
private MetricService metricService;
@Override
public void init(final FilterConfig config) throws ServletException {
if (metricService == null) {
metricService = (MetricService) WebApplicationContextUtils.
getRequiredWebApplicationContext(config.getServletContext()).getBean("metricService");
}
}
@Override
public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws java.io.IOException, ServletException {
final HttpServletRequest httpRequest = ((HttpServletRequest) request);
if (!UtilityString.isNullOrEmpty(httpRequest.getServletPath())) {
final String req = httpRequest.getServletPath().substring(1);
long startTime = System.nanoTime();
chain.doFilter(request, response);
double stopTime = System.nanoTime();
double execTime = (stopTime - startTime) / 1000000000;
// final int status = ((HttpServletResponse) response).getStatus();
metricService.updateCountTimeForService(req, execTime);
}
}
@Override
public void destroy() {
}
}

View File

@@ -1,98 +0,0 @@
package it.integry.ems.metrics.service;
import it.integry.ems.json.JSONObjectMapper;
import org.joda.time.LocalDateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.StringWriter;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicInteger;
@Service
public class MetricService {
private static int DAY_HOUR = 24;
private final ConcurrentMap<String, Integer> barchartCountService;
private final ConcurrentMap<String, List<Double>> barchartTimeExecService;
private final int[] dayHalfHourLoad = new int[DAY_HOUR * 2];
@Autowired
private JSONObjectMapper jsonObjectMapper;
private Integer totCount = 0;
private AtomicInteger totCountHalfHour = new AtomicInteger(0);
private AtomicInteger idxArray;
private SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
public MetricService() {
barchartCountService = new ConcurrentHashMap<>();
barchartTimeExecService = new ConcurrentHashMap<>();
}
public void updateCountTimeForService(String serviceName, Double timeExec) {
if(!serviceName.startsWith("metric") &&
!serviceName.startsWith("js") &&
!serviceName.startsWith("font") &&
!serviceName.startsWith("assets") &&
!serviceName.startsWith("css") &&
!serviceName.startsWith("index.html") &&
!serviceName.endsWith("favicon.ico") &&
!serviceName.endsWith("/status") &&
!serviceName.contains("system/ok") &&
!serviceName.contains("logs")){
String[] hourMin = sdf.format(new Date()).split(":");
idxArray = new AtomicInteger(Integer.parseInt(hourMin[0]));
int incr = 0;
if (Integer.parseInt(hourMin[1]) > 29) {
incr = 1;
totCountHalfHour.getAndSet(0);
}
totCountHalfHour.getAndIncrement();
dayHalfHourLoad[idxArray.get() * 2 + incr] = totCountHalfHour.get();
totCount++;
Integer count = barchartCountService.get(serviceName);
if (count == null)
count = 0;
count++;
barchartCountService.put(serviceName, count);
List<Double> list = barchartTimeExecService.get(serviceName);
if (list == null)
list = new ArrayList<>();
list.add(timeExec);
barchartTimeExecService.put(serviceName, list);
}
}
public String getJsonCountMetric() throws Exception {
StringWriter sw = new StringWriter();
jsonObjectMapper.writeValue(sw, barchartCountService);
return sw.toString();
}
public void resetMetric() {
totCount = 0;
barchartCountService.clear();
barchartTimeExecService.clear();
}
}

View File

@@ -24,7 +24,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.reflections.Reflections;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.lang.reflect.Modifier;
@@ -32,8 +32,10 @@ import java.sql.SQLException;
import java.util.*;
import java.util.stream.Collectors;
@Service
public class MigrationService {
import static org.reflections.scanners.Scanners.SubTypes;
@Component
public class MigrationComponent {
private final Logger logger = LogManager.getLogger();
@@ -60,11 +62,12 @@ public class MigrationService {
public void init() {
Reflections reflections = new Reflections("it.integry.ems.migration.model");
allMigrationsList = new ArrayList<>(Stream.of(reflections.getSubTypesOf(MigrationModelInterface.class))
.map(x -> x)
allMigrationsList = reflections.get(SubTypes.of(MigrationModelInterface.class).asClass())
.stream()
.map(x -> (Class<? extends MigrationModelInterface>) x)
.filter(x -> !Modifier.isAbstract(x.getModifiers()))
.sortBy(Class::getSimpleName)
.toList());
.sorted(Comparator.comparing(Class::getSimpleName))
.collect(Collectors.toList());
if (UtilityDebug.isDebugExecution())
return;
@@ -161,9 +164,12 @@ public class MigrationService {
.setSkipped(false);
stbMigrationStatus.setOperation(OperationType.INSERT);
} else {
stbMigrationStatus.setCompleted(true)
.setSkipped(false)
.setErrorMessage(EmsRestConstants.NULL);
stbMigrationStatus
.setCompleted(true);
if (UtilityDebug.isDebugExecution())
stbMigrationStatus
.setErrorMessage(EmsRestConstants.NULL);
stbMigrationStatus.setOperation(OperationType.UPDATE);
}

View File

@@ -1,22 +1,31 @@
package it.integry.ems.migration._base;
import com.fasterxml.jackson.core.type.TypeReference;
import it.integry.ems.migration.dto.SqlObjectTypeEnum;
import it.integry.ems.schedule.new_cron_job.dto.operations.base_classes.BaseScheduledOperationDTO;
import it.integry.ems.schedule.new_cron_job.service.AutomatedOperationHandlerComponent;
import it.integry.ems.settings.Model.SettingsModel;
import it.integry.ems.settings.SettingsController;
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
import it.integry.ems.utility.UtilityDebug;
import it.integry.ems_model.entity.Azienda;
import it.integry.ems_model.entity.StbGestSetup;
import it.integry.ems_model.entity.StbGestSetupQuery;
import it.integry.ems_model.exception.DataConverterNotFoundException;
import it.integry.ems_model.rulescompleting.DroolsDataCompleting;
import it.integry.ems_model.types.ApplicationName;
import it.integry.ems_model.types.OperationType;
import it.integry.ems_model.utility.Query;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityString;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bouncycastle.its.operator.ITSContentSigner;
import org.springframework.web.context.ContextLoader;
import java.io.IOException;
import java.sql.*;
import java.util.Arrays;
import java.util.List;
public abstract class BaseMigration implements MigrationModelInterface {
@@ -52,6 +61,10 @@ public abstract class BaseMigration implements MigrationModelInterface {
}
protected void executeStatement(String... sqls) throws SQLException, IOException {
executeStatement(advancedDataSource.getConnection(), sqls);
}
protected void executeStatement(Connection connection, String... sqls) throws SQLException {
Statement statement = connection.createStatement();
@@ -62,32 +75,10 @@ public abstract class BaseMigration implements MigrationModelInterface {
statement.close();
}
protected boolean existsColumn(Connection connection, String tableName, String columnName) throws SQLException {
String sql = Query.format("SELECT 1 FROM sys.columns\n" +
" WHERE Name = N{}\n" +
" AND Object_ID = Object_ID(N{})", columnName, "dbo." + tableName);
Integer val = UtilityDB.<Integer>executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
return val != null && val == 1;
}
protected void renameColumn(Connection connection, String tableName, String oldColumnname, String newColumnName) throws SQLException {
String sql = "exec sp_rename 'dbo." + tableName + "." + oldColumnname + "', " + newColumnName + ", 'COLUMN'";
executeStatement(connection, sql);
}
protected boolean existsTable(Connection connection, String tableName) throws SQLException {
String sql = Query.format("SELECT CAST(COUNT(*) AS BIT) AS exist FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N%s", tableName);
return UtilityDB.<Boolean>executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
}
protected long executeInsertStatement(Connection connection, String sql) throws SQLException {
protected long executeInsertStatement(String sql) throws SQLException {
long generatedId = -1;
try (PreparedStatement pstmt = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
try (PreparedStatement pstmt = advancedDataSource.getConnection().prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
int affectedRows = pstmt.executeUpdate();
@@ -99,51 +90,242 @@ public abstract class BaseMigration implements MigrationModelInterface {
}
}
}
} catch (IOException e) {
throw new RuntimeException(e);
}
return generatedId;
}
public void updateFunction(Connection connection, String sql) throws SQLException {
executeStatement(connection, sql);
protected void createOrUpdateFunction(String objectName, String createFunctionSql) throws SQLException, IOException {
alterObject(SqlObjectTypeEnum.FUNCTION, objectName, createFunctionSql);
}
protected void dropTable(Connection connection, String tableName) throws SQLException {
protected void createOrUpdateView(String objectName, String createViewSql) throws SQLException, IOException {
alterObject(SqlObjectTypeEnum.VIEW, objectName, createViewSql);
}
protected void createOrUpdateProcedure(String objectName, String createProcedureSql) throws SQLException, IOException {
alterObject(SqlObjectTypeEnum.PROCEDURE, objectName, createProcedureSql);
}
protected void createOrUpdateTrigger(String objectName, String createTriggerSql) throws SQLException, IOException {
alterObject(SqlObjectTypeEnum.TRIGGER, objectName, createTriggerSql);
}
private void alterObject(SqlObjectTypeEnum sqlObject, String objectName, String sql) throws SQLException, IOException {
executeStatement("IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id('" + objectName + "'))\r\n" +
"\tDROP " + sqlObject.toString() + " " + objectName,
sql);
}
protected boolean existsColumn(String tableName, String columnName) throws SQLException, IOException {
String schema = null;
if (tableName.contains(".")) {
schema = tableName.substring(0, tableName.indexOf("."));
tableName = tableName.replace(schema + ".", "");
}
String sql = Query.format("SELECT 1 FROM sys.columns\n" +
" WHERE Name = N{}\n" +
" AND Object_ID = Object_ID(N{})", columnName, (schema != null ? schema : "dbo") + "." + tableName);
Integer val = UtilityDB.<Integer>executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), sql);
return val != null && val == 1;
}
protected void renameColumn(String tableName, String oldColumnname, String newColumnName) throws SQLException, IOException {
String sql = "exec sp_rename 'dbo." + tableName + "." + oldColumnname + "', " + newColumnName + ", 'COLUMN'";
executeStatement(sql);
}
protected void dropColumn(String tableName, String columnName) throws SQLException, IOException {
executeStatement("EXEC DropDefault '" + tableName + "', '" + columnName + "'",
"ALTER TABLE " + tableName + " DROP COLUMN " + columnName);
}
protected <T> void addDefault(String tableName, String columnName, T defaultValue) throws SQLException, IOException {
boolean existDefault = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(),
Query.format("SELECT CAST(COUNT(*) AS BIT)\n" +
"FROM sys.syscolumns\n" +
"WHERE name = %s\n" +
" AND OBJECT_NAME(id) = %s\n" +
" AND cdefault <> 0", columnName, tableName));
if (!existDefault)
executeStatement(Query.format("ALTER TABLE dbo." + tableName + " ADD DEFAULT (%s) FOR "+ columnName, defaultValue));
}
protected boolean existsTable(String tableName) throws SQLException, IOException {
String schema = null;
if (tableName.contains(".")) {
schema = tableName.substring(0, tableName.indexOf("."));
tableName = tableName.replace(schema + ".", "");
}
String sql = Query.format("SELECT CAST(COUNT(*) AS BIT) AS exist FROM INFORMATION_SCHEMA.TABLES " +
"WHERE TABLE_NAME = N%s ", tableName);
if (schema != null)
sql += Query.format("AND TABLE_SCHEMA = N%s", schema);
return UtilityDB.<Boolean>executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), sql);
}
protected void dropTable(String tableName) throws SQLException, IOException {
String dropSql = "DROP TABLE " + tableName;
executeStatement(connection, dropSql);
executeStatement(dropSql);
}
protected void createSetupQuery(String codQuery, String name, String query, boolean override) throws SQLException, IOException {
if (UtilityString.isNullOrEmpty(codQuery)) {
executeStatement(Query.format("EXEC sp_insertQuerySetup %s", query));
return;
}
String sql = Query.format("SELECT cast(count(*) as bit) FROM stb_gest_setup_query WHERE cod_query = %s", codQuery);
boolean existQuery = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), sql);
protected void createSetup(Connection connection, String gestName, String section, String keySection, String value, String description, String codQuery) throws Exception {
StbGestSetup stbGestSetup = new StbGestSetup()
.setGestName(gestName)
.setSection(section)
.setKeySection(keySection)
.setValue(value)
.setDescription(description)
.setQueryDefault(codQuery);
stbGestSetup.setOperation(OperationType.INSERT);
stbGestSetup.manageWithParentConnection(connection);
if ( existQuery )
executeStatement(Query.format("UPDATE stb_gest_setup_query SET query_default = %S, description = %S WHERE cod_query = %s ",
query, name, codQuery));
else
executeStatement(Query.format("INSERT INTO stb_gest_setup_query (cod_query, query_default, description)"+
" VALUES (%s, %s, %s);", codQuery, query, name));
}
protected boolean existsSetup(String gestName, String section, String keySection) throws SQLException, IOException {
String sql = Query.format("SELECT CAST(COUNT(*) AS BIT) AS exist FROM " + StbGestSetup.ENTITY +
" WHERE gest_name = %s AND" +
" section = %s AND" +
" key_section = %s", gestName, section, keySection);
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), sql);
}
protected void deleteSetup(Connection connection, String gestName, String section, String keySection) throws Exception {
protected boolean existsSetupQuery(String codQuery) throws SQLException, IOException {
String sql = Query.format("SELECT CAST(COUNT(*) AS BIT) AS exist FROM " + StbGestSetupQuery.ENTITY +
" WHERE cod_query = %s", codQuery);
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), sql);
}
protected void createSetup(String gestName, String section, String keySection, String value, String description, String codQuery) throws Exception {
if (existsSetup(gestName, section, keySection))
return;
String insertSql = "INSERT INTO " + StbGestSetup.ENTITY +
"(gest_name, section, key_section, value, description, query_default) VALUES (?, ?, ?, ?, ?, ?)";
try (PreparedStatement ps = advancedDataSource.getConnection().prepareStatement(insertSql)) {
ps.setString(1, gestName);
ps.setString(2, section);
ps.setString(3, keySection);
ps.setString(4, value);
ps.setString(5, description);
ps.setString(6, codQuery);
ps.executeUpdate();
}
}
protected void createSetup(String gestName, String section, String keySection, String value, String description, String codQuery, boolean flagMultiValue) throws Exception {
if (existsSetup(gestName, section, keySection))
return;
String insertSql = "INSERT INTO " + StbGestSetup.ENTITY +
"(gest_name, section, key_section, value, description, query_default, flag_multi_value) VALUES (?, ?, ?, ?, ?, ?, ?)";
try (PreparedStatement ps = advancedDataSource.getConnection().prepareStatement(insertSql)) {
ps.setString(1, gestName);
ps.setString(2, section);
ps.setString(3, keySection);
ps.setString(4, value);
ps.setString(5, description);
ps.setString(6, codQuery);
ps.setBoolean(7, flagMultiValue);
ps.executeUpdate();
}
}
protected void createSetup(String gestName, String section, String keySection, String value, String description, String codQuery, boolean flagMultiValue, boolean flagSetupUserWeb) throws Exception {
if (existsSetup(gestName, section, keySection))
return;
String insertSql = "INSERT INTO " + StbGestSetup.ENTITY +
"(gest_name, section, key_section, value, description, query_default, flag_multi_value, flag_setup_user_web) VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
try (PreparedStatement ps = advancedDataSource.getConnection().prepareStatement(insertSql)) {
ps.setString(1, gestName);
ps.setString(2, section);
ps.setString(3, keySection);
ps.setString(4, value);
ps.setString(5, description);
ps.setString(6, codQuery);
ps.setBoolean(7, flagMultiValue);
ps.setString(8, flagSetupUserWeb ? "S" : "N");
ps.executeUpdate();
}
}
protected void createSetup(String gestName, String section, String keySection, String value, String description, boolean flagSync,
String codQuery, boolean flagUserView, boolean flagSetupDepo, boolean flagSetupUserWeb,
boolean flagTipoJson, boolean flagTipoColore, String tipoSetup, boolean flagMultiValue ) throws Exception {
createSetup(gestName, section,keySection, value, description, flagSync, codQuery, flagUserView, flagSetupDepo,
flagSetupUserWeb, flagTipoJson, flagTipoColore, tipoSetup, flagMultiValue, null);
}
protected void createSetup(String gestName, String section, String keySection, String value, String description, boolean flagSync,
String codQuery, boolean flagUserView, boolean flagSetupDepo, boolean flagSetupUserWeb,
boolean flagTipoJson, boolean flagTipoColore, String tipoSetup, boolean flagMultiValue,
String query) throws Exception {
if (existsSetup(gestName, section, keySection))
return;
if (!UtilityString.isNullOrEmpty(query) && UtilityString.isNullOrEmpty(codQuery)) {
codQuery = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(),
Query.format("SELECT cod_query FROM stb_gest_setup_query WHERE query_default = %s", query));
}
String insertSql = "INSERT INTO " + StbGestSetup.ENTITY +
" (gest_name, section, key_section, value, description, flag_sync, query_default,\n" +
"flag_user_view, flag_setup_depo, flag_setup_user_web,\n" +
"flag_tipo_json, flag_tipo_colore, tipo_setup, flag_multi_value) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
try (PreparedStatement ps = advancedDataSource.getConnection().prepareStatement(insertSql)) {
ps.setString(1, gestName);
ps.setString(2, section);
ps.setString(3, keySection);
ps.setString(4, value);
ps.setString(5, description);
ps.setString(6, (flagSync?"S":"N"));
ps.setString(7, codQuery);
ps.setString(8, (flagUserView?"S":"N"));
ps.setString(9, (flagSetupDepo?"S":"N"));
ps.setString(10, (flagSetupUserWeb?"S":"N"));
ps.setString(11, (flagTipoJson?"S":"N"));
ps.setString(12, (flagTipoColore?"S":"N"));
ps.setString(13, tipoSetup);
ps.setBoolean(14, flagMultiValue);
ps.executeUpdate();
}
}
protected void deleteSetup(String gestName, String section, String keySection) throws Exception {
StbGestSetup stbGestSetup = new StbGestSetup()
.setGestName(gestName)
.setSection(section)
.setKeySection(keySection);
stbGestSetup.setOperation(OperationType.DELETE);
stbGestSetup.manageWithParentConnection(connection);
stbGestSetup.manageWithParentConnection(advancedDataSource.getConnection());
}
protected void updateSetupValue(Connection connection, String gestName, String section, String keySection, String newValue) throws Exception {
protected void updateSetupValue(String gestName, String section, String keySection, String newValue) throws Exception {
StbGestSetup stbGestSetup = new StbGestSetup()
.setGestName(gestName)
.setSection(section)
@@ -151,9 +333,10 @@ public abstract class BaseMigration implements MigrationModelInterface {
.setValue(newValue);
stbGestSetup.setOperation(OperationType.UPDATE);
stbGestSetup.manageWithParentConnection(connection);
stbGestSetup.manageWithParentConnection(advancedDataSource.getConnection());
}
protected void addAutomatedOperation(BaseScheduledOperationDTO operation) {
new Thread(() -> {
try {
@@ -182,4 +365,33 @@ public abstract class BaseMigration implements MigrationModelInterface {
}
}).start();
}
protected boolean isCustomer(IntegryCustomer... customers) {
String currentDbName = advancedDataSource.getDataSource().getDbName();
return Arrays.stream(customers)
.anyMatch(x ->
Arrays.stream(x.getValues())
.anyMatch(y -> y.getValue().equalsIgnoreCase(currentDbName)));
}
protected boolean isCustomerDb(IntegryCustomerDB... customersDbs) {
String currentDbName = advancedDataSource.getDataSource().getDbName();
return Arrays.stream(customersDbs)
.anyMatch(y -> y.getValue().equalsIgnoreCase(currentDbName));
}
protected boolean isWingest() throws SQLException, IOException, DataConverterNotFoundException, InstantiationException, IllegalAccessException {
Azienda currentAzienda = Azienda.getDefaultAzienda(advancedDataSource.getConnection());
return currentAzienda.getApplicationNameEnum() == ApplicationName.WINGEST;
}
protected boolean isTextiles() throws SQLException, IOException, DataConverterNotFoundException, InstantiationException, IllegalAccessException {
Azienda currentAzienda = Azienda.getDefaultAzienda(advancedDataSource.getConnection());
return currentAzienda.getApplicationNameEnum() == ApplicationName.TEXTILES;
}
}

View File

@@ -0,0 +1,130 @@
package it.integry.ems.migration._base;
public enum IntegryCustomer {
Agricoper(IntegryCustomerDB.Agricoper_Agricoper,
IntegryCustomerDB.Agricoper_IlVisone,
IntegryCustomerDB.Agricoper_Luva),
Auricchio(IntegryCustomerDB.Auricchio_Auricchio,
IntegryCustomerDB.Auricchio_AuricchioMiki,
IntegryCustomerDB.Auricchio_AuricchioSrl,
IntegryCustomerDB.Auricchio_Ind01,
IntegryCustomerDB.Auricchio_Ind02,
IntegryCustomerDB.Auricchio_Ind04,
IntegryCustomerDB.Auricchio_Ind05,
IntegryCustomerDB.Auricchio_AuricchioSons),
Biolevante(IntegryCustomerDB.Biolevante_Biolevante),
Carelli(IntegryCustomerDB.Carelli_Carelli,
IntegryCustomerDB.Carelli_GestFood,
IntegryCustomerDB.Carelli_Chiuso,
IntegryCustomerDB.Carelli_Format,
IntegryCustomerDB.Carelli_Murgia,
IntegryCustomerDB.Carelli_Panimal,
IntegryCustomerDB.Carelli_Winact,
IntegryCustomerDB.Carelli_Csgr),
Cosmapack(IntegryCustomerDB.Cosmapack_Cosmint,
IntegryCustomerDB.Cosmapack_MrSolution),
Didonna(
IntegryCustomerDB.Didonna_Didonna,
IntegryCustomerDB.Didonna_AADidonna,
IntegryCustomerDB.Didonna_Badessa,
IntegryCustomerDB.Didonna_DidonnaBio,
IntegryCustomerDB.Didonna_FlliDidonna,
IntegryCustomerDB.Didonna_Messapi,
IntegryCustomerDB.Didonna_Nicola,
IntegryCustomerDB.Didonna_OpDidonna,
IntegryCustomerDB.Didonna_Piervito,
IntegryCustomerDB.Didonna_Pietro,
IntegryCustomerDB.Didonna_SanGiuliano,
IntegryCustomerDB.Didonna_Treddi,
IntegryCustomerDB.Didonna_SanGiuseppe,
IntegryCustomerDB.Didonna_Mediimpex,
IntegryCustomerDB.Didonna_Raffaella,
IntegryCustomerDB.Didonna_Diba,
IntegryCustomerDB.Didonna_MediimpexLiq,
IntegryCustomerDB.Didonna_DibaLiq),
DolceBonta(IntegryCustomerDB.DolceBonta_DolceBo,
IntegryCustomerDB.DolceBonta_Emanuela),
Dulciar(IntegryCustomerDB.Dulciar_Dulciar,
IntegryCustomerDB.Dulciar_Lanciok),
Fiume(IntegryCustomerDB.Fiume_Alambicco,
IntegryCustomerDB.Fiume_Licor,
IntegryCustomerDB.Fiume_LicorFood),
Florapulia(IntegryCustomerDB.Florapulia_Immobiliare,
IntegryCustomerDB.Florapulia_ImmobiliareSrl,
IntegryCustomerDB.Florapulia_Florapulia,
IntegryCustomerDB.Florapulia_FlorapuliaSrl,
IntegryCustomerDB.Florapulia_PaparellaP,
IntegryCustomerDB.Florapulia_PaparellaPietro,
IntegryCustomerDB.Florapulia_PaparellaD),
FolliesGroup(IntegryCustomerDB.FolliesGroup_FolliesGroup),
Frudis(IntegryCustomerDB.Frudis_Frudis),
Gramm(IntegryCustomerDB.Gramm_Gramm,
IntegryCustomerDB.Gramm_PrimeOlive,
IntegryCustomerDB.Gramm_ProveStage),
Idrotecnica(IntegryCustomerDB.Idrotecnica_Idrotecnica),
Igood(IntegryCustomerDB.Igood_Igood,
IntegryCustomerDB.Igood_ShopService),
Ime(IntegryCustomerDB.Ime_ImeTe),
Ivr(IntegryCustomerDB.Ivr_Vetta, IntegryCustomerDB.Ivr_Varci),
Lamonarca(IntegryCustomerDB.Lamonarca_Lamonarca),
Levanplast(IntegryCustomerDB.Levanplast_Levanplast,
IntegryCustomerDB.Levanplast_Perilflor,
IntegryCustomerDB.Levanplast_PerilflorSrl),
Maggio(IntegryCustomerDB.Maggio_MaggioSrl,
IntegryCustomerDB.Maggio_GiovMaggio),
Materica(IntegryCustomerDB.Materica_ImeBa),
MFI(IntegryCustomerDB.MFI_FashionGroup),
Midel(IntegryCustomerDB.Midel_Midel),
Morgante(IntegryCustomerDB.Morgante_Morgante),
ResinaColor(IntegryCustomerDB.ResinaColor_ResinaColor),
RistoCash(IntegryCustomerDB.RistoCash_RistoCash),
RossoGargano(IntegryCustomerDB.RossoGargano_RossoGargano),
Salpar(IntegryCustomerDB.Salpar_AlfaImmobiliare,
IntegryCustomerDB.Salpar_MasabaSrl,
IntegryCustomerDB.Salpar_Salpar,
IntegryCustomerDB.Salpar_VgAlimenti),
Santoro(IntegryCustomerDB.Santoro_ApuliaEngineering),
SaporiVeri(IntegryCustomerDB.SaporiVeri_SaporiVeri,
IntegryCustomerDB.SaporiVeri_Dispensa),
Sardinya(IntegryCustomerDB.Sardinya_Daga,
IntegryCustomerDB.Sardinya_Demetra,
IntegryCustomerDB.Sardinya_Sarca,
IntegryCustomerDB.Sardinya_Sardinya),
Smetar(IntegryCustomerDB.Smetar_Smetar),
Suit(IntegryCustomerDB.Suit_BioSuit,
IntegryCustomerDB.Suit_CarniSardegna,
IntegryCustomerDB.Suit_Granlucano,
IntegryCustomerDB.Suit_Puglia,
IntegryCustomerDB.Suit_SantAntonio,
IntegryCustomerDB.Suit_Suit,
IntegryCustomerDB.Suit_TenutaArianna,
IntegryCustomerDB.Suit_Valpietro),
Tempesta(IntegryCustomerDB.Tempesta_Tempesta,
IntegryCustomerDB.Tempesta_VivaiTempesta),
Tosca(IntegryCustomerDB.Tosca_Ba,
IntegryCustomerDB.Tosca_Ce,
IntegryCustomerDB.Tosca_Cz,
IntegryCustomerDB.Tosca_Fc,
IntegryCustomerDB.Tosca_Mi,
IntegryCustomerDB.Tosca_Rg,
IntegryCustomerDB.Tosca_Rm,
IntegryCustomerDB.Tosca_Vr,
IntegryCustomerDB.Tosca_Cloud),
TwoBrothers(IntegryCustomerDB.TwoBrothers_TwoBrothers),
Vinella(IntegryCustomerDB.Vinella_Vinella,
IntegryCustomerDB.Vinella_VQuadro,
IntegryCustomerDB.Vinella_TeknoSport);
private final IntegryCustomerDB[] values;
IntegryCustomer(IntegryCustomerDB... values) {
this.values = values;
}
public IntegryCustomerDB[] getValues() {
return values;
}
}

View File

@@ -0,0 +1,200 @@
package it.integry.ems.migration._base;
public enum IntegryCustomerDB {
Agricoper_Agricoper("agricoper"),
Agricoper_IlVisone("ilvisone"),
Agricoper_Luva("ilvisone"),
Auricchio_Auricchio("auricchio"),
Auricchio_AuricchioMiki("auricchio_miki"),
Auricchio_AuricchioSrl("auricchiosrl"),
Auricchio_Ind01("ind01"),
Auricchio_Ind02("ind02"),
Auricchio_Ind04("ind04"),
Auricchio_Ind05("ind05"),
Auricchio_AuricchioSons("auricchiosons"),
Biolevante_Biolevante("biolevante"),
Carelli_Carelli("carelli"),
Carelli_GestFood("gestfood"),
Carelli_Chiuso("chiuso"),
Carelli_Format("format"),
Carelli_Murgia("murgia"),
Carelli_Panimal("panimal"),
Carelli_Winact("winact"),
Carelli_Csgr("csgr"),
Cosmapack_Cosmint("cosmint"),
Cosmapack_MrSolution("mrsolution"),
Didonna_Didonna("didonna"),
Didonna_AADidonna("aadidonna"),
Didonna_Badessa("badessa"),
Didonna_DidonnaBio("didonnabio"),
Didonna_FlliDidonna("fllididonna"),
Didonna_Messapi("messapi"),
Didonna_Nicola("nicola"),
Didonna_OpDidonna("opdidonna"),
Didonna_Piervito("piervito"),
Didonna_Pietro("pietro"),
Didonna_SanGiuliano("sangiuliano"),
Didonna_Treddi("treddi"),
Didonna_SanGiuseppe("sangiuseppe"),
Didonna_Mediimpex("mediimpex"),
Didonna_Raffaella("raffaella"),
Didonna_Diba("diba"),
Didonna_MediimpexLiq("mediimpexliq"),
Didonna_DibaLiq("dibaliq"),
DolceBonta_DolceBo("dolce_bo"),
DolceBonta_Emanuela("emanuela"),
Dulciar_Dulciar("dulciar"),
Dulciar_Lanciok("lanciok"),
Fiume_Alambicco("alambicco"),
Fiume_Licor("licor"),
Fiume_LicorFood("licorFood"),
Florapulia_Immobiliare("immobiliare"),
Florapulia_Florapulia("florapulia"),
Florapulia_FlorapuliaSrl("florapuliasrl"),
Florapulia_PaparellaP("paparellap"),
Florapulia_PaparellaPietro("paparellapietro"),
Florapulia_ImmobiliareSrl("immobiliaresrl"),
Florapulia_PaparellaD("paparellad"),
FolliesGroup_FolliesGroup("folliesgroup"),
Frudis_Frudis("frudis"),
Gramm_Gramm("gramm"),
Gramm_PrimeOlive("primeolive"),
Gramm_ProveStage("grammprovestage"),
Idrotecnica_Idrotecnica("idrotecnica"),
Igood_Igood("igood"),
Igood_ShopService("shop_service"),
Ime_ImeTe("ime_te"),
Ivr_Vetta("vetta"),
Ivr_Varci("varci"),
Lamonarca_Lamonarca("lamonarca"),
Levanplast_Perilflor("perilflor"),
Levanplast_PerilflorSrl("perilflorsrl"),
Levanplast_Levanplast("levanplast"),
Maggio_MaggioSrl("maggiosrl"),
Maggio_GiovMaggio("giovmaggio"),
Materica_ImeBa("ime_ba"),
MFI_FashionGroup("fashiongroup"),
Midel_Midel("midel"),
Morgante_Morgante("morgante"),
ResinaColor_ResinaColor("resinacolor"),
RistoCash_RistoCash("risto_cash"),
RossoGargano_RossoGargano("rossogargano"),
Salpar_VgAlimenti("vgalimenti"),
Salpar_Salpar("salpar"),
Salpar_MasabaSrl("masabasrl"),
Salpar_AlfaImmobiliare("alfaimmobiliare"),
Santoro_ApuliaEngineering("apuliaengineering"),
SaporiVeri_SaporiVeri("sapori_veri"),
SaporiVeri_Dispensa("dispensa"),
Sardinya_Sardinya("sardinya"),
Sardinya_Demetra("demetra"),
Sardinya_Daga("daga"),
Sardinya_Sarca("sarca"),
Smetar_Smetar("smetar"),
Suit_Suit("suit"),
Suit_SantAntonio("santantonio"),
Suit_BioSuit("biosuit"),
Suit_Granlucano("granlucano"),
Suit_Puglia("suit_puglia"),
Suit_TenutaArianna("tenuta_arianna"),
Suit_CarniSardegna("carni_sardegna"),
Suit_Valpietro("valpietro"),
Tempesta_Tempesta("tempesta"),
Tempesta_VivaiTempesta("vivaitempesta"),
Tosca_Ba("tosca_ba"),
Tosca_Cz("tosca_cz"),
Tosca_Rm("tosca_rm"),
Tosca_Mi("tosca_mi"),
Tosca_Ce("tosca_ce"),
Tosca_Vr("tosca_vr"),
Tosca_Rg("tosca_rg"),
Tosca_Fc("tosca_fc"),
Tosca_Cloud("tosca_cloud"),
TwoBrothers_TwoBrothers("twobrothers"),
Vinella_Vinella("vinella"),
Vinella_VQuadro("vquadro"),
Vinella_TeknoSport("teknosport");
private final String value;
IntegryCustomerDB(String value) {
this.value = value;
}
public String getValue() {
return value;
}
}

View File

@@ -7,6 +7,10 @@ public class MigrationStatusDTO {
private MigrationStatusEnum status;
private String errorMessage;
public String getId() {
return this.profileDb + "-" + this.migrationCode;
}
public long getMigrationCode() {
return migrationCode;
}

View File

@@ -0,0 +1,8 @@
package it.integry.ems.migration.dto;
public enum SqlObjectTypeEnum {
VIEW,
FUNCTION,
PROCEDURE,
TRIGGER
}

View File

@@ -24,7 +24,7 @@ public class Migration_20221128123233 extends BaseMigration implements Migration
secretKeyToUse = Encoders.BASE64.encode(key.getEncoded());
}
executeStatement(advancedDataSource.getConnection(),
executeStatement(
"ALTER TABLE azienda\n" +
" ADD jwt_secret_key VARCHAR(MAX)");

View File

@@ -10,7 +10,7 @@ public class Migration_20221128132717 extends BaseMigration implements Migration
if (isHistoryDB())
return;
executeStatement(advancedDataSource.getConnection(),
executeStatement(
"CREATE TABLE dbo.stb_devices\n" +
"(\n" +
" id BIGINT IDENTITY\n" +

View File

@@ -11,7 +11,7 @@ public class Migration_20230406164731 extends BaseMigration implements Migration
if (isHistoryDB())
return;
executeStatement(advancedDataSource.getConnection(),
executeStatement(
"UPDATE mtb_partita_mag_carat" +
" SET carat = 'qta-residua'" +
" WHERE carat = 'qta_residua'",

View File

@@ -20,8 +20,8 @@ public class Migration_20230411163906 extends BaseMigration implements Migration
MimeTypesHandler mimeTypesHandler = getContextBean(MimeTypesHandler.class);
if (!existsColumn(advancedDataSource.getConnection(), "stb_files_attached", "mime_type"))
executeStatement(advancedDataSource.getConnection(),
if (!existsColumn("stb_files_attached", "mime_type"))
executeStatement(
"ALTER TABLE stb_files_attached\n" +
" ADD mime_type VARCHAR(MAX)");

View File

@@ -10,7 +10,7 @@ public class Migration_20230414183851 extends BaseMigration implements Migration
if (isHistoryDB())
return;
executeStatement(advancedDataSource.getConnection(),
executeStatement(
"ALTER TABLE stb_files_attached\n" +
" ADD ref_uuid1 VARCHAR(36)");
}

View File

@@ -10,7 +10,7 @@ public class Migration_20230419161529 extends BaseMigration implements Migration
if (isHistoryDB())
return;
executeStatement(advancedDataSource.getConnection(),
executeStatement(
"ALTER TABLE stb_devices\n" +
" ADD created_at DATETIME",
"ALTER TABLE stb_devices\n" +

View File

@@ -18,7 +18,7 @@ public class Migration_20231201094005 extends BaseMigration implements Migration
boolean existColumn = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), sql);
if (!existColumn )
executeStatement(advancedDataSource.getConnection(),
executeStatement(
"ALTER TABLE mtb_colt\n" +
" ADD id_lotto INT");

View File

@@ -50,7 +50,7 @@ public class Migration_20231201161808 extends BaseMigration implements Migration
for (String query : queries) {
System.out.println(query);
executeStatement(advancedDataSource.getConnection(), query);
executeStatement(query);
}
}

View File

@@ -43,7 +43,7 @@ public class Migration_20240125114347 extends BaseMigration implements Migration
for (String query : queries) {
System.out.println(query);
executeStatement(advancedDataSource.getConnection(), query);
executeStatement(query);
}
}

View File

@@ -26,7 +26,7 @@ public class Migration_20240201160125 extends BaseMigration implements Migration
" skipped BIT DEFAULT 0 NOT NULL\n" +
")";
executeStatement(advancedDataSource.getConnection(), createTable);
executeStatement(createTable);
}
@Override

View File

@@ -10,7 +10,7 @@ public class Migration_20240205105025 extends BaseMigration implements Migration
if (isHistoryDB())
return;
updateFunction(advancedDataSource.getConnection(), "ALTER FUNCTION [dbo].[f_getEAN128UL](@gestione VARCHAR(1), @dataCollo DATETIME, @serCollo VARCHAR(2), @numCollo int, @customPrefissoEan VARCHAR(7))\n" +
createOrUpdateFunction("f_getEAN128UL", "CREATE FUNCTION [dbo].[f_getEAN128UL](@gestione VARCHAR(1), @dataCollo DATETIME, @serCollo VARCHAR(2), @numCollo int, @customPrefissoEan VARCHAR(7))\n" +
" RETURNS TABLE AS\n" +
" RETURN\n" +
"\n" +

View File

@@ -7,6 +7,7 @@ import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityHashMap;
import javax.validation.constraints.NotNull;
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.HashMap;
@@ -25,7 +26,7 @@ public class Migration_20240212000000 extends BaseMigration implements Migration
sql = "SELECT * FROM stb_publications_detail";
final List<HashMap<String, Object>> oldStbPublicationsDetails = UtilityDB.executeSimpleQuery(advancedDataSource.getConnection(), sql);
dropOldTables(advancedDataSource.getConnection());
dropOldTables();
createNewTables(advancedDataSource.getConnection());
@@ -33,7 +34,7 @@ public class Migration_20240212000000 extends BaseMigration implements Migration
String publicationDescription = UtilityHashMap.getValueIfExists(oldStbPublication, "publication_description");
String insertSql = Query.format("INSERT INTO stb_publications (publication_description) VALUES (%s)", publicationDescription);
long generatedId = executeInsertStatement(advancedDataSource.getConnection(), insertSql);
long generatedId = executeInsertStatement(insertSql);
oldStbPublication.putIfAbsent("id", generatedId);
}
@@ -58,7 +59,7 @@ public class Migration_20240212000000 extends BaseMigration implements Migration
active.equalsIgnoreCase("S") || active.equalsIgnoreCase("R"),
whereCond,
true);
long generatedId = executeInsertStatement(advancedDataSource.getConnection(), insertSql);
long generatedId = executeInsertStatement(insertSql);
oldStbPublicationDetail.putIfAbsent("id", generatedId);
}
}
@@ -69,9 +70,9 @@ public class Migration_20240212000000 extends BaseMigration implements Migration
}
private void dropOldTables(@NotNull Connection connection) throws SQLException {
dropTable(connection, "stb_publications_detail");
dropTable(connection, "stb_publications");
private void dropOldTables() throws SQLException, IOException {
dropTable("stb_publications_detail");
dropTable("stb_publications");
}
private void createNewTables(@NotNull Connection connection) throws SQLException {

View File

@@ -10,11 +10,11 @@ public class Migration_20240212000001 extends BaseMigration implements Migration
if (isHistoryDB())
return;
if(!existsTable(advancedDataSource.getConnection(), "stb_transaction_log_db"))
if(!existsTable("stb_transaction_log_db"))
return;
dropTable(advancedDataSource.getConnection(), "stb_transaction_log_db");
dropTable(advancedDataSource.getConnection(), "stb_transaction_log");
dropTable("stb_transaction_log_db");
dropTable("stb_transaction_log");
String createTransactionTableSql = "\n" +
"CREATE TABLE dbo.stb_transaction_log\n" +
@@ -30,7 +30,7 @@ public class Migration_20240212000001 extends BaseMigration implements Migration
" group_id BIGINT NOT NULL\n" +
")";
executeStatement(advancedDataSource.getConnection(), createTransactionTableSql);
executeStatement(createTransactionTableSql);
}
@Override

View File

@@ -13,7 +13,7 @@ public class Migration_20240212000002 extends BaseMigration implements Migration
String sql = "ALTER TABLE dbo.stb_publications_detail\n" +
" ADD export_history BIT DEFAULT 0 NOT NULL";
executeStatement(advancedDataSource.getConnection(), sql);
executeStatement(sql);
}
@Override

View File

@@ -13,7 +13,7 @@ public class Migration_20240219094933 extends BaseMigration implements Migration
String sql = "ALTER TABLE mtb_colt\n" +
" ADD barcode_ul VARCHAR(20)";
executeStatement(advancedDataSource.getConnection(), sql);
executeStatement(sql);
}
@Override

View File

@@ -10,8 +10,7 @@ public class Migration_20240219103840 extends BaseMigration implements Migration
if (isHistoryDB())
return;
createSetup(advancedDataSource.getConnection(),
"PICKING", "ACCETTAZIONE", "FLAG_ALLOW_BARCODE_FORNITORE", "N",
createSetup("PICKING", "ACCETTAZIONE", "FLAG_ALLOW_BARCODE_FORNITORE", "N",
"Abilita la possibilità di effettuare l'accettazione merci utilizzando direttamente l'SSCC del fornitore (salvato poi nella colonna barcode_pedana)",
"SI_NO");
}

View File

@@ -16,7 +16,7 @@ public class Migration_20240220114903 extends BaseMigration implements Migration
"ALTER TABLE mtb_colr\n" +
" ADD DEFAULT 0 FOR causale;";
executeStatement(advancedDataSource.getConnection(), sql);
executeStatement(sql);
}
@Override

View File

@@ -10,13 +10,11 @@ public class Migration_20240221190821 extends BaseMigration implements Migration
if (isHistoryDB())
return;
createSetup(advancedDataSource.getConnection(),
"DATI_AZIENDA", "SETUP", "FLAG_ANSI_PADDING", "N",
createSetup("DATI_AZIENDA", "SETUP", "FLAG_ANSI_PADDING", "N",
"Abilita l'ansi padding nella connessione del gestionale. Il valore suggerito è ON (prima era OFF).",
"SI_NO");
createSetup(advancedDataSource.getConnection(),
"DATI_AZIENDA", "SETUP", "FLAG_CONCAT_NULL_YIELDS_NULL", "N",
createSetup("DATI_AZIENDA", "SETUP", "FLAG_CONCAT_NULL_YIELDS_NULL", "N",
"Abilita il concat null yields null nella connessione del gestionale. Il valore suggerito è ON (prima era OFF).",
"SI_NO");
}

View File

@@ -10,10 +10,10 @@ public class Migration_20240228160024 extends BaseMigration implements Migration
if (isHistoryDB())
return;
dropTable(advancedDataSource.getConnection(), "stb_subscriptions_user_detail");
dropTable(advancedDataSource.getConnection(), "stb_subscriptions_user");
dropTable("stb_subscriptions_user_detail");
dropTable("stb_subscriptions_user");
executeStatement(advancedDataSource.getConnection(),
executeStatement(
"CREATE TABLE dbo.stb_remote_subscription\n" +
"(\n" +

View File

@@ -2,7 +2,6 @@ package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
import it.integry.ems_model.utility.UtilityDB;
public class Migration_20240304165725 extends BaseMigration implements MigrationModelInterface {
@@ -19,7 +18,7 @@ public class Migration_20240304165725 extends BaseMigration implements Migration
"SET tipo_car = 'R'\n" +
"WHERE tipo_car = 'C'";
executeStatement(advancedDataSource.getConnection(), sql);
executeStatement(sql);
}
}

View File

@@ -1,11 +1,9 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomerDB;
import it.integry.ems.migration._base.MigrationModelInterface;
import java.util.ArrayList;
import java.util.List;
public class Migration_20240307123633 extends BaseMigration implements MigrationModelInterface {
@Override
@@ -13,16 +11,13 @@ public class Migration_20240307123633 extends BaseMigration implements Migration
if (isHistoryDB())
return;
List<String> elencoDb = new ArrayList<String>() {{
add("CARELLI");
add("GESTFOOD");
add("PANIMAL");
}};
if (elencoDb.stream().noneMatch(x -> x.equalsIgnoreCase(advancedDataSource.getDataSource().getDbName())))
if (!isCustomerDb(
IntegryCustomerDB.Carelli_Carelli,
IntegryCustomerDB.Carelli_GestFood,
IntegryCustomerDB.Carelli_Panimal))
return;
executeStatement(advancedDataSource.getConnection(), "UPDATE vtb_promo SET flag_tipo_promo = 'T' WHERE cod_promo like '%TAGLIO%'");
executeStatement("UPDATE vtb_promo SET flag_tipo_promo = 'T' WHERE cod_promo like '%TAGLIO%'");
}
@Override

View File

@@ -0,0 +1,24 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20240311102717 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createSetup("PICKING", "ACCETTAZIONE_BOLLA", "FLAG_USE_QTA_ORD", "S",
"Questo flag permette, durante il picking, di proporre automaticamente la qta ordinata al posto del valore di default di 1 confezione",
"SI_NO");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,59 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
import it.integry.ems_model.utility.Query;
import it.integry.ems_model.utility.UtilityDB;
import java.sql.Statement;
public class Migration_20240312093539 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
String tableName = "wtb_jrept_setup";
boolean existTable = existsTable(tableName);
if (existTable) {
boolean existRow = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(advancedDataSource.getConnection(), "SELECT cast(count(*) as bit) FROM " + tableName);
if (existRow) return;
dropTable(tableName);
}
String createSql = "create table wtb_jrept_setup\n" +
"(\n" +
" id bigint identity\n" +
" constraint wtb_jrept_setup_pk\n" +
" primary key,\n" +
" report_id bigint not null\n" +
" constraint wtb_jrept_setup_wtb_jrept_id_fk\n" +
" references wtb_jrept,\n" +
" cod_mdep varchar(5)\n" +
" constraint wtb_jrept_setup_mtb_depo_cod_mdep_fk\n" +
" references mtb_depo,\n" +
" cod_anag varchar(5)\n" +
" constraint wtb_jrept_setup_gtb_anag_cod_anag_fk\n" +
" foreign key (cod_anag) references gtb_anag," +
" tipo int not null,\n" +
" printer_name varchar(255),\n" +
" print_quantity int default 1 not null,\n" +
" orientation int default 0 not null\n" +
")";
executeStatement(advancedDataSource.getConnection(), createSql);
String createIndex = "create unique index wtb_jrept_setup_cod_mdep_tipo_cod_anag_uindex" +
" on wtb_jrept_setup (cod_mdep, tipo, cod_anag)";
executeStatement(advancedDataSource.getConnection(), createIndex);
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,30 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomerDB;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20240312161313 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
String value = "N";
if (isCustomerDb(IntegryCustomerDB.Gramm_Gramm)){
value = "S";
}
createSetup("PICKING", "SETUP", "FLAG_WARNING_NEW_PARTITA_MAG", value,
"Questo flag permette di avvisare l'utente se è stato inserito un nuovo lotto per quell'articolo",
"SI_NO");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,128 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20240312175552 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createOrUpdateView("MES_MachineStatusByOrder", "CREATE VIEW MES_MachineStatusByOrder AS\n" +
"WITH base AS (\n" +
" SELECT gestione,\n" +
" data_ord,\n" +
" num_ord,\n" +
" id_riga,\n" +
" data_mov,\n" +
" ISNULL(LEAD(data_mov)\n" +
" OVER (PARTITION BY cod_cmac, data_ord, num_ord, gestione ORDER BY id_riga),\n" +
" DATEADD(MINUTE, 1, data_mov)) AS data_mov_fine,\n" +
" cod_cmac,\n" +
" CASE WHEN evento <> 'START' THEN 'STOP' ELSE evento END as evento,\n" +
" evento AS causale,\n" +
" descrizione,\n" +
" qta_mov,\n" +
" num_fase,\n" +
" activity_id\n" +
" FROM dtb_ord_macc\n" +
"),\n" +
"\n" +
" statuses AS (\n" +
" SELECT cod_cmac,\n" +
" id_riga,\n" +
" LAG(evento)\n" +
" OVER (PARTITION BY cod_cmac, data_ord, num_ord, gestione ORDER BY id_riga) AS prev_evento,\n" +
" evento,\n" +
" num_ord,\n" +
" data_ord,\n" +
" gestione,\n" +
" data_mov,\n" +
" data_mov_fine,\n" +
" CASE\n" +
" WHEN MAX(id_riga) OVER ( PARTITION BY cod_cmac, data_ord, num_ord, gestione ) = id_riga\n" +
" THEN evento END AS last_evento\n" +
" FROM base\n" +
" WHERE DATEDIFF(MINUTE, data_mov, data_mov_fine) > 0\n" +
" ),\n" +
" steps AS (\n" +
" SELECT data_ord,\n" +
" num_ord,\n" +
" gestione,\n" +
" MIN(data_iniz) AS data_iniz,\n" +
" MAX(ISNULL(data_fine, GETDATE())) AS data_fine,\n" +
" cod_jfas\n" +
" FROM dtb_ord_steps\n" +
" WHERE data_iniz IS NOT NULL\n" +
" GROUP BY data_ord, num_ord, gestione, cod_jfas\n" +
" ),\n" +
" advanced_statuses AS (\n" +
" SELECT statuses.cod_cmac,\n" +
" statuses.id_riga,\n" +
" statuses.prev_evento,\n" +
" statuses.evento,\n" +
" MAX(last_evento)\n" +
" OVER ( PARTITION BY statuses.cod_cmac, statuses.data_ord, statuses.num_ord, statuses.gestione) AS last_evento,\n" +
" CASE\n" +
" WHEN statuses.evento = 'START' AND ISNULL(statuses.prev_evento, '') <> 'START' THEN 1\n" +
" ELSE\n" +
" CASE\n" +
" WHEN statuses.evento <> 'START' AND ISNULL(statuses.prev_evento, '') = 'START' THEN -1\n" +
" ELSE 0 END\n" +
" END AS value,\n" +
" DATEADD(MINUTE, DATEDIFF(MINUTE, 0, ISNULL(statuses.data_mov, steps.data_iniz)),\n" +
" 0) as data_mov,\n" +
" DATEADD(MINUTE, DATEDIFF(MINUTE, 0, ISNULL(statuses.data_mov_fine, steps.data_fine)),\n" +
" 0) as data_mov_fine,\n" +
" statuses.num_ord,\n" +
" statuses.data_ord,\n" +
" statuses.gestione,\n" +
" steps.cod_jfas\n" +
" FROM statuses\n" +
" INNER JOIN steps ON statuses.num_ord = steps.num_ord\n" +
" AND statuses.data_ord = steps.data_ord\n" +
" AND statuses.gestione = steps.gestione\n" +
" ),\n" +
" grouped_events AS (\n" +
" SELECT cod_cmac,\n" +
" evento,\n" +
" value,\n" +
" SUM(ABS(value))\n" +
" OVER (PARTITION BY cod_cmac, num_ord, data_ord, gestione ORDER BY cod_cmac, num_ord, data_ord, gestione, data_mov\n" +
" ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS event_groups,\n" +
" data_mov,\n" +
" data_mov_fine,\n" +
" DATEDIFF(SECOND, data_mov, data_mov_fine) AS duration_seconds,\n" +
" DATEDIFF(MINUTE, data_mov, data_mov_fine) AS duration_minutes,\n" +
" num_ord,\n" +
" data_ord,\n" +
" gestione,\n" +
" cod_jfas\n" +
" FROM advanced_statuses\n" +
" WHERE DATEDIFF(MINUTE, data_mov, data_mov_fine) > 0\n" +
" )\n" +
"\n" +
"SELECT cod_cmac,\n" +
" evento,\n" +
" value,\n" +
" MIN(data_mov) AS data_mov_iniz,\n" +
" MAX(data_mov_fine) AS data_mov_fine,\n" +
" SUM(duration_minutes) AS duration_minutes,\n" +
" num_ord,\n" +
" data_ord,\n" +
" gestione,\n" +
" cod_jfas\n" +
"FROM grouped_events\n" +
"group by cod_cmac, evento, value, event_groups, num_ord, data_ord, gestione, cod_jfas");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,34 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
import java.sql.Statement;
public class Migration_20240313163623 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (!existsColumn("stb_gest_setup", "flag_multi_value")) {
executeStatement("ALTER TABLE stb_gest_setup ADD flag_multi_value BIT DEFAULT 0");
}
createSetup("PVM", "PIAN_ACC_ROSSG", "TIPI_FORN_ACQ", null,
"Identifica i tipi di fornitore su cui è possibile creare un ordine di acquisto per la materia prima.",
"COD_ATIP", true);
createSetup(
"PVM", "PIAN_ACC_ROSSG", "COD_MGRP_MP", null,
"Identifica i gruppi merceologici di materia prima per cui è possibile creare un ordine di acquisto",
"COD_MGRP", true);
}
@Override
public void down() throws Exception {
}
}

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