Compare commits

..

836 Commits

Author SHA1 Message Date
99ca1731b1 Aggiunta share samba su immagine docker. Cambiata immagine base da alpine e ubuntu noble (24)
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-16 12:26:16 +01:00
af6f465c0e modifiche per steup
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-16 11:34:12 +01:00
d981e59a7d Rimosso Containerfile
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-15 18:27:09 +01:00
5103830369 Finish Feature-SteUp
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-12 18:52:01 +01:00
5056d7e0c8 Merge branch 'develop' into feature/Feature-SteUp 2025-12-12 18:51:57 +01:00
4b5e46de7b varie steup 2025-12-12 18:51:48 +01:00
4d686ee145 Allineamento dati follies group su mtb_aart_anag
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-12 18:30:40 +01:00
e842326f5b Merge remote-tracking branch 'origin/develop' into develop 2025-12-12 18:30:32 +01:00
63ad11086f Allineamento dati follies group su mtb_aart_anag 2025-12-12 18:30:26 +01:00
21f6fc6717 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-12 17:43:00 +01:00
8c2789b5f3 modificata in or la condizione dei db format e gestfood per la cancellazione dei duplicati 2025-12-12 17:42:54 +01:00
8f3ef405cf Merge branch 'develop' into feature/Feature-SteUp 2025-12-12 17:15:44 +01:00
76e76dfcf4 aggiunti parametri nella migration
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-12 17:13:14 +01:00
1df5ad7137 varie steup 2025-12-12 17:00:29 +01:00
a43ca46395 Spostato metodo downloadReportList da refactoring
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-12 16:06:38 +01:00
a63eba544b Allineamento dati Auricchio, levanplast e agricoper per cambio chiave mtb_aart_anag
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-12 13:20:49 +01:00
ce912bf103 Allineamento dati Auricchio, levanplast e agricoper per cambio chiave mtb_aart_anag 2025-12-12 13:20:44 +01:00
ababbf6142 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-12 10:12:20 +01:00
e97fd0aacb inserita nota bio nella dtb_note_doc, associata ai tipi documenti e svuotata setup stampa_documenti per rossogargano 2025-12-12 10:12:09 +01:00
51c1ed1d23 Merge branch 'develop' into feature/Feature-SteUp 2025-12-12 09:59:37 +01:00
a9be8f7003 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-12-12 09:58:38 +01:00
7522092a12 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-12 09:58:37 +01:00
4dc0174800 Fix su convert mvwSitart to mtbColr 2025-12-12 09:58:32 +01:00
a04b2fa4a1 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 17:14:44 +01:00
04317470c6 creata setup per visualizzare dettaglio su report fatturato agente/clienti 2025-12-11 17:14:35 +01:00
187216dd9f Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 16:46:46 +01:00
e11172a90f Implementato servizio di reset selle posizioni MonoUl 2025-12-11 16:46:35 +01:00
51d5b05bd3 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 16:31:10 +01:00
3a2ceaf217 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 16:31:09 +01:00
c783f69a49 aggiunta setup per esportare 2025-12-11 16:30:22 +01:00
1c8695095b Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 16:06:11 +01:00
fc28af761c creato report personalizzato stampa registri iva per cosmapack 2025-12-11 16:06:02 +01:00
fd4db5ab3b Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 13:12:05 +01:00
f7e1d1f6ca [ROSSOGARGANO]
- fix riposizionamento in posizione monoUl
2025-12-11 13:11:57 +01:00
0b8f82f041 Create nuove utilities
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 12:45:12 +01:00
99680dccd8 Creata nuova utility getMtbUntMisFromCodMart
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 11:21:14 +01:00
e948855fc0 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 10:30:17 +01:00
0854acacfb Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 10:30:16 +01:00
1aba141c9f Aggiunto database tempestadi nei customer db 2025-12-11 10:30:02 +01:00
741cb960d4 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 10:13:39 +01:00
82d7efc00c Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 10:13:39 +01:00
c6c2739525 Aggiunto database tempestadi nei customer db 2025-12-11 10:13:21 +01:00
313bfc21ff Modificato messaggio di errore per documenti già esistente
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-11 09:44:12 +01:00
36f50ad846 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 18:48:18 +01:00
798e5b532e Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 18:48:17 +01:00
c27c96c3d9 Aggiunto parallel stream in retrieve items dalla cache 2025-12-10 18:48:11 +01:00
4e3d15ebd8 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 18:47:37 +01:00
0ba9297f39 Finish Hotfix-1
Some checks failed
IntegryManagementSystem_Multi/pipeline/head Something is wrong with the build of this commit
2025-12-10 18:47:36 +01:00
7c036172d8 Aggiunto parallel stream in retrieve items dalla cache 2025-12-10 18:47:22 +01:00
8afa01d8ef Corretto errore null di Ime quando svuotavano il campo tipo bene
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 17:34:59 +01:00
db1949b5b6 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 16:22:41 +01:00
bb47dd458e Finish FixSavePreventivo
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 16:22:40 +01:00
530b6af4ef [CRM] fix completeOrder 2025-12-10 16:20:22 +01:00
92cd4b1af5 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-12-10 13:35:53 +01:00
6b71d6b784 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 13:35:53 +01:00
de4d8d225f Aggiunto codMart nella richiesta di retrieveGiacenza 2025-12-10 13:35:43 +01:00
671c2e99d0 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 12:19:31 +01:00
755e7394b4 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 12:19:31 +01:00
ce06683722 Fix duplicate key su mtbCols 2025-12-10 12:19:11 +01:00
e8a1a8ca0b Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 12:16:14 +01:00
7a5c024005 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 12:16:13 +01:00
c82f2a57d8 gestito errore date promo duplicate e sistemata retun dei Thread 2025-12-10 12:13:13 +01:00
78dbf9f7e3 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 12:01:55 +01:00
b9e863a563 Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 12:01:54 +01:00
60e4429c3f [ANOMALIE UL]
- aggiunta eliminazione livello anomalia
2025-12-10 12:01:44 +01:00
d7012d4e1f eliminta conversione caratteri e sistemata data iniz promo 2025-12-10 11:44:10 +01:00
1d52f79337 fix funzione pvm_getassortimentoClientePedane per "ambiguous column name" su cod_Vdes
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 11:20:28 +01:00
0e1adccb7c inserito campo cod_vdes nella mtb_aart_anag e cancellati duplicati su format e gestfood
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 10:33:57 +01:00
fa76a8e92d Merge remote-tracking branch 'origin/develop' into develop
Some checks are pending
IntegryManagementSystem_Multi/pipeline/head Build queued...
2025-12-10 10:33:11 +01:00
9b34a51bd9 inserito campo cod_vdes nella mtb_aart_anag e cancellati duplicati su format e gestfood 2025-12-10 10:32:58 +01:00
b75f7e3810 Finish DatiDocSpostaUL
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 09:57:30 +01:00
4aeccdfa76 Aggiunti dati doc in creazione documento sposta ul 2025-12-10 09:56:42 +01:00
39db8e6e1b Modifica migrations per DMS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-10 09:27:37 +01:00
1b87cacca2 aggiunta fk su mtb_unt_mis
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-09 16:02:09 +01:00
326bd4294e Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-09 15:03:34 +01:00
6a237ce4d9 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-09 15:03:33 +01:00
a64932d918 correzioni ad esportazione e importazione dialogo 2025-12-09 15:03:21 +01:00
e887aceaaf Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-09 14:32:50 +01:00
a15d009f76 Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-09 14:32:50 +01:00
a62f37d930 aggiornamento menu 2025-12-09 14:32:39 +01:00
55f23b2dfc aggiunti campi in importazione articoli
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-09 13:28:33 +01:00
a4a2b34379 Merge branch 'release/Release-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-09 12:44:05 +01:00
1ef49b87e8 Merge tag 'Release-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
Finish Release-anomalie
2025-12-09 12:44:05 +01:00
f2d67ea89d anomalie merce
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-09 12:43:27 +01:00
fda162d867 esportazione document md
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-05 18:27:06 +01:00
2008ef0e8f Divisa setup TIPO_MOVIMENTO_FISCALE in TIPO_MOVIMENTO_FISCALE_CAR e TIPO_MOVIMENTO_FISCALE_SCAR
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-05 18:14:35 +01:00
6d8e0e747f Varie per carelli giacenza, attività integry gramm usa
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-05 15:19:07 +01:00
5417e28630 Merge remote-tracking branch 'origin/develop' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-12-05 13:23:42 +01:00
4ac4686645 [ROSSOGARGANO - AnomalieMerce]
- nuova gestione anomalie merce
2025-12-05 13:23:31 +01:00
1594154639 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-05 11:38:02 +01:00
3a4a954b91 [CRM] fix completeOrder
Some checks are pending
IntegryManagementSystem_Multi/pipeline/head Build queued...
2025-12-05 11:37:53 +01:00
744f92c881 [CARELLI] Aggiunto markDocumentReceived
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-05 10:58:45 +01:00
6e5f099fc2 aggiunta tabelle equivalenti 2025-12-05 10:51:39 +01:00
697cd58e39 aggiunta tabelle equivalenti
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-05 10:09:38 +01:00
4bf1f6021f aggiunta tabelle equivalenti
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-05 09:41:52 +01:00
118d2d83d5 Fix su query di calcolo fabbisogno linee prod per WMS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-04 17:54:08 +01:00
149bdc36b3 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-04 13:02:34 +01:00
89c69bc0d2 cambiata la chiave sulla tabella azienda 2025-12-04 13:02:19 +01:00
240f18d19d Fix qta_prod per storico mes
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-04 13:01:16 +01:00
9a8a144705 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-12-04 12:13:52 +01:00
2f412f1ad6 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-04 12:13:52 +01:00
8e8b03889a Creato servizio di create udc with rows 2025-12-04 12:13:47 +01:00
dd4ace59bd Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-04 11:25:26 +01:00
52c0e0ca61 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-04 11:25:25 +01:00
e2f2b9bde9 Migliorato check di correttezza barcode_ul per i le UDC anonime 2025-12-04 11:25:21 +01:00
4ea9be84db Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-04 11:23:04 +01:00
11e4b1cf20 Finish Hotfix-1
Some checks failed
IntegryManagementSystem_Multi/pipeline/head Something is wrong with the build of this commit
2025-12-04 11:23:04 +01:00
a66cfa16d8 Aggiunto check di correttezza barcode_ul per i le UDC anonime 2025-12-04 11:22:59 +01:00
9f628973e9 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-04 09:25:43 +01:00
9fa7f9628c Finish FixCreateContact
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-04 09:25:43 +01:00
1a5156d53c Fix creazione attività in createContact crm 2025-12-04 09:25:34 +01:00
ba667fd28e inseriti campi cod_linea, cod_slinea, cod_sslinea nella entity mtb_aart
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-04 08:44:44 +01:00
cddc7f8979 - fix retrieve depositi utente in login
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-03 16:56:50 +01:00
60c436256e Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-12-03 15:48:54 +01:00
46449c47b9 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-03 15:48:53 +01:00
f8b6d3ebe0 aggiunto gramm usa 2025-12-03 15:48:31 +01:00
b3d29219ee Modifica per corretta generazione scadenza di fine mese (febbraio)
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-03 12:14:41 +01:00
2c81a6566b Finish FixNotifyUser
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-03 12:02:26 +01:00
f697a122b6 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-03 12:02:26 +01:00
3f4ed16f20 Fix allegato in b64 nella mail 2025-12-03 12:02:13 +01:00
cbbfbb16b8 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-03 11:38:46 +01:00
585a04ffba Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-03 11:38:45 +01:00
b025be1bd9 Cambiato response entity in downloadStbEmailContent e downloadJtbDisegniFiles 2025-12-03 11:38:36 +01:00
5453826156 Cambiato response entity allegati fatturazione 2025-12-03 11:36:21 +01:00
8312d48970 Cambiata risposta downloadStbActivityFileAttachment 2025-12-03 11:12:47 +01:00
b50c348528 Cambiato response entity allegati fatturazione 2025-12-03 11:10:42 +01:00
64aeff7bf6 disabilitata setup che chiede se stampare o meno la lettera di quietanza a rossogargano
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-03 09:56:14 +01:00
2a8cf16ce0 Fix localDate
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-02 19:15:05 +01:00
3539e82849 Fix check localDate
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-02 18:52:17 +01:00
f4faa20652 Aggiornata connessione FRUDIS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-02 17:33:54 +01:00
e7f5959e27 creata migratoio e servizio per svuotare il db.
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-02 16:35:50 +01:00
1d897f1461 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-02 15:46:05 +01:00
f3e48b9a3e Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-02 15:46:04 +01:00
f0e41c6554 Fix righe collo con Delete in distribuzioneCollo 2025-12-02 15:45:40 +01:00
3d76dec03a Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-02 15:08:49 +01:00
754b58fd37 creata setup che se abilitata chiede se stampare o meno la lettera di quietanza 2025-12-02 15:08:35 +01:00
0627fd59c9 aggiunte tabelle sincronizzaione articoli
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-02 14:52:47 +01:00
31480b8fbe Utilizzati nuovi servizi WMS per scaricoMateriaPrimaDaPosizione/scaricoMateriaPrimaDaOrdine
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-02 10:43:16 +01:00
c1efdf48a6 Modifiche migrations per DMS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-02 10:08:30 +01:00
e1de9f4db9 Attivazione nuova gestione produzione dulciar
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-02 09:54:02 +01:00
ce2ec669ba Attivazione nuova gestione produzione dulciar 2025-12-02 09:53:57 +01:00
c9658954aa Finish ModifSetup
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 19:10:14 +01:00
5011aa271d Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 19:10:14 +01:00
af4a5511a3 Creata setup per deposito ricambi macchinari prod 2025-12-01 19:10:05 +01:00
fa996c210c Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 19:03:04 +01:00
c5b5fb62a1 Abilitazione nuova versione generazione ordini di produzione 2025-12-01 19:02:57 +01:00
3b007c061e Finish FixDownload
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 18:53:14 +01:00
8ee9e2fe57 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 18:53:14 +01:00
4ddcc6228e Fix errore in download file se mimetype null 2025-12-01 18:53:00 +01:00
7cf9df3549 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 18:31:26 +01:00
8e8d6cf2c3 Finish ModifSetup
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 18:13:14 +01:00
2a5314fd1e Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 18:13:14 +01:00
9363e674b5 Creata setup per deposito ricambi macchinari prod 2025-12-01 18:13:04 +01:00
e7252f7fea Merge remote-tracking branch 'origin/develop' into develop 2025-12-01 17:55:09 +01:00
b5e1d2e1ce Abilitazione log picking
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 16:50:12 +01:00
53ef2539f5 aggiunto suffisso anche per griglie 2025-12-01 16:16:22 +01:00
6136d9b848 Migliorato errore di dbName, profileDb e CustomerDb non valido
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 16:07:28 +01:00
fe2be9b926 aggiunte nuove entity in sincronizzazioni
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-12-01 15:10:30 +01:00
1b113999b2 Rimosso log
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 13:11:11 +01:00
4ebcae77ca Migliorie
Some checks are pending
IntegryManagementSystem_Multi/pipeline/head Build queued...
2025-12-01 13:09:58 +01:00
8d35f9284a Refactoring UserCacheService, adesso sfrutta EntityCache più che il caching integrato.
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 13:05:59 +01:00
b953349afc Finish Hotfix-101
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 11:44:34 +01:00
6c2eaaa37a Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 11:44:34 +01:00
9b8824e681 Modifica gestione conto in CTB_AnaG PER IMPORTAZIONE nuovo cliente da WEB 2025-12-01 11:44:20 +01:00
fb03aa1ea7 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 11:43:30 +01:00
c16e23d3bf Modifica migration per DMS 2025-12-01 11:43:21 +01:00
27055f8e5e Cambiata configurazione ram su Dockerfile
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 11:02:55 +01:00
b8ac769ffd Aggiunto flag_attivo nel trigger changeTipoRiep
Some checks are pending
IntegryManagementSystem_Multi/pipeline/head Build queued...
2025-12-01 10:57:27 +01:00
0216bc5d53 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 10:57:09 +01:00
db3973637d Aggiunto flag_attivo nel trigger changeTipoRiep 2025-12-01 10:57:03 +01:00
7dab29e8c2 Aggiornato ems_settings.json
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
# Conflicts:
#	docker/tomcat/conf/integry/ems_settings.json
2025-12-01 10:23:34 +01:00
809ffe73b9 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 10:02:06 +01:00
4d13d17095 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 10:02:05 +01:00
f749356735 letti data inizio e fine dalla vtb_list_Data 2025-12-01 10:01:59 +01:00
b2d24ab6b4 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 09:48:04 +01:00
6bb7b55618 inserito campo flag_attivo nella ctb_cont 2025-12-01 09:47:54 +01:00
920257812c Merge branch 'develop' into feature/Feature-SteUp 2025-12-01 09:20:46 +01:00
00efbe6fcf Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 08:55:11 +01:00
cacb24a563 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 08:55:11 +01:00
5da098e058 correzione per evitare che i campi stringa vuoti "" vengano salvati come tali 2025-12-01 08:55:04 +01:00
3e0c443ce3 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-12-01 08:48:08 +01:00
b4442bc251 correzione per evitare che i campi stringa vuoti "" vengano salvati come tali 2025-11-28 19:20:32 +01:00
eec353c6a5 Creato servizio per creazione manutenzioni macchinari
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-28 19:19:18 +01:00
8b50f54881 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-28 16:01:18 +01:00
42f50e0d80 disabilitate voci menu nuove gestioni colori, linee, sottolinee e sottosottolinee 2025-11-28 16:01:07 +01:00
cbeae87d23 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-28 12:56:27 +01:00
71cb1db5ef Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-28 12:56:26 +01:00
bb642d92db controllo su null or empty 2025-11-28 12:55:53 +01:00
ddd3b95d17 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-28 12:32:22 +01:00
ff5428f8bd Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-28 12:32:22 +01:00
d3b39ad878 controllo su null or empty 2025-11-28 12:32:15 +01:00
99a366d875 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-27 17:34:15 +01:00
abc4f1c966 modificata classe MdRigheDTO 2025-11-27 17:34:06 +01:00
fc1c2f192e Migliorata gestione DBMS Change Tracking in caso di disallineamento min valid version
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-27 17:22:15 +01:00
ac4afa9a2b create nuove voci menu per linee sottolinee e sottosottolinee
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-27 17:02:33 +01:00
c5a315e070 modifiche alle tabelle delle linee articoli
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-27 15:15:49 +01:00
1d0fd3341d Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-27 14:06:24 +01:00
b44685335a creata setup per salvare path di esportazione xml 2025-11-27 14:06:11 +01:00
e5689da13d Cambiato ems_settings.json
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-27 11:44:24 +01:00
f57710cb32 Cambiato ems_settings.json
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-27 11:31:20 +01:00
ceb5dc817c Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
# Conflicts:
#	docker/tomcat/conf/integry/ems_settings.json
2025-11-27 11:06:40 +01:00
3a934813d8 Cambiato ems_settings.json 2025-11-27 11:06:27 +01:00
d56fe38e2c Cambiato ems_settings.json
Some checks failed
IntegryManagementSystem_Multi/pipeline/head Something is wrong with the build of this commit
2025-11-27 11:06:18 +01:00
5555a40731 Modifica funzione f_pp_consuntivo_prod_tracc
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-27 10:55:22 +01:00
acf5daf673 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-27 10:28:18 +01:00
939c4ab236 modificata entity MtbAartMarchio 2025-11-27 10:28:04 +01:00
49237b9585 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-27 10:21:32 +01:00
abbf298b4f Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-27 10:21:31 +01:00
34985c9fd3 Sistemato flag recuperaUl in Spedizione WMS 2025-11-27 10:21:27 +01:00
401f0330de Migliorie su ass_serie_ord_a_collo in distribuzione colli
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-27 10:00:38 +01:00
7815fb72f1 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 16:50:32 +01:00
0e8cc5b2de Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 16:50:31 +01:00
9a18dd6ebd esclusa merce in arrivo 2025-11-26 16:50:06 +01:00
3f0b9315a2 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 16:22:34 +01:00
32a15a4f3e Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 16:22:34 +01:00
932f99c147 - rimossa modifiche del codJfas in testata ordini durante la ripianificazione 2025-11-26 16:22:18 +01:00
1fc7d01b9c Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 16:19:25 +01:00
46e47a9549 - fix gestione token in richieste cross profile 2025-11-26 16:19:17 +01:00
ba1bbbafe0 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 16:00:19 +01:00
fa54de3d76 inseriti metodi override nelle entity MtbAartMarchio, MtbMarchioLinea, MtbMarchioSlinea, MtbMarchioSslinea 2025-11-26 16:00:03 +01:00
1550de37e6 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 13:30:36 +01:00
450f9f4dd4 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 13:30:35 +01:00
f1da5057d6 Fix su deposito reale dell'utente: è stato aggiunto tra gli header il codMdep che indica il deposito REALE su cui si trova l'utente. Utile per capire quali stampanti usare nel WMS o per sapere su che deposito sta effettuando le chiamate l'utente. 2025-11-26 13:30:30 +01:00
a3d15aeb32 modificata classe mdrighe:aggiunto prezzo netto
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 12:18:54 +01:00
c933c02727 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 11:51:44 +01:00
28b94b228a create classi mdtestate e mdrighe e aggiunto configuratore formati di esportazione md attivo su sardinya 2025-11-26 11:51:34 +01:00
c291db3e34 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 11:47:18 +01:00
3f9a451a70 Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 11:47:18 +01:00
9f39c5bc2d fix [GRAMM]
- corretta gestione idRiga ed idStep in ripianificazione ordini di lavoro
2025-11-26 11:47:05 +01:00
6a455db664 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 10:18:47 +01:00
c33c1da199 Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-26 10:18:47 +01:00
d0769ea1bd [GRAMM]
- corretta gestione idRiga ed idStep in ripianificazione ordini di lavoro
2025-11-26 10:18:35 +01:00
f3f768380a Merge remote-tracking branch 'origin/develop' into develop 2025-11-26 10:18:01 +01:00
cb2cf06200 [GRAMM]
- corretta gestione idRiga ed idStep in ripianificazione ordini di lavoro
2025-11-26 10:17:35 +01:00
a81fc6813c Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-26 09:44:06 +01:00
5c03b928b6 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-11-26 09:44:04 +01:00
16b478a511 [ConSegna] Aggiunto importoRiga 2025-11-26 09:43:53 +01:00
c2ef09a604 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-25 11:56:27 +01:00
f2de64de75 disabilitata setup per visualizzare maschera di riepilogo del saldo del cliente 2025-11-25 11:56:15 +01:00
b877347a77 impostato cod_jcom = note
Some checks are pending
IntegryManagementSystem_Multi/pipeline/head Build queued...
2025-11-25 11:46:34 +01:00
2d43952d96 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-25 11:43:42 +01:00
ee171374c8 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-25 11:43:42 +01:00
f0d1cdc81a gestita commessa nelle note 2025-11-25 11:43:37 +01:00
1758dcabbb Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-25 11:41:03 +01:00
8231716e97 Finish Hotfix-100
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-25 11:41:02 +01:00
2603cda317 gestita commessa nelle note 2025-11-25 11:40:58 +01:00
77c79c6247 Merge branch 'develop' into feature/Feature-SteUp 2025-11-25 10:58:20 +01:00
532a9cc3f4 MRP_UpdateQtaImpProx considerata 0 la giacenza se negativa
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-25 10:57:41 +01:00
c26f7feb35 Merge branch 'develop' into feature/Feature-SteUp 2025-11-25 10:10:30 +01:00
15a63cff14 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-25 10:06:08 +01:00
b53d76358b f_pp_consuntivo_prod_tracc 2025-11-25 10:05:56 +01:00
f9ded1153a Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-25 10:04:57 +01:00
81ddb42e5c Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-11-25 10:04:56 +01:00
5ac4d4be63 Rimosso momentaneamente controllo parentActivityId null 2025-11-25 10:04:47 +01:00
0b432960ec Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-25 09:53:57 +01:00
159436247d Finish FixGetMaterialiDistinta
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-11-25 09:53:57 +01:00
2a2435f64d Corretta funzione getMaterialiDistinta 2025-11-25 09:53:51 +01:00
fba5e331b5 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-25 09:36:20 +01:00
21cc88f295 varie per steup 2025-11-25 09:36:00 +01:00
de21ce7cb8 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-24 17:17:08 +01:00
33f24290a9 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-11-24 17:17:07 +01:00
dc83e89392 Fix su retrieve mtbAarts wms 2025-11-24 17:16:56 +01:00
d525048bb3 Fix su retrieve mtbAarts wms
Some checks are pending
IntegryManagementSystem_Multi/pipeline/head Build queued...
2025-11-24 17:16:40 +01:00
f5d46be57d Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-24 17:10:27 +01:00
ca4c3c3412 Finish FixProcGeneraOrdLav
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-11-24 17:10:26 +01:00
e5c16c6e4e Corretta funzione getMaterialiDistinta ed arrotondamento riproporzione qta ord 2025-11-24 17:09:03 +01:00
42bef35d5f Merge branch 'hotfix/Hotfix-1' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-24 17:04:02 +01:00
44e3de6a0f Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-24 17:04:01 +01:00
9942f92440 Merge branch 'master' into hotfix/Hotfix-1 2025-11-24 17:03:46 +01:00
e34bb01aea - fix ripianificazione ordini di lavoro 2025-11-24 17:03:27 +01:00
6f11e08807 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-24 16:40:47 +01:00
aa9529f551 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-11-24 16:40:46 +01:00
bcb8f4475d Fix regola checkDeleteMtbColrWithoutDoc 2025-11-24 16:40:31 +01:00
8a83213384 Migliorata gestione riconnessione DbmsChangeTracker
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-24 16:05:30 +01:00
2433c98ab1 Migliorate performance Exchange Clienti
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-24 15:53:25 +01:00
595fe77472 modifiche a getgrigliaacqiusto 2025-11-24 13:58:22 +01:00
29f9335876 modifiche a procedura di importazione listini di apulia, gestita perc premi, modificata regola che assegna tipo variazione sulle griglie, aggiunta generazione pk nelle migration
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-24 12:09:22 +01:00
e975964f53 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-24 12:01:01 +01:00
9d82cbc610 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-24 12:01:00 +01:00
0a12dc23f2 Fix check quantità nelle regole di MtbColr 2025-11-24 12:00:42 +01:00
1719f2ba37 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-24 11:54:01 +01:00
ddd9c73f49 Finish Hotfix-1
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-24 11:54:01 +01:00
1b0f5d5d29 Fix check quantità nelle regole di MtbColr 2025-11-24 11:53:51 +01:00
6991e60ec5 Fix inizializzazione mappa char replacements
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-24 10:50:04 +01:00
8a87d428ae modifiche per evitare l'errore nella generazione del file xml
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-24 09:55:53 +01:00
0058373710 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-24 09:12:45 +01:00
d9f93b14e1 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-24 09:12:45 +01:00
dea6b14323 modifiche a procedura di salvataggio 2025-11-24 09:12:36 +01:00
d01b4aef8f aggiunta migratione e corretto servizio per selezione conto
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-21 18:52:03 +01:00
b2c3008464 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-21 18:05:48 +01:00
d02f44237e modificata funzione getSchedaCosti 2025-11-21 18:05:40 +01:00
675e919652 correzione importazione scontrini mmpos forno
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-21 16:22:35 +01:00
9d9d4e3d87 Aggiunta setup wms
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-21 15:48:11 +01:00
19e17f76d4 migration getMaggiorazioneSpese
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-21 15:03:23 +01:00
df18330a01 Merge remote-tracking branch 'origin/develop' into develop 2025-11-21 15:03:10 +01:00
da61cb5439 setup listini 2025-11-21 14:02:59 +01:00
975e4f2be4 aggiunti default 2025-11-21 13:18:21 +01:00
e31b0bc1a0 Eliminata viene fatta 2 volte 2025-11-21 13:18:06 +01:00
84ccdafd90 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-21 12:19:27 +01:00
97de2f0e71 create entity mtb_marchio_linea, mtb_marchio_slinea, mtb_marchio_sslinea e inserite come entitychild nella mtb_marchio_linea 2025-11-21 12:19:13 +01:00
1ee321b253 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-21 10:34:55 +01:00
7912d29f00 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-21 10:34:54 +01:00
ecd8bca2aa Fix su flagSetNumProt 2025-11-21 10:34:44 +01:00
1a64179099 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-21 10:12:02 +01:00
54588d20bd Finish FixRipianifica
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-21 10:12:01 +01:00
84f3823597 Fix lettura setup reimposta lotto in ripianificazione mes 2025-11-21 10:11:51 +01:00
0022e620da impostato flag tracciabilità
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-21 09:49:59 +01:00
62a1f5a85f create viste per contabilità
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-20 18:25:34 +01:00
cd389dc83f Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-20 18:02:55 +01:00
974b5f61af Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-11-20 18:02:54 +01:00
a10876effc Fix su changes detection 2025-11-20 18:02:46 +01:00
4385520480 creazione suggestcode capelli monelli
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-20 17:31:13 +01:00
a1b892a75e Migliorato exchange clienti
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-20 17:28:43 +01:00
92dcc45638 varie contabilità
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-20 17:14:08 +01:00
a178ec5017 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-20 13:15:39 +01:00
1456e094a2 Aggiunti log per tracciare invio mail bolle generate e firmate 2025-11-20 13:15:22 +01:00
58b89777bb Aggiunta cache su MtbDepo
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-20 11:53:20 +01:00
f4da09eacc utility funciton for cache
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-20 10:37:08 +01:00
6f47434d6f varie modifiche per movimenti contabili con servizi rest
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-19 19:22:31 +01:00
8fb8e4c05a Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-19 13:26:46 +01:00
d18ac96cc4 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-19 13:26:46 +01:00
9b26849cb6 [MES]
- modificato servizio di ripianificazione ordini di lavorazione: le date degli step non devono essere resettate
2025-11-19 13:26:32 +01:00
fcbee627b0 inserito campo e get e set cod_mssfa nella mtb_aart
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-19 12:21:33 +01:00
b17d807ca3 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-19 10:29:49 +01:00
5b017fdad1 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-19 10:29:49 +01:00
4957cba34b sistemata registrazione movimenti contabili 2025-11-19 10:29:43 +01:00
85e59e577f Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-19 10:15:35 +01:00
5c60cd2558 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-19 10:15:34 +01:00
5a824d0b3a Fix IntegryCustomerDB per 2M Holding (GRAMM) 2025-11-19 10:15:29 +01:00
f60c3337b1 inserito campo flag_bio nella dtb_note_doc
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-19 08:52:20 +01:00
4ee64127b1 Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-18 17:43:57 +01:00
b587e38cc8 Merge branch 'hotfix/Hotfix-1' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-18 17:43:57 +01:00
be4c2d149e Merge branch 'master' into hotfix/Hotfix-1 2025-11-18 17:43:43 +01:00
ccb8b81597 [MES]
- modificata data cons prod in ripianificazione ordini lav
2025-11-18 17:39:58 +01:00
68a45a9eea Finish Hotfix-101
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-18 17:27:09 +01:00
d419c38220 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-18 17:27:09 +01:00
8fe752e595 Attivazione nuova gestione produzione 2025-11-18 17:26:52 +01:00
71ffc5b4cf Attivazione nuova gestione produzione 2025-11-18 17:26:44 +01:00
f00f0cf975 Add migration for trigger on ctb_cont to prevent updates with linked movements
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-18 16:49:34 +01:00
19e8949d86 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-18 16:25:49 +01:00
cc189f4761 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-11-18 16:25:48 +01:00
bd3bf9a8dc FIx customer DB AtiSrl 2025-11-18 16:25:41 +01:00
bee29e357e Aggiunto font cinese semplificato
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 17:35:50 +01:00
461b949581 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 15:37:01 +01:00
7fd4b6236c Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 15:37:00 +01:00
5075e17078 sistemato servizio per aggiornare ordini di slim 2025-11-17 15:36:19 +01:00
c6e2230052 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 15:26:13 +01:00
f9794850c4 Modifica migrations per DMS 2025-11-17 15:26:09 +01:00
ee18ecb15e Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 13:02:21 +01:00
656f2018a2 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 13:02:20 +01:00
2b4cea4ada aggiunta murgia test 2025-11-17 13:02:12 +01:00
2aa6384f69 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 12:42:53 +01:00
72ebb39b22 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 12:42:52 +01:00
8e01509e99 aggiunto cod_mart 2025-11-17 12:41:43 +01:00
e4de8e4287 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 11:10:18 +01:00
18da8c2763 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 11:10:17 +01:00
a770e150a4 Aggiunta dataMod in JtbComt e tabelle clienti e prospect 2025-11-17 11:09:33 +01:00
96993755da aggiunta cancellazione riga collo con qta 0
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 10:43:10 +01:00
30db0f9182 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 10:14:41 +01:00
8064e87017 controllo su cancellazione ordini e aggiunta migration 2025-11-17 10:14:28 +01:00
ef399668c4 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-17 10:13:33 +01:00
72059e4623 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 10:13:32 +01:00
db5ee20a39 Fix su cache non funzionante su Integry Servers 2025-11-17 10:13:25 +01:00
ee4bf3d501 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 09:06:03 +01:00
7b40578ea4 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 09:06:03 +01:00
9685bff5ef per ora eliminata cache 2025-11-17 09:05:54 +01:00
3bff9a6fdc Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-17 08:52:08 +01:00
bfa48cbbb1 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-11-17 08:52:08 +01:00
4f2b251d20 aggiunto levanplastsrl 2025-11-17 08:52:00 +01:00
a1f1ffba95 modificata entity con deletechilds
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-11-14 15:30:38 +01:00
1ab59fa9a6 modificata entity mtbSsfam
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-14 14:27:34 +01:00
800407ebd7 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-14 14:06:13 +01:00
3dad6790fc inserita entity child mtbSsfam nella mtbsgrp e mtbgrup 2025-11-14 14:05:58 +01:00
d073a8fd17 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-14 13:34:07 +01:00
a9068c45cd Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-14 13:34:07 +01:00
ca78b09ad8 sistemata procedura di importazione colli da slim 2025-11-14 13:34:02 +01:00
3e17a7239a eliminato log
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-14 13:14:38 +01:00
d78597cba4 create get e set entity child mtbSsfam nella mtbSfam
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-14 13:11:00 +01:00
91f28a8c82 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-14 12:19:57 +01:00
03a7877899 [CMMS ]
- rimosso codice deposito da anagrafica macchinari
2025-11-14 12:17:55 +01:00
46e8a19c53 creata entity mtbSsfam come entity child mtbSfam
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-14 12:14:20 +01:00
81a42fc1d9 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 19:06:16 +01:00
fdbcc0c539 Gestita data consegna produzione = null 2025-11-13 19:06:12 +01:00
7d51ddb868 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 18:48:43 +01:00
9f25bd2bf6 Finish FixNoteCreaColloLav
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 18:48:16 +01:00
a9ce0d82b6 Corretta impostazione note createULLavorazione
(cherry picked from commit 83d2f329ce)
2025-11-13 18:47:54 +01:00
83d2f329ce Corretta impostazione note createULLavorazione
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 18:33:59 +01:00
7e06512598 modificato localdate
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 18:22:49 +01:00
b5776e82c9 modifiche a controllo resi
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 18:14:22 +01:00
05dd42b0bf Merge remote-tracking branch 'origin/develop' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-13 18:02:35 +01:00
636774ed86 modifiche a inventari, listini e contabilità 2025-11-13 18:02:30 +01:00
6649af6e92 Creata inspection per chiamata SimpleDateFormat con LocalDate
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 17:37:28 +01:00
acfff8e8d6 Modifiche per carelli in chiusure promo e invio variazioni e moficati date in localdate nei listini di vendita
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 16:38:09 +01:00
44c1bd7cee Creata voce di menu ordini di vendita slim2k
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 15:35:13 +01:00
c712e729cc [GRAMM]
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
- gestione controlli di qualità nuovi
2025-11-13 15:25:46 +01:00
b684129f39 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 12:50:58 +01:00
1b339289c1 Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 12:50:57 +01:00
b246991600 odio 2025-11-13 12:50:45 +01:00
dc578d1f17 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 12:40:00 +01:00
6c6f6d4d7e Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 12:40:00 +01:00
50dcb999f1 [TOSCA]
- aggiunto servizio per recuperare ul non pubblicate per la sincronizzazione
2025-11-13 12:39:47 +01:00
c656cc95de Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 11:50:48 +01:00
0b0b5bbf33 Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 11:50:47 +01:00
c2310327d2 rimosso parametro inutile 2025-11-13 11:50:35 +01:00
9962471f71 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 11:48:15 +01:00
8ad86f71d3 Merge branch 'hotfix/Hotfix-1'
Some checks failed
IntegryManagementSystem_Multi/pipeline/head Something is wrong with the build of this commit
2025-11-13 11:48:15 +01:00
3a42baab00 - corretta gestione profilo alla login
- corretta gestione preparedStatement in pubblicazioni sincronizzazioni
- aggiunto servizio di ripubblicazione impegnato tosca
2025-11-13 11:48:02 +01:00
a1bfd0150c Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 11:17:29 +01:00
2e420fc540 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 11:17:28 +01:00
f591246ae3 sistemati nuovo controlli su partita di magazzino 2025-11-13 11:17:04 +01:00
d4c02cf504 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 09:50:48 +01:00
e15878a9eb Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 09:50:47 +01:00
39f43b3361 varie correzioni per carelli 2025-11-13 09:50:26 +01:00
18a6756860 Rimosso update application name per device id
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-13 09:42:09 +01:00
3640b08041 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-12 19:07:54 +01:00
928d47f772 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-12 19:07:53 +01:00
28478cb11d Ripristinato check di validation della connessione nel datasource 2025-11-12 19:07:47 +01:00
0c48df7895 Modifica migrations per DMS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-12 18:42:29 +01:00
327f5af3dd Aggiunta unità di misura di magazzino e rapporto di conversione 1 in registazione inventario
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-12 16:36:00 +01:00
62234f2edf aggiunto n uovo campo su testata dei listini
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-11 17:32:08 +01:00
2fcba55965 aggiunto n uovo campo su testata dei listini
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-11 17:30:49 +01:00
d29768776a Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-11 16:43:07 +01:00
3dcf6d3ee0 Configurazione nuovo cliente EDI HALLES - GRAMM 2025-11-11 16:43:03 +01:00
7c2aa55eb8 Gestione chiusura commessa MAGGIO 2025-11-11 16:42:42 +01:00
e92d64a05e Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-11 15:14:54 +01:00
0fa021be3e Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-11 15:14:53 +01:00
086bd574d5 Aggiunta pezza in login per disallineamento profileDb != dbName 2025-11-11 15:13:47 +01:00
b46f26790d Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-11 12:24:35 +01:00
c364d57e86 [CONSEGNA] Cambiati i tipi indirizzo per le personeRif che devo riceve la bolla firmata e non 2025-11-11 12:24:22 +01:00
6d89e4d09b Rimosso select * in pvm_getassortimentoCliente
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-11 12:06:49 +01:00
3391051bb8 Finish FixSetupGestWebUser
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-11 11:35:58 +01:00
acba051357 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-11 11:35:58 +01:00
785ae254ee Creazione stb_gest_setup presenti solo in wtb_gest_setup_user 2025-11-11 11:35:37 +01:00
21a189ea66 aggiunto controllo su [NULL]
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-11 10:44:20 +01:00
3a4a11d9e8 Migliorata gestione datasources in BasicConnectionPool
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-11 10:26:39 +01:00
6d5d021884 Finish Hotfix-101
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 18:35:27 +01:00
185d403d7a Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 18:35:27 +01:00
349d983b7f Impostata truncate a 40 su ragione sociale in import Made In Masseria 2025-11-10 18:35:14 +01:00
85ed6b54f9 aggiunto n uovo campo su testata dei listini
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 18:10:15 +01:00
9b6b0c87aa sistemato metodo per errore avevo cambiato il requestparam
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 17:16:34 +01:00
fd68a9b73a modifiche a contabilità per variazione movimento con creazione scadenza e pagamento nello stesso movimento
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 17:07:19 +01:00
433ab4b0ec Inserita voce menù per lanciare procedura di cancellazione movimenti contabili
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 16:29:30 +01:00
df9fbc7f65 Implementato check connection in DbmsChangeTracker
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 15:42:40 +01:00
a8253614b4 aggiunto +
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 13:07:21 +01:00
9977cae821 gestito pagamento contestuale alla registrazione della fattura
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-10 12:46:48 +01:00
344010ed90 Aggiunta cache di StbEditLimit
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-10 12:23:51 +01:00
1c51fb717a Merge remote-tracking branch 'origin/develop' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-10 12:02:05 +01:00
81827a8368 Modifica migrations per DMS 2025-11-10 12:02:00 +01:00
21222a25e9 Gestita esclusione ordini annullati da Distribuzione materiali SMETAR 2025-11-10 12:01:48 +01:00
838f32e04c Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 11:19:51 +01:00
d24a033e01 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 11:19:51 +01:00
bdaf4a5ac6 aggiunta setup per selezionare il tipo calcolo prezzo base 2025-11-10 11:19:41 +01:00
5e76d8db2a Ingrandito campo note_incoterms a 40 in vtb_viaggi
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 11:00:13 +01:00
bae92e626b aggiunta setup per mrp
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 10:44:09 +01:00
0d471db37d Aggiunta migration per rimuovere barcode duplicati nella tabella mtb_aart_bar_code sul database Winact (Carelli) 2025-11-10 10:41:14 +01:00
c4c6875e16 Merge remote-tracking branch 'origin/develop' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-10 09:45:26 +01:00
3515e5c976 aggiunta possibilità di filtrare per numero ordine
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-10 09:28:41 +01:00
84a6f4c4f1 Aggiunta cache in servizi di completamento unt_mis e qta_cnf 2025-11-07 18:21:09 +01:00
ee9ec1a8a7 Sistemata EntityCacheComponent in debug 2025-11-07 18:20:29 +01:00
1884a9184e Check customerDb su EntityCacheComponent 2025-11-07 18:20:26 +01:00
caa62588b6 Fix su equals in getSetupList. 2025-11-07 18:20:23 +01:00
8bb9803f5b [BIOLEVANTE ]
- fix
2025-11-07 18:20:19 +01:00
ea27c26597 Fix su regole committate per errore.
Migliorato controllo alterObject in BaseMigration.
2025-11-07 18:20:14 +01:00
80aaa94036 Fix su Change Tracking 2025-11-07 18:20:03 +01:00
a82c0de415 Implementato primo sistema di Change Tracking per SQL Server 2025-11-07 18:18:40 +01:00
762ae4827f cancellazione beni e ritenute agganciate al movimento contabile
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-07 15:26:33 +01:00
68b12b0cba Aggiunta partitaMag in SitArtOrdDTO
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-07 13:29:12 +01:00
f61577ee64 Aggiunto nuovo servizio per modificare ed esportare li ordini di vendita
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-06 16:47:47 +01:00
87e4d8704c Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-06 15:30:51 +01:00
a5f22e68d2 Finish FixCQExplodeDist
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-06 15:30:51 +01:00
cf261ab427 Fix null pointer se articolo senza cq 2025-11-06 15:30:42 +01:00
5bd3b02ff0 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-06 15:09:22 +01:00
10f62b669c Aggiunta gestione elenco Colori 2025-11-06 15:09:09 +01:00
565aec0739 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-06 14:58:22 +01:00
7112cf15da Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-06 14:58:21 +01:00
03a061ae1f Fix timeDiff di UtilityLocalDate 2025-11-06 14:57:47 +01:00
1e21e37e3c Aggiunto flag primario in pvm_getassortimentoClientePedane
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-06 12:03:03 +01:00
9da3fe3daa Impostato default flag primario ad 1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-06 11:11:22 +01:00
b127ca2222 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-06 10:54:16 +01:00
be688efd2c Finish Hotfix-101
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-06 10:54:15 +01:00
94b1318a56 sistemta modifca assenza e corretto errore di smetar 2025-11-06 10:54:09 +01:00
2e9e120cdb Rinominata classe AvailableConnectionModel
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-06 10:36:03 +01:00
1000b1abbe Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-05 13:29:03 +01:00
0f2246f033 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-05 13:29:02 +01:00
9dfee9d605 sistemato errore 2025-11-05 13:28:57 +01:00
3ecd9e365e Finish Feature-CAPELLIMONELLI
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-05 12:20:05 +01:00
78a13ae89b Merge branch 'develop' into feature/Feature-CAPELLIMONELLI 2025-11-05 12:19:56 +01:00
6f8ddf6aa5 sistemata migration
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-05 12:19:20 +01:00
03f9de19b3 Aggiunto cod_banc, cod_banc_azi e flag_banca_ven in contratti di vendita e delivery plan
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-05 12:16:38 +01:00
a74e9aeb92 Merge branch 'develop' into feature/Feature-CAPELLIMONELLI
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-05 11:56:23 +01:00
709422856b Aggiunto cod_banc, cod_banc_azi e flag_banca_ven in contratti di vendita e delivery plan
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-05 11:02:19 +01:00
034a3cb2b5 Modifica messaggio errore trasf orini da SALPAR a VG
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-04 18:35:50 +01:00
a9caf10897 sistemata ripianificazione dell'ordine di lavorazione
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-04 17:15:29 +01:00
659908ecf7 Sistemato log
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-04 16:05:12 +01:00
7ebecd94cd Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-04 13:34:13 +01:00
5bcb9000a9 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-04 13:34:11 +01:00
fe622dd742 sistemate query 2025-11-04 13:34:02 +01:00
ab5d7e74a2 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-04 12:41:44 +01:00
68e6dd246f Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-04 12:41:43 +01:00
8fe2b50d5c sistemate regola 2025-11-04 12:41:38 +01:00
ebc8401989 Merge branch 'develop' into feature/Feature-CAPELLIMONELLI
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-04 12:34:43 +01:00
67765fc7d2 aggiunto controllo su data null nel fromato DAte
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-04 12:31:05 +01:00
a303459b7d cambiato messaggio
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-04 12:13:03 +01:00
2b68967ce0 Sistemata entity utenti
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-04 11:15:19 +01:00
b0194e569a Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-04 10:53:02 +01:00
164516166f Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-04 10:53:02 +01:00
3339cf1c9d cambioto salvataggio idx 2025-11-04 10:52:57 +01:00
d635079e50 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-04 10:16:56 +01:00
069ee22499 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-04 10:16:56 +01:00
e7082aef49 inserito rawcontent nella chiamata al servizio di import 2025-11-04 10:13:20 +01:00
ebf3a750a2 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-03 18:25:53 +01:00
a25dc83d30 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 18:25:52 +01:00
7d0bc83b67 sistemato erroer null 2025-11-03 18:24:18 +01:00
38a5b2510a sistemate migration
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 18:01:30 +01:00
fe2d868ca6 Merge branch 'develop' into feature/Feature-CAPELLIMONELLI 2025-11-03 17:52:27 +01:00
aca7cc07e6 Generazione del movimento di reverse
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 17:41:42 +01:00
a1618ad2ad Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 17:32:32 +01:00
67756553f3 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 17:32:31 +01:00
473c2e05b5 sistemata sulle regole il controllo sulle date nulle 2025-11-03 17:32:17 +01:00
84560a94ea Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 15:14:44 +01:00
9a35af5b20 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 15:14:44 +01:00
ba899f3309 aggiunto log 2025-11-03 15:08:36 +01:00
8b9454a684 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 13:25:47 +01:00
612bc1e3de Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 13:25:47 +01:00
6f198e7d5a correzione fatture elettroniche 2025-11-03 13:25:40 +01:00
0c6f7f769b Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 12:54:39 +01:00
19e709fc3d Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 12:54:39 +01:00
fd4636e6a6 sistemata conversione data 2025-11-03 12:54:33 +01:00
62458a0640 modifiche a modellini commerciali
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 12:52:18 +01:00
43efca4045 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 12:11:03 +01:00
5106ff9f12 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-11-03 12:11:03 +01:00
3516a8c8de aggiunto log 2025-11-03 12:10:56 +01:00
62857a9bb0 Merge branch 'develop' into feature/Feature-CAPELLIMONELLI
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-03 09:05:35 +01:00
jenkins
e1b85b8879 Merge branch 'develop'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-11-02 07:41:47 +01:00
3f4a8b38eb Aggiunto controllo per aggiornamento data scadenza
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-31 17:37:36 +01:00
99047236fc Merge remote-tracking branch 'origin/develop' into develop 2025-10-31 17:37:27 +01:00
0f3c828c1f Aggiunto controllo per aggiornamento data scadenza 2025-10-31 17:37:20 +01:00
6d950cee38 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-31 14:08:58 +01:00
2b426103cd modificata vista gramm OlapFermiMacchina 2025-10-31 14:08:45 +01:00
876daa7df4 Implementato log via email degli errori durante le method call pianificate
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-31 13:22:23 +01:00
cca26eb472 creato report personalizzato Conto economico di commessa sintetico per smetar
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-31 12:55:23 +01:00
a1c7f63976 Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-31 12:19:28 +01:00
e83e7f03c8 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-31 12:19:28 +01:00
e4b08b9a61 [ROSSOGARGANO]
- aggiunto controllo su funzione suggerimento ean13 per considerare solo gli altri ean13 nel calcolo del massimo disponibile
2025-10-31 12:18:56 +01:00
b4f8fa49da [ROSSOGARGANO]
- aggiunto controllo su funzione suggerimento ean13 per considerare solo gli altri ean13 nel calcolo del massimo disponibile
2025-10-31 12:18:40 +01:00
5842cf0048 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-31 11:51:03 +01:00
d75dd5ead7 Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-31 11:51:03 +01:00
b6eed691d0 [MES]
- aggiunto parametro preparatoDa in Dto creazione UDC per permettere di definire l'utente responsabile della UDC creata (Levanplast)
2025-10-31 11:50:51 +01:00
49626f4371 modificato nome campo dtb_tipi
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-31 10:08:18 +01:00
6e1d889eb8 su db Rossogargano abilitato report Fatturato per Macrozona/Zona solo a chi ha attivo report Fatturato Agenti/Zone 2025-10-31 10:07:58 +01:00
0cf5dbd24b inserito campo flag_delete_plk nella dtb_tipi
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-31 09:37:38 +01:00
19d4c6b929 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-30 17:46:03 +01:00
a040670c5b inserita nuovo voce menù report fatturato per macrozona/zona 2025-10-30 17:45:32 +01:00
b9fd701098 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-30 17:41:07 +01:00
d39134c47e Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-30 17:41:07 +01:00
fa0b2e338b sistemata registrazione movimeto di reverse 2025-10-30 17:41:00 +01:00
0efc991231 modificata la vista wtb_user con stb_user
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-30 17:13:08 +01:00
965e9ee3b4 sistemato utente
Some checks are pending
IntegryManagementSystem_Multi/pipeline/head Build queued...
2025-10-30 17:12:37 +01:00
59aabd6a43 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-30 17:11:59 +01:00
40f5649a5f Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-30 17:11:57 +01:00
45d067673c sistemato close task 2025-10-30 17:11:51 +01:00
9634306d01 aggiunto metodo con localdate
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-30 16:55:07 +01:00
d8e24764dc Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-30 16:11:16 +01:00
5cd2151f6c Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-30 16:11:14 +01:00
449aa664ab sistemato doc finante rif import 2025-10-30 16:10:39 +01:00
91f7269af4 Gestito il tipo valore dropdownlist in controlli qualità
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-30 16:06:04 +01:00
29a8f6efc6 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-30 15:43:42 +01:00
be3b57b1c5 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-30 15:43:41 +01:00
cd5cfa88bc sistemata notifica 2025-10-30 15:43:34 +01:00
d28e3578e4 aggiunto controllo in steup
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-30 15:24:17 +01:00
af6b053215 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-30 13:22:37 +01:00
cd3468fd50 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-30 13:22:37 +01:00
ac5361b9a8 sistemato generazione del movimento di reverse 2025-10-30 13:22:31 +01:00
e7b3d65628 eliminato log
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-30 12:36:37 +01:00
164f105878 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-30 12:26:21 +01:00
605ec9a910 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-30 12:26:20 +01:00
8d83789356 sistemato serivizio di recuper e sistemati dati 2025-10-30 12:26:15 +01:00
623d9d316a sostituito date con localdate
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-30 12:19:50 +01:00
bba6ae5d9b Refactor Depositi and MovimentiContabili services and controllers; add migration for foreign key constraints
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-30 12:05:01 +01:00
db32ba0e15 modificate classi inserendo localDate 2025-10-30 11:59:32 +01:00
02e2e73259 modificate classi inserendo localDate
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-30 11:50:45 +01:00
1bc1caa528 sistemato serivizio di recuper e sistemati dati 2025-10-30 11:50:20 +01:00
3637ba0048 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-29 17:11:19 +01:00
7409d15cce Modifica funzione acquisizione matricole MAGGIO 2025-10-29 17:11:14 +01:00
563902d29e aggiunti campi: vettore,Targa, num_prenotazione, container,sigillo,nave e id_viaggio nella vista vw_tracciabUDCVend
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-29 15:39:10 +01:00
c2994b8767 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-29 15:31:25 +01:00
7a9b1fba4d creata setup sulla mtb_aart che se abilitata blocca se codice a barre già assegnato ad altra referenza su tutti i db di carelli 2025-10-29 15:31:12 +01:00
88743f65c6 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-29 13:34:07 +01:00
61cf7b8601 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-29 13:34:05 +01:00
2663f039a0 elimintao filtro sbagliato su movimenti 2025-10-29 12:58:46 +01:00
0bac28fc98 Aggiunta setup in PICKING > PRODUZIONE per il versamento automatico
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-28 16:23:50 +01:00
9f696ec2cd Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-28 16:03:24 +01:00
8983748314 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-28 16:03:24 +01:00
bcb39b8829 eliminti flatrans rs 2025-10-28 16:03:18 +01:00
3abf35028f Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-28 14:51:32 +01:00
58c7d31fea Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-28 14:51:31 +01:00
68db2d9591 causale reso sistemata 2025-10-28 14:51:26 +01:00
d6d342ba42 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-28 12:56:15 +01:00
9b7ba6e6f4 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-28 12:56:14 +01:00
fc3fcaf80c cambiata logica di attribuzione data reg su articoli con solo scarichi 2025-10-28 12:56:06 +01:00
8a2029f396 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-28 11:56:26 +01:00
3b4d29d1c4 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-28 11:56:26 +01:00
952e1b22f2 sistemata recupero scontrini 2025-10-28 11:56:16 +01:00
3151755a1f Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-28 11:28:32 +01:00
2659bbdc83 Finish Hotfix-100
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-28 11:28:31 +01:00
d60ffea913 sistemata recupero scontrini 2025-10-28 11:28:02 +01:00
0144d6d7ef gestiti valori null 2025-10-28 11:24:49 +01:00
755132a1b9 Aggiunto controllo su posizione mono ul in fase di trasferimento del collo
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-28 10:52:53 +01:00
0b1292ec55 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-28 10:38:22 +01:00
4b4ba7bc10 Finish FixPassValidation
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-28 10:38:21 +01:00
8f365e77be Corretto controllo lunghezza password se uguale ad 8 2025-10-28 10:38:13 +01:00
5052f6dc2d VARIAZIONI PER CAPELLI MONELLI
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-27 18:22:39 +01:00
42a9756d94 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-27 17:48:56 +01:00
41fbeb333f Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-27 17:48:56 +01:00
279257a35d aggiunto capelli monelli 2025-10-27 17:48:50 +01:00
5d7d2cb99f Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-27 16:57:24 +01:00
9676b65be3 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-27 16:57:24 +01:00
27f28abb9b sistemata chiave 2025-10-27 16:56:29 +01:00
b3e390a634 rivista logica per salvataggio ctb_parr 2025-10-27 14:31:42 +01:00
2ae58205d8 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-27 12:58:24 +01:00
ea025c1f31 creata setup sulla mtb_aart che se abilitata blocca se codice a barre già assegnato ad altra referenza 2025-10-27 12:58:13 +01:00
0a03b1d489 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-27 12:31:54 +01:00
9d14673771 Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-27 12:31:53 +01:00
ee9f4b08ff corrette regole su calc peso colli 2025-10-27 12:31:42 +01:00
cdc81c58e7 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-27 12:22:09 +01:00
4c4b364177 Finish Hotfix-101
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-27 12:22:08 +01:00
0a46eda642 Hotfix cifre_dec in Bigdecimal 2025-10-27 12:21:54 +01:00
53fb1cb58e rivista logica per salvataggio ctb_parr 2025-10-27 11:30:40 +01:00
74dcedeba9 Fix ricalcolo peso netto e lordo mtb_colr se modificate le qta col
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-24 19:37:52 +02:00
5848f82e4a Refactor Depositi and MovimentiContabili services and controllers; add migration for foreign key constraints
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-24 19:22:22 +02:00
797c5c7736 Refactor Depositi and MovimentiContabili services and controllers; add migration for foreign key constraints
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-24 19:19:54 +02:00
b666064d15 Condizione per Florapulia di gestione esenzione articolo prima del cliente (DA CANCELLARE QUANDO NON SARANNO PIU' NOSTRTI CLIENTI)
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-24 18:12:04 +02:00
532aa91b23 Aggiunti campi su CtbAmac
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-24 16:14:23 +02:00
7f2c83ea69 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-24 11:39:44 +02:00
307840c236 moifiche a registrazione movimenti doc finance
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-23 18:18:09 +02:00
25321a9941 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-23 14:59:27 +02:00
dcbf627840 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-23 14:59:26 +02:00
3e069d1c39 Fix check licenza 2025-10-23 14:59:20 +02:00
988712b234 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-23 13:36:23 +02:00
123c7835d6 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-23 13:36:22 +02:00
d9d2b5bef7 Fix check licenza 2025-10-23 13:36:09 +02:00
99740104b9 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-23 12:13:59 +02:00
3606aa99d9 aggiornata vista gramm olapfermimacchina con controllo che le date non siano nulle 2025-10-23 12:13:48 +02:00
673de9d9b1 aggiungo campo id pk nella tabella gramm_simulatore_coan 2025-10-23 12:12:21 +02:00
0bebf87fa4 Rimosso default PVM ad integryApplication
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-23 11:59:09 +02:00
87cb0f8302 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-23 11:34:17 +02:00
6b80520d8d modificata la regola che assegna la versione e eliminta regola non usata 2025-10-23 11:33:40 +02:00
ab956b4a6e Sistemata Migration_20250827151739 2025-10-23 10:36:57 +02:00
2831137dac aggiunto id_art_equi in getListinoVendita 2025-10-23 10:22:53 +02:00
dabf6a0a54 Creata setup per disabilitare controllo su tutti i range di un colore in ordikids
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-22 17:29:22 +02:00
7a6ddde702 Rimosso json property errato su cod divi in VtbListData
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-22 11:14:59 +02:00
17f4e1ad49 Merge tag 'Hotfix-2' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
Finish Hotfix-2
2025-10-21 17:38:24 +02:00
74227e6bf1 Finish Hotfix-2
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-21 17:38:23 +02:00
fc2eee29a6 Corretto controllo su codice pagamento 2025-10-21 17:37:47 +02:00
8cf75f9497 Merge remote-tracking branch 'origin/develop' into develop 2025-10-21 16:54:35 +02:00
5b40bd4780 Modifica per DMS 2025-10-21 16:54:30 +02:00
9899944a04 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-21 15:14:27 +02:00
58335a5102 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-21 15:14:25 +02:00
3507bc531c aggiunto cotrnollo su null in parselocaldate 2025-10-21 15:14:20 +02:00
4bb4a6b34b Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-21 10:02:23 +02:00
fe0927c0eb Finish FixDuplicaLisv
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-21 10:02:22 +02:00
0d93dd2b1c Corretta duplicazione listino di vendita, prima usava solo l'ultima versione 2025-10-21 10:02:14 +02:00
dad53637e8 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 18:22:44 +02:00
853470701b Add ScontriniController and update ScontriniService for delete functionality 2025-10-20 18:22:32 +02:00
b1ee861a5c Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 18:15:32 +02:00
05857e2b11 Finish Hotfix-101
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 18:15:32 +02:00
60fb37ad8b Gestione formato CSV e EXCEL su export ANAGRAFICHE ARTICOLI
(cherry picked from commit dae03dc91f)
2025-10-20 18:14:38 +02:00
dae03dc91f Gestione formato CSV e EXCEL su export ANAGRAFICHE ARTICOLI
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 18:06:17 +02:00
5c81248472 Finish Feature-revisione_ordiniWeb
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 17:18:26 +02:00
7184c24f16 Merge branch 'develop' into feature/Feature-revisione_ordiniWeb
Some checks are pending
IntegryManagementSystem_Multi/pipeline/head Build queued...
2025-10-20 17:18:09 +02:00
a2be331295 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 17:17:01 +02:00
18403554e7 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 17:17:00 +02:00
b1e189321c visualizzare come pianificate le attività con scadenza - tornare indietro 2025-10-20 17:16:53 +02:00
e61b2532b1 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 17:01:15 +02:00
db56575b8f Finish Hotfix-100
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-20 17:01:14 +02:00
7832095b86 visualizzare come pianificate le attività con scadenza 2025-10-20 17:01:07 +02:00
2bd8b6392c Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-20 16:03:17 +02:00
442af631aa Finish FlagInDuplicaListinoVend
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 16:03:17 +02:00
2666e9a7ef Gestiti flag da mtb_lisv in duplicazione listino di vendita 2025-10-20 16:02:38 +02:00
7b3395dec8 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 15:55:55 +02:00
7a15a94b38 Tolto controllo su per_aliq<>0 anche quando è presente il destinatario e non ha una sua aliquota 2025-10-20 15:55:32 +02:00
da8884dcdc Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 15:46:31 +02:00
54a09c2300 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 15:46:31 +02:00
8818a42457 regola per la valorizzazione del cod paga 2025-10-20 15:46:24 +02:00
d4a035fc0e Merge branch 'develop' into feature/Feature-revisione_ordiniWeb
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 14:50:18 +02:00
3c5a0ba1f1 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 13:06:31 +02:00
c49f135e49 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 13:06:31 +02:00
a4d7d09c0b modificata creazione file integretail 2025-10-20 13:06:24 +02:00
73b26249eb Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 13:03:04 +02:00
2581f537b1 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 13:03:04 +02:00
8c14cd1937 modificata creazione file integretail 2025-10-20 13:02:57 +02:00
597c2fe2a2 elimintato metodo non usato
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 12:42:02 +02:00
785b03455e Aggiunto completamento automatico del codice pagamento per documenti di tipo V
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 10:31:20 +02:00
e7a581f326 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 09:35:26 +02:00
db85805afd Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 09:35:26 +02:00
3350677b23 Implementato login statico per app 2025-10-20 09:35:10 +02:00
8413be30a0 Aggiunto controllo su email valida nelle persone di riferimento.
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 09:20:31 +02:00
9033da0bf2 modificata vista: inserito progressivo_ul della materia prima
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-20 09:07:33 +02:00
6dfd56c58e Modifica per DMS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-17 15:33:01 +02:00
98e251478c Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-17 13:14:28 +02:00
d31a28d3b5 Add migration script for setup configuration in W_SUPTABLE 2025-10-17 13:14:14 +02:00
fd5867e5f1 [loginWeb]
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
- corretta login con md5 ma senza profilo
2025-10-17 11:15:11 +02:00
13311f191e Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-16 17:07:12 +02:00
1f2ace8258 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-16 17:07:11 +02:00
0aaba82e57 cambiato nome file zucchetti 2025-10-16 17:07:02 +02:00
3888c1ce25 Merge branch 'hotfix/Hotfix-1' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-16 16:14:19 +02:00
954eb96a2a Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-16 16:14:18 +02:00
057e3ac3c1 [SUIT - FARMMES]
- aggiunto MArshaller per convertire localDateTime in XML
2025-10-16 16:14:07 +02:00
49cad4a71a Aggiunto filtro per tipo_mgrp in retrieveArts WMS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-16 12:39:24 +02:00
8b593a3b21 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-15 17:45:30 +02:00
6072ab57c9 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-15 17:45:29 +02:00
120d85c1d3 sistemato calcolo tempi 2025-10-15 17:45:25 +02:00
13e2b1b3a4 Rename method and DTO for activity publication; add ActivityPublicationDTO class
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-15 16:43:18 +02:00
6c705ab96b Rename .groovy to .java 2025-10-15 16:43:18 +02:00
28e0c448f4 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-15 16:03:00 +02:00
0b22aa9764 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-15 16:02:59 +02:00
a1b813f051 sistemato storno scontrino totale 2025-10-15 15:55:59 +02:00
516874a6e5 Merge remote-tracking branch 'origin/develop' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-15 14:38:28 +02:00
5b31befcec corretto DB non esecuzione migration 2025-10-15 14:38:14 +02:00
19335be66b aggiunto campo flag_abil nella srl_user_table e creata entity 2025-10-15 14:37:42 +02:00
9ac451693b Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-15 13:19:01 +02:00
399f712024 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-15 13:19:01 +02:00
db38f84fca Add flagPrimario field to MtbLisv and MtbLisvData classes and update related logic 2025-10-15 13:18:29 +02:00
fa94de4135 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-15 12:03:06 +02:00
81b01dd5a8 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-15 12:03:05 +02:00
085d6af657 Fix cast data query attività 2025-10-15 12:02:39 +02:00
5421cb12d2 Aggiunto campo articolo in retrieveArts wms
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-15 11:51:19 +02:00
cd98c3884f Merge remote-tracking branch 'origin/develop' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-15 10:45:23 +02:00
92e60c95e3 creati report persanalizzati Movimentazione di vendita per licor 2025-10-15 10:45:10 +02:00
227025b526 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-15 09:46:22 +02:00
4647125b61 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-15 09:46:21 +02:00
1217922b90 Refactor activity file attachment e aggiunta la possibilità di rimuovere gli allegati 2025-10-15 09:46:06 +02:00
731c28f382 Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-14 18:39:25 +02:00
2c5deeceb6 Finish Hotfix-101
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-14 18:39:25 +02:00
8e727aeb73 Gestione nazione in partita iva in invoic ED 2025-10-14 18:39:15 +02:00
273b76715a Gestione nazione in partita iva in invoic ED 2025-10-14 18:39:05 +02:00
7aa8c71b3f Merge remote-tracking branch 'origin/develop' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-14 18:18:34 +02:00
ac235c2b56 ampliato log loginRetail 2025-10-14 18:18:15 +02:00
b78ab2e308 Merge remote-tracking branch 'origin/develop' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-14 16:56:09 +02:00
a44a307dd1 Aggiunta funzione per inserire pubblicazioni di attività e creazione del DTO corrispondente 2025-10-14 16:56:05 +02:00
c25d08c9ac Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-14 16:36:31 +02:00
695e784c73 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-14 16:36:31 +02:00
0c3415b7d6 [SUIT]
- aggiunto md5 in log per servizi che non usano le credenziali dirette in login
2025-10-14 16:36:20 +02:00
b412860f1f Aggiunta funzione per clonare tabelle nel database
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-14 15:00:59 +02:00
85f5129057 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-14 12:46:46 +02:00
74bfc38cd5 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-14 12:46:45 +02:00
3ec6deaec6 Fix su JSON deserialize di un LocalDateTime anche se si passa una date 2025-10-14 12:46:38 +02:00
e2113d0660 aggiunti lotti multipli su kit
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-14 12:07:14 +02:00
8199b354d8 Finish FixRettificaNull
Some checks failed
IntegryManagementSystem_Multi/pipeline/head Something is wrong with the build of this commit
2025-10-14 11:48:18 +02:00
4e795f6a0a Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-14 11:48:18 +02:00
5f8732299a Fix null in caso di nessun collo di rettifica in rettificaGiacenzaProduzione 2025-10-14 11:48:05 +02:00
8babc6acfb Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-13 12:37:39 +02:00
f193d21ffa Modifica per DMS 2025-10-13 12:37:35 +02:00
6361e790b2 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-13 10:57:47 +02:00
206927622a Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-13 10:57:47 +02:00
b1ee82f0dc Aggiunta colonne extra_project e view_in_meeting nella tabella stb_activity e creazione della migrazione corrispondente 2025-10-13 10:57:34 +02:00
2529660f3b Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-13 09:27:30 +02:00
5c784a3f90 Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-13 09:27:29 +02:00
d493749445 Fix servizi Task 2025-10-13 09:27:18 +02:00
7e9c36ab77 Effettuato arrotondamento a 2 cifre decimali
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-13 09:11:39 +02:00
904f5115b9 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-13 09:07:41 +02:00
4387c4d1c3 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-13 09:07:41 +02:00
9c481c5380 aggiunta integry 2025-10-13 09:07:31 +02:00
8eda08d060 Merge branch 'develop' into feature/Feature-revisione_ordiniWeb
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-13 08:41:53 +02:00
jenkins
ea493b3fa2 Merge branch 'develop'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit is unstable
2025-10-12 07:41:42 +02:00
e8bd3c0c99 Merge branch 'hotfix/Hotfix-1' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-10 18:59:07 +02:00
ac7bb55874 Merge branch 'hotfix/Hotfix-1'
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-10 18:59:07 +02:00
626a728529 [RETTIFICA GIACENZE]
- aggiunto flag_sezione in rettifica collo
- aggiunto flag_sezione default in dtbDocr
2025-10-10 18:58:55 +02:00
9f9e1ef12d aggiunta nazione su carico oli sfuso, modifiche a espotazione listini infragruppo
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-10 14:06:31 +02:00
c6526f6574 Rimossi utilizzi di mvw_sitart_udc_det
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-10 12:17:13 +02:00
a919c323ae inserita descrizione tabella srl_user_table
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-10 10:53:27 +02:00
00cb459c66 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-10 10:36:54 +02:00
e1bee4b70f creata nuova tabella di relazione tra utenti e tabelle 2025-10-10 10:36:45 +02:00
cd81b92bfe Nella generazione della fattura conto deposito gestito inserimento modalità di pagamento e data decorrenza uguali a quelle del contratto
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-10 10:23:41 +02:00
4120f20c5a elimintati thread
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-10 09:57:13 +02:00
d43345c5fc Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-10 09:07:46 +02:00
c0ad1f0770 Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-10 09:07:45 +02:00
a2bd7bc9aa eliminati gruppi senza intercode 2025-10-10 09:07:40 +02:00
02eb94fdef aggiunte descrizioni tabelle
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-10 09:06:34 +02:00
c6380a9e05 In getSuggestedPickingList sostituita dipendenza da mvw_sitart_udc_det con mvw_sitart_udc_det_inventario
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-09 13:32:14 +02:00
08b2cb3289 Corretta query in modo che metta il codice sdi ditta solo quando l'email pec è nulla
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-09 12:31:07 +02:00
cb0f18eb0b Merge branch 'hotfix/Hotfix-1' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-09 10:53:32 +02:00
bec0430942 Gestione opzione di attivazione nuova versione resi vendita
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-08 16:52:57 +02:00
ed9952d37d Fix su FK non aggiornate a seguito del rename di stb_activity in stb_activity_old
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-08 12:19:05 +02:00
a656c81373 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-08 09:39:02 +02:00
d6c0271129 importazione scontrini mmpos 2025-10-07 18:13:25 +02:00
d3ba9aae5f creata setup che se abilitata quando si va a variare un movimento contabile più vecchio di 30 gg parte la domanda di controllo
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-07 15:32:09 +02:00
809a31ea87 sistemata migration
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-07 15:08:22 +02:00
63cf1920a9 sistemata migration
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-07 14:56:34 +02:00
3c79fb6745 Merge remote-tracking branch 'origin/develop' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-07 12:31:24 +02:00
4a86118707 creata setup che se abilitata chiede la verifica del protocollo dopo la registrazione del documento di acquisto 2025-10-07 12:31:14 +02:00
9dfd8623a7 Finish Feature-Attivita
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-07 10:29:17 +02:00
7e8b8a8bc4 eliminati campi date nella stbactivity
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-07 10:28:50 +02:00
554a78e40f Merge branch 'develop' into feature/Feature-Attivita
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-07 09:49:37 +02:00
32022652b3 Aggiunti dati ttb_qta_min_ord in exportArticoliCodbarre ordikids
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-06 18:05:41 +02:00
63265571ac Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-06 15:34:22 +02:00
1e9b48811c inviati articoli variati in anagrafica
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-06 14:39:40 +02:00
2312323649 considerati solo i reparti con intercode
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-06 14:12:54 +02:00
9c634059ab Merge branch 'develop' into feature/Feature-revisione_ordiniWeb
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-06 13:02:52 +02:00
57892e22ee Merge branch 'master' into develop
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-06 13:01:13 +02:00
08af6fddb2 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-06 12:55:55 +02:00
c161857422 Merge branch 'master' into develop
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-06 12:04:44 +02:00
b8782a14c1 Finish Feature-ImportScontriniMMPOS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-06 09:38:52 +02:00
4825d59616 Merge branch 'develop' into feature/Feature-Attivita
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-06 09:34:55 +02:00
e10f2d3a0c importazione scontrini carelli
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-06 09:23:37 +02:00
18f4f2770a Merge branch 'develop' into feature/Feature-ImportScontriniMMPOS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-06 09:09:58 +02:00
18c2ae047e importazione scontrini carelli
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-03 14:29:32 +02:00
5581055f07 Merge branch 'develop' into feature/Feature-ImportScontriniMMPOS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-03 12:06:30 +02:00
b64cd203eb Aggiornata procedura pianificata di import scontrini per evitare le internal call
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-03 11:13:14 +02:00
e436b9773e valore voucher
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-02 18:24:02 +02:00
94ceff0753 Merge branch 'develop' into feature/Feature-ImportScontriniMMPOS 2025-10-01 16:52:04 +02:00
d1a7a166a8 Merge branch 'develop' into feature/Feature-ImportScontriniMMPOS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-10-01 15:38:41 +02:00
e0a3dbcea2 eliminati campi date nella stbactivity
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-01 15:38:25 +02:00
942dbeef5e eliminati campi date nella stbactivity
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-10-01 10:41:54 +02:00
75d42d04ee eliminati campi date nella stbactivity
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-09-30 17:27:15 +02:00
fcdbe8ab94 eliminati campi date nella stbactivity
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-09-29 17:42:05 +02:00
7d831c59e7 Merge branch 'develop' into feature/Feature-ImportScontriniMMPOS 2025-09-29 09:21:24 +02:00
eaf8e4779e aggiunto servizio in ascolto
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-09-29 09:21:04 +02:00
84669f3929 gestito storno
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-09-29 08:43:24 +02:00
9b3184281c importazione scontrini new
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-09-26 17:07:03 +02:00
bc18dc3231 Merge branch 'develop' into feature/Feature-ImportScontriniMMPOS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-09-25 15:53:31 +02:00
c8034042aa migration per textiles
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-09-25 15:36:10 +02:00
ef58f2e65c importazione scontrini nuova 2025-09-23 18:45:45 +02:00
6b8a2fb4c0 Merge branch 'develop' into feature/Feature-ImportScontriniMMPOS
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-09-23 12:05:36 +02:00
acc35b8cc8 modifiche per nuova impostazione scontrini
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-09-22 14:15:33 +02:00
c1e979391d merge
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-09-22 09:50:54 +02:00
5fd28fddd1 Merge branch 'develop' into feature/Feature-revisione_ordiniWeb
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-09-22 08:41:07 +02:00
af0f1e14b0 Merge branch 'develop' into feature/Feature-revisione_ordiniWeb
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-09-17 16:56:50 +02:00
63a891d061 nuova procedura di importazione scontrini
Some checks failed
IntegryManagementSystem_Multi/pipeline/head There was a failure building this commit
2025-08-29 11:34:31 +02:00
044540ff10 Merge branch 'develop' into feature/Feature-revisione_ordiniWeb
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-08-27 16:57:56 +02:00
90f3a636db modifiche per importazione ordini web ed elimiazione trigger ordl
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-08-27 16:57:45 +02:00
048c639e72 Merge branch 'develop' into feature/Feature-revisione_ordiniWeb
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-08-26 13:15:54 +02:00
5b1b5c5cde merge
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-08-26 10:09:18 +02:00
d94bd75770 revisione importazione ordini web
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-07-29 18:23:31 +02:00
32c38b85aa revisione importazione ordini web
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-07-29 15:24:50 +02:00
c7a96834a2 revisione procedura di importazione ordini web
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
2025-07-28 17:54:36 +02:00
733 changed files with 40880 additions and 20700 deletions

12
.idea/dataSources.xml generated Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="@SERVERDB2019" uuid="ff4f0bad-7271-429e-a4e1-bae28629efc8">
<driver-ref>sqlserver.ms</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbc-driver>
<jdbc-url>jdbc:sqlserver://SERVERDB2019</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="LocalDate Checks" />
<version value="1.0" />
</settings>
</component>

View File

@@ -2,7 +2,6 @@
<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" />
<shortenClasspath name="MANIFEST" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="it.integry.ems.menu.*" />

30
.idea/structuralSearch.xml generated Normal file
View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="StructuralSearch">
<searchConfiguration name="LocalDate passato a SimpleDateFormat" text="$formatter$.format($date$)" recursive="true" caseInsensitive="true" type="JAVA" pattern_context="default">
<constraint name="__context__" within="" contains="" />
<constraint name="formatter" nameOfExprType="java\.text\.SimpleDateFormat" within="" contains="" />
<constraint name="date" nameOfExprType="java\.time\.LocalDate" within="" contains="" />
</searchConfiguration>
<searchConfiguration name="LocalDate equals java.util.Date inspection" text="$d1$.equals($d2$)" recursive="true" caseInsensitive="false" type="JAVA" pattern_context="default">
<constraint name="__context__" within="" contains="" />
<constraint name="d1" nameOfExprType="java\.time\.LocalDate" within="" contains="" />
<constraint name="d2" nameOfExprType="java\.util\.Date" within="" contains="" />
</searchConfiguration>
<searchConfiguration name="java.util.Date equals LocalDate inspection" text="$d1$.equals($d2$)" recursive="true" caseInsensitive="false" type="JAVA" pattern_context="default">
<constraint name="__context__" within="" contains="" />
<constraint name="d1" nameOfExprType="java\.util\.Date" within="" contains="" />
<constraint name="d2" nameOfExprType="java\.time\.LocalDate" within="" contains="" />
</searchConfiguration>
<searchConfiguration name="java.util.Date equals LocalDateTime inspection" text="$d1$.equals($d2$)" recursive="true" caseInsensitive="false" type="JAVA" pattern_context="default">
<constraint name="__context__" within="" contains="" />
<constraint name="d1" nameOfExprType="java\.util\.Date" within="" contains="" />
<constraint name="d2" nameOfExprType="java\.time\.LocalDateTime" within="" contains="" />
</searchConfiguration>
<searchConfiguration name="LocalDateTime equals java.util.Date inspection" text="$d1$.equals($d2$)" recursive="true" caseInsensitive="false" type="JAVA" pattern_context="default">
<constraint name="__context__" within="" contains="" />
<constraint name="d1" nameOfExprType="java\.time\.LocalDateTime" within="" contains="" />
<constraint name="d2" nameOfExprType="java\.util\.Date" within="" contains="" />
</searchConfiguration>
</component>
</project>

View File

@@ -1,18 +0,0 @@
FROM tomcat:9-jre8-alpine
RUN apk add --no-cache fontconfig ttf-dejavu
ENV TZ="Europe/Rome"
ENV JAVA_OPTS="-DDISABLE_DROOLS_COMPILE=TRUE -Xms512M -Xmx1G -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
ENV USERDOMAIN="STUDIO-ML"
COPY docker/tomcat/conf/integry/ems.properties /usr/local/tomcat/conf/integry/
COPY docker/tomcat/conf/integry/ems_automated_operations.json /usr/local/tomcat/conf/integry/
COPY docker/tomcat/conf/integry/ems_settings.json /usr/local/tomcat/conf/integry/
COPY ems-engine/target/ems-api.war /usr/local/tomcat/webapps/
#COPY docker/FontTest.class .
#ENTRYPOINT ["java","FontTest"]
EXPOSE 8080
EXPOSE 5005

View File

@@ -1,11 +1,45 @@
FROM tomcat:9-jre8-alpine
RUN apk add --no-cache fontconfig ttf-dejavu
FROM tomcat:9-jre8
ENV TZ="Europe/Rome"
ENV JAVA_OPTS="-DDISABLE_DROOLS_COMPILE=TRUE -Xms512M -Xmx1G -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
ENV JAVA_OPTS="-DDISABLE_DROOLS_COMPILE=TRUE -Xms512M -Xmx2G -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
ENV USERDOMAIN="STUDIO-ML"
# Install Samba
RUN apt-get update && \
apt-get install -y samba samba-common-bin && \
rm -rf /var/lib/apt/lists/*
# Ensure log directory exists and is readable
RUN mkdir -p /usr/local/tomcat/logs && \
chmod -R 755 /usr/local/tomcat/logs
# Create samba user (no login) and add to root group
RUN useradd -M -s /usr/sbin/nologin sambauser && \
printf "sambapass\nsambapass\n" | smbpasswd -a -s sambauser && \
usermod -aG root sambauser
# Samba configuration
RUN printf "\
[global]\n\
workgroup = STUDIO-ML\n\
security = user\n\
map to guest = never\n\
server role = standalone server\n\
unix extensions = no\n\
client min protocol = NT1\n\
\n\
[tomcat-logs]\n\
comment = Tomcat logs (read-only)\n\
path = /usr/local/tomcat/logs\n\
browseable = yes\n\
read only = yes\n\
guest ok = no\n\
valid users = sambauser\n\
force user = root\n\
create mask = 0644\n\
directory mask = 0755\n\
" > /etc/samba/smb.conf
COPY docker/tomcat/conf/integry/ems.properties /usr/local/tomcat/conf/integry/
COPY docker/tomcat/conf/integry/ems_automated_operations.json /usr/local/tomcat/conf/integry/
COPY docker/tomcat/conf/integry/ems_settings.json /usr/local/tomcat/conf/integry/

View File

@@ -42,7 +42,7 @@ pipeline {
bat(script: 'mvn clean install -t toolchains-jenkins.xml', returnStdout: true)
archiveArtifacts(artifacts: 'ems-engine/target/ems-api.war', onlyIfSuccessful: true)
}
stash includes: 'ems-engine/target/ems-api.war,docker/**,Containerfile', name: 'container-files'
stash includes: 'ems-engine/target/ems-api.war,docker/**,Dockerfile', name: 'container-files'
}
}
@@ -128,7 +128,7 @@ sleep 10''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaul
}
// bat "docker buildx build --platform linux/amd64,linux/arm64 --push -t \"git.studioml.it/integry/ems-api${branchVersion}:latest\" ."
bat "podman build -f .\\Containerfile -t \"git.studioml.it/integry/ems-api${branchVersion}:latest\" ."
bat "podman build -t \"git.studioml.it/integry/ems-api${branchVersion}:latest\" ."
bat "podman push \"git.studioml.it/integry/ems-api${branchVersion}:latest\""
//containerImageLink "git.studioml.it/integry/ems-api-${env.GIT_BRANCH.toLowerCase().replace('/', '-')}:latest}"

File diff suppressed because it is too large Load Diff

View File

@@ -229,6 +229,11 @@
<artifactId>arial-rounded</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>it.integry.font</groupId>
<artifactId>NotoSerif</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.groovy</groupId>

View File

@@ -11,6 +11,7 @@ public class CommonConstants {
public static final String INTEGRY = "integry";
public static final String PROFILE_DB = "profileDb";
public static final String COD_MDEP = "codMdep";
public static final String WHERE_COND = "whereCond";
public static final String EMPTY_STRING = "";
@@ -20,6 +21,7 @@ public class CommonConstants {
public static final String TIMESTAMP = "timestamp";
public static final String DATE_FORMAT_YMD_SLASHED = "yyyy/MM/dd";
public static final String DATE_FORMAT_YMD = "yyyy-MM-dd";
public static final String DATE_FORMAT_DMY = "dd/MM/yyyy";
public static final String DATE_FORMAT_DMY_DASHED = "dd-MM-yyyy";
@@ -27,7 +29,7 @@ public class CommonConstants {
public static final String TIME_FORMAT = "HH:mm:ss";
public static final String DATETIME_FORMAT_YMD = String.format("%s %s", DATE_FORMAT_YMD, TIME_FORMAT);
public static final String DATETIME_FORMAT_YMD = String.format("%s %s", DATE_FORMAT_YMD_SLASHED, TIME_FORMAT);
public static final String DATETIME_FORMAT_DMY = String.format("%s %s", DATE_FORMAT_DMY_DASHED, TIME_FORMAT);
public static final String DATETIME_FORMAT_DMY_SLASHED = String.format("%s %s", DATE_FORMAT_DMY, TIME_FORMAT);
public static final String DATETIME_FORMAT_DMY_DASHED = String.format("%s %s", DATE_FORMAT_DMY_DASHED, TIME_FORMAT);
@@ -46,6 +48,10 @@ public class CommonConstants {
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATE_YMD_SLASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATE_FORMAT_YMD_SLASHED)
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATETIME_YMD_SLASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATETIME_FORMAT_YMD)
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATE_YMD_DASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATE_FORMAT_YMD)
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATETIME_YMD_DASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATETIME_FORMAT_YMD)
@@ -53,6 +59,8 @@ public class CommonConstants {
public static final DateTimeFormatter DATE_DMY_SLASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATE_FORMAT_DMY)
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATE_DMY_DASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATE_FORMAT_DMY_DASHED)
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATETIME_DMY_SLASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATETIME_FORMAT_DMY_SLASHED)
.withZone(ZoneId.systemDefault());
public static final DateTimeFormatter DATETIME_DMY_DASHED_FORMATTER = DateTimeFormatter.ofPattern(CommonConstants.DATETIME_FORMAT_DMY_DASHED)

View File

@@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import it.integry.ems.Import.dto.AnomalieDTO;
import it.integry.ems.Import.dto.ImportRequestDTO;
import it.integry.ems.javabeans.RequestDataDTO;
import it.integry.ems.json.JsonObjectMapperConfig;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems_model.base.EntityBase;
@@ -24,6 +25,7 @@ public abstract class BaseEntityImporter<T> implements IEntityImporter<T> {
protected String format;
protected boolean headless;
protected ImportRequestDTO requestDto;
protected RequestDataDTO requestDataDTO;
protected MultiDBTransactionManager multiDBTransactionManager;
protected List<AnomalieDTO> anomalie = new ArrayList<AnomalieDTO>();
@@ -77,6 +79,12 @@ public abstract class BaseEntityImporter<T> implements IEntityImporter<T> {
return this;
}
@Override
public IEntityImporter<T> setRequestDataDTO(RequestDataDTO requestDataDTO) {
this.requestDataDTO = requestDataDTO;
return this;
}
public List<AnomalieDTO> getAnomalie() {
return anomalie;
}
@@ -100,4 +108,6 @@ public abstract class BaseEntityImporter<T> implements IEntityImporter<T> {
}
}

View File

@@ -2,6 +2,7 @@ package it.integry.ems.Import.base;
import it.integry.ems.Import.dto.AnomalieDTO;
import it.integry.ems.Import.dto.ImportRequestDTO;
import it.integry.ems.javabeans.RequestDataDTO;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.service.SetupGest;
@@ -26,10 +27,14 @@ public interface IEntityImporter<T> {
IEntityImporter<T> setRequestDTO(ImportRequestDTO requestDto);
IEntityImporter<T> setRequestDataDTO(RequestDataDTO requestDataDTO);
List<AnomalieDTO> getAnomalie();
T doImport() throws Exception;
String renameFile(String orginalFileName, List<EntityBase> entities) throws Exception;
}

View File

@@ -3,7 +3,7 @@ package it.integry.ems._context;
import it.integry.annotations.PostContextConstruct;
import it.integry.common.var.EmsDBConst;
import it.integry.ems.expansion.RunnableArgsThrowable;
import it.integry.ems.settings.Model.AvailableConnectionsModel;
import it.integry.ems.settings.Model.AvailableConnectionModel;
import it.integry.ems.settings.Model.SettingsModel;
import it.integry.ems.settings.SettingsController;
import it.integry.ems.sync.MultiDBTransaction.BasicConnectionPool;
@@ -69,7 +69,6 @@ public class EmsCoreDBLoader {
try (MultiDBTransactionManager multiDBTransactionManager = new MultiDBTransactionManager(connectionPool)){
discoverAllConnections(multiDBTransactionManager);
setupAzienda(multiDBTransactionManager);
userCacheService.discoverAllUsers(multiDBTransactionManager);
if (onComplete != null) onComplete.run(multiDBTransactionManager);
} catch (Exception ex) {
@@ -83,9 +82,9 @@ public class EmsCoreDBLoader {
private void discoverAllConnections(MultiDBTransactionManager multiDBTransactionManager) throws Exception {
ArrayList<Callable<Void>> futureTasks = new ArrayList<>();
for (AvailableConnectionsModel model : settingsModel.getAvailableConnectionsWithoutDuplicatedProfiles(true)) {
for (AvailableConnectionModel model : settingsModel.getAvailableConnectionsWithoutDuplicatedProfiles(true)) {
AtomicReference<AvailableConnectionsModel> modelAtomicReference = new AtomicReference<>(model);
AtomicReference<AvailableConnectionModel> modelAtomicReference = new AtomicReference<>(model);
futureTasks.add(() -> {
try {

View File

@@ -0,0 +1,27 @@
package it.integry.ems.adapter;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import it.integry.ems_model.config.EmsRestConstants;
import it.integry.ems_model.utility.UtilityString;
import java.io.IOException;
public class LongDeserializer extends JsonDeserializer<Long> {
@Override
public Long deserialize(JsonParser parser, DeserializationContext context)
throws IOException {
String string = parser.getText();
if (!UtilityString.isNullOrEmpty(string)) {
if (string.equalsIgnoreCase("null")) {
return EmsRestConstants.LONG_NULL;
}
return new Long(string);
} else
return null;
}
}

View File

@@ -0,0 +1,34 @@
package it.integry.ems.adapter;
import it.integry.ems_model.utility.UtilityString;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
public class XmlLocalDateAdapter extends XmlAdapter<String, LocalDate> {
private DateTimeFormatter sdf;
public XmlLocalDateAdapter() {
sdf = DateTimeFormatter.ofPattern("dd-MM-yyyy");
}
public XmlLocalDateAdapter(String format) {
sdf = DateTimeFormatter.ofPattern(format);
}
@Override
public String marshal(LocalDate arg0) throws Exception {
return arg0.format(sdf);
}
@Override
public LocalDate unmarshal(String arg0) throws Exception {
String format = UtilityString.determineDateFormat(arg0);
if (format != null && !"dd-MM-yyyy".equals(format))
sdf = DateTimeFormatter.ofPattern(format);
return LocalDate.parse(arg0,sdf);
}
}

View File

@@ -0,0 +1,36 @@
package it.integry.ems.adapter;
import it.integry.ems_model.utility.UtilityString;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public class XmlLocalDateTimeAdapter extends XmlAdapter<String, LocalDateTime> {
private DateTimeFormatter sdf;
public XmlLocalDateTimeAdapter() {
sdf = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm:ss");
}
public XmlLocalDateTimeAdapter(String format) {
sdf = DateTimeFormatter.ofPattern(format);
}
@Override
public String marshal(LocalDateTime arg0) throws Exception {
return arg0.format(sdf);
}
@Override
public LocalDateTime unmarshal(String arg0) throws Exception {
String format = UtilityString.determineDateFormat(arg0);
if (format != null && !"dd-MM-yyyy HH:mm:ss".equals(format))
sdf = DateTimeFormatter.ofPattern(format);
return LocalDateTime.parse(arg0,sdf);
}
}

View File

@@ -1,269 +0,0 @@
package it.integry.ems.anonymizer;
import java.security.SecureRandom;
import java.util.Arrays;
import java.util.List;
import java.util.Random;
/**
* Generatore di nomi e cognomi italiani per l'anonimizzazione dei dati.
* Mantiene la coerenza del sesso tra nome e genere.
*/
public class ItalianNameGenerator {
private final Random random;
// Nomi maschili italiani (200+ nomi)
public static final List<String> MALE_NAMES = Arrays.asList(
"Alessandro", "Andrea", "Antonio", "Francesco", "Marco", "Matteo", "Giuseppe", "Luca",
"Giovanni", "Roberto", "Stefano", "Paolo", "Davide", "Michele", "Simone", "Federico",
"Riccardo", "Fabio", "Daniele", "Massimo", "Claudio", "Nicola", "Gabriele", "Vincenzo",
"Lorenzo", "Salvatore", "Emanuele", "Alberto", "Diego", "Tommaso", "Alessio", "Filippo",
"Giorgio", "Mattia", "Franco", "Bruno", "Enrico", "Mario", "Carlo", "Gianluca",
"Cristian", "Domenico", "Raffaele", "Sergio", "Pasquale", "Gianni", "Carmine", "Gennaro",
"Antonino", "Gaetano", "Rocco", "Mauro", "Pierluigi", "Valerio", "Mirko", "Dario",
"Enzo", "Alfredo", "Renzo", "Giancarlo", "Giampaolo", "Pierpaolo", "Gianfranco", "Guido",
"Nino", "Piero", "Armando", "Luciano", "Renato", "Angelo", "Aldo", "Giulio",
"Marcello", "Rodolfo", "Umberto", "Silvano", "Ivano", "Giampiero", "Silvio", "Maurizio",
"Leonardo", "Adriano", "Ferdinando", "Bernardo", "Teodoro", "Edoardo", "Arturo", "Gino",
"Biagio", "Fabrizio", "Fausto", "Ettore", "Cesare", "Elio", "Amerigo", "Italo",
"Orlando", "Romeo", "Sandro", "Tiziano", "Ignazio", "Ciro", "Loris", "Orazio",
"Lino", "Nello", "Rino", "Primo", "Secondo", "Terzo", "Quarto", "Quinto",
"Sesto", "Settimo", "Ottavio", "Nono", "Decimo", "Benito", "Dante", "Virgilio",
"Omero", "Eugenio", "Aurelio", "Valentino", "Corrado", "Manlio", "Emilio", "Tullio",
"Attilio", "Marcello", "Romolo", "Remo", "Amedeo", "Cosimo", "Damiano", "Sebastiano",
"Cristoforo", "Bartolomeo", "Giacomo", "Simone", "Pietro", "Girolamo", "Leopoldo", "Gaspare",
"Melchiorre", "Baldassarre", "Epifanio", "Gerardo", "Ruggero", "Tancredi", "Arnaldo", "Osvaldo",
"Rinaldo", "Romualdo", "Ubaldo", "Raimondo", "Edmondo", "Redento", "Crescenzo", "Innocenzo",
"Fiorenzo", "Vincenzo", "Enzo", "Renzo", "Nunzio", "Maurizio", "Patrizio", "Orazio",
"Flavio", "Claudio", "Giuliano", "Adriano", "Emiliano", "Massimiliano", "Gianmarco", "Marcantonio",
"Gianbattista", "Giovanbattista", "Giammarco", "Gianluigi", "Giampiero", "Gianmaria", "Giandomenico", "Gianpaolo",
"Pierfrancesco", "Piergiorgio", "Pierangelo", "Piermario", "Piercarlo", "Piergiuseppe", "Gioacchino", "Bartolomeo",
"Benedetto", "Benvenuto", "Bonaventura", "Bonifacio", "Camillo", "Calogero", "Carmelo", "Demetrio",
"Dionisio", "Donato", "Egidio", "Eliseo", "Erminio", "Eustachio", "Evandro", "Ezio",
"Fermo", "Fernando", "Ferruccio", "Fortunato", "Fulvio", "Gaetano", "Germano", "Giosuè",
"Gregorio", "Guglielmo", "Lamberto", "Lanfranco", "Liborio", "Lucio", "Luigi", "Manfredo"
);
// Nomi femminili italiani (200+ nomi)
public static final List<String> FEMALE_NAMES = Arrays.asList(
"Giulia", "Francesca", "Chiara", "Federica", "Sara", "Martina", "Valentina", "Alessandra",
"Silvia", "Elisa", "Giorgia", "Elena", "Paola", "Laura", "Roberta", "Alice", "Serena",
"Barbara", "Anna", "Maria", "Simona", "Claudia", "Monica", "Cristina", "Elisabetta",
"Stefania", "Valeria", "Daniela", "Manuela", "Antonella", "Giovanna", "Sabrina", "Emanuela",
"Ilaria", "Cinzia", "Rosanna", "Patrizia", "Teresa", "Carmela", "Giuseppina", "Rosa",
"Antonietta", "Concetta", "Caterina", "Angela", "Raffaella", "Luisa", "Lucia", "Michela",
"Franceschina", "Graziella", "Isabella", "Benedetta", "Beatrice", "Margherita", "Alessia", "Andrea",
"Cristiana", "Fabiana", "Gabriella", "Gianna", "Lorena", "Marisa", "Nicoletta", "Ornella",
"Rosaria", "Silvana", "Susanna", "Tiziana", "Viviana", "Adriana", "Agnese", "Albina",
"Amelia", "Andreina", "Angelica", "Antonella", "Arianna", "Armida", "Augusta", "Aurora",
"Bruna", "Brunella", "Camilla", "Carla", "Carolina", "Cecilia", "Clara", "Clelia",
"Concettina", "Corinna", "Cosima", "Costanza", "Cristiana", "Delia", "Diana", "Dora",
"Donatella", "Edvige", "Eleonora", "Elvira", "Emma", "Enrichetta", "Ester", "Eugenia",
"Eva", "Fabia", "Fabiola", "Fernanda", "Fiorella", "Fiorenza", "Flora", "Franca",
"Gaia", "Gemma", "Gilda", "Gina", "Gloria", "Grazia", "Ida", "Ilda",
"Immacolata", "Ines", "Iolanda", "Irene", "Iris", "Ivana", "Ivanka", "Lara",
"Letizia", "Licia", "Lidia", "Liliana", "Lina", "Linda", "Lisa", "Livia",
"Loredana", "Lorella", "Lorenza", "Luana", "Luciana", "Lucilla", "Lucrezia", "Ludovica",
"Luigia", "Luna", "Maddalena", "Mafalda", "Marcella", "Marella", "Marilena", "Marina",
"Marisa", "Marta", "Matilde", "Maura", "Mirella", "Miriam", "Morena", "Nadia",
"Natalia", "Natalina", "Nella", "Nelly", "Nicole", "Noemi", "Norma", "Olga",
"Olimpia", "Orietta", "Palmira", "Pamela", "Pascale", "Pasqualina", "Pia", "Piera",
"Pierina", "Priscilla", "Raffaela", "Rebecca", "Regina", "Renata", "Rita", "Romina",
"Rosalba", "Rosalia", "Rosangela", "Rosanna", "Rosella", "Rosetta", "Rosina", "Rossana",
"Rossella", "Samanta", "Sandra", "Santina", "Sebastiana", "Serafina", "Sonia", "Stella",
"Tecla", "Tina", "Tosca", "Tullia", "Uberta", "Umberta", "Ursula", "Vera",
"Veronica", "Vincenza", "Viola", "Virginia", "Vittoria", "Wanda", "Yvonne", "Zaira",
"Zelda", "Zita", "Zoe", "Ambra", "Azzurra", "Bianca", "Celeste", "Diamante",
"Fiamma", "Giada", "Perla", "Sole", "Stella", "Alba", "Alma", "Anya"
);
// Cognomi italiani (300+ cognomi)
public static final List<String> SURNAMES = Arrays.asList(
"Rossi", "Ferrari", "Russo", "Bianchi", "Romano", "Gallo", "Costa", "Fontana",
"Esposito", "Ricci", "Bruno", "Moretti", "Marino", "Greco", "Barbieri", "Lombardi",
"Giordano", "Colombo", "Rizzo", "Benedetti", "Palumbo", "Pellegrini", "Caruso", "Ferretti",
"Galli", "Marchetti", "Villa", "Mancini", "Conte", "Serra", "Ferrero", "Martinelli",
"Mariani", "Giuliani", "Vitale", "Santoro", "Ferrara", "Leone", "Longo", "Gentile",
"Martino", "Fabbri", "Rinaldi", "Messina", "Riva", "Conti", "Silvestri", "Coppola",
"Negri", "Milani", "Parisi", "Sala", "Cattaneo", "Orlando", "Fiore", "Marini",
"Guerra", "Pagano", "Bernardi", "Valenti", "Farina", "Ruggiero", "Caputo", "Monti",
"Grassi", "Montanari", "Santini", "Morelli", "Amato", "Neri", "Donati", "Testa",
"Bianco", "Sorrentino", "Rossini", "Giuliano", "Sartori", "De Angelis", "De Rosa",
"Basile", "Costantini", "Rizzi", "Barone", "Martini", "De Santis", "Basso", "Pellegrino",
"Carbone", "Gatti", "Coppola", "Rossetto", "Piras", "Ricci", "Martinelli", "Sanna",
"Torrisi", "Scuderi", "Priolo", "Anastasi", "Puglisi", "La Rosa", "Catalano", "Garofalo",
"Aiello", "Trovato", "Pappalardo", "Pulvirenti", "Marletta", "Di Marco", "Biondi", "Ferri",
"Testa", "Marchi", "Baldini", "Benedetti", "Colombi", "Gasparini", "Orlandi", "Barbera",
"Damico", "Guerriero", "Napolitano", "Romano", "Mazza", "Caruso", "Ferraro", "Gaeta",
"Di Stefano", "Palma", "Carbone", "Morrone", "Milazzo", "Calabrese", "Ventura", "Palmieri",
"Martello", "Fico", "Pastore", "Arena", "Maggio", "Sciacca", "Pagliaro", "Lupo",
"Mangano", "Capra", "Finocchiaro", "Grasso", "Morabito", "Pellicano", "Castelli", "Castaldo",
"Mauro", "Piazza", "Battaglia", "D Amico", "Forte", "Antonelli", "Delia", "Marino",
"Cosentino", "Lazzaro", "Vitale", "Lombardo", "Crisafulli", "Nicolosi", "Bellomo", "Morreale",
"Messina", "Vaccaro", "Nicosia", "Fazio", "Spina", "Russo", "Parisi", "Zappala",
"Riccobono", "Camilleri", "Barbagallo", "Oliveri", "Pistone", "Gambino", "Cavallaro", "Burgio",
"Gentile", "Restivo", "Di Bella", "Genovese", "Ferrante", "Gianninoto", "Vitrano", "Gargano",
"Lombardi", "Milani", "Picci", "De Luca", "Foti", "Giardina", "Di Pietro", "Russo",
"La Spina", "Morello", "Moschetti", "Penna", "Ferretti", "Colombo", "Marra", "De Simone",
"Cozzi", "Grimaldi", "Pellegrini", "Galdi", "Paolini", "Ferrara", "Santangelo", "Di Giovanni",
"Iannone", "Lucchese", "Orsini", "Mastroianni", "Fiorentino", "Capasso", "Di Napoli", "Giannini",
"Romano", "Vitale", "Fontana", "Galdi", "Giuliani", "Barbieri", "Lombardo", "Martinelli",
"De Rosa", "Ferri", "Caputo", "Castaldi", "Mauro", "Monti", "Villa", "Marcello",
"Ricci", "Ferretti", "Gallo", "Fabbri", "Marini", "Grasso", "Carbone", "Bevilacqua",
"Giannone", "Perna", "Pellegrino", "Di Lorenzo", "Napoli", "Amato", "Donato", "Riccio",
"Giuliano", "Mancuso", "Bellotti", "Bianchini", "Rossetti", "Mazza", "Silvestri", "Baldini",
"Martinelli", "Galli", "Colombo", "Ferraro", "Palumbo", "Marchetti", "Ferrera", "Rossi",
"Caruso", "Serra", "Marchese", "Benedetti", "Franzese", "Basile", "Di Mauro", "Torrisi",
"Licata", "Scuderi", "Platania", "Priolo", "Marletta", "Biondi", "Grassi", "Fontana",
"Pagano", "Gentile", "Moretti", "Guerra", "Santoro", "Longo", "Giordano", "Fiore",
"Marchetti", "Parisi", "Milani", "Orlando", "Sala", "Costa", "Cattaneo", "Neri",
"Donati", "Mancini", "Montanari", "Caputo", "De Angelis", "Sartori", "De Santis", "Basso"
);
public enum Gender {
MALE, FEMALE
}
/**
* Costruttore con seed random sicuro
*/
public ItalianNameGenerator() {
this.random = new SecureRandom();
}
/**
* Costruttore con seed personalizzato per risultati riproducibili
* @param seed seed per il generatore random
*/
public ItalianNameGenerator(long seed) {
this.random = new Random(seed);
}
/**
* Genera un genere casuale
* @return Gender casuale (MALE o FEMALE)
*/
public Gender generateGender() {
return random.nextBoolean() ? Gender.MALE : Gender.FEMALE;
}
/**
* Genera un nome casuale in base al sesso specificato
* @param gender il sesso per cui generare il nome
* @return nome casuale del sesso specificato
*/
public String generateFirstName(Gender gender) {
List<String> names = (gender == Gender.MALE) ? MALE_NAMES : FEMALE_NAMES;
return names.get(random.nextInt(names.size()));
}
/**
* Genera un cognome casuale
* @return cognome casuale
*/
public String generateSurname() {
return SURNAMES.get(random.nextInt(SURNAMES.size()));
}
/**
* Genera un nome completo (nome + cognome) in base al sesso
* @param gender il sesso per cui generare il nome completo
* @return nome completo del sesso specificato
*/
public String generateFullName(Gender gender) {
return generateFirstName(gender) + " " + generateSurname();
}
/**
* Genera un nome completo con sesso casuale
* @return nome completo con sesso casuale
*/
public String generateRandomFullName() {
Gender randomGender = random.nextBoolean() ? Gender.MALE : Gender.FEMALE;
return generateFullName(randomGender);
}
/**
* Genera una persona completa con nome, cognome e sesso
* @return oggetto Person con i dati generati
*/
public Person generatePerson() {
Gender gender = random.nextBoolean() ? Gender.MALE : Gender.FEMALE;
return new Person(generateFirstName(gender), generateSurname(), gender);
}
/**
* Genera una persona mantenendo il sesso specificato
* @param gender il sesso da mantenere
* @return oggetto Person con i dati generati
*/
public Person generatePerson(Gender gender) {
return new Person(generateFirstName(gender), generateSurname(), gender);
}
/**
* Classe interna per rappresentare una persona generata
*/
public static class Person {
private final String firstName;
private final String surname;
private final Gender gender;
public Person(String firstName, String surname, Gender gender) {
this.firstName = firstName;
this.surname = surname;
this.gender = gender;
}
public String getFirstName() {
return firstName;
}
public String getSurname() {
return surname;
}
public Gender getGender() {
return gender;
}
public String getFullName() {
return firstName + " " + surname;
}
@Override
public String toString() {
return String.format("Person{firstName='%s', surname='%s', gender=%s}",
firstName, surname, gender);
}
}
/**
* Metodo di utilità per ottenere il sesso da una stringa
* @param genderString stringa rappresentante il sesso ("M", "F", "MALE", "FEMALE", etc.)
* @return enum Gender corrispondente
* @throws IllegalArgumentException se la stringa non è riconosciuta
*/
public static Gender parseGender(String genderString) {
if (genderString == null) {
throw new IllegalArgumentException("Gender string cannot be null");
}
String normalized = genderString.trim().toUpperCase();
switch (normalized) {
case "M":
case "MALE":
case "MASCHIO":
case "UOMO":
return Gender.MALE;
case "F":
case "FEMALE":
case "FEMMINA":
case "DONNA":
return Gender.FEMALE;
default:
throw new IllegalArgumentException("Unrecognized gender: " + genderString);
}
}
}

View File

@@ -14,7 +14,7 @@ public class ExecutorServiceConfig {
private final int corePoolSize = Runtime.getRuntime().availableProcessors();
private final int maxPoolSize = (int) (corePoolSize * 1.5f);
private final int queueSize = 500;
private final int queueSize = 1_000_000;
@Bean
public ExecutorService taskExecutor() {

View File

@@ -552,7 +552,7 @@ public class EmsController {
@RequestParam(required = false, defaultValue = "true") boolean headless,
@RequestBody(required = false) JsonNode body) throws Exception {
EntityExportResponse<?> entityExportResponse = emsServices.export(typeExport, formatExport, body, headless);
EntityExportResponse<?> entityExportResponse = emsServices.export(multiDBTransactionManager, requestDataDTO, typeExport, formatExport, body, headless);
List<AnomalieDTO> anomalie = new ArrayList<>();
if (entityExportResponse != null && entityExportResponse.getAnomalie() != null && !entityExportResponse.getAnomalie().isEmpty())
@@ -608,7 +608,7 @@ public class EmsController {
@RequestParam(required = false, defaultValue = "true") boolean headless,
@RequestBody(required = false) ImportRequestDTO requestBody) throws Exception {
EntityImportResponse<List<EntityBase>> importResponse = emsServices.importEntity(importType, importFormat, requestBody, headless);
EntityImportResponse<List<EntityBase>> importResponse = emsServices.importEntity(multiDBTransactionManager, requestDataDTO, importType, importFormat, requestBody, headless);
List<EntityBase> entities = importResponse.getResponse();
@@ -733,7 +733,7 @@ public class EmsController {
@PathVariable String filename,
@RequestParam(name = "contentDisposition", defaultValue = "attachment") String contentDispositionType,
@RequestParam(defaultValue = "false") boolean requestThumbnail) throws Exception {
AttachmentDTO attachmentDTO = emsServices.downloadStbFileAttachment(idAttach, requestThumbnail);
AttachmentDTO attachmentDTO = emsServices.downloadStbFileAttachment(multiDBTransactionManager, idAttach, requestThumbnail);
if (attachmentDTO != null) {
return ResponseEntity.ok()
@@ -754,7 +754,7 @@ public class EmsController {
public ResponseEntity<byte[]> downloadFileFromRefUuid(@RequestParam(CommonConstants.PROFILE_DB) String config,
@RequestParam() String refUuid,
@RequestParam() String fileName) throws Exception {
AttachmentDTO attached = emsServices.downloadFileFromRefUuid(refUuid, fileName);
AttachmentDTO attached = emsServices.downloadFileFromRefUuid(multiDBTransactionManager, refUuid, fileName);
if (attached == null) return ResponseEntity.notFound().build();
@@ -774,7 +774,7 @@ public class EmsController {
@RequestParam(CommonConstants.PROFILE_DB) String config,
@RequestParam String idAttach,
@RequestParam(defaultValue = "false") boolean requestThumbnail) throws Exception {
AttachmentDTO attachmentDTO = emsServices.downloadStbFileAttachment(idAttach, requestThumbnail);
AttachmentDTO attachmentDTO = emsServices.downloadStbFileAttachment(multiDBTransactionManager, idAttach, requestThumbnail);
if (attachmentDTO != null) {
return ResponseEntity.ok()
@@ -793,9 +793,8 @@ public class EmsController {
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_STB_EMAIL_CONTENT, method = RequestMethod.GET)
public byte[] downloadStbEmailContent(HttpServletRequest request, HttpServletResponse response,
@RequestParam(CommonConstants.PROFILE_DB) String config,
@RequestParam Integer idEmail) throws Exception {
public ResponseEntity<byte[]> downloadStbEmailContent(@RequestParam(CommonConstants.PROFILE_DB) String config,
@RequestParam Integer idEmail) throws Exception {
StbEmailContent stbEmailContent = new StbEmailContent();
stbEmailContent.setIdEmail(idEmail);
stbEmailContent.setOperation(OperationType.SELECT_OBJECT);
@@ -803,11 +802,7 @@ public class EmsController {
stbEmailContent = entityProcessor.processEntity(stbEmailContent, multiDBTransactionManager);
if (stbEmailContent != null) {
response.setContentType("application/octet-stream");
response.setStatus(HttpServletResponse.SC_OK);
response.addHeader(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition.attachment().filename("email.eml").build().toString());
byte[] byteArr = null;
byte[] byteArr;
String pattern = "[^\\x00-\\x7F]";
Pattern pat = Pattern.compile(pattern);
@@ -819,13 +814,18 @@ public class EmsController {
byteArr = Base64.decodeBase64(stbEmailContent.getEmailContent());
}
response.setContentLength(byteArr != null ? byteArr.length : 0);
return byteArr;
return ResponseEntity.ok()
.contentType(MediaType.APPLICATION_OCTET_STREAM)
.contentLength(byteArr != null ? byteArr.length : 0)
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
.builder("attachment")
.filename("email.eml")
.build()
.toString())
.body(byteArr);
}
response.sendError(404, "Allegato non trovato");
return null;
return ResponseEntity.notFound().build();
}
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_DTB_DOC_PDF, method = RequestMethod.GET)
@@ -884,12 +884,13 @@ public class EmsController {
}
@RequestMapping(value = EmsRestConstants.PATH_DOWNLOAD_DTB_ORD_PDF, method = RequestMethod.GET)
public byte[] downloadDtbOrdPdf(HttpServletRequest request, HttpServletResponse response,
@RequestParam(CommonConstants.PROFILE_DB) String config,
@RequestParam String gestione,
@RequestParam String dataOrd,
@RequestParam Integer numOrd,
@RequestParam Integer versione) throws Exception {
public ResponseEntity<byte[]> downloadDtbOrdPdf(
@RequestParam(CommonConstants.PROFILE_DB) String config,
@RequestParam String gestione,
@RequestParam String dataOrd,
@RequestParam Integer numOrd,
@RequestParam Integer versione) throws Exception {
DtbOrdPdf dtbOrdPdf = new DtbOrdPdf();
dtbOrdPdf.setGestione(gestione);
dtbOrdPdf.setDataOrd(UtilityDate.RecognizeDate(dataOrd));
@@ -900,17 +901,20 @@ public class EmsController {
dtbOrdPdf = entityProcessor.processEntity(dtbOrdPdf, multiDBTransactionManager);
if (dtbOrdPdf != null) {
response.setContentType("application/octet-stream");
response.setStatus(HttpServletResponse.SC_OK);
response.addHeader(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition.attachment().filename(dtbOrdPdf.getFilename()).build().toString());
byte[] byteArr = dtbOrdPdf.getFilecontentByteArr(true);
response.setContentLength(byteArr != null ? byteArr.length : 0);
return byteArr;
return ResponseEntity.ok()
.contentType(MediaType.APPLICATION_PDF)
.contentLength(byteArr != null ? byteArr.length : 0)
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
.builder("attachment")
.filename(ContentDisposition.attachment().filename(dtbOrdPdf.getFilename()).build().toString())
.build()
.toString())
.body(byteArr);
}
response.sendError(404, "Allegato non trovato");
return null;
return ResponseEntity.notFound().build();
}
@RequestMapping(value = EmsRestConstants.PATH_UPLOAD_STB_FILE_ATTACHMENT, method = RequestMethod.POST)
@@ -927,7 +931,7 @@ public class EmsController {
throw new Exception("Sono stati inviati più file del previsto");
}
StbFilesAttached stbFilesAttached = emsServices.uploadStbFilesAttached(idAttach,
StbFilesAttached stbFilesAttached = emsServices.uploadStbFilesAttached(multiDBTransactionManager, idAttach,
files[0].getOriginalFilename(),
files[0].getBytes(),
descrizione,
@@ -1106,7 +1110,7 @@ public class EmsController {
.setCodDtip(codDtip);
drlDocAttached.setOperation(OperationType.INSERT);
StbFilesAttached stbFilesAttached = emsServices.uploadStbFilesAttached(idAttach,
StbFilesAttached stbFilesAttached = emsServices.uploadStbFilesAttached(multiDBTransactionManager, idAttach,
files[0].getOriginalFilename(),
files[0].getBytes(),
descrizione,
@@ -1125,7 +1129,7 @@ public class EmsController {
@RequestMapping(value = "createZipFromFiles", method = RequestMethod.POST)
public @ResponseBody
ServiceRestResponse createZipFromFiles(@RequestBody CreateZipDTO createZipDTO) throws Exception {
return ServiceRestResponse.createPositiveResponse(emsServices.createZipFromFiles(createZipDTO));
return ServiceRestResponse.createPositiveResponse(emsServices.createZipFromFiles(multiDBTransactionManager, createZipDTO));
}
// @RequestMapping(value = EmsRestConstants.PATH_UPLOAD_STB_EMAIL_CONTENT, method = RequestMethod.POST)
@@ -1174,7 +1178,7 @@ public class EmsController {
@RequestMapping(value = EmsRestConstants.PATH_EXPORT_SERVER_INFO_ISCC, method = RequestMethod.POST)
public @ResponseBody
ServiceRestResponse exportServerInfoISCC(@RequestParam(CommonConstants.PROFILE_DB) String config) throws Exception {
emsServices.checkServerVariables();
emsServices.checkServerVariables(multiDBTransactionManager);
return ServiceRestResponse.createPositiveResponse();
}

View File

@@ -1,11 +1,12 @@
package it.integry.ems.datasource;
import it.integry.ems.settings.Model.AvailableConnectionsModel;
import it.integry.ems.settings.Model.AvailableConnectionModel;
import it.integry.ems.settings.Model.SettingsModel;
import it.integry.ems.sync.MultiDBTransaction.Connection;
import it.integry.ems_model.config.EmsRestConstants;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityHashMap;
import it.integry.ems_model.utility.UtilityString;
import org.apache.commons.dbcp2.BasicDataSource;
import java.sql.SQLException;
@@ -13,17 +14,26 @@ import java.util.HashMap;
public class DataSource extends BasicDataSource {
private AvailableConnectionsModel connectionModel;
private final int POOL_SIZE;
private AvailableConnectionModel connectionModel;
/**
* Instanzia un nuovo datasource.
*
* @deprecated Il datasource non deve essere istanziato direttamente ma bisogna utilizzare il metodo
* {@link it.integry.ems.sync.MultiDBTransaction.BasicConnectionPool#getConnection(AvailableConnectionsModel)} per ottenere una connessione.
* {@link it.integry.ems.sync.MultiDBTransaction.BasicConnectionPool#getConnection(AvailableConnectionModel)} per ottenere una connessione.
*/
@Deprecated
public DataSource() {
super();
POOL_SIZE = 5;
}
@Deprecated
public DataSource(int poolSize) {
super();
POOL_SIZE = poolSize;
}
public EmsRestConstants.DB_TYPE getTypeDB() {
@@ -62,12 +72,20 @@ public class DataSource extends BasicDataSource {
}
public synchronized void initialize(String profileDB) throws Exception {
AvailableConnectionsModel connectionsModel = SettingsModel.getInstance().findConnectionModel(profileDB);
initialize(connectionsModel);
initialize(profileDB, null);
}
public synchronized void initialize(AvailableConnectionsModel connectionModel) throws Exception {
public synchronized void initialize(String profileDB, String customAppName) throws Exception {
AvailableConnectionModel connectionsModel = SettingsModel.getInstance().findConnectionModel(profileDB);
initialize(connectionsModel, customAppName);
}
public synchronized void initialize(AvailableConnectionModel connectionModel) throws Exception {
initialize(connectionModel, null);
}
public synchronized void initialize(AvailableConnectionModel connectionModel, String customAppName) throws Exception {
if (connectionModel == null) {
throw new Exception("Configurazione DB non trovata");
}
@@ -76,7 +94,7 @@ public class DataSource extends BasicDataSource {
this.setDriverClassName(connectionModel.getDriverClassName());
this.setUrl(connectionModel.getDbConnectionString("EMS Connection"));
this.setUrl(connectionModel.getDbConnectionString(UtilityString.isNull(customAppName, "EMS Connection")));
this.setUsername(connectionModel.getUsername());
this.setPassword(connectionModel.getPasswordDecrypted());
this.setDefaultCatalog(connectionModel.getDbName());
@@ -87,9 +105,9 @@ public class DataSource extends BasicDataSource {
// ===== OTTIMIZZAZIONI CRITICHE =====
// Pool sizing ottimizzato per READ_UNCOMMITTED (meno locking = più connessioni possibili)
this.setInitialSize(5); // Inizia con più connessioni
this.setInitialSize(POOL_SIZE); // Inizia con più connessioni
this.setMaxTotal(-1); // Aumentato il massimo
this.setMinIdle(5); // Non scendere sotto 5
this.setMinIdle(POOL_SIZE); // Non scendere sotto 5
this.setMaxIdle(-1); // Mantieni più connessioni idle
// Timeout ottimizzati per performance massime
@@ -97,8 +115,8 @@ public class DataSource extends BasicDataSource {
// Validazione veloce ed efficiente
this.setValidationQuery("SELECT 1");
// this.setValidationQueryTimeout(60); // Ridotto a 1 secondo
// this.setTestWhileIdle(true); // Testa connessioni idle
this.setValidationQueryTimeout(30); // Ridotto a 1 secondo
this.setTestWhileIdle(true); // Testa connessioni idle
// Eviction ottimizzata per READ_UNCOMMITTED
// this.setTimeBetweenEvictionRunsMillis(1 * 1000); // Ogni 30 secondi

View File

@@ -0,0 +1,302 @@
package it.integry.ems.dbms_change_tracker.component;
import com.microsoft.sqlserver.jdbc.SQLServerConnection;
import it.integry.ems.datasource.DataSource;
import it.integry.ems.dbms_change_tracker.model.ChangeTrackingConfigDTO;
import it.integry.ems.dbms_change_tracker.model.DetectedChangeDataDTO;
import it.integry.ems.sync.MultiDBTransaction.Connection;
import it.integry.ems_model.exception.DataConverterNotFoundException;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityHashMap;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
public class DbmsChangeTracker {
private DataSource dataSource;
private final Logger logger = LogManager.getLogger();
private final int CHANGE_RETENTION_HOURS = 1;
private final boolean AUTO_CLEANUP = true;
private Connection integryConnection;
private boolean trackerEnabled = false;
private long currentVersion;
private Listener eventListener;
public DbmsChangeTracker(String profileDb) throws Exception {
createDataSource(profileDb);
createConnection();
}
private void createDataSource(String profileDb) throws Exception {
DataSource ds = new DataSource(1);
ds.initialize(profileDb, "Integry Changes Tracker");
this.dataSource = ds;
}
private void createConnection() throws SQLException {
integryConnection = dataSource.getConnection();
if (!(integryConnection.isWrapperFor(SQLServerConnection.class))) {
integryConnection.close();
throw new SQLException("Connection is not a SQL Server connection");
}
}
private void checkConnection() {
try {
UtilityDB.executeSimpleQuery(integryConnection, "SELECT 1");
if (integryConnection.isClosed())
createConnection();
} catch (SQLException e) {
try {
try {
integryConnection.close();
} catch (Exception ex) {
//ignore
}
createConnection();
} catch (SQLException ex) {
logger.error("Unable to reestablish DB connection for Change Tracker", ex);
throw new RuntimeException("Unable to reestablish DB connection for Change Tracker");
}
}
}
public void enableTrackerInDbms() throws SQLException, DataConverterNotFoundException, InstantiationException, IllegalAccessException {
final ChangeTrackingConfigDTO currentConfig = retrieveTrackerCurrentConfig();
if (currentConfig != null) {
logInfo("Changes Tracker is already enabled (with " + currentConfig.getRetentionPeriod() + " " + currentConfig.getRetentionPeriodUnit().toLowerCase() + " retention and auto cleanup " + (currentConfig.isAutoCleanupOn() ? "ON" : "OFF") + ")");
return;
}
String enableSql = "ALTER DATABASE [" + integryConnection.getDbName() + "] \n" +
"SET CHANGE_TRACKING = ON (" +
"CHANGE_RETENTION = " + CHANGE_RETENTION_HOURS + " HOURS, " +
"AUTO_CLEANUP = " + (AUTO_CLEANUP ? "ON" : "OFF") +
");\n";
//COMMIT necessario perché ALTER DATABASE richiede che non ci siano altre transazioni attive
UtilityDB.executeStatement(integryConnection, "COMMIT", enableSql);
logInfo("Changes Tracker is now enabled (with " + CHANGE_RETENTION_HOURS + " hours retention and auto cleanup " + (AUTO_CLEANUP ? "ON" : "OFF") + ")");
}
public void enableTrackerOnTable(String tableName) throws SQLException {
if (isTableTrackingEnabled(tableName)) {
return;
}
UtilityDB.executeStatement(integryConnection, "ALTER TABLE dbo." + tableName + "\n" +
"ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON);", "COMMIT");
}
public void disableTrackerOnNotUsedTables(List<String> usedTables) throws SQLException {
final List<String> trackedTables = retrieveTrackedTables();
trackedTables.removeAll(usedTables);
for (String tableName : trackedTables) {
disableTrackerOnTable(tableName);
}
}
public void disableTrackerOnTable(String tableName) throws SQLException {
if (!isTableTrackingEnabled(tableName)) {
return;
}
UtilityDB.executeStatement(integryConnection, "ALTER TABLE dbo." + tableName + "\n" +
"DISABLE CHANGE_TRACKING;", "COMMIT");
}
public void startTracking() throws SQLException {
currentVersion = retrieveCurrentVersion();
trackerEnabled = true;
}
public void checkForChanges() throws Exception {
if (!trackerEnabled)
return;
checkConnection();
final List<String> trackedTables = retrieveTrackedTables();
HashMap<Long, List<DetectedChangeDataDTO>> changesByVersion = new HashMap<>();
for (String trackedTable : trackedTables) {
long minValidVersion = getMinValidVersion(trackedTable);
if (currentVersion < minValidVersion) {
if (eventListener != null) {
eventListener.onTrackingResetted();
currentVersion = retrieveCurrentVersion();
return;
}
}
final List<DetectedChangeDataDTO> detectedChanges = retrieveChangeList(trackedTable);
detectedChanges.forEach(detectedChangeDataDTO -> {
changesByVersion.putIfAbsent(detectedChangeDataDTO.getSysChangeVersion(), new ArrayList<>());
changesByVersion.get(detectedChangeDataDTO.getSysChangeVersion()).add(detectedChangeDataDTO);
});
}
logTrace("Detected " + changesByVersion.size() + " changes since version " + currentVersion);
dispatchChanges(changesByVersion);
}
private void dispatchChanges(HashMap<Long, List<DetectedChangeDataDTO>> changesByVersion) throws Exception {
final List<Long> sortedChanges = changesByVersion.keySet().stream()
.sorted()
.collect(Collectors.toList());
for (Long changeId : sortedChanges) {
final List<DetectedChangeDataDTO> detectedChanges = changesByVersion.get(changeId);
for (DetectedChangeDataDTO detectedChange : detectedChanges) {
switch (detectedChange.getSysChangeOperation()) {
case INSERT:
if (eventListener != null)
eventListener.onInsertDetected(detectedChange.getTableName(), detectedChange.getPrimaryKey());
break;
case UPDATE:
if (eventListener != null)
eventListener.onUpdateDetected(detectedChange.getTableName(), detectedChange.getPrimaryKey());
break;
case DELETE:
if (eventListener != null)
eventListener.onDeleteDetected(detectedChange.getTableName(), detectedChange.getPrimaryKey());
break;
}
}
currentVersion = changeId;
}
}
private List<DetectedChangeDataDTO> retrieveChangeList(String tableName) throws SQLException {
String sql = "SELECT *\n" +
"FROM CHANGETABLE(CHANGES dbo." + tableName + ", " + currentVersion + ") AS c";
final List<HashMap<String, Object>> result = UtilityDB.executeSimpleQuery(integryConnection, sql);
return result.stream()
.map(x -> {
DetectedChangeDataDTO detectedChangeDataDTO = new DetectedChangeDataDTO()
.setTableName(tableName);
Long sysChangeVersion = UtilityHashMap.<Long>getValueIfExists(x, "SYS_CHANGE_VERSION");
detectedChangeDataDTO.setSysChangeVersion(sysChangeVersion);
Long sysChangeCreationVersion = UtilityHashMap.<Long>getValueIfExists(x, "SYS_CHANGE_CREATION_VERSION");
detectedChangeDataDTO.setSysChangeCreationVersion(sysChangeCreationVersion);
detectedChangeDataDTO.setSysChangeOperation(DetectedChangeDataDTO.Operation.from(UtilityHashMap.<String>getValueIfExists(x, "SYS_CHANGE_OPERATION")));
List<String> keysToRemove = new ArrayList<>();
for (String colName : x.keySet()) {
if (colName.startsWith("SYS_"))
keysToRemove.add(colName);
}
for (String colName : keysToRemove) {
x.remove(colName);
}
detectedChangeDataDTO.setPrimaryKey(x);
return detectedChangeDataDTO;
})
.collect(Collectors.toList());
}
private long retrieveCurrentVersion() throws SQLException {
String sql = "SELECT CHANGE_TRACKING_CURRENT_VERSION() AS current_version";
long currentVersion = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(integryConnection, sql);
return currentVersion;
}
private long getMinValidVersion(String table) throws SQLException {
String sql = "SELECT CHANGE_TRACKING_MIN_VALID_VERSION(OBJECT_ID(" + UtilityDB.valueToString(table) + "))";
long minValidVersion = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(integryConnection, sql);
return minValidVersion;
}
private List<String> retrieveTrackedTables() throws SQLException {
String sql = "SELECT OBJECT_NAME(object_id) AS table_name\n" +
" FROM sys.change_tracking_tables";
List<String> trackedTables = UtilityDB.executeSimpleQueryOnlyFirstColumn(integryConnection, sql);
return trackedTables;
}
private boolean isTableTrackingEnabled(String tableName) throws SQLException {
String sql = "SELECT CAST(COUNT(is_track_columns_updated_on) AS BIT) AS enabled\n" +
" FROM sys.change_tracking_tables \n" +
" WHERE object_id = OBJECT_ID('dbo." + tableName + "')";
boolean enabled = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(integryConnection, sql);
return enabled;
}
private ChangeTrackingConfigDTO retrieveTrackerCurrentConfig() throws SQLException, DataConverterNotFoundException, InstantiationException, IllegalAccessException {
String checkSql = "SELECT DB_NAME(database_id) as database_name,\n" +
"CAST(is_auto_cleanup_on AS BIT) AS is_auto_cleanup_on,\n" +
"retention_period,\n" +
"retention_period_units_desc,\n" +
"max_cleanup_version\n" +
"FROM sys.change_tracking_databases \n" +
"WHERE DB_NAME(database_id)=DB_NAME()";
final ChangeTrackingConfigDTO currentConfig = UtilityDB.executeSimpleQueryOnlyFirstRowDTO(integryConnection, checkSql, ChangeTrackingConfigDTO.class);
return currentConfig;
}
private void logInfo(String message) {
logger.info("[" + integryConnection.getProfileName() + "] " + message);
}
private void logTrace(String message) {
logger.trace("[" + integryConnection.getProfileName() + "] " + message);
}
public DbmsChangeTracker setEventListener(Listener eventListener) {
this.eventListener = eventListener;
return this;
}
public interface Listener {
void onInsertDetected(String tableName, HashMap<String, Object> primaryKey) throws Exception;
void onUpdateDetected(String tableName, HashMap<String, Object> primaryKey) throws Exception;
void onDeleteDetected(String tableName, HashMap<String, Object> primaryKey) throws Exception;
void onTrackingResetted() throws Exception;
}
}

View File

@@ -0,0 +1,144 @@
package it.integry.ems.dbms_change_tracker.component;
import it.integry.annotations.PostContextAutowired;
import it.integry.annotations.PostContextConstruct;
import it.integry.ems.dbms_change_tracker.model.events.TableRecordDeletedEvent;
import it.integry.ems.dbms_change_tracker.model.events.TableRecordInsertedEvent;
import it.integry.ems.dbms_change_tracker.model.events.TableRecordUpdatedEvent;
import it.integry.ems.dbms_change_tracker.model.events.TableTrackingResettedEvent;
import it.integry.ems.migration._base.IntegryCustomerDB;
import it.integry.ems.sync.MultiDBTransaction.Connection;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems_model.entity.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@Component
public class DbmsChangeTrackerComponent {
private final Logger logger = LogManager.getLogger();
private final HashMap<IntegryCustomerDB, DbmsChangeTracker> activeChangeTrackers = new HashMap<>();
private final ArrayList<String> trackedTables = new ArrayList<String>() {{
add(MtbAart.ENTITY);
add(MtbAartBarCode.ENTITY);
add(MtbUntMis.ENTITY);
add(MtbDepo.ENTITY);
add(MtbDepoPosizioni.ENTITY);
add(StbEditLimit.ENTITY);
add(StbGestSetup.ENTITY);
add(StbGestSetupDepo.ENTITY);
add(StbUser.ENTITY);
add(WtbClie.ENTITY);
add(WtbDepo.ENTITY);
add(WtbGestSetupUser.ENTITY);
}};
private final ApplicationEventPublisher applicationEventPublisher;
@PostContextAutowired
private MultiDBTransactionManager multiDBTransactionManager;
public DbmsChangeTrackerComponent(ApplicationEventPublisher applicationEventPublisher) {
this.applicationEventPublisher = applicationEventPublisher;
}
@PostContextConstruct(priority = 10)
public void init() throws Exception {
for (Connection conn : multiDBTransactionManager.getActiveConnections()) {
IntegryCustomerDB customerDB = IntegryCustomerDB.parse(conn.getDbName());
activeChangeTrackers.put(customerDB, new DbmsChangeTracker(conn.getProfileName()));
}
enableAllChangeTracking();
}
private void enableAllChangeTracking() throws Exception {
for (Map.Entry<IntegryCustomerDB, DbmsChangeTracker> entrySet : activeChangeTrackers.entrySet()) {
final IntegryCustomerDB customerDB = entrySet.getKey();
final DbmsChangeTracker dbmsChangeTracker = entrySet.getValue();
try {
dbmsChangeTracker.enableTrackerInDbms();
for (String tableName : trackedTables) {
dbmsChangeTracker.enableTrackerOnTable(tableName);
}
dbmsChangeTracker.disableTrackerOnNotUsedTables(trackedTables);
dbmsChangeTracker.setEventListener(new DbmsChangeTracker.Listener() {
@Override
public void onInsertDetected(String tableName, HashMap<String, Object> primaryKey) {
onItemInserted(customerDB, tableName, primaryKey);
}
@Override
public void onUpdateDetected(String tableName, HashMap<String, Object> primaryKey) {
onItemUpdated(customerDB, tableName, primaryKey);
}
@Override
public void onDeleteDetected(String tableName, HashMap<String, Object> primaryKey) {
onItemDeleted(customerDB, tableName, primaryKey);
}
@Override
public void onTrackingResetted() throws Exception {
requestGlobalReset(customerDB);
}
});
dbmsChangeTracker.startTracking();
} catch (Exception e) {
throw new Exception("Errore durante l'abilitazione del DbmsChangeTracker per il customer: " + customerDB.getValue(), e);
}
}
}
@Scheduled(fixedDelay = 5, timeUnit = TimeUnit.SECONDS)
private void checkAllChanges() throws Exception {
for (DbmsChangeTracker dbmsChangeTracker : activeChangeTrackers.values()) {
try {
dbmsChangeTracker.checkForChanges();
} catch (Exception e) {
logger.error("Errore durante il controllo delle modifiche nel DbmsChangeTracker.", e);
}
}
}
private void onItemInserted(IntegryCustomerDB customerDB, String tableName, HashMap<String, Object> primaryKey) {
logger.trace("Item inserted in profileDb {} table {} with primaryKey {}", customerDB.getValue(), tableName, primaryKey);
applicationEventPublisher.publishEvent(new TableRecordInsertedEvent(this, customerDB, tableName, primaryKey));
}
private void onItemUpdated(IntegryCustomerDB customerDB, String tableName, HashMap<String, Object> primaryKey) {
logger.trace("Item updated in profileDb {} table {} with primaryKey {}", customerDB.getValue(), tableName, primaryKey);
applicationEventPublisher.publishEvent(new TableRecordUpdatedEvent(this, customerDB, tableName, primaryKey));
}
private void onItemDeleted(IntegryCustomerDB customerDB, String tableName, HashMap<String, Object> primaryKey) {
logger.trace("Item deleted in profileDb {} table {} with primaryKey {}", customerDB.getValue(), tableName, primaryKey);
applicationEventPublisher.publishEvent(new TableRecordDeletedEvent(this, customerDB, tableName, primaryKey));
}
private void requestGlobalReset(IntegryCustomerDB customerDB) {
logger.warn("Table tracking resetted in profileDb {} ", customerDB.getValue());
applicationEventPublisher.publishEvent(new TableTrackingResettedEvent(this, customerDB));
}
}

View File

@@ -0,0 +1,27 @@
package it.integry.ems.dbms_change_tracker.component.exception;
public class DbmsChangeTrackerInvalidMinVersionException extends Exception {
private final String tableName;
private final long currentVersion;
private final long minValidVersion;
public DbmsChangeTrackerInvalidMinVersionException(String tableName, long currentVersion, long minValidVersion) {
super("Change Tracking on table " + tableName + " has been reset. Current version: " + currentVersion + ", Min valid version: " + minValidVersion);
this.tableName = tableName;
this.minValidVersion = minValidVersion;
this.currentVersion = currentVersion;
}
public String getTableName() {
return tableName;
}
public long getCurrentVersion() {
return currentVersion;
}
public long getMinValidVersion() {
return minValidVersion;
}
}

View File

@@ -0,0 +1,67 @@
package it.integry.ems.dbms_change_tracker.model;
import it.integry.ems_model.annotation.SqlField;
public class ChangeTrackingConfigDTO {
@SqlField("database_name")
private String databaseName;
@SqlField("is_auto_cleanup_on")
private boolean autoCleanupOn;
@SqlField("retention_period")
private int retentionPeriod;
@SqlField("retention_period_units_desc")
private String retentionPeriodUnit;
// @SqlField("max_cleanup_version")
private Object maxCleanupVersion;
public String getDatabaseName() {
return databaseName;
}
public ChangeTrackingConfigDTO setDatabaseName(String databaseName) {
this.databaseName = databaseName;
return this;
}
public boolean isAutoCleanupOn() {
return autoCleanupOn;
}
public ChangeTrackingConfigDTO setAutoCleanupOn(boolean autoCleanupOn) {
this.autoCleanupOn = autoCleanupOn;
return this;
}
public int getRetentionPeriod() {
return retentionPeriod;
}
public ChangeTrackingConfigDTO setRetentionPeriod(int retentionPeriod) {
this.retentionPeriod = retentionPeriod;
return this;
}
public String getRetentionPeriodUnit() {
return retentionPeriodUnit;
}
public ChangeTrackingConfigDTO setRetentionPeriodUnit(String retentionPeriodUnit) {
this.retentionPeriodUnit = retentionPeriodUnit;
return this;
}
public Object getMaxCleanupVersion() {
return maxCleanupVersion;
}
public ChangeTrackingConfigDTO setMaxCleanupVersion(Object maxCleanupVersion) {
this.maxCleanupVersion = maxCleanupVersion;
return this;
}
}

View File

@@ -0,0 +1,108 @@
package it.integry.ems.dbms_change_tracker.model;
import com.fasterxml.jackson.annotation.JsonValue;
import it.integry.ems_model.entity._enum.IBaseEnum;
import java.util.HashMap;
public class DetectedChangeDataDTO {
private long sysChangeVersion;
private Long sysChangeCreationVersion;
private Operation sysChangeOperation;
private String tableName;
private HashMap<String, Object> primaryKey;
public long getSysChangeVersion() {
return sysChangeVersion;
}
public DetectedChangeDataDTO setSysChangeVersion(long sysChangeVersion) {
this.sysChangeVersion = sysChangeVersion;
return this;
}
public Long getSysChangeCreationVersion() {
return sysChangeCreationVersion;
}
public DetectedChangeDataDTO setSysChangeCreationVersion(Long sysChangeCreationVersion) {
this.sysChangeCreationVersion = sysChangeCreationVersion;
return this;
}
public Operation getSysChangeOperation() {
return sysChangeOperation;
}
public DetectedChangeDataDTO setSysChangeOperation(Operation sysChangeOperation) {
this.sysChangeOperation = sysChangeOperation;
return this;
}
public String getTableName() {
return tableName;
}
public DetectedChangeDataDTO setTableName(String tableName) {
this.tableName = tableName;
return this;
}
public HashMap<String, Object> getPrimaryKey() {
return primaryKey;
}
public DetectedChangeDataDTO setPrimaryKey(HashMap<String, Object> primaryKey) {
this.primaryKey = primaryKey;
return this;
}
public enum Operation implements IBaseEnum<Operation> {
INSERT('I'),
UPDATE('U'),
DELETE('D');
private final char value;
Operation(char value) {
this.value = value;
}
public static Operation from(Object value) {
if (value instanceof String && ((String) value).length() == 1) {
value = ((String) value).charAt(0);
}
char castValue = (char) value;
for (Operation b : Operation.values()) {
if (b.value == castValue)
return b;
}
return null;
}
@JsonValue
public char getValue() {
return this.value;
}
@Override
public Object get() {
return this.value;
}
@Override
public Operation fromInternal(Object val) {
return from(val);
}
@Override
public String toString() {
return String.valueOf(value);
}
}
}

View File

@@ -0,0 +1,27 @@
package it.integry.ems.dbms_change_tracker.model.events;
import it.integry.ems.migration._base.IntegryCustomerDB;
import it.integry.event.BaseCustomerDBEvent;
import java.util.HashMap;
public class TableRecordDeletedEvent extends BaseCustomerDBEvent {
private final String tableName;
private final HashMap<String, Object> primaryKey;
public TableRecordDeletedEvent(Object source, IntegryCustomerDB integryCustomerDB, String tableName, HashMap<String, Object> primaryKey) {
super(source, integryCustomerDB);
this.tableName = tableName;
this.primaryKey = primaryKey;
}
public String getTableName() {
return tableName;
}
public HashMap<String, Object> getPrimaryKey() {
return primaryKey;
}
}

View File

@@ -0,0 +1,27 @@
package it.integry.ems.dbms_change_tracker.model.events;
import it.integry.ems.migration._base.IntegryCustomerDB;
import it.integry.event.BaseCustomerDBEvent;
import java.util.HashMap;
public class TableRecordInsertedEvent extends BaseCustomerDBEvent {
private final String tableName;
private final HashMap<String, Object> primaryKey;
public TableRecordInsertedEvent(Object source, IntegryCustomerDB integryCustomerDB, String tableName, HashMap<String, Object> primaryKey) {
super(source, integryCustomerDB);
this.tableName = tableName;
this.primaryKey = primaryKey;
}
public String getTableName() {
return tableName;
}
public HashMap<String, Object> getPrimaryKey() {
return primaryKey;
}
}

View File

@@ -0,0 +1,27 @@
package it.integry.ems.dbms_change_tracker.model.events;
import it.integry.ems.migration._base.IntegryCustomerDB;
import it.integry.event.BaseCustomerDBEvent;
import java.util.HashMap;
public class TableRecordUpdatedEvent extends BaseCustomerDBEvent {
private final String tableName;
private final HashMap<String, Object> primaryKey;
public TableRecordUpdatedEvent(Object source, IntegryCustomerDB customerDB, String tableName, HashMap<String, Object> primaryKey) {
super(source, customerDB);
this.tableName = tableName;
this.primaryKey = primaryKey;
}
public String getTableName() {
return tableName;
}
public HashMap<String, Object> getPrimaryKey() {
return primaryKey;
}
}

View File

@@ -0,0 +1,11 @@
package it.integry.ems.dbms_change_tracker.model.events;
import it.integry.ems.migration._base.IntegryCustomerDB;
import it.integry.event.BaseCustomerDBEvent;
public class TableTrackingResettedEvent extends BaseCustomerDBEvent {
public TableTrackingResettedEvent(Object source, IntegryCustomerDB customerDB) {
super(source, customerDB);
}
}

View File

@@ -28,7 +28,7 @@ public class DevicesRequestInterceptor implements HandlerInterceptor {
RequestDataDTO requestDataDTO = ContextLoader.getCurrentWebApplicationContext().getBean(RequestDataDTO.class);
if (requestDataDTO.isValidProfileDB() && requestDataDTO.isValidDeviceId()) {
deviceService.updateUsage(requestDataDTO.getApplication(), requestDataDTO.getDeviceId());
deviceService.updateUsage(requestDataDTO.getDeviceId());
}
return true;

View File

@@ -5,6 +5,10 @@ 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.http.ContentDisposition;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -28,26 +32,26 @@ public class DownloadController {
private MimeTypesHandler mimetypesFileTypeMap;
@RequestMapping(value = "download/{uuid}/{fileName}", method = RequestMethod.GET)
public byte[] download(HttpServletResponse response,
@PathVariable String uuid,
@PathVariable String fileName) throws Exception {
public ResponseEntity<byte[]> download(@PathVariable String uuid,
@PathVariable String fileName) throws Exception {
byte[] fileContent = downloadFileHandlerService.getDownloadFileContent(uuid);
if (fileContent != null) {
String filename = downloadFileHandlerService.getDownloadFileName(uuid);
String mimeType = Files.probeContentType(Paths.get(fileName));
MediaType mediaType = mimetypesFileTypeMap.getContentType(fileName);
response.setContentType(mimeType);
response.setStatus(HttpServletResponse.SC_OK);
response.addHeader("Content-Disposition", "attachment; filename=\"" + filename + "\"");
response.setContentLength(fileContent.length);
return fileContent;
return ResponseEntity.ok()
.contentType(mediaType)
.contentLength(fileContent.length)
.header(HttpHeaders.CONTENT_DISPOSITION, ContentDisposition
.builder("attachment")
.filename(filename)
.build()
.toString())
.body(fileContent);
}
response.sendError(404, "File non trovato");
return null;
return ResponseEntity.notFound().build();
}
}

View File

@@ -1,30 +0,0 @@
package it.integry.ems.dto;
import java.util.Objects;
public class ArticoloPartitaCommessaDTO extends ArticoloPartitaDTO {
private String codJcom;
@Override
public boolean equals(Object o) {
if (!(o instanceof ArticoloPartitaCommessaDTO)) return false;
if (!super.equals(o)) return false;
ArticoloPartitaCommessaDTO that = (ArticoloPartitaCommessaDTO) o;
return Objects.equals(getCodJcom(), that.getCodJcom());
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), getCodJcom());
}
public String getCodJcom() {
return codJcom;
}
public ArticoloPartitaCommessaDTO setCodJcom(String codJcom) {
this.codJcom = codJcom;
return this;
}
}

View File

@@ -1,5 +1,6 @@
package it.integry.ems.dto;
import java.time.LocalDateTime;
import java.util.Date;
public class ExtendedStbActivity {
@@ -14,11 +15,9 @@ public class ExtendedStbActivity {
private String userCreator;
private String note;
private String activityDescription;
private Date dataInsAct;
private int priorita;
private Date alarmDate;
private Date alarmTime;
private Date oraInsAct;
private LocalDateTime alarmTime;
private LocalDateTime oraInsAct;
private String activityTypeId;
private String parentActivityId;
private StbActivityEmailObject emailObject;
@@ -116,15 +115,6 @@ public class ExtendedStbActivity {
return this;
}
public Date getDataInsAct() {
return dataInsAct;
}
public ExtendedStbActivity setDataInsAct(Date dataInsAct) {
this.dataInsAct = dataInsAct;
return this;
}
public int getPriorita() {
return priorita;
}
@@ -134,29 +124,20 @@ public class ExtendedStbActivity {
return this;
}
public Date getAlarmDate() {
return alarmDate;
}
public ExtendedStbActivity setAlarmDate(Date alarmDate) {
this.alarmDate = alarmDate;
return this;
}
public Date getAlarmTime() {
public LocalDateTime getAlarmTime() {
return alarmTime;
}
public ExtendedStbActivity setAlarmTime(Date alarmTime) {
public ExtendedStbActivity setAlarmTime(LocalDateTime alarmTime) {
this.alarmTime = alarmTime;
return this;
}
public Date getOraInsAct() {
public LocalDateTime getOraInsAct() {
return oraInsAct;
}
public ExtendedStbActivity setOraInsAct(Date oraInsAct) {
public ExtendedStbActivity setOraInsAct(LocalDateTime oraInsAct) {
this.oraInsAct = oraInsAct;
return this;
}

View File

@@ -3,7 +3,7 @@ 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;
import it.integry.ems.settings.Model.AvailableConnectionModel;
import it.integry.ems.settings.Model.SettingsModel;
import it.integry.ems.sync.MultiDBTransaction.Connection;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
@@ -37,8 +37,7 @@ public class DynamicCacheService {
DATI_AZIENDA_KEY,
ENTITY_LOGGER_SETUP,
GRIGLIA_ACQUISTO_KEY,
ENTITY_SYNC_KEY,
STB_GEST_SETUP_KEY
ENTITY_SYNC_KEY
}
public void addItem(Keys key, int invalidateTimeInMins, RunnableWithReturn<Object> refreshAction) {
@@ -51,11 +50,11 @@ public class DynamicCacheService {
List<String> finalDbNames = dbNames.stream().map(String::toLowerCase).collect(Collectors.toList());
RunnableWithReturn<Object> internalRefreshAction = () -> {
Map<String, List<AvailableConnectionsModel>> databases = settingsModel.getAvailableConnections()
Map<String, List<AvailableConnectionModel>> databases = settingsModel.getAvailableConnections()
.stream()
.filter(AvailableConnectionsModel::getInternalDb)
.filter(AvailableConnectionModel::getInternalDb)
.filter(x -> finalDbNames.contains(x.getDbName().toLowerCase()))
.collect(Collectors.groupingBy(AvailableConnectionsModel::getDbName));
.collect(Collectors.groupingBy(AvailableConnectionModel::getDbName));
final HashMap<String, T> cachedDataByDB = new HashMap<>();
@@ -83,11 +82,11 @@ public class DynamicCacheService {
RunnableWithReturn<Object> refreshAction = () -> {
Map<String, List<AvailableConnectionsModel>> databases = settingsModel.getAvailableConnections()
Map<String, List<AvailableConnectionModel>> databases = settingsModel.getAvailableConnections()
.stream()
.filter(AvailableConnectionsModel::getInternalDb)
.filter(AvailableConnectionModel::getInternalDb)
.filter(x -> finalDbNames.contains(x.getDbName().toLowerCase()))
.collect(Collectors.groupingBy(AvailableConnectionsModel::getDbName));
.collect(Collectors.groupingBy(AvailableConnectionModel::getDbName));
final HashMap<String, List<? extends EntityBase>> cachedEntitiesByDB = new HashMap<>();
@@ -138,11 +137,11 @@ public class DynamicCacheService {
RunnableWithReturn<Object> refreshAction = () -> {
Map<String, List<AvailableConnectionsModel>> databases = settingsModel.getAvailableConnections()
Map<String, List<AvailableConnectionModel>> databases = settingsModel.getAvailableConnections()
.stream()
.filter(AvailableConnectionsModel::getInternalDb)
.filter(AvailableConnectionModel::getInternalDb)
.filter(x -> finalDbNames.contains(x.getDbName().toLowerCase()))
.collect(Collectors.groupingBy(AvailableConnectionsModel::getDbName));
.collect(Collectors.groupingBy(AvailableConnectionModel::getDbName));
final HashMap<String, List<?>> cacheQueryByDB = new HashMap<>();

View File

@@ -0,0 +1,325 @@
package it.integry.ems.dynamic_cache;
import it.integry.annotations.PostContextAutowired;
import it.integry.annotations.PostContextConstruct;
import it.integry.ems.dbms_change_tracker.component.DbmsChangeTrackerComponent;
import it.integry.ems.dbms_change_tracker.model.events.TableRecordDeletedEvent;
import it.integry.ems.dbms_change_tracker.model.events.TableRecordInsertedEvent;
import it.integry.ems.dbms_change_tracker.model.events.TableRecordUpdatedEvent;
import it.integry.ems.dbms_change_tracker.model.events.TableTrackingResettedEvent;
import it.integry.ems.dto.EntityHierarchy;
import it.integry.ems.migration._base.IntegryCustomerDB;
import it.integry.ems.sync.MultiDBTransaction.Connection;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
import it.integry.ems.utility.UtilityDebug;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.base.EntityPropertyHolder;
import it.integry.ems_model.entity.*;
import it.integry.ems_model.exception.DataConverterNotFoundException;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityQuery;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@Component
public class EntityCacheComponent implements ApplicationListener {
private final Logger logger = LogManager.getLogger();
private final DbmsChangeTrackerComponent dbmsChangeTrackerComponent;
private final EntityPropertyHolder entityPropertyHolder;
private final HashMap<IntegryCustomerDB, ConcurrentHashMap<String, ConcurrentHashMap<HashMap<String, Object>, EntityBase>>> entityCache = new HashMap<>();
// Lock per IntegryCustomerDB per garantire accessi sincronizzati alla cache di quel customer
private final ConcurrentHashMap<IntegryCustomerDB, Object> cacheLocks = new ConcurrentHashMap<>();
private Object getCacheLock(IntegryCustomerDB customerDB) {
cacheLocks.putIfAbsent(customerDB, new Object());
return cacheLocks.get(customerDB);
}
private final HashMap<String, Class<? extends EntityBase>> enabledEntities = new HashMap<String, Class<? extends EntityBase>>() {{
put(MtbAart.ENTITY, MtbAart.class);
put(MtbAartBarCode.ENTITY, MtbAartBarCode.class);
put(MtbUntMis.ENTITY, MtbUntMis.class);
put(MtbDepo.ENTITY, MtbDepo.class);
put(MtbDepoPosizioni.ENTITY, MtbDepoPosizioni.class);
put(StbEditLimit.ENTITY, StbEditLimit.class);
put(StbGestSetup.ENTITY, StbGestSetup.class);
put(StbGestSetupDepo.ENTITY, StbGestSetupDepo.class);
put(StbUser.ENTITY, StbUser.class);
put(WtbDepo.ENTITY, WtbDepo.class);
put(WtbGestSetupUser.ENTITY, WtbGestSetupUser.class);
put(WtbClie.ENTITY, WtbClie.class);
}};
public EntityCacheComponent(DbmsChangeTrackerComponent dbmsChangeTrackerComponent, EntityPropertyHolder entityPropertyHolder) {
this.dbmsChangeTrackerComponent = dbmsChangeTrackerComponent;
this.entityPropertyHolder = entityPropertyHolder;
}
@PostContextAutowired
private MultiDBTransactionManager multiDBTransactionManager;
@PostContextConstruct
private void init() throws Exception {
if (UtilityDebug.isDebugExecution() || UtilityDebug.isIntegryServer())
return;
for (Connection conn : multiDBTransactionManager.getActiveConnections()) {
IntegryCustomerDB customerDB = IntegryCustomerDB.parse(conn.getDbName());
if (customerDB == null)
throw new RuntimeException("Impossibile inizializzare IntegryCustomerDB per il database: " + conn.getDbName());
for (Map.Entry<String, Class<? extends EntityBase>> enabledEntity : enabledEntities.entrySet()) {
String tableName = enabledEntity.getKey();
refreshCacheForEntity(conn, customerDB, tableName);
}
}
}
private void refreshCacheGlobal(IntegryCustomerDB customerDB) throws Exception {
try (MultiDBTransactionManager mdb = new MultiDBTransactionManager(customerDB)) {
Connection conn = mdb.getPrimaryConnection();
for (Map.Entry<String, Class<? extends EntityBase>> enabledEntity : enabledEntities.entrySet()) {
String tableName = enabledEntity.getKey();
refreshCacheForEntity(conn, customerDB, tableName);
}
}
}
private void refreshCacheForEntity(IntegryCustomerDB customerDB, String tableName) throws Exception {
try (MultiDBTransactionManager mdb = new MultiDBTransactionManager(customerDB)) {
Connection conn = mdb.getPrimaryConnection();
refreshCacheForEntity(conn, customerDB, tableName);
}
}
private void refreshCacheForEntity(Connection connection, IntegryCustomerDB customerDB, String tableName) throws Exception {
// Sincronizziamo l'intera operazione di refresh per il customerDB per evitare accessi concorrenti
synchronized (getCacheLock(customerDB)) {
Class<? extends EntityBase> clazz = enabledEntities.get(tableName);
// if (clazz == null)
// throw new RuntimeException("Entity cache is not enabled for table " + tableName);
entityCache.putIfAbsent(customerDB, new ConcurrentHashMap<>());
entityCache.get(customerDB).remove(tableName);
ConcurrentHashMap<HashMap<String, Object>, EntityBase> entities = retrieveEntityList(connection, tableName, clazz);
entityCache.get(customerDB).put(tableName, entities);
logger.trace(String.format("[%s] Cached %d records for entity %s",
customerDB.getValue(),
entities.size(),
clazz.getSimpleName()));
}
}
public <T extends EntityBase> List<T> getCachedEntitiesList(IntegryCustomerDB customerDB, String tableName, Predicate<T> filterPredicate) {
return getCachedEntitiesStream(customerDB, tableName, filterPredicate)
.collect(Collectors.toList());
}
public <T extends EntityBase> Stream<T> getCachedEntitiesStream(IntegryCustomerDB customerDB, String tableName, Predicate<T> filterPredicate) {
// Per evitare accessi concorrenti leggiamo/snapshottiamo la cache sotto lock per quel customerDB
Stream<T> snapshot;
synchronized (getCacheLock(customerDB)) {
if (!isCacheEnabled(customerDB, tableName)) {
try {
refreshCacheForEntity(customerDB, tableName);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
// prendo un'istantanea degli oggetti clonati per poter lavorare fuori dal lock
snapshot = entityCache.get(customerDB)
.get(tableName)
.values()
.parallelStream()
.map(x -> (T) x.clone());
if (filterPredicate != null)
snapshot = snapshot.filter(filterPredicate);
}
return snapshot;
}
@Override
public void onApplicationEvent(ApplicationEvent event) {
if (event instanceof TableRecordInsertedEvent) {
handleRecordInserted((TableRecordInsertedEvent) event);
} else if (event instanceof TableRecordUpdatedEvent) {
handleRecordUpdated((TableRecordUpdatedEvent) event);
} else if (event instanceof TableRecordDeletedEvent) {
handleRecordDeleted((TableRecordDeletedEvent) event);
} else if (event instanceof TableTrackingResettedEvent) {
try {
handleTableTrackingResetted((TableTrackingResettedEvent) event);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
private void handleRecordInserted(TableRecordInsertedEvent event) {
if (!isCacheEnabled(event.getCustomerDB(), event.getTableName()))
return;
HashMap<String, Object> entityPrimaryKey = convertSqlMapToEntityMap(event.getPrimaryKey(), enabledEntities.get(event.getTableName()));
try (MultiDBTransactionManager mdb = new MultiDBTransactionManager(event.getCustomerDB())) {
EntityBase newItem = retrieveEntityItem(mdb.getPrimaryConnection(), event.getTableName(),
enabledEntities.get(event.getTableName()),
event.getPrimaryKey());
// sincronizziamo la modifica per il customerDB
synchronized (getCacheLock(event.getCustomerDB())) {
entityCache.get(event.getCustomerDB())
.get(event.getTableName())
.put(entityPrimaryKey, newItem);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private void handleRecordUpdated(TableRecordUpdatedEvent event) {
if (!isCacheEnabled(event.getCustomerDB(), event.getTableName()))
return;
HashMap<String, Object> entityPrimaryKey = convertSqlMapToEntityMap(event.getPrimaryKey(), enabledEntities.get(event.getTableName()));
try (MultiDBTransactionManager mdb = new MultiDBTransactionManager(event.getCustomerDB())) {
EntityBase newItem = retrieveEntityItem(mdb.getPrimaryConnection(), event.getTableName(),
enabledEntities.get(event.getTableName()),
event.getPrimaryKey());
// sincronizziamo la modifica per il customerDB
synchronized (getCacheLock(event.getCustomerDB())) {
entityCache.get(event.getCustomerDB())
.get(event.getTableName())
.put(entityPrimaryKey, newItem);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private void handleRecordDeleted(TableRecordDeletedEvent event) {
if (!isCacheEnabled(event.getCustomerDB(), event.getTableName()))
return;
HashMap<String, Object> entityPrimaryKey = convertSqlMapToEntityMap(event.getPrimaryKey(), enabledEntities.get(event.getTableName()));
// sincronizziamo la rimozione per il customerDB
final EntityBase removedItem;
synchronized (getCacheLock(event.getCustomerDB())) {
removedItem = entityCache.get(event.getCustomerDB())
.get(event.getTableName())
.remove(entityPrimaryKey);
}
}
private void handleTableTrackingResetted(TableTrackingResettedEvent event) throws Exception {
// reset e refresh sono eseguiti in modo sincronizzato per quel customer
resetTablesCache(event.getCustomerDB());
refreshCacheGlobal(event.getCustomerDB());
}
private ConcurrentHashMap<HashMap<String, Object>, EntityBase> retrieveEntityList(Connection connection, String tableName, Class<? extends EntityBase> clazz) throws SQLException, DataConverterNotFoundException, InstantiationException, IllegalAccessException {
String sql = "SELECT * FROM " + tableName;
List<? extends EntityBase> objects = UtilityDB.executeSimpleQueryDTO(connection, sql, clazz);
if (objects == null)
objects = new ArrayList<>();
final List<EntityHierarchy.Field> pkFields = entityPropertyHolder.getEntityFields(clazz, EntityHierarchy.Field::isPrimaryKey);
ConcurrentHashMap<HashMap<String, Object>, EntityBase> objectsMap = new ConcurrentHashMap<>();
for (EntityBase object : objects) {
HashMap<String, Object> pkMap = new HashMap<>();
for (EntityHierarchy.Field pkField : pkFields) {
Object pkValue = pkField.getField().get(object);
pkMap.put(pkField.getFieldName(), pkValue);
}
objectsMap.put(pkMap, object);
}
return objectsMap;
}
private EntityBase retrieveEntityItem(Connection connection, String tableName, Class<?> clazz, HashMap<String, Object> primaryKey) throws SQLException, DataConverterNotFoundException, InstantiationException, IllegalAccessException {
String sql = "SELECT * FROM " + tableName + "\n" +
" WHERE " + UtilityQuery.concatFieldsInWhereCond(primaryKey);
final EntityBase object = (EntityBase) UtilityDB.executeSimpleQueryOnlyFirstRowDTO(connection, sql, clazz);
return object;
}
private HashMap<String, Object> convertSqlMapToEntityMap(HashMap<String, Object> sqlMap, Class<? extends EntityBase> clazz) {
HashMap<String, Object> entityMap = new HashMap<>();
for (Map.Entry<String, Object> entry : sqlMap.entrySet()) {
String fieldName = entityPropertyHolder.getEntityFields(clazz, f -> f.isSqlField() && f.getSqlField().value().equals(entry.getKey()))
.stream()
.findFirst()
.map(EntityHierarchy.Field::getFieldName)
.orElse(entry.getKey());
entityMap.put(fieldName, entry.getValue());
}
return entityMap;
}
private void resetTableCache(IntegryCustomerDB customerDB, String tableName) {
synchronized (getCacheLock(customerDB)) {
if (entityCache.containsKey(customerDB) && entityCache.get(customerDB).containsKey(tableName)) {
entityCache.get(customerDB).remove(tableName);
}
}
}
private void resetTablesCache(IntegryCustomerDB customerDB) {
// sincronizziamo la rimozione dell'intera cache per il customer
synchronized (getCacheLock(customerDB)) {
entityCache.remove(customerDB);
}
}
private boolean isCacheEnabled(IntegryCustomerDB customerDB, String tableName) {
return (entityCache.containsKey(customerDB) && entityCache.get(customerDB).containsKey(tableName)) ||
!(UtilityDebug.isDebugExecution() || UtilityDebug.isIntegryServer());
}
}

View File

@@ -1,371 +0,0 @@
package it.integry.ems.entity_logger.db_schema_manager.component;
import it.integry.ems.entity_logger.db_schema_manager.dto.ForeignKeyDependency;
import it.integry.ems.entity_logger.db_schema_manager.dto.ForeignKeyDependencyReport;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
public class SQLServerForeignKeyManager {
private final Logger logger = LogManager.getLogger();
private Connection connection;
private boolean disableForeignKeyChecks;
public SQLServerForeignKeyManager(Connection connection) {
this(connection, false);
}
public SQLServerForeignKeyManager(Connection connection, boolean disableForeignKeyChecks) {
this.connection = connection;
this.disableForeignKeyChecks = disableForeignKeyChecks;
}
/**
* Aggiorna una foreign key e tutte le sue dipendenze in un'unica transazione
*
* @param tableName Nome della tabella principale
* @param columnName Nome della colonna che contiene la chiave primaria
* @param oldValue Valore attuale della chiave
* @param newValue Nuovo valore della chiave
* @return true se l'operazione è completata con successo
* @throws SQLException in caso di errore
*/
public <T> boolean updateForeignKeyWithDependencies(String tableName, String columnName,
T oldValue, T newValue) throws SQLException {
boolean originalAutoCommit = connection.getAutoCommit();
List<String> disabledConstraints = new ArrayList<>();
try {
// Disabilita auto-commit per gestire la transazione manualmente
connection.setAutoCommit(false);
logger.info(String.format("Inizio aggiornamento FK: %s.%s da %s a %s",
tableName, columnName, oldValue, newValue));
// 1. Disabilita i vincoli foreign key se richiesto
if (disableForeignKeyChecks) {
disabledConstraints = disableForeignKeyConstraints(tableName, columnName);
logger.info(String.format("Disabilitati %d vincoli foreign key", disabledConstraints.size()));
}
// 2. Trova tutte le dipendenze
List<ForeignKeyDependency> dependencies = findAllDependencies(tableName, columnName);
logger.info(String.format("Trovate %d dipendenze da aggiornare", dependencies.size()));
if (disableForeignKeyChecks) {
// Se i vincoli sono disabilitati, possiamo aggiornare in qualsiasi ordine
// Aggiorniamo prima la tabella principale per semplicità
updateMainTable(tableName, columnName, oldValue, newValue);
// Poi aggiorniamo tutte le tabelle dipendenti
for (ForeignKeyDependency dependency : dependencies) {
updateDependentTable(dependency, oldValue, newValue);
}
} else {
// Ordine normale: prima le dipendenti, poi la principale
for (ForeignKeyDependency dependency : dependencies) {
updateDependentTable(dependency, oldValue, newValue);
}
updateMainTable(tableName, columnName, oldValue, newValue);
}
// 3. Riabilita i vincoli foreign key se erano stati disabilitati
if (disableForeignKeyChecks && !disabledConstraints.isEmpty()) {
enableForeignKeyConstraints(disabledConstraints);
logger.info("Vincoli foreign key riabilitati");
// 4. Verifica l'integrità dei dati dopo aver riabilitato i vincoli
if (!checkConstraintIntegrity(disabledConstraints)) {
throw new SQLException("Violazione dell'integrità referenziale dopo l'aggiornamento");
}
}
// Commit della transazione
connection.commit();
logger.info("Aggiornamento completato con successo");
return true;
} catch (SQLException e) {
// Rollback in caso di errore
try {
connection.rollback();
logger.error("Errore durante l'aggiornamento, rollback eseguito: " + e.getMessage(), e);
// Se i vincoli erano stati disabilitati, prova a riabilitarli anche dopo il rollback
if (disableForeignKeyChecks && !disabledConstraints.isEmpty()) {
try {
enableForeignKeyConstraints(disabledConstraints);
logger.info("Vincoli foreign key riabilitati dopo rollback");
} catch (SQLException enableEx) {
logger.error("ATTENZIONE: Impossibile riabilitare i vincoli dopo rollback: " + enableEx.getMessage(), enableEx);
}
}
} catch (SQLException rollbackEx) {
logger.error("Errore durante il rollback: " + rollbackEx.getMessage(), rollbackEx);
}
throw e;
} finally {
// Ripristina l'auto-commit originale
connection.setAutoCommit(originalAutoCommit);
}
}
/**
* Disabilita tutti i vincoli foreign key che referenziano la tabella/colonna specificata
*/
private List<String> disableForeignKeyConstraints(String tableName, String columnName) throws SQLException {
List<String> disabledConstraints = new ArrayList<>();
List<ForeignKeyDependency> dependencies = findAllDependencies(tableName, columnName);
for (ForeignKeyDependency dependency : dependencies) {
String disableQuery = String.format(
"ALTER TABLE [%s].[%s] NOCHECK CONSTRAINT [%s]",
dependency.getDependentSchema(),
dependency.getDependentTable(),
dependency.getConstraintName()
);
try (Statement stmt = connection.createStatement()) {
stmt.execute(disableQuery);
disabledConstraints.add(String.format("%s.%s.%s",
dependency.getDependentSchema(),
dependency.getDependentTable(),
dependency.getConstraintName()));
logger.trace(String.format("Disabilitato vincolo: %s", dependency.getConstraintName()));
}
}
return disabledConstraints;
}
/**
* Riabilita i vincoli foreign key precedentemente disabilitati
*/
private void enableForeignKeyConstraints(List<String> constraintIdentifiers) throws SQLException {
for (String constraintId : constraintIdentifiers) {
String[] parts = constraintId.split("\\.");
if (parts.length != 3) {
logger.warn("Formato constraint identifier non valido: " + constraintId);
continue;
}
String schema = parts[0];
String table = parts[1];
String constraint = parts[2];
String enableQuery = String.format(
"ALTER TABLE [%s].[%s] CHECK CONSTRAINT [%s]",
schema, table, constraint
);
try (Statement stmt = connection.createStatement()) {
stmt.execute(enableQuery);
logger.trace(String.format("Riabilitato vincolo: %s", constraint));
}
}
}
/**
* Verifica l'integrità dei vincoli dopo averli riabilitati
*/
private boolean checkConstraintIntegrity(List<String> constraintIdentifiers) throws SQLException {
boolean allValid = true;
for (String constraintId : constraintIdentifiers) {
String[] parts = constraintId.split("\\.");
if (parts.length != 3) continue;
String schema = parts[0];
String table = parts[1];
String constraint = parts[2];
// Verifica se ci sono violazioni del vincolo
String checkQuery = String.format("SELECT COUNT(*) as violations\n" +
" FROM [%s].[%s] child\n" +
" LEFT JOIN (\n" +
" SELECT fkc.referenced_object_id, fkc.referenced_column_id,\n" +
" fkc.parent_object_id, fkc.parent_column_id\n" +
" FROM sys.foreign_key_columns fkc\n" +
" INNER JOIN sys.foreign_keys fk ON fkc.constraint_object_id = fk.object_id\n" +
" WHERE fk.name = '%s'\n" +
" ) fk_info ON 1=1\n" +
" LEFT JOIN sys.tables ref_table ON fk_info.referenced_object_id = ref_table.object_id\n" +
" LEFT JOIN sys.schemas ref_schema ON ref_table.schema_id = ref_schema.schema_id\n" +
" WHERE child.[%s] IS NOT NULL\n" +
" AND NOT EXISTS (\n" +
" SELECT 1 FROM [%s].[%s] parent\n" +
" WHERE parent.[%s] = child.[%s]\n" +
" )", schema, table, constraint,
"temp_col", // Questo dovrebbe essere sostituito con la colonna effettiva
"temp_schema", "temp_table", "temp_parent_col", "temp_col");
// Query semplificata per il check di integrità
String simpleCheckQuery = String.format(
"DBCC CHECKCONSTRAINTS('[%s].[%s].[%s]') WITH ALL_CONSTRAINTS",
schema, table, constraint
);
try (Statement stmt = connection.createStatement()) {
try (ResultSet rs = stmt.executeQuery("SELECT 1")) {
// Se la query non solleva eccezioni, il vincolo è valido
logger.trace(String.format("Vincolo %s superato controllo integrità", constraint));
} catch (SQLException e) {
logger.warn(String.format("Violazione integrità per vincolo %s: %s", constraint, e.getMessage()));
allValid = false;
}
}
}
return allValid;
}
/**
* Trova tutte le dipendenze foreign key di una tabella/colonna
*/
private List<ForeignKeyDependency> findAllDependencies(String tableName, String columnName) throws SQLException {
List<ForeignKeyDependency> dependencies = new ArrayList<>();
String query = "SELECT \n" +
" fk.name AS constraint_name,\n" +
" OBJECT_SCHEMA_NAME(fk.parent_object_id) AS dependent_schema,\n" +
" OBJECT_NAME(fk.parent_object_id) AS dependent_table,\n" +
" COL_NAME(fkc.parent_object_id, fkc.parent_column_id) AS dependent_column,\n" +
" OBJECT_SCHEMA_NAME(fk.referenced_object_id) AS referenced_schema,\n" +
" OBJECT_NAME(fk.referenced_object_id) AS referenced_table,\n" +
" COL_NAME(fkc.referenced_object_id, fkc.referenced_column_id) AS referenced_column\n" +
" FROM sys.foreign_keys fk\n" +
" INNER JOIN sys.foreign_key_columns fkc ON fk.object_id = fkc.constraint_object_id\n" +
" WHERE OBJECT_NAME(fk.referenced_object_id) = ?\n" +
" AND COL_NAME(fkc.referenced_object_id, fkc.referenced_column_id) = ?\n" +
" ORDER BY dependent_table";
try (PreparedStatement stmt = connection.prepareStatement(query)) {
stmt.setString(1, tableName);
stmt.setString(2, columnName);
try (ResultSet rs = stmt.executeQuery()) {
while (rs.next()) {
ForeignKeyDependency dependency = new ForeignKeyDependency(
rs.getString("constraint_name"),
rs.getString("dependent_schema"),
rs.getString("dependent_table"),
rs.getString("dependent_column"),
rs.getString("referenced_schema"),
rs.getString("referenced_table"),
rs.getString("referenced_column")
);
dependencies.add(dependency);
}
}
}
return dependencies;
}
/**
* Aggiorna una tabella dipendente
*/
private void updateDependentTable(ForeignKeyDependency dependency, Object oldValue, Object newValue) throws SQLException {
String updateQuery = String.format(
"UPDATE [%s].[%s] SET [%s] = ? WHERE [%s] = ?",
dependency.getDependentSchema(),
dependency.getDependentTable(),
dependency.getDependentColumn(),
dependency.getDependentColumn()
);
try (PreparedStatement stmt = connection.prepareStatement(updateQuery)) {
stmt.setObject(1, newValue);
stmt.setObject(2, oldValue);
int rowsAffected = stmt.executeUpdate();
logger.info(String.format("Aggiornate %d righe in %s.%s",
rowsAffected, dependency.getDependentTable(), dependency.getDependentColumn()));
}
}
/**
* Aggiorna la tabella principale
*/
private void updateMainTable(String tableName, String columnName, Object oldValue, Object newValue) throws SQLException {
String updateQuery = String.format("UPDATE [%s] SET [%s] = ? WHERE [%s] = ?",
tableName, columnName, columnName);
try (PreparedStatement stmt = connection.prepareStatement(updateQuery)) {
stmt.setObject(1, newValue);
stmt.setObject(2, oldValue);
int rowsAffected = stmt.executeUpdate();
logger.info(String.format("Aggiornate %d righe nella tabella principale %s.%s",
rowsAffected, tableName, columnName));
}
}
/**
* Verifica se un valore esiste già come chiave primaria
*/
public boolean checkIfValueExists(String tableName, String columnName, Object value) throws SQLException {
String query = String.format("SELECT COUNT(*) FROM [%s] WHERE [%s] = ?", tableName, columnName);
try (PreparedStatement stmt = connection.prepareStatement(query)) {
stmt.setObject(1, value);
try (ResultSet rs = stmt.executeQuery()) {
if (rs.next()) {
return rs.getInt(1) > 0;
}
}
}
return false;
}
/**
* Ottiene un rapporto dettagliato delle dipendenze prima dell'aggiornamento
*/
public ForeignKeyDependencyReport getDependencyReport(String tableName, String columnName, Object value) throws SQLException {
List<ForeignKeyDependency> dependencies = findAllDependencies(tableName, columnName);
ForeignKeyDependencyReport report = new ForeignKeyDependencyReport();
for (ForeignKeyDependency dependency : dependencies) {
int count = countDependentRecords(dependency, value);
report.addDependency(dependency, count);
}
return report;
}
private int countDependentRecords(ForeignKeyDependency dependency, Object value) throws SQLException {
String countQuery = String.format(
"SELECT COUNT(*) FROM [%s].[%s] WHERE [%s] = ?",
dependency.getDependentSchema(),
dependency.getDependentTable(),
dependency.getDependentColumn()
);
try (PreparedStatement stmt = connection.prepareStatement(countQuery)) {
stmt.setObject(1, value);
try (ResultSet rs = stmt.executeQuery()) {
return rs.next() ? rs.getInt(1) : 0;
}
}
}
// Setter per modificare il comportamento sui vincoli FK
public void setDisableForeignKeyChecks(boolean disableForeignKeyChecks) {
this.disableForeignKeyChecks = disableForeignKeyChecks;
}
public boolean isDisableForeignKeyChecks() {
return disableForeignKeyChecks;
}
}

View File

@@ -1,40 +0,0 @@
package it.integry.ems.entity_logger.db_schema_manager.dto;
public class ForeignKeyDependency {
private final String constraintName;
private final String dependentSchema;
private final String dependentTable;
private final String dependentColumn;
private final String referencedSchema;
private final String referencedTable;
private final String referencedColumn;
public ForeignKeyDependency(String constraintName, String dependentSchema,
String dependentTable, String dependentColumn,
String referencedSchema, String referencedTable,
String referencedColumn) {
this.constraintName = constraintName;
this.dependentSchema = dependentSchema;
this.dependentTable = dependentTable;
this.dependentColumn = dependentColumn;
this.referencedSchema = referencedSchema;
this.referencedTable = referencedTable;
this.referencedColumn = referencedColumn;
}
// Getter methods
public String getConstraintName() { return constraintName; }
public String getDependentSchema() { return dependentSchema; }
public String getDependentTable() { return dependentTable; }
public String getDependentColumn() { return dependentColumn; }
public String getReferencedSchema() { return referencedSchema; }
public String getReferencedTable() { return referencedTable; }
public String getReferencedColumn() { return referencedColumn; }
@Override
public String toString() {
return String.format("%s.%s.%s -> %s.%s.%s",
dependentSchema, dependentTable, dependentColumn,
referencedSchema, referencedTable, referencedColumn);
}
}

View File

@@ -1,37 +0,0 @@
package it.integry.ems.entity_logger.db_schema_manager.dto;
import java.util.HashMap;
import java.util.Map;
public class ForeignKeyDependencyReport {
private final Map<ForeignKeyDependency, Integer> dependencyCount = new HashMap<>();
public void addDependency(ForeignKeyDependency dependency, int count) {
dependencyCount.put(dependency, count);
}
public Map<ForeignKeyDependency, Integer> getDependencies() {
return new HashMap<>(dependencyCount);
}
public int getTotalRecordsAffected() {
return dependencyCount.values().stream().mapToInt(Integer::intValue).sum();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("=== RAPPORTO DIPENDENZE ===\n");
for (Map.Entry<ForeignKeyDependency, Integer> entry : dependencyCount.entrySet()) {
sb.append(String.format("Tabella: %s.%s, Colonna: %s, Record da aggiornare: %d\n",
entry.getKey().getDependentSchema(),
entry.getKey().getDependentTable(),
entry.getKey().getDependentColumn(),
entry.getValue()));
}
sb.append(String.format("TOTALE RECORD DA AGGIORNARE: %d\n", getTotalRecordsAffected()));
return sb.toString();
}
}

View File

@@ -6,7 +6,7 @@ import it.integry.annotations.PostContextConstruct;
import it.integry.ems.entity_logger.db_schema_manager.component.SQLServerDBSchemaManager;
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.AvailableConnectionModel;
import it.integry.ems.settings.Model.SettingsModel;
import it.integry.ems.settings.SettingsController;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
@@ -57,7 +57,7 @@ public class EntityLoggerComponent {
private void syncDBScheme() throws Exception {
AvailableConnectionsModel connectionsModel = settingsModel.getDefaultConnectionModel();
AvailableConnectionModel connectionsModel = settingsModel.getDefaultConnectionModel();
if (connectionsModel == null) {
throw new Exception("Impossibile ricavare la default connection");
@@ -107,7 +107,7 @@ public class EntityLoggerComponent {
}
if (settingsModel.getAvailableConnections().stream().noneMatch(x -> x.getDbName().equalsIgnoreCase(destDBName))) {
settingsModel.addAvailableConnection(new AvailableConnectionsModel()
settingsModel.addAvailableConnection(new AvailableConnectionModel()
.setInternalDb(false)
.setHost(dbHost)
.setUsername(dbUsername)
@@ -210,12 +210,12 @@ public class EntityLoggerComponent {
return;
try {
List<AvailableConnectionsModel> connectionsModels = settingsModel.getAvailableConnectionsWithoutDuplicatedProfiles(true);
List<AvailableConnectionModel> connectionsModels = settingsModel.getAvailableConnectionsWithoutDuplicatedProfiles(true);
String historyProfileDB = settingsController.getHistoryProfileDb();
try (MultiDBTransactionManager historyMultiDB = new MultiDBTransactionManager(historyProfileDB)) {
for (AvailableConnectionsModel sourceConnectionModel : connectionsModels) {
for (AvailableConnectionModel sourceConnectionModel : connectionsModels) {
String sql = "SELECT * FROM stb_log_entity_setup" +
" WHERE entity_name <> " + UtilityDB.valueToString(StbLogEntitySetup.ENTITY);

View File

@@ -0,0 +1,7 @@
package it.integry.ems.exception;
public class InvalidCustomerDbException extends RuntimeException {
public InvalidCustomerDbException(String dbName) {
super("Invalid customer database name: " + dbName + ". Please check your ems_settings.json");
}
}

View File

@@ -0,0 +1,7 @@
package it.integry.ems.exception;
public class InvalidDbNameException extends RuntimeException {
public InvalidDbNameException(String dbName) {
super("Invalid database name: " + dbName + ". Please check your ems_settings.json");
}
}

View File

@@ -0,0 +1,7 @@
package it.integry.ems.exception;
public class InvalidProfileDbException extends RuntimeException {
public InvalidProfileDbException(String profileDb) {
super("Invalid profile db: " + profileDb + ". Please check your ems_settings.json");
}
}

View File

@@ -2,6 +2,7 @@ package it.integry.ems.file_formatter.txt;
import com.annimon.stream.Stream;
import it.integry.ems_model.annotation.DtoField;
import it.integry.ems_model.utility.UtilityLocalDate;
import it.integry.ems_model.utility.UtilityString;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -10,6 +11,7 @@ import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@@ -76,8 +78,16 @@ public class TxtMapper<T> {
if (ignorePosition)
stringBuilder.append(value).append(fieldsSplitChar);
else
else {
if ( stringBuilder.length() > 0 && stringBuilder.length() < dtoField.startPosition() ) {
int numChar = dtoField.startPosition() - stringBuilder.length();
for (int i = 0; i < numChar; i++) {
stringBuilder.append(fieldsSplitChar);
}
}
stringBuilder.insert(dtoField.startPosition(), value).append(fieldsSplitChar);
}
} catch (Exception e) {
logger.error(e);
@@ -208,6 +218,8 @@ public class TxtMapper<T> {
if (value != null) {
if (!UtilityString.isNullOrEmpty(dtoField.format()) && value instanceof Date) {
value = new SimpleDateFormat(dtoField.format()).format(value);
} else if (!UtilityString.isNullOrEmpty(dtoField.format()) && value instanceof LocalDate) {
value = UtilityLocalDate.formatDate((LocalDate) value, dtoField.format() );
} else if (!UtilityString.isNullOrEmpty(dtoField.formula()) && value instanceof BigDecimal) {
value = ((BigDecimal) value).setScale(dtoField.scale(), RoundingMode.HALF_DOWN);
String formula = dtoField.formula().replaceAll("this", value.toString());

View File

@@ -2,8 +2,11 @@ package it.integry.ems.javabeans;
import com.fasterxml.jackson.annotation.JsonInclude;
import it.integry.common.var.CommonConstants;
import it.integry.ems._context.ApplicationContextProvider;
import it.integry.ems.json.ResponseJSONObjectMapper;
import it.integry.ems.migration._base.IntegryCustomerDB;
import it.integry.ems.model.IntegryApplicationEnum;
import it.integry.ems.settings.Model.SettingsModel;
import it.integry.ems.user.dto.UserDTO;
import it.integry.ems_model.config.EmsRestConstants;
import it.integry.ems_model.utility.UtilityString;
@@ -37,12 +40,16 @@ public class RequestDataDTO {
private String requestClientIP;
private String profileDB;
//Indica il codice deposito reale dell'utente che effettua la richiesta, ovvero la posizione fisica dell'utente
private String codMdep;
private Long deviceId;
private String username;
private String password;
private boolean includeNulls = false;
private IntegryApplicationEnum integryApplication = IntegryApplicationEnum.PVM;
private IntegryApplicationEnum integryApplication;
private UserDTO userDTO;
@@ -55,6 +62,10 @@ public class RequestDataDTO {
profileDB = request.getHeader(CommonConstants.PROFILE_DB);
}
if (request != null && request.getHeader(CommonConstants.COD_MDEP) != null) {
codMdep = request.getHeader(CommonConstants.COD_MDEP);
}
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (authentication != null && !(authentication instanceof AnonymousAuthenticationToken)) {
readAuthenticationClaims(authentication);
@@ -98,10 +109,20 @@ public class RequestDataDTO {
.setPassword("sql");
}
public static RequestDataDTO scheduledOperationsMockupData() {
return new RequestDataDTO()
.setUsername("INTEGRY")
.setPassword("INTEGRY");
}
public boolean isValidProfileDB() {
return !UtilityString.isNullOrEmpty(profileDB);
}
public boolean isValidCodMdep() {
return !UtilityString.isNullOrEmpty(codMdep);
}
public boolean isValidDeviceId() {
return deviceId != null;
}
@@ -132,6 +153,20 @@ public class RequestDataDTO {
return profileDB;
}
public String getCodMdep() {
return codMdep;
}
public IntegryCustomerDB getCustomerDB() {
if (UtilityString.isNullOrEmpty(profileDB))
return null;
final SettingsModel settingsModel = ApplicationContextProvider.getApplicationContext().getBean(SettingsModel.class);
final String dbName = settingsModel.getDbNameFromProfileDb(profileDB);
return IntegryCustomerDB.parse(dbName);
}
public Long getDeviceId() {
return deviceId;
}

View File

@@ -33,6 +33,7 @@ public class JsonObjectMapperConfig {
module.addDeserializer(BigDecimal.class, new BigDecimalDeserialize());
module.addDeserializer(Integer.class, new IntegerDeserializer());
module.addDeserializer(Long.class, new LongDeserializer());
module.addDeserializer(String.class, new StringUnicodeDeserialize());

View File

@@ -1,7 +1,8 @@
package it.integry.ems.license;
import it.integry.common.var.CommonConstants;
import it.integry.ems.javabeans.RequestDataDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import javax.servlet.http.HttpServletRequest;
@@ -11,7 +12,6 @@ import java.util.Random;
public class LicenseCheckInterceptor extends HandlerInterceptorAdapter {
@Autowired
private LicenseComponent licenseComponent;
@@ -19,13 +19,9 @@ public class LicenseCheckInterceptor extends HandlerInterceptorAdapter {
HttpServletRequest request,
HttpServletResponse response, Object handler) {
RequestDataDTO requestData = ContextLoader.getCurrentWebApplicationContext().getBean(RequestDataDTO.class);
String profileDB = null;
if (request != null && request.getQueryString() != null && request.getQueryString().contains(CommonConstants.PROFILE_DB)) {
profileDB = request.getParameter(CommonConstants.PROFILE_DB);
} else if (request != null && request.getHeader(CommonConstants.PROFILE_DB) != null) {
profileDB = request.getHeader(CommonConstants.PROFILE_DB);
}
String profileDB = requestData.getProfileDB();
LicenseStatusDTO licenseStatusDTO = null;
if (profileDB != null) licenseStatusDTO = licenseComponent.getLicenseStatus(profileDB);

View File

@@ -8,7 +8,7 @@ import it.integry.ems.json.ResponseJSONObjectMapper;
import it.integry.ems.response.EsitoType;
import it.integry.ems.response.ServiceRestResponse;
import it.integry.ems.service.HttpRestWrapper;
import it.integry.ems.settings.Model.AvailableConnectionsModel;
import it.integry.ems.settings.Model.AvailableConnectionModel;
import it.integry.ems.settings.Model.SettingsModel;
import it.integry.ems.sync.MultiDBTransaction.Connection;
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
@@ -25,6 +25,7 @@ import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
@Component
@@ -59,11 +60,11 @@ public class LicenseComponent {
if (!canStart)
return;
List<AvailableConnectionsModel> availableConnectionsModels = settingsModel.getAvailableConnections(true);
List<AvailableConnectionModel> availableConnectionModels = settingsModel.getAvailableConnections(true);
try (MultiDBTransactionManager multiDBTransactionManager = new MultiDBTransactionManager()) {
for (AvailableConnectionsModel model : availableConnectionsModels) {
for (AvailableConnectionModel model : availableConnectionModels) {
multiDBTransactionManager.addConnection(model);
}
@@ -105,14 +106,19 @@ public class LicenseComponent {
} else {
List<LicenseStatusDTO> licenses = response.getDTO(new TypeReference<List<LicenseStatusDTO>>() {
});
if (licenses == null) return;
if (licenses == null || licenses.isEmpty()) return;
listAziende.forEach((key, value) -> {
cachedLicenseStatus.remove(key);
licenses.stream().filter(x -> x.getPartIva().equalsIgnoreCase(value))
.findFirst()
.ifPresent(license -> cachedLicenseStatus.put(key, license));
final Optional<LicenseStatusDTO> licenseSearch = licenses.stream().filter(x -> x.getPartIva().equalsIgnoreCase(value))
.findFirst();
if (licenseSearch.isPresent()) {
cachedLicenseStatus.put(key, licenseSearch.get());
} else {
cachedLicenseStatus.put(key, licenses.get(0));
}
});
}

View File

@@ -10,10 +10,13 @@ import java.util.Date;
public class LicenseStatusDTO {
@SqlField("part_iva")
private String partIva;
@SqlField("classe_merito")
private Quality quality;
@SqlField
private Status status;
@SqlField("data_scad_license")
private Date expiringDate;

View File

@@ -11,7 +11,7 @@ import java.util.ArrayList;
import java.util.Random;
@Component
public class LooperService {
public class LooperService {
private final ArrayList<LoopDTO> mLoopsHandler = new ArrayList<>();
private final ArrayList<TaskModel> mLoopsTask = new ArrayList<>();

View File

@@ -17,10 +17,12 @@ 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.types.TypeDbObject;
import it.integry.ems_model.utility.Query;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityString;
import it.integry.ems_model.utility.dto.IndexTableDTO;
import it.integry.ems_model.utility.dto.PkTableDTO;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.web.context.ContextLoader;
@@ -74,6 +76,18 @@ public abstract class BaseMigration implements MigrationModelInterface {
return UtilityDB.executeSimpleQueryDTO(connection, sql, clazz);
}
protected @NotNull <T> List<T> executeQueryOnlyFirstColumn(String sql) throws SQLException {
return UtilityDB.executeSimpleQueryOnlyFirstColumn(connection, sql);
}
protected @NotNull HashMap<String, Object> executeQueryOnlyFirstRow(String sql) throws SQLException {
return UtilityDB.executeSimpleQueryOnlyFirstRow(connection, sql);
}
protected @NotNull <T> T executeQueryOnlyFirstRowFirstColumn(String sql) throws SQLException {
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
}
protected void executeStatement(String... sqls) throws SQLException {
executeStatement(connection, sqls);
}
@@ -140,6 +154,10 @@ public abstract class BaseMigration implements MigrationModelInterface {
}
private void alterObject(SqlObjectTypeEnum sqlObject, String objectName, String sql) throws SQLException, IOException {
if (UtilityString.isNullOrEmpty(objectName)) {
throw new IllegalArgumentException("ObjectName in createOrUpdateFunction(), createOrUpdateView(), createOrUpdateTrigger(), createOrUpdateProcedure() cannot be null or empty");
}
executeStatement("IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id('" + objectName + "'))\r\n" +
"\tDROP " + sqlObject.toString() + " " + objectName,
sql);
@@ -154,7 +172,20 @@ public abstract class BaseMigration implements MigrationModelInterface {
UtilityDB.createIndex(connection, indexTableDTO);
}
protected void dropIndex(String tableName, String indexName) throws Exception {
protected void createPrimaryKey(PkTableDTO pkTableDTO) throws Exception {
UtilityDB.createPK(connection, pkTableDTO);
}
protected void cloneTable(String sourceTable, String newTable, boolean fillNewTable, boolean dropOldTable, boolean renameNewTable) throws Exception {
UtilityDB.cloneTable(connection, sourceTable, newTable, fillNewTable, dropOldTable, renameNewTable);
}
protected boolean existIndex(String tableName, String indexName) throws SQLException {
return UtilityDB.existIndex(connection, tableName, indexName);
}
protected void dropIndex(String tableName, String indexName) throws SQLException {
UtilityDB.dropIndex(connection, tableName, indexName);
}
@@ -392,6 +423,25 @@ public abstract class BaseMigration implements MigrationModelInterface {
}
}
protected String getSetupValue(String gestName, String section, String keySection) throws SQLException {
String sql = Query.format("SELECT value FROM " + StbGestSetup.ENTITY +
" WHERE gest_name = %s AND" +
" section = %s AND" +
" key_section = %s", gestName, section, keySection);
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, sql);
}
//Create a getStbGestSetup method to return the entire StbGestSetup object
protected StbGestSetup getStbGestSetup(String gestName, String section, String keySection) throws SQLException, DataConverterNotFoundException, InstantiationException, IllegalAccessException {
String sql = Query.format("SELECT * FROM stb_gest_setup " +
" WHERE gest_name = %s AND" +
" section = %s AND" +
" key_section = %s", gestName, section, keySection);
return UtilityDB.executeSimpleQueryOnlyFirstRowDTO(connection, sql, StbGestSetup.class);
}
protected void deleteSetup(String gestName, String section, String keySection) throws Exception {
StbGestSetup stbGestSetup = new StbGestSetup()
.setGestName(gestName)
@@ -474,6 +524,16 @@ public abstract class BaseMigration implements MigrationModelInterface {
stbGestSetup.manageWithParentConnection(connection);
}
protected void dropSetup(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);
}
protected void addAutomatedOperation(BaseScheduledOperationDTO operation) {
new Thread(() -> {
try {
@@ -594,4 +654,38 @@ public abstract class BaseMigration implements MigrationModelInterface {
protected boolean isSqlServer2022() throws Exception {
return getSqlCompatibilityLevel() == DatabaseVersionEnum.SQLServer2022;
}
protected void addDescriptionTable(String tableName, String description) throws SQLException {
if (existsTable(tableName)) {
addDescriptionObject(tableName, TypeDbObject.TABLE, description);
}
}
protected void addDescriptionView(String viewName, String description) throws SQLException {
if (existsView(viewName)) {
addDescriptionObject(viewName, TypeDbObject.VIEW, description);
}
}
private void addDescriptionObject(String objectName, TypeDbObject type, String description) throws SQLException {
String typeString = "TABLE";
if (type == TypeDbObject.VIEW) {
typeString = "VIEW";
}
executeStatement(
Query.format("EXEC sp_addextendedproperty " +
"@name = N'MS_Description', " +
"@value = %s, " +
"@level0type = N'SCHEMA', @level0name = 'dbo', " +
"@level1type = %s, @level1name = %s;", description, typeString, objectName));
}
private void addDescriptionColumn(String tableName, String columnName, String description) throws SQLException {
executeStatement(Query.format("EXEC sp_addextendedproperty 'MS_Description', %s, 'SCHEMA', 'dbo', 'TABLE',%s, 'COLUMN', %s)",
description, tableName, columnName));
}
}

View File

@@ -8,7 +8,7 @@ public enum IntegryCustomer {
IntegryCustomerDB.Agricoper_IlVisone,
IntegryCustomerDB.Agricoper_Luva),
ATI(IntegryCustomerDB.ATI_Finpart),
ATI(IntegryCustomerDB.ATI, IntegryCustomerDB.ATI_Finpart),
Auricchio(IntegryCustomerDB.Auricchio_Auricchio,
IntegryCustomerDB.Auricchio_AuricchioMiki,
IntegryCustomerDB.Auricchio_AuricchioSrl,
@@ -20,6 +20,7 @@ public enum IntegryCustomer {
Biolevante(IntegryCustomerDB.Biolevante_Biolevante,
IntegryCustomerDB.Biolevante_BiolevanteStorico,
IntegryCustomerDB.Biolevante_TenutaSanMartino),
CapelliMonelli(IntegryCustomerDB.CapelliMonelli_CapelliMonelli),
Carelli(IntegryCustomerDB.Carelli_Carelli,
IntegryCustomerDB.Carelli_GestFood,
IntegryCustomerDB.Carelli_Chiuso,
@@ -70,7 +71,8 @@ public enum IntegryCustomer {
Gramm(IntegryCustomerDB.Gramm_Gramm,
IntegryCustomerDB.Gramm_PrimeOlive,
IntegryCustomerDB.Gramm_ProveStage,
IntegryCustomerDB.Gramm_2MHolding),
IntegryCustomerDB.Gramm_2MHolding,
IntegryCustomerDB.Gramm_GrammUsa),
Idrotecnica(IntegryCustomerDB.Idrotecnica_Idrotecnica),
Igood(IntegryCustomerDB.Igood_Aida,
IntegryCustomerDB.Igood_Igood,
@@ -117,7 +119,10 @@ public enum IntegryCustomer {
IntegryCustomerDB.Suit_TenutaArianna,
IntegryCustomerDB.Suit_Valpietro),
Tempesta(IntegryCustomerDB.Tempesta_Tempesta,
IntegryCustomerDB.Tempesta_VivaiTempesta),
IntegryCustomerDB.Tempesta_DI,
IntegryCustomerDB.Tempesta_VivaiTempesta,
IntegryCustomerDB.Tempesta_VivaiTempesta_DI
),
Tosca(IntegryCustomerDB.Tosca_Ba,
IntegryCustomerDB.Tosca_Ce,
IntegryCustomerDB.Tosca_Cz,

View File

@@ -1,5 +1,6 @@
package it.integry.ems.migration._base;
import it.integry.ems.exception.InvalidCustomerDbException;
import it.integry.ems_model.utility.UtilityString;
import java.util.Arrays;
@@ -9,7 +10,9 @@ public enum IntegryCustomerDB {
Agricoper_IlVisone("ilvisone"),
Agricoper_Luva("luva"),
ATI("atisrl"),
ATI_Finpart("Finpart"),
Auricchio_Auricchio("auricchio"),
Auricchio_AuricchioMiki("auricchio_miki"),
Auricchio_AuricchioSrl("auricchiosrl"),
@@ -24,12 +27,14 @@ public enum IntegryCustomerDB {
Biolevante_BiolevanteStorico("biolevante_storico"),
Biolevante_TenutaSanMartino("tenutasanmartino"),
CapelliMonelli_CapelliMonelli("capelli_monelli"),
Carelli_Carelli("carelli"),
Carelli_GestFood("gestfood"),
Carelli_Chiuso("chiuso"),
Carelli_Format("format"),
Carelli_Murgia("murgia"),
Carelli_MurgiaTest("murgia_test"),
Carelli_Panimal("panimal"),
Carelli_Winact("winact"),
Carelli_Csgr("csgr"),
@@ -88,10 +93,11 @@ public enum IntegryCustomerDB {
Frudis_Frudis("frudis"),
Gramm_Gramm("gramm_peppe"),
Gramm_Gramm("gramm"),
Gramm_PrimeOlive("primeolive"),
Gramm_ProveStage("grammprovestage"),
Gramm_2MHolding("2M_HOLDING"),
Gramm_2MHolding("dueemme"),
Gramm_GrammUsa("gramm_usa"),
Idrotecnica_Idrotecnica("idrotecnica"),
@@ -102,7 +108,7 @@ public enum IntegryCustomerDB {
Igood_ShopService("shop_service"),
Ime_ImeTe("ime_te_peppe"),
Ime_ImeTe("ime_te"),
Integry_Studioml("studioml"),
@@ -122,6 +128,7 @@ public enum IntegryCustomerDB {
Levanplast_Perilflor("perilflor"),
Levanplast_PerilflorSrl("perilflorsrl"),
Levanplast_Levanplast("levanplast"),
Levanplast_Levanplastsrl("levanplastsrl"),
Maggio_MaggioSrl("maggiosrl"),
Maggio_GiovMaggio("giovmaggio"),
@@ -191,7 +198,9 @@ public enum IntegryCustomerDB {
Tempesta_Tempesta("tempesta"),
Tempesta_DI("tempestadi"),
Tempesta_VivaiTempesta("vivaitempesta"),
Tempesta_VivaiTempesta_DI("vivaitempestadi"),
Tosca_Ba("tosca_ba"),
@@ -229,6 +238,6 @@ public enum IntegryCustomerDB {
return Arrays.stream(values()).filter(x -> x.getValue().equalsIgnoreCase(value))
.findFirst()
.orElse(null);
.orElseThrow(() -> new InvalidCustomerDbException(value));
}
}

View File

@@ -1,508 +0,0 @@
package it.integry.ems.migration.dto.common;
import it.integry.ems.migration.dto.SqlObjectTypeEnum;
import it.integry.ems.sync.MultiDBTransaction.Connection;
import it.integry.ems_model.entity.MtbColt;
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 it.integry.ems_model.utility.dto.IndexTableDTO;
import java.io.IOException;
import java.sql.SQLException;
import java.sql.Statement;
import java.time.LocalDate;
import java.util.ArrayList;
public class MigrationMvwSitArtUdcDetInventarioDTO {
public static void apply(Connection connection) throws Exception {
//Aggiorno i campi barcode_ul_in, barcode_ul_out, posizione_in, posizione_out, cod_mdep_in, cod_mdep_out
updateNewFieldsInMtbColrs(connection);
//Migration di conversione aziende a nuova mvw_sitart_udc_det_inventario
createBackupOfOldView(connection);
dropView(connection, "mvw_sitart_udc_det_inventario");
createNewView(connection);
}
public static void updateNewFieldsInMtbColrs(Connection connection) throws Exception {
executeStatement(connection, "UPDATE mtb_colr\n" +
"SET barcode_ul_in = new_data.barcode_ul_in,\n" +
" barcode_ul_out = new_data.barcode_ul_out,\n" +
" posizione_in = new_data.posizione_in,\n" +
" posizione_out = new_data.posizione_out,\n" +
" cod_mdep_in = new_data.cod_mdep_in,\n" +
" cod_mdep_out = new_data.cod_mdep_out\n" +
"FROM mtb_colr\n" +
" INNER JOIN (SELECT mtb_colt.barcode_ul AS barcode_ul_in,\n" +
" IIF(num_collo_rif IS NOT NULL, mtb_colt_rif.barcode_ul, NULL) AS barcode_ul_out,\n" +
" mtb_colt.posizione AS posizione_in,\n" +
" IIF(num_collo_rif IS NOT NULL, mtb_colt_rif.posizione, NULL) AS posizione_out,\n" +
" mtb_colt.cod_mdep AS cod_mdep_in,\n" +
" IIF(num_collo_rif IS NOT NULL, mtb_colt_rif.cod_mdep, NULL) AS cod_mdep_out,\n" +
"\n" +
" mtb_colr.gestione,\n" +
" mtb_colr.data_collo,\n" +
" mtb_colr.ser_collo,\n" +
" mtb_colr.num_collo,\n" +
" mtb_colr.riga\n" +
"\n" +
" FROM dbo.mtb_colr\n" +
" INNER JOIN dbo.mtb_colt ON mtb_colr.gestione = mtb_colt.gestione AND\n" +
" mtb_colr.data_collo = mtb_colt.data_collo AND\n" +
" mtb_colr.ser_collo = mtb_colt.ser_collo AND\n" +
" mtb_colr.num_collo = mtb_colt.num_collo\n" +
"\n" +
" LEFT OUTER JOIN dbo.mtb_colt mtb_colt_rif\n" +
" ON mtb_colr.gestione_rif = mtb_colt_rif.gestione AND\n" +
" mtb_colr.data_collo_rif = mtb_colt_rif.data_collo AND\n" +
" mtb_colr.ser_collo_rif = mtb_colt_rif.ser_collo AND\n" +
" mtb_colr.num_collo_rif = mtb_colt_rif.num_collo) new_data\n" +
" ON mtb_colr.gestione = new_data.gestione AND\n" +
" mtb_colr.num_collo = new_data.num_collo AND\n" +
" mtb_colr.ser_collo = new_data.ser_collo AND\n" +
" mtb_colr.data_collo = new_data.data_collo AND\n" +
" mtb_colr.riga = new_data.riga");
}
public static void alignGiacenza(Connection connection) throws Exception {
//Creo un collo di scarico vuoto
MtbColt mtbColt = new MtbColt()
.setGestione("L")
.setSerCollo("RT")
.setSegno(-1)
.setDataCollo(LocalDate.now())
.setAnnotazioni("PASSAGGIO NUOVA MVW_SITART_UDC_DET_INVENTARIO")
.setCodMdep(getInternalCodMdep(connection));
mtbColt.setOperation(OperationType.INSERT);
mtbColt.dataCompleting(connection);
mtbColt.manageWithParentConnection(connection);
executeStatement(connection, Query.format(
"INSERT INTO mtb_colr (gestione, ser_collo, num_collo, data_collo, riga, cod_mart, cod_col, cod_tagl, partita_mag, gestione_rif, data_collo_rif, ser_collo_rif, num_collo_rif, datetime_row,\n" +
" cod_jcom, qta_col, num_cnf, qta_cnf, barcode_ul_out, cod_mdep_out, posizione_out)" +
" SELECT {} AS gestione,\n" +
" {} AS ser_collo,\n" +
" {} AS num_collo,\n" +
" CAST({} AS DATE) AS data_collo,\n" +
" ROW_NUMBER() OVER (PARTITION BY (SELECT NULL) ORDER BY v.data_collo) AS riga,\n" +
" v.cod_mart,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.partita_mag,\n" +
" v.gestione AS gestion_rif,\n" +
" v.data_collo AS data_collo_rif,\n" +
" v.ser_collo AS ser_collo_rif,\n" +
" v.num_collo AS num_collo_rif,\n" +
" GETDATE() AS datetime_row,\n" +
" v.cod_jcom,\n" +
" v.qta_col,\n" +
" v.num_cnf,\n" +
" v.qta_cnf,\n" +
" v.barcode_ul AS barcode_ul_out,\n" +
" v.cod_mdep AS cod_mdep_out,\n" +
" v.posizione AS posizione_out\n" +
"FROM mvw_sitart_udc_det_inventario v\n" +
" INNER JOIN (SELECT ser_collo,\n" +
" gestione,\n" +
" data_collo,\n" +
" num_collo,\n" +
" cod_mdep,\n" +
" posizione,\n" +
" cod_mart,\n" +
" partita_mag,\n" +
" cod_jcom-- Elenca tutte le colonne coinvolte\n" +
" FROM mvw_sitart_udc_det_inventario\n" +
"\n" +
" EXCEPT\n" +
"\n" +
" SELECT ser_collo,\n" +
" gestione,\n" +
" data_collo,\n" +
" num_collo,\n" +
" cod_mdep,\n" +
" posizione,\n" +
" cod_mart,\n" +
" partita_mag,\n" +
" cod_jcom -- Elenca le stesse colonne dalla vista vecchia\n" +
" FROM mvw_sitart_udc_det_inventario_old) t\n" +
" ON v.num_collo = t.num_collo AND v.data_collo = t.data_collo AND\n" +
" v.ser_collo = t.ser_collo AND v.gestione = t.gestione AND\n" +
" v.cod_mart = t.cod_mart AND v.cod_mdep = t.cod_mdep AND\n" +
" ISNULL(v.partita_mag, '') = ISNULL(t.partita_mag, '') AND\n" +
" ISNULL(v.posizione, '') = ISNULL(t.posizione, '') AND\n" +
" ISNULL(v.cod_jcom, '') = ISNULL(t.cod_jcom, '')" +
" WHERE qta_col > 0",
mtbColt.getGestione(), mtbColt.getSerCollo(), mtbColt.getNumCollo(), mtbColt.getDataCollo()));
}
private static String getInternalCodMdep(Connection connection) throws Exception {
String codMdepAz = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, "SELECT TOP 1 cod_mdep" +
" FROM mtb_depo" +
" INNER JOIN dbo.gtb_anag ga ON mtb_depo.cod_anag = ga.cod_anag" +
" inner join azienda on ga.part_iva = azienda.part_iva");
if(UtilityString.isNullOrEmpty(codMdepAz)) {
codMdepAz = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, "SELECT TOP 1 cod_mdep FROM mtb_depo");
}
return codMdepAz;
}
private static void createBackupOfOldView(Connection connection) throws Exception {
if (existsView(connection, "mvw_sitart_udc_det_inventario_old"))
return;
createOrUpdateView(connection, "mvw_sitart_udc_det_inventario_old", "CREATE VIEW [dbo].[mvw_sitart_udc_det_inventario_old] AS\n" +
"SELECT UL.gestione,\n" +
" data_collo,\n" +
" ser_collo,\n" +
" num_collo,\n" +
" segno,\n" +
" UL.cod_mdep,\n" +
" UL.posizione,\n" +
" mtb_depo_posizioni.priorita,\n" +
" mtb_aart.cod_mgrp AS codGruppo,\n" +
" mtb_grup.descrizione AS Gruppo,\n" +
" mtb_aart.cod_msgr AS CodSgruppo,\n" +
" mtb_sgrp.descrizione AS Sottogruppo,\n" +
" UL.cod_mart,\n" +
" diacod,\n" +
" mtb_aart.descrizione_estesa,\n" +
" partita_mag,\n" +
" UL.cod_jcom,\n" +
" jtb_comt.descrizione AS commessa,\n" +
" mtb_aart.unt_mis,\n" +
" qta_col,\n" +
" num_cnf,\n" +
" UL.qta_cnf,\n" +
" UL.peso_netto_kg,\n" +
" UL.peso_lordo_kg,\n" +
" UL.cod_jfas\n" +
"FROM [mvw_sitart_udc_det] UL\n" +
" LEFT OUTER JOIN jtb_comt ON UL.cod_jcom = jtb_comt.cod_jcom\n" +
" LEFT OUTER JOIN mtb_depo_posizioni\n" +
" ON UL.cod_mdep = mtb_depo_posizioni.cod_mdep AND UL.posizione = mtb_depo_posizioni.posizione,\n" +
" mtb_aart,\n" +
" mtb_grup,\n" +
" mtb_sgrp\n" +
"WHERE UL.cod_mart = mtb_aart.cod_mart\n" +
" AND mtb_aart.cod_mgrp = mtb_grup.cod_mgrp\n" +
" AND mtb_aart.cod_mgrp = mtb_sgrp.cod_mgrp\n" +
" AND mtb_aart.cod_msgr = mtb_sgrp.cod_msgr\n" +
" AND qta_col <> 0");
}
private static void createNewView(Connection connection) throws Exception {
if (!existsTable(connection, "stb_multiplier")) {
executeStatement(connection, "CREATE TABLE stb_multiplier\n" +
"(\n" +
" moltiplicatore INT NOT NULL\n" +
")",
"INSERT INTO stb_multiplier (moltiplicatore) VALUES (1)",
"INSERT INTO stb_multiplier (moltiplicatore) VALUES (-1)");
}
createOrUpdateView(connection, "mvw_mtb_colr_with_giacenza", "CREATE VIEW dbo.mvw_mtb_colr_with_giacenza\n" +
" WITH SCHEMABINDING\n" +
" AS\n" +
"SELECT COUNT_BIG(*) AS c,\n" +
" IIF(moltiplicatore = -1, mtb_colr.barcode_ul_out,\n" +
" mtb_colr.barcode_ul_in) AS barcode_ul,\n" +
" IIF(moltiplicatore = -1, mtb_colr.cod_mdep_out,\n" +
" mtb_colr.cod_mdep_in) AS cod_mdep,\n" +
" IIF(moltiplicatore = -1, mtb_colr.posizione_out,\n" +
" mtb_colr.posizione_in) AS posizione,\n" +
" SUM(mtb_colr.qta_col * moltiplicatore) AS qta_col,\n" +
" SUM(IIF(mtb_aart.flag_qta_cnf_fissa = 'S', mtb_colr.qta_col / mtb_aart.qta_cnf, mtb_colr.num_cnf) *\n" +
" moltiplicatore) AS num_cnf,\n" +
" mtb_colr.cod_mart,\n" +
" mtb_colr.cod_col,\n" +
" mtb_colr.cod_tagl,\n" +
" mtb_colr.partita_mag,\n" +
" SUM(mtb_colr.peso_netto_kg * moltiplicatore) AS peso_netto_kg,\n" +
" SUM(mtb_colr.peso_lordo_kg * moltiplicatore) AS peso_lordo_kg,\n" +
" IIF(mtb_colr.cod_jcom = 'MAG', NULL, mtb_colr.cod_jcom) AS cod_jcom,\n" +
" mtb_aart.flag_qta_cnf_fissa,\n" +
" mtb_aart.unt_mis,\n" +
" mtb_aart.diacod,\n" +
" mtb_aart.descrizione_estesa,\n" +
" mtb_aart.cod_mgrp,\n" +
" mtb_aart.cod_msgr,\n" +
" mtb_aart.cod_mtip,\n" +
" mtb_aart.cod_mstp,\n" +
" mtb_aart.cod_msfa,\n" +
" mtb_aart.qta_cnf AS qta_cnf_anag\n" +
"FROM dbo.mtb_colr\n" +
" INNER JOIN dbo.stb_multiplier ON (moltiplicatore = 1 AND mtb_colr.barcode_ul_in IS NOT NULL) OR\n" +
" (moltiplicatore = -1 AND mtb_colr.barcode_ul_out IS NOT NULL)\n" +
" INNER JOIN dbo.mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart\n" +
"GROUP BY mtb_colr.cod_mart,\n" +
" mtb_colr.cod_col,\n" +
" mtb_colr.cod_tagl,\n" +
" mtb_colr.partita_mag,\n" +
" IIF(moltiplicatore = -1, mtb_colr.barcode_ul_out,\n" +
" mtb_colr.barcode_ul_in),\n" +
" IIF(moltiplicatore = -1, mtb_colr.cod_mdep_out,\n" +
" mtb_colr.cod_mdep_in),\n" +
" IIF(moltiplicatore = -1, mtb_colr.posizione_out,\n" +
" mtb_colr.posizione_in),\n" +
" IIF(mtb_colr.cod_jcom = 'MAG', NULL, mtb_colr.cod_jcom),\n" +
" mtb_aart.flag_qta_cnf_fissa,\n" +
" mtb_aart.unt_mis,\n" +
" mtb_aart.diacod,\n" +
" mtb_aart.descrizione_estesa,\n" +
" mtb_aart.cod_mgrp,\n" +
" mtb_aart.cod_msgr,\n" +
" mtb_aart.cod_mtip,\n" +
" mtb_aart.cod_mstp,\n" +
" mtb_aart.cod_msfa,\n" +
" mtb_aart.qta_cnf");
dropIndex(connection, "mvw_mtb_colr_with_giacenza", "IDX_CLUSTERED_mvw_mtb_colr_with_giacenza");
createIndex(connection, new IndexTableDTO()
.setIndexName("IDX_CLUSTERED_mvw_mtb_colr_with_giacenza")
.setTableName("mvw_mtb_colr_with_giacenza")
.setUnique(true)
.setClustered(true)
.setMaxDop(1)
.setSortInTempDb(true)
.setColumnsIndex(new ArrayList<IndexTableDTO.ColumnIndex>() {{
add(new IndexTableDTO.ColumnIndex("barcode_ul"));
add(new IndexTableDTO.ColumnIndex("posizione"));
add(new IndexTableDTO.ColumnIndex("cod_mdep"));
add(new IndexTableDTO.ColumnIndex("cod_mart"));
add(new IndexTableDTO.ColumnIndex("partita_mag"));
add(new IndexTableDTO.ColumnIndex("cod_tagl"));
add(new IndexTableDTO.ColumnIndex("cod_col"));
add(new IndexTableDTO.ColumnIndex("cod_jcom"));
}}));
dropIndex(connection, "mvw_mtb_colr_with_giacenza", "IDX_mvw_qta_mtb_colr_with_giacenza");
createIndex(connection, new IndexTableDTO()
.setIndexName("IDX_mvw_qta_mtb_colr_with_giacenza")
.setTableName("mvw_mtb_colr_with_giacenza")
.setMaxDop(1)
.setSortInTempDb(true)
.setColumnsIndex(new ArrayList<IndexTableDTO.ColumnIndex>() {{
add(new IndexTableDTO.ColumnIndex("qta_col"));
add(new IndexTableDTO.ColumnIndex("num_cnf"));
}}));
dropIndex(connection, "mvw_mtb_colr_with_giacenza", "IDX_mvw_articolo_mtb_colr_with_giacenza");
createIndex(connection, new IndexTableDTO()
.setIndexName("IDX_mvw_articolo_mtb_colr_with_giacenza")
.setTableName("mvw_mtb_colr_with_giacenza")
.setMaxDop(1)
.setSortInTempDb(true)
.setColumnsIndex(new ArrayList<IndexTableDTO.ColumnIndex>() {{
add(new IndexTableDTO.ColumnIndex("cod_mart"));
add(new IndexTableDTO.ColumnIndex("partita_mag"));
add(new IndexTableDTO.ColumnIndex("cod_tagl"));
add(new IndexTableDTO.ColumnIndex("cod_col"));
}}));
dropIndex(connection, "mvw_mtb_colr_with_giacenza", "IDX_mvw_articolo_giac_mtb_colr_with_giacenza");
createIndex(connection, new IndexTableDTO()
.setIndexName("IDX_mvw_articolo_giac_mtb_colr_with_giacenza")
.setTableName("mvw_mtb_colr_with_giacenza")
.setMaxDop(1)
.setSortInTempDb(true)
.setColumnsIndex(new ArrayList<IndexTableDTO.ColumnIndex>() {{
add(new IndexTableDTO.ColumnIndex("cod_mart"));
add(new IndexTableDTO.ColumnIndex("partita_mag"));
add(new IndexTableDTO.ColumnIndex("cod_tagl"));
add(new IndexTableDTO.ColumnIndex("cod_col"));
}})
.setColumnsInclude("qta_col", "num_cnf"));
executeStatement(connection, "UPDATE STATISTICS dbo.mvw_mtb_colr_with_giacenza");
createOrUpdateView(connection, "mvw_sitart_udc_det_inventario", "CREATE VIEW [dbo].[mvw_sitart_udc_det_inventario] AS\n" +
" WITH baseMtbColr AS (SELECT c,\n" +
"\n" +
" ROUND(v.qta_col, cifre_dec) AS qta_col,\n" +
" ROUND(v.num_cnf, cifre_dec) AS num_cnf,\n" +
" IIF(flag_qta_cnf_fissa = 'S',\n" +
" v.qta_cnf_anag, v.qta_col / IIF(v.num_cnf = 0, 1, v.num_cnf)) AS qta_cnf,\n" +
" v.cod_mart,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.partita_mag,\n" +
" v.peso_netto_kg,\n" +
" v.peso_lordo_kg,\n" +
" mtb_colt.gestione,\n" +
" mtb_colt.data_collo,\n" +
" mtb_colt.ser_collo,\n" +
" mtb_colt.num_collo,\n" +
" v.cod_jcom,\n" +
" v.flag_qta_cnf_fissa,\n" +
" v.unt_mis,\n" +
" v.diacod,\n" +
" v.descrizione_estesa,\n" +
" v.cod_mgrp,\n" +
" mtb_grup.descrizione AS descrizione_gruppo,\n" +
" v.cod_msgr,\n" +
" mtb_sgrp.descrizione AS descrizione_sottogruppo,\n" +
" mtb_unt_mis.flag_dig,\n" +
" mtb_unt_mis.cifre_dec,\n" +
" mtb_colt.segno,\n" +
" v.cod_mdep,\n" +
" v.posizione,\n" +
" mtb_colt.cod_dtip,\n" +
" mtb_colt.cod_jfas,\n" +
" v.barcode_ul,\n" +
" v.qta_cnf_anag\n" +
" FROM mvw_mtb_colr_with_giacenza v WITH (NOEXPAND)\n" +
" INNER JOIN mtb_colt\n" +
" ON v.barcode_ul = mtb_colt.barcode_ul\n" +
" INNER JOIN dbo.mtb_unt_mis ON v.unt_mis = mtb_unt_mis.unt_mis\n" +
"\n" +
" INNER JOIN dbo.mtb_grup ON v.cod_mgrp = mtb_grup.cod_mgrp\n" +
" INNER JOIN dbo.mtb_sgrp ON v.cod_mgrp = mtb_sgrp.cod_mgrp\n" +
" AND v.cod_msgr = mtb_sgrp.cod_msgr\n" +
" WHERE qta_col > 0\n" +
" AND (segno = 1 OR (segno = -1 AND cod_dtip IS NULL AND mtb_colt.gestione = 'V'))\n" +
" ),\n" +
" final_stock AS (SELECT v.qta_col,\n" +
" v.num_cnf,\n" +
" v.qta_cnf,\n" +
" v.gestione,\n" +
" v.data_collo,\n" +
" v.ser_collo,\n" +
" v.num_collo,\n" +
" v.cod_mdep AS cod_mdep,\n" +
" v.posizione AS posizione,\n" +
" mtb_depo_posizioni.priorita,\n" +
" v.cod_mgrp AS codGruppo,\n" +
" v.descrizione_gruppo AS Gruppo,\n" +
" v.cod_msgr AS CodSgruppo,\n" +
" v.descrizione_sottogruppo AS Sottogruppo,\n" +
" v.cod_mart,\n" +
" v.diacod,\n" +
" v.descrizione_estesa,\n" +
" v.partita_mag,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.cod_jcom,\n" +
" v.peso_netto_kg,\n" +
" v.peso_lordo_kg,\n" +
" v.cod_jfas,\n" +
" v.flag_qta_cnf_fissa,\n" +
" v.unt_mis,\n" +
" v.segno,\n" +
" v.barcode_ul\n" +
" FROM baseMtbColr v\n" +
"\n" +
" LEFT OUTER JOIN mtb_depo_posizioni\n" +
" ON v.cod_mdep = mtb_depo_posizioni.cod_mdep\n" +
" AND v.posizione = mtb_depo_posizioni.posizione)\n" +
"\n" +
" SELECT qta_col,\n" +
" num_cnf,\n" +
" qta_cnf,\n" +
" gestione,\n" +
" data_collo,\n" +
" ser_collo,\n" +
" num_collo,\n" +
" cod_mdep,\n" +
" posizione,\n" +
" priorita,\n" +
" codGruppo,\n" +
" Gruppo,\n" +
" CodSgruppo,\n" +
" Sottogruppo,\n" +
" cod_mart,\n" +
" diacod,\n" +
" descrizione_estesa,\n" +
" partita_mag,\n" +
" cod_col,\n" +
" cod_tagl,\n" +
" cod_jcom,\n" +
" peso_netto_kg,\n" +
" peso_lordo_kg,\n" +
" cod_jfas,\n" +
" flag_qta_cnf_fissa,\n" +
" unt_mis,\n" +
" segno,\n" +
" barcode_ul\n" +
" FROM final_stock");
}
private static boolean existsView(Connection connection, String objectName) throws SQLException {
return UtilityDB.<Integer>executeSimpleQueryOnlyFirstRowFirstColumn(connection, "SELECT COUNT(*) FROM SYSOBJECTS WHERE id = object_id('" + objectName + "')") > 0;
}
private static void dropView(Connection connection, String objectName) throws SQLException, IOException {
UtilityDB.executeStatement(connection, "IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id('" + objectName + "'))\r\n" +
"\tDROP " + SqlObjectTypeEnum.VIEW.toString() + " " + objectName);
}
private static boolean existsTable(Connection connection, 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(connection, sql);
}
private static void createIndex(Connection connection, IndexTableDTO indexTableDTO) throws Exception {
UtilityDB.createIndex(connection, indexTableDTO);
}
private static void dropIndex(Connection connection, String tableName, String indexName) throws Exception {
UtilityDB.dropIndex(connection, tableName, indexName);
}
private static void executeStatement(Connection connection, String... sqls) throws SQLException {
try (Statement statement = connection.createStatement()) {
for (String sql : sqls) {
statement.execute(sql);
}
}
}
private static void createOrUpdateView(Connection connection, String objectName, String createViewSql) throws SQLException, IOException {
alterObject(connection, SqlObjectTypeEnum.VIEW, objectName, createViewSql);
}
private static void alterObject(Connection connection, SqlObjectTypeEnum sqlObject, String objectName, String sql) throws SQLException, IOException {
executeStatement(connection, "IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id('" + objectName + "'))\r\n" +
"\tDROP " + sqlObject.toString() + " " + objectName,
sql);
}
}

View File

@@ -2,7 +2,7 @@ package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
import it.integry.ems.settings.Model.AvailableConnectionsModel;
import it.integry.ems.settings.Model.AvailableConnectionModel;
import it.integry.ems.sync.MultiDBTransaction.Connection;
import it.integry.ems_model.utility.UtilityDB;
@@ -14,7 +14,7 @@ public class Migration_20210721093948 extends BaseMigration implements Migration
@Override
public void up() throws Exception {
AvailableConnectionsModel historyDBModel = settingsController.getHistoryDbConnectionModel();
AvailableConnectionModel historyDBModel = settingsController.getHistoryDbConnectionModel();
if (!settingsModel.getDefaultProfile().equalsIgnoreCase(connection.getProfileName()))
return;

View File

@@ -2,7 +2,7 @@ package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
import it.integry.ems.settings.Model.AvailableConnectionsModel;
import it.integry.ems.settings.Model.AvailableConnectionModel;
import it.integry.ems.sync.MultiDBTransaction.Connection;
import it.integry.ems_model.utility.UtilityDB;
@@ -14,7 +14,7 @@ public class Migration_20210924152555 extends BaseMigration implements Migration
@Override
public void up() throws Exception {
AvailableConnectionsModel historyDBModel = settingsController.getHistoryDbConnectionModel();
AvailableConnectionModel historyDBModel = settingsController.getHistoryDbConnectionModel();
if (!settingsModel.getDefaultProfile().equalsIgnoreCase(connection.getProfileName()))
return;

View File

@@ -6,6 +6,7 @@ import it.integry.ems_model.entity.StbUser;
import it.integry.ems_model.entity.WtbUsers;
import it.integry.ems_model.types.OperationType;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityLocalDate;
import it.integry.ems_model.utility.UtilityString;
import it.integry.security.utility.CryptoUtils;
@@ -57,7 +58,7 @@ public class Migration_20220413102657 extends BaseMigration implements Migration
.setUserCode(wtbUser.getUserCode())
.setDetails(wtbUser.getDetails())
.setLastAccessDatetime(wtbUser.getLastAccessDatetime())
.setPasswordEndtime(wtbUser.getPasswordEndtime())
.setPasswordEndtime(UtilityLocalDate.localDateTimeFromDate(wtbUser.getPasswordEndtime()))
.setUrlCss(wtbUser.getUrlCss())
.setCodLang(wtbUser.getCodLang())
.setCreationDatetime(wtbUser.getCreationDatetime())

View File

@@ -3,7 +3,14 @@ package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
import it.integry.ems.migration.dto.common.MigrationMvwSitArtUdcDetInventarioDTO;
import it.integry.ems_model.entity.MtbColt;
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.dto.IndexTableDTO;
import java.time.LocalDate;
import java.util.ArrayList;
public class Migration_20241213163759 extends BaseMigration implements MigrationModelInterface {
@@ -15,8 +22,381 @@ public class Migration_20241213163759 extends BaseMigration implements Migration
if (!isCustomer(IntegryCustomer.RossoGargano))
return;
MigrationMvwSitArtUdcDetInventarioDTO.apply(connection);
MigrationMvwSitArtUdcDetInventarioDTO.alignGiacenza(connection);
//Migration di conversione aziende a nuova mvw_sitart_udc_det_inventario
createBackupOfOldView();
dropView("mvw_sitart_udc_det_inventario");
createNewView();
alignGiacenza();
}
private void createBackupOfOldView() throws Exception {
if (existsView("mvw_sitart_udc_det_inventario_old"))
return;
createOrUpdateView("mvw_sitart_udc_det_inventario_old", "CREATE VIEW [dbo].[mvw_sitart_udc_det_inventario_old] AS\n" +
"SELECT UL.gestione,\n" +
" data_collo,\n" +
" ser_collo,\n" +
" num_collo,\n" +
" segno,\n" +
" UL.cod_mdep,\n" +
" UL.posizione,\n" +
" mtb_depo_posizioni.priorita,\n" +
" mtb_aart.cod_mgrp AS codGruppo,\n" +
" mtb_grup.descrizione AS Gruppo,\n" +
" mtb_aart.cod_msgr AS CodSgruppo,\n" +
" mtb_sgrp.descrizione AS Sottogruppo,\n" +
" UL.cod_mart,\n" +
" diacod,\n" +
" mtb_aart.descrizione_estesa,\n" +
" partita_mag,\n" +
" UL.cod_jcom,\n" +
" jtb_comt.descrizione AS commessa,\n" +
" mtb_aart.unt_mis,\n" +
" qta_col,\n" +
" num_cnf,\n" +
" UL.qta_cnf,\n" +
" UL.peso_netto_kg,\n" +
" UL.peso_lordo_kg,\n" +
" UL.cod_jfas\n" +
"FROM [mvw_sitart_udc_det] UL\n" +
" LEFT OUTER JOIN jtb_comt ON UL.cod_jcom = jtb_comt.cod_jcom\n" +
" LEFT OUTER JOIN mtb_depo_posizioni\n" +
" ON UL.cod_mdep = mtb_depo_posizioni.cod_mdep AND UL.posizione = mtb_depo_posizioni.posizione,\n" +
" mtb_aart,\n" +
" mtb_grup,\n" +
" mtb_sgrp\n" +
"WHERE UL.cod_mart = mtb_aart.cod_mart\n" +
" AND mtb_aart.cod_mgrp = mtb_grup.cod_mgrp\n" +
" AND mtb_aart.cod_mgrp = mtb_sgrp.cod_mgrp\n" +
" AND mtb_aart.cod_msgr = mtb_sgrp.cod_msgr\n" +
" AND qta_col <> 0");
}
private void createNewView() throws Exception {
if (!existsTable("stb_multiplier")) {
executeStatement("CREATE TABLE stb_multiplier\n" +
"(\n" +
" moltiplicatore INT NOT NULL\n" +
")",
"INSERT INTO stb_multiplier (moltiplicatore) VALUES (1)",
"INSERT INTO stb_multiplier (moltiplicatore) VALUES (-1)");
}
createOrUpdateView("mvw_mtb_colr_with_giacenza", "CREATE VIEW dbo.mvw_mtb_colr_with_giacenza\n" +
" WITH SCHEMABINDING\n" +
"AS\n" +
"SELECT COUNT_BIG(*) AS c,\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.gestione_rif,\n" +
" mtb_colr.gestione) AS gestione,\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.data_collo_rif,\n" +
" mtb_colr.data_collo) AS data_collo,\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.ser_collo_rif,\n" +
" mtb_colr.ser_collo) AS ser_collo,\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.num_collo_rif,\n" +
" mtb_colr.num_collo) AS num_collo,\n" +
" SUM(mtb_colr.qta_col * moltiplicatore) AS qta_col,\n" +
"\n" +
" SUM(IIF(mtb_aart.flag_qta_cnf_fissa = 'S', mtb_colr.qta_col / mtb_aart.qta_cnf, mtb_colr.num_cnf) *\n" +
" moltiplicatore) AS num_cnf,\n" +
" mtb_colr.cod_mart,\n" +
" mtb_colr.cod_col,\n" +
" mtb_colr.cod_tagl,\n" +
" mtb_colr.partita_mag,\n" +
" SUM(mtb_colr.peso_netto_kg * moltiplicatore) AS peso_netto_kg,\n" +
" SUM(mtb_colr.peso_lordo_kg * moltiplicatore) AS peso_lordo_kg,\n" +
" IIF(mtb_colr.cod_jcom = 'MAG', NULL, mtb_colr.cod_jcom) AS cod_jcom,\n" +
" mtb_aart.flag_qta_cnf_fissa,\n" +
" mtb_aart.unt_mis,\n" +
" mtb_aart.diacod,\n" +
" mtb_aart.descrizione_estesa,\n" +
" mtb_aart.cod_mgrp,\n" +
" mtb_aart.cod_msgr,\n" +
" mtb_aart.cod_mtip,\n" +
" mtb_aart.cod_mstp,\n" +
" mtb_aart.cod_msfa,\n" +
" mtb_aart.qta_cnf AS qta_cnf_anag\n" +
"FROM dbo.mtb_colr\n" +
" INNER JOIN dbo.stb_multiplier ON moltiplicatore = 1 OR mtb_colr.num_collo_rif IS NOT NULL\n" +
" INNER JOIN dbo.mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart\n" +
"GROUP BY mtb_colr.cod_mart,\n" +
" mtb_colr.cod_col,\n" +
" mtb_colr.cod_tagl,\n" +
" mtb_colr.partita_mag,\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.gestione_rif, mtb_colr.gestione),\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.data_collo_rif,\n" +
" mtb_colr.data_collo),\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.ser_collo_rif,\n" +
" mtb_colr.ser_collo),\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.num_collo_rif,\n" +
" mtb_colr.num_collo),\n" +
" IIF(mtb_colr.cod_jcom = 'MAG', NULL, mtb_colr.cod_jcom),\n" +
" mtb_aart.flag_qta_cnf_fissa,\n" +
" mtb_aart.unt_mis,\n" +
" mtb_aart.diacod,\n" +
" mtb_aart.descrizione_estesa,\n" +
" mtb_aart.cod_mgrp,\n" +
" mtb_aart.cod_msgr,\n" +
" mtb_aart.cod_mtip,\n" +
" mtb_aart.cod_mstp,\n" +
" mtb_aart.cod_msfa,\n" +
" mtb_aart.qta_cnf");
dropIndex("mvw_mtb_colr_with_giacenza", "IDX_CLUSTERED_mvw_mtb_colr_with_giacenza");
createIndex(new IndexTableDTO()
.setIndexName("IDX_CLUSTERED_mvw_mtb_colr_with_giacenza")
.setTableName("mvw_mtb_colr_with_giacenza")
.setUnique(true)
.setClustered(true)
.setMaxDop(1)
.setSortInTempDb(true)
.setColumnsIndex(new ArrayList<IndexTableDTO.ColumnIndex>() {{
add(new IndexTableDTO.ColumnIndex("gestione"));
add(new IndexTableDTO.ColumnIndex("data_collo"));
add(new IndexTableDTO.ColumnIndex("num_collo"));
add(new IndexTableDTO.ColumnIndex("ser_collo"));
add(new IndexTableDTO.ColumnIndex("cod_mart"));
add(new IndexTableDTO.ColumnIndex("partita_mag"));
add(new IndexTableDTO.ColumnIndex("cod_tagl"));
add(new IndexTableDTO.ColumnIndex("cod_col"));
add(new IndexTableDTO.ColumnIndex("cod_jcom"));
}}));
dropIndex("mvw_mtb_colr_with_giacenza", "IDX_mvw_qta_mtb_colr_with_giacenza");
createIndex(new IndexTableDTO()
.setIndexName("IDX_mvw_qta_mtb_colr_with_giacenza")
.setTableName("mvw_mtb_colr_with_giacenza")
.setMaxDop(1)
.setSortInTempDb(true)
.setColumnsIndex(new ArrayList<IndexTableDTO.ColumnIndex>() {{
add(new IndexTableDTO.ColumnIndex("qta_col"));
add(new IndexTableDTO.ColumnIndex("num_cnf"));
}}));
dropIndex("mvw_mtb_colr_with_giacenza", "IDX_mvw_articolo_mtb_colr_with_giacenza");
createIndex(new IndexTableDTO()
.setIndexName("IDX_mvw_articolo_mtb_colr_with_giacenza")
.setTableName("mvw_mtb_colr_with_giacenza")
.setMaxDop(1)
.setSortInTempDb(true)
.setColumnsIndex(new ArrayList<IndexTableDTO.ColumnIndex>() {{
add(new IndexTableDTO.ColumnIndex("cod_mart"));
add(new IndexTableDTO.ColumnIndex("partita_mag"));
add(new IndexTableDTO.ColumnIndex("cod_tagl"));
add(new IndexTableDTO.ColumnIndex("cod_col"));
}}));
dropIndex("mvw_mtb_colr_with_giacenza", "IDX_mvw_articolo_giac_mtb_colr_with_giacenza");
createIndex(new IndexTableDTO()
.setIndexName("IDX_mvw_articolo_giac_mtb_colr_with_giacenza")
.setTableName("mvw_mtb_colr_with_giacenza")
.setMaxDop(1)
.setSortInTempDb(true)
.setColumnsIndex(new ArrayList<IndexTableDTO.ColumnIndex>() {{
add(new IndexTableDTO.ColumnIndex("cod_mart"));
add(new IndexTableDTO.ColumnIndex("partita_mag"));
add(new IndexTableDTO.ColumnIndex("cod_tagl"));
add(new IndexTableDTO.ColumnIndex("cod_col"));
}})
.setColumnsInclude("qta_col", "num_cnf"));
executeStatement("UPDATE STATISTICS dbo.mvw_mtb_colr_with_giacenza");
createOrUpdateView("mvw_sitart_udc_det_inventario", "CREATE VIEW mvw_sitart_udc_det_inventario AS\n" +
" WITH baseMtbColr AS (SELECT c,\n" +
"\n" +
" ROUND(v.qta_col, cifre_dec) AS qta_col,\n" +
" ROUND(v.num_cnf, cifre_dec) AS num_cnf,\n" +
" IIF(flag_qta_cnf_fissa = 'S',\n" +
" v.qta_cnf_anag, v.qta_col / IIF(v.num_cnf = 0, 1, v.num_cnf)) AS qta_cnf,\n" +
" v.cod_mart,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.partita_mag,\n" +
" v.peso_netto_kg,\n" +
" v.peso_lordo_kg,\n" +
" v.gestione,\n" +
" v.data_collo,\n" +
" v.ser_collo,\n" +
" v.num_collo,\n" +
" v.cod_jcom,\n" +
" v.flag_qta_cnf_fissa,\n" +
" v.unt_mis,\n" +
" v.diacod,\n" +
" v.descrizione_estesa,\n" +
" v.cod_mgrp,\n" +
" mtb_grup.descrizione AS descrizione_gruppo,\n" +
" v.cod_msgr,\n" +
" mtb_sgrp.descrizione AS descrizione_sottogruppo,\n" +
" mtb_unt_mis.flag_dig,\n" +
" mtb_unt_mis.cifre_dec,\n" +
" mtb_colt.segno,\n" +
" mtb_colt.cod_mdep,\n" +
" mtb_colt.posizione,\n" +
" mtb_colt.cod_dtip,\n" +
" mtb_colt.cod_jfas,\n" +
" mtb_colt.barcode_ul,\n" +
" v.qta_cnf_anag\n" +
" FROM mvw_mtb_colr_with_giacenza v WITH (NOEXPAND)\n" +
" INNER JOIN mtb_colt\n" +
" ON v.num_collo = mtb_colt.num_collo AND v.gestione = mtb_colt.gestione AND\n" +
" v.ser_collo = mtb_colt.ser_collo AND v.data_collo = mtb_colt.data_collo\n" +
" INNER JOIN dbo.mtb_unt_mis ON v.unt_mis = mtb_unt_mis.unt_mis\n" +
"\n" +
" INNER JOIN dbo.mtb_grup ON v.cod_mgrp = mtb_grup.cod_mgrp\n" +
" INNER JOIN dbo.mtb_sgrp ON v.cod_mgrp = mtb_sgrp.cod_mgrp\n" +
" AND v.cod_msgr = mtb_sgrp.cod_msgr\n" +
" WHERE qta_col > 0\n" +
" AND (segno = 1 OR (segno = -1 AND cod_dtip IS NULL AND v.gestione = 'V'))),\n" +
" final_stock AS (SELECT v.qta_col,\n" +
" v.num_cnf,\n" +
" v.qta_cnf,\n" +
" v.gestione,\n" +
" v.data_collo,\n" +
" v.ser_collo,\n" +
" v.num_collo,\n" +
" v.cod_mdep AS cod_mdep,\n" +
" v.posizione AS posizione,\n" +
" mtb_depo_posizioni.priorita,\n" +
" v.cod_mgrp AS codGruppo,\n" +
" v.descrizione_gruppo AS Gruppo,\n" +
" v.cod_msgr AS CodSgruppo,\n" +
" v.descrizione_sottogruppo AS Sottogruppo,\n" +
" v.cod_mart,\n" +
" v.diacod,\n" +
" v.descrizione_estesa,\n" +
" v.partita_mag,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.cod_jcom,\n" +
" v.peso_netto_kg,\n" +
" v.peso_lordo_kg,\n" +
" v.cod_jfas,\n" +
" v.flag_qta_cnf_fissa,\n" +
" v.unt_mis,\n" +
" v.segno,\n" +
" v.barcode_ul\n" +
" FROM baseMtbColr v\n" +
"\n" +
" LEFT OUTER JOIN mtb_depo_posizioni\n" +
" ON v.cod_mdep = mtb_depo_posizioni.cod_mdep\n" +
" AND v.posizione = mtb_depo_posizioni.posizione)\n" +
"\n" +
" SELECT qta_col,\n" +
" num_cnf,\n" +
" qta_cnf,\n" +
" gestione,\n" +
" data_collo,\n" +
" ser_collo,\n" +
" num_collo,\n" +
" cod_mdep,\n" +
" posizione,\n" +
" priorita,\n" +
" codGruppo,\n" +
" Gruppo,\n" +
" CodSgruppo,\n" +
" Sottogruppo,\n" +
" cod_mart,\n" +
" diacod,\n" +
" descrizione_estesa,\n" +
" partita_mag,\n" +
" cod_col,\n" +
" cod_tagl,\n" +
" cod_jcom,\n" +
" peso_netto_kg,\n" +
" peso_lordo_kg,\n" +
" cod_jfas,\n" +
" flag_qta_cnf_fissa,\n" +
" unt_mis,\n" +
" segno,\n" +
" barcode_ul\n" +
" FROM final_stock");
}
private void alignGiacenza() throws Exception {
//Creo un collo di scarico vuoto
MtbColt mtbColt = new MtbColt()
.setGestione("L")
.setSerCollo("RT")
.setSegno(-1)
.setDataCollo(LocalDate.now())
.setAnnotazioni("PASSAGGIO NUOVA MVW_SITART_UDC_DET_INVENTARIO")
.setCodMdep(getInternalCodMdep());
mtbColt.setOperation(OperationType.INSERT);
mtbColt.dataCompleting(connection);
mtbColt.manageWithParentConnection(connection);
executeStatement(Query.format(
"INSERT INTO mtb_colr (gestione, ser_collo, num_collo, data_collo, riga, cod_mart, cod_col, cod_tagl, partita_mag, gestione_rif, data_collo_rif, ser_collo_rif, num_collo_rif, datetime_row,\n" +
" cod_jcom, qta_col, num_cnf, qta_cnf)" +
" SELECT {} AS gestione,\n" +
" {} AS ser_collo,\n" +
" {} AS num_collo,\n" +
" CAST({} AS DATE) AS data_collo,\n" +
" ROW_NUMBER() OVER (PARTITION BY (SELECT NULL) ORDER BY v.data_collo) AS riga,\n" +
" v.cod_mart,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.partita_mag,\n" +
" v.gestione AS gestion_rif,\n" +
" v.data_collo AS data_collo_rif,\n" +
" v.ser_collo AS ser_collo_rif,\n" +
" v.num_collo AS num_collo_rif,\n" +
" GETDATE() AS datetime_row,\n" +
" v.cod_jcom,\n" +
" v.qta_col,\n" +
" v.num_cnf,\n" +
" v.qta_cnf\n" +
"FROM mvw_sitart_udc_det_inventario v\n" +
" INNER JOIN (SELECT ser_collo,\n" +
" gestione,\n" +
" data_collo,\n" +
" num_collo,\n" +
" cod_mdep,\n" +
" posizione,\n" +
" cod_mart,\n" +
" partita_mag,\n" +
" cod_jcom-- Elenca tutte le colonne coinvolte\n" +
" FROM mvw_sitart_udc_det_inventario\n" +
"\n" +
" EXCEPT\n" +
"\n" +
" SELECT ser_collo,\n" +
" gestione,\n" +
" data_collo,\n" +
" num_collo,\n" +
" cod_mdep,\n" +
" posizione,\n" +
" cod_mart,\n" +
" partita_mag,\n" +
" cod_jcom -- Elenca le stesse colonne dalla vista vecchia\n" +
" FROM mvw_sitart_udc_det_inventario_old) t\n" +
" ON v.num_collo = t.num_collo AND v.data_collo = t.data_collo AND\n" +
" v.ser_collo = t.ser_collo AND v.gestione = t.gestione AND\n" +
" v.cod_mart = t.cod_mart AND v.cod_mdep = t.cod_mdep AND\n" +
" ISNULL(v.partita_mag, '') = ISNULL(t.partita_mag, '') AND\n" +
" ISNULL(v.posizione, '') = ISNULL(t.posizione, '') AND\n" +
" ISNULL(v.cod_jcom, '') = ISNULL(t.cod_jcom, '')" +
" WHERE qta_col > 0",
mtbColt.getGestione(), mtbColt.getSerCollo(), mtbColt.getNumCollo(), mtbColt.getDataCollo()));
}
private String getInternalCodMdep() throws Exception {
return UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(connection, "SELECT TOP 1 cod_mdep" +
" FROM mtb_depo" +
" INNER JOIN dbo.gtb_anag ga ON mtb_depo.cod_anag = ga.cod_anag" +
" inner join azienda on ga.part_iva = azienda.part_iva");
}
@Override

View File

@@ -0,0 +1,323 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
import it.integry.ems_model.entity.MtbColt;
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.dto.IndexTableDTO;
import java.time.LocalDate;
import java.util.ArrayList;
public class Migration_20250320121611 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (!isCustomer(IntegryCustomer.Tosca))
return;
//Migration di conversione aziende a nuova mvw_sitart_udc_det_inventario
createBackupOfOldView();
dropView("mvw_sitart_udc_det_inventario");
createNewView();
}
private void createBackupOfOldView() throws Exception {
if (existsView("mvw_sitart_udc_det_inventario_old"))
return;
createOrUpdateView("mvw_sitart_udc_det_inventario_old", "CREATE VIEW [dbo].[mvw_sitart_udc_det_inventario_old] AS\n" +
"SELECT UL.gestione,\n" +
" data_collo,\n" +
" ser_collo,\n" +
" num_collo,\n" +
" segno,\n" +
" UL.cod_mdep,\n" +
" UL.posizione,\n" +
" mtb_depo_posizioni.priorita,\n" +
" mtb_aart.cod_mgrp AS codGruppo,\n" +
" mtb_grup.descrizione AS Gruppo,\n" +
" mtb_aart.cod_msgr AS CodSgruppo,\n" +
" mtb_sgrp.descrizione AS Sottogruppo,\n" +
" UL.cod_mart,\n" +
" diacod,\n" +
" mtb_aart.descrizione_estesa,\n" +
" partita_mag,\n" +
" UL.cod_jcom,\n" +
" jtb_comt.descrizione AS commessa,\n" +
" mtb_aart.unt_mis,\n" +
" qta_col,\n" +
" num_cnf,\n" +
" UL.qta_cnf,\n" +
" UL.peso_netto_kg,\n" +
" UL.peso_lordo_kg,\n" +
" UL.cod_jfas\n" +
"FROM [mvw_sitart_udc_det] UL\n" +
" LEFT OUTER JOIN jtb_comt ON UL.cod_jcom = jtb_comt.cod_jcom\n" +
" LEFT OUTER JOIN mtb_depo_posizioni\n" +
" ON UL.cod_mdep = mtb_depo_posizioni.cod_mdep AND UL.posizione = mtb_depo_posizioni.posizione,\n" +
" mtb_aart,\n" +
" mtb_grup,\n" +
" mtb_sgrp\n" +
"WHERE UL.cod_mart = mtb_aart.cod_mart\n" +
" AND mtb_aart.cod_mgrp = mtb_grup.cod_mgrp\n" +
" AND mtb_aart.cod_mgrp = mtb_sgrp.cod_mgrp\n" +
" AND mtb_aart.cod_msgr = mtb_sgrp.cod_msgr\n" +
" AND qta_col <> 0");
}
private void createNewView() throws Exception {
if (!existsTable("stb_multiplier")) {
executeStatement("CREATE TABLE stb_multiplier\n" +
"(\n" +
" moltiplicatore INT NOT NULL\n" +
")",
"INSERT INTO stb_multiplier (moltiplicatore) VALUES (1)",
"INSERT INTO stb_multiplier (moltiplicatore) VALUES (-1)");
}
createOrUpdateView("mvw_mtb_colr_with_giacenza", "CREATE VIEW dbo.mvw_mtb_colr_with_giacenza\n" +
" WITH SCHEMABINDING\n" +
"AS\n" +
"SELECT COUNT_BIG(*) AS c,\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.gestione_rif,\n" +
" mtb_colr.gestione) AS gestione,\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.data_collo_rif,\n" +
" mtb_colr.data_collo) AS data_collo,\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.ser_collo_rif,\n" +
" mtb_colr.ser_collo) AS ser_collo,\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.num_collo_rif,\n" +
" mtb_colr.num_collo) AS num_collo,\n" +
" SUM(mtb_colr.qta_col * moltiplicatore) AS qta_col,\n" +
"\n" +
" SUM(IIF(mtb_aart.flag_qta_cnf_fissa = 'S', mtb_colr.qta_col / mtb_aart.qta_cnf, mtb_colr.num_cnf) *\n" +
" moltiplicatore) AS num_cnf,\n" +
" mtb_colr.cod_mart,\n" +
" mtb_colr.cod_col,\n" +
" mtb_colr.cod_tagl,\n" +
" mtb_colr.partita_mag,\n" +
" SUM(mtb_colr.peso_netto_kg * moltiplicatore) AS peso_netto_kg,\n" +
" SUM(mtb_colr.peso_lordo_kg * moltiplicatore) AS peso_lordo_kg,\n" +
" IIF(mtb_colr.cod_jcom = 'MAG', NULL, mtb_colr.cod_jcom) AS cod_jcom,\n" +
" mtb_aart.flag_qta_cnf_fissa,\n" +
" mtb_aart.unt_mis,\n" +
" mtb_aart.diacod,\n" +
" mtb_aart.descrizione_estesa,\n" +
" mtb_aart.cod_mgrp,\n" +
" mtb_aart.cod_msgr,\n" +
" mtb_aart.cod_mtip,\n" +
" mtb_aart.cod_mstp,\n" +
" mtb_aart.cod_msfa,\n" +
" mtb_aart.qta_cnf AS qta_cnf_anag\n" +
"FROM dbo.mtb_colr\n" +
" INNER JOIN dbo.stb_multiplier ON moltiplicatore = 1 OR mtb_colr.num_collo_rif IS NOT NULL\n" +
" INNER JOIN dbo.mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart\n" +
"GROUP BY mtb_colr.cod_mart,\n" +
" mtb_colr.cod_col,\n" +
" mtb_colr.cod_tagl,\n" +
" mtb_colr.partita_mag,\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.gestione_rif, mtb_colr.gestione),\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.data_collo_rif,\n" +
" mtb_colr.data_collo),\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.ser_collo_rif,\n" +
" mtb_colr.ser_collo),\n" +
" IIF(moltiplicatore = -1 AND num_collo_rif IS NOT NULL, mtb_colr.num_collo_rif,\n" +
" mtb_colr.num_collo),\n" +
" IIF(mtb_colr.cod_jcom = 'MAG', NULL, mtb_colr.cod_jcom),\n" +
" mtb_aart.flag_qta_cnf_fissa,\n" +
" mtb_aart.unt_mis,\n" +
" mtb_aart.diacod,\n" +
" mtb_aart.descrizione_estesa,\n" +
" mtb_aart.cod_mgrp,\n" +
" mtb_aart.cod_msgr,\n" +
" mtb_aart.cod_mtip,\n" +
" mtb_aart.cod_mstp,\n" +
" mtb_aart.cod_msfa,\n" +
" mtb_aart.qta_cnf");
dropIndex("mvw_mtb_colr_with_giacenza", "IDX_CLUSTERED_mvw_mtb_colr_with_giacenza");
createIndex(new IndexTableDTO()
.setIndexName("IDX_CLUSTERED_mvw_mtb_colr_with_giacenza")
.setTableName("mvw_mtb_colr_with_giacenza")
.setUnique(true)
.setClustered(true)
.setMaxDop(1)
.setSortInTempDb(true)
.setColumnsIndex(new ArrayList<IndexTableDTO.ColumnIndex>() {{
add(new IndexTableDTO.ColumnIndex("gestione"));
add(new IndexTableDTO.ColumnIndex("data_collo"));
add(new IndexTableDTO.ColumnIndex("num_collo"));
add(new IndexTableDTO.ColumnIndex("ser_collo"));
add(new IndexTableDTO.ColumnIndex("cod_mart"));
add(new IndexTableDTO.ColumnIndex("partita_mag"));
add(new IndexTableDTO.ColumnIndex("cod_tagl"));
add(new IndexTableDTO.ColumnIndex("cod_col"));
add(new IndexTableDTO.ColumnIndex("cod_jcom"));
}}));
dropIndex("mvw_mtb_colr_with_giacenza", "IDX_mvw_qta_mtb_colr_with_giacenza");
createIndex(new IndexTableDTO()
.setIndexName("IDX_mvw_qta_mtb_colr_with_giacenza")
.setTableName("mvw_mtb_colr_with_giacenza")
.setMaxDop(1)
.setSortInTempDb(true)
.setColumnsIndex(new ArrayList<IndexTableDTO.ColumnIndex>() {{
add(new IndexTableDTO.ColumnIndex("qta_col"));
add(new IndexTableDTO.ColumnIndex("num_cnf"));
}}));
dropIndex("mvw_mtb_colr_with_giacenza", "IDX_mvw_articolo_mtb_colr_with_giacenza");
createIndex(new IndexTableDTO()
.setIndexName("IDX_mvw_articolo_mtb_colr_with_giacenza")
.setTableName("mvw_mtb_colr_with_giacenza")
.setMaxDop(1)
.setSortInTempDb(true)
.setColumnsIndex(new ArrayList<IndexTableDTO.ColumnIndex>() {{
add(new IndexTableDTO.ColumnIndex("cod_mart"));
add(new IndexTableDTO.ColumnIndex("partita_mag"));
add(new IndexTableDTO.ColumnIndex("cod_tagl"));
add(new IndexTableDTO.ColumnIndex("cod_col"));
}}));
dropIndex("mvw_mtb_colr_with_giacenza", "IDX_mvw_articolo_giac_mtb_colr_with_giacenza");
createIndex(new IndexTableDTO()
.setIndexName("IDX_mvw_articolo_giac_mtb_colr_with_giacenza")
.setTableName("mvw_mtb_colr_with_giacenza")
.setMaxDop(1)
.setSortInTempDb(true)
.setColumnsIndex(new ArrayList<IndexTableDTO.ColumnIndex>() {{
add(new IndexTableDTO.ColumnIndex("cod_mart"));
add(new IndexTableDTO.ColumnIndex("partita_mag"));
add(new IndexTableDTO.ColumnIndex("cod_tagl"));
add(new IndexTableDTO.ColumnIndex("cod_col"));
}})
.setColumnsInclude("qta_col", "num_cnf"));
executeStatement("UPDATE STATISTICS dbo.mvw_mtb_colr_with_giacenza");
createOrUpdateView("mvw_sitart_udc_det_inventario", "CREATE VIEW mvw_sitart_udc_det_inventario AS\n" +
" WITH baseMtbColr AS (SELECT c,\n" +
"\n" +
" ROUND(v.qta_col, cifre_dec) AS qta_col,\n" +
" ROUND(v.num_cnf, cifre_dec) AS num_cnf,\n" +
" IIF(flag_qta_cnf_fissa = 'S',\n" +
" v.qta_cnf_anag, v.qta_col / IIF(v.num_cnf = 0, 1, v.num_cnf)) AS qta_cnf,\n" +
" v.cod_mart,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.partita_mag,\n" +
" v.peso_netto_kg,\n" +
" v.peso_lordo_kg,\n" +
" v.gestione,\n" +
" v.data_collo,\n" +
" v.ser_collo,\n" +
" v.num_collo,\n" +
" v.cod_jcom,\n" +
" v.flag_qta_cnf_fissa,\n" +
" v.unt_mis,\n" +
" v.diacod,\n" +
" v.descrizione_estesa,\n" +
" v.cod_mgrp,\n" +
" mtb_grup.descrizione AS descrizione_gruppo,\n" +
" v.cod_msgr,\n" +
" mtb_sgrp.descrizione AS descrizione_sottogruppo,\n" +
" mtb_unt_mis.flag_dig,\n" +
" mtb_unt_mis.cifre_dec,\n" +
" mtb_colt.segno,\n" +
" mtb_colt.cod_mdep,\n" +
" mtb_colt.posizione,\n" +
" mtb_colt.cod_dtip,\n" +
" mtb_colt.cod_jfas,\n" +
" mtb_colt.barcode_ul,\n" +
" v.qta_cnf_anag\n" +
" FROM mvw_mtb_colr_with_giacenza v WITH (NOEXPAND)\n" +
" INNER JOIN mtb_colt\n" +
" ON v.num_collo = mtb_colt.num_collo AND v.gestione = mtb_colt.gestione AND\n" +
" v.ser_collo = mtb_colt.ser_collo AND v.data_collo = mtb_colt.data_collo\n" +
" INNER JOIN dbo.mtb_unt_mis ON v.unt_mis = mtb_unt_mis.unt_mis\n" +
"\n" +
" INNER JOIN dbo.mtb_grup ON v.cod_mgrp = mtb_grup.cod_mgrp\n" +
" INNER JOIN dbo.mtb_sgrp ON v.cod_mgrp = mtb_sgrp.cod_mgrp\n" +
" AND v.cod_msgr = mtb_sgrp.cod_msgr\n" +
" WHERE qta_col > 0\n" +
" AND (segno = 1 OR (segno = -1 AND cod_dtip IS NULL AND v.gestione = 'V'))),\n" +
" final_stock AS (SELECT v.qta_col,\n" +
" v.num_cnf,\n" +
" v.qta_cnf,\n" +
" v.gestione,\n" +
" v.data_collo,\n" +
" v.ser_collo,\n" +
" v.num_collo,\n" +
" v.cod_mdep AS cod_mdep,\n" +
" v.posizione AS posizione,\n" +
" mtb_depo_posizioni.priorita,\n" +
" v.cod_mgrp AS codGruppo,\n" +
" v.descrizione_gruppo AS Gruppo,\n" +
" v.cod_msgr AS CodSgruppo,\n" +
" v.descrizione_sottogruppo AS Sottogruppo,\n" +
" v.cod_mart,\n" +
" v.diacod,\n" +
" v.descrizione_estesa,\n" +
" v.partita_mag,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.cod_jcom,\n" +
" v.peso_netto_kg,\n" +
" v.peso_lordo_kg,\n" +
" v.cod_jfas,\n" +
" v.flag_qta_cnf_fissa,\n" +
" v.unt_mis,\n" +
" v.segno,\n" +
" v.barcode_ul\n" +
" FROM baseMtbColr v\n" +
"\n" +
" LEFT OUTER JOIN mtb_depo_posizioni\n" +
" ON v.cod_mdep = mtb_depo_posizioni.cod_mdep\n" +
" AND v.posizione = mtb_depo_posizioni.posizione)\n" +
"\n" +
" SELECT qta_col,\n" +
" num_cnf,\n" +
" qta_cnf,\n" +
" gestione,\n" +
" data_collo,\n" +
" ser_collo,\n" +
" num_collo,\n" +
" cod_mdep,\n" +
" posizione,\n" +
" priorita,\n" +
" codGruppo,\n" +
" Gruppo,\n" +
" CodSgruppo,\n" +
" Sottogruppo,\n" +
" cod_mart,\n" +
" diacod,\n" +
" descrizione_estesa,\n" +
" partita_mag,\n" +
" cod_col,\n" +
" cod_tagl,\n" +
" cod_jcom,\n" +
" peso_netto_kg,\n" +
" peso_lordo_kg,\n" +
" cod_jfas,\n" +
" flag_qta_cnf_fissa,\n" +
" unt_mis,\n" +
" segno,\n" +
" barcode_ul\n" +
" FROM final_stock");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -1,30 +0,0 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250402112610 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
// //Gia aggiornato
// if (isCustomer(IntegryCustomer.RossoGargano) ||
// isCustomer(IntegryCustomer.Tosca))
// return;
//
// //Azienda da aggiornare
// if (!isCustomer(IntegryCustomer.Gramm))
// return;
//
// MigrationMvwSitArtUdcDetInventarioDTO.apply(connection);
// MigrationMvwSitArtUdcDetInventarioDTO.alignGiacenza(connection);
}
@Override
public void down() throws Exception {
}
}

View File

@@ -1,73 +0,0 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
import it.integry.ems.migration.dto.common.MigrationMvwSitArtUdcDetInventarioDTO;
import it.integry.ems.rules.completing.PackagesRules;
import it.integry.ems_model.entity.MtbColt;
import it.integry.ems_model.types.OperationType;
import it.integry.ems_model.utility.Query;
import it.integry.ems_model.utility.UtilityDB;
import java.util.List;
public class Migration_20250403174531 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (!isCustomer(IntegryCustomer.RossoGargano))
return;
//Rigenero barcodeUl testate con barcode duplicato
regenerateDuplicatedBarcodeUlTestate();
//Aggiorno la view mvw_mtb_colr_with_giacenza
MigrationMvwSitArtUdcDetInventarioDTO.apply(connection);
MigrationMvwSitArtUdcDetInventarioDTO.alignGiacenza(connection);
}
@Override
public void down() throws Exception {
}
private void regenerateDuplicatedBarcodeUlTestate() throws Exception {
String retrieveDuplicatedSql = "SELECT barcode_ul\n" +
"FROM mtb_colt\n" +
"GROUP BY barcode_ul, ser_collo\n" +
"HAVING COUNT(barcode_ul) > 1";
final List<String> duplicatedBarcodes = UtilityDB.executeSimpleQueryOnlyFirstColumn(connection, retrieveDuplicatedSql);
for (String barcode : duplicatedBarcodes) {
String sql = Query.format("SELECT * FROM mtb_colt WHERE barcode_ul = {}", barcode);
List<MtbColt> loadedMtbColts = executeQueryDTO(sql, MtbColt.class);
for (MtbColt colt : loadedMtbColts) {
if (colt.getSerCollo().equalsIgnoreCase("T")) {
String newBarcodeUl = PackagesRules.completeBarcodeUl(connection,
colt.getGestione(),
colt.getDataCollo(),
colt.getSerCollo(),
colt.getNumCollo(),
null,
null);
colt.setBarcodeUl(newBarcodeUl);
colt.setOperation(OperationType.UPDATE);
colt.manageWithParentConnection(connection);
}
}
}
}
}

View File

@@ -1,181 +0,0 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250403174532 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (isCustomer(IntegryCustomer.Gramm) ||
isCustomer(IntegryCustomer.RossoGargano) ||
isCustomer(IntegryCustomer.Carelli) ||
isDMS())
return;
//Cancello tutti i barcode UL dalle testate degli scarichi a lavorazione
executeStatement("UPDATE mtb_colt SET barcode_ul = NULL\n" +
"WHERE gestione = 'L' AND segno = -1\n" +
"AND barcode_ul IS NOT NULL");
executeStatement("UPDATE mtb_colt\n" +
"SET barcode_ul = EAN128.AI_00\n" +
"FROM mtb_colt\n" +
" CROSS APPLY (SELECT TOP 1 * FROM (SELECT DISTINCT AI_00\n" +
" FROM f_getEAN128UL(mtb_colt.gestione, mtb_colt.data_collo, mtb_colt.ser_collo,\n" +
" mtb_colt.num_collo,\n" +
" NULL)" +
" WHERE mtb_colt.ser_collo <> 'UL'\n" +
" UNION\n" +
" SELECT CONCAT('U', RIGHT(YEAR(mtb_colt.data_collo), 2), FORMAT(mtb_colt.num_collo, '0000000')) AS AI_00\n" +
" WHERE mtb_colt.ser_collo = 'UL') tmp) EAN128");
createOrUpdateFunction("f_getEAN128UL", "CREATE FUNCTION [dbo].[f_getEAN128UL](@gestione VARCHAR(1), @dataCollo DATETIME, @serCollo VARCHAR(2), @numCollo INT,\n" +
" @customPrefissoEan VARCHAR(7))\n" +
" RETURNS TABLE AS\n" +
" RETURN\n" +
" -- DECLARE @gestione AS VARCHAR(1) = 'L'\n" +
"-- DECLARE @serCollo AS VARCHAR(10) = 'GG'\n" +
"-- DECLARE @numCollo AS INT = 7837\n" +
"-- DECLARE @dataCollo AS DATETIME = '2025-03-10';\n" +
"-- DECLARE @customPrefissoEan AS VARCHAR(7);-- = '8017596';\n" +
"\n" +
" WITH barcodes AS (SELECT mtb_colt.barcode_ul AS AI_00,\n" +
" CASE\n" +
" WHEN mtb_aart.cod_barre_imb IS NOT NULL AND LEN(mtb_aart.cod_barre_imb) < 14 THEN\n" +
" FORMAT(CONVERT(NUMERIC, ISNULL(NULLIF(mtb_aart.cod_barre_imb, ''), '0')),\n" +
" REPLICATE('0', 14))\n" +
" ELSE mtb_aart.cod_barre_imb\n" +
" END AS AI_01,\n" +
" CASE\n" +
" WHEN mtb_aart.bar_code IS NOT NULL AND LEN(mtb_aart.bar_code) < 14\n" +
" THEN\n" +
" FORMAT(CONVERT(BIGINT, mtb_aart.bar_code), REPLICATE('0', 14))\n" +
" ELSE mtb_aart.bar_code\n" +
" END AS AI_02,\n" +
" CASE\n" +
" WHEN mtb_colr.partita_mag IS NOT NULL THEN\n" +
" mtb_colr.partita_mag + CHAR(29)\n" +
" END AS AI_10,\n" +
" CASE\n" +
" WHEN mtb_partita_mag.data_scad IS NOT NULL THEN\n" +
" REPLACE(CONVERT(VARCHAR(10), mtb_partita_mag.data_scad, 2), '.', '')\n" +
" END AS AI_15,\n" +
" CASE\n" +
" WHEN LEN(CAST(mtb_aart.peso_kg * mtb_colr.qta_cnf AS INTEGER)) <= 6 THEN\n" +
" REPLACE(FORMAT(mtb_aart.peso_kg * mtb_colr.qta_cnf, '000000'), '.', '')\n" +
" END AS AI_3100,\n" +
" CASE\n" +
" WHEN LEN(CAST(mtb_aart.peso_kg * mtb_colr.qta_cnf AS INTEGER)) <= 5 THEN\n" +
" REPLACE(FORMAT(mtb_aart.peso_kg * mtb_colr.qta_cnf, '00000.0'), '.', '')\n" +
" END AS AI_3101,\n" +
" CASE\n" +
" WHEN LEN(CAST(mtb_aart.peso_kg * mtb_colr.qta_cnf AS INTEGER)) <= 4 THEN\n" +
" REPLACE(FORMAT(mtb_aart.peso_kg * mtb_colr.qta_cnf, '0000.00'), '.', '')\n" +
" END AS AI_3102,\n" +
" CASE\n" +
" WHEN LEN(CAST(mtb_aart.peso_kg * mtb_colr.qta_cnf AS INTEGER)) <= 3 THEN\n" +
" REPLACE(FORMAT(mtb_aart.peso_kg * mtb_colr.qta_cnf, '000.000'), '.', '')\n" +
" END AS AI_3103,\n" +
" CASE\n" +
" WHEN LEN(CAST(mtb_aart.peso_kg * mtb_colr.qta_cnf AS INTEGER)) <= 2 THEN\n" +
" REPLACE(FORMAT(mtb_aart.peso_kg * mtb_colr.qta_cnf, '00.0000'), '.', '')\n" +
" END AS AI_3104,\n" +
" CASE\n" +
" WHEN LEN(CAST(mtb_aart.peso_kg * mtb_colr.qta_cnf AS INTEGER)) <= 1 THEN\n" +
" REPLACE(FORMAT(mtb_aart.peso_kg * mtb_colr.qta_cnf, '0.00000'), '.', '')\n" +
" END AS AI_3105,\n" +
" CASE\n" +
" WHEN LEN(CAST(mtb_colt.peso_kg AS INTEGER)) <= 6 THEN\n" +
" REPLACE(FORMAT(mtb_colt.peso_kg, '000000'), '.', '')\n" +
" END AS AI_3300,\n" +
" CASE\n" +
" WHEN LEN(CAST(mtb_colt.peso_kg AS INTEGER)) <= 5 THEN\n" +
" REPLACE(FORMAT(mtb_colt.peso_kg, '00000.0'), '.', '')\n" +
" END AS AI_3301,\n" +
" CASE\n" +
" WHEN LEN(CAST(mtb_colt.peso_kg AS INTEGER)) <= 4 THEN\n" +
" REPLACE(FORMAT(mtb_colt.peso_kg, '0000.00'), '.', '')\n" +
" END AS AI_3302,\n" +
" CASE\n" +
" WHEN LEN(CAST(mtb_colt.peso_kg AS INTEGER)) <= 3 THEN\n" +
" REPLACE(FORMAT(mtb_colt.peso_kg, '000.000'), '.', '')\n" +
" END AS AI_3303,\n" +
" CASE\n" +
" WHEN LEN(CAST(mtb_colt.peso_kg AS INTEGER)) <= 2 THEN\n" +
" REPLACE(FORMAT(mtb_colt.peso_kg, '00.0000'), '.', '')\n" +
" END AS AI_3304,\n" +
" CASE\n" +
" WHEN LEN(CAST(mtb_colt.peso_kg AS INTEGER)) <= 1 THEN\n" +
" REPLACE(FORMAT(mtb_colt.peso_kg, '0.00000'), '.', '')\n" +
" END AS AI_3305,\n" +
" CONVERT(VARCHAR, CONVERT(INTEGER, SUM(mtb_colr.qta_col / mtb_colr.qta_cnf))) AS AI_37\n" +
" FROM mtb_colt\n" +
" INNER JOIN mtb_colr\n" +
" ON mtb_colt.gestione = mtb_colr.gestione AND\n" +
" mtb_colt.data_collo = mtb_colr.data_collo AND\n" +
" mtb_colt.ser_collo = mtb_colr.ser_collo AND\n" +
" mtb_colt.num_collo = mtb_colr.num_collo\n" +
" INNER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart\n" +
" LEFT OUTER JOIN mtb_partita_mag ON mtb_colr.cod_mart = mtb_partita_mag.cod_mart AND\n" +
" mtb_colr.partita_mag =\n" +
" mtb_partita_mag.partita_mag,\n" +
" azienda\n" +
" WHERE mtb_colt.gestione = @gestione\n" +
" AND mtb_colt.data_collo = @dataCollo\n" +
" AND mtb_colt.ser_collo = @serCollo\n" +
" AND mtb_colt.num_collo = @numCollo\n" +
" GROUP BY mtb_colr.qta_cnf,\n" +
" mtb_colt.data_vers,\n" +
" nome_ditta,\n" +
" azienda.indirizzo,\n" +
" azienda.cap,\n" +
" azienda.citta,\n" +
" azienda.prov,\n" +
" prefisso_ean,\n" +
" mtb_colt.data_collo,\n" +
" mtb_colt.num_collo,\n" +
" mtb_aart.cod_barre_imb,\n" +
" mtb_aart.bar_code,\n" +
" mtb_aart.descrizione_estesa,\n" +
" mtb_colr.partita_mag,\n" +
" mtb_partita_mag.data_scad,\n" +
" mtb_colt.peso_netto_kg,\n" +
" mtb_colr.cod_mart,\n" +
" mtb_colt.gestione,\n" +
" mtb_colt.peso_kg,\n" +
" mtb_aart.peso_kg, \n" +
" mtb_colt.barcode_ul)\n" +
" SELECT AI_00,\n" +
" IIF(AI_01 IS NOT NULL AND LEN(AI_01) = 13,\n" +
" CONCAT(AI_01, dbo.getCheckDigitITF14(AI_01)), AI_01) AS AI_01,\n" +
" AI_02,\n" +
" AI_10,\n" +
" AI_15,\n" +
" AI_3100,\n" +
" AI_3101,\n" +
" AI_3102,\n" +
" AI_3103,\n" +
" AI_3104,\n" +
" AI_3105,\n" +
" AI_3300,\n" +
" AI_3301,\n" +
" AI_3302,\n" +
" AI_3303,\n" +
" AI_3304,\n" +
" AI_3305,\n" +
" AI_37\n" +
" FROM barcodes\n" +
"GO");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -1,33 +0,0 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.IntegryCustomerDB;
import it.integry.ems.migration._base.MigrationModelInterface;
import it.integry.ems.migration.dto.common.MigrationMvwSitArtUdcDetInventarioDTO;
public class Migration_20250417110238 extends BaseMigration implements MigrationModelInterface {
//Migration per aggiornare la view mvw_sitart_udc_det_inventario
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (!isCustomer(IntegryCustomer.Maggio) &&
!isCustomer(IntegryCustomer.Biolevante) &&
!isCustomer(IntegryCustomer.Ime) &&
!isCustomerDb(IntegryCustomerDB.Gramm_Gramm))
return;
//Aggiorno la view mvw_mtb_colr_with_giacenza
MigrationMvwSitArtUdcDetInventarioDTO.apply(connection);
MigrationMvwSitArtUdcDetInventarioDTO.alignGiacenza(connection);
}
@Override
public void down() throws Exception {
}
}

View File

@@ -1,207 +0,0 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250604172635 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createOrUpdateView("WMS_OrdPrelievo", "CREATE VIEW [dbo].[WMS_OrdPrelievo] AS\n" +
"WITH elencoFornitoriInterni AS (SELECT value_string AS fornitore\n" +
" FROM dbo.ParseStringIntoArray((SELECT value\n" +
" FROM stb_gest_setup\n" +
" WHERE gest_name = 'PICKING'\n" +
" AND section = 'SPEDIZIONE'\n" +
" AND key_section = 'ELENCO_FORNITORI_INTERNI'),\n" +
" '|')),\n" +
" riservatoPerOrd AS (\n" +
"\n" +
"\n" +
"SELECT mtb_colt.gestione,\n" +
" mtb_colr.data_ord,\n" +
" mtb_colr.num_ord,\n" +
" mtb_colr.riga_ord,\n" +
" SUM(mtb_colr.qta_col) AS qtaCollo,\n" +
" SUM(mtb_colr.num_cnf) AS numCnfCollo,\n" +
" COUNT(DISTINCT mtb_colr.num_ord) AS ColliRiservati\n" +
" FROM mtb_colr\n" +
" INNER JOIN mtb_colt ON mtb_colr.gestione = mtb_colt.gestione AND\n" +
" mtb_colr.data_collo = mtb_colt.data_collo AND\n" +
" mtb_colr.ser_collo = mtb_colt.ser_collo AND\n" +
" mtb_colr.num_collo = mtb_colt.num_collo\n" +
" WHERE segno = - 1\n" +
" AND mtb_colr.gestione IN ('L', 'V')\n" +
" AND mtb_colr.data_ord IS NOT NULL\n" +
" GROUP BY mtb_colt.gestione, mtb_colr.data_ord, mtb_colr.num_ord, mtb_colr.riga_ord\n" +
"\n" +
" ), OrdVr AS (\n" +
" SELECT dtb_ordr.gestione,\n" +
" dtb_ordr.data_ord,\n" +
" dtb_ordr.num_ord,\n" +
" dtb_ordt.cod_vdes,\n" +
" IIF(dtb_ordr.gestione = 'V', LEFT(ISNULL(vtb_dest.citta + ' - ', '') + vtb_dest.indirizzo, 40),\n" +
" dtb_ordt.rif_ord) AS rif_ord,\n" +
" dtb_ordt.cod_anag,\n" +
" dtb_ordt.cod_prod,\n" +
" CASE dtb_ordr.gestione WHEN 'L' THEN '2' WHEN 'V' THEN '3' END +\n" +
" REPLACE(CONVERT(VARCHAR(10), dtb_ordr.data_ord, 105), '-', '') +\n" +
" REPLICATE('0', 5 - LEN(dtb_ordr.num_ord)) +\n" +
" CONVERT(VARCHAR(6), dtb_ordr.num_ord) AS chiave_ordine,\n" +
" dtb_ordr.cod_jcom,\n" +
" dtb_ordr.cod_mart,\n" +
" SUM(ROUND(dtb_ordr.qta_ord - dtb_ordr.qta_evasa, mtb_unt_mis.cifre_dec)) *\n" +
" dtb_ordr.rap_conv AS qta_inevasa,\n" +
" dtb_ordt.listino,\n" +
" dtb_ordt.term_cons,\n" +
" dtb_ordt.cod_auto,\n" +
" dtb_ordt.cod_vvet,\n" +
" dtb_ordt.data_iniz_trasp,\n" +
" dtb_ordt.cod_mdep,\n" +
" dtb_ordr.data_cons AS data_cons,\n" +
" dtb_ordr.id_viaggio,\n" +
" dtb_ordt.cod_vage,\n" +
" SUM(colli.qtaCollo) AS qtaCollo,\n" +
" SUM(ROUND((dtb_ordr.qta_ord - dtb_ordr.qta_evasa) * dtb_ordr.rap_conv -\n" +
" ISNULL(colli.qtaCollo, 0),\n" +
" mtb_unt_mis.cifre_dec)) AS qtaInevasaColli,\n" +
" SUM(colli.numCnfCollo) AS numCnfCollo,\n" +
" SUM(dtb_ordr.num_cnf - dtb_ordr.num_cnf_evasa -\n" +
" ISNULL(colli.numCnfCollo, 0)) AS numCnfInevasaColli,\n" +
" IIF((dtb_ordr.gestione = 'L' AND dtb_ordt.gestione_rif = 'T') OR\n" +
" elencoFornitoriInterni.fornitore IS NOT NULL, 'S', 'N') AS ord_trasf\n" +
" FROM dtb_ordt\n" +
" INNER JOIN dtb_ordr ON dtb_ordt.gestione = dtb_ordr.gestione AND\n" +
" dtb_ordt.data_ord = dtb_ordr.data_ord AND\n" +
" dtb_ordt.num_ord = dtb_ordr.num_ord\n" +
" INNER JOIN mtb_unt_mis ON mtb_unt_mis.unt_mis = dtb_ordr.unt_ord\n" +
" INNER JOIN mtb_aart ON dtb_ordr.cod_mart = mtb_aart.cod_mart\n" +
" LEFT OUTER JOIN vtb_dest ON dtb_ordt.cod_anag = vtb_dest.cod_anag AND\n" +
" dtb_ordt.cod_vdes = vtb_dest.cod_vdes\n" +
" LEFT OUTER JOIN riservatoPerOrd colli\n" +
" ON dtb_ordt.gestione = colli.gestione AND\n" +
" dtb_ordt.data_ord = colli.data_ord AND\n" +
" dtb_ordt.num_ord = colli.num_ord\n" +
" LEFT OUTER JOIN elencoFornitoriInterni ON fornitore = dtb_ordt.cod_anag\n" +
" WHERE dtb_ordt.flag_annulla = 'N'\n" +
" AND dtb_ordt.flag_sospeso = 'N'\n" +
" AND dtb_ordr.flag_evaso = 'I'\n" +
" AND dtb_ordt.flag_evaso_forzato = 'N'\n" +
" AND dtb_ordt.gestione IN ('L', 'V')\n" +
" AND ((mtb_aart.flag_qta_cnf_fissa = 'S' AND qta_ord > qta_evasa) OR\n" +
" (mtb_aart.flag_qta_cnf_fissa <> 'S' AND num_cnf > num_cnf_evasa))\n" +
" GROUP BY dtb_ordr.gestione, dtb_ordr.data_ord, dtb_ordr.num_ord, dtb_ordt.cod_vdes,\n" +
" vtb_dest.indirizzo,\n" +
" vtb_dest.citta, dtb_ordt.rif_ord, dtb_ordt.cod_anag, dtb_ordr.cod_jcom, dtb_ordr.cod_mart,\n" +
" dtb_ordt.cod_prod, dtb_ordt.listino, dtb_ordt.term_cons, dtb_ordt.cod_auto,\n" +
" dtb_ordt.cod_vvet, fornitore,\n" +
" dtb_ordt.data_iniz_trasp, dtb_ordt.cod_mdep, dtb_ordt.cod_vage, dtb_ordr.id_viaggio,\n" +
" colli.num_ord, dtb_ordr.data_cons, dtb_ordt.gestione_rif, dtb_ordr.rap_conv\n" +
"\n" +
"\n" +
" ), OrdV AS (\n" +
" SELECT gestione,\n" +
" data_ord,\n" +
" num_ord,\n" +
" rif_ord,\n" +
" cod_anag,\n" +
" chiave_ordine,\n" +
" cod_jcom,\n" +
" cod_prod,\n" +
" listino,\n" +
" term_cons,\n" +
" cod_auto,\n" +
" cod_vvet,\n" +
" data_iniz_trasp,\n" +
" data_cons,\n" +
" cod_vdes,\n" +
" cod_mdep,\n" +
" COUNT(DISTINCT cod_mart) AS arts_da_evadere,\n" +
" SUM(qtaInevasaColli) AS qtaInevasa,\n" +
" SUM(numCnfInevasaColli) AS numCnfInevasa,\n" +
" id_viaggio,\n" +
" cod_vage,\n" +
" COUNT(DISTINCT qtaCollo) AS colliRiservati,\n" +
" ord_trasf\n" +
" FROM OrdVr\n" +
" GROUP BY gestione, data_ord, num_ord, rif_ord, cod_anag, chiave_ordine, cod_jcom, cod_prod, listino,\n" +
" term_cons, cod_auto, cod_vvet, data_iniz_trasp, data_cons, cod_vdes, cod_mdep, cod_vage,\n" +
" id_viaggio, ord_trasf\n" +
"\n" +
" ),\n" +
" OrdV2 AS (SELECT OrdV.gestione,\n" +
" OrdV.data_ord,\n" +
" OrdV.num_ord,\n" +
" rif_ord,\n" +
" OrdV.cod_anag,\n" +
" chiave_ordine,\n" +
" cod_jcom,\n" +
" cod_prod,\n" +
" listino,\n" +
" term_cons,\n" +
" OrdV.cod_auto,\n" +
" ISNULL(vtb_viaggi.cod_vvet, OrdV.cod_vvet) AS cod_vvet,\n" +
" data_iniz_trasp,\n" +
" ISNULL(CONVERT(DATETIME, CONVERT(VARCHAR(10), vtb_viaggi.data_ora_iniz_trasp, 121)),\n" +
" data_cons) AS data_cons,\n" +
" cod_vdes,\n" +
" cod_mdep,\n" +
" arts_da_evadere AS ArtDaEvadere,\n" +
" OrdV.id_viaggio,\n" +
" cod_vage,\n" +
" ISNULL(ordV.ColliRiservati, 0) AS colli_riservati,\n" +
" qtaInevasa,\n" +
" numCnfInevasa,\n" +
" CAST(IIF(ISNULL(ordV.ColliRiservati, 0) > 0, 1, 0) AS BIT) exist_collo,\n" +
" CAST(IIF(ISNULL(qtaInevasa, 0) > 0,\n" +
" IIF(ISNULL(numCnfInevasa, 0) > 0, 0, IIF(ordV.colliRiservati > 0, 1, 0)), 1) AS BIT) AS flag_evaso,\n" +
" ord_trasf,\n" +
" IIF((SELECT azienda.part_iva\n" +
" FROM azienda\n" +
" WHERE azienda.part_iva = gtb_anag.part_iva) IS NULL, 'N', 'S') AS ord_aziendale\n" +
" FROM Ordv\n" +
" INNER JOIN gtb_anag ON OrdV.cod_anag = gtb_anag.cod_anag\n" +
" LEFT OUTER JOIN vtb_viaggi ON OrdV.id_viaggio = vtb_viaggi.id_viaggio\n" +
" WHERE (arts_da_evadere > 0 OR ISNULL(ColliRiservati, 0) > 0))\n" +
"SELECT gestione,\n" +
" data_ord,\n" +
" num_ord,\n" +
" rif_ord,\n" +
" cod_anag,\n" +
" chiave_ordine,\n" +
" cod_jcom,\n" +
" cod_prod,\n" +
" listino,\n" +
" term_cons,\n" +
" cod_auto,\n" +
" cod_vvet,\n" +
" data_iniz_trasp,\n" +
" data_cons,\n" +
" cod_vdes,\n" +
" cod_mdep,\n" +
" SUM(ArtDaEvadere) AS ArtDaEvadere,\n" +
" id_viaggio,\n" +
" cod_vage,\n" +
" SUM(colli_riservati) AS colli_riservati,\n" +
" SUM(qtaInevasa) AS qtaInevasa,\n" +
" SUM(numCnfInevasa) AS numCnfInevasa,\n" +
" exist_collo,\n" +
" flag_evaso,\n" +
" ord_trasf,\n" +
" ord_aziendale\n" +
"FROM OrdV2\n" +
"GROUP BY gestione, data_ord, num_ord, rif_ord, cod_anag, chiave_ordine, cod_jcom, cod_prod, listino, term_cons,\n" +
" cod_auto, cod_vvet, data_iniz_trasp, data_cons, cod_vdes, cod_mdep, id_viaggio, cod_vage, exist_collo,\n" +
" flag_evaso, ord_trasf, ord_aziendale");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -1,130 +0,0 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250618195259 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createOrUpdateView("dvw_situazione_qta_docs", "CREATE VIEW dvw_situazione_qta_docs AS\n" +
"SELECT dtb_docr.[cod_anag],\n" +
" dtb_docr.[cod_dtip],\n" +
" dtb_docr.[data_doc],\n" +
" dtb_docr.[ser_doc],\n" +
" dtb_docr.[num_doc],\n" +
" dtb_docr.[id_riga],\n" +
" dtb_docr.[cod_mart],\n" +
" dtb_docr.[descrizione],\n" +
" dtb_docr.[unt_doc],\n" +
" (dtb_docr.[rap_conv] / dtb_docr.[rap_conv]) AS rap_conv,\n" +
" (dtb_docr.[qta_doc] * dtb_docr.[rap_conv]) - ISNULL(mtb_colr.qta_col, 0) AS qta_doc,\n" +
" dtb_docr.[val_unt],\n" +
" dtb_docr.[sconto5],\n" +
" dtb_docr.[sconto6],\n" +
" dtb_docr.[sconto7],\n" +
" dtb_docr.[sconto8],\n" +
" dtb_docr.[cod_aliq],\n" +
" dtb_docr.[perc_prov],\n" +
" dtb_docr.[val_prov],\n" +
" dtb_docr.[data_ord],\n" +
" dtb_docr.[num_ord],\n" +
" dtb_docr.[riga_ord],\n" +
" dtb_docr.[importo_riga],\n" +
" dtb_docr.[cod_col],\n" +
" dtb_docr.[cod_tagl],\n" +
" dtb_docr.[cod_jcom],\n" +
" dtb_docr.[cod_mdep],\n" +
" dtb_docr.[perc_gest],\n" +
" dtb_docr.[val_gest],\n" +
" dtb_docr.[partita_mag],\n" +
" dtb_docr.[val_unt_iva],\n" +
" (dtb_docr.[qta_cnf] * dtb_docr.[rap_conv]) AS qta_cnf,\n" +
" dtb_docr.[descrizione_estesa],\n" +
" dtb_docr.[costo_unt],\n" +
" dtb_docr.[perc_ispe],\n" +
" dtb_docr.[val_ispe],\n" +
" dtb_docr.[perc_promo],\n" +
" dtb_docr.[val_promo],\n" +
" dtb_docr.[perc_oneri],\n" +
" dtb_docr.[val_oneri],\n" +
" dtb_docr.[flag_evaso_forzato],\n" +
" dtb_docr.[cod_dtip_comp],\n" +
" dtb_docr.[data_doc_comp],\n" +
" dtb_docr.[ser_doc_comp],\n" +
" dtb_docr.[num_doc_comp],\n" +
" dtb_docr.[cod_promo],\n" +
" dtb_docr.[perc_prov2],\n" +
" dtb_docr.[val_prov2],\n" +
" dtb_docr.[cod_art_for],\n" +
" dtb_docr.[unt_doc2],\n" +
" dtb_docr.[qta_doc2],\n" +
" dtb_docr.[unt_doc3],\n" +
" dtb_docr.[qta_doc3],\n" +
" dtb_docr.[num_cnf] - ISNULL(mtb_colr.num_cnf, 0) AS num_cnf,\n" +
" dtb_docr.[peso_lordo],\n" +
" dtb_docr.[posizione],\n" +
" dtb_docr.[cod_anag_comp],\n" +
" dtb_docr.[cod_mtip],\n" +
" dtb_docr.[matricola],\n" +
" dtb_docr.[data_iniz_comp],\n" +
" dtb_docr.[data_fine_comp],\n" +
" dtb_docr.[cod_kit],\n" +
" dtb_docr.[cod_alis],\n" +
" dtb_docr.[data_ins_row],\n" +
" dtb_docr.[note],\n" +
" dtb_doct.[gestione],\n" +
" mtb_partita_mag.[data_scad] AS data_scad_partita_mag\n" +
"FROM dtb_docr\n" +
" INNER JOIN dtb_doct ON dtb_docr.num_doc = dtb_doct.num_doc AND dtb_docr.data_doc = dtb_doct.data_doc AND\n" +
" dtb_docr.cod_anag = dtb_doct.cod_anag AND dtb_docr.cod_dtip = dtb_doct.cod_dtip AND\n" +
" dtb_docr.ser_doc = dtb_doct.ser_doc\n" +
" INNER JOIN mtb_aart ON dtb_docr.cod_mart = mtb_aart.cod_mart\n" +
" LEFT OUTER JOIN mtb_partita_mag ON dtb_docr.cod_mart = mtb_partita_mag.cod_mart AND\n" +
" dtb_docr.partita_mag = mtb_partita_mag.partita_mag\n" +
" LEFT OUTER JOIN ctb_cont ON mtb_aart.cod_ccon_ricavi = ctb_cont.cod_ccon\n" +
" LEFT OUTER JOIN ctb_grup ON ctb_cont.cod_cgrp = ctb_grup.cod_cgrp\n" +
" LEFT OUTER JOIN (SELECT gestione,\n" +
" cod_mart,\n" +
" cod_col,\n" +
" cod_tagl,\n" +
" SUM(qta_col) AS qta_col,\n" +
" data_ord,\n" +
" num_ord,\n" +
" riga_ord,\n" +
" partita_mag,\n" +
" qta_cnf,\n" +
" gestione_rif,\n" +
" data_collo_rif,\n" +
" ser_collo_rif,\n" +
" num_collo_rif,\n" +
" cod_jcom,\n" +
" SUM(num_cnf) AS num_cnf,\n" +
" cod_anag_doc,\n" +
" cod_dtip_doc,\n" +
" data_doc,\n" +
" ser_doc,\n" +
" num_doc,\n" +
" id_riga_doc\n" +
" FROM mtb_colr\n" +
" GROUP BY gestione, cod_barre, cod_mart, cod_col, cod_tagl, data_ord, num_ord, riga_ord,\n" +
" partita_mag, qta_cnf, gestione_rif, data_collo_rif, ser_collo_rif, num_collo_rif,\n" +
" cod_jcom, cod_anag_doc, cod_dtip_doc, data_doc, ser_doc, num_doc,\n" +
" id_riga_doc) mtb_colr\n" +
" ON dtb_docr.cod_anag = mtb_colr.cod_anag_doc AND dtb_docr.cod_dtip = mtb_colr.cod_dtip_doc AND\n" +
" dtb_docr.ser_doc = mtb_colr.ser_doc AND dtb_docr.data_doc = mtb_colr.data_doc AND\n" +
" dtb_docr.num_doc = mtb_colr.num_doc AND dtb_docr.id_riga = mtb_colr.id_riga_doc\n" +
"WHERE (ctb_grup.sezione <> 1 OR ctb_grup.sezione IS NULL)\n" +
" AND (dtb_docr.[qta_doc] * dtb_docr.[rap_conv]) - ISNULL(mtb_colr.qta_col, 0) > 0");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -1,142 +0,0 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250625155432 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createOrUpdateView("mvw_sitart_udc_det_inventario", "CREATE VIEW [dbo].[mvw_sitart_udc_det_inventario] AS\n" +
"WITH baseMtbColr AS (SELECT c,\n" +
"\n" +
" ROUND(v.qta_col, cifre_dec) AS qta_col,\n" +
" ROUND(v.num_cnf, cifre_dec) AS num_cnf,\n" +
" IIF(flag_qta_cnf_fissa = 'S',\n" +
" v.qta_cnf_anag, v.qta_col / IIF(v.num_cnf = 0, 1, v.num_cnf)) AS qta_cnf,\n" +
" v.cod_mart,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.partita_mag,\n" +
" v.peso_netto_kg,\n" +
" v.peso_lordo_kg,\n" +
" mtb_colt.gestione,\n" +
" mtb_colt.data_collo,\n" +
" mtb_colt.ser_collo,\n" +
" mtb_colt.num_collo,\n" +
" v.cod_jcom,\n" +
" v.flag_qta_cnf_fissa,\n" +
" v.unt_mis,\n" +
" v.diacod,\n" +
" v.descrizione_estesa,\n" +
" v.cod_mgrp,\n" +
" mtb_grup.descrizione AS descrizione_gruppo,\n" +
" v.cod_msgr,\n" +
" mtb_sgrp.descrizione AS descrizione_sottogruppo,\n" +
" mtb_unt_mis.flag_dig,\n" +
" mtb_unt_mis.cifre_dec,\n" +
" mtb_colt.segno,\n" +
" v.cod_mdep,\n" +
" v.posizione,\n" +
" mtb_colt.cod_dtip,\n" +
" mtb_colt.cod_jfas,\n" +
" v.barcode_ul,\n" +
" v.qta_cnf_anag,\n" +
" mtb_colr.datetime_row AS datetime_posizionamento\n" +
" FROM mvw_mtb_colr_with_giacenza v WITH (NOEXPAND)\n" +
" INNER JOIN mtb_colt\n" +
" ON v.barcode_ul = mtb_colt.barcode_ul\n" +
" LEFT OUTER JOIN mtb_colr ON\n" +
" v.barcode_ul = mtb_colr.barcode_ul_in AND\n" +
" v.cod_mart = mtb_colr.cod_mart AND\n" +
" ISNULL(v.partita_mag, '') = ISNULL(mtb_colr.partita_mag, '') AND\n" +
" ISNULL(v.cod_col, '') = ISNULL(mtb_colr.cod_col, '') AND\n" +
" ISNULL(v.cod_tagl, '') = ISNULL(mtb_colr.cod_tagl, '') AND\n" +
" ISNULL(v.cod_jcom, '') = ISNULL(mtb_colr.cod_jcom, '') AND\n" +
" ISNULL(v.posizione, '') = ISNULL(mtb_colr.posizione_in, '') AND\n" +
" ISNULL(v.cod_mdep, '') = ISNULL(mtb_colr.cod_mdep_in, '') AND\n" +
" ISNULL(mtb_colr.posizione_in, '') <> ISNULL(mtb_colr.posizione_out, '')\n" +
" INNER JOIN dbo.mtb_unt_mis ON v.unt_mis = mtb_unt_mis.unt_mis\n" +
"\n" +
" INNER JOIN dbo.mtb_grup ON v.cod_mgrp = mtb_grup.cod_mgrp\n" +
" INNER JOIN dbo.mtb_sgrp ON v.cod_mgrp = mtb_sgrp.cod_mgrp\n" +
" AND v.cod_msgr = mtb_sgrp.cod_msgr\n" +
" WHERE v.qta_col > 0\n" +
" AND (segno = 1 OR (segno = -1 AND cod_dtip IS NULL AND mtb_colt.gestione = 'V'))),\n" +
" final_stock AS (SELECT v.qta_col,\n" +
" v.num_cnf,\n" +
" v.qta_cnf,\n" +
" v.gestione,\n" +
" v.data_collo,\n" +
" v.ser_collo,\n" +
" v.num_collo,\n" +
" v.cod_mdep AS cod_mdep,\n" +
" v.posizione AS posizione,\n" +
" mtb_depo_posizioni.priorita,\n" +
" v.cod_mgrp AS codGruppo,\n" +
" v.descrizione_gruppo AS Gruppo,\n" +
" v.cod_msgr AS CodSgruppo,\n" +
" v.descrizione_sottogruppo AS Sottogruppo,\n" +
" v.cod_mart,\n" +
" v.diacod,\n" +
" v.descrizione_estesa,\n" +
" v.partita_mag,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.cod_jcom,\n" +
" v.peso_netto_kg,\n" +
" v.peso_lordo_kg,\n" +
" v.cod_jfas,\n" +
" v.flag_qta_cnf_fissa,\n" +
" v.unt_mis,\n" +
" v.segno,\n" +
" v.barcode_ul,\n" +
" v.datetime_posizionamento\n" +
" FROM baseMtbColr v\n" +
"\n" +
" LEFT OUTER JOIN mtb_depo_posizioni\n" +
" ON v.cod_mdep = mtb_depo_posizioni.cod_mdep\n" +
" AND v.posizione = mtb_depo_posizioni.posizione)\n" +
"\n" +
"SELECT qta_col,\n" +
" num_cnf,\n" +
" qta_cnf,\n" +
" gestione,\n" +
" data_collo,\n" +
" ser_collo,\n" +
" num_collo,\n" +
" cod_mdep,\n" +
" posizione,\n" +
" priorita,\n" +
" codGruppo,\n" +
" Gruppo,\n" +
" CodSgruppo,\n" +
" Sottogruppo,\n" +
" cod_mart,\n" +
" diacod,\n" +
" descrizione_estesa,\n" +
" partita_mag,\n" +
" cod_col,\n" +
" cod_tagl,\n" +
" cod_jcom,\n" +
" peso_netto_kg,\n" +
" peso_lordo_kg,\n" +
" cod_jfas,\n" +
" flag_qta_cnf_fissa,\n" +
" unt_mis,\n" +
" segno,\n" +
" barcode_ul,\n" +
" datetime_posizionamento\n" +
"FROM final_stock");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -1,174 +0,0 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250630164505 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createOrUpdateView("mvw_sitart_udc_det_inventario", "CREATE VIEW [dbo].[mvw_sitart_udc_det_inventario] AS\n" +
"WITH baseMtbColr AS (SELECT c,\n" +
"\n" +
" ROUND(v.qta_col, cifre_dec) AS qta_col,\n" +
" ROUND(v.num_cnf, cifre_dec) AS num_cnf,\n" +
" IIF(flag_qta_cnf_fissa = 'S',\n" +
" v.qta_cnf_anag, v.qta_col / IIF(v.num_cnf = 0, 1, v.num_cnf)) AS qta_cnf,\n" +
" v.cod_mart,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.partita_mag,\n" +
" v.peso_netto_kg,\n" +
" v.peso_lordo_kg,\n" +
" mtb_colt.gestione,\n" +
" mtb_colt.data_collo,\n" +
" mtb_colt.ser_collo,\n" +
" mtb_colt.num_collo,\n" +
" v.cod_jcom,\n" +
" v.flag_qta_cnf_fissa,\n" +
" v.unt_mis,\n" +
" v.diacod,\n" +
" v.descrizione_estesa,\n" +
" v.cod_mgrp,\n" +
" mtb_grup.descrizione AS descrizione_gruppo,\n" +
" v.cod_msgr,\n" +
" mtb_sgrp.descrizione AS descrizione_sottogruppo,\n" +
" mtb_unt_mis.flag_dig,\n" +
" mtb_unt_mis.cifre_dec,\n" +
" mtb_colt.segno,\n" +
" v.cod_mdep,\n" +
" v.posizione,\n" +
" mtb_colt.cod_dtip,\n" +
" mtb_colt.cod_jfas,\n" +
" v.barcode_ul,\n" +
" v.qta_cnf_anag,\n" +
" MAX(mtb_colr.datetime_row) AS datetime_posizionamento\n" +
" FROM mvw_mtb_colr_with_giacenza v WITH (NOEXPAND)\n" +
" INNER JOIN mtb_colt\n" +
" ON v.barcode_ul = mtb_colt.barcode_ul\n" +
" LEFT OUTER JOIN mtb_colr ON\n" +
" v.barcode_ul = mtb_colr.barcode_ul_in AND\n" +
" v.cod_mart = mtb_colr.cod_mart AND\n" +
" ((v.partita_mag IS NULL AND mtb_colr.partita_mag IS NULL) OR\n" +
" (v.partita_mag = mtb_colr.partita_mag)) AND\n" +
" ((v.cod_col IS NULL AND mtb_colr.cod_col IS NULL) OR (v.cod_col = mtb_colr.cod_col)) AND\n" +
" ((v.cod_tagl IS NULL AND mtb_colr.cod_tagl IS NULL) OR (v.cod_tagl = mtb_colr.cod_tagl)) AND\n" +
" ((v.cod_jcom IS NULL AND mtb_colr.cod_jcom IS NULL) OR (v.cod_jcom = mtb_colr.cod_jcom)) AND\n" +
" ((v.posizione IS NULL AND mtb_colr.posizione_in IS NULL) OR (v.posizione = mtb_colr.posizione_in)) AND\n" +
" ((v.cod_mdep IS NULL AND mtb_colr.cod_mdep_in IS NULL) OR (v.cod_mdep = mtb_colr.cod_mdep_in)) AND\n" +
" ISNULL(mtb_colr.posizione_in, '') <> ISNULL(mtb_colr.posizione_out, '')\n" +
" INNER JOIN dbo.mtb_unt_mis ON v.unt_mis = mtb_unt_mis.unt_mis\n" +
"\n" +
" INNER JOIN dbo.mtb_grup ON v.cod_mgrp = mtb_grup.cod_mgrp\n" +
" INNER JOIN dbo.mtb_sgrp ON v.cod_mgrp = mtb_sgrp.cod_mgrp\n" +
" AND v.cod_msgr = mtb_sgrp.cod_msgr\n" +
" WHERE v.qta_col > 0\n" +
" AND (segno = 1 OR (segno = -1 AND cod_dtip IS NULL AND mtb_colt.gestione = 'V'))\n" +
" GROUP BY c,\n" +
" ROUND(v.qta_col, cifre_dec),\n" +
" ROUND(v.num_cnf, cifre_dec),\n" +
" IIF(flag_qta_cnf_fissa = 'S',\n" +
" v.qta_cnf_anag, v.qta_col / IIF(v.num_cnf = 0, 1, v.num_cnf)),\n" +
" v.cod_mart,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.partita_mag,\n" +
" v.peso_netto_kg,\n" +
" v.peso_lordo_kg,\n" +
" mtb_colt.gestione,\n" +
" mtb_colt.data_collo,\n" +
" mtb_colt.ser_collo,\n" +
" mtb_colt.num_collo,\n" +
" v.cod_jcom,\n" +
" v.flag_qta_cnf_fissa,\n" +
" v.unt_mis,\n" +
" v.diacod,\n" +
" v.descrizione_estesa,\n" +
" v.cod_mgrp,\n" +
" mtb_grup.descrizione,\n" +
" v.cod_msgr,\n" +
" mtb_sgrp.descrizione,\n" +
" mtb_unt_mis.flag_dig,\n" +
" mtb_unt_mis.cifre_dec,\n" +
" mtb_colt.segno,\n" +
" v.cod_mdep,\n" +
" v.posizione,\n" +
" mtb_colt.cod_dtip,\n" +
" mtb_colt.cod_jfas,\n" +
" v.barcode_ul,\n" +
" v.qta_cnf_anag),\n" +
" final_stock AS (SELECT v.qta_col,\n" +
" v.num_cnf,\n" +
" v.qta_cnf,\n" +
" v.gestione,\n" +
" v.data_collo,\n" +
" v.ser_collo,\n" +
" v.num_collo,\n" +
" v.cod_mdep AS cod_mdep,\n" +
" v.posizione AS posizione,\n" +
" mtb_depo_posizioni.priorita,\n" +
" v.cod_mgrp AS codGruppo,\n" +
" v.descrizione_gruppo AS Gruppo,\n" +
" v.cod_msgr AS CodSgruppo,\n" +
" v.descrizione_sottogruppo AS Sottogruppo,\n" +
" v.cod_mart,\n" +
" v.diacod,\n" +
" v.descrizione_estesa,\n" +
" v.partita_mag,\n" +
" v.cod_col,\n" +
" v.cod_tagl,\n" +
" v.cod_jcom,\n" +
" v.peso_netto_kg,\n" +
" v.peso_lordo_kg,\n" +
" v.cod_jfas,\n" +
" v.flag_qta_cnf_fissa,\n" +
" v.unt_mis,\n" +
" v.segno,\n" +
" v.barcode_ul,\n" +
" v.datetime_posizionamento\n" +
" FROM baseMtbColr v\n" +
"\n" +
" LEFT OUTER JOIN mtb_depo_posizioni\n" +
" ON v.cod_mdep = mtb_depo_posizioni.cod_mdep\n" +
" AND v.posizione = mtb_depo_posizioni.posizione)\n" +
"\n" +
"SELECT qta_col,\n" +
" num_cnf,\n" +
" qta_cnf,\n" +
" gestione,\n" +
" data_collo,\n" +
" ser_collo,\n" +
" num_collo,\n" +
" cod_mdep,\n" +
" posizione,\n" +
" priorita,\n" +
" codGruppo,\n" +
" Gruppo,\n" +
" CodSgruppo,\n" +
" Sottogruppo,\n" +
" cod_mart,\n" +
" diacod,\n" +
" descrizione_estesa,\n" +
" partita_mag,\n" +
" cod_col,\n" +
" cod_tagl,\n" +
" cod_jcom,\n" +
" peso_netto_kg,\n" +
" peso_lordo_kg,\n" +
" cod_jfas,\n" +
" flag_qta_cnf_fissa,\n" +
" unt_mis,\n" +
" segno,\n" +
" barcode_ul,\n" +
" datetime_posizionamento\n" +
"FROM final_stock");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -1,64 +0,0 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250714164813 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createOrUpdateFunction("WMS_GetUltimeConsegneClienti", "CREATE FUNCTION [dbo].[WMS_GetUltimeConsegneClienti](@numConsegnePerClie INT, @codAnag VARCHAR(5), @codMart VARCHAR(15),\n" +
" @codMdep VARCHAR(5), @daysDiff INT)\n" +
"/*Funzione che restituisce le ultime consegne effettuate per conto di un cliente con possibilitÃÆÃ  di filtrare per articolo/deposito.\n" +
"Se il cliente non viene passato allora la funzione restituirÃÆÃ  le ultime consegne di tutti i clienti. */\n" +
" RETURNS TABLE AS RETURN\n" +
" SELECT DISTINCT *\n" +
" FROM (SELECT dtb_doct.cod_anag,\n" +
" DENSE_RANK() OVER (PARTITION BY dtb_doct.cod_anag ORDER BY dtb_doct.cod_anag ASC, dtb_doct.data_doc DESC, dtb_doct.num_doc) AS counter_consegna,\n" +
" dtb_doct.cod_dtip,\n" +
" dtb_doct.data_doc,\n" +
" dtb_doct.ser_doc,\n" +
" dtb_doct.num_doc,\n" +
" dtb_doct.compilato_da,\n" +
" dtb_doct.rif_ord,\n" +
" dtb_doct.data_ord,\n" +
" vtb_dest.destinatario,\n" +
" vtb_dest.indirizzo,\n" +
" dtb_doct.data_iniz_trasp\n" +
" FROM dtb_doct\n" +
" INNER JOIN dtb_docr ON dtb_doct.cod_anag = dtb_docr.cod_anag AND\n" +
" dtb_doct.cod_dtip = dtb_docr.cod_dtip AND\n" +
" dtb_doct.num_doc = dtb_docr.num_doc AND\n" +
" dtb_doct.data_doc = dtb_docr.data_doc AND\n" +
" dtb_doct.ser_doc = dtb_docr.ser_doc\n" +
" INNER JOIN dtb_tipi ON dtb_doct.cod_dtip = dtb_tipi.cod_dtip\n" +
" LEFT OUTER JOIN vtb_dest\n" +
" ON dtb_doct.cod_anag = vtb_dest.cod_anag\n" +
" AND dtb_doct.cod_vdes = vtb_dest.cod_vdes\n" +
"\n" +
" WHERE dtb_doct.gestione = 'V'\n" +
" AND dtb_tipi.tipo_emissione = 'DIRETTA'\n" +
" AND dtb_tipi.segno_qta_scar = 1\n" +
" AND DATEDIFF(DAY, dtb_doct.data_doc, GETDATE()) <= @daysDiff\n" +
"\n" +
"\n" +
" AND (@codMdep IS NULL\n" +
" OR dtb_doct.cod_mdep = @codMdep)\n" +
" AND (@codMart IS NULL\n" +
" OR dtb_docr.cod_mart = @codMart)\n" +
" AND (@codAnag IS NULL\n" +
" OR dtb_doct.cod_anag = @codAnag)) grouped_consegne\n" +
" WHERE @numConsegnePerClie IS NULL\n" +
" OR grouped_consegne.counter_consegna <= @numConsegnePerClie");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -1,66 +0,0 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250715110408 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createOrUpdateFunction("WMS_GetUltimeConsegneClienti", "CREATE FUNCTION [dbo].[WMS_GetUltimeConsegneClienti](@numConsegnePerClie INT, @codAnag VARCHAR(5), @codVdes VARCHAR(5), @codMart VARCHAR(15),\n" +
" @codMdep VARCHAR(5), @daysDiff INT)\n" +
"/*Funzione che restituisce le ultime consegne effettuate per conto di un cliente con possibilitÃÆÃ  di filtrare per articolo/deposito.\n" +
"Se il cliente non viene passato allora la funzione restituirÃÆÃ  le ultime consegne di tutti i clienti. */\n" +
" RETURNS TABLE AS RETURN\n" +
" SELECT DISTINCT *\n" +
" FROM (SELECT dtb_doct.cod_anag,\n" +
" DENSE_RANK() OVER (PARTITION BY dtb_doct.cod_anag ORDER BY dtb_doct.cod_anag ASC, dtb_doct.data_doc DESC, dtb_doct.num_doc) AS counter_consegna,\n" +
" dtb_doct.cod_dtip,\n" +
" dtb_doct.data_doc,\n" +
" dtb_doct.ser_doc,\n" +
" dtb_doct.num_doc,\n" +
" dtb_doct.compilato_da,\n" +
" dtb_doct.rif_ord,\n" +
" dtb_doct.data_ord,\n" +
" vtb_dest.destinatario,\n" +
" vtb_dest.indirizzo,\n" +
" dtb_doct.data_iniz_trasp\n" +
" FROM dtb_doct\n" +
" INNER JOIN dtb_docr ON dtb_doct.cod_anag = dtb_docr.cod_anag AND\n" +
" dtb_doct.cod_dtip = dtb_docr.cod_dtip AND\n" +
" dtb_doct.num_doc = dtb_docr.num_doc AND\n" +
" dtb_doct.data_doc = dtb_docr.data_doc AND\n" +
" dtb_doct.ser_doc = dtb_docr.ser_doc\n" +
" INNER JOIN dtb_tipi ON dtb_doct.cod_dtip = dtb_tipi.cod_dtip\n" +
" LEFT OUTER JOIN vtb_dest\n" +
" ON dtb_doct.cod_anag = vtb_dest.cod_anag\n" +
" AND dtb_doct.cod_vdes = vtb_dest.cod_vdes\n" +
"\n" +
" WHERE dtb_doct.gestione = 'V'\n" +
" AND dtb_tipi.tipo_emissione = 'DIRETTA'\n" +
" AND dtb_tipi.segno_qta_scar = 1\n" +
" AND DATEDIFF(DAY, dtb_doct.data_doc, GETDATE()) <= @daysDiff\n" +
"\n" +
"\n" +
" AND (@codMdep IS NULL\n" +
" OR dtb_doct.cod_mdep = @codMdep)\n" +
" AND (@codMart IS NULL\n" +
" OR dtb_docr.cod_mart = @codMart)\n" +
" AND (@codAnag IS NULL\n" +
" OR dtb_doct.cod_anag = @codAnag)\n" +
" AND (@codVdes IS NULL\n" +
" OR dtb_doct.cod_vdes = @codVdes)) grouped_consegne\n" +
" WHERE @numConsegnePerClie IS NULL\n" +
" OR grouped_consegne.counter_consegna <= @numConsegnePerClie");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -1,28 +0,0 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250728125101 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
String reportNameScar = null;
String reportNameLav = null;
if (isCustomer(IntegryCustomer.RossoGargano)) {
reportNameScar = "ReportScaricoProdotto";
reportNameLav = "RiepilogoLavorazioniMateriaPrimaGrezza";
}
createSetup("PVM","PIAN_ACC_ROSSG","REPORT_NAME_RIEP_SCARICO_PRODOTTO",reportNameScar,"Nome report stampa riepilogo scarico prodotti (da tab omonima in pagina accettazione da campo)","REPORT_NAME");
createSetup("PVM","PIAN_ACC_ROSSG","REPORT_NAME_RIEP_LAV_MATERIALE",reportNameLav,"Nome report stampa riepilogo lavorazioni del giorno (da tab Laborazioni in pagina accettazione da campo)","REPORT_NAME");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,23 @@
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_20250827114912 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (isCustomerDb(IntegryCustomerDB.Ime_ImeTe) || isCustomerDb(IntegryCustomerDB.Materica_ImeBa)) {
updateSetupValue("W_PORDI_RC", "SETUP", "CHECK_DEP_TERZISTA", "S");
updateSetupValue("DTB_ORDT", "SETUP", "DISABLE_TRIGGER_ORDL", "S");
}
}
@Override
public void down() throws Exception {
}
}

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_20250827151739 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (existsColumn("dtb_ord_log_import", "id")) return;
executeStatement(
"exec dropPrimaryKey 'dtb_ord_log_import'",
"alter table dtb_ord_log_import add id bigint identity",
"alter table dtb_ord_log_import add constraint pk_dtb_ord_log_import primary key (id)");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,33 @@
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_20250828100041 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
executeStatement(
"alter table ntb_docr add val_sco_art numeric(20,5);",
"alter table mtb_depo_casse add last_idx int;",
"Create table ntb_docs ( " +
" id bigint identity not null, " +
" cod_mdep varchar(5) not null, " +
" cod_cassa varchar(5) not null, " +
" data_doc datetime not null, " +
" id_riga int not null, " +
" promozione varchar(40) not null , " +
" val_sco numeric(20,5) not null default 0); ",
"alter table ntb_docs add constraint pk_ntb_docs primary key (id)",
"alter table ntb_docs add constraint fk_ntb_docs_ntb_docr foreign key (cod_mdep, cod_cassa, data_doc, id_riga) references ntb_docr (cod_mdep, cod_cassa, data_doc, id_riga);"
);
}
@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_20250828145642 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createSetup("IMPORT_SCONTRINI", "MMPOS_SERVICES", "PROFILE_DB", null,
"Inserire il profile del db a cui collegarsi", false, null, false, false,
false, false, false, null, false, null);
if (isCustomerDb(IntegryCustomerDB.Carelli_Carelli) && isCustomerDb(IntegryCustomerDB.Carelli_GestFood) ) {
updateSetupValue("IMPORT_SCONTRINI", "MMPOS_SERVICES", "PROFILE_DB", "MMPOS");
}else if (isCustomerDb(IntegryCustomerDB.Carelli_Murgia) && isCustomerDb(IntegryCustomerDB.Carelli_GestFood) ) {
updateSetupValue("IMPORT_SCONTRINI", "MMPOS_SERVICES", "PROFILE_DB", "MMPOS_FORNO");
}
}
@Override
public void down() throws Exception {
}
}

View File

@@ -1,7 +1,7 @@
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.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250909162127 extends BaseMigration implements MigrationModelInterface {
@@ -10,8 +10,7 @@ public class Migration_20250909162127 extends BaseMigration implements Migration
public void up() throws Exception {
if (isHistoryDB())
return;
if (!isCustomerDb(IntegryCustomerDB.Biolevante_Biolevante))
if (!isCustomer(IntegryCustomer.Biolevante))
return;
executeStatement(

View File

@@ -0,0 +1,20 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250922095154 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
dropColumn("ntb_docr", "val_sco_art");
executeStatement("alter table ntb_docr add val_voucher numeric(20,5);");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,31 @@
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_20250922140309 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createSetup("IMPORT_SCONTRINI", "MMPOS_SERVICES", "IMPOSTA_DATI_ORDINE", "N",
"Imposta sulla riga dello scontrino i dati dell'ordine", false, null, false, false,
false, false, false, null, false, null);
createSetup("IMPORT_SCONTRINI", "MMPOS_SERVICES", "IMPOSTA_KIT", "N",
"Imposta sulla riga dello scontrino il codice del kit ( menu ) ", false, null, false, false,
false, false, false, null, false, null);
if ( isCustomerDb(IntegryCustomerDB.Carelli_Murgia)) {
updateSetupValue("IMPORT_SCONTRINI", "MMPOS_SERVICES", "IMPOSTA_DATI_ORDINE", "S");
updateSetupValue("IMPORT_SCONTRINI", "MMPOS_SERVICES", "IMPOSTA_KIT", "S");
}
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,48 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250926125635 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createSetup("IMPORT_SCONTRINI", "MMPOS", "ATTIVO", "N",
"Inserire S/N per attivare/disattivare il tipo di importazione", false, null, false, false,
false, false, false, null, false, null);
createSetup("IMPORT_SCONTRINI", "MMPOS", "EMAIL_FOR_LOG", null,
"Inserire il file l'indirizzo email per inviare il log dell'importazione", false, null, false, false,
false, false, false, null, false, null);
createSetup("IMPORT_SCONTRINI", "MMPOS", "FILE_FILTER", null,
"Inserire il criterio di filtro dei file o il nome del file specifio (seguire la sintassi di java)", false, null, false, false,
false, false, false, null, false, null);
createSetup("IMPORT_SCONTRINI", "MMPOS", "GG_CANC_FILE", null,
"Giorni per la cancellazione dei file dalla cartella di appoggio", false, null, false, false,
false, false, false, null, false, null);
createSetup("IMPORT_SCONTRINI", "MMPOS", "IMPORT_REST", "S",
"Inserire S/N per attivare/disattivare il salvataggio con i servizi REST", false, null, false, false,
false, false, false, null, false, null);
createSetup("IMPORT_SCONTRINI", "MMPOS", "LISTENING", "N",
"Se LISTENIG = 'N' la procedura di importazione non si potrà mai mettere in ascolto sulla directory perchè nella procedura vengono prese in considerazione più file.", false, null, false, false,
false, false, false, null, false, null);
createSetup("IMPORT_SCONTRINI", "MMPOS", "PATH_FILE", null,
"Directory contente i file da importare.", false, null, false, false,
false, false, false, null, false, null);
createSetup("IMPORT_SCONTRINI", "MMPOS", "PATH_FILE_IMPORTED", null,
"Directory dove vengono spostati i file dopo l'importazione.", false, null, false, false,
false, false, false, null, false, null);
if (isCustomer(IntegryCustomer.Carelli))
updateSetupValue("IMPORT_SCONTRINI", "MMPOS", "ATTIVO", "S");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,28 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250926131536 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createSetup("IMPORT_SCONTRINI", "MMPOS_SERVICES", "COD_VOUCHER", null,
"elenco dei codici utilizzati per i voucher ( separati da |)", false, null, false, false,
false, false, false, null, false, null);
if ( isCustomer(IntegryCustomer.Carelli))
updateSetupValue("IMPORT_SCONTRINI", "MMPOS_SERVICES", "COD_VOUCHER", "655783_0-L");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,281 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
import it.integry.ems_model.utility.dto.IndexTableDTO;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class Migration_20250929172222 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (isCustomer(IntegryCustomer.Idrotecnica) || isCustomer(IntegryCustomer.Sabato) || isCustomer(IntegryCustomer.Ime) ||
isCustomer(IntegryCustomer.Materica) || isCustomer(IntegryCustomer.Lippolis) || isCustomer(IntegryCustomer.Integry)){
//Creo uno script SQL per cancellare e ricreare le FK che punteranno a stb_activity_old
String fixFkSqlScript = "SELECT fk.name AS FK_Name,\n" +
" OBJECT_NAME(fk.parent_object_id) AS FK_Table,\n" +
" c1.name AS FK_Column,\n" +
" OBJECT_NAME(fk.referenced_object_id) AS Ref_Table,\n" +
" c2.name AS Ref_Column,\n" +
" 'ALTER TABLE [' + OBJECT_NAME(fk.parent_object_id) +\n" +
" '] DROP CONSTRAINT [' + fk.name + ']; ' +\n" +
" 'ALTER TABLE [' + OBJECT_NAME(fk.parent_object_id) +\n" +
" '] WITH CHECK ADD CONSTRAINT [' + fk.name +\n" +
" '] FOREIGN KEY([' + c1.name +\n" +
" ']) REFERENCES [dbo].[stb_activity]([' + c2.name + ']);' AS FixScript\n" +
"FROM sys.foreign_keys fk\n" +
" INNER JOIN sys.foreign_key_columns fkc ON fkc.constraint_object_id = fk.object_id\n" +
" INNER JOIN sys.columns c1 ON fkc.parent_object_id = c1.object_id AND fkc.parent_column_id = c1.column_id\n" +
" INNER JOIN sys.columns c2\n" +
" ON fkc.referenced_object_id = c2.object_id AND fkc.referenced_column_id = c2.column_id\n" +
"WHERE fk.referenced_object_id = OBJECT_ID('dbo.stb_activity');";
final List<HashMap<String, Object>> fixScriptResult = executeQuery(fixFkSqlScript);
String[] fixScripts = new String[0];
if (fixScriptResult != null && !fixScriptResult.isEmpty()) {
fixScripts = fixScriptResult.stream()
.map(x -> (String) x.get("FixScript"))
.toArray(String[]::new);
}
executeStatement("CREATE TABLE dbo.stb_activity_new\n" +
"(\n" +
" activity_id VARCHAR(15) NOT NULL\n" +
" CONSTRAINT pk_stb_activity_new\n" +
" PRIMARY KEY NONCLUSTERED\n" +
" WITH (FILLFACTOR = 90),\n" +
" data_ins_act DATETIME NOT NULL,\n" +
" activity_type_id VARCHAR(40) NOT NULL,\n" +
" activity_description VARCHAR(1024),\n" +
" parent_activity_id VARCHAR(15),\n" +
" user_name VARCHAR(40) NOT NULL\n" +
" CONSTRAINT fk_stb_activity_new_stb_user\n" +
" REFERENCES dbo.stb_user,\n" +
" tipo_anag VARCHAR,\n" +
" cod_anag VARCHAR(15),\n" +
" estimated_date DATETIME,\n" +
" estimated_time DATETIME,\n" +
" alarm_date DATETIME,\n" +
" alarm_time DATETIME,\n" +
" effective_date DATETIME,\n" +
" effective_time DATETIME,\n" +
" activity_result_id VARCHAR(15)\n" +
" CONSTRAINT fk_stb_activity_new_stb_activity_new_res\n" +
" REFERENCES dbo.stb_activity_result,\n" +
" result_description VARCHAR(1024),\n" +
" estimated_enddate DATETIME,\n" +
" estimated_endtime DATETIME,\n" +
" effective_enddate DATETIME,\n" +
" effective_endtime DATETIME,\n" +
" cod_jcom VARCHAR(10)\n" +
" CONSTRAINT fk_stb_activity_new_jtb_comt\n" +
" REFERENCES dbo.jtb_comt,\n" +
" user_creator VARCHAR(40),\n" +
" cod_jfas VARCHAR(5) DEFAULT NULL\n" +
" CONSTRAINT fk_stb_activity_new_jtb_fasi\n" +
" REFERENCES dbo.jtb_fasi,\n" +
" perc_comp NUMERIC(15, 5)\n" +
" DEFAULT 0 NOT NULL,\n" +
" estimated_hours NUMERIC(15, 5)\n" +
" DEFAULT 0 NOT NULL,\n" +
" cod_mart VARCHAR(15)\n" +
" CONSTRAINT fk_stb_activity_new_mtb_aart\n" +
" REFERENCES dbo.mtb_aart,\n" +
" matricola VARCHAR(20)\n" +
" CONSTRAINT fk_stb_activity_new_matricola\n" +
" REFERENCES dbo.vtb_amac,\n" +
" priorita INT,\n" +
" activity_play_counter NUMERIC(20, 5) DEFAULT 0 NOT NULL,\n" +
" flag_tipologia VARCHAR NOT NULL,\n" +
" activity_event VARCHAR(1024),\n" +
" guarantee VARCHAR,\n" +
" note VARCHAR(1024),\n" +
" rfid VARCHAR(40),\n" +
" id_lotto INT,\n" +
" persona_rif VARCHAR(40),\n" +
" hr_num INT,\n" +
" gestione VARCHAR,\n" +
" data_ord DATETIME,\n" +
" num_ord INT,\n" +
" id_step INT,\n" +
" id_riga INT,\n" +
" ora_ins_act DATETIME,\n" +
" indice_gradimento NUMERIC(20, 5) DEFAULT 0,\n" +
" note_gradimento VARCHAR(8000),\n" +
" flag_risolto VARCHAR DEFAULT 'N',\n" +
" user_modifier VARCHAR(40),\n" +
" ora_mod_act DATETIME,\n" +
" ora_view_act DATETIME,\n" +
" cod_vdes VARCHAR(5),\n" +
" partita_mag VARCHAR(20),\n" +
" cod_cmac VARCHAR(20),\n" +
" wrike_id VARCHAR(8000),\n" +
" cod_mgrp VARCHAR(5)\n" +
" CONSTRAINT stb_activity_new_mtb_grup_cod_mgrp_fk\n" +
" REFERENCES dbo.mtb_grup,\n" +
" plan_id BIGINT\n" +
" CONSTRAINT fk_stb_activity_new_stb_activity_new_plan\n" +
" REFERENCES dbo.stb_activity_plan,\n" +
" id_posizione BIGINT\n" +
" CONSTRAINT fk_stb_activity_new_stb_posizioni\n" +
" REFERENCES dbo.stb_posizioni,\n" +
" CONSTRAINT fk_stb_activity_new_tipologia\n" +
" FOREIGN KEY (activity_type_id, flag_tipologia) REFERENCES dbo.stb_activity_type\n" +
")\n"
,
"CREATE INDEX ix_activity_effective\n" +
" ON dbo.stb_activity_new (activity_id, effective_date, effective_time, effective_enddate, effective_endtime)\n" +
" WITH (FILLFACTOR = 90)\n" ,
"CREATE INDEX ix_activity_estimate\n" +
" ON dbo.stb_activity_new (activity_id, estimated_date, estimated_time, estimated_enddate, estimated_endtime)\n" +
" WITH (FILLFACTOR = 90)\n" ,
"CREATE INDEX ix_activity_result_id\n" +
" ON dbo.stb_activity_new (activity_result_id)\n" +
" WITH (FILLFACTOR = 90)\n" ,
"CREATE INDEX ix_activity_type_id\n" +
" ON dbo.stb_activity_new (activity_type_id, flag_tipologia)\n" +
" WITH (FILLFACTOR = 90)\n" ,
"CREATE INDEX ix_stb_activity_new_cod_jcom\n" +
" ON dbo.stb_activity_new (cod_jcom)\n" +
" WITH (FILLFACTOR = 90)\n",
"CREATE INDEX ix_stb_activity_new_cod_jfas\n" +
" ON dbo.stb_activity_new (cod_jfas)\n" +
" WITH (FILLFACTOR = 90)\n" ,
"CREATE INDEX ix_stb_activity_new_cod_mart\n" +
" ON dbo.stb_activity_new (cod_mart)\n" +
" WITH (FILLFACTOR = 90)\n",
"CREATE INDEX ix_stb_activity_new_parent_activity_id\n" +
" ON dbo.stb_activity_new (parent_activity_id)\n" +
" WITH (FILLFACTOR = 90)\n",
"CREATE INDEX ix_stb_activity_new_stb_activity_new\n" +
" ON dbo.stb_activity_new (parent_activity_id)\n" +
" WITH (FILLFACTOR = 90)\n" ,
"CREATE INDEX ix_stb_activity_new_stb_activity_new_res\n" +
" ON dbo.stb_activity_new (activity_result_id)\n" +
" WITH (FILLFACTOR = 90)\n",
"CREATE INDEX ix_stb_activity_new_stb_user\n" +
" ON dbo.stb_activity_new (user_name)\n" +
" WITH (FILLFACTOR = 90)\n" ,
"CREATE INDEX ix_stb_activity_new_user_name\n" +
" ON dbo.stb_activity_new (user_name)\n" +
" WITH (FILLFACTOR = 90)\n" ,
"CREATE INDEX ix_stb_activivty_priorita\n" +
" ON dbo.stb_activity_new (priorita)\n" +
" WITH (FILLFACTOR = 90)\n" ,
"CREATE INDEX stb_activity_new\n" +
" ON dbo.stb_activity_new (activity_type_id)\n" +
" WITH (FILLFACTOR = 90)\n" ,
"insert into stb_activity_new " +
"select * from stb_activity",
"EXEC sp_rename 'dbo.stb_activity', 'stb_activity_old';",
"EXEC sp_rename 'dbo.stb_activity_new', 'stb_activity';"
);
executeStatement(fixScripts);
}
dropIndex("stb_activity", "ix_stb_activity_raplav");
dropIndex("stb_activity", "ix_stb_activity_effective_date");
dropIndex("stb_activity", "ix_activity_effective");
dropIndex("stb_activity", "ix_activity_estimate");
dropIndex("stb_activity", "ix_stb_activity_alarm");
executeStatement(
"UPDATE stb_activity\n" +
"SET\n" +
" estimated_time = ISNULL(estimated_time, estimated_date),\n" +
" estimated_endtime = ISNULL(estimated_endtime, estimated_enddate),\n" +
" effective_time = ISNULL(effective_time, effective_date),\n" +
" effective_endtime = ISNULL(effective_endtime, effective_enddate),\n" +
" alarm_time = ISNULL(alarm_time, alarm_date)\n" +
"WHERE(\n" +
" estimated_time IS NULL\n" +
" OR estimated_endtime IS NULL\n" +
" OR effective_time IS NULL\n" +
" OR effective_endtime IS NULL\n" +
" OR alarm_time IS NULL\n" +
" );\n",
"alter table stb_activity drop column data_ins_act ",
"alter table stb_activity drop column estimated_date ",
"alter table stb_activity drop column alarm_date ",
"alter table stb_activity drop column effective_date ",
"alter table stb_activity drop column estimated_enddate ",
"alter table stb_activity drop column effective_enddate ",
"alter table stb_activity add data_ins_act as cast(ora_ins_act as date) ",
"alter table stb_activity add estimated_date as cast(estimated_time as date) ",
"alter table stb_activity add alarm_date as cast(alarm_time as date) ",
"alter table stb_activity add effective_date as cast(effective_time as date) ",
"alter table stb_activity add estimated_enddate as cast(estimated_endtime as date) ",
"alter table stb_activity add effective_enddate as cast(effective_endtime as date) ");
List<IndexTableDTO.ColumnIndex> columnsIndex = new ArrayList<>();
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("alarm_time"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("alarm_date"));
createIndex(new IndexTableDTO()
.setTableName("stb_activity")
.setIndexName("ix_stb_activity_alarm")
.setColumnsIndex(columnsIndex));
columnsIndex = new ArrayList<>();
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("activity_id"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("estimated_date"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("estimated_time"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("estimated_enddate"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("estimated_endtime"));
createIndex(new IndexTableDTO()
.setTableName("stb_activity")
.setIndexName("ix_activity_estimate")
.setColumnsIndex(columnsIndex));
columnsIndex = new ArrayList<>();
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("activity_id"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("effective_date"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("effective_enddate"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("effective_time"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("effective_endtime"));
createIndex(new IndexTableDTO()
.setTableName("stb_activity")
.setIndexName("ix_activity_effective")
.setColumnsIndex(columnsIndex));
columnsIndex = new ArrayList<>();
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("data_ins_act"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("flag_tipologia"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("activity_type_id"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("cod_jcom"));
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("cod_jfas"));
createIndex(new IndexTableDTO()
.setTableName("stb_activity")
.setIndexName("ix_stb_activity_raplav")
.setColumnsIndex(columnsIndex));
columnsIndex = new ArrayList<>();
columnsIndex.add(new IndexTableDTO.ColumnIndex().setColumnName("effective_date"));
createIndex(new IndexTableDTO()
.setTableName("stb_activity")
.setIndexName("stb_activity_effective_date")
.setColumnsIndex(columnsIndex));
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,32 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251002130813 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
executeStatement("update stb_gest_setup set flag_setup_depo = 'S'\n" +
"where gest_name = 'IMPORT_SCONTRINI'\n" +
"and key_section = 'ATTIVO'\n" +
"and section = 'MMPOS'");
enableSaveToRest("nvdoct");
if (isCustomer(IntegryCustomer.Carelli)) {
executeStatement("UPDATE stb_gest_setup SET value = 'N'\n" +
"where gest_name = 'IMPORT_SCONTRINI'\n" +
"and key_section = 'ATTIVO'\n" +
"and section not in ('INTEGRETAIL', 'MMPOS_SERVICES', 'MMPOS')");
}
}
@Override
public void down() throws Exception {
}
}

View File

@@ -11,6 +11,9 @@ public class Migration_20251002154118 extends BaseMigration implements Migration
if (isHistoryDB())
return;
if (isDMS())
return;
if (isCustomerDb(IntegryCustomerDB.Carelli_Winact)) {
executeStatement(
"ALTER TABLE mtb_aart\n" +

View File

@@ -0,0 +1,19 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251006091145 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
executeStatement("exec sp_rename 'ntb_docr.val_voucher', 'val_sco_st'");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,345 @@
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_20251006171357 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (!isCustomerDb(IntegryCustomerDB.Biolevante_Biolevante)) return;
createOrUpdateView("mvw_TracciabRintracciabProd", "CREATE view [dbo].[mvw_TracciabRintracciabProd] as\n" +
"SELECT produzioni.cod_mart AS idart,\n" +
" produzioni.partita_mag AS idlotto,\n" +
" 1 AS grupporighe,\n" +
" ROW_NUMBER() OVER (PARTITION BY produzioni.cod_mart, produzioni.partita_mag ORDER BY item_id) AS riga,\n" +
" produzioni.data_produzione AS data_reg,\n" +
" primocarico.data_reg_provenienza,\n" +
" CASE WHEN livello > 0 THEN ' ' ELSE '' END + conto AS cod_mart,\n" +
" CASE WHEN livello > 0 THEN ' ' ELSE '' END + dettaglio_conto AS partita_mag,\n" +
" primocarico.cod_dtip AS cod_dtip,\n" +
" primocarico.tipodocumento AS tipodoc,\n" +
" descrizione_conto AS descrizione_estesa,\n" +
" mtb_aart.unt_mis,\n" +
" 0 AS qta_car,\n" +
" qta_consumata AS qta_scar,\n" +
" primocarico.data_doc,\n" +
" primocarico.ser_doc,\n" +
" primocarico.num_doc,\n" +
" primocarico.cod_anag,\n" +
" primocarico.rag_soc,\n" +
" primocarico.part_iva,\n" +
" primocarico.citta,\n" +
" tracc.cod_prod AS codprodotto,\n" +
" tracc.partita_mag AS partita_mag_prod,\n" +
" primocarico.nazione_prov\n" +
"FROM mtb_aart,\n" +
" (SELECT mtb_aart.cod_mgrp,\n" +
" mtb_aart.cod_msgr,\n" +
" mtb_aart.cod_msfa,\n" +
" MAX(dtb_docr.data_doc) AS data_produzione,\n" +
" dtb_docr.cod_mart,\n" +
" mtb_aart.descrizione_estesa,\n" +
" partita_mag,\n" +
" SUM(qta_doc * rap_conv) AS qta_prod\n" +
" FROM dtb_docr\n" +
" INNER JOIN dtb_tipi ON dtb_docr.cod_dtip = dtb_tipi.cod_dtip\n" +
" INNER JOIN mtb_aart ON dtb_docr.cod_mart = mtb_aart.cod_mart\n" +
" WHERE gestione = 'L'\n" +
" AND segno_qta_car > 0\n" +
" AND tipo_emissione = 'DIRETTA'\n" +
" AND data_doc >= '2021/01/01'\n" +
" GROUP BY mtb_aart.cod_mgrp, mtb_aart.cod_msgr, mtb_aart.cod_msfa,\n" +
" dtb_docr.cod_mart,\n" +
" mtb_aart.descrizione_estesa,\n" +
" partita_mag) produzioni\n" +
" CROSS APPLY [f_pp_consuntivo_prod_tracc](produzioni.cod_mart, produzioni.partita_mag, produzioni.qta_prod,\n" +
" produzioni.cod_mart, produzioni.partita_mag, produzioni.qta_prod, 0,\n" +
" '', 0) tracc\n" +
" LEFT OUTER JOIN\n" +
" (SELECT DISTINCT mtb_movi.cod_anag,\n" +
" gtb_anag.rag_soc,\n" +
" gtb_anag.part_iva,\n" +
" gtb_anag.citta,\n" +
" mtb_movi.cod_dtip,\n" +
" dtb_tipi.descrizione AS tipodocumento,\n" +
" mtb_movi.data_reg AS data_reg_provenienza,\n" +
" mtb_movi.data_doc,\n" +
" mtb_movi.ser_doc,\n" +
" mtb_movi.num_doc,\n" +
" mtb_movi.cod_mart,\n" +
" mtb_movi.partita_mag,\n" +
" ISNULL(gtb_nazi.cod_nazione_iso, mtb_partita_mag.nazione_prov) AS nazione_prov\n" +
" FROM gtb_anag\n" +
" INNER JOIN\n" +
" mtb_movi ON mtb_movi.cod_anag = gtb_anag.cod_anag\n" +
" INNER JOIN dtb_tipi ON mtb_movi.cod_dtip = dtb_tipi.cod_dtip\n" +
" INNER JOIN\n" +
" (SELECT mtb_movi.cod_mart, mtb_movi.partita_mag, MIN(num_mov) AS num_mov\n" +
" FROM mtb_movi\n" +
" INNER JOIN\n" +
" (SELECT cod_mart, partita_mag, MIN(data_reg) AS data_reg\n" +
" FROM mtb_movi\n" +
" WHERE gestione IN ('A', 'L') AND qta_car > 0\n" +
" OR gestione = 'V' AND qta_scar > 0\n" +
" GROUP BY cod_mart, partita_mag) q ON mtb_movi.data_reg = q.data_reg\n" +
" AND mtb_movi.cod_mart = q.cod_mart\n" +
" AND mtb_movi.partita_mag = q.partita_mag\n" +
" WHERE gestione IN ('A', 'L')\n" +
" AND qta_car > 0\n" +
" GROUP BY mtb_movi.cod_mart, mtb_movi.partita_mag) q\n" +
" ON mtb_movi.num_mov = q.num_mov\n" +
" AND mtb_movi.cod_mart = q.cod_mart\n" +
" AND mtb_movi.partita_mag = q.partita_mag\n" +
" LEFT OUTER JOIN mtb_partita_mag ON mtb_movi.cod_mart = mtb_partita_mag.cod_mart\n" +
" AND mtb_movi.partita_mag = mtb_partita_mag.partita_mag\n" +
" LEFT OUTER JOIN gtb_nazi ON mtb_partita_mag.nazione_prov = gtb_nazi.nazione) primocarico\n" +
" ON tracc.conto = primocarico.cod_mart AND tracc.dettaglio_conto = primocarico.partita_mag\n" +
"\n" +
"WHERE tracc.conto = mtb_aart.cod_mart\n" +
" AND tracc.livello < 30\n" +
"UNION ALL\n" +
"SELECT dtb_docr.cod_mart AS idart,\n" +
" dtb_docr.partita_mag AS idlotto,\n" +
" 2 AS grupporighe,\n" +
" 1 AS riga,\n" +
" dtb_doct.data_reg,\n" +
" dtb_doct.data_reg AS data_reg_provenienza,\n" +
" dtb_docr.cod_mart,\n" +
" dtb_docr.partita_mag,\n" +
" dtb_doct.cod_dtip cod_dtip,\n" +
" ISNULL(docpadre.descrizione, dtb_tipi.descrizione) AS tipodoc,\n" +
" mtb_aart.descrizione_estesa,\n" +
" mtb_aart.unt_mis AS unt_mis,\n" +
" SUM(dtb_docr.qta_doc * rap_conv * segno_qta_car) AS qta_car,\n" +
" 0 AS qta_scar,\n" +
" (dtb_doct.data_doc) data_doc,\n" +
" (dtb_doct.ser_doc) ser_doc,\n" +
" (dtb_doct.num_doc) num_doc,\n" +
" (dtb_docr.cod_anag) cod_anag,\n" +
" (gtb_anag.rag_soc) AS rag_soc,\n" +
" (gtb_anag.part_iva) AS part_iva,\n" +
" (gtb_anag.citta) AS citta,\n" +
" NULL AS cod_prod,\n" +
" NULL AS partita_mag_prod,\n" +
" NULL AS nazione_prov\n" +
"FROM dtb_doct\n" +
" INNER JOIN dtb_docr ON dtb_doct.cod_anag = dtb_docr.cod_anag\n" +
" AND dtb_doct.cod_dtip = dtb_docr.cod_dtip\n" +
" AND dtb_doct.data_doc = dtb_docr.data_doc\n" +
" AND dtb_doct.ser_doc = dtb_docr.ser_doc\n" +
" AND dtb_doct.num_doc = dtb_docr.num_doc\n" +
" INNER JOIN dtb_tipi ON dtb_docr.cod_dtip = dtb_tipi.cod_dtip\n" +
" INNER JOIN mtb_aart ON dtb_docr.cod_mart = mtb_aart.cod_mart\n" +
" INNER JOIN gtb_anag ON dtb_docr.cod_anag = gtb_anag.cod_anag\n" +
" LEFT OUTER JOIN\n" +
" (SELECT CASE\n" +
" WHEN dtb_tipi.gestione IN ('A', 'L') AND segno_qta_car = 1 THEN 'CARICO DA ACQUISTO/ALTRO STABILIMENTO'\n" +
" WHEN dtb_tipi.gestione = 'L' AND segno_qta_scar = 1 THEN 'SCARICO A LAVORAZIONE'\n" +
" ELSE\n" +
" dtb_tipi.descrizione END descrizione,\n" +
" dtb_docr.activity_id_row\n" +
" FROM dtb_docr\n" +
" INNER JOIN\n" +
" dtb_tipi ON dtb_docr.cod_dtip = dtb_tipi.cod_dtip\n" +
" WHERE dtb_docr.activity_id_row IS NOT NULL\n" +
" AND dtb_docr.activity_id_row <> ''\n" +
" AND dtb_tipi.tipo_emissione = 'DIRETTA') docpadre ON dtb_doct.activity_id = docpadre.activity_id_row\n" +
"WHERE dtb_doct.gestione IN ('L', 'A')\n" +
" AND tipo_emissione = 'DIRETTA'\n" +
" AND segno_qta_car > 0\n" +
" AND dtb_doct.data_doc >= '2021/01/01'\n" +
"GROUP BY dtb_doct.data_reg, dtb_docr.cod_mart, dtb_docr.partita_mag, dtb_doct.cod_dtip, dtb_tipi.descrizione,\n" +
" mtb_aart.descrizione_estesa,\n" +
" dtb_doct.data_doc, dtb_doct.ser_doc, dtb_doct.num_doc,\n" +
" dtb_docr.cod_anag, gtb_anag.rag_soc, gtb_anag.part_iva, gtb_anag.citta, mtb_aart.unt_mis,\n" +
" docpadre.descrizione\n" +
"\n" +
"UNION ALL\n" +
"\n" +
"\n" +
"--Scarichi e rintracciabilità\n" +
"SELECT produzioni.cod_mart AS idart,\n" +
" produzioni.partita_mag AS idlotto,\n" +
" 3 AS grupporighe,\n" +
" rintra.riga,\n" +
" data_reg AS data_reg,\n" +
" data_reg AS data_reg_provenienza,\n" +
" rintra.cod_mart,\n" +
" rintra.partita_mag,\n" +
" rintra.cod_dtip,\n" +
" dtb_tipi.descrizione AS tipodoc,\n" +
" mtb_aart.descrizione_estesa,\n" +
" produzioni.unt_mis,\n" +
" qta_car,\n" +
" qta_scar,\n" +
" data_doc,\n" +
" ser_doc,\n" +
" num_doc,\n" +
" rintra.cod_anag,\n" +
" gtb_anag.rag_soc,\n" +
" gtb_anag.part_iva,\n" +
" gtb_anag.citta AS citta,\n" +
" cod_prod,\n" +
" partita_mag_prod,\n" +
" NULL AS nazione_prov\n" +
"FROM (SELECT dtb_docr.cod_mart,\n" +
" partita_mag AS partita_mag,\n" +
" mtb_aart.unt_mis AS unt_mis,\n" +
" SUM(qta_doc * rap_conv) AS qta_prod\n" +
" FROM dtb_docr\n" +
" INNER JOIN dtb_tipi ON dtb_docr.cod_dtip = dtb_tipi.cod_dtip\n" +
" INNER JOIN mtb_aart ON dtb_docr.cod_mart = mtb_aart.cod_mart\n" +
" WHERE gestione IN ('L', 'A')\n" +
" AND segno_qta_car > 0\n" +
" AND dtb_docr.cod_dtip NOT IN ('RET', 'INV')\n" +
" AND dtb_docr.data_doc >= '2021/01/01'\n" +
" GROUP BY dtb_docr.cod_mart, partita_mag, mtb_aart.unt_mis) produzioni\n" +
" CROSS APPLY dbo.f_pp_consuntivo_prod_rintrac(produzioni.cod_mart, produzioni.partita_mag, '', 0, 1) rintra\n" +
" INNER JOIN dtb_tipi ON rintra.cod_dtip = dtb_tipi.cod_dtip\n" +
" INNER JOIN gtb_anag ON rintra.cod_anag = gtb_anag.cod_anag\n" +
" INNER JOIN mtb_aart ON rintra.cod_mart = mtb_aart.cod_mart");
createOrUpdateView("mvw_TracciabRintracciabProd_old", "CREATE view [dbo].[mvw_TracciabRintracciabProd_old] as\n" +
"Select produzioni.cod_mart as IDArt, \n" +
" produzioni.partita_mag as IDLotto, \n" +
" 1 as GruppoRighe, \n" +
" ROW_NUMBER() over (partition by produzioni.cod_mart, produzioni.partita_mag order by item_id) as riga,\n" +
" produzioni.data_produzione as data_reg, \n" +
" PrimoCarico.data_reg_provenienza,\n" +
" case when livello > 0 then ' ' else '' end + conto as cod_mart, \n" +
" case when livello > 0 then ' ' else '' end + dettaglio_conto as partita_mag, \n" +
" PrimoCarico.cod_dtip as cod_dtip, PrimoCarico.Tipodocumento as tipoDoc, \n" +
" descrizione_conto as descrizione_estesa, \n" +
" mtb_aart.unt_mis, \n" +
" 0 as qta_car, qta_consumata as qta_Scar,\n" +
" PrimoCarico.data_doc, PrimoCarico.ser_doc, PrimoCarico.num_doc, PrimoCarico.cod_anag, PrimoCarico.rag_soc, PrimoCarico.part_iva, PrimoCarico.citta,\n" +
" tracc.cod_prod as codProdotto, tracc.partita_mag as partita_mag_prod,\n" +
" PrimoCarico.nazione_prov\n" +
" from mtb_aart,\n" +
" (\n" +
" select mtb_aart.cod_mgrp, mtb_aart.cod_msgr, mtb_aart.cod_msfa, \n" +
" max(dtb_docr.data_doc) as data_produzione, dtb_docr.cod_mart, \n" +
" mtb_aart.descrizione_estesa, \n" +
" partita_mag,\n" +
" SUM(qta_doc*rap_conv) as qta_prod\n" +
" from dtb_docr, dtb_tipi, mtb_aart\n" +
" where gestione = 'L' and dtb_docr.cod_dtip = dtb_tipi.cod_dtip and dtb_docr.cod_mart = mtb_aart.cod_mart and\n" +
" segno_qta_car > 0 and tipo_emissione = 'DIRETTA'\n" +
" and data_doc >= '2021/01/01'\n" +
" group by mtb_aart.cod_mgrp, mtb_aart.cod_msgr, mtb_aart.cod_msfa, \n" +
" dtb_docr.cod_mart, \n" +
" mtb_aart.descrizione_estesa, \n" +
" partita_mag \n" +
" ) produzioni cross apply [f_pp_consuntivo_prod_tracc](produzioni.cod_mart,produzioni.partita_mag,produzioni.qta_prod,produzioni.cod_mart,produzioni.partita_mag,produzioni.qta_prod,0,'',0) tracc\n" +
" left outer join\n" +
" (select distinct mtb_movi.cod_anag, gtb_anag.rag_soc, gtb_anag.part_iva, gtb_anag.citta, mtb_movi.cod_dtip, dtb_tipi.descrizione as Tipodocumento,\n" +
" mtb_movi.data_reg as data_reg_provenienza, \n" +
" mtb_movi.data_doc, mtb_movi.ser_doc, mtb_movi.num_doc, mtb_movi.cod_mart, mtb_movi.partita_mag,\n" +
" mtb_partita_mag.nazione_prov\n" +
" from gtb_anag, mtb_movi left outer join mtb_partita_mag on mtb_movi.cod_mart = mtb_partita_mag.cod_mart\n" +
" and mtb_movi.partita_mag = mtb_partita_mag.partita_mag,\n" +
" dtb_tipi,\n" +
" (\n" +
" select mtb_movi.cod_mart, mtb_movi.partita_mag, min(num_mov) as num_mov \n" +
" from mtb_movi,\n" +
" (Select cod_mart, partita_mag, min(data_reg) as data_reg\n" +
" from mtb_movi where gestione in ('A','L') and qta_car > 0 or gestione = 'V' and qta_Scar > 0\n" +
" group by cod_mart, partita_mag\n" +
" ) q\n" +
" where mtb_movi.data_reg =q.data_reg and mtb_movi.cod_mart = q.cod_mart and mtb_movi.partita_mag = q.partita_mag \n" +
" and gestione in ('A','L') and qta_car > 0 \n" +
" group by mtb_movi.cod_mart, mtb_movi.partita_mag\n" +
" )q\n" +
" \n" +
" where mtb_movi.cod_anag = gtb_anag.cod_anag and\n" +
" mtb_movi.cod_dtip = dtb_tipi.cod_dtip and\n" +
" mtb_movi.num_mov = q.num_mov and mtb_movi.cod_mart = q.cod_mart and mtb_movi.partita_mag = q.partita_mag\n" +
" )PrimoCarico on tracc.conto = PrimoCarico.cod_mart and tracc.dettaglio_conto = primoCarico.partita_mag\n" +
" \n" +
" where tracc.conto = mtb_aart.cod_mart and\n" +
" tracc.livello < 30\n" +
" UNION ALL\n" +
" select \n" +
" dtb_docr.cod_mart as IDArt, dtb_docr.partita_mag as IDLotto, \n" +
" 2 as GruppoRighe, 1 as Riga, \n" +
" dtb_doct.data_reg,\n" +
" dtb_doct.data_reg as data_reg_provenienza,\n" +
" dtb_docr.cod_mart, dtb_docr.partita_mag, \n" +
" dtb_doct.cod_dtip cod_dtip, \n" +
" IsNull(docPadre.descrizione, dtb_tipi.descrizione)as tipoDoc, \n" +
" mtb_aart.descrizione_Estesa,\n" +
" mtb_aart.unt_mis as unt_mis,\n" +
" sum(dtb_docr.qta_doc*rap_conv*segno_qta_car) as qta_car, 0 as qta_Scar,\n" +
" (dtb_doct.data_doc) data_doc, \n" +
" (dtb_doct.ser_doc) ser_doc, \n" +
" (dtb_doct.num_doc) num_doc, \n" +
" (dtb_docr.cod_anag) cod_anag, \n" +
" (gtb_anag.rag_soc) as rag_soc, \n" +
" (gtb_anag.part_iva) as part_iva, \n" +
" (gtb_anag.citta) as citta,\n" +
" null as cod_prod, null as partita_mag_prod, null\n" +
" from dtb_doct left outer join \n" +
" ( \n" +
" Select case when dtb_tipi.gestione in ('A', 'L') and segno_Qta_car = 1 then 'CARICO DA ACQUISTO/ALTRO STABILIMENTO'\n" +
" when dtb_tipi.gestione = 'L' and segno_Qta_scar = 1 then 'SCARICO A LAVORAZIONE' else\n" +
" dtb_tipi.descrizione end descrizione, dtb_docr.activity_id_row\n" +
" From dtb_docr, dtb_tipi\n" +
" Where dtb_docr.cod_dtip =dtb_tipi.cod_dtip and dtb_docr.activity_id_row is not null and dtb_docr.activity_id_row <> ''\n" +
" and dtb_tipi.tipo_emissione = 'DIRETTA'\n" +
" ) docPadre on dtb_doct.activity_id = docPadre.activity_id_row, \n" +
" dtb_docr, dtb_tipi, mtb_aart, gtb_anag\n" +
" where dtb_doct.cod_anag = dtb_docr.cod_anag and\n" +
" dtb_doct.cod_dtip = dtb_docr.cod_dtip and\n" +
" dtb_doct.data_doc = dtb_docr.data_doc and\n" +
" dtb_doct.ser_doc = dtb_docr.ser_doc and\n" +
" dtb_doct.num_doc = dtb_docr.num_doc and\n" +
" dtb_doct.gestione in ('L' ,'A') and\n" +
" tipo_emissione = 'DIRETTA'\n" +
" and dtb_docr.cod_dtip = dtb_tipi.cod_dtip and \n" +
" dtb_docr.cod_mart = mtb_aart.cod_mart and\n" +
" dtb_docr.cod_anag = gtb_anag.cod_anag and\n" +
" segno_qta_car > 0 \n" +
" and dtb_doct.data_doc >= '2021/01/01'\n" +
" Group by dtb_doct.data_reg, dtb_docr.cod_mart, dtb_docr.partita_mag, dtb_doct.cod_dtip, dtb_tipi.descrizione, \n" +
" mtb_aart.descrizione_Estesa,\n" +
" dtb_doct.data_doc, dtb_doct.ser_doc, dtb_doct.num_doc, \n" +
" dtb_docr.cod_anag, gtb_anag.rag_soc, gtb_anag.part_iva, gtb_anag.citta, mtb_aart.unt_mis,\n" +
" docPadre.descrizione\n" +
" \n" +
" UNION ALL\n" +
"\n" +
"\n" +
" --Scarichi e rintracciabilità\n" +
" Select produzioni.cod_mart as IDArt,produzioni.partita_mag as IDLotto,\n" +
" 3 as GruppoRighe, Rintra.riga, data_reg as data_reg, \n" +
" data_reg as data_reg_provenienza,\n" +
" rintra.cod_mart, rintra.partita_mag, rintra.cod_dtip, dtb_tipi.descrizione as tipoDoc , \n" +
" mtb_aart.descrizione_estesa, produzioni.unt_mis,\n" +
" qta_car, qta_Scar, data_doc, ser_doc, num_doc, rintra.cod_anag, gtb_anag.rag_soc, gtb_anag.part_iva, gtb_anag.citta as citta, cod_prod, partita_mag_prod, null \n" +
" from \n" +
" (\n" +
" select dtb_docr.cod_mart, \n" +
" partita_mag as partita_mag,\n" +
" mtb_aart.unt_mis as unt_mis,\n" +
" SUM(qta_doc*rap_conv) as qta_prod\n" +
" from dtb_docr, dtb_tipi, mtb_aart\n" +
" where gestione in('L','A') and dtb_docr.cod_dtip = dtb_tipi.cod_dtip and dtb_docr.cod_mart = mtb_aart.cod_mart and\n" +
" segno_qta_car > 0 and dtb_docr.cod_dtip not in ('RET','INV')\n" +
" and dtb_docr.data_doc >= '2021/01/01'\n" +
" group by dtb_docr.cod_mart, partita_mag, mtb_aart.unt_mis \n" +
" ) produzioni\n" +
" Cross apply dbo.f_pp_consuntivo_prod_rintrac(produzioni.cod_mart,produzioni.partita_mag, '', 0, 1) Rintra,\n" +
" dtb_tipi, gtb_anag, mtb_aart\n" +
" where rintra.cod_dtip = dtb_tipi.cod_dtip and rintra.cod_anag = gtb_anag.cod_anag and rintra.cod_mart = mtb_aart.cod_mart");
}
@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_20251007120604 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createSetup("w_adocu_rc", "SETUP", "VERIFICA_PROTOCOLLO", "S",
"Se disabilitata, dopo la registrazione del documento di acquisto, l'apertura del movimento contabile è automatica senza la domanda di verifica del protocollo", false, null, false, false,
false, false, false, null, false, null);
if (isCustomerDb(IntegryCustomerDB.RossoGargano_RossoGargano)){
updateSetupValue("w_adocu_rc","SETUP","VERIFICA_PROTOCOLLO","N");
}
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,31 @@
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_20251007125216 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createSetup("w_cmovi_rc", "SETUP", "CONTROLLO_30GG", "S",
"Se abilitata, quando si va a variare un movimento contabile più vecchio di 30 gg parte la domanda di controllo ", false, null, false, false,
false, false, false, null, false, null);
if (isCustomerDb(IntegryCustomerDB.RossoGargano_RossoGargano)){
updateSetupValue("w_cmovi_rc","SETUP","CONTROLLO_30GG","N");
}
}
@Override
public void down() throws Exception {
}
}

View File

@@ -4,18 +4,15 @@ import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20250728095637 extends BaseMigration implements MigrationModelInterface {
public class Migration_20251008144628 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
executeStatement("alter table dbo.atb_tipi add socio_aziendale BIT default 0 not null");
if (isCustomer(IntegryCustomer.RossoGargano)) {
executeStatement("UPDATE dbo.atb_tipi SET socio_aziendale = 1 where cod_atip in (N'C1050', N'C1055')");
if (isCustomer(IntegryCustomer.Carelli)) {
updateSetupValue("DATI_AZIENDA", "SETUP", "INVIO_EMAIL_NEW", "S");
}
}

View File

@@ -0,0 +1,28 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251008155302 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createSetupQuery("SI_NO", "SI_NO", "SELECT 'S' UNION ALL SELECT 'N'");
createSetup("W_SUPTABLE", "SETUP", "ATTIVA_MODIFICA", "S",
"attiva la linguetta che permette di inseire le query", true, "SI_NO", true, false,
true, false, false, null, false, "SELECT 'S' UNION ALL SELECT 'N'");
if (isCustomer(IntegryCustomer.Carelli)){
updateSetupValue("W_SUPTABLE", "SETUP", "ATTIVA_MODIFICA", "N");
}
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,23 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251008163815 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createSetup("DTB_DOCT", "SETUP", "NUOVA_VERSIONE_RESI", "N",
"Se impostato a S attiva la nuova gestione dei resi", false, null, false, false,
false, false, false, null, false, null);
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,19 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251009104325 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
addDescriptionTable("mtb_aart", "Tabella che contiene le anagrafiche degli articoli");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,88 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251009112050 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
addDescriptionTable("atb_list_data", "Tabella che contiene Listini di acquisto in data");
addDescriptionTable("atb_list_imp", "Tabella che contiene importazione listini di acquisto");
addDescriptionTable("dtb_doc_log_import", "Tabella che contiene log importazione documenti");
addDescriptionTable("dtb_ord_log_import", "Tabella che contiene log importazione ordini");
addDescriptionTable("dtb_ord_steps", "Tabella che contiene quantitativo prodotto allocato per settore/ordine");
addDescriptionTable("gtb_divi_cambi", "Tabella che contiene Storico Cambi");
addDescriptionTable("gtb_mod_iva", "Tabella che contiene modelli iva");
addDescriptionTable("jrl_flav_users", "Tabella che contiene relazione tra lavoratori e utenti");
addDescriptionTable("jtb_disegni_files", "Tabella che contiene contenuto files");
addDescriptionTable("jtb_rfid_ord", "Tabella che contiene RFID Associato ad ordine");
addDescriptionTable("mtb_aart_marchio", "Tabella che contiene marchio prodotto");
addDescriptionTable("mtb_col_log_import", "Tabella che contiene colli generari durante l'importazione degli ordini");
addDescriptionTable("mtb_ecr_categ", "Tabella che contiene Categorie");
addDescriptionTable("mtb_ecr_mcateg", "Tabella che contiene Macrocategoria");
addDescriptionTable("mtb_ecr_reparti", "Tabella che contiene Reparti");
addDescriptionTable("mtb_ecr_stipo", "Tabella che contiene Sottotipo");
addDescriptionTable("mtb_ecr_tipo", "Tabella che contiene Tipo");
addDescriptionTable("mtb_grup_costi", "Tabella che contiene costi per reparto");
addDescriptionTable("mtb_grup_sgrp_ass", "Tabella che contiene associazione gruppi_sottogruppi-articoli");
addDescriptionTable("mtb_lisa_data", "Tabella che contiene listini di acquisto in data");
addDescriptionTable("mtb_sfam", "Tabella che contiene Sottofamiglia");
addDescriptionTable("ntb_tipi_inca", "Tabella che contiene tipi incasso");
addDescriptionTable("serv_vamacc_load_activity", "Tabella che contiene di servizio contenente le attività relative ad un macchinario per area");
addDescriptionTable("srl_activity_users", "Tabella che contiene relazione attività con utenti associati");
addDescriptionTable("srl_user_activity_reports", "Tabella che contiene relazioni tra utenti e report che l'utente può visualizzare sulle attività");
addDescriptionTable("stb_activity_costs", "Tabella che contiene costi associati alle attività");
addDescriptionTable("stb_activity_dw_syntax_ft", "Tabella che contiene filtri attività relativi al salvataggio della sintassi dei datawindow");
addDescriptionTable("stb_activity_log", "Tabella che contiene log attività attualmente aperte per utente");
addDescriptionTable("stb_activity_reports", "Tabella che contiene elenco report agganciati alle attività");
addDescriptionTable("stb_activity_result", "Tabella che contiene Esiti Attività");
addDescriptionTable("stb_apulia_transaction_count", "Tabella che contiene numero progressivo transazioni nell'anno");
addDescriptionTable("stb_apulia_transaction_log", "Tabella che contiene registrazione log transazioni");
addDescriptionTable("stb_calr_ore_gg", "Tabella che contiene righe calendario");
addDescriptionTable("stb_calt", "Tabella che contiene Testata calendario");
addDescriptionTable("stb_dw_syntax", "Tabella che contiene salvataggio sintassi datawindow");
addDescriptionTable("stb_publications_detail", "Tabella che contiene dettagli pubblicazione");
addDescriptionTable("stb_sync", "Tabella che contiene processi in esecuzione");
addDescriptionTable("stb_tipi_indirizzi", "Tabella che contiene tipologie indirizzi per invio tramite mail");
addDescriptionTable("stb_transaction_log", "Tabella che contiene log transazioni utente su gestioni");
addDescriptionTable("vtb_agen_group", "Tabella che contiene Agenti-Gruppi Merceologic");
addDescriptionTable("vtb_ass", "Tabella che contiene associazione nazionale clienti");
addDescriptionTable("vtb_auto_km", "Tabella che contiene km percorsi automezzo");
addDescriptionTable("vtb_clie", "Tabella che contiene Clienti: Codizioni Usuali di Vendita");
addDescriptionTable("vtb_compensi_tdr", "Tabella che contiene righe compensi transfert delivery");
addDescriptionTable("vtb_compensi_tdt", "Tabella che contiene testate compensi Transfert");
addDescriptionTable("vtb_dest_intercode", "Tabella che contiene punti vendita Intercode");
addDescriptionTable("vtb_dest_intercode_setup", "Tabella che contiene configurazione caratteristiche");
addDescriptionTable("vtb_dist_tdr", "Tabella che contiene righe distinte trasfert delivery");
addDescriptionTable("vtb_dist_tdt", "Tabella che contiene testate distinte trasfert delivery");
addDescriptionTable("vtb_griglia", "Tabella che contiene griglia assortimento");
addDescriptionTable("vtb_griglia_art", "Tabella che contiene assortimento articoli");
addDescriptionTable("vtb_grp_acq", "Tabella che contiene gruppi acquisto cliente");
addDescriptionTable("vtb_list_data", "Tabella che contiene Listini di vendita in data");
addDescriptionTable("vtb_ord_giror", "Tabella che contiene righe ordine di giro clienti");
addDescriptionTable("vtb_ord_girot", "Tabella che contiene testate ordine di giro clienti");
addDescriptionTable("vtb_premi_artr", "Tabella che contiene righe premi su articolo");
addDescriptionTable("vtb_premi_artt", "Tabella che contiene testate premi su articoli");
addDescriptionTable("vtb_promo_articoli", "Tabella che contiene promozione articoli");
addDescriptionTable("vtb_promo_clienti", "Tabella che contiene promozione clienti");
addDescriptionTable("vtb_promo_omaggi", "Tabella che contiene promozioni omaggi");
addDescriptionTable("vtb_promo_sconti", "Tabella che contiene sconti promozionali");
addDescriptionTable("vtb_tipi_negozio", "Tabella che contiene Tipologia Negozio");
addDescriptionTable("vtb_tipo_bloc_cons", "Tabella che contiene tipo blocco consegna");
addDescriptionTable("vtb_vett_cap", "Tabella che contiene Vettore-Zona-Nazione-CAP");
addDescriptionTable("vtb_vett_lett", "Tabella che contiene Lettera di vettura");
addDescriptionTable("vtb_vett_nazioni", "Tabella che contiene Vettore-Zone-Nazioni");
addDescriptionTable("vtb_vett_zone", "Tabella che contiene Vettore-Zone Tariffarie");
addDescriptionTable("wtb_clie", "Tabella che contiene associazioni utenti web-clienti");
addDescriptionTable("wtb_clie_dest", "Tabella che contiene associazioni utenti web-destinatari");
addDescriptionTable("wtb_users_info_plan_status", "Tabella che contiene contenente lo stato (ultima da export) dell'export");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,25 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251010102840 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
executeStatement("CREATE TABLE srl_user_table (\n" +
" table_name VARCHAR(255) NOT NULL,\n" +
" user_name VARCHAR(40) NOT NULL,\n" +
" CONSTRAINT PK_srl_user_table PRIMARY KEY (table_name, user_name),\n" +
" CONSTRAINT FK_srl_user_table_user FOREIGN KEY (user_name)\n" +
" REFERENCES stb_user(user_name)\n" +
");");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,19 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251010104422 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
addDescriptionTable("srl_user_table","Tabella che contiene la relazione tra utenti e tabelle");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,75 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251010104604 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (isCustomer(IntegryCustomer.Integry)) return;
createOrUpdateTrigger("t_updActivityDate", "CREATE TRIGGER [dbo].[t_updActivityDate] ON [dbo].[stb_activity]\n" +
"FOR INSERT, UPDATE \n" +
"AS\n" +
" DECLARE @ldt_estimatedDate DATETIME,\n" +
" @ldt_estimatedEndDate DATETIME,\n" +
" @ldt_effectiveDate DATETIME,\n" +
" @ldt_effectiveEndDate DATETIME,\n" +
" @ldt_estimatedDateParent DATETIME,\n" +
" @ldt_estimatedEndDateParent DATETIME,\n" +
" @ldt_effectiveDateParent DATETIME,\n" +
" @ldt_effectiveEndDateParent DATETIME,\n" +
" @ls_parentActivityID varchar(40),\n" +
" @ll_count integer, \n" +
" @ls_errMsg varchar(255)\n" +
"\n" +
" /* Necessaria per connessione OLEDB */\n" +
" set nocount on\n" +
"\n" +
" DECLARE crs_activity CURSOR FOR \n" +
" SELECT inserted.estimated_date,\n" +
" inserted.estimated_enddate,\n" +
" inserted.effective_date,\n" +
" inserted.effective_enddate,\n" +
" inserted.parent_activity_id,\n" +
" stb_activity.estimated_date,\n" +
" stb_activity.estimated_enddate,\n" +
" stb_activity.effective_date,\n" +
" stb_activity.effective_enddate\n" +
" FROM inserted,\n" +
" stb_activity\n" +
" WHERE inserted.parent_activity_id = stb_activity.activity_id\n" +
"\n" +
" OPEN crs_activity\n" +
" FETCH NEXT FROM crs_activity INTO @ldt_estimatedDate,@ldt_estimatedEndDate,@ldt_effectiveDate,@ldt_effectiveEndDate,@ls_parentActivityID,\n" +
" @ldt_estimatedDateParent,@ldt_estimatedEndDateParent,@ldt_effectiveDateParent,@ldt_effectiveEndDateParent\n" +
" WHILE @@FETCH_STATUS = 0 BEGIN\n" +
" IF @ls_parentActivityID is not null BEGIN\n" +
" IF @ldt_effectiveDate is not null BEGIN\n" +
" IF @ldt_effectiveDate < @ldt_effectiveDateParent OR @ldt_effectiveDateParent IS NULL BEGIN\n" +
" update stb_activity set effective_time = @ldt_effectiveDate from\n" +
" stb_activity where activity_id = @ls_parentActivityID;\n" +
" IF @@ERROR <> 0 RETURN\n" +
" END\n" +
" END\n" +
" END\n" +
" FETCH NEXT FROM crs_activity INTO @ldt_estimatedDate,@ldt_estimatedEndDate,@ldt_effectiveDate,@ldt_effectiveEndDate,@ls_parentActivityID,\n" +
" @ldt_estimatedDateParent,@ldt_estimatedEndDateParent,@ldt_effectiveDateParent,@ldt_effectiveEndDateParent\n" +
" END \n" +
"CLOSE crs_activity\n" +
"DEALLOCATE crs_activity\n" +
"\n" +
" /* Necessaria per connessione OLEDB */\n" +
" set nocount off");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,140 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251013091105 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
createOrUpdateFunction("f_calcScad", "CREATE FUNCTION [dbo].[f_calcScad](@dataIniz DateTime,@codPaga varchar(5), @imponibile numeric(20,5), @imposta numeric(20,5)) \n" +
"RETURNS @dateScad TABLE (numRata int, dataScad DateTime, impScad numeric(20,5) ) AS \n" +
"\n" +
"begin\n" +
"\n" +
" Declare @ldt_dataInizCalc datetime;\n" +
" Declare @li_ggPrimaRata int;\n" +
" Declare @li_ggTraRate int;\n" +
" Declare @li_numRate int;\n" +
" Declare @li_CountRata int; \n" +
" Declare @addDay int;\n" +
" Declare @lc_impRata numeric(20,5);\n" +
" Declare @lc_impPrimaRata numeric(20,5);\n" +
" Declare @lc_approssimazione numeric(20,5);\n" +
" Declare @ls_ivaPrimaRata varchar(20);\n" +
" Declare @ls_dataRif varchar(20);\n" +
" \n" +
" SELECT @li_CountRata = 2;\n" +
" \n" +
" SELECT @li_ggPrimaRata = gtb_paga.gg_prima_rata, \n" +
" @li_ggTraRate = gtb_paga.gg_tra_rate,\n" +
" @ls_ivaPrimaRata = Iva_prima_rata,\n" +
" @ls_dataRif = gtb_paga.data_rif, \n" +
" @li_numRate = gtb_paga.num_rate\n" +
" FROM gtb_paga\n" +
" WHERE gtb_paga.cod_paga = @codPaga;\n" +
" \n" +
" IF @li_numRate > 0 \n" +
" begin\n" +
" IF @ls_ivaPrimaRata = 'PRIMA RATA SOLO IVA'\n" +
" begin\n" +
" Select @lc_impRata = round(@imponibile/(@li_numRate - 1),2)\n" +
" Select @lc_impPrimaRata = @imposta\n" +
" end\n" +
" else\n" +
" begin\n" +
" if @ls_ivaPrimaRata = 'SULLA PRIMA RATA'\n" +
" begin\n" +
" Select @lc_impRata = round(@imponibile/@li_numRate,2)\n" +
" Select @lc_impPrimaRata = @lc_impRata + @imposta\n" +
" end\n" +
" else\n" +
" begin\n" +
" Select @lc_impRata = round((@imponibile + @imposta) /@li_numRate,2)\n" +
" Select @lc_impPrimaRata = @lc_impRata \n" +
" end\n" +
" end\n" +
" end\n" +
" \n" +
" SELECT @ldt_dataInizCalc = @dataIniz\n" +
" \n" +
" IF left(@ls_dataRif, 9) = 'FINE MESE'\n" +
" begin\n" +
" IF MONTH( @dataIniz ) = 12\n" +
" begin\n" +
" SELECT @ldt_dataInizCalc = DATEADD(day, -1, \n" +
" CONVERT(datetime, \n" +
" Convert(varchar(4),Convert(int, year( @dataIniz ) + 1 )) \n" +
" + '-' + Convert( varchar(2), 1)\n" +
" + '-' + Convert( varchar(2),1), 121))\n" +
" end \n" +
" ELSE\n" +
" begin\n" +
" SELECT @ldt_dataInizCalc = DATEADD(day, -1, \n" +
" CONVERT(datetime, \n" +
" Convert(varchar(4),Convert(int, year( @dataIniz ))) \n" +
" + '-' + Convert( varchar(2), (MONTH( @dataIniz ) + 1))\n" +
" + '-' + Convert( varchar(2),1), 121))\n" +
" end\n" +
" end \n" +
" \n" +
" \n" +
" IF @li_ggPrimaRata > 0 \n" +
" begin\n" +
" select @ldt_dataInizCalc = dbo.f_aggiungiGiorniScad(@ldt_dataInizCalc, @li_ggPrimaRata, @ls_dataRif )\n" +
" Insert into @dateScad values (1, @ldt_dataInizCalc, @lc_impPrimaRata)\n" +
" end \n" +
" ELSE\n" +
" begin\n" +
" Insert into @dateScad values (1, @ldt_dataInizCalc, @lc_impPrimaRata)\n" +
" end\n" +
"\n" +
" WHILE @li_CountRata <= @li_numRate \n" +
" begin\n" +
" select @ldt_dataInizCalc = dbo.f_aggiungiGiorniScad(@ldt_dataInizCalc,@li_ggTraRate, @ls_dataRif )\n" +
"\n" +
" Insert into @dateScad values (@li_CountRata, @ldt_dataInizCalc, @lc_impRata)\n" +
" SELECT @li_CountRata = @li_CountRata + 1\n" +
" end \n" +
" \n" +
" /*** Calcolo eventuale residuo di approssimazione da imputare sull'ultima rata ***/\n" +
" Select @lc_approssimazione = @lc_impRata * (@li_numRate - 1) + @lc_impPrimaRata - (@imponibile + @imposta)\n" +
" IF @lc_approssimazione <> 0 \n" +
" begin\n" +
" Update @dateScad set impScad = impScad-@lc_approssimazione\n" +
" WHERE numRata = @li_numRate\n" +
" end\n" +
" \n" +
" Select @li_CountRata = 1\n" +
" Select @addDay = 0\n" +
" WHILE @li_CountRata <= @li_numRate \n" +
" begin \n" +
" IF @ls_dataRif = 'FINE MESE+1GG' \n" +
" SELECT @addDay = 1\n" +
" IF @ls_dataRif = 'FINE MESE+5GG' \n" +
" SELECT @addDay = 5\n" +
" IF @ls_dataRif = 'FINE MESE+10GG' \n" +
" SELECT @addDay = 10\n" +
" \n" +
" IF @addDay > 0\n" +
" begin \n" +
" Update @dateScad set dataScad = DATEADD(day, @addDay , dataScad)\n" +
" WHERE numRata = @li_CountRata\n" +
" end \n" +
" SELECT @li_CountRata = @li_CountRata + 1\n" +
" end\n" +
"\n" +
" return\n" +
"end");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,20 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251013103907 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
executeStatement("ALTER TABLE stb_activity ADD extra_project BIT DEFAULT 0 NOT NULL",
"ALTER TABLE stb_activity ADD view_in_meeting BIT DEFAULT 0 NOT NULL");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,99 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.IntegryCustomerDB;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251013174133 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (!isCustomer(IntegryCustomer.Carelli)) return;
if (isCustomerDb(IntegryCustomerDB.Carelli_Format)) return;
createOrUpdateView("avw_last_acq_lotto_w"
, "CREATE VIEW avw_last_acq_lotto_w WITH SCHEMABINDING AS\n" +
" SELECT wdtb_doct.data_reg,\n" +
" cod_mart,\n" +
" wdtb_docr.partita_mag,\n" +
" wdtb_doct.cod_mdep,\n" +
" wdtb_doct.data_ins,\n" +
" mtb_depo.cod_vlis,\n" +
" wdtb_docr.id_riga\n" +
" FROM dbo.wdtb_doct\n" +
" INNER JOIN dbo.wdtb_docr ON wdtb_doct.cod_anag = wdtb_docr.cod_anag AND\n" +
" wdtb_doct.cod_dtip = wdtb_docr.cod_dtip AND\n" +
" wdtb_doct.data_doc = wdtb_docr.data_doc AND\n" +
" wdtb_doct.ser_doc = wdtb_docr.ser_doc AND\n" +
" wdtb_doct.num_doc = wdtb_docr.num_doc\n" +
" inner join dbo.mtb_depo on mtb_depo.cod_mdep = wdtb_doct.cod_mdep\n" +
" WHERE wdtb_docr.partita_mag IS NOT NULL");
executeStatement("CREATE UNIQUE CLUSTERED INDEX [IDX_CLUSTERED_avw_last_acq_lotto_w] ON [dbo].avw_last_acq_lotto_w\n" +
" (\n" +
" data_reg,\n" +
" cod_mart,\n" +
" partita_mag,\n" +
" cod_mdep,\n" +
" data_ins,\n" +
" id_riga\n" +
" )",
"CREATE NONCLUSTERED INDEX ix_avw_last_acq_lotto_w_2\n" +
" ON [dbo].[avw_last_acq_lotto_w] ([cod_mart],[cod_mdep],[data_reg])\n" +
" INCLUDE ([data_ins],[cod_vlis])",
"CREATE NONCLUSTERED INDEX ix_avw_last_acq_lotto_w_1\n" +
" ON [dbo].[avw_last_acq_lotto_w] ([cod_mdep],[data_reg],[cod_vlis])\n" +
" INCLUDE ([cod_mart],[data_ins])");
createOrUpdateView("avw_last_acq_lotto", "CREATE VIEW avw_last_acq_lotto WITH SCHEMABINDING AS\n" +
" SELECT dtb_doct.data_reg,\n" +
" cod_mart,\n" +
" dtb_docr.partita_mag,\n" +
" dtb_doct.cod_mdep,\n" +
" dtb_doct.data_ins,\n" +
" mtb_depo.cod_vlis,\n" +
" dtb_docr.id_riga,\n" +
" CAST(dtb_doct.cod_anag AS VARCHAR(10))\n" +
" + '_' + dtb_doct.cod_dtip\n" +
" + '_' + convert(varchar(10), dtb_doct.data_doc, 112)\n" +
" + '_' + dtb_doct.ser_doc\n" +
" + '_' + CAST(dtb_doct.num_doc AS VARCHAR(10)) AS chiave_doc\n" +
" FROM dbo.dtb_doct\n" +
" INNER JOIN dbo.dtb_docr\n" +
" ON dtb_doct.cod_anag = dtb_docr.cod_anag AND dtb_doct.cod_dtip = dtb_docr.cod_dtip AND\n" +
" dtb_doct.data_doc = dtb_docr.data_doc AND dtb_doct.ser_doc = dtb_docr.ser_doc AND\n" +
" dtb_doct.num_doc = dtb_docr.num_doc\n" +
" INNER JOIN dbo.dtb_tipi ON dtb_doct.cod_dtip = dtb_tipi.cod_dtip\n" +
" inner join dbo.mtb_depo on mtb_depo.cod_mdep = dtb_doct.cod_mdep\n" +
" WHERE dtb_tipi.gestione = 'A'\n" +
" AND dtb_docr.partita_mag IS NOT NULL\n" +
" AND dtb_tipi.tipo_emissione = 'DIRETTA'\n" +
" AND dtb_tipi.segno_qta_car = 1\n" +
" AND flag_chk_tracciabilita = 1\n" +
" and dtb_doct.data_reg >= CONVERT(datetime, '20230101', 112)");
executeStatement("CREATE UNIQUE CLUSTERED INDEX [IDX_CLUSTERED_avw_last_acq_lotto] ON [dbo].avw_last_acq_lotto\n" +
" (\n" +
" data_reg,\n" +
" cod_mart,\n" +
" partita_mag,\n" +
" cod_mdep,\n" +
" data_ins,\n" +
" id_riga,\n" +
" chiave_doc\n" +
" )");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,22 @@
package it.integry.ems.migration.model;
import it.integry.ems.migration._base.BaseMigration;
import it.integry.ems.migration._base.IntegryCustomer;
import it.integry.ems.migration._base.MigrationModelInterface;
public class Migration_20251014154051 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (isCustomer(IntegryCustomer.Auricchio) || isCustomer(IntegryCustomer.Florapulia)) return;
updateSetupValue("DATI_AZIENDA", "SETUP", "INVIO_EMAIL_NEW", "S");
}
@Override
public void down() throws Exception {
}
}

View File

@@ -0,0 +1,58 @@
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_20251014182929 extends BaseMigration implements MigrationModelInterface {
@Override
public void up() throws Exception {
if (isHistoryDB())
return;
if (!isCustomerDb(IntegryCustomerDB.Gramm_Gramm))
return;
executeStatement("INSERT INTO stb_gest_setup VALUES (\n" +
" 'w_vedi_invoic_dlg',\n" +
" 'SASU',\n" +
" 'NAI_NAZIONE_PARTIVA',\n" +
" 'S',\n" +
" NULL,\n" +
" 'N',\n" +
" NULL,\n" +
" 'N',\n" +
" '2025-10-14 18:17:28.000',\n" +
" 'Administrator',\n" +
" 'N',\n" +
" 'N',\n" +
" 'N',\n" +
" 'N',\n" +
" NULL,\n" +
" 0)");
executeStatement("INSERT INTO stb_gest_setup VALUES (\n" +
" 'w_vedi_invoic_dlg',\n" +
" 'SASU_CORA',\n" +
" 'NAI_NAZIONE_PARTIVA',\n" +
" 'S',\n" +
" NULL,\n" +
" 'N',\n" +
" NULL,\n" +
" 'N',\n" +
" '2025-10-14 18:17:28.000',\n" +
" 'Administrator',\n" +
" 'N',\n" +
" 'N',\n" +
" 'N',\n" +
" 'N',\n" +
" NULL,\n" +
" 0)");
}
@Override
public void down() throws Exception {
}
}

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