From 2587dd69c3d599ad283e47fbb7dda73cae18f640 Mon Sep 17 00:00:00 2001 From: ValerioC Date: Mon, 24 Feb 2025 17:33:55 +0100 Subject: [PATCH] [GRAMM] - aggiunto controllo su valore [NULL] in regola completamento partitaMag ordine - aggiunta setup per reset partita ordine in ripianificazione --- .../model/Migration_20250224145759.java | 22 +++++++++++++++++++ ems-core/src/main/resources/rules/OrdL.drl | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 ems-core/src/main/java/it/integry/ems/migration/model/Migration_20250224145759.java diff --git a/ems-core/src/main/java/it/integry/ems/migration/model/Migration_20250224145759.java b/ems-core/src/main/java/it/integry/ems/migration/model/Migration_20250224145759.java new file mode 100644 index 0000000000..21f47d2544 --- /dev/null +++ b/ems-core/src/main/java/it/integry/ems/migration/model/Migration_20250224145759.java @@ -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_20250224145759 extends BaseMigration implements MigrationModelInterface { + + @Override + public void up() throws Exception { + if (isHistoryDB()) + return; + + createSetup("PVM","MONITORAGGIO_LINEE_V2","REIMPOSTA_LOTTO_ORDINE_RIPIANIFICATO","N","Se impostato sul deposito di destinazione dell'ordine ripianificato ne azzera il lotto in testata costringendo alla reimpostazione dello stesso prima dell'avvio dell'ordine",false,"SI_NO",false,true,false,false,false,null,false); + if (isCustomer(IntegryCustomer.Gramm)) + executeStatement("INSERT INTO stb_gest_setup_depo VALUES ('01',\t'PVM',\t'MONITORAGGIO_LINEE_V2',\t'REIMPOSTA_LOTTO_ORDINE_RIPIANIFICATO',\t'S',\t'N');"); + } + + @Override + public void down() throws Exception { + } +} \ No newline at end of file diff --git a/ems-core/src/main/resources/rules/OrdL.drl b/ems-core/src/main/resources/rules/OrdL.drl index 4baf3da696..14ce88f6ce 100644 --- a/ems-core/src/main/resources/rules/OrdL.drl +++ b/ems-core/src/main/resources/rules/OrdL.drl @@ -29,7 +29,7 @@ end rule "completePartitaMagOrd" when eval(completeRulesEnabled) - $ordT: DtbOrdt(partitaMag != null && gestione == "L" && !DocOrdRules.checkIfPartitaExist(conn, getCodProd(), getPartitaMag())) + $ordT: DtbOrdt(partitaMag != null && partitaMag != "[NULL]" && gestione == "L" && !DocOrdRules.checkIfPartitaExist(conn, getCodProd(), getPartitaMag())) then MtbPartitaMag partitaMag = DocOrdRules.completePartitaMag($ordT.getCodProd(), $ordT.getPartitaMag(), $ordT.getNote()); modify ( $ordT ) { setRifPartitaMag(partitaMag) }