Skip to content

Commit

Permalink
Issue #445
Browse files Browse the repository at this point in the history
Allineato schema govpay.xsd aggiungendo il campo CodDominio all'Id di un Flusso Rendicontazione.
Aggiunto indice idx_evt_fk_fr alla tabella eventi.
  • Loading branch information
pintorig committed Jan 25, 2022
1 parent 2c45ad4 commit 283f7b9
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 24 deletions.
8 changes: 6 additions & 2 deletions jars/orm/src/main/java/it/govpay/bd/pagamento/FrBD.java
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ public void updateObsoleto(long idFr, Boolean obsoleto) throws ServiceException
}
}

public void updateObsoleto(String codFlusso, Boolean obsoleto) throws ServiceException {
public void updateObsoleto(String codDominio, String codFlusso, Boolean obsoleto) throws ServiceException {
try {
if(this.isAtomica()) {
this.setupConnection(this.getIdTransaction());
Expand All @@ -525,7 +525,9 @@ public void updateObsoleto(String codFlusso, Boolean obsoleto) throws ServiceExc
CustomField cfId = new CustomField("id", Long.class, "id", fieldConverter.toTable(FR.model()));
IExpression expr = this.getFrService().newExpression();
expr.equals(FR.model().COD_FLUSSO, codFlusso);
expr.equals(FR.model().COD_DOMINIO, codDominio);
IPaginatedExpression pagExpr = this.getFrService().toPaginatedExpression(expr );
pagExpr.addOrder(FR.model().COD_DOMINIO, SortOrder.ASC);
pagExpr.addOrder(FR.model().COD_FLUSSO, SortOrder.ASC);
List<Object> select = this.getFrService().select(pagExpr , cfId);

Expand All @@ -551,7 +553,7 @@ public void updateObsoleto(String codFlusso, Boolean obsoleto) throws ServiceExc
}
}

public List<Long> getIdsFlusso(String codFlusso) throws ServiceException {
public List<Long> getIdsFlusso(String codDominio, String codFlusso) throws ServiceException {
List<Long> ids = new ArrayList<Long>();
try {
if(this.isAtomica()) {
Expand All @@ -562,7 +564,9 @@ public List<Long> getIdsFlusso(String codFlusso) throws ServiceException {
CustomField cfId = new CustomField("id", Long.class, "id", fieldConverter.toTable(FR.model()));
IExpression expr = this.getFrService().newExpression();
expr.equals(FR.model().COD_FLUSSO, codFlusso);
expr.equals(FR.model().COD_DOMINIO, codDominio);
IPaginatedExpression pagExpr = this.getFrService().toPaginatedExpression(expr );
pagExpr.addOrder(FR.model().COD_DOMINIO, SortOrder.ASC);
pagExpr.addOrder(FR.model().COD_FLUSSO, SortOrder.ASC);
List<Object> select = this.getFrService().select(pagExpr , cfId);

Expand Down
4 changes: 2 additions & 2 deletions jars/orm/src/main/java/it/govpay/orm/IdFr.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* &lt;complexType name="id-fr">
* &lt;sequence>
* &lt;element name="codFlusso" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="1" maxOccurs="1"/>
* &lt;element name="codDominio" type="{http://www.govpay.it/orm}string" minOccurs="0" maxOccurs="1"/>
* &lt;element name="codDominio" type="{http://www.govpay.it/orm}string" minOccurs="1" maxOccurs="1"/>
* &lt;element name="dataOraFlusso" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="1" maxOccurs="1"/>
* &lt;element name="codPsp" type="{http://www.govpay.it/orm}string" minOccurs="0" maxOccurs="1"/>
* &lt;element name="stato" type="{http://www.govpay.it/orm}string" minOccurs="0" maxOccurs="1"/>
Expand Down Expand Up @@ -234,7 +234,7 @@ public void setObsoleto(Boolean obsoleto) {
protected java.lang.String codFlusso;

@javax.xml.bind.annotation.XmlSchemaType(name="string")
@XmlElement(name="codDominio",required=false,nillable=false)
@XmlElement(name="codDominio",required=true,nillable=false)
protected java.lang.String codDominio;

@javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(org.openspcoop2.utils.jaxb.DateTime2String.class)
Expand Down
4 changes: 2 additions & 2 deletions jars/orm/src/main/java/it/govpay/orm/binding.xml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
<mapping name="idFR" class="it.govpay.orm.IdFr" abstract="false">
<namespace uri="http://www.govpay.it/orm" default="elements"/>
<value name="codFlusso" field="codFlusso" usage="required"/>
<value name="codDominio" field="codDominio" usage="optional"/>
<value name="codDominio" field="codDominio" usage="required"/>
<value name="dataOraFlusso" field="dataOraFlusso" usage="required"/>
<value name="codPsp" field="codPsp" usage="optional"/>
<value name="stato" field="stato" usage="optional"/>
Expand All @@ -361,7 +361,7 @@
<mapping type-name="_IdFr_Type" class="it.govpay.orm.IdFr" abstract="true">
<namespace uri="http://www.govpay.it/orm" default="elements"/>
<value name="codFlusso" field="codFlusso" usage="required"/>
<value name="codDominio" field="codDominio" usage="optional"/>
<value name="codDominio" field="codDominio" usage="required"/>
<value name="dataOraFlusso" field="dataOraFlusso" usage="required"/>
<value name="codPsp" field="codPsp" usage="optional"/>
<value name="stato" field="stato" usage="optional"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public FRFetch getFRFetch() {
}
@Override
public IJDBCFetch getFetch() {
return this.getFRFetch();
return getFRFetch();
}


Expand All @@ -106,6 +106,7 @@ public IdFr convertToId(JDBCServiceManagerProperties jdbcProperties, Logger log,
IdFr idFR = new IdFr();
idFR.setCodFlusso(fr.getCodFlusso());
idFR.setDataOraFlusso(fr.getDataOraFlusso());
idFR.setCodDominio(fr.getCodDominio());

return idFR;
}
Expand Down Expand Up @@ -138,6 +139,7 @@ public List<IdFr> findAllIds(JDBCServiceManagerProperties jdbcProperties, Logger
try{
List<IField> fields = new ArrayList<>();

fields.add(FR.model().COD_DOMINIO);
fields.add(FR.model().COD_FLUSSO);
fields.add(FR.model().DATA_ORA_FLUSSO);

Expand Down Expand Up @@ -316,7 +318,7 @@ public NonNegativeNumber count(JDBCServiceManagerProperties jdbcProperties, Logg

sqlQueryObject.addSelectCountField(this.getFRFieldConverter().toTable(FR.model())+".id","tot",true);

this._join(expression,sqlQueryObject);
_join(expression,sqlQueryObject);

return org.openspcoop2.generic_project.dao.jdbc.utils.JDBCUtilities.count(jdbcProperties, log, connection, sqlQueryObject, expression,
this.getFRFieldConverter(), FR.model(),listaQuery);
Expand Down Expand Up @@ -363,7 +365,7 @@ public List<Map<String,Object>> select(JDBCServiceManagerProperties jdbcProperti
org.openspcoop2.generic_project.dao.jdbc.utils.JDBCUtilities.prepareSqlQueryObjectForSelectDistinct(distinct,sqlQueryObject, paginatedExpression, log,
this.getFRFieldConverter(), field);

return this._select(jdbcProperties, log, connection, sqlQueryObject, paginatedExpression, sqlQueryObjectDistinct);
return _select(jdbcProperties, log, connection, sqlQueryObject, paginatedExpression, sqlQueryObjectDistinct);

}finally{
org.openspcoop2.generic_project.dao.jdbc.utils.JDBCUtilities.removeFields(sqlQueryObject,paginatedExpression,field);
Expand All @@ -384,7 +386,7 @@ public Map<String,Object> aggregate(JDBCServiceManagerProperties jdbcProperties,

org.openspcoop2.generic_project.dao.jdbc.utils.JDBCUtilities.setFields(sqlQueryObject,expression,functionField);
try{
List<Map<String,Object>> list = this._select(jdbcProperties, log, connection, sqlQueryObject, expression);
List<Map<String,Object>> list = _select(jdbcProperties, log, connection, sqlQueryObject, expression);
return list.get(0);
}finally{
org.openspcoop2.generic_project.dao.jdbc.utils.JDBCUtilities.removeFields(sqlQueryObject,expression,functionField);
Expand All @@ -401,7 +403,7 @@ public List<Map<String,Object>> groupBy(JDBCServiceManagerProperties jdbcPropert

org.openspcoop2.generic_project.dao.jdbc.utils.JDBCUtilities.setFields(sqlQueryObject,expression,functionField);
try{
return this._select(jdbcProperties, log, connection, sqlQueryObject, expression);
return _select(jdbcProperties, log, connection, sqlQueryObject, expression);
}finally{
org.openspcoop2.generic_project.dao.jdbc.utils.JDBCUtilities.removeFields(sqlQueryObject,expression,functionField);
}
Expand All @@ -418,15 +420,15 @@ public List<Map<String,Object>> groupBy(JDBCServiceManagerProperties jdbcPropert

org.openspcoop2.generic_project.dao.jdbc.utils.JDBCUtilities.setFields(sqlQueryObject,paginatedExpression,functionField);
try{
return this._select(jdbcProperties, log, connection, sqlQueryObject, paginatedExpression);
return _select(jdbcProperties, log, connection, sqlQueryObject, paginatedExpression);
}finally{
org.openspcoop2.generic_project.dao.jdbc.utils.JDBCUtilities.removeFields(sqlQueryObject,paginatedExpression,functionField);
}
}

protected List<Map<String,Object>> _select(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject,
IExpression expression) throws ServiceException,NotFoundException,NotImplementedException,Exception {
return this._select(jdbcProperties, log, connection, sqlQueryObject, expression, null);
return _select(jdbcProperties, log, connection, sqlQueryObject, expression, null);
}
protected List<Map<String,Object>> _select(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject,
IExpression expression, ISQLQueryObject sqlQueryObjectDistinct) throws ServiceException,NotFoundException,NotImplementedException,Exception {
Expand All @@ -437,7 +439,7 @@ protected List<Map<String,Object>> _select(JDBCServiceManagerProperties jdbcProp
expression, this.getFRFieldConverter(), FR.model(),
listaQuery,listaParams);

this._join(expression,sqlQueryObject);
_join(expression,sqlQueryObject);

List<Map<String,Object>> list = org.openspcoop2.generic_project.dao.jdbc.utils.JDBCUtilities.select(jdbcProperties, log, connection,
org.openspcoop2.generic_project.dao.jdbc.utils.JDBCUtilities.prepareSqlQueryObjectForSelectDistinct(sqlQueryObject,sqlQueryObjectDistinct),
Expand Down Expand Up @@ -465,7 +467,7 @@ public List<Map<String,Object>> union(JDBCServiceManagerProperties jdbcPropertie
for (int i = 0; i < unionExpression.length; i++) {
UnionExpression ue = unionExpression[i];
IExpression expression = ue.getExpression();
this._join(expression,sqlQueryObjectInnerList.get(i));
_join(expression,sqlQueryObjectInnerList.get(i));
}
}

Expand Down Expand Up @@ -494,7 +496,7 @@ public NonNegativeNumber unionCount(JDBCServiceManagerProperties jdbcProperties,
for (int i = 0; i < unionExpression.length; i++) {
UnionExpression ue = unionExpression[i];
IExpression expression = ue.getExpression();
this._join(expression,sqlQueryObjectInnerList.get(i));
_join(expression,sqlQueryObjectInnerList.get(i));
}
}

Expand Down Expand Up @@ -556,13 +558,13 @@ public JDBCPaginatedExpression toPaginatedExpression(JDBCExpression expression,

@Override
public void mappingTableIds(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, IdFr id, FR obj) throws NotFoundException,NotImplementedException,ServiceException,Exception{
this._mappingTableIds(jdbcProperties,log,connection,sqlQueryObject,obj,
_mappingTableIds(jdbcProperties,log,connection,sqlQueryObject,obj,
this.get(jdbcProperties,log,connection,sqlQueryObject,id,null));
}

@Override
public void mappingTableIds(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, long tableId, FR obj) throws NotFoundException,NotImplementedException,ServiceException,Exception{
this._mappingTableIds(jdbcProperties,log,connection,sqlQueryObject,obj,
_mappingTableIds(jdbcProperties,log,connection,sqlQueryObject,obj,
this.get(jdbcProperties,log,connection,sqlQueryObject,tableId,null));
}
private void _mappingTableIds(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, FR obj, FR imgSaved) throws NotFoundException,NotImplementedException,ServiceException,Exception{
Expand Down Expand Up @@ -610,6 +612,10 @@ private void _mappingTableIds(JDBCServiceManagerProperties jdbcProperties, Logge
imgSaved.getIdIncasso()!=null){
obj.getIdIncasso().setId(imgSaved.getIdIncasso().getId());
}
if(obj.getIdRendicontazione()!=null &&
imgSaved.getIdRendicontazione()!=null){
obj.getIdRendicontazione().setId(imgSaved.getIdRendicontazione().getId());
}

}

Expand Down Expand Up @@ -790,6 +796,13 @@ protected Map<String, List<IField>> _getMapTableToPKColumn() throws NotImplement
new CustomField("id", Long.class, "id", converter.toTable(FR.model().ID_INCASSO))
));

// FR.model().ID_RENDICONTAZIONE
mapTableToPKColumn.put(converter.toTable(FR.model().ID_RENDICONTAZIONE),
utilities.newList(
new CustomField("id", Long.class, "id", converter.toTable(FR.model().ID_RENDICONTAZIONE))
));



return mapTableToPKColumn;
}
Expand Down Expand Up @@ -876,6 +889,7 @@ public IdFr findId(JDBCServiceManagerProperties jdbcProperties, Logger log, Conn

// Object _fr
sqlQueryObjectGet.addFromTable(this.getFRFieldConverter().toTable(FR.model()));
sqlQueryObjectGet.addSelectField(this.getFRFieldConverter().toColumn(FR.model().COD_DOMINIO,true));
sqlQueryObjectGet.addSelectField(this.getFRFieldConverter().toColumn(FR.model().COD_FLUSSO,true));
sqlQueryObjectGet.addSelectField(this.getFRFieldConverter().toColumn(FR.model().DATA_ORA_FLUSSO,true));
sqlQueryObjectGet.setANDLogicOperator(true);
Expand All @@ -886,6 +900,7 @@ public IdFr findId(JDBCServiceManagerProperties jdbcProperties, Logger log, Conn
new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(tableId,Long.class)
};
List<Class<?>> listaFieldIdReturnType_fr = new ArrayList<>();
listaFieldIdReturnType_fr.add(FR.model().COD_DOMINIO.getFieldType());
listaFieldIdReturnType_fr.add(FR.model().COD_FLUSSO.getFieldType());
listaFieldIdReturnType_fr.add(FR.model().DATA_ORA_FLUSSO.getFieldType());
it.govpay.orm.IdFr id_fr = null;
Expand All @@ -898,8 +913,9 @@ public IdFr findId(JDBCServiceManagerProperties jdbcProperties, Logger log, Conn
}
else{
id_fr = new it.govpay.orm.IdFr();
id_fr.setCodFlusso((String)listaFieldId_fr.get(0));
id_fr.setDataOraFlusso((Date)listaFieldId_fr.get(1));
id_fr.setCodDominio((String)listaFieldId_fr.get(0));
id_fr.setCodFlusso((String)listaFieldId_fr.get(1));
id_fr.setDataOraFlusso((Date)listaFieldId_fr.get(2));
}

return id_fr;
Expand Down Expand Up @@ -938,11 +954,13 @@ protected Long findIdFR(JDBCServiceManagerProperties jdbcProperties, Logger log,
sqlQueryObjectGet.addSelectField("id");
sqlQueryObjectGet.setANDLogicOperator(true);
// sqlQueryObjectGet.setSelectDistinct(true);
sqlQueryObjectGet.addWhereCondition(this.getFRFieldConverter().toColumn(FR.model().COD_DOMINIO,true)+"=?");
sqlQueryObjectGet.addWhereCondition(this.getFRFieldConverter().toColumn(FR.model().COD_FLUSSO,true)+"=?");
sqlQueryObjectGet.addWhereCondition(this.getFRFieldConverter().toColumn(FR.model().DATA_ORA_FLUSSO,true)+"=?");

// Recupero _fr
org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject [] searchParams_fr = new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject [] {
org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject [] searchParams_fr = new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject [] {
new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(id.getCodFlusso(),FR.model().COD_DOMINIO.getFieldType()),
new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(id.getCodFlusso(),FR.model().COD_FLUSSO.getFieldType()),
new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(id.getDataOraFlusso(),FR.model().DATA_ORA_FLUSSO.getFieldType()),
};
Expand Down
7 changes: 6 additions & 1 deletion src/main/resources/db/schema/govpay.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@
<xsd:complexType name="id-fr">
<xsd:sequence>
<xsd:element name="codFlusso" type="xsd:string"/>
<xsd:element name="codDominio" type="String35" minOccurs="0"/>
<xsd:element name="codDominio" type="String35"/>
<xsd:element name="dataOraFlusso" type="xsd:dateTime"/>
<xsd:element name="codPsp" type="String35" minOccurs="0"/>
<xsd:element name="stato" type="String35" minOccurs="0"/>
Expand Down Expand Up @@ -2272,6 +2272,10 @@
<linkit:sql-id-mapping object-name="Incasso" object-type="Incasso"
relationship="reversed"/>
</linkit:generator>
<!--
Indice con creazione esplicita sullo script:
CREATE INDEX idx_evt_fk_fr ON eventi (id_fr);
-->
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
Expand Down Expand Up @@ -3178,6 +3182,7 @@
<linkit:sql-table-mapping generate-sql="true" name="fr" on-delete-cascade="false">
<linkit:sql-table-constraint foreign-key="fk_fr"/>
<linkit:sql-table-unique create-index="true">
<linkit:sql-table-unique-field name="codDominio"/>
<linkit:sql-table-unique-field name="codFlusso"/>
<linkit:sql-table-unique-field name="dataOraFlusso" ignoreTypeCompatibility="true"/>
</linkit:sql-table-unique>
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/db/sql/mysql/patch/3.5.sql
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,8 @@ UPDATE rendicontazioni, fr, pagamenti SET id_pagamento = pagamenti.id
AND rendicontazioni.iur=pagamenti.iur
AND rendicontazioni.id_pagamento IS NULL;


-- 25/01/2022 Flusso Rendicontazione univoco per dominio
DROP INDEX unique_fr_1 ON fr;
DROP INDEX index_fr_1 ON fr;
CREATE UNIQUE INDEX index_fr_1 ON fr (cod_dominio,cod_flusso,data_ora_flusso);
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/db/sql/oracle/gov_pay.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,7 @@ CREATE INDEX idx_evt_data ON eventi (data);
CREATE INDEX idx_evt_fk_vrs ON eventi (cod_applicazione,cod_versamento_ente);
CREATE INDEX idx_evt_id_sessione ON eventi (id_sessione);
CREATE INDEX idx_evt_iuv ON eventi (iuv);
CREATE INDEX idx_evt_fk_fr ON eventi (id_fr);
CREATE TRIGGER trg_eventi
BEFORE
insert on eventi
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/db/sql/oracle/patch/3.5.sql
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,8 @@ update rendicontazioni set id_singolo_versamento=singoli_versamenti.id

update rendicontazioni set stato='ANOMALA', anomalie='007101#Il pagamento riferito dalla rendicontazione non risulta presente in base dati.' where id_pagamento is null and esito=0;


-- 25/01/2022 Flusso Rendicontazione univoco per dominio
ALTER TABLE fr DROP CONSTRAINT unique_fr_1;
ALTER TABLE fr ADD CONSTRAINT unique_fr_1 UNIQUE (cod_flusso,data_ora_flusso);

2 changes: 1 addition & 1 deletion src/main/resources/db/sql/postgresql/gov_pay.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ CREATE INDEX idx_evt_data ON eventi (data);
CREATE INDEX idx_evt_fk_vrs ON eventi (cod_applicazione,cod_versamento_ente);
CREATE INDEX idx_evt_id_sessione ON eventi (id_sessione);
CREATE INDEX idx_evt_iuv ON eventi (iuv);

CREATE INDEX idx_evt_fk_fr ON eventi (id_fr);


CREATE SEQUENCE seq_batch start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1 NO CYCLE;
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/db/sql/postgresql/patch/3.5.sql
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ UPDATE rendicontazioni set stato='ALTRO_INTERMEDIARIO', anomalie=null where id i
-- Aggiornamento di rendicontazioni che risultano corrette da approfondire con ulteriori verifiche.
-- UPDATE rendicontazioni set stato='OK', anomalie=null where id in (select rendicontazioni.id from versamenti join singoli_versamenti on versamenti.id=singoli_versamenti.id_versamento join rendicontazioni on singoli_versamenti.id=rendicontazioni.id_singolo_versamento where stato='ANOMALA' and rendicontazioni.id_pagamento is not null and rendicontazioni.id_singolo_versamento is not null and stato_versamento='ESEGUITO');


-- 25/01/2022 Flusso Rendicontazione univoco per dominio
ALTER TABLE fr DROP CONSTRAINT unique_fr_1;
ALTER TABLE fr ADD CONSTRAINT unique_fr_1 UNIQUE (cod_dominio,cod_flusso,data_ora_flusso);

2 changes: 1 addition & 1 deletion src/main/resources/db/sql/sqlserver/gov_pay.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ CREATE INDEX idx_evt_data ON eventi (data);
CREATE INDEX idx_evt_fk_vrs ON eventi (cod_applicazione,cod_versamento_ente);
CREATE INDEX idx_evt_id_sessione ON eventi (id_sessione);
CREATE INDEX idx_evt_iuv ON eventi (iuv);

CREATE INDEX idx_evt_fk_fr ON eventi (id_fr);


CREATE TABLE batch
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/db/sql/sqlserver/patch/3.5.sql
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,8 @@ UPDATE rendicontazioni SET id_pagamento = pagamenti.id
AND rendicontazioni.iur=pagamenti.iur
AND rendicontazioni.id_pagamento IS NULL;


-- 25/01/2022 Flusso Rendicontazione univoco per dominio
ALTER TABLE fr DROP CONSTRAINT unique_fr_1;
ALTER TABLE fr ADD CONSTRAINT unique_fr_1 UNIQUE (cod_dominio,cod_flusso,data_ora_flusso);
CREATE UNIQUE INDEX index_fr_1 ON fr (cod_dominio,cod_flusso,data_ora_flusso);
Expand Down

0 comments on commit 283f7b9

Please sign in to comment.