Modificati equals in gestione Exchange

This commit is contained in:
2024-08-23 09:51:39 +02:00
parent fd0a686078
commit dbf96ac0eb
20 changed files with 343 additions and 237 deletions

View File

@@ -2,10 +2,13 @@ package it.integry.ems_model.base;
public interface EquatableEntityInterface<T> extends EntityInterface {
int hashCodeKey();
int hashCode();
boolean equalsKey(T other);
boolean equalsContent(T other);
boolean equals(Object other);
}

View File

@@ -1425,17 +1425,19 @@ public class DtbDocr extends DtbBaseDocR implements EquatableEntityInterface<Dtb
}
@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());
public int hashCodeKey() {
return Objects.hash(getCodAnag(), getCodDtip(), getDataDoc(), getNumDoc(), getSerDoc(), getIdRiga());
}
@Override
public boolean equalsContent(DtbDocr other) {
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()) && 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());
if(hashCodeKey() != other.hashCodeKey())
return false;
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
@@ -1444,12 +1446,13 @@ public class DtbDocr extends DtbBaseDocR implements EquatableEntityInterface<Dtb
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());
DtbDocr other = (DtbDocr) object;
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 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());
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(), getPesoNetto(), getRigaKit(), getFlagIsKit(), getCodJfas(), getGestione(), getCodVdes(), getListino(), getFlagTd(), getSconto1(), getSconto2(), getSconto3(), getSconto4(), getPercAliq(), getDataScad(), getReso(), getFuoriAssortimento(), getMtbAart(), getUntMisDTO(), getGeneraMovCont(), getMtbPartitaMag(), getTipoIva(), getCodFornTd(), getCodVage(), getCodDivi(), getFlagPrzScontati(), getCambio(), getFlagCosto(), getTipoEmissione(), getDataReg(), getCodCcon(), getFlagPrzIva(), getSetDatiLisv(), getCodDtipBolla(), getDataDocBolla(), getSerDocBolla(), getNumDocBolla(), getIdRigaBolla(), getDocAp(), getDataInsTestata(), getCorrispettivo(), getDtbDocrBolla());
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -257,13 +257,29 @@ public class DtbOrds extends EntityBase implements EquatableEntityInterface<DtbO
public boolean equalsKey(DtbOrds other) {
if (this == other)
return true;
if(hashCodeKey() != other.hashCodeKey())
return false;
return Objects.equals(getDataOrd(), other.getDataOrd()) && Objects.equals(getGestione(), other.getGestione()) && Objects.equals(getIdRiga(), other.getIdRiga()) && Objects.equals(getNumOrd(), other.getNumOrd());
}
@Override
public boolean equalsContent(DtbOrds other) {
if (this == other)
return true;
return Objects.equals(getDataOrd(), other.getDataOrd()) && Objects.equals(getGestione(), other.getGestione()) && Objects.equals(getIdRiga(), other.getIdRiga()) && Objects.equals(getNumOrd(), other.getNumOrd()) && Objects.equals(getCodAliq(), other.getCodAliq()) && Objects.equals(getCodSpes(), other.getCodSpes()) && Objects.equals(getDescrizione(), other.getDescrizione()) && Objects.equals(getImporto(), other.getImporto()) && Objects.equals(getNumFase(), other.getNumFase()) && Objects.equals(getQta(), other.getQta()) && Objects.equals(getUntMis(), other.getUntMis()) && Objects.equals(getValUnt(), other.getValUnt());
public int hashCodeKey() {
return Objects.hash(getDataOrd(), getGestione(), getIdRiga(), getNumOrd());
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof DtbOrds)) return false;
DtbOrds dtbOrds = (DtbOrds) o;
return Objects.equals(getDataOrd(), dtbOrds.getDataOrd()) && Objects.equals(getGestione(), dtbOrds.getGestione()) && Objects.equals(getIdRiga(), dtbOrds.getIdRiga()) && Objects.equals(getNumOrd(), dtbOrds.getNumOrd()) && Objects.equals(getCodAliq(), dtbOrds.getCodAliq()) && Objects.equals(getCodSpes(), dtbOrds.getCodSpes()) && Objects.equals(getDescrizione(), dtbOrds.getDescrizione()) && Objects.equals(getImporto(), dtbOrds.getImporto()) && Objects.equals(getNumFase(), dtbOrds.getNumFase()) && Objects.equals(getQta(), dtbOrds.getQta()) && Objects.equals(getUntMis(), dtbOrds.getUntMis()) && Objects.equals(getValUnt(), dtbOrds.getValUnt()) && Objects.equals(getImportoIva(), dtbOrds.getImportoIva()) && Objects.equals(getCodDivi(), dtbOrds.getCodDivi()) && Objects.equals(getCodAnag(), dtbOrds.getCodAnag()) && Objects.equals(getCodVdes(), dtbOrds.getCodVdes()) && Objects.equals(getCodProd(), dtbOrds.getCodProd()) && Objects.equals(getQtaProd(), dtbOrds.getQtaProd());
}
@Override
public int hashCode() {
return Objects.hash(getDataOrd(), getGestione(), getIdRiga(), getNumOrd(), getCodAliq(), getCodSpes(), getDescrizione(), getImporto(), getNumFase(), getQta(), getUntMis(), getValUnt(), getImportoIva(), getCodDivi(), getCodAnag(), getCodVdes(), getCodProd(), getQtaProd());
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -7,12 +7,11 @@ import it.integry.ems_model.annotation.SqlField;
import it.integry.ems_model.annotation.Table;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.base.EquatableEntityInterface;
import org.kie.api.definition.type.PropertyReactive;
import java.util.Objects;
import java.util.ArrayList;
import it.integry.ems_model.annotation.FK;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.kie.api.definition.type.PropertyReactive;
import java.util.Objects;
@Master
@PropertyReactive
@@ -47,14 +46,16 @@ public class MtbAartMarchio extends EntityBase implements EquatableEntityInterfa
public boolean equalsKey(MtbAartMarchio other) {
if (this == other)
return true;
if(hashCodeKey() != other.hashCodeKey())
return false;
return Objects.equals(getMarchio(), other.getMarchio());
}
@Override
public boolean equalsContent(MtbAartMarchio other) {
if (this == other)
return true;
return Objects.equals(getMarchio(), other.getMarchio());
public int hashCodeKey() {
return Objects.hashCode(getMarchio());
}
@Override

View File

@@ -12,11 +12,11 @@ import it.integry.ems_model.utility.UtilityString;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.kie.api.definition.type.PropertyReactive;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
import java.util.Objects;
import java.util.ArrayList;
@PropertyReactive
@Table(MtbColr.ENTITY)
@@ -581,29 +581,29 @@ public class MtbColr extends EntityBase implements EquatableEntityInterface<MtbC
public boolean equalsKey(MtbColr other) {
if (this == other)
return true;
if(hashCodeKey() != other.hashCodeKey())
return false;
return Objects.equals(getDataCollo(), other.getDataCollo()) && Objects.equals(getGestione(), other.getGestione()) && Objects.equals(getSerCollo(), other.getSerCollo()) && Objects.equals(getNumCollo(), other.getNumCollo()) && Objects.equals(getRiga(), other.getRiga());
}
@Override
public boolean equalsContent(MtbColr other) {
if (this == other)
return true;
return Objects.equals(getDataCollo(), other.getDataCollo()) && Objects.equals(getGestione(), other.getGestione()) && Objects.equals(getSerCollo(), other.getSerCollo()) && Objects.equals(getNumCollo(), other.getNumCollo()) && Objects.equals(getRiga(), other.getRiga()) && Objects.equals(getRigaOrd(), other.getRigaOrd()) && Objects.equals(getCodMart(), other.getCodMart()) && Objects.equals(getCodBarre(), other.getCodBarre()) && Objects.equals(getCodCol(), other.getCodCol()) && Objects.equals(getCodTagl(), other.getCodTagl()) && Objects.equals(getPartitaMag(), other.getPartitaMag()) && Objects.equals(getGestioneRif(), other.getGestioneRif()) && Objects.equals(getSerColloRif(), other.getSerColloRif()) && Objects.equals(getNote(), other.getNote()) && Objects.equals(getDataOrd(), other.getDataOrd()) && Objects.equals(getDataColloRif(), other.getDataColloRif()) && Objects.equals(getQtaCnf(), other.getQtaCnf()) && Objects.equals(getQtaCol(), other.getQtaCol()) && Objects.equals(getNumOrd(), other.getNumOrd()) && Objects.equals(getNumEtich(), other.getNumEtich()) && Objects.equals(getNumColloRif(), other.getNumColloRif()) && Objects.equals(getDatetimeRow(), other.getDatetimeRow()) && Objects.equals(getCodJcom(), other.getCodJcom()) && Objects.equals(getNumCnf(), other.getNumCnf()) && getCausale() == other.getCausale() && Objects.equals(getUtente(), other.getUtente()) && Objects.equals(getCodAnagDoc(), other.getCodAnagDoc()) && Objects.equals(getCodDtipDoc(), other.getCodDtipDoc()) && Objects.equals(getDataDoc(), other.getDataDoc()) && Objects.equals(getSerDoc(), other.getSerDoc()) && Objects.equals(getNumDoc(), other.getNumDoc()) && Objects.equals(getIdRigaDoc(), other.getIdRigaDoc()) && Objects.equals(getPesoNettoKg(), other.getPesoNettoKg()) && Objects.equals(getPesoLordoKg(), other.getPesoLordoKg()) && Objects.equals(getMtbColrInfoProd(), other.getMtbColrInfoProd()) && Objects.equals(getInsPartitaMag(), other.getInsPartitaMag()) && Objects.equals(getMtbPartitaMag_descrizione(), other.getMtbPartitaMag_descrizione()) && Objects.equals(getDataScadPartita(), other.getDataScadPartita()) && Objects.equals(getDescrizione(), other.getDescrizione()) && Objects.equals(getFlagQtaCnfFissa(), other.getFlagQtaCnfFissa());
public int hashCodeKey() {
return Objects.hash(getDataCollo(), getGestione(), getSerCollo(), getNumCollo(), getRiga());
}
@Override
public boolean equals(Object object) {
if (this == object)
return true;
if (!(object instanceof MtbColr))
return false;
MtbColr mtbColr = (MtbColr) object;
return Objects.equals(getDataCollo(), mtbColr.getDataCollo()) && Objects.equals(getGestione(), mtbColr.getGestione()) && Objects.equals(getSerCollo(), mtbColr.getSerCollo()) && Objects.equals(getNumCollo(), mtbColr.getNumCollo()) && Objects.equals(getRiga(), mtbColr.getRiga()) && Objects.equals(getRigaOrd(), mtbColr.getRigaOrd()) && Objects.equals(getCodMart(), mtbColr.getCodMart()) && Objects.equals(getCodBarre(), mtbColr.getCodBarre()) && Objects.equals(getCodCol(), mtbColr.getCodCol()) && Objects.equals(getCodTagl(), mtbColr.getCodTagl()) && Objects.equals(getPartitaMag(), mtbColr.getPartitaMag()) && Objects.equals(getGestioneRif(), mtbColr.getGestioneRif()) && Objects.equals(getSerColloRif(), mtbColr.getSerColloRif()) && Objects.equals(getNote(), mtbColr.getNote()) && Objects.equals(getDataOrd(), mtbColr.getDataOrd()) && Objects.equals(getDataColloRif(), mtbColr.getDataColloRif()) && Objects.equals(getQtaCnf(), mtbColr.getQtaCnf()) && Objects.equals(getQtaCol(), mtbColr.getQtaCol()) && Objects.equals(getNumOrd(), mtbColr.getNumOrd()) && Objects.equals(getNumEtich(), mtbColr.getNumEtich()) && Objects.equals(getNumColloRif(), mtbColr.getNumColloRif()) && Objects.equals(getDatetimeRow(), mtbColr.getDatetimeRow()) && Objects.equals(getCodJcom(), mtbColr.getCodJcom()) && Objects.equals(getNumCnf(), mtbColr.getNumCnf()) && getCausale() == mtbColr.getCausale() && Objects.equals(getUtente(), mtbColr.getUtente()) && Objects.equals(getCodAnagDoc(), mtbColr.getCodAnagDoc()) && Objects.equals(getCodDtipDoc(), mtbColr.getCodDtipDoc()) && Objects.equals(getDataDoc(), mtbColr.getDataDoc()) && Objects.equals(getSerDoc(), mtbColr.getSerDoc()) && Objects.equals(getNumDoc(), mtbColr.getNumDoc()) && Objects.equals(getIdRigaDoc(), mtbColr.getIdRigaDoc()) && Objects.equals(getPesoNettoKg(), mtbColr.getPesoNettoKg()) && Objects.equals(getPesoLordoKg(), mtbColr.getPesoLordoKg()) && Objects.equals(getMtbColrInfoProd(), mtbColr.getMtbColrInfoProd()) && Objects.equals(getInsPartitaMag(), mtbColr.getInsPartitaMag()) && Objects.equals(getMtbPartitaMag_descrizione(), mtbColr.getMtbPartitaMag_descrizione()) && Objects.equals(getDataScadPartita(), mtbColr.getDataScadPartita()) && Objects.equals(getDescrizione(), mtbColr.getDescrizione()) && Objects.equals(getFlagQtaCnfFissa(), mtbColr.getFlagQtaCnfFissa());
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof MtbColr)) return false;
MtbColr mtbColr = (MtbColr) o;
return Objects.equals(getDataCollo(), mtbColr.getDataCollo()) && Objects.equals(getGestione(), mtbColr.getGestione()) && Objects.equals(getSerCollo(), mtbColr.getSerCollo()) && Objects.equals(getNumCollo(), mtbColr.getNumCollo()) && Objects.equals(getRiga(), mtbColr.getRiga()) && Objects.equals(getRigaOrd(), mtbColr.getRigaOrd()) && Objects.equals(getCodMart(), mtbColr.getCodMart()) && Objects.equals(getCodBarre(), mtbColr.getCodBarre()) && Objects.equals(getCodCol(), mtbColr.getCodCol()) && Objects.equals(getCodTagl(), mtbColr.getCodTagl()) && Objects.equals(getPartitaMag(), mtbColr.getPartitaMag()) && Objects.equals(getGestioneRif(), mtbColr.getGestioneRif()) && Objects.equals(getSerColloRif(), mtbColr.getSerColloRif()) && Objects.equals(getNote(), mtbColr.getNote()) && Objects.equals(getDataOrd(), mtbColr.getDataOrd()) && Objects.equals(getDataColloRif(), mtbColr.getDataColloRif()) && Objects.equals(getQtaCnf(), mtbColr.getQtaCnf()) && Objects.equals(getQtaCol(), mtbColr.getQtaCol()) && Objects.equals(getNumOrd(), mtbColr.getNumOrd()) && Objects.equals(getNumEtich(), mtbColr.getNumEtich()) && Objects.equals(getNumColloRif(), mtbColr.getNumColloRif()) && Objects.equals(getDatetimeRow(), mtbColr.getDatetimeRow()) && Objects.equals(getCodJcom(), mtbColr.getCodJcom()) && Objects.equals(getNumCnf(), mtbColr.getNumCnf()) && getCausale() == mtbColr.getCausale() && Objects.equals(getUtente(), mtbColr.getUtente()) && Objects.equals(getCodAnagDoc(), mtbColr.getCodAnagDoc()) && Objects.equals(getCodDtipDoc(), mtbColr.getCodDtipDoc()) && Objects.equals(getDataDoc(), mtbColr.getDataDoc()) && Objects.equals(getSerDoc(), mtbColr.getSerDoc()) && Objects.equals(getNumDoc(), mtbColr.getNumDoc()) && Objects.equals(getIdRigaDoc(), mtbColr.getIdRigaDoc()) && Objects.equals(getPesoNettoKg(), mtbColr.getPesoNettoKg()) && Objects.equals(getPesoLordoKg(), mtbColr.getPesoLordoKg()) && Objects.equals(getInsPartitaMag(), mtbColr.getInsPartitaMag()) && Objects.equals(getMtbPartitaMag_descrizione(), mtbColr.getMtbPartitaMag_descrizione()) && Objects.equals(getDataScadPartita(), mtbColr.getDataScadPartita()) && Objects.equals(getDescrizione(), mtbColr.getDescrizione()) && Objects.equals(getFlagQtaCnfFissa(), mtbColr.getFlagQtaCnfFissa()) && Objects.equals(getArtAPeso(), mtbColr.getArtAPeso());
}
@Override
public int hashCode() {
return Objects.hash(getDataCollo(), getGestione(), getSerCollo(), getNumCollo(), getRiga(), getRigaOrd(), getCodMart(), getCodBarre(), getCodCol(), getCodTagl(), getPartitaMag(), getGestioneRif(), getSerColloRif(), getNote(), getDataOrd(), getDataColloRif(), getQtaCnf(), getQtaCol(), getNumOrd(), getNumEtich(), getNumColloRif(), getDatetimeRow(), getCodJcom(), getNumCnf(), getCausale(), getUtente(), getCodAnagDoc(), getCodDtipDoc(), getDataDoc(), getSerDoc(), getNumDoc(), getIdRigaDoc(), getPesoNettoKg(), getPesoLordoKg(), getMtbColrInfoProd(), getInsPartitaMag(), getMtbPartitaMag_descrizione(), getDataScadPartita(), getDescrizione(), getFlagQtaCnfFissa(), getArtAPeso());
return Objects.hash(getDataCollo(), getGestione(), getSerCollo(), getNumCollo(), getRiga(), getRigaOrd(), getCodMart(), getCodBarre(), getCodCol(), getCodTagl(), getPartitaMag(), getGestioneRif(), getSerColloRif(), getNote(), getDataOrd(), getDataColloRif(), getQtaCnf(), getQtaCol(), getNumOrd(), getNumEtich(), getNumColloRif(), getDatetimeRow(), getCodJcom(), getNumCnf(), getCausale(), getUtente(), getCodAnagDoc(), getCodDtipDoc(), getDataDoc(), getSerDoc(), getNumDoc(), getIdRigaDoc(), getPesoNettoKg(), getPesoLordoKg(), getInsPartitaMag(), getMtbPartitaMag_descrizione(), getDataScadPartita(), getDescrizione(), getFlagQtaCnfFissa(), getArtAPeso());
}
public enum Causale implements IBaseEnum<Causale> {

View File

@@ -708,32 +708,33 @@ public class MtbColt extends EntityBase implements EquatableEntityInterface<MtbC
return this;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (!(o instanceof MtbColt))
return false;
MtbColt mtbColt = (MtbColt) o;
return equalsContent(mtbColt);
}
@Override
public int hashCode() {
return Objects.hash(getGestione(), getDataCollo(), getSerCollo(), getNumCollo(), getRifOrd(), getCodAnag(), getCodVdes(), getCodMdep(), getCodVlis(), getCodDtip(), getCodTcol(), getSerDoc(), getFiltroOrdini(), getPreparatoDa(), getAnnotazioni(), getPosizione(), getCodDtipProvv(), getSerDocProvv(), getCodJfas(), getDataOrd(), getDataDoc(), getOraInizPrep(), getOraFinePrep(), getDataDocProvv(), getDataVers(), getSegno(), getNumOrd(), getNumDoc(), getNumDocProvv(), getPesoKg(), getLunghezzaCm(), getLarghezzaCm(), getAltezzaCm(), getPesoNettoKg(), getDataDistribuzione(), getFlagColloAnonimo(), getFlagStampato(), getActivityId(), getTrackNumber(), getDataIns(), getModificatoDa(), getDataUltMod(), getIdLotto(), getBarcodeUl(), getIdPesata());
}
@Override
public boolean equalsKey(MtbColt other) {
if (this == other)
return true;
if(hashCodeKey() != other.hashCodeKey())
return false;
return Objects.equals(getGestione(), other.getGestione()) && Objects.equals(getDataCollo(), other.getDataCollo()) && Objects.equals(getSerCollo(), other.getSerCollo()) && Objects.equals(getNumCollo(), other.getNumCollo());
}
@Override
public boolean equalsContent(MtbColt other) {
if (this == other)
return true;
return Objects.equals(getGestione(), other.getGestione()) && Objects.equals(getDataCollo(), other.getDataCollo()) && Objects.equals(getSerCollo(), other.getSerCollo()) && Objects.equals(getNumCollo(), other.getNumCollo()) && Objects.equals(getRifOrd(), other.getRifOrd()) && Objects.equals(getCodAnag(), other.getCodAnag()) && Objects.equals(getCodVdes(), other.getCodVdes()) && Objects.equals(getCodMdep(), other.getCodMdep()) && Objects.equals(getCodVlis(), other.getCodVlis()) && Objects.equals(getCodDtip(), other.getCodDtip()) && Objects.equals(getCodTcol(), other.getCodTcol()) && Objects.equals(getSerDoc(), other.getSerDoc()) && Objects.equals(getFiltroOrdini(), other.getFiltroOrdini()) && Objects.equals(getPreparatoDa(), other.getPreparatoDa()) && Objects.equals(getAnnotazioni(), other.getAnnotazioni()) && Objects.equals(getPosizione(), other.getPosizione()) && Objects.equals(getCodDtipProvv(), other.getCodDtipProvv()) && Objects.equals(getSerDocProvv(), other.getSerDocProvv()) && Objects.equals(getCodJfas(), other.getCodJfas()) && Objects.equals(getDataOrd(), other.getDataOrd()) && Objects.equals(getDataDoc(), other.getDataDoc()) && Objects.equals(getOraInizPrep(), other.getOraInizPrep()) && Objects.equals(getOraFinePrep(), other.getOraFinePrep()) && Objects.equals(getDataDocProvv(), other.getDataDocProvv()) && Objects.equals(getDataVers(), other.getDataVers()) && Objects.equals(getSegno(), other.getSegno()) && Objects.equals(getNumOrd(), other.getNumOrd()) && Objects.equals(getNumDoc(), other.getNumDoc()) && Objects.equals(getNumDocProvv(), other.getNumDocProvv()) && Objects.equals(getPesoKg(), other.getPesoKg()) && Objects.equals(getLunghezzaCm(), other.getLunghezzaCm()) && Objects.equals(getLarghezzaCm(), other.getLarghezzaCm()) && Objects.equals(getAltezzaCm(), other.getAltezzaCm()) && Objects.equals(getPesoNettoKg(), other.getPesoNettoKg()) && Objects.equals(getDataDistribuzione(), other.getDataDistribuzione()) && Objects.equals(getFlagColloAnonimo(), other.getFlagColloAnonimo()) && Objects.equals(getFlagStampato(), other.getFlagStampato()) && Objects.equals(getActivityId(), other.getActivityId()) && Objects.equals(getTrackNumber(), other.getTrackNumber()) && Objects.equals(getDataIns(), other.getDataIns()) && Objects.equals(getModificatoDa(), other.getModificatoDa()) && Objects.equals(getDataUltMod(), other.getDataUltMod()) && Objects.equals(getIdLotto(), other.getIdLotto()) && Objects.equals(getBarcodeUl(), other.getBarcodeUl()) && Objects.equals(getIdPesata(), other.getIdPesata());
public int hashCodeKey() {
return Objects.hash(getGestione(), getDataCollo(), getSerCollo(), getNumCollo());
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof MtbColt)) return false;
MtbColt mtbColt = (MtbColt) o;
return Objects.equals(getGestione(), mtbColt.getGestione()) && Objects.equals(getDataCollo(), mtbColt.getDataCollo()) && Objects.equals(getSerCollo(), mtbColt.getSerCollo()) && Objects.equals(getNumCollo(), mtbColt.getNumCollo()) && Objects.equals(getRifOrd(), mtbColt.getRifOrd()) && Objects.equals(getCodAnag(), mtbColt.getCodAnag()) && Objects.equals(getCodVdes(), mtbColt.getCodVdes()) && Objects.equals(getCodMdep(), mtbColt.getCodMdep()) && Objects.equals(getCodVlis(), mtbColt.getCodVlis()) && Objects.equals(getCodDtip(), mtbColt.getCodDtip()) && Objects.equals(getCodTcol(), mtbColt.getCodTcol()) && Objects.equals(getSerDoc(), mtbColt.getSerDoc()) && Objects.equals(getFiltroOrdini(), mtbColt.getFiltroOrdini()) && Objects.equals(getPreparatoDa(), mtbColt.getPreparatoDa()) && Objects.equals(getAnnotazioni(), mtbColt.getAnnotazioni()) && Objects.equals(getPosizione(), mtbColt.getPosizione()) && Objects.equals(getCodDtipProvv(), mtbColt.getCodDtipProvv()) && Objects.equals(getSerDocProvv(), mtbColt.getSerDocProvv()) && Objects.equals(getCodJfas(), mtbColt.getCodJfas()) && Objects.equals(getDataOrd(), mtbColt.getDataOrd()) && Objects.equals(getDataDoc(), mtbColt.getDataDoc()) && Objects.equals(getOraInizPrep(), mtbColt.getOraInizPrep()) && Objects.equals(getOraFinePrep(), mtbColt.getOraFinePrep()) && Objects.equals(getDataDocProvv(), mtbColt.getDataDocProvv()) && Objects.equals(getDataVers(), mtbColt.getDataVers()) && Objects.equals(getSegno(), mtbColt.getSegno()) && Objects.equals(getNumOrd(), mtbColt.getNumOrd()) && Objects.equals(getNumDoc(), mtbColt.getNumDoc()) && Objects.equals(getNumDocProvv(), mtbColt.getNumDocProvv()) && Objects.equals(getPesoKg(), mtbColt.getPesoKg()) && Objects.equals(getLunghezzaCm(), mtbColt.getLunghezzaCm()) && Objects.equals(getLarghezzaCm(), mtbColt.getLarghezzaCm()) && Objects.equals(getAltezzaCm(), mtbColt.getAltezzaCm()) && Objects.equals(getPesoNettoKg(), mtbColt.getPesoNettoKg()) && Objects.equals(getDataDistribuzione(), mtbColt.getDataDistribuzione()) && Objects.equals(getFlagColloAnonimo(), mtbColt.getFlagColloAnonimo()) && Objects.equals(getFlagStampato(), mtbColt.getFlagStampato()) && Objects.equals(getActivityId(), mtbColt.getActivityId()) && Objects.equals(getTrackNumber(), mtbColt.getTrackNumber()) && Objects.equals(getDataIns(), mtbColt.getDataIns()) && Objects.equals(getModificatoDa(), mtbColt.getModificatoDa()) && Objects.equals(getDataUltMod(), mtbColt.getDataUltMod()) && Objects.equals(getIdLotto(), mtbColt.getIdLotto()) && Objects.equals(getBarcodeUl(), mtbColt.getBarcodeUl()) && Objects.equals(getIdPesata(), mtbColt.getIdPesata()) && Objects.equals(getInsPartitaMag(), mtbColt.getInsPartitaMag()) && Objects.equals(getStpPrz(), mtbColt.getStpPrz()) && Objects.equals(getCalcPeso(), mtbColt.getCalcPeso());
}
@Override
public int hashCode() {
return Objects.hash(getGestione(), getDataCollo(), getSerCollo(), getNumCollo(), getRifOrd(), getCodAnag(), getCodVdes(), getCodMdep(), getCodVlis(), getCodDtip(), getCodTcol(), getSerDoc(), getFiltroOrdini(), getPreparatoDa(), getAnnotazioni(), getPosizione(), getCodDtipProvv(), getSerDocProvv(), getCodJfas(), getDataOrd(), getDataDoc(), getOraInizPrep(), getOraFinePrep(), getDataDocProvv(), getDataVers(), getSegno(), getNumOrd(), getNumDoc(), getNumDocProvv(), getPesoKg(), getLunghezzaCm(), getLarghezzaCm(), getAltezzaCm(), getPesoNettoKg(), getDataDistribuzione(), getFlagColloAnonimo(), getFlagStampato(), getActivityId(), getTrackNumber(), getDataIns(), getModificatoDa(), getDataUltMod(), getIdLotto(), getBarcodeUl(), getIdPesata(), getInsPartitaMag(), getStpPrz(), getCalcPeso());
}
}

View File

@@ -4,12 +4,13 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import it.integry.ems_model.annotation.*;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.base.EquatableEntityInterface;
import org.kie.api.definition.type.PropertyReactive;
import java.util.List;
import java.util.Objects;
import java.util.ArrayList;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.kie.api.definition.type.PropertyReactive;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@Master
@PropertyReactive
@@ -158,13 +159,29 @@ public class MtbGrup extends EntityBase implements EquatableEntityInterface<MtbG
public boolean equalsKey(MtbGrup other) {
if (this == other)
return true;
if(hashCodeKey() != other.hashCodeKey())
return false;
return Objects.equals(getCodMgrp(), other.getCodMgrp());
}
@Override
public boolean equalsContent(MtbGrup other) {
if (this == other)
return true;
return Objects.equals(getCodMgrp(), other.getCodMgrp()) && Objects.equals(getDescrizione(), other.getDescrizione()) && Objects.equals(getFlagValMag(), other.getFlagValMag()) && Objects.equals(getLogoWeb(), other.getLogoWeb()) && Objects.equals(getCriterioVal(), other.getCriterioVal()) && Objects.equals(getTipoMgrp(), other.getTipoMgrp());
public int hashCodeKey() {
return Objects.hash(getCodMgrp());
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof MtbGrup)) return false;
MtbGrup mtbGrup = (MtbGrup) o;
return Objects.equals(getCodMgrp(), mtbGrup.getCodMgrp()) && Objects.equals(getDescrizione(), mtbGrup.getDescrizione()) && Objects.equals(getFlagValMag(), mtbGrup.getFlagValMag()) && Objects.equals(getLogoWeb(), mtbGrup.getLogoWeb()) && Objects.equals(getCriterioVal(), mtbGrup.getCriterioVal()) && Objects.equals(getTipoMgrp(), mtbGrup.getTipoMgrp()) && Objects.equals(getFlagAttivo(), mtbGrup.getFlagAttivo()) && Objects.equals(getFlagTracciabilita(), mtbGrup.getFlagTracciabilita());
}
@Override
public int hashCode() {
return Objects.hash(getCodMgrp(), getDescrizione(), getFlagValMag(), getLogoWeb(), getCriterioVal(), getTipoMgrp(), getFlagAttivo(), getFlagTracciabilita());
}
}

View File

@@ -5,14 +5,15 @@ import it.integry.common.var.CommonConstants;
import it.integry.ems_model.annotation.*;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.base.EquatableEntityInterface;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.kie.api.definition.type.PropertyReactive;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.ArrayList;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@Master
@PropertyReactive
@@ -341,12 +342,26 @@ public class MtbPartitaMag extends EntityBase implements EquatableEntityInterfac
}
@Override
public boolean equals(Object object) {
if (this == object)
public boolean equalsKey(MtbPartitaMag other) {
if (this == other)
return true;
if (!(object instanceof MtbPartitaMag))
if(hashCodeKey() != other.hashCodeKey())
return false;
MtbPartitaMag that = (MtbPartitaMag) object;
return Objects.equals(getCodMart(), other.getCodMart()) && Objects.equals(getPartitaMag(), other.getPartitaMag());
}
@Override
public int hashCodeKey() {
return Objects.hash(getCodMart(), getPartitaMag());
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof MtbPartitaMag)) return false;
MtbPartitaMag that = (MtbPartitaMag) o;
return Objects.equals(getCodMart(), that.getCodMart()) && Objects.equals(getPartitaMag(), that.getPartitaMag()) && Objects.equals(getDescrizione(), that.getDescrizione()) && Objects.equals(getDataIns(), that.getDataIns()) && Objects.equals(getDataScad(), that.getDataScad()) && Objects.equals(getScelta(), that.getScelta()) && Objects.equals(getCostoUntUmMag(), that.getCostoUntUmMag()) && Objects.equals(getValUntUmMag(), that.getValUntUmMag()) && Objects.equals(getTaraCnfKg(), that.getTaraCnfKg()) && Objects.equals(getQtaCnf(), that.getQtaCnf()) && Objects.equals(getFlagImballoArendere(), that.getFlagImballoArendere()) && Objects.equals(getFlagStato(), that.getFlagStato()) && Objects.equals(getCodDiviCont(), that.getCodDiviCont()) && Objects.equals(getCambioDiviCont(), that.getCambioDiviCont()) && Objects.equals(getBarcode(), that.getBarcode()) && Objects.equals(getNote(), that.getNote()) && Objects.equals(getRapConv2(), that.getRapConv2()) && Objects.equals(getRapConv3(), that.getRapConv3()) && Objects.equals(getPosizione(), that.getPosizione()) && Objects.equals(getDataAggPrz(), that.getDataAggPrz()) && Objects.equals(getPartitaMagSec(), that.getPartitaMagSec()) && Objects.equals(getQtaAttesa(), that.getQtaAttesa()) && Objects.equals(getNazioneProv(), that.getNazioneProv());
}
@@ -354,18 +369,4 @@ public class MtbPartitaMag extends EntityBase implements EquatableEntityInterfac
public int hashCode() {
return Objects.hash(getCodMart(), getPartitaMag(), getDescrizione(), getDataIns(), getDataScad(), getScelta(), getCostoUntUmMag(), getValUntUmMag(), getTaraCnfKg(), getQtaCnf(), getFlagImballoArendere(), getFlagStato(), getCodDiviCont(), getCambioDiviCont(), getBarcode(), getNote(), getRapConv2(), getRapConv3(), getPosizione(), getDataAggPrz(), getPartitaMagSec(), getQtaAttesa(), getNazioneProv());
}
@Override
public boolean equalsKey(MtbPartitaMag other) {
if (this == other)
return true;
return Objects.equals(getCodMart(), other.getCodMart()) && Objects.equals(getPartitaMag(), other.getPartitaMag());
}
@Override
public boolean equalsContent(MtbPartitaMag other) {
if (this == other)
return true;
return Objects.equals(getCodMart(), other.getCodMart()) && Objects.equals(getPartitaMag(), other.getPartitaMag()) && Objects.equals(getDescrizione(), other.getDescrizione()) && Objects.equals(getDataIns(), other.getDataIns()) && Objects.equals(getDataScad(), other.getDataScad()) && Objects.equals(getScelta(), other.getScelta()) && Objects.equals(getCostoUntUmMag(), other.getCostoUntUmMag()) && Objects.equals(getValUntUmMag(), other.getValUntUmMag()) && Objects.equals(getTaraCnfKg(), other.getTaraCnfKg()) && Objects.equals(getQtaCnf(), other.getQtaCnf()) && Objects.equals(getFlagImballoArendere(), other.getFlagImballoArendere()) && Objects.equals(getFlagStato(), other.getFlagStato()) && Objects.equals(getCodDiviCont(), other.getCodDiviCont()) && Objects.equals(getCambioDiviCont(), other.getCambioDiviCont()) && Objects.equals(getBarcode(), other.getBarcode()) && Objects.equals(getNote(), other.getNote()) && Objects.equals(getRapConv2(), other.getRapConv2()) && Objects.equals(getRapConv3(), other.getRapConv3()) && Objects.equals(getPosizione(), other.getPosizione()) && Objects.equals(getDataAggPrz(), other.getDataAggPrz()) && Objects.equals(getPartitaMagSec(), other.getPartitaMagSec()) && Objects.equals(getQtaAttesa(), other.getQtaAttesa()) && Objects.equals(getNazioneProv(), other.getNazioneProv());
}
}

View File

@@ -6,12 +6,11 @@ import it.integry.ems_model.annotation.SqlField;
import it.integry.ems_model.annotation.Table;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.base.EquatableEntityInterface;
import org.kie.api.definition.type.PropertyReactive;
import java.util.Objects;
import java.util.ArrayList;
import it.integry.ems_model.annotation.FK;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.kie.api.definition.type.PropertyReactive;
import java.util.Objects;
@PropertyReactive
@Table(MtbSfam.ENTITY)
@@ -79,13 +78,28 @@ public class MtbSfam extends EntityBase implements EquatableEntityInterface<MtbS
public boolean equalsKey(MtbSfam other) {
if (this == other)
return true;
if(hashCodeKey() != other.hashCodeKey())
return false;
return Objects.equals(getCodMgrp(), other.getCodMgrp()) && Objects.equals(getCodMsgr(), other.getCodMsgr()) && Objects.equals(getCodMsfa(), other.getCodMsfa());
}
@Override
public boolean equalsContent(MtbSfam other) {
if (this == other)
return true;
return Objects.equals(getCodMgrp(), other.getCodMgrp()) && Objects.equals(getCodMsgr(), other.getCodMsgr()) && Objects.equals(getCodMsfa(), other.getCodMsfa()) && Objects.equals(getDescrizione(), other.getDescrizione());
public int hashCodeKey() {
return Objects.hash(getCodMgrp(), getCodMsgr(), getCodMsfa());
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof MtbSfam)) return false;
MtbSfam mtbSfam = (MtbSfam) o;
return Objects.equals(getCodMgrp(), mtbSfam.getCodMgrp()) && Objects.equals(getCodMsgr(), mtbSfam.getCodMsgr()) && Objects.equals(getCodMsfa(), mtbSfam.getCodMsfa()) && Objects.equals(getDescrizione(), mtbSfam.getDescrizione());
}
@Override
public int hashCode() {
return Objects.hash(getCodMgrp(), getCodMsgr(), getCodMsfa(), getDescrizione());
}
}

View File

@@ -4,12 +4,13 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import it.integry.ems_model.annotation.*;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.base.EquatableEntityInterface;
import org.kie.api.definition.type.PropertyReactive;
import java.util.List;
import java.util.Objects;
import java.util.ArrayList;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.kie.api.definition.type.PropertyReactive;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@PropertyReactive
@Table(MtbSgrp.ENTITY)
@@ -146,13 +147,28 @@ public class MtbSgrp extends EntityBase implements EquatableEntityInterface<MtbS
public boolean equalsKey(MtbSgrp other) {
if (this == other)
return true;
if(hashCodeKey() != other.hashCodeKey())
return false;
return Objects.equals(getCodMgrp(), other.getCodMgrp()) && Objects.equals(getCodMsgr(), other.getCodMsgr());
}
@Override
public boolean equalsContent(MtbSgrp other) {
if (this == other)
return true;
return Objects.equals(getCodMgrp(), other.getCodMgrp()) && Objects.equals(getCodMsgr(), other.getCodMsgr()) && Objects.equals(getDescrizione(), other.getDescrizione()) && Objects.equals(getInclInStat(), other.getInclInStat()) && Objects.equals(getContoRimFin(), other.getContoRimFin()) && Objects.equals(getOrdinamento(), other.getOrdinamento()) && Objects.equals(getChkGiacenzaNeg(), other.getChkGiacenzaNeg()) && Objects.equals(getFlagReso(), other.getFlagReso());
public int hashCodeKey() {
return Objects.hash(getCodMgrp(), getCodMsgr());
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof MtbSgrp)) return false;
MtbSgrp mtbSgrp = (MtbSgrp) o;
return Objects.equals(getCodMgrp(), mtbSgrp.getCodMgrp()) && Objects.equals(getCodMsgr(), mtbSgrp.getCodMsgr()) && Objects.equals(getDescrizione(), mtbSgrp.getDescrizione()) && Objects.equals(getInclInStat(), mtbSgrp.getInclInStat()) && Objects.equals(getContoRimFin(), mtbSgrp.getContoRimFin()) && Objects.equals(getOrdinamento(), mtbSgrp.getOrdinamento()) && Objects.equals(getChkGiacenzaNeg(), mtbSgrp.getChkGiacenzaNeg()) && Objects.equals(getFlagReso(), mtbSgrp.getFlagReso());
}
@Override
public int hashCode() {
return Objects.hash(getCodMgrp(), getCodMsgr(), getDescrizione(), getInclInStat(), getContoRimFin(), getOrdinamento(), getChkGiacenzaNeg(), getFlagReso());
}
}

View File

@@ -4,12 +4,13 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
import it.integry.ems_model.annotation.*;
import it.integry.ems_model.base.EntityBase;
import it.integry.ems_model.base.EquatableEntityInterface;
import org.kie.api.definition.type.PropertyReactive;
import java.util.List;
import java.util.Objects;
import java.util.ArrayList;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.kie.api.definition.type.PropertyReactive;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@Master
@PropertyReactive
@@ -95,13 +96,28 @@ public class MtbTipi extends EntityBase implements EquatableEntityInterface<MtbT
public boolean equalsKey(MtbTipi other) {
if (this == other)
return true;
if(hashCodeKey() != other.hashCodeKey())
return false;
return Objects.equals(getCodMtip(), other.getCodMtip());
}
@Override
public boolean equalsContent(MtbTipi other) {
if (this == other)
return true;
return Objects.equals(getCodMtip(), other.getCodMtip()) && Objects.equals(getDescrizione(), other.getDescrizione());
public int hashCodeKey() {
return Objects.hash(getCodMtip());
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof MtbTipi)) return false;
MtbTipi mtbTipi = (MtbTipi) o;
return Objects.equals(getCodMtip(), mtbTipi.getCodMtip()) && Objects.equals(getDescrizione(), mtbTipi.getDescrizione()) && Objects.equals(getFlagAttivo(), mtbTipi.getFlagAttivo());
}
@Override
public int hashCode() {
return Objects.hash(getCodMtip(), getDescrizione(), getFlagAttivo());
}
}

View File

@@ -8,8 +8,6 @@ import it.integry.ems_model.base.EquatableEntityInterface;
import it.integry.ems_model.exception.EntityException;
import it.integry.ems_model.rulescompleting.DroolsDataCompleting;
import it.integry.ems_model.types.OperationType;
import it.integry.ems_model.utility.UtilityBigDecimal;
import it.integry.ems_model.utility.UtilityString;
import java.io.IOException;
import java.math.BigDecimal;
@@ -17,6 +15,7 @@ import java.sql.Connection;
import java.time.LocalDate;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
public class ExchangeCampiRaccoltaDTO implements EquatableEntityInterface<ExchangeCampiRaccoltaDTO> {
private OperationType operation;
@@ -300,41 +299,34 @@ public class ExchangeCampiRaccoltaDTO implements EquatableEntityInterface<Exchan
@Override
public boolean equalsKey(ExchangeCampiRaccoltaDTO other) {
if (this == other)
return true;
return codAnag.equalsIgnoreCase(other.getCodAnag()) &&
(UtilityString.isNull(codVdes,"").equalsIgnoreCase(UtilityString.isNull(other.getCodVdes(),""))) &&
codMartMp.equalsIgnoreCase(other.getCodMartMp()) &&
lottoFornitore.equalsIgnoreCase(other.getLottoFornitore());
if (hashCodeKey() != other.hashCodeKey())
return false;
return Objects.equals(getCodAnag(), other.getCodAnag()) &&
Objects.equals(getCodVdes(), other.getCodVdes()) &&
Objects.equals(getCodMartMp(), other.getCodMartMp()) &&
Objects.equals(getLottoFornitore(), other.getLottoFornitore());
}
@Override
public boolean equalsContent(ExchangeCampiRaccoltaDTO other) {
return
codAnag.equalsIgnoreCase(other.getCodAnag()) &&
(UtilityString.isNull(ragSoc,"").equalsIgnoreCase(UtilityString.isNull(other.getRagSoc(),""))) &&
(UtilityString.isNull(codVdes,"").equalsIgnoreCase(UtilityString.isNull(other.getCodVdes(),""))) &&
UtilityString.isNull(produttore,"").equalsIgnoreCase(UtilityString.isNull(other.getProduttore(),"")) &&
UtilityString.isNull(cooperativa,"").equalsIgnoreCase(UtilityString.isNull(other.getCooperativa(),"")) &&
UtilityString.isNull(indirizzoCoop,"").equalsIgnoreCase(UtilityString.isNull(other.getIndirizzoCoop(),"")) &&
UtilityString.isNull(cittaCoop,"").equalsIgnoreCase(UtilityString.isNull(other.getCittaCoop(),"")) &&
UtilityString.isNull(capCoop,"").equalsIgnoreCase(UtilityString.isNull(other.getCapCoop(),"")) &&
UtilityString.isNull(provCoop,"").equalsIgnoreCase(UtilityString.isNull(other.getProvCoop(),"")) &&
UtilityString.isNull(partIvaCoop,"").equalsIgnoreCase(UtilityString.isNull(other.getPartIvaCoop(),"")) &&
UtilityString.isNull(op,"").equalsIgnoreCase(UtilityString.isNull(other.getOp(),"")) &&
UtilityString.isNull(codAnagProd,"").equalsIgnoreCase(UtilityString.isNull(other.getCodAnagProd(),"")) &&
UtilityString.isNull(ragSocProd,"").equalsIgnoreCase(UtilityString.isNull(other.getRagSocProd(),"")) &&
UtilityString.isNull(indirizzoProd,"").equalsIgnoreCase(UtilityString.isNull(other.getIndirizzoProd(),"")) &&
UtilityString.isNull(cittaProd,"").equalsIgnoreCase(UtilityString.isNull(other.getCittaProd(),"")) &&
UtilityString.isNull(capProd,"").equalsIgnoreCase(UtilityString.isNull(other.getCapProd(),"")) &&
UtilityString.isNull(provProd,"").equalsIgnoreCase(UtilityString.isNull(other.getProvProd(),"")) &&
UtilityString.isNull(partIvaProd,"").equalsIgnoreCase(UtilityString.isNull(other.getPartIvaProd(),"")) &&
UtilityString.isNull(codMartMp,"").equalsIgnoreCase(UtilityString.isNull(other.getCodMartMp(),"")) &&
UtilityString.isNull(codMartMg,"").equalsIgnoreCase(UtilityString.isNull(other.getCodMartMg(),"")) &&
UtilityString.isNull(varieta,"").equalsIgnoreCase(UtilityString.isNull(other.getVarieta(),"")) &&
UtilityString.isNull(lottoFornitore,"").equalsIgnoreCase(UtilityString.isNull(other.getLottoFornitore(),"")) &&
UtilityBigDecimal.isNull(valUnt,BigDecimal.ZERO).equals(UtilityBigDecimal.isNull(other.getValUnt(),BigDecimal.ZERO)) &&
UtilityBigDecimal.isNull(qtaAttesa,BigDecimal.ZERO).equals(UtilityBigDecimal.isNull(other.getQtaAttesa(),BigDecimal.ZERO))
;
public int hashCodeKey() {
return Objects.hash(getCodAnag(), getCodVdes(), getCodMartMp(), getLottoFornitore());
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof ExchangeCampiRaccoltaDTO)) return false;
ExchangeCampiRaccoltaDTO that = (ExchangeCampiRaccoltaDTO) o;
return isNewDest() == that.isNewDest() && isNewPartita() == that.isNewPartita() && getOperation() == that.getOperation() && Objects.equals(getPartitaMag(), that.getPartitaMag()) && Objects.equals(getCodAnag(), that.getCodAnag()) && Objects.equals(getRagSoc(), that.getRagSoc()) && Objects.equals(getCodVdes(), that.getCodVdes()) && Objects.equals(getProduttore(), that.getProduttore()) && Objects.equals(getCooperativa(), that.getCooperativa()) && Objects.equals(getIndirizzoCoop(), that.getIndirizzoCoop()) && Objects.equals(getCittaCoop(), that.getCittaCoop()) && Objects.equals(getCapCoop(), that.getCapCoop()) && Objects.equals(getProvCoop(), that.getProvCoop()) && Objects.equals(getPartIvaCoop(), that.getPartIvaCoop()) && Objects.equals(getOp(), that.getOp()) && Objects.equals(getCodAnagProd(), that.getCodAnagProd()) && Objects.equals(getRagSocProd(), that.getRagSocProd()) && Objects.equals(getIndirizzoProd(), that.getIndirizzoProd()) && Objects.equals(getCittaProd(), that.getCittaProd()) && Objects.equals(getCapProd(), that.getCapProd()) && Objects.equals(getProvProd(), that.getProvProd()) && Objects.equals(getPartIvaProd(), that.getPartIvaProd()) && Objects.equals(getCodMartMp(), that.getCodMartMp()) && Objects.equals(getCodMartMg(), that.getCodMartMg()) && Objects.equals(getVarieta(), that.getVarieta()) && Objects.equals(getLottoFornitore(), that.getLottoFornitore()) && Objects.equals(getValUnt(), that.getValUnt()) && Objects.equals(getUntMis(), that.getUntMis()) && Objects.equals(getQtaAttesa(), that.getQtaAttesa()) && Objects.equals(getDataInizProd(), that.getDataInizProd()) && Objects.equals(getNote(), that.getNote());
}
@Override
public int hashCode() {
return Objects.hash(getOperation(), getPartitaMag(), getCodAnag(), getRagSoc(), getCodVdes(), getProduttore(), getCooperativa(), getIndirizzoCoop(), getCittaCoop(), getCapCoop(), getProvCoop(), getPartIvaCoop(), getOp(), getCodAnagProd(), getRagSocProd(), getIndirizzoProd(), getCittaProd(), getCapProd(), getProvProd(), getPartIvaProd(), getCodMartMp(), getCodMartMg(), getVarieta(), getLottoFornitore(), getValUnt(), getUntMis(), getQtaAttesa(), getDataInizProd(), isNewDest(), isNewPartita(), getNote());
}
@Override

View File

@@ -97,7 +97,7 @@ public class ExchangeColliImportService {
List<MtbColt> exchangeUpdatedMtbColts = importColliLavorazione(
exchangeMultiDb.getPrimaryConnection(),
UtilityLocalDate.getNow().minusWeeks(1),
UtilityLocalDate.getNow().minusWeeks(3),
UtilityLocalDate.getNow(),
false, useTempTable, testataTableName, righeTableName);
@@ -192,8 +192,13 @@ public class ExchangeColliImportService {
mtbColtLav
.parallelStream()
.forEach(x -> {
int hashCurrent = Objects.hash(x.getGestione(), x.getNumCollo(), x.getDataCollo(), x.getSerCollo());
x.getMtbColr().addAll(testGroupBy.get(hashCurrent));
x.setMtbColr(mtbColrLav.parallelStream()
.filter(y -> Objects.hash(x.getGestione(), x.getNumCollo(), x.getDataCollo(), x.getSerCollo()) ==
Objects.hash(y.getGestione(), y.getNumCollo(), y.getDataCollo(), y.getSerCollo()) &&
(Objects.equals(x.getGestione(), y.getGestione()) && Objects.equals(x.getDataCollo(), y.getDataCollo()) &&
Objects.equals(x.getNumCollo(), y.getNumCollo()) && Objects.equals(x.getSerCollo(), y.getSerCollo())))
.collect(Collectors.toList()));
});
return mtbColtLav;

View File

@@ -8,6 +8,7 @@ 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.types.OperationType;
import it.integry.ems_model.utility.Query;
import it.integry.ems_model.utility.UtilityDB;
import it.integry.ems_model.utility.UtilityLocalDate;
import org.apache.logging.log4j.LogManager;
@@ -52,13 +53,13 @@ public class ExchangeDocumentImportService {
final List<DtbDoct> exchangeImportedTestateData = importTestateDocumentiLavorazione(
exchangeMultiDb.getPrimaryConnection(),
UtilityLocalDate.getNow().minusWeeks(1),
UtilityLocalDate.getNow().minusMonths(1),
UtilityLocalDate.getNow(),
true, false);
final List<DtbDoct> exchangeUpdatedTestateData = importTestateDocumentiLavorazione(
exchangeMultiDb.getPrimaryConnection(),
UtilityLocalDate.getNow().minusWeeks(1),
UtilityLocalDate.getNow().minusMonths(1),
UtilityLocalDate.getNow(),
false, useTempTable);
@@ -81,29 +82,36 @@ public class ExchangeDocumentImportService {
List<EquatableEntityInterface> allRigheData = exchangeImportDataManagerService
.runSync(DtbDocr.class, exchangeImportedRigheData, exchangeUpdatedRigheData);
allTestateData.forEach(x -> ((DtbDoct) x).setUpdProgMaga(false));
allTestateData.parallelStream().forEach(x -> ((DtbDoct) x).setUpdProgMaga(false));
allTestateData.stream()
allTestateData.parallelStream()
.map(x -> (DtbDoct) x)
.forEach(x ->
x.setDtbDocr(allRigheData.stream()
.map(y -> (DtbDocr) y)
.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()))
.filter(y ->
Objects.hash(x.getDataDoc(), x.getNumDoc(), x.getSerDoc(), x.getCodAnag(), x.getCodDtip()) ==
Objects.hash(y.getDataDoc(), y.getNumDoc(), y.getSerDoc(), y.getCodAnag(), y.getCodDtip()) &&
(Objects.equals(x.getCodAnag(), y.getCodAnag()) &&
Objects.equals(x.getCodDtip(), y.getCodDtip()) &&
Objects.equals(x.getDataDoc(), y.getDataDoc()) &&
Objects.equals(x.getNumDoc(), y.getNumDoc()) &&
Objects.equals(x.getSerDoc(), y.getSerDoc())))
.collect(Collectors.toList())));
allRigheData.stream()
.map(x -> (DtbDocr) x)
.filter(x -> allTestateData.stream()
.map(y -> (DtbDoct) y)
.noneMatch(y -> x.getCodDtip().equalsIgnoreCase(y.getCodDtip()) &&
x.getDataDoc().equals(y.getDataDoc()) &&
Objects.equals(x.getNumDoc(), y.getNumDoc()) &&
x.getCodAnag().equalsIgnoreCase(y.getCodAnag()) &&
x.getSerDoc().equalsIgnoreCase(y.getSerDoc())))
.noneMatch(y -> Objects.hash(x.getDataDoc(), x.getNumDoc(), x.getSerDoc(), x.getCodAnag(), x.getCodDtip()) ==
Objects.hash(y.getDataDoc(), y.getNumDoc(), y.getSerDoc(), y.getCodAnag(), y.getCodDtip()) &&
(Objects.equals(x.getCodAnag(), y.getCodAnag()) &&
Objects.equals(x.getCodDtip(), y.getCodDtip()) &&
Objects.equals(x.getDataDoc(), y.getDataDoc()) &&
Objects.equals(x.getNumDoc(), y.getNumDoc()) &&
Objects.equals(x.getSerDoc(), y.getSerDoc()))))
.forEach(x -> {
DtbDoct testata = new DtbDoct()
.setSerDoc(x.getSerDoc())
@@ -137,7 +145,7 @@ public class ExchangeDocumentImportService {
entityProcessor.processEntity(cloneDocument, true, true, ROSSOGARGANO_EXCHANGE_USER, internalMultiDb, requestDataDTO);
singleUpdateImported(exchangeMultiDb.getPrimaryConnection(), (DtbDoct) dataToSave, useTempTable);
if(!document.getDtbDocr().isEmpty()) {
if (!document.getDtbDocr().isEmpty()) {
document.setOperation(OperationType.NO_OP);
entityProcessor.processEntity(document, true, true, ROSSOGARGANO_EXCHANGE_USER, internalMultiDb, requestDataDTO);
singleUpdateImported(exchangeMultiDb.getPrimaryConnection(), document.getDtbDocr(), useTempTable);
@@ -185,7 +193,7 @@ public class ExchangeDocumentImportService {
}
final List<DtbDoct> dtbDoctLav = exchangeImportDataManagerService.retrieveDataFromExchange(connection, DtbDoct.class,
dtbDoctLavTableName, null, retrieveAlreadyImported);
dtbDoctLavTableName, Query.format("data_doc BETWEEN {} AND {}", minDate, maxDate), retrieveAlreadyImported);
dtbDoctLav
@@ -214,7 +222,7 @@ public class ExchangeDocumentImportService {
return exchangeImportDataManagerService.retrieveDataFromExchange(connection, DtbDocr.class,
dtbDocrLavTableName, null, retrieveAlreadyImported);
dtbDocrLavTableName, Query.format("data_doc BETWEEN {} AND {}", minDate, maxDate), retrieveAlreadyImported);
}

View File

@@ -67,7 +67,7 @@ public class ExchangeImportDataManagerService {
private List<EquatableEntityInterface> calcItemsToAdd(Class<? extends EquatableEntityInterface> clazz,
List<? extends EquatableEntityInterface> alreadyImportedData,
List<? extends EquatableEntityInterface> updatedData) throws IllegalAccessException {
final List<EquatableEntityInterface> itemsToAdd = updatedData.stream()
final List<EquatableEntityInterface> itemsToAdd = updatedData.parallelStream()
.filter(x -> alreadyImportedData.stream().noneMatch(y -> y.equalsKey(x)))
.peek(x -> x.setOperation(OperationType.INSERT))
.collect(Collectors.toList());
@@ -98,7 +98,7 @@ public class ExchangeImportDataManagerService {
private List<EquatableEntityInterface> calcItemsToDelete(Class<? extends EquatableEntityInterface> clazz,
List<? extends EquatableEntityInterface> importedMtbColts,
List<? extends EquatableEntityInterface> updatedMtbColts) throws IllegalAccessException {
final List<EquatableEntityInterface> itemsToDelete = importedMtbColts.stream()
final List<EquatableEntityInterface> itemsToDelete = importedMtbColts.parallelStream()
.filter(x -> updatedMtbColts.stream().noneMatch(y -> y.equalsKey(x)))
.peek(x -> x.setOperation(OperationType.DELETE))
.collect(Collectors.toList());
@@ -128,7 +128,7 @@ public class ExchangeImportDataManagerService {
private List<EquatableEntityInterface> calcItemsToUpdate(Class<? extends EquatableEntityInterface> clazz,
List<? extends EquatableEntityInterface> importedMtbColts,
List<? extends EquatableEntityInterface> updatedMtbColts) throws IllegalAccessException {
List<EquatableEntityInterface> itemsToUpdate = updatedMtbColts.stream()
List<EquatableEntityInterface> itemsToUpdate = updatedMtbColts.parallelStream()
.filter(x -> importedMtbColts.stream().anyMatch(y -> y.equalsKey(x)))
.collect(Collectors.toList());
@@ -164,7 +164,7 @@ public class ExchangeImportDataManagerService {
itemToUpdate.setOperation(OperationType.UPDATE);
}
return itemsToUpdate.stream()
return itemsToUpdate.parallelStream()
.filter(x -> {
boolean anyChildToUpdate = false;
@@ -186,7 +186,7 @@ public class ExchangeImportDataManagerService {
}
return anyChildToUpdate || importedMtbColts.stream().anyMatch(y -> y.equalsKey(x) && !y.equalsContent(x));
return anyChildToUpdate || importedMtbColts.stream().anyMatch(y -> y.equalsKey(x) && !y.equals(x));
})
.collect(Collectors.toList());
}

View File

@@ -23,10 +23,7 @@ import org.springframework.stereotype.Service;
import java.sql.Connection;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
@@ -158,10 +155,10 @@ public class ExchangeOrdiniImportService {
}
List<DtbOrdt> dtbOrdtLav = exchangeImportDataManagerService.retrieveDataFromExchange(connection, DtbOrdt.class,
dtbOrdtTableName, null, retrieveAlreadyImported);
dtbOrdtTableName, Query.format("data_ord BETWEEN {} AND {}", minDate, maxDate), retrieveAlreadyImported);
List<DtbOrdr> dtbOrdrLav = exchangeImportDataManagerService.retrieveDataFromExchange(connection, DtbOrdr.class,
dtbOrdrTableName, null, retrieveAlreadyImported);
dtbOrdrTableName, Query.format("data_ord BETWEEN {} AND {}", minDate, maxDate), retrieveAlreadyImported);
dtbOrdtLav = dtbOrdtLav.stream()
// .filter(x -> x.getGestione().equalsIgnoreCase("A"))
@@ -183,9 +180,11 @@ public class ExchangeOrdiniImportService {
x.setGeneraOrdLavDaProd(false);
x.setDtbOrdr(finalDtbOrdrLav.stream()
.filter(y -> y.getDataOrd().equals(x.getDataOrd()) &&
y.getGestione().equalsIgnoreCase(x.getGestione()) &&
y.getNumOrd().equals(x.getNumOrd()))
.filter(y ->
Objects.hash(x.getDataOrd(), x.getGestione(), x.getNumOrd()) ==
Objects.hash(y.getDataOrd(), y.getGestione(), y.getNumOrd()) &&
(Objects.equals(x.getDataOrd(), y.getDataOrd()) && Objects.equals(x.getNumOrd(), y.getNumOrd()) &&
Objects.equals(x.getGestione(), y.getGestione())))
.collect(Collectors.toList()));
});