gestion parametre frontend

This commit is contained in:
2026-06-30 11:04:35 +01:00
parent bd7c480e7c
commit 375d4b1065
6 changed files with 6 additions and 5 deletions

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer") @SecurityRequirement(name = "bearer")
@Tag(name = "Tpe") @Tag(name = "Tpe")
@CrossOrigin(origins = "*") @CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')") //@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class TpeController { public class TpeController {
private final TpeService tpeService; private final TpeService tpeService;

View File

@@ -146,7 +146,7 @@ public class RestaurationController {
} }
} }
@GetMapping(path = "/caracteristique-parcelle/") @GetMapping(path = "/caracteristique-parcelle")
public ResponseEntity<?> getCaracteristiqueParcelle(@RequestParam Long terminalId,@RequestParam Long limit, @RequestParam Long offset) { public ResponseEntity<?> getCaracteristiqueParcelle(@RequestParam Long terminalId,@RequestParam Long limit, @RequestParam Long offset) {
try { try {
return new ResponseEntity<>( return new ResponseEntity<>(

View File

@@ -127,6 +127,7 @@ public class TpeServiceImpl implements TpeService {
public List<Tpe> getTpeListByUserId(Long userId) { public List<Tpe> getTpeListByUserId(Long userId) {
return tpeRepository.getTpeByUserId(userId); return tpeRepository.getTpeByUserId(userId);
} }
@Override @Override
public Tpe reCreateExistTpe(Tpe tpe) throws BadRequestException { public Tpe reCreateExistTpe(Tpe tpe) throws BadRequestException {

View File

@@ -261,7 +261,7 @@ public List<ParcellePayLoad> getParcelle(Long terminaleId, Long limit, Long offs
private String getUploadFile(UploadPayLoad uploadPayLoad) { private String getUploadFile(UploadPayLoad uploadPayLoad) {
try { try {
Resource resource = fileStorageService.loadFileAsResource("",uploadPayLoad.getName()); Resource resource = fileStorageService.loadFileAsResource("",uploadPayLoad.getRename());
final var bytes = resource.getInputStream().readAllBytes(); final var bytes = resource.getInputStream().readAllBytes();
return Base64.getEncoder().encodeToString(bytes); return Base64.getEncoder().encodeToString(bytes);
} catch (Exception e) { } catch (Exception e) {

View File

@@ -17,7 +17,7 @@ public interface MobileDataCaracteristiqueBatimentRepository extends JpaReposito
List<MobileDataCaracteristiqueBatiment> findAllByTraiterIsFalseAndTerminalId(Long TerminalId); List<MobileDataCaracteristiqueBatiment> findAllByTraiterIsFalseAndTerminalId(Long TerminalId);
@Query(value = "SELECT * FROM mobile_data_caracteristique_batiment WHERE CAST(caracteristique_batiment_paylod ->>'terminalId' AS BIGINT) = :terminalId limit :limit offset :offset", nativeQuery = true) @Query(value = "SELECT * FROM mobile_data_caracteristique_batiment WHERE CAST(caracteristique_batiment_payload ->>'terminalId' AS BIGINT) = :terminalId limit :limit offset :offset", nativeQuery = true)
List<MobileDataCaracteristiqueBatiment> findAllByTerminalIdIgnoreIfTreatedPaged(@Param("terminalId") Long terminalId, @Param("limit") Long limit, @Param("offset") Long offset); List<MobileDataCaracteristiqueBatiment> findAllByTerminalIdIgnoreIfTreatedPaged(@Param("terminalId") Long terminalId, @Param("limit") Long limit, @Param("offset") Long offset);
} }

View File

@@ -16,7 +16,7 @@ public interface MobileDataCaracteristiqueUniteLogementRepository extends JpaRep
Optional<MobileDataCaracteristiqueUniteLogement> findFirstByTerminalIdAndExternalKey(Long terminalId,Long ExternalKey); Optional<MobileDataCaracteristiqueUniteLogement> findFirstByTerminalIdAndExternalKey(Long terminalId,Long ExternalKey);
List<MobileDataCaracteristiqueUniteLogement> findAllByTraiterIsFalseAndTerminalId(Long TerminalId); List<MobileDataCaracteristiqueUniteLogement> findAllByTraiterIsFalseAndTerminalId(Long TerminalId);
@Query(value = "SELECT * FROM mobile_data_caracteristique_unite_logement WHERE CAST(caracteristique_unite_logement_paylod ->>'terminalId' AS BIGINT) = :terminalId limit :limit offset :offset", nativeQuery = true) @Query(value = "SELECT * FROM mobile_data_caracteristique_unite_logement WHERE CAST(caracteristique_unite_logement_payload ->>'terminalId' AS BIGINT) = :terminalId limit :limit offset :offset", nativeQuery = true)
List<MobileDataCaracteristiqueUniteLogement> findAllByTerminalIdIgnoreIfTreatedPaged(@Param("terminalId") Long terminalId, @Param("limit") Long limit, @Param("offset") Long offset); List<MobileDataCaracteristiqueUniteLogement> findAllByTerminalIdIgnoreIfTreatedPaged(@Param("terminalId") Long terminalId, @Param("limit") Long limit, @Param("offset") Long offset);
} }