Merge branch 'develop' into feature/RefactoringGestioneColli
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -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_20250620165009 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
executeStatement("INSERT INTO dtb_mod_stampa (mod_stampa, descrizione, flag_attivo)" +
|
||||
"VALUES ('ORDP', 'Ordine di Produzione', 'S'), ('ORDCT', 'Ordine Conto Terzista', 'S')");
|
||||
|
||||
if(isCustomer(IntegryCustomer.Fiume)) {
|
||||
executeStatement("UPDATE dtb_mod_stampa SET report_id = 9 WHERE mod_stampa = 'ORDCT'");
|
||||
}
|
||||
if(isCustomer(IntegryCustomer.Gramm)) {
|
||||
executeStatement("UPDATE dtb_mod_stampa SET report_id = 100 WHERE mod_stampa = 'ORDCT'");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -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_20250620180720 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetup("IMPORT_DOCUMENTI", "CARICO_SCARICO_DA_FABB", "GENERA_CARICO_PROD_PADRE", "S",
|
||||
"Se impostato a SE la procedura non genera il documento di carico del prodotto finito/lotto ma solo il giroconto del prodotto/matricola", false, null, false, false,
|
||||
false, false, false, null, false, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -855,6 +855,17 @@ public class AccountingRules extends QueryRules {
|
||||
|
||||
}
|
||||
|
||||
public static void completeCtbScadCtbPart(Connection conn, CtbPart ctbPart) throws Exception {
|
||||
String sql = Query.format("SELECT descrizione FROM gtb_paga WHERE cod_paga = %s",
|
||||
ctbPart.getCodPaga());
|
||||
String descizione = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
||||
ctbPart.getCtbScad()
|
||||
.stream()
|
||||
.filter(x -> x.getCodPaga() == null)
|
||||
.forEach(x ->
|
||||
x.setCodPaga(ctbPart.getCodPaga()).setDescrizPag(descizione));
|
||||
}
|
||||
|
||||
public static Date completeDataRicezione(Connection connection, CtbMovt ctbMovt) throws Exception {
|
||||
Date dataRicezione = null;
|
||||
String idAttach = ctbMovt.getCrlMovAttached().get(0).getIdAttach();
|
||||
|
||||
@@ -131,6 +131,15 @@ then
|
||||
AccountingRules.completeIdRigaScad(conn, $ctbScad);
|
||||
end
|
||||
|
||||
rule "completeCtbPart"
|
||||
no-loop
|
||||
when
|
||||
eval(postRulesEnabled)
|
||||
$ctbPart: CtbPart( codPaga != null && ctbScad.size() > 0)
|
||||
then
|
||||
AccountingRules.completeCtbScadCtbPart(conn, $ctbPart);
|
||||
end
|
||||
|
||||
|
||||
rule "completeRigaMtbColr"
|
||||
no-loop
|
||||
|
||||
@@ -80,12 +80,6 @@ public class ScadenzeImportService {
|
||||
String diacod = line.substring(92, 108).trim();
|
||||
Integer numDoc = UtilityString.isIntNumber(line.substring(185, 197).trim()) ? UtilityInteger.stringToInteger(line.substring(185, 197).trim()) : null;
|
||||
String intercode = line.substring(197, 223);
|
||||
sql = Query.format(
|
||||
"SELECT CAST(COUNT(*) AS BIT) AS exist FROM gtb_paga WHERE cod_paga = %s",
|
||||
codPaga
|
||||
);
|
||||
codPaga = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql) ? codPaga : null;
|
||||
|
||||
sql = Query.format(
|
||||
"SELECT cod_anag FROM gtb_anag WHERE diacod = %s",
|
||||
diacod
|
||||
@@ -218,7 +212,6 @@ public class ScadenzeImportService {
|
||||
ctbScad.setDataScad(dataScad)
|
||||
.setImpAvere(impAvere)
|
||||
.setImpDare(impDare)
|
||||
.setCodPaga(codPaga)
|
||||
.setIntercode(intercode)
|
||||
.setOperation(OperationType.INSERT);
|
||||
}
|
||||
|
||||
@@ -342,6 +342,7 @@ public class DocumentiProdDaFabb {
|
||||
String codiceManodopera = setupGest.getImportSetup(connect, type, format, "CODICE_MANODOPERA'");
|
||||
String codDtipCarGiroc = setupGest.getImportSetup(connect, type, format, "COD_DTIP_CAR_GIROC");
|
||||
String codDtipScarGiroc = setupGest.getImportSetup(connect, type, format, "COD_DTIP_SCAR_GIROC");
|
||||
String generaCaricProdPadre = setupGest.getImportSetup(connect, type, format, "GENERA_CARICO_PROD_PADRE");
|
||||
|
||||
if (!ordini.isEmpty()) {
|
||||
chiudiCommessa = ordini.get(0).getChiudiCommessa();
|
||||
@@ -379,6 +380,7 @@ public class DocumentiProdDaFabb {
|
||||
|
||||
if (index == 1) {
|
||||
// Creazione testata documento di carico
|
||||
if (generaCaricProdPadre.equals("S")){
|
||||
docCar = new DtbDoct();
|
||||
docCar.setOperation(OperationType.INSERT);
|
||||
docCar.setCodDtip(codDtipCar);
|
||||
@@ -403,6 +405,7 @@ public class DocumentiProdDaFabb {
|
||||
docRCar.setRigaOrd(0);
|
||||
docRCar.setMatricola(riga.getMatricola());
|
||||
docCar.getDtbDocr().add(docRCar);
|
||||
}
|
||||
|
||||
// ----------------------------
|
||||
// Gestione giroconto
|
||||
|
||||
Reference in New Issue
Block a user