[CMMS ]
- rimosso codice deposito da anagrafica macchinari
This commit is contained in:
@@ -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_20251114114334 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
|
||||
executeStatement("ALTER TABLE ctb_amac DROP COLUMN cod_mdep;");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
}
|
||||
}
|
||||
@@ -65,9 +65,6 @@ public class CtbAmac extends EntityBase {
|
||||
@SqlField(value = "flag_attivo", nullable = false, defaultObjectValue = "1")
|
||||
private Boolean flagAttivo;
|
||||
|
||||
@SqlField(value = "cod_mdep")
|
||||
private String codMdep;
|
||||
|
||||
@SqlField(value = "posizione")
|
||||
@FK(tableName = MtbDepoPosizioni.ENTITY)
|
||||
private String posizione;
|
||||
@@ -241,15 +238,6 @@ public class CtbAmac extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMdep() {
|
||||
return codMdep;
|
||||
}
|
||||
|
||||
public CtbAmac setCodMdep(String codMdep) {
|
||||
this.codMdep = codMdep;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPosizione() {
|
||||
return posizione;
|
||||
}
|
||||
|
||||
@@ -46,19 +46,6 @@ public class DepositiService {
|
||||
.setOperation(OperationType.UPDATE));
|
||||
entityToSave.addAll(jrlFasePosizionis);
|
||||
}
|
||||
sql = String.format(
|
||||
"SELECT cod_cmac, cod_mdep, posizione FROM ctb_amac WHERE posizione IN (%s)",
|
||||
UtilityDB.listValueToString(posizioni));
|
||||
|
||||
List<CtbAmac> ctbAmacs = UtilityDB.executeSimpleQueryDTO(multiDBTransactionManager.getPrimaryConnection(), sql, CtbAmac.class);
|
||||
|
||||
if (ctbAmacs != null) {
|
||||
ctbAmacs.forEach(x ->
|
||||
x
|
||||
.setCodMdep(mtbDepo.getCodMdep())
|
||||
.setOperation(OperationType.UPDATE));
|
||||
entityToSave.addAll(ctbAmacs);
|
||||
}
|
||||
}
|
||||
|
||||
List<String> aree = mtbDepo.getMtbDepoArea().stream().map(x -> x.getCodArea()).collect(Collectors.toList());
|
||||
|
||||
Reference in New Issue
Block a user