gestion parametre frontend
This commit is contained in:
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
||||
@SecurityRequirement(name = "bearer")
|
||||
@Tag(name = "Tpe")
|
||||
@CrossOrigin(origins = "*")
|
||||
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||
public class TpeController {
|
||||
|
||||
private final TpeService tpeService;
|
||||
|
||||
@@ -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) {
|
||||
try {
|
||||
return new ResponseEntity<>(
|
||||
|
||||
@@ -127,6 +127,7 @@ public class TpeServiceImpl implements TpeService {
|
||||
public List<Tpe> getTpeListByUserId(Long userId) {
|
||||
return tpeRepository.getTpeByUserId(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Tpe reCreateExistTpe(Tpe tpe) throws BadRequestException {
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ public List<ParcellePayLoad> getParcelle(Long terminaleId, Long limit, Long offs
|
||||
|
||||
private String getUploadFile(UploadPayLoad uploadPayLoad) {
|
||||
try {
|
||||
Resource resource = fileStorageService.loadFileAsResource("",uploadPayLoad.getName());
|
||||
Resource resource = fileStorageService.loadFileAsResource("",uploadPayLoad.getRename());
|
||||
final var bytes = resource.getInputStream().readAllBytes();
|
||||
return Base64.getEncoder().encodeToString(bytes);
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -17,7 +17,7 @@ public interface MobileDataCaracteristiqueBatimentRepository extends JpaReposito
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public interface MobileDataCaracteristiqueUniteLogementRepository extends JpaRep
|
||||
Optional<MobileDataCaracteristiqueUniteLogement> findFirstByTerminalIdAndExternalKey(Long terminalId,Long ExternalKey);
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user