diff --git a/arc-core/src/main/java/fr/insee/arc/core/service/p1reception/registerfiles/dao/FileRegistrationDao.java b/arc-core/src/main/java/fr/insee/arc/core/service/p1reception/registerfiles/dao/FileRegistrationDao.java index 8500d841e..635ed1bca 100644 --- a/arc-core/src/main/java/fr/insee/arc/core/service/p1reception/registerfiles/dao/FileRegistrationDao.java +++ b/arc-core/src/main/java/fr/insee/arc/core/service/p1reception/registerfiles/dao/FileRegistrationDao.java @@ -166,8 +166,9 @@ private void queryUpdateArchiveWithoutFileName(StringBuilder requete) { * @return */ private StringBuilder querySelectFilesMarkedToReplay() { - return new StringBuilder("select distinct " + ColumnEnum.ID_SOURCE.getColumnName() + " from " + this.tablePil - + " a where to_delete='R' and exists (select 1 from " + this.tablePilTemp + " b where a." + return new StringBuilder("SELECT " + ColumnEnum.ID_SOURCE.getColumnName() + " FROM (SELECT DISTINCT " + + ColumnEnum.ID_SOURCE.getColumnName() + " FROM " + this.tablePil + + " where to_delete='R') a WHERE exists (select 1 from " + this.tablePilTemp + " b where a." + ColumnEnum.ID_SOURCE.getColumnName() + "=b." + ColumnEnum.ID_SOURCE.getColumnName() + ")"); } @@ -309,8 +310,7 @@ public void execQueryInsertCorruptedArchiveInPilotage(FilesDescriber content) th UtilitaireDao.get(0).executeImmediate(this.sandbox.getConnection(), requete); } - - public void execQueryVersionDuplicateArchives (List listContainerDoublons, + public void execQueryVersionDuplicateArchives(List listContainerDoublons, List listVersionContainerDoublons) throws ArcException { StringBuilder requete = new StringBuilder(); @@ -320,11 +320,11 @@ public void execQueryVersionDuplicateArchives (List listContainerDoublon requete.append( "from (select distinct container from " + this.tablePilTemp + " where container is not null) a "); - GenericBean m = new GenericBean(UtilitaireDao.get(0) - .executeRequest(sandbox.getConnection(), new ArcPreparedStatementBuilder(requete))); + GenericBean m = new GenericBean( + UtilitaireDao.get(0).executeRequest(sandbox.getConnection(), new ArcPreparedStatementBuilder(requete))); listContainerDoublons.addAll(m.getColumnValues(ColumnEnum.CONTAINER.getColumnName())); listVersionContainerDoublons.addAll(m.getColumnValues(ColumnEnum.V_CONTAINER.getColumnName())); - + } }