Compare commits
5 Commits
e325b12546
...
5ea1c93d2b
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ea1c93d2b | |||
| 41e55da1df | |||
| 16dd68c72c | |||
| 705af14b4e | |||
| bfe7b319c2 |
@@ -154,7 +154,7 @@ public class ParcelleController {
|
||||
);
|
||||
Long userId = currentUser.getUser().getId();
|
||||
return new ResponseEntity<>(
|
||||
new ApiResponse<>(true, parcelleService.getParcelleByIdToDto(userId,id), "enquete trouvé avec succès."),
|
||||
new ApiResponse<>(true, parcelleService.getParcelleByIdToDto(userId,id), "parcelle trouvée avec succès."),
|
||||
HttpStatus.OK
|
||||
);
|
||||
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
||||
|
||||
@@ -223,4 +223,28 @@ public class BatimentController {
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/all-paged/by-quartier-id/{quartierId}")
|
||||
public ResponseEntity<?> getAllBatimentByQuartierPaged(@PathVariable Long quartierId, @RequestParam int pageNo, @RequestParam int pageSize) {
|
||||
try {
|
||||
Pageable pageable = PageRequest.of(pageNo, pageSize);
|
||||
return new ResponseEntity<>(
|
||||
new ApiResponse<>(true, batimentService.getBatimentListByquartierPageable(quartierId,pageable), "Liste des batiments chargée avec succès."),
|
||||
HttpStatus.OK
|
||||
);
|
||||
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
|
||||
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
|
||||
FileStorageException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
|
||||
} catch (NullPointerException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,4 +434,30 @@ public class DonneesImpositionTfuController {
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/all-page/by-exercice-id/by-structure-id/{exerciceId}/{structureId}")
|
||||
public ResponseEntity<?> getAllDonneesImpositionTfuByExerciceIdAndStructureIdPaged(@PathVariable Long exerciceId, @PathVariable Long structureId,@RequestParam int pageNo, @RequestParam int pageSize) {
|
||||
try {
|
||||
Pageable pageable = PageRequest.of(pageNo, pageSize);
|
||||
System.out.println("NOUS SOMMES ICI");
|
||||
return new ResponseEntity<>(
|
||||
new ApiResponse<>(true, donneesImpositionTfuService.getDonneesFiscalesByExerciceAndStructureIdPageable(exerciceId,structureId, pageable), "Liste des caractéristiques chargée avec succès."),
|
||||
HttpStatus.OK
|
||||
);
|
||||
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
|
||||
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
|
||||
FileStorageException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
|
||||
} catch (NullPointerException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,4 +247,30 @@ public class UniteLogementController {
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/all-paged/by-quartier-id/{quartierId}")
|
||||
public ResponseEntity<?> getAllUniteLogementByQuartierPaged(@PathVariable Long quartierId, @RequestParam int pageNo, @RequestParam int pageSize) {
|
||||
try {
|
||||
Pageable pageable = PageRequest.of(pageNo, pageSize);
|
||||
|
||||
return new ResponseEntity<>(
|
||||
new ApiResponse<>(true, enqueteUniteLogementService.getUniteLogementListByQuartierPageable(quartierId,pageable), "Liste des unites de logements chargée avec succès."),
|
||||
HttpStatus.OK
|
||||
);
|
||||
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
|
||||
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
|
||||
FileStorageException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
|
||||
} catch (NullPointerException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public class EnqueteServiceImpl implements EnqueteService {
|
||||
|
||||
ParcellePayLoadWeb parcellePayLoadWeb= getParcellePayloadFromEnquetePl(enquetePayLoadWeb);
|
||||
|
||||
if(enquetePayLoadWeb.getParcelleId()==null){
|
||||
if(parcellePayLoadWeb.getId()==null){
|
||||
parcellePayLoadWeb=parcelleService.createParcelle(parcellePayLoadWeb);
|
||||
}else{
|
||||
parcellePayLoadWeb=parcelleService.updateParcelle(parcellePayLoadWeb.getId(),parcellePayLoadWeb);
|
||||
@@ -138,7 +138,7 @@ public class EnqueteServiceImpl implements EnqueteService {
|
||||
|
||||
private ParcellePayLoadWeb getParcellePayloadFromEnquetePl(EnquetePayLoadWeb enquetePayLoadWeb) {
|
||||
ParcellePayLoadWeb parcellePayLoadWeb=new ParcellePayLoadWeb();
|
||||
parcellePayLoadWeb.setId(enquetePayLoadWeb.getId());
|
||||
parcellePayLoadWeb.setId(enquetePayLoadWeb.getParcelleId());
|
||||
parcellePayLoadWeb.setQ(enquetePayLoadWeb.getParcelleQ());
|
||||
parcellePayLoadWeb.setI(enquetePayLoadWeb.getParcelleI());
|
||||
parcellePayLoadWeb.setP(enquetePayLoadWeb.getParcelleP());
|
||||
@@ -175,7 +175,6 @@ public class EnqueteServiceImpl implements EnqueteService {
|
||||
throw new BadRequestException("Impossible d'enregistrer une enquête avec une parcelle inexistante");
|
||||
}
|
||||
|
||||
Optional<Parcelle> optionalParcelle=Optional.empty();
|
||||
Optional<User> optionalUser = userRepository.findById(enquetePayLoadWeb.getEnqueteurId());
|
||||
if (!optionalUser.isPresent()) {
|
||||
throw new BadRequestException("Echec de l'enregistrement : Enquêteur inexistant");
|
||||
@@ -190,15 +189,17 @@ public class EnqueteServiceImpl implements EnqueteService {
|
||||
throw new BadRequestException("Echec de l'enregistrement : zone inexistante");
|
||||
}
|
||||
|
||||
if (enquetePayLoadWeb.getParcelleId() == null) {
|
||||
throw new ApplicationException("Echec de l'enregistrement : La parcelle non renseignée.");
|
||||
if(enquetePayLoadWeb.getParcelleId()!=null) {
|
||||
Optional<Parcelle> optionalParcelle = parcelleRepository.findById(enquetePayLoadWeb.getParcelleId());
|
||||
if (!optionalParcelle.isPresent()) {
|
||||
throw new BadRequestException("Echec de l'enregistrement : Parcelle inexistante");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
ParcellePayLoadWeb parcellePayLoadWeb= getParcellePayloadFromEnquetePl(enquetePayLoadWeb);
|
||||
|
||||
if(enquetePayLoadWeb.getParcelleId()==null){
|
||||
if(parcellePayLoadWeb.getId()==null){
|
||||
parcellePayLoadWeb=parcelleService.createParcelle(parcellePayLoadWeb);
|
||||
}else{
|
||||
parcellePayLoadWeb=parcelleService.updateParcelle(parcellePayLoadWeb.getId(),parcellePayLoadWeb);
|
||||
|
||||
@@ -78,10 +78,13 @@ public class ParcelleServiceImpl implements ParcelleService {
|
||||
|
||||
@Override
|
||||
public ParcellePayLoadWeb updateParcelle(Long id, ParcellePayLoadWeb parcellePayLoadWeb) throws NotFoundException {
|
||||
if(parcellePayLoadWeb.getId()!=null) {
|
||||
Optional<Parcelle> optionalParcelle = parcelleRepository.findById(parcellePayLoadWeb.getId());
|
||||
if (!optionalParcelle.isPresent()) {
|
||||
throw new NotFoundException("Impossible de trouver la parcelle que vous désirer modifier");
|
||||
}
|
||||
}
|
||||
|
||||
Parcelle parcelle = new Parcelle();
|
||||
parcelle = entityFromPayLoadService.getParcelleFromPayload(parcellePayLoadWeb);
|
||||
parcelle= parcelleRepository.save(parcelle);
|
||||
|
||||
@@ -118,4 +118,9 @@ public class BatimentServiceImpl implements BatimentService {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<BatimentPaylaodWeb> getBatimentListByquartierPageable(Long quartierId, Pageable pageable) {
|
||||
return batimentRepository.findAllBatimentsAvecOccupantCourantByQuartierToDtoPageble(quartierId,pageable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,4 +164,9 @@ public class DonneesImpositionTfuServiceImpl implements DonneesImpositionTfuServ
|
||||
public Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImpositionTfuIdBatieUniteLogPageable(Long impositionsTfuId, Pageable pageable) {
|
||||
return donneesImpositionTfuRepository.findAllByImpositionTfuIdBatieUniteLogPageable(impositionsTfuId,pageable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByExerciceAndStructureIdPageable(Long exerciceId, Long structureId, Pageable pageable) {
|
||||
return donneesImpositionTfuRepository.findAllByExericeIdStructureIdPageable(exerciceId,structureId,pageable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class EnqueteBatimentServiceImpl implements EnqueteBatimentService {
|
||||
}
|
||||
BatimentPaylaodWeb batimentPaylaodWeb= getBatimentPayloadFromEnqueteBat(enqueteBatimentPayloadWeb);
|
||||
|
||||
if(enqueteBatimentPayloadWeb.getBatimentId()==null){
|
||||
if(batimentPaylaodWeb.getId()==null){
|
||||
batimentPaylaodWeb=batimentService.createBatiment(batimentPaylaodWeb);
|
||||
}else{
|
||||
batimentPaylaodWeb=batimentService.updateBatiment(batimentPaylaodWeb.getId(),batimentPaylaodWeb);
|
||||
@@ -76,7 +76,7 @@ public class EnqueteBatimentServiceImpl implements EnqueteBatimentService {
|
||||
|
||||
private BatimentPaylaodWeb getBatimentPayloadFromEnqueteBat(EnqueteBatimentPayloadWeb enqueteBatimentPayloadWeb) {
|
||||
BatimentPaylaodWeb batimentPaylaodWeb= new BatimentPaylaodWeb();
|
||||
batimentPaylaodWeb.setId(enqueteBatimentPayloadWeb.getId());
|
||||
batimentPaylaodWeb.setId(enqueteBatimentPayloadWeb.getBatimentId());
|
||||
batimentPaylaodWeb.setNub(enqueteBatimentPayloadWeb.getNub());
|
||||
batimentPaylaodWeb.setCode(enqueteBatimentPayloadWeb.getCode());
|
||||
batimentPaylaodWeb.setDateConstruction(enqueteBatimentPayloadWeb.getDateConstruction());
|
||||
@@ -111,7 +111,7 @@ public class EnqueteBatimentServiceImpl implements EnqueteBatimentService {
|
||||
|
||||
BatimentPaylaodWeb batimentPaylaodWeb= getBatimentPayloadFromEnqueteBat(enqueteBatimentPayloadWeb);
|
||||
|
||||
if(enqueteBatimentPayloadWeb.getBatimentId()==null){
|
||||
if(batimentPaylaodWeb.getId()==null){
|
||||
batimentPaylaodWeb=batimentService.createBatiment(batimentPaylaodWeb);
|
||||
}else{
|
||||
batimentPaylaodWeb=batimentService.updateBatiment(batimentPaylaodWeb.getId(),batimentPaylaodWeb);
|
||||
|
||||
@@ -59,10 +59,10 @@ public class EnqueteUniteLogementServiceImpl implements EnqueteUniteLogementServ
|
||||
|
||||
UniteLogementPaylaodWeb uniteLogementPaylaodWeb=getUniteLogementPayloadFromEnqueteUl(enqueteUniteLogementPayloadWeb);
|
||||
|
||||
if(enqueteUniteLogementPayloadWeb.getId()==null){
|
||||
if(uniteLogementPaylaodWeb.getId()==null){
|
||||
uniteLogementPaylaodWeb= uniteLogementService.createUniteLogement(uniteLogementPaylaodWeb);
|
||||
}else{
|
||||
uniteLogementPaylaodWeb= uniteLogementService.createUniteLogement(uniteLogementPaylaodWeb);
|
||||
uniteLogementPaylaodWeb= uniteLogementService.updateUniteLogement(uniteLogementPaylaodWeb.getId(),uniteLogementPaylaodWeb);
|
||||
}
|
||||
enqueteUniteLogementPayloadWeb.setUniteLogementId(uniteLogementPaylaodWeb.getId());
|
||||
|
||||
@@ -74,7 +74,7 @@ public class EnqueteUniteLogementServiceImpl implements EnqueteUniteLogementServ
|
||||
|
||||
private UniteLogementPaylaodWeb getUniteLogementPayloadFromEnqueteUl(EnqueteUniteLogementPayloadWeb enqueteUniteLogementPayloadWeb) {
|
||||
UniteLogementPaylaodWeb uniteLogementPaylaodWeb=new UniteLogementPaylaodWeb();
|
||||
uniteLogementPaylaodWeb.setId(enqueteUniteLogementPayloadWeb.getId());
|
||||
uniteLogementPaylaodWeb.setId(enqueteUniteLogementPayloadWeb.getUniteLogementId());
|
||||
uniteLogementPaylaodWeb.setNul(enqueteUniteLogementPayloadWeb.getNul());
|
||||
uniteLogementPaylaodWeb.setNumeroEtage(enqueteUniteLogementPayloadWeb.getNumeroEtage());
|
||||
uniteLogementPaylaodWeb.setCode(enqueteUniteLogementPayloadWeb.getCode());
|
||||
@@ -114,10 +114,10 @@ public class EnqueteUniteLogementServiceImpl implements EnqueteUniteLogementServ
|
||||
|
||||
UniteLogementPaylaodWeb uniteLogementPaylaodWeb=getUniteLogementPayloadFromEnqueteUl(enqueteUniteLogementPayloadWeb);
|
||||
|
||||
if(enqueteUniteLogementPayloadWeb.getId()==null){
|
||||
if(uniteLogementPaylaodWeb.getId()==null){
|
||||
uniteLogementPaylaodWeb= uniteLogementService.createUniteLogement(uniteLogementPaylaodWeb);
|
||||
}else{
|
||||
uniteLogementPaylaodWeb= uniteLogementService.createUniteLogement(uniteLogementPaylaodWeb);
|
||||
uniteLogementPaylaodWeb= uniteLogementService.updateUniteLogement(uniteLogementPaylaodWeb.getId(),uniteLogementPaylaodWeb);
|
||||
}
|
||||
enqueteUniteLogementPayloadWeb.setUniteLogementId(uniteLogementPaylaodWeb.getId());
|
||||
|
||||
|
||||
@@ -111,4 +111,9 @@ public class UniteLogementServiceImpl implements UniteLogementService {
|
||||
public List<UniteLogementPaylaodWeb> getUniteLogementListByParcelle(Long parcelleId) {
|
||||
return uniteLogementRepository.findAllUnitesLogementAvecOccupantCourantByParcelleToDto(parcelleId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<UniteLogementPaylaodWeb> getUniteLogementListByQuartierPageable(Long quartierId, Pageable pageable) {
|
||||
return uniteLogementRepository.findUnitesLogementAvecOccupantCourantByQuartierToDtoPageable(quartierId,pageable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,4 +27,8 @@ public interface BatimentService {
|
||||
List<BatimentPaylaodWeb> getBatimentListByParcelle(Long parcelleId);
|
||||
|
||||
Optional<BatimentPaylaodWeb> getBatimentById(Long id);
|
||||
|
||||
|
||||
Page<BatimentPaylaodWeb> getBatimentListByquartierPageable(Long quartierId, Pageable pageable);
|
||||
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@ public interface DonneesImpositionTfuService {
|
||||
Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImpositionTfuIdNonBatiePageable(Long impositionsTfuId, Pageable pageable);
|
||||
Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImpositionTfuIdBatieBatimentPageable(Long impositionsTfuId, Pageable pageable);
|
||||
Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImpositionTfuIdBatieUniteLogPageable(Long impositionsTfuId, Pageable pageable);
|
||||
|
||||
|
||||
Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByExerciceAndStructureIdPageable(Long exerciceId, Long structureId, Pageable pageable);
|
||||
|
||||
}
|
||||
|
||||
@@ -30,4 +30,7 @@ public interface UniteLogementService {
|
||||
List<UniteLogementPaylaodWeb> getUniteLogementListByBatiment(Long batimentId);
|
||||
|
||||
List<UniteLogementPaylaodWeb> getUniteLogementListByParcelle(Long parcelleId);
|
||||
|
||||
Page<UniteLogementPaylaodWeb> getUniteLogementListByQuartierPageable(Long quartierId, Pageable pageable);
|
||||
|
||||
}
|
||||
|
||||
@@ -300,4 +300,67 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
|
||||
Pageable pageable
|
||||
);
|
||||
|
||||
|
||||
@Query(
|
||||
value = """
|
||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.BatimentPaylaodWeb(
|
||||
b.id,
|
||||
b.nub,
|
||||
b.code,
|
||||
b.dateConstruction,
|
||||
p.id,
|
||||
p.nup,
|
||||
p.q,
|
||||
p.i,
|
||||
p.p,
|
||||
per.id,
|
||||
per.nom,
|
||||
per.prenom,
|
||||
per.raisonSociale,
|
||||
eb.superficieAuSol,
|
||||
eb.superficieLouee,
|
||||
eb.id,
|
||||
cb.id,
|
||||
cb.code,
|
||||
cb.standing,
|
||||
eb.nombrePiscine,
|
||||
eb.montantLocatifAnnuelDeclare,
|
||||
eb.montantLocatifAnnuelCalcule,
|
||||
eb.valeurBatimentEstime,
|
||||
eb.valeurBatimentReel,
|
||||
eb.montantMensuelLocation,
|
||||
us.id,
|
||||
us.nom ,
|
||||
eb.montantLocatifAnnuelEstime,
|
||||
eb.valeurBatimentCalcule,
|
||||
eb.nbreUniteLogement
|
||||
)
|
||||
FROM Batiment b
|
||||
JOIN b.parcelle p
|
||||
JOIN p.quartier q
|
||||
LEFT JOIN b.categorieBatiment cb
|
||||
LEFT JOIN EnqueteBatiment eb
|
||||
ON eb.batiment = b
|
||||
AND eb.dateEnquete = (
|
||||
SELECT MAX(eb2.dateEnquete)
|
||||
FROM EnqueteBatiment eb2
|
||||
WHERE eb2.batiment = b
|
||||
)
|
||||
LEFT JOIN eb.personne per
|
||||
LEFT JOIN eb.usage us
|
||||
WHERE q.id = :quartierId
|
||||
""",
|
||||
countQuery = """
|
||||
SELECT COUNT(b)
|
||||
FROM Batiment b
|
||||
join b.parcelle p
|
||||
join p.quartier q
|
||||
WHERE q.id = :quartierId
|
||||
"""
|
||||
)
|
||||
Page<BatimentPaylaodWeb> findAllBatimentsAvecOccupantCourantByQuartierToDtoPageble(
|
||||
@Param("quartierId") Long quartierId,
|
||||
Pageable pageable
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -530,4 +530,81 @@ SELECT new io.gmss.fiscad.paylaods.request.crudweb.DonneesImpositionPaylaodWeb(
|
||||
|
||||
|
||||
|
||||
|
||||
@Query("""
|
||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.DonneesImpositionPaylaodWeb(
|
||||
d.id,
|
||||
d.annee,
|
||||
d.codeDepartement,
|
||||
d.nomDepartement,
|
||||
d.codeCommune,
|
||||
d.nomCommune,
|
||||
d.codeArrondissement,
|
||||
d.nomArrondissement,
|
||||
d.codeQuartierVillage,
|
||||
d.nomQuartierVillage,
|
||||
d.q,
|
||||
d.ilot,
|
||||
d.parcelle,
|
||||
d.nup,
|
||||
d.titreFoncier,
|
||||
d.numBatiment,
|
||||
d.numUniteLogement,
|
||||
d.ifu,
|
||||
d.npi,
|
||||
d.telProp,
|
||||
d.emailProp,
|
||||
d.nomProp,
|
||||
d.prenomProp,
|
||||
d.raisonSociale,
|
||||
d.adresseProp,
|
||||
d.telSc,
|
||||
d.emailSc,
|
||||
d.nomSc,
|
||||
d.prenomSc,
|
||||
d.adresseSc,
|
||||
d.longitude,
|
||||
d.latitude,
|
||||
d.superficieParc,
|
||||
d.superficieAuSolBat,
|
||||
d.superficieAuSolUlog,
|
||||
d.batie,
|
||||
d.exonere,
|
||||
d.batimentExonere,
|
||||
d.uniteLogementExonere,
|
||||
d.valeurLocativeAdm,
|
||||
d.montantLoyerAnnuel,
|
||||
d.tfuMetreCarre,
|
||||
d.tfuMinimum,
|
||||
d.standingBat,
|
||||
d.categorieBat,
|
||||
d.nombrePiscine,
|
||||
d.nombreUlog,
|
||||
d.nombreBat,
|
||||
d.dateEnquete,
|
||||
s.id,
|
||||
z.id,
|
||||
d.valeurAdminParcelleNb,
|
||||
d.natureImpot,
|
||||
s.code,
|
||||
z.nom,
|
||||
d.valeurBatiment,
|
||||
d.valeurParcelle,
|
||||
d.valeurLocativeAdmMetreCarre,
|
||||
d.valeurAdminParcelleNbMetreCarre,
|
||||
d.montantTaxe
|
||||
)
|
||||
FROM DonneesImpositionTfu d
|
||||
JOIN d.impositionsTfu itfu
|
||||
LEFT join d.structure s
|
||||
LEFT join d.zoneRfu z
|
||||
WHERE itfu.exercice.id = :exerciceId
|
||||
and s.id= :structureId
|
||||
order by d.nomProp,d.nomProp asc
|
||||
""")
|
||||
Page<DonneesImpositionPaylaodWeb> findAllByExericeIdStructureIdPageable(
|
||||
Long exerciceId,
|
||||
Long structureId,
|
||||
Pageable pageable
|
||||
);
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
||||
)
|
||||
FROM EnqueteUniteLogement eul
|
||||
LEFT JOIN eul.uniteLogement ul
|
||||
LEFT JOIN Batiment b
|
||||
LEFT JOIN ul.batiment b
|
||||
LEFT JOIN eul.personne p
|
||||
LEFT JOIN eul.user u
|
||||
LEFT JOIN eul.exercice ex
|
||||
|
||||
@@ -348,4 +348,68 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
||||
""")
|
||||
List<UniteLogementPaylaodWeb> findAllUnitesLogementAvecOccupantCourantByParcelleToDto(@Param("parcelleId") Long parcelleId);
|
||||
|
||||
|
||||
@Query(
|
||||
value = """
|
||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.UniteLogementPaylaodWeb(
|
||||
ul.id,
|
||||
ul.nul,
|
||||
ul.numeroEtage,
|
||||
ul.code,
|
||||
|
||||
b.id,
|
||||
eul.superficieAuSol,
|
||||
eul.superficieLouee,
|
||||
b.nub,
|
||||
eul.observation,
|
||||
ul.dateConstruction,
|
||||
|
||||
per.id,
|
||||
per.nom,
|
||||
per.prenom,
|
||||
per.raisonSociale,
|
||||
eul.id,
|
||||
cb.id,
|
||||
cb.code,
|
||||
cb.standing,
|
||||
eul.montantMensuelLocation,
|
||||
eul.montantLocatifAnnuelDeclare,
|
||||
eul.montantLocatifAnnuelCalcule,
|
||||
eul.valeurUniteLogementEstime,
|
||||
eul.valeurUniteLogementReel,
|
||||
eul.nombrePiscine ,
|
||||
us.id,
|
||||
us.nom ,
|
||||
eul.montantLocatifAnnuelEstime ,
|
||||
eul.valeurUniteLogementCalcule
|
||||
)
|
||||
FROM UniteLogement ul
|
||||
JOIN ul.batiment b
|
||||
JOIN b.parcelle p
|
||||
JOIN p.quartier q
|
||||
LEFT JOIN ul.categorieBatiment cb
|
||||
LEFT JOIN EnqueteUniteLogement eul
|
||||
ON eul.uniteLogement = ul
|
||||
AND eul.dateEnquete = (
|
||||
SELECT MAX(eul2.dateEnquete)
|
||||
FROM EnqueteUniteLogement eul2
|
||||
WHERE eul2.uniteLogement = ul
|
||||
)
|
||||
LEFT JOIN eul.personne per
|
||||
LEFT JOIN eul.usage us
|
||||
WHERE q.id = :quartierId
|
||||
""",
|
||||
countQuery = """
|
||||
SELECT COUNT(ul)
|
||||
FROM UniteLogement ul
|
||||
JOIN ul.batiment b
|
||||
JOIN b.parcelle p
|
||||
JOIN p.quartier q
|
||||
WHERE q.id = :quartierId
|
||||
"""
|
||||
)
|
||||
Page<UniteLogementPaylaodWeb> findUnitesLogementAvecOccupantCourantByQuartierToDtoPageable(
|
||||
@Param("quartierId") Long quartierId,
|
||||
Pageable pageable
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user