Skip to content

Commit

Permalink
fix(massivo-controllosede): fix controllo validita sede ins massivo 2…
Browse files Browse the repository at this point in the history
…0241112
  • Loading branch information
lcucuzzella authored and sgravinadxc committed Nov 13, 2024
1 parent bba12fb commit 1906ae9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,9 @@ List<SedeProjection> findAllSediFiltrate(

Optional<SedeEntity> findByNomeIgnoreCase(String nominativoSede);

@Query(value = ""
+ " SELECT "
+ " s "
+ " FROM "
+ " SedeEntity s "
+ " WHERE REPLACE(s.nome, ' ', '') = :nomeSedeModified "
,nativeQuery = false)
Optional<SedeEntity> findSedeByNomeSedeModified(@Param(value = "nomeSedeModified") String nomeSedeModified);
@Query(value = "SELECT s " +
"FROM SedeEntity s " +
"WHERE REPLACE(REPLACE(TRIM(BOTH '''' FROM s.nome), ' ', ''), '\"', '') = :nomeSedeModified",
nativeQuery = false)
Optional<SedeEntity> findSedeByNomeSedeModified(@Param(value = "nomeSedeModified") String nomeSedeModified);
}
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public ElaboratoCSVResponse buildResponse(List<ServiziElaboratiDTO> serviziValid
throw new ResourceNotFoundException(NoteCSV.NOTE_VOLONTARIO_NON_PRESENTE, CodiceErroreEnum.C01);
}
}
String nominativoSedeModified = servizioElaborato.getCampiAggiuntiviCSV().getNominativoSede().replace(" ", "").toUpperCase();
String nominativoSedeModified = servizioElaborato.getCampiAggiuntiviCSV().getNominativoSede().replace(" ", "").replace("'","").toUpperCase();
Optional<SedeEntity> optSedeRecuperata = recuperaSedeDaRichiesta(nominativoSedeModified);
if (!optSedeRecuperata.isPresent()) {
throw new ResourceNotFoundException(NoteCSV.NOTE_SEDE_NON_PRESENTE, CodiceErroreEnum.C01);
Expand Down

0 comments on commit 1906ae9

Please sign in to comment.