Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package it.integry.ems.migration.model;
|
||||
|
||||
import it.integry.ems.migration._base.BaseMigration;
|
||||
import it.integry.ems.migration._base.MigrationModelInterface;
|
||||
|
||||
public class Migration_20240621094545 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
createSetup("PICKING", "SPEDIZIONE", "FLAG_ASK_DUPLICATE_UDS", "N", "Questo flag permetta all'utente di creare nel picking di vendita più UDS partendo da una già creata solo se l'UDS non ha riferimenti a colli di carico.", "SI_NO");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
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_20240621174401 extends BaseMigration implements MigrationModelInterface {
|
||||
|
||||
@Override
|
||||
public void up() throws Exception {
|
||||
if (isHistoryDB())
|
||||
return;
|
||||
|
||||
|
||||
createSetupQuery("SI_NO", "SI_NO", "SELECT 'S' UNION ALL SELECT 'N'", false);
|
||||
createSetup("NTB_DOCT", "PROMOZIONI", "ESCLUDI_PROMO_INFORMATIVE", null, "esclude le promozioni informative dall'importazione del codice promo negli scontrini", false, "SI_NO", false, false, false, false, false, null, false, "SELECT 'S' UNION ALL SELECT 'N'");
|
||||
|
||||
if (isCustomer(IntegryCustomer.Carelli)){
|
||||
executeStatement("UPDATE vtb_promo SET flag_tipologia = null where flag_tipologia = 'I'",
|
||||
"UPDATE vtb_promo SET flag_tipologia = 'I' where cod_promo in ('CASSA INT', 'CASSA VOL')"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void down() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -39,15 +39,15 @@ public class CommonRules extends QueryRules {
|
||||
|
||||
public static MtbAart completeDatiMtbAart(Connection connection, String codMart) throws Exception {
|
||||
String sql = "SELECT * FROM mtb_aart WHERE cod_mart = " + UtilityDB.valueToString(codMart);
|
||||
PreparedStatement ps = connection.prepareStatement(sql);
|
||||
ResultSet rs = ps.executeQuery();
|
||||
|
||||
MtbAart mtbAart = new ResultSetMapper().mapResultSetToObject(rs, MtbAart.class);
|
||||
rs.close();
|
||||
ps.close();
|
||||
if (mtbAart == null || UtilityString.isNullOrEmpty(mtbAart.getCodMart())) {
|
||||
if(codMart == null || codMart.isEmpty())
|
||||
throw new Exception("Impossibile trovare l'articolo");
|
||||
|
||||
final MtbAart mtbAart = UtilityDB.executeSimpleQueryOnlyFirstRowDTO(connection, sql, MtbAart.class);
|
||||
|
||||
if (mtbAart == null)
|
||||
throw new Exception("Codice articolo non trovato (" + codMart + ")");
|
||||
}
|
||||
|
||||
return mtbAart;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ public class DocOrdRules extends QueryRules {
|
||||
String sql =
|
||||
"SELECT case when tipo_sconto <> 'FINANZIARIO' then gtb_paga.sconto else null end as sconto3, " +
|
||||
" case when tipo_sconto = 'FINANZIARIO' then gtb_paga.sconto else null end as sconto4 " +
|
||||
"FROM vtb_clie left outer join gtb_paga on vtb_clie.cod_paga = gtb_paga.cod_paga WHERE cod_anag = " + UtilityDB.valueToString(codAnag);
|
||||
"FROM vtb_clie left outer join gtb_paga on vtb_clie.cod_paga = gtb_paga.cod_paga WHERE cod_anag = " + UtilityDB.valueToString(codAnag);
|
||||
HashMap<String, Object> campi = returnMapData(conn, sql, entity);
|
||||
|
||||
return campi;
|
||||
@@ -435,22 +435,35 @@ public class DocOrdRules extends QueryRules {
|
||||
String codProd = entity.getCodProd();
|
||||
String sql = "";
|
||||
|
||||
if (entity instanceof DtbOrdt) {
|
||||
sql = " SELECT jtb_cicl.descrizione_prod as descrizione_prod, "
|
||||
+ " jtb_cicl.descrizione_estesa as descr_estesa_prod, "
|
||||
+ " jtb_cicl.unt_mis_prod, "
|
||||
+ " jtb_cicl.rap_conv_prod, "
|
||||
+ " jtb_cicl.cod_jfas, "
|
||||
+ " ISNULL(mtb_aart.colli_pedana, 0) as colli_pedana "
|
||||
+ " FROM jtb_cicl LEFT OUTER JOIN mtb_aart ON jtb_cicl.cod_prod = mtb_aart.cod_mart "
|
||||
+ " WHERE jtb_cicl.cod_prod = " + UtilityDB.valueToString(codProd);
|
||||
} else {
|
||||
sql =
|
||||
"SELECT Cast(count(cod_prod ) as bit) "
|
||||
+ " FROM jtb_cicl "
|
||||
+ " WHERE jtb_cicl.cod_prod = " + UtilityDB.valueToString(codProd);
|
||||
|
||||
boolean existDist = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
||||
sql =
|
||||
"SELECT Cast(count(cod_prod ) as bit) "
|
||||
+ " FROM jtb_cicl "
|
||||
+ " WHERE jtb_cicl.cod_prod = " + UtilityDB.valueToString(codProd);
|
||||
boolean existDist = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(conn, sql);
|
||||
|
||||
|
||||
if (entity instanceof DtbOrdt) {
|
||||
if(existDist) {
|
||||
|
||||
sql = " SELECT jtb_cicl.descrizione_prod as descrizione_prod, "
|
||||
+ " jtb_cicl.descrizione_estesa as descr_estesa_prod, "
|
||||
+ " jtb_cicl.unt_mis_prod, "
|
||||
+ " jtb_cicl.rap_conv_prod, "
|
||||
+ " jtb_cicl.cod_jfas, "
|
||||
+ " ISNULL(mtb_aart.colli_pedana, 0) as colli_pedana "
|
||||
+ " FROM jtb_cicl LEFT OUTER JOIN mtb_aart ON jtb_cicl.cod_prod = mtb_aart.cod_mart "
|
||||
+ " WHERE jtb_cicl.cod_prod = " + UtilityDB.valueToString(codProd);
|
||||
} else {
|
||||
sql =
|
||||
" SELECT mtb_aart.descrizione as descrizione_prod, " +
|
||||
"mtb_aart.descrizione_estesa AS descr_estesa_prod"
|
||||
+ " FROM mtb_aart "
|
||||
+ " WHERE mtb_aart.cod_mart = " + UtilityDB.valueToString(codProd);
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
if (existDist) {
|
||||
sql = " SELECT jtb_cicl.unt_mis_prod, "
|
||||
+ " jtb_cicl.rap_conv_prod, "
|
||||
|
||||
@@ -419,7 +419,7 @@ public class PackagesRules extends QueryRules {
|
||||
BigDecimal rapPesoLordo = mtbColt.getPesoKg().divide(pesoLordo, 5, RoundingMode.HALF_UP);
|
||||
BigDecimal rapPesoNetto = mtbColt.getPesoNettoKg().divide(pesoNetto, 5, RoundingMode.HALF_UP);
|
||||
for (MtbColr mtbColr : righe) {
|
||||
if (mtbColr.getOperation() != OperationType.DELETE) {
|
||||
if (mtbColr.getOperation() != OperationType.DELETE && mtbColr.getCodMart() != null) {
|
||||
BigDecimal pesoNettoRiga = mtbColr.getPesoNettoKg().multiply(rapPesoNetto).setScale(5, RoundingMode.HALF_UP);
|
||||
BigDecimal pesoLordoRiga = mtbColr.getPesoLordoKg().multiply(rapPesoLordo).setScale(5, RoundingMode.HALF_UP);
|
||||
|
||||
|
||||
@@ -7,18 +7,19 @@ import it.integry.common.var.CommonConstants;
|
||||
import it.integry.ems.rules.businessLogic.enums.TipoEmissione;
|
||||
import it.integry.ems.rules.completing.dto.UntMisDTO;
|
||||
import it.integry.ems_model.annotation.*;
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import it.integry.ems_model.entity.common.DtbBaseDocR;
|
||||
import it.integry.ems_model.entity.common.DtbDocOrdR;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
import org.kie.api.definition.type.PropertyReactive;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@PropertyReactive
|
||||
@Table(DtbDocr.ENTITY)
|
||||
@JsonTypeName(DtbDocr.ENTITY)
|
||||
public class DtbDocr extends DtbBaseDocR {
|
||||
public class DtbDocr extends DtbBaseDocR implements EquatableEntityInterface<DtbDocr> {
|
||||
public static final String ENTITY = "dtb_docr";
|
||||
private static final long serialVersionUID = 1L;
|
||||
@PK
|
||||
@@ -1316,4 +1317,245 @@ public class DtbDocr extends DtbBaseDocR {
|
||||
@Override
|
||||
public void checkPreSave() throws Exception {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsKey(DtbDocr other) {
|
||||
if (this == other) return true;
|
||||
return Objects.equals(getCodAnag(), other.getCodAnag()) &&
|
||||
Objects.equals(getCodDtip(), other.getCodDtip()) &&
|
||||
Objects.equals(getDataDoc(), other.getDataDoc()) &&
|
||||
Objects.equals(getIdRiga(), other.getIdRiga()) &&
|
||||
Objects.equals(getNumDoc(), other.getNumDoc()) &&
|
||||
Objects.equals(getSerDoc(), other.getSerDoc());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsContent(DtbDocr other) {
|
||||
if (this == other) return true;
|
||||
return Objects.equals(getCodAnag(), other.getCodAnag()) &&
|
||||
Objects.equals(getCodDtip(), other.getCodDtip()) &&
|
||||
Objects.equals(getDataDoc(), other.getDataDoc()) &&
|
||||
Objects.equals(getIdRiga(), other.getIdRiga()) &&
|
||||
Objects.equals(getNumDoc(), other.getNumDoc()) &&
|
||||
Objects.equals(getSerDoc(), other.getSerDoc()) &&
|
||||
Objects.equals(getCodAliq(), other.getCodAliq()) &&
|
||||
Objects.equals(getCodAnagComp(), other.getCodAnagComp()) &&
|
||||
Objects.equals(getCodArtFor(), other.getCodArtFor()) &&
|
||||
Objects.equals(getCodCol(), other.getCodCol()) &&
|
||||
Objects.equals(getCodDtipComp(), other.getCodDtipComp()) &&
|
||||
Objects.equals(getCodJcom(), other.getCodJcom()) &&
|
||||
Objects.equals(getCodMart(), other.getCodMart()) &&
|
||||
Objects.equals(getCodMdep(), other.getCodMdep()) &&
|
||||
Objects.equals(getCodPromo(), other.getCodPromo()) &&
|
||||
Objects.equals(getCodTagl(), other.getCodTagl()) &&
|
||||
Objects.equals(getCostoUnt(), other.getCostoUnt()) &&
|
||||
Objects.equals(getDataDocComp(), other.getDataDocComp()) &&
|
||||
Objects.equals(getDataOrd(), other.getDataOrd()) &&
|
||||
Objects.equals(getDescrizione(), other.getDescrizione()) &&
|
||||
Objects.equals(getDescrizioneEstesa(), other.getDescrizioneEstesa()) &&
|
||||
Objects.equals(getFlagEvasoForzato(), other.getFlagEvasoForzato()) &&
|
||||
Objects.equals(getImportoRiga(), other.getImportoRiga()) &&
|
||||
Objects.equals(getNumCnf(), other.getNumCnf()) &&
|
||||
Objects.equals(getNumDocComp(), other.getNumDocComp()) &&
|
||||
Objects.equals(getNumOrd(), other.getNumOrd()) &&
|
||||
Objects.equals(getPartitaMag(), other.getPartitaMag()) &&
|
||||
Objects.equals(getPercGest(), other.getPercGest()) &&
|
||||
Objects.equals(getPercIspe(), other.getPercIspe()) &&
|
||||
Objects.equals(getPercOneri(), other.getPercOneri()) &&
|
||||
Objects.equals(getPercPromo(), other.getPercPromo()) &&
|
||||
Objects.equals(getPercProv(), other.getPercProv()) &&
|
||||
Objects.equals(getPercProv2(), other.getPercProv2()) &&
|
||||
Objects.equals(getPesoLordo(), other.getPesoLordo()) &&
|
||||
Objects.equals(getPosizione(), other.getPosizione()) &&
|
||||
Objects.equals(getQtaCnf(), other.getQtaCnf()) &&
|
||||
Objects.equals(getQtaDoc(), other.getQtaDoc()) &&
|
||||
Objects.equals(getQtaDoc2(), other.getQtaDoc2()) &&
|
||||
Objects.equals(getQtaDoc3(), other.getQtaDoc3()) &&
|
||||
Objects.equals(getRapConv(), other.getRapConv()) &&
|
||||
Objects.equals(getRigaOrd(), other.getRigaOrd()) &&
|
||||
Objects.equals(getSconto5(), other.getSconto5()) &&
|
||||
Objects.equals(getSconto6(), other.getSconto6()) &&
|
||||
Objects.equals(getSconto7(), other.getSconto7()) &&
|
||||
Objects.equals(getSconto8(), other.getSconto8()) &&
|
||||
Objects.equals(getSerDocComp(), other.getSerDocComp()) &&
|
||||
Objects.equals(getUntDoc(), other.getUntDoc()) &&
|
||||
Objects.equals(getUntDoc2(), other.getUntDoc2()) &&
|
||||
Objects.equals(getUntDoc3(), other.getUntDoc3()) &&
|
||||
Objects.equals(getValGest(), other.getValGest()) &&
|
||||
Objects.equals(getValIspe(), other.getValIspe()) &&
|
||||
Objects.equals(getValOneri(), other.getValOneri()) &&
|
||||
Objects.equals(getValPromo(), other.getValPromo()) &&
|
||||
Objects.equals(getValProv(), other.getValProv()) &&
|
||||
Objects.equals(getValProv2(), other.getValProv2()) &&
|
||||
Objects.equals(getValUnt(), other.getValUnt()) &&
|
||||
Objects.equals(getValUntIva(), other.getValUntIva()) &&
|
||||
Objects.equals(getCodMtip(), other.getCodMtip()) &&
|
||||
Objects.equals(getMatricola(), other.getMatricola()) &&
|
||||
Objects.equals(getDataInizComp(), other.getDataInizComp()) &&
|
||||
Objects.equals(getDataFineComp(), other.getDataFineComp()) &&
|
||||
Objects.equals(getCodKit(), other.getCodKit()) &&
|
||||
Objects.equals(getCodAlis(), other.getCodAlis()) &&
|
||||
Objects.equals(getDataInsRow(), other.getDataInsRow()) &&
|
||||
Objects.equals(getNote(), other.getNote()) &&
|
||||
Objects.equals(getCodTcolUi(), other.getCodTcolUi()) &&
|
||||
Objects.equals(getCodTcolUl(), other.getCodTcolUl()) &&
|
||||
Objects.equals(getColliPedana(), other.getColliPedana()) &&
|
||||
Objects.equals(getActivityIdRow(), other.getActivityIdRow()) &&
|
||||
Objects.equals(getIdContratto(), other.getIdContratto()) &&
|
||||
Objects.equals(getFlagSezione(), other.getFlagSezione());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (this == object) return true;
|
||||
if (!(object instanceof DtbDocr)) return false;
|
||||
DtbDocr dtbDocr = (DtbDocr) object;
|
||||
return Objects.equals(getCodAnag(), dtbDocr.getCodAnag()) &&
|
||||
Objects.equals(getCodDtip(), dtbDocr.getCodDtip()) &&
|
||||
Objects.equals(getDataDoc(), dtbDocr.getDataDoc()) &&
|
||||
Objects.equals(getIdRiga(), dtbDocr.getIdRiga()) &&
|
||||
Objects.equals(getNumDoc(), dtbDocr.getNumDoc()) &&
|
||||
Objects.equals(getSerDoc(), dtbDocr.getSerDoc()) &&
|
||||
Objects.equals(getCodAliq(), dtbDocr.getCodAliq()) &&
|
||||
Objects.equals(getCodAnagComp(), dtbDocr.getCodAnagComp()) &&
|
||||
Objects.equals(getCodArtFor(), dtbDocr.getCodArtFor()) &&
|
||||
Objects.equals(getCodCol(), dtbDocr.getCodCol()) &&
|
||||
Objects.equals(getCodDtipComp(), dtbDocr.getCodDtipComp()) &&
|
||||
Objects.equals(getCodJcom(), dtbDocr.getCodJcom()) &&
|
||||
Objects.equals(getCodMart(), dtbDocr.getCodMart()) &&
|
||||
Objects.equals(getCodMdep(), dtbDocr.getCodMdep()) &&
|
||||
Objects.equals(getCodPromo(), dtbDocr.getCodPromo()) &&
|
||||
Objects.equals(getCodTagl(), dtbDocr.getCodTagl()) &&
|
||||
Objects.equals(getCostoUnt(), dtbDocr.getCostoUnt()) &&
|
||||
Objects.equals(getDataDocComp(), dtbDocr.getDataDocComp()) &&
|
||||
Objects.equals(getDataOrd(), dtbDocr.getDataOrd()) &&
|
||||
Objects.equals(getDescrizione(), dtbDocr.getDescrizione()) &&
|
||||
Objects.equals(getDescrizioneEstesa(), dtbDocr.getDescrizioneEstesa()) &&
|
||||
Objects.equals(getFlagEvasoForzato(), dtbDocr.getFlagEvasoForzato()) &&
|
||||
Objects.equals(getImportoRiga(), dtbDocr.getImportoRiga()) &&
|
||||
Objects.equals(getNumCnf(), dtbDocr.getNumCnf()) &&
|
||||
Objects.equals(getNumDocComp(), dtbDocr.getNumDocComp()) &&
|
||||
Objects.equals(getNumOrd(), dtbDocr.getNumOrd()) &&
|
||||
Objects.equals(getPartitaMag(), dtbDocr.getPartitaMag()) &&
|
||||
Objects.equals(getPercGest(), dtbDocr.getPercGest()) &&
|
||||
Objects.equals(getPercIspe(), dtbDocr.getPercIspe()) &&
|
||||
Objects.equals(getPercOneri(), dtbDocr.getPercOneri()) &&
|
||||
Objects.equals(getPercPromo(), dtbDocr.getPercPromo()) &&
|
||||
Objects.equals(getPercProv(), dtbDocr.getPercProv()) &&
|
||||
Objects.equals(getPercProv2(), dtbDocr.getPercProv2()) &&
|
||||
Objects.equals(getPesoLordo(), dtbDocr.getPesoLordo()) &&
|
||||
Objects.equals(getPosizione(), dtbDocr.getPosizione()) &&
|
||||
Objects.equals(getQtaCnf(), dtbDocr.getQtaCnf()) &&
|
||||
Objects.equals(getQtaDoc(), dtbDocr.getQtaDoc()) &&
|
||||
Objects.equals(getQtaDoc2(), dtbDocr.getQtaDoc2()) &&
|
||||
Objects.equals(getQtaDoc3(), dtbDocr.getQtaDoc3()) &&
|
||||
Objects.equals(getRapConv(), dtbDocr.getRapConv()) &&
|
||||
Objects.equals(getRigaOrd(), dtbDocr.getRigaOrd()) &&
|
||||
Objects.equals(getSconto5(), dtbDocr.getSconto5()) &&
|
||||
Objects.equals(getSconto6(), dtbDocr.getSconto6()) &&
|
||||
Objects.equals(getSconto7(), dtbDocr.getSconto7()) &&
|
||||
Objects.equals(getSconto8(), dtbDocr.getSconto8()) &&
|
||||
Objects.equals(getSerDocComp(), dtbDocr.getSerDocComp()) &&
|
||||
Objects.equals(getUntDoc(), dtbDocr.getUntDoc()) &&
|
||||
Objects.equals(getUntDoc2(), dtbDocr.getUntDoc2()) &&
|
||||
Objects.equals(getUntDoc3(), dtbDocr.getUntDoc3()) &&
|
||||
Objects.equals(getValGest(), dtbDocr.getValGest()) &&
|
||||
Objects.equals(getValIspe(), dtbDocr.getValIspe()) &&
|
||||
Objects.equals(getValOneri(), dtbDocr.getValOneri()) &&
|
||||
Objects.equals(getValPromo(), dtbDocr.getValPromo()) &&
|
||||
Objects.equals(getValProv(), dtbDocr.getValProv()) &&
|
||||
Objects.equals(getValProv2(), dtbDocr.getValProv2()) &&
|
||||
Objects.equals(getValUnt(), dtbDocr.getValUnt()) &&
|
||||
Objects.equals(getValUntIva(), dtbDocr.getValUntIva()) &&
|
||||
Objects.equals(getCodMtip(), dtbDocr.getCodMtip()) &&
|
||||
Objects.equals(getMatricola(), dtbDocr.getMatricola()) &&
|
||||
Objects.equals(getDataInizComp(), dtbDocr.getDataInizComp()) &&
|
||||
Objects.equals(getDataFineComp(), dtbDocr.getDataFineComp()) &&
|
||||
Objects.equals(getCodKit(), dtbDocr.getCodKit()) &&
|
||||
Objects.equals(getCodAlis(), dtbDocr.getCodAlis()) &&
|
||||
Objects.equals(getDataInsRow(), dtbDocr.getDataInsRow()) &&
|
||||
Objects.equals(getNote(), dtbDocr.getNote()) &&
|
||||
Objects.equals(getCodTcolUi(), dtbDocr.getCodTcolUi()) &&
|
||||
Objects.equals(getCodTcolUl(), dtbDocr.getCodTcolUl()) &&
|
||||
Objects.equals(getColliPedana(), dtbDocr.getColliPedana()) &&
|
||||
Objects.equals(getActivityIdRow(), dtbDocr.getActivityIdRow()) &&
|
||||
Objects.equals(getIdContratto(), dtbDocr.getIdContratto()) &&
|
||||
Objects.equals(getFlagSezione(), dtbDocr.getFlagSezione());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getCodAnag(),
|
||||
getCodDtip(),
|
||||
getDataDoc(),
|
||||
getIdRiga(),
|
||||
getNumDoc(),
|
||||
getSerDoc(),
|
||||
getCodAliq(),
|
||||
getCodAnagComp(),
|
||||
getCodArtFor(),
|
||||
getCodCol(),
|
||||
getCodDtipComp(),
|
||||
getCodJcom(),
|
||||
getCodMart(),
|
||||
getCodMdep(),
|
||||
getCodPromo(),
|
||||
getCodTagl(),
|
||||
getCostoUnt(),
|
||||
getDataDocComp(),
|
||||
getDataOrd(),
|
||||
getDescrizione(),
|
||||
getDescrizioneEstesa(),
|
||||
getFlagEvasoForzato(),
|
||||
getImportoRiga(),
|
||||
getNumCnf(),
|
||||
getNumDocComp(),
|
||||
getNumOrd(),
|
||||
getPartitaMag(),
|
||||
getPercGest(),
|
||||
getPercIspe(),
|
||||
getPercOneri(),
|
||||
getPercPromo(),
|
||||
getPercProv(),
|
||||
getPercProv2(),
|
||||
getPesoLordo(),
|
||||
getPosizione(),
|
||||
getQtaCnf(),
|
||||
getQtaDoc(),
|
||||
getQtaDoc2(),
|
||||
getQtaDoc3(),
|
||||
getRapConv(),
|
||||
getRigaOrd(),
|
||||
getSconto5(),
|
||||
getSconto6(),
|
||||
getSconto7(),
|
||||
getSconto8(),
|
||||
getSerDocComp(),
|
||||
getUntDoc(),
|
||||
getUntDoc2(),
|
||||
getUntDoc3(),
|
||||
getValGest(),
|
||||
getValIspe(),
|
||||
getValOneri(),
|
||||
getValPromo(),
|
||||
getValProv(),
|
||||
getValProv2(),
|
||||
getValUnt(),
|
||||
getValUntIva(),
|
||||
getCodMtip(),
|
||||
getMatricola(),
|
||||
getDataInizComp(),
|
||||
getDataFineComp(),
|
||||
getCodKit(),
|
||||
getCodAlis(),
|
||||
getDataInsRow(),
|
||||
getNote(),
|
||||
getCodTcolUi(),
|
||||
getCodTcolUl(),
|
||||
getColliPedana(),
|
||||
getActivityIdRow(),
|
||||
getIdContratto(),
|
||||
getFlagSezione());
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -391,6 +391,12 @@ public class DtbOrdt extends DtbDocOrdT implements EquatableEntityInterface<DtbO
|
||||
|
||||
private Boolean ordTrasf;
|
||||
|
||||
/**
|
||||
* Booleano che abilita / disabilita la creazione automatica degli ordini di lavorazione
|
||||
* nel caso in cui questo sia un ordine di Produzione (A)
|
||||
* */
|
||||
private boolean generaOrdLavDaProd = true;
|
||||
|
||||
@Priority(value = 101, copyPk = false)
|
||||
private DtbOrdt OrdLavTx;
|
||||
|
||||
@@ -1739,7 +1745,8 @@ public class DtbOrdt extends DtbDocOrdT implements EquatableEntityInterface<DtbO
|
||||
case SELECT:
|
||||
return;
|
||||
default:
|
||||
if (getGestioneRif() != null && "A".equals(getGestione()) && !ordTrasf) {
|
||||
if (getGestioneRif() != null && "A".equals(getGestione()) &&
|
||||
!ordTrasf && isGeneraOrdLavDaProd()) {
|
||||
if (ApplicationName.TEXTILES.toString().equals(applicationName)) {
|
||||
if ("S".equals(getGestisciOrdLavTx()))
|
||||
ProductionBusinessLogic.GenerateOrdLavTx(connection, this);
|
||||
@@ -2107,4 +2114,13 @@ public class DtbOrdt extends DtbDocOrdT implements EquatableEntityInterface<DtbO
|
||||
Objects.equals(getTarga(), other.getTarga()) &&
|
||||
Objects.equals(getPostiPallet(), other.getPostiPallet());
|
||||
}
|
||||
|
||||
public boolean isGeneraOrdLavDaProd() {
|
||||
return generaOrdLavDaProd;
|
||||
}
|
||||
|
||||
public DtbOrdt setGeneraOrdLavDaProd(boolean generaOrdLavDaProd) {
|
||||
this.generaOrdLavDaProd = generaOrdLavDaProd;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -544,8 +544,9 @@ public class MtbColt extends EntityBase implements EquatableEntityInterface<MtbC
|
||||
return dataDistribuzione;
|
||||
}
|
||||
|
||||
public void setDataDistribuzione(Date dataDistribuzione) {
|
||||
public MtbColt setDataDistribuzione(Date dataDistribuzione) {
|
||||
this.dataDistribuzione = dataDistribuzione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagColloAnonimo() {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -112,6 +112,18 @@ public class ActivityDTO {
|
||||
@SqlField(value = "planned_this_week")
|
||||
private boolean plannedThisWeek;
|
||||
|
||||
@SqlField(value = "done_this_month")
|
||||
private boolean doneThisMonth;
|
||||
|
||||
@SqlField(value = "done_previous_month")
|
||||
private boolean donePreviousMonth;
|
||||
|
||||
@SqlField(value = "done_this_quarter")
|
||||
private boolean doneThisQuarter;
|
||||
|
||||
@SqlField(value = "done_previous_quarter")
|
||||
private boolean donePreviousQuarter;
|
||||
|
||||
@SqlField(value = "stato_attivita")
|
||||
private Integer statoAttivita;
|
||||
|
||||
@@ -532,6 +544,42 @@ public class ActivityDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isDoneThisMonth() {
|
||||
return doneThisMonth;
|
||||
}
|
||||
|
||||
public ActivityDTO setDoneThisMonth(boolean doneThisMonth) {
|
||||
this.doneThisMonth = doneThisMonth;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isDonePreviousMonth() {
|
||||
return donePreviousMonth;
|
||||
}
|
||||
|
||||
public ActivityDTO setDonePreviousMonth(boolean donePreviousMonth) {
|
||||
this.donePreviousMonth = donePreviousMonth;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isDoneThisQuarter() {
|
||||
return doneThisQuarter;
|
||||
}
|
||||
|
||||
public ActivityDTO setDoneThisQuarter(boolean doneThisQuarter) {
|
||||
this.doneThisQuarter = doneThisQuarter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isDonePreviousQuarter() {
|
||||
return donePreviousQuarter;
|
||||
}
|
||||
|
||||
public ActivityDTO setDonePreviousQuarter(boolean donePreviousQuarter) {
|
||||
this.donePreviousQuarter = donePreviousQuarter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getStatoAttivita() {
|
||||
return statoAttivita;
|
||||
}
|
||||
|
||||
@@ -877,7 +877,7 @@ public class ActivityService {
|
||||
" THEN 1\n" +
|
||||
" ELSE 0 END) AS done_this_month,\n" +
|
||||
" MAX(CASE\n" +
|
||||
" WHEN effective_date is not null AND effective_date BETWEEN dbo.f_getfirstdayofmonth(DateAdd(-1, month, GETDATE())) AND EOMONTH(DateAdd(-1, month, GETDATE())) THEN 1\n" +
|
||||
" WHEN effective_date is not null AND effective_date BETWEEN dbo.f_getfirstdayofmonth(DateAdd(MONTH, -1, GETDATE())) AND EOMONTH(DateAdd(MONTH, -1, GETDATE())) THEN 1\n" +
|
||||
" ELSE 0 END) AS done_previous_month,\n" +
|
||||
" MAX(CASE\n" +
|
||||
" WHEN effective_date is not null AND DATEPART(QUARTER, effective_date) = DATEPART(QUARTER, GETDATE())\n" +
|
||||
@@ -1026,6 +1026,10 @@ public class ActivityService {
|
||||
" CAST(ISNULL(sottoattivita.planned_previous_week, 0) AS BIT) AS planned_previous_week,\n" +
|
||||
" CAST(ISNULL(sottoattivita.planned_next_week, 0) AS BIT) AS planned_next_week,\n" +
|
||||
" CAST(ISNULL(sottoattivita.planned_this_week, 0) AS BIT) AS planned_this_week,\n" +
|
||||
" CAST(ISNULL(sottoattivita.done_this_month, 0) AS BIT) AS done_this_month,\n" +
|
||||
" CAST(ISNULL(sottoattivita.done_previous_month, 0) AS BIT) AS done_previous_month,\n" +
|
||||
" CAST(ISNULL(sottoattivita.done_this_quarter, 0) AS BIT) AS done_this_quarter,\n" +
|
||||
" CAST(ISNULL(sottoattivita.done_previous_quarter, 0) AS BIT) AS done_previous_quarter,\n" +
|
||||
" stato_attivita,\n" +
|
||||
" is_bug,\n" +
|
||||
" tags,\n" +
|
||||
|
||||
@@ -7,6 +7,7 @@ import it.integry.ems.document.BRT.restShipment.BrtService;
|
||||
import it.integry.ems.document.Import.dto.*;
|
||||
import it.integry.ems.document.Import.service.*;
|
||||
import it.integry.ems.document.fatture.services.FPR12InvoiceService;
|
||||
import it.integry.ems.document.fatture.services.PassiveInvoiceService;
|
||||
import it.integry.ems.document.puddy.service.ImportDocumentiEUROFOODService;
|
||||
import it.integry.ems.document.puddy.service.SyncFromPuddyService;
|
||||
import it.integry.ems.document.service.GirocontoVenditeService;
|
||||
@@ -158,6 +159,11 @@ public class DocumentiImporter extends BaseEntityImporter<List<EntityBase>> impl
|
||||
entities = getContextBean(DocumentiAcquistoImportService.class)
|
||||
.importApuliaRifOrd(type, format, requestDto, anomalie, headless);
|
||||
break;
|
||||
case CASSETTO_FISCALE:
|
||||
getContextBean(PassiveInvoiceService.class)
|
||||
.checkPassiveInvoice(requestDto, anomalie);
|
||||
entities = new ArrayList<>();
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Tipo " + format + " non supportato");
|
||||
}
|
||||
@@ -213,7 +219,8 @@ public class DocumentiImporter extends BaseEntityImporter<List<EntityBase>> impl
|
||||
BRT_JSON("BRT_JSON"),
|
||||
SCAR_MP_DA_DIST("SCAR_MP_DA_DIST"),
|
||||
GELORENT("GELORENT"),
|
||||
APULIA_RIFORD("APULIA_RIFORD");
|
||||
APULIA_RIFORD("APULIA_RIFORD"),
|
||||
CASSETTO_FISCALE("CASSETTO_FISCALE");
|
||||
|
||||
private String text;
|
||||
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
package it.integry.ems.document.fatture.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import it.integry.ems_model.annotation.DtoField;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class FatturePassiveCsvDTO {
|
||||
final String formatDate = "dd/MM/yyyy";
|
||||
@JsonProperty("TIPO FATTURA")
|
||||
private String tipoFattura;
|
||||
|
||||
@JsonProperty("TIPO DOCUMENTO")
|
||||
private String tipoDocumento;
|
||||
|
||||
@JsonProperty("NUMERO FATTURA / DOCUMENTO")
|
||||
private String numFattura;
|
||||
|
||||
@DtoField(format = formatDate)
|
||||
@JsonProperty("DATA EMISSIONE")
|
||||
private Date dataEmissione;
|
||||
|
||||
@DtoField(format = formatDate)
|
||||
@JsonProperty("DATA TRASMISSIONE")
|
||||
private Date dataTrasmissione;
|
||||
|
||||
@JsonProperty("CODICE FISCALE FORNITORE")
|
||||
private String codFiscaleFornitore;
|
||||
|
||||
@JsonProperty("PARTITA IVA FORNITORE")
|
||||
private String partitaIvaFornitore;
|
||||
|
||||
@JsonProperty("DENOMINAZIONE FORNITORE")
|
||||
private String denominazioneFornitore;
|
||||
|
||||
@JsonProperty("CODICE FISCALE CLIENTE")
|
||||
private String codiceFiscaleCliente;
|
||||
|
||||
@JsonProperty("PARTITA IVA CLIENTE")
|
||||
private String partitaIvaCliente;
|
||||
|
||||
@JsonProperty("DENOMINAZIONE CLIENTE")
|
||||
private String denominazioneCliente;
|
||||
|
||||
@JsonProperty("IMPONIBILE/IMPORTO (TOTALE IN EURO)")
|
||||
private String imponibileImporto;
|
||||
|
||||
@JsonProperty("IMPOSTA (TOTALE IN EURO)")
|
||||
private String impostaImporto;
|
||||
|
||||
@JsonProperty("SDI/FILE")
|
||||
private String sdi;
|
||||
|
||||
@JsonProperty("FATTURE CONSEGNATE")
|
||||
private String fattureConsegnate;
|
||||
|
||||
@DtoField(format = formatDate)
|
||||
@JsonProperty("DATA RICEZIONE")
|
||||
private Date dataRicezione;
|
||||
|
||||
@JsonProperty("BOLLO VIRTUALE")
|
||||
private String bolloVirtuale;
|
||||
|
||||
public String getFormatDate() {
|
||||
return formatDate;
|
||||
}
|
||||
|
||||
public String getTipoFattura() {
|
||||
return tipoFattura;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setTipoFattura(String tipoFattura) {
|
||||
this.tipoFattura = tipoFattura;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTipoDocumento() {
|
||||
return tipoDocumento;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setTipoDocumento(String tipoDocumento) {
|
||||
this.tipoDocumento = tipoDocumento;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNumFattura() {
|
||||
return numFattura;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setNumFattura(String numFattura) {
|
||||
this.numFattura = numFattura;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataEmissione() {
|
||||
return dataEmissione;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setDataEmissione(Date dataEmissione) {
|
||||
this.dataEmissione = dataEmissione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataTrasmissione() {
|
||||
return dataTrasmissione;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setDataTrasmissione(Date dataTrasmissione) {
|
||||
this.dataTrasmissione = dataTrasmissione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodFiscaleFornitore() {
|
||||
return codFiscaleFornitore;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setCodFiscaleFornitore(String codFiscaleFornitore) {
|
||||
this.codFiscaleFornitore = codFiscaleFornitore;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPartitaIvaFornitore() {
|
||||
return partitaIvaFornitore;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setPartitaIvaFornitore(String partitaIvaFornitore) {
|
||||
this.partitaIvaFornitore = partitaIvaFornitore;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDenominazioneFornitore() {
|
||||
return denominazioneFornitore;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setDenominazioneFornitore(String denominazioneFornitore) {
|
||||
this.denominazioneFornitore = denominazioneFornitore;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodiceFiscaleCliente() {
|
||||
return codiceFiscaleCliente;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setCodiceFiscaleCliente(String codiceFiscaleCliente) {
|
||||
this.codiceFiscaleCliente = codiceFiscaleCliente;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPartitaIvaCliente() {
|
||||
return partitaIvaCliente;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setPartitaIvaCliente(String partitaIvaCliente) {
|
||||
this.partitaIvaCliente = partitaIvaCliente;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDenominazioneCliente() {
|
||||
return denominazioneCliente;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setDenominazioneCliente(String denominazioneCliente) {
|
||||
this.denominazioneCliente = denominazioneCliente;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getImponibileImporto() {
|
||||
return imponibileImporto;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setImponibileImporto(String imponibileImporto) {
|
||||
this.imponibileImporto = imponibileImporto;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getImpostaImporto() {
|
||||
return impostaImporto;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setImpostaImporto(String impostaImporto) {
|
||||
this.impostaImporto = impostaImporto;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSdi() {
|
||||
return sdi;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setSdi(String sdi) {
|
||||
this.sdi = sdi;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFattureConsegnate() {
|
||||
return fattureConsegnate;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setFattureConsegnate(String fattureConsegnate) {
|
||||
this.fattureConsegnate = fattureConsegnate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataRicezione() {
|
||||
return dataRicezione;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setDataRicezione(Date dataRicezione) {
|
||||
this.dataRicezione = dataRicezione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBolloVirtuale() {
|
||||
return bolloVirtuale;
|
||||
}
|
||||
|
||||
public FatturePassiveCsvDTO setBolloVirtuale(String bolloVirtuale) {
|
||||
this.bolloVirtuale = bolloVirtuale;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -2,16 +2,21 @@ package it.integry.ems.document.fatture.services;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import it.integry.common.var.CommonConstants;
|
||||
import it.integry.ems.Import.dto.AnomalieDTO;
|
||||
import it.integry.ems.Import.dto.ImportRequestDTO;
|
||||
import it.integry.ems.document.fatture.base.FpxStatus;
|
||||
import it.integry.ems.document.fatture.base.PassiveInvoiceRecapObject;
|
||||
import it.integry.ems.document.fatture.dto.FattureCollegate;
|
||||
import it.integry.ems.document.fatture.dto.FatturePassiveCsvDTO;
|
||||
import it.integry.ems.document.fatture.dto.FpxPDFTypeEnum;
|
||||
import it.integry.ems.document.fatture.dto.FpxToPdfDTO;
|
||||
import it.integry.ems.document.fatture.xml.pa.FatturaElettronicaType;
|
||||
import it.integry.ems.document.fatture.xml.pa.SoggettoEmittenteType;
|
||||
import it.integry.ems.document.fatture.xml.pa.TipoDocumentoType;
|
||||
import it.integry.ems.document.service.DocumentService;
|
||||
import it.integry.ems.file_formatter.csv.CsvMapper;
|
||||
import it.integry.ems.javabeans.RequestDataDTO;
|
||||
import it.integry.ems.order.Import.dto.OrdiniDialogoDTO;
|
||||
import it.integry.ems.response.FileItem;
|
||||
import it.integry.ems.service.EntityProcessor;
|
||||
import it.integry.ems.service.MailService;
|
||||
@@ -22,9 +27,7 @@ import it.integry.ems_model.base.EntityBase;
|
||||
import it.integry.ems_model.entity.*;
|
||||
import it.integry.ems_model.service.SetupGest;
|
||||
import it.integry.ems_model.types.OperationType;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityHashMap;
|
||||
import it.integry.ems_model.utility.UtilityString;
|
||||
import it.integry.ems_model.utility.*;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
@@ -524,4 +527,51 @@ public class PassiveInvoiceService {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void checkPassiveInvoice(ImportRequestDTO requestDTO, List<AnomalieDTO> anomalie) throws Exception {
|
||||
String csv = requestDTO.getRawContent();
|
||||
CsvMapper<FatturePassiveCsvDTO> mapper = new CsvMapper<>();
|
||||
List<FatturePassiveCsvDTO> fatturePassiveCsvDTOS = mapper.deserialize(csv.toUpperCase(), FatturePassiveCsvDTO.class, ";");
|
||||
|
||||
if (fatturePassiveCsvDTOS != null && fatturePassiveCsvDTOS.size() > 0) {
|
||||
String sql = Query.format("SELECT CAST(COUNT(*) AS BIT) FROM azienda WHERE part_iva = %s", fatturePassiveCsvDTOS.get(0).getPartitaIvaCliente().replace("'", ""));
|
||||
boolean existAzienda = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
if (!existAzienda) {
|
||||
throw new Exception("Il file selezionato non contiene la partita iva di quest'azienda");
|
||||
}
|
||||
}
|
||||
for(FatturePassiveCsvDTO f: fatturePassiveCsvDTOS) {
|
||||
String partIvaForn = f.getPartitaIvaFornitore().replace("'","");
|
||||
String numFattura = f.getNumFattura().replace("'", "");
|
||||
Date dataDoc = f.getDataEmissione();
|
||||
String progressivoSdi = f.getSdi().replace("'", "");
|
||||
|
||||
String sql = Query.format(
|
||||
"SELECT CAST(COUNT(*) AS BIT)\n" +
|
||||
"FROM dtb_fatture_passive\n" +
|
||||
"WHERE part_iva = %s\n" +
|
||||
" AND num_doc = %s\n" +
|
||||
" AND data_doc = %s\n" +
|
||||
" AND identificativo_sdi = %S",
|
||||
partIvaForn,
|
||||
numFattura,
|
||||
dataDoc,
|
||||
progressivoSdi);
|
||||
|
||||
boolean existDoc = UtilityDB.executeSimpleQueryOnlyFirstRowFirstColumn(multiDBTransactionManager.getPrimaryConnection(), sql);
|
||||
|
||||
if (!existDoc) {
|
||||
anomalie.add(AnomalieDTO.error(
|
||||
String.format("%s n. %s del %s fornitore: %s progressivo sdi: %s non presente nel sistema.",
|
||||
f.getTipoDocumento().replace("'", ""),
|
||||
numFattura,
|
||||
new SimpleDateFormat(CommonConstants.DATE_FORMAT_DMY).format(dataDoc),
|
||||
f.getDenominazioneFornitore().replace("'", ""),
|
||||
progressivoSdi)
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,11 +86,11 @@ public class WMSSpedizioneController {
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "duplicateUDSRow", method = RequestMethod.POST)
|
||||
@RequestMapping(value = "duplicateUDS", method = RequestMethod.POST)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse duplicateUDSRow(@RequestParam(CommonConstants.PROFILE_DB) String profileDB,
|
||||
@RequestBody DuplicateUDSRequestDTO duplicateUDSRowRequestDTO) throws Exception {
|
||||
ServiceRestResponse duplicateUDS(@RequestParam(CommonConstants.PROFILE_DB) String profileDB,
|
||||
@RequestBody DuplicateUDSRequestDTO duplicateUDSRequestDTO) throws Exception {
|
||||
|
||||
return ServiceRestResponse.createPositiveResponse(wmsSpedizioneService.duplicateUDSRow(duplicateUDSRowRequestDTO));
|
||||
return ServiceRestResponse.createPositiveResponse(wmsSpedizioneService.duplicateUDS(duplicateUDSRequestDTO));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -499,19 +499,38 @@ public class WMSSpedizioneService {
|
||||
entityProcessor.processEntity(mtbColt, multiDBTransactionManager);
|
||||
}
|
||||
|
||||
public DuplicateUDSResponseDTO duplicateUDSRow(DuplicateUDSRequestDTO deleteUDSRowRequestDTO) throws Exception {
|
||||
List<MtbColt> mtbColtList = new ArrayList<>();
|
||||
public DuplicateUDSResponseDTO duplicateUDS(DuplicateUDSRequestDTO duplicateUDSRequest) throws Exception {
|
||||
List<MtbColt> mtbColtListToReturn = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < duplicateUDSRequest.getNumOfDuplicates(); i++) {
|
||||
MtbColt mtbColt = (MtbColt) duplicateUDSRequest.getMtbColt().clone();
|
||||
|
||||
MtbColt mtbColt = deleteUDSRowRequestDTO.getMtbColt();
|
||||
mtbColt.setOperation(OperationType.INSERT);
|
||||
mtbColt.setNumCollo(null)
|
||||
.setDataDistribuzione(null)
|
||||
.setDataVers(null)
|
||||
.setDataOrd(null)
|
||||
.setNumOrd(null)
|
||||
.setOperation(OperationType.INSERT);
|
||||
|
||||
for (int i = 0; i < deleteUDSRowRequestDTO.getNumOfDuplicates(); i++) {
|
||||
mtbColtList.add(mtbColt.setNumCollo(null));
|
||||
mtbColt.getMtbColr().stream().peek(x -> {
|
||||
x.setNumCollo(null)
|
||||
.setDataOrd(null)
|
||||
.setNumOrd(null)
|
||||
.setRigaOrd(null);
|
||||
});
|
||||
|
||||
entityProcessor.processEntity(mtbColt, multiDBTransactionManager);
|
||||
|
||||
List<MtbColt> distributedUDS = wmsColliService.distribuisciUL(new FiltroDistribuzioneColloDTO()
|
||||
.setDataCollo(mtbColt.getDataCollo())
|
||||
.setSerCollo(mtbColt.getSerCollo())
|
||||
.setGestione(mtbColt.getGestione())
|
||||
.setNumCollo(mtbColt.getNumCollo())
|
||||
.setCriterioDistribuzione(FiltroDistribuzioneColloDTO.CriterioDistribuzioneEnum.U.getText()));
|
||||
|
||||
mtbColtListToReturn.addAll(distributedUDS);
|
||||
}
|
||||
|
||||
entityProcessor.processEntityList(mtbColtList, true);
|
||||
|
||||
return new DuplicateUDSResponseDTO().setMtbColtList(mtbColtList);
|
||||
return new DuplicateUDSResponseDTO().setMtbColtList(mtbColtListToReturn);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package it.integry.ems.system.exchange.controller;
|
||||
|
||||
import it.integry.common.var.CommonConstants;
|
||||
import it.integry.ems.response.ServiceRestResponse;
|
||||
import it.integry.ems.system.exchange.service.ExchangeDocumentImportService;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@RestController
|
||||
@Scope("request")
|
||||
@RequestMapping("exchange/documenti/")
|
||||
public class ExchangeDocumentImportController {
|
||||
|
||||
private final Logger logger = LogManager.getLogger();
|
||||
|
||||
@Autowired
|
||||
private ExchangeDocumentImportService exchangeDocumentImportService;
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "importLavorazione", method = RequestMethod.GET)
|
||||
public @ResponseBody
|
||||
ServiceRestResponse importDocumentiLavorazione(HttpServletRequest request,
|
||||
@RequestParam(CommonConstants.PROFILE_DB) String configuration) throws Exception {
|
||||
|
||||
exchangeDocumentImportService.importDocumentiLavorazione();
|
||||
return ServiceRestResponse.createPositiveResponse();
|
||||
}
|
||||
}
|
||||
@@ -118,14 +118,14 @@ public class ExchangeColliImportService {
|
||||
|
||||
|
||||
private void singleUpdateImported(Connection connection, MtbColt importedMtbColt) throws Exception {
|
||||
final HashMap<String, Object> importedMtbColtKey = new HashMap<String, Object>() {{
|
||||
final HashMap<String, Object> importedKey = new HashMap<String, Object>() {{
|
||||
put("data_collo", importedMtbColt.getDataCollo());
|
||||
put("ser_collo", importedMtbColt.getSerCollo());
|
||||
put("num_collo", importedMtbColt.getNumCollo());
|
||||
put("gestione", importedMtbColt.getGestione());
|
||||
}};
|
||||
|
||||
String whereCondKey = UtilityQuery.concatFieldsInWhereCond(importedMtbColtKey);
|
||||
String whereCondKey = UtilityQuery.concatFieldsInWhereCond(importedKey);
|
||||
|
||||
UtilityDB.executeStatement(connection,
|
||||
"DELETE FROM mtb_colr_lav_prev " +
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
package it.integry.ems.system.exchange.service;
|
||||
|
||||
import it.integry.ems.service.EntityProcessor;
|
||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||
import it.integry.ems_model.entity.DtbDocr;
|
||||
import it.integry.ems_model.entity.DtbDoct;
|
||||
import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||
import it.integry.ems_model.utility.UtilityQuery;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Service
|
||||
@Scope("request")
|
||||
public class ExchangeDocumentImportService {
|
||||
|
||||
//TODO: To be remove, only for fast development
|
||||
private final String ROSSOGARGANO_EXCHANGE_PROFILEDB = "ROSSO_GARGANO_EXCHANGE";
|
||||
|
||||
@Autowired
|
||||
private EntityProcessor entityProcessor;
|
||||
|
||||
@Autowired
|
||||
private MultiDBTransactionManager multiDBTransactionManager;
|
||||
|
||||
@Autowired
|
||||
private ExchangeImportSchemaManagerService exchangeImportSchemaManagerService;
|
||||
|
||||
@Autowired
|
||||
private ExchangeImportDataManagerService exchangeImportDataManagerService;
|
||||
|
||||
public void importDocumentiLavorazione() throws Exception {
|
||||
|
||||
try (MultiDBTransactionManager exchangeDb = new MultiDBTransactionManager(ROSSOGARGANO_EXCHANGE_PROFILEDB)) {
|
||||
|
||||
exchangeImportSchemaManagerService.syncSchema(exchangeDb.getPrimaryConnection(), ExchangeImportSchemaManagerService.SchemaType.DocumentiLavorazione);
|
||||
|
||||
final List<DtbDoct> exchangeImportedData = importDocumentiLavorazione(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
UtilityLocalDate.getNow().minusMonths(1),
|
||||
UtilityLocalDate.getNow(),
|
||||
true);
|
||||
|
||||
final List<DtbDoct> exchangeUpdatedData = importDocumentiLavorazione(
|
||||
exchangeDb.getPrimaryConnection(),
|
||||
UtilityLocalDate.getNow().minusMonths(1),
|
||||
UtilityLocalDate.getNow(),
|
||||
false);
|
||||
|
||||
|
||||
List<EquatableEntityInterface> importedData = exchangeImportedData.stream()
|
||||
.map(x -> (EquatableEntityInterface) x)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<EquatableEntityInterface> updatedData = exchangeUpdatedData.stream()
|
||||
.map(x -> (EquatableEntityInterface) x)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<EquatableEntityInterface> allData = exchangeImportDataManagerService
|
||||
.runSync(DtbDoct.class, importedData, updatedData);
|
||||
|
||||
int importedCounter = 0;
|
||||
for (EquatableEntityInterface dataToSave : allData) {
|
||||
|
||||
LogManager.getLogger().debug("Importati {} di {}", ++importedCounter, allData.size());
|
||||
try {
|
||||
entityProcessor.processEntity(dataToSave, multiDBTransactionManager);
|
||||
|
||||
singleUpdateImported(exchangeDb.getPrimaryConnection(), (DtbDoct) dataToSave);
|
||||
multiDBTransactionManager.commitAll();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
multiDBTransactionManager.rollbackAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private List<DtbDoct> importDocumentiLavorazione(Connection connection,
|
||||
LocalDate minDate, LocalDate maxDate, boolean retrieveAlreadyImported) throws Exception {
|
||||
|
||||
final List<DtbDoct> dtbDoctLav = exchangeImportDataManagerService.retrieveDataFromExchange(connection, DtbDoct.class,
|
||||
"dtb_doct_lav", "data_doc", minDate, maxDate, retrieveAlreadyImported);
|
||||
|
||||
final List<DtbDocr> dtbDocrLav = exchangeImportDataManagerService.retrieveDataFromExchange(connection, DtbDocr.class,
|
||||
"dtb_docr_lav", "data_doc", minDate, maxDate, retrieveAlreadyImported);
|
||||
|
||||
|
||||
dtbDoctLav
|
||||
.forEach(x -> {
|
||||
|
||||
x.setDtbDocr(dtbDocrLav.stream()
|
||||
.filter(y -> y.getDataDoc().equals(x.getDataDoc()) &&
|
||||
y.getNumDoc().equals(x.getNumDoc()) &&
|
||||
y.getSerDoc().equalsIgnoreCase(x.getSerDoc()) &&
|
||||
y.getCodAnag().equalsIgnoreCase(x.getCodAnag()) &&
|
||||
y.getCodDtip().equalsIgnoreCase(x.getCodDtip()))
|
||||
.collect(Collectors.toList()));
|
||||
});
|
||||
|
||||
return dtbDoctLav;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void singleUpdateImported(Connection connection, DtbDoct importedDtbDoct) throws Exception {
|
||||
final HashMap<String, Object> importedKey = new HashMap<String, Object>() {{
|
||||
put("data_doc", importedDtbDoct.getDataDoc());
|
||||
put("ser_doc", importedDtbDoct.getSerDoc());
|
||||
put("num_doc", importedDtbDoct.getNumDoc());
|
||||
put("cod_anag", importedDtbDoct.getCodAnag());
|
||||
put("cod_dtip", importedDtbDoct.getCodDtip());
|
||||
}};
|
||||
|
||||
String whereCondKey = UtilityQuery.concatFieldsInWhereCond(importedKey);
|
||||
|
||||
UtilityDB.executeStatement(connection,
|
||||
"DELETE FROM dtb_docr_lav_prev " +
|
||||
"WHERE (" + whereCondKey + ")",
|
||||
|
||||
"DELETE FROM dtb_doct_lav_prev " +
|
||||
"WHERE (" + whereCondKey + ")",
|
||||
|
||||
"INSERT INTO dtb_docr_lav_prev " +
|
||||
"SELECT * FROM dtb_docr_lav " +
|
||||
"WHERE (" + whereCondKey + ")",
|
||||
|
||||
"INSERT INTO dtb_doct_lav_prev " +
|
||||
"SELECT * FROM dtb_doct_lav " +
|
||||
"WHERE (" + whereCondKey + ")");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -43,20 +43,20 @@ public class ExchangeImportDataManagerService {
|
||||
|
||||
public List<EquatableEntityInterface> runSync(Class<? extends EquatableEntityInterface> clazz, List<EquatableEntityInterface> importedItems, List<EquatableEntityInterface> newItems) throws IllegalAccessException {
|
||||
//To be added
|
||||
List<EquatableEntityInterface> mtbColtToAdd = calcItemsToAdd(clazz, importedItems, newItems);
|
||||
List<EquatableEntityInterface> dataToAdd = calcItemsToAdd(clazz, importedItems, newItems);
|
||||
|
||||
//To be deleted
|
||||
List<EquatableEntityInterface> mtbColtToDelete = calcItemsToDelete(clazz, importedItems, newItems);
|
||||
List<EquatableEntityInterface> dataToDelete = calcItemsToDelete(clazz, importedItems, newItems);
|
||||
|
||||
//To be updated
|
||||
List<EquatableEntityInterface> mtbColtToUpdate = calcItemsToUpdate(clazz, importedItems, newItems);
|
||||
List<EquatableEntityInterface> dataToUpdate = calcItemsToUpdate(clazz, importedItems, newItems);
|
||||
|
||||
List<EquatableEntityInterface> allMtbColts = new ArrayList<>();
|
||||
allMtbColts.addAll(mtbColtToAdd);
|
||||
allMtbColts.addAll(mtbColtToDelete);
|
||||
allMtbColts.addAll(mtbColtToUpdate);
|
||||
List<EquatableEntityInterface> allData = new ArrayList<>();
|
||||
allData.addAll(dataToAdd);
|
||||
allData.addAll(dataToDelete);
|
||||
allData.addAll(dataToUpdate);
|
||||
|
||||
return allMtbColts;
|
||||
return allData;
|
||||
}
|
||||
|
||||
private List<EquatableEntityInterface> calcItemsToAdd(Class<? extends EquatableEntityInterface> clazz, List<EquatableEntityInterface> importedMtbColts, List<EquatableEntityInterface> updatedMtbColts) throws IllegalAccessException {
|
||||
|
||||
@@ -9,6 +9,8 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -18,34 +20,30 @@ public class ExchangeImportSchemaManagerService {
|
||||
|
||||
public enum SchemaType {
|
||||
ColliLavorazione,
|
||||
OrdiniLavorazione
|
||||
OrdiniLavorazione,
|
||||
DocumentiLavorazione
|
||||
}
|
||||
|
||||
private final HashMap<SchemaType, List<String>> schemaToTableBinding = new HashMap<SchemaType, List<String>>() {{
|
||||
put(SchemaType.ColliLavorazione, Arrays.asList("mtb_colt_lav", "mtb_colr_lav"));
|
||||
put(SchemaType.OrdiniLavorazione, Arrays.asList("dtb_ordt_lav", "dtb_ordr_lav"));
|
||||
put(SchemaType.DocumentiLavorazione, Arrays.asList("dtb_doct_lav", "dtb_docr_lav"));
|
||||
}};
|
||||
|
||||
public void syncSchema(Connection connection, SchemaType schemaType) throws Exception {
|
||||
|
||||
SQLServerDBSchemaManager sqlServerDBSchemaManager = new SQLServerDBSchemaManager(connection);
|
||||
|
||||
List<DatabaseTableView> objectsToSync = new ArrayList<>();
|
||||
DatabaseView tmpView = null;
|
||||
|
||||
switch (schemaType) {
|
||||
case ColliLavorazione:
|
||||
tmpView = sqlServerDBSchemaManager.getView("mtb_colt_lav");
|
||||
if (tmpView != null) objectsToSync.add(tmpView);
|
||||
tmpView = sqlServerDBSchemaManager.getView("mtb_colr_lav");
|
||||
if (tmpView != null) objectsToSync.add(tmpView);
|
||||
break;
|
||||
if (!schemaToTableBinding.containsKey(schemaType))
|
||||
throw new Exception("Si prega di definire gli oggetti del database da sincronizzare per " + schemaType);
|
||||
|
||||
case OrdiniLavorazione:
|
||||
tmpView = sqlServerDBSchemaManager.getView("dtb_ordt_lav");
|
||||
if (tmpView != null) objectsToSync.add(tmpView);
|
||||
tmpView = sqlServerDBSchemaManager.getView("dtb_ordr_lav");
|
||||
if (tmpView != null) objectsToSync.add(tmpView);
|
||||
break;
|
||||
List<String> objectNamesToSync = schemaToTableBinding.get(schemaType);
|
||||
|
||||
default:
|
||||
throw new Exception("Si prega di definire gli oggetti del database da sincronizzare per " + schemaType);
|
||||
for (String objectName : objectNamesToSync) {
|
||||
DatabaseView tmpView = sqlServerDBSchemaManager.getView(objectName);
|
||||
if (tmpView != null) objectsToSync.add(tmpView);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import it.integry.ems_model.utility.UtilityDB;
|
||||
import it.integry.ems_model.utility.UtilityLocalDate;
|
||||
import it.integry.ems_model.utility.UtilityQuery;
|
||||
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.stereotype.Service;
|
||||
@@ -26,6 +27,8 @@ public class ExchangeOrderImportService {
|
||||
//TODO: To be remove, only for fast development
|
||||
private final String ROSSOGARGANO_EXCHANGE_PROFILEDB = "ROSSO_GARGANO_EXCHANGE";
|
||||
|
||||
private final Logger logger = LogManager.getLogger();
|
||||
|
||||
@Autowired
|
||||
private EntityProcessor entityProcessor;
|
||||
|
||||
@@ -57,48 +60,65 @@ public class ExchangeOrderImportService {
|
||||
false);
|
||||
|
||||
|
||||
List<EquatableEntityInterface> importedMtbColts = exchangeImportedMtbColts.stream()
|
||||
List<EquatableEntityInterface> importedData = exchangeImportedMtbColts.stream()
|
||||
.map(x -> (EquatableEntityInterface) x)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<EquatableEntityInterface> updatedMtbColts = exchangeUpdatedMtbColts.stream()
|
||||
List<EquatableEntityInterface> updatedData = exchangeUpdatedMtbColts.stream()
|
||||
.map(x -> (EquatableEntityInterface) x)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<EquatableEntityInterface> allOrders = exchangeImportDataManagerService
|
||||
.runSync(DtbOrdt.class, importedMtbColts, updatedMtbColts);
|
||||
List<EquatableEntityInterface> allData = exchangeImportDataManagerService
|
||||
.runSync(DtbOrdt.class, importedData, updatedData);
|
||||
|
||||
Exception firstExceptionToThrow = null;
|
||||
|
||||
int importedCounter = 0;
|
||||
for (EquatableEntityInterface dtbOrdtToSave : allOrders) {
|
||||
for (EquatableEntityInterface dtbOrdtToSave : allData) {
|
||||
|
||||
LogManager.getLogger().debug("Importati {} di {}", ++importedCounter, allOrders.size());
|
||||
logger.debug("Importati {} di {}", ++importedCounter, allData.size());
|
||||
try {
|
||||
entityProcessor.processEntity(dtbOrdtToSave, multiDBTransactionManager);
|
||||
|
||||
singleUpdateImported(exchangeDb.getPrimaryConnection(), (DtbOrdt) dtbOrdtToSave);
|
||||
multiDBTransactionManager.commitAll();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
if(firstExceptionToThrow == null) firstExceptionToThrow = ex;
|
||||
|
||||
logger.error("Errore durante l'importazione dell'ordine", ex);
|
||||
multiDBTransactionManager.rollbackAll();
|
||||
}
|
||||
}
|
||||
|
||||
if(firstExceptionToThrow != null) throw firstExceptionToThrow;
|
||||
}
|
||||
}
|
||||
|
||||
private List<DtbOrdt> importOrdiniLavorazione(Connection connection,
|
||||
LocalDate minDate, LocalDate maxDate, boolean retrieveAlreadyImported) throws Exception {
|
||||
|
||||
final List<DtbOrdt> dtbOrdtLav = exchangeImportDataManagerService.retrieveDataFromExchange(connection, DtbOrdt.class,
|
||||
List<DtbOrdt> dtbOrdtLav = exchangeImportDataManagerService.retrieveDataFromExchange(connection, DtbOrdt.class,
|
||||
"dtb_ordt_lav", "data_ord", minDate, maxDate, retrieveAlreadyImported);
|
||||
|
||||
final List<DtbOrdr> dtbOrdrLav = exchangeImportDataManagerService.retrieveDataFromExchange(connection, DtbOrdr.class,
|
||||
List<DtbOrdr> dtbOrdrLav = exchangeImportDataManagerService.retrieveDataFromExchange(connection, DtbOrdr.class,
|
||||
"dtb_ordr_lav", "data_ord", minDate, maxDate, retrieveAlreadyImported);
|
||||
|
||||
dtbOrdtLav = dtbOrdtLav.stream()
|
||||
// .filter(x -> x.getGestione().equalsIgnoreCase("A"))
|
||||
.sorted((o1, o2) ->
|
||||
o1.getGestione().equalsIgnoreCase("A") ? -1 : 1) //Prima gli ordini di produzione A
|
||||
.collect(Collectors.toList());
|
||||
|
||||
dtbOrdrLav = dtbOrdrLav.stream()
|
||||
.filter(x -> x.getGestione().equalsIgnoreCase("L"))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<DtbOrdr> finalDtbOrdrLav = dtbOrdrLav;
|
||||
dtbOrdtLav
|
||||
.forEach(x -> {
|
||||
x.setGeneraOrdLavDaProd(false);
|
||||
|
||||
x.setDtbOrdr(dtbOrdrLav.stream()
|
||||
x.setDtbOrdr(finalDtbOrdrLav.stream()
|
||||
.filter(y -> y.getDataOrd().equals(x.getDataOrd()) &&
|
||||
y.getGestione().equalsIgnoreCase(x.getGestione()) &&
|
||||
y.getNumOrd().equals(x.getNumOrd()))
|
||||
@@ -110,13 +130,13 @@ public class ExchangeOrderImportService {
|
||||
|
||||
|
||||
private void singleUpdateImported(Connection connection, DtbOrdt importedDtbOrdt) throws Exception {
|
||||
final HashMap<String, Object> importedMtbColtKey = new HashMap<String, Object>() {{
|
||||
final HashMap<String, Object> importedKey = new HashMap<String, Object>() {{
|
||||
put("data_ord", importedDtbOrdt.getDataOrd());
|
||||
put("num_ord", importedDtbOrdt.getNumOrd());
|
||||
put("gestione", importedDtbOrdt.getGestione());
|
||||
}};
|
||||
|
||||
String whereCondKey = UtilityQuery.concatFieldsInWhereCond(importedMtbColtKey);
|
||||
String whereCondKey = UtilityQuery.concatFieldsInWhereCond(importedKey);
|
||||
|
||||
UtilityDB.executeStatement(connection,
|
||||
"DELETE FROM dtb_ordr_lav_prev " +
|
||||
|
||||
Reference in New Issue
Block a user