Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#97) from features/crud_entites into develop
Reviewed-on: #97
This commit was merged in pull request #97.
This commit is contained in:
@@ -5,6 +5,7 @@ import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueBatiment;
|
|||||||
import io.gmss.fiscad.exceptions.*;
|
import io.gmss.fiscad.exceptions.*;
|
||||||
import io.gmss.fiscad.interfaces.rfu.metier.CaracteristiqueBatimentService;
|
import io.gmss.fiscad.interfaces.rfu.metier.CaracteristiqueBatimentService;
|
||||||
import io.gmss.fiscad.paylaods.ApiResponse;
|
import io.gmss.fiscad.paylaods.ApiResponse;
|
||||||
|
import io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueBatimentPayloadWeb;
|
||||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
@@ -21,7 +22,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "api/caracteristique-caracteristiqueBatiment", produces = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(value = "api/caracteristique-batiment", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Caractéristique batiment")
|
@Tag(name = "Caractéristique batiment")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@@ -35,34 +36,25 @@ public class CaracteristiqueBatimentController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
public ResponseEntity<?> createCaracteristiqueBatiment(@RequestBody @Valid @Validated CaracteristiqueBatiment caracteristiqueBatiment) {
|
public ResponseEntity<?> createCaracteristiqueBatiment(@RequestBody @Valid @Validated CaracteristiqueBatimentPayloadWeb caracteristiqueBatimentPayloadWeb) {
|
||||||
try {
|
try {
|
||||||
caracteristiqueBatiment = caracteristiqueBatimentService.createCaracteristiqueBatiment(caracteristiqueBatiment);
|
caracteristiqueBatimentPayloadWeb = caracteristiqueBatimentService.createCaracteristiqueBatiment(caracteristiqueBatimentPayloadWeb);
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
new ApiResponse<>(true, caracteristiqueBatiment, "Caracteristique du batiment créé avec succès."),
|
new ApiResponse<>(true, caracteristiqueBatimentPayloadWeb, "Caracteristique du batiment créé avec succès."),
|
||||||
HttpStatus.OK
|
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) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
logger.error(e.getLocalizedMessage());
|
logger.error(e.getLocalizedMessage());
|
||||||
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
public ResponseEntity<?> updateCaracteristiqueBatiment(@PathVariable Long id, @RequestBody CaracteristiqueBatiment caracteristiqueBatiment) {
|
public ResponseEntity<?> updateCaracteristiqueBatiment(@PathVariable Long id, @RequestBody CaracteristiqueBatimentPayloadWeb caracteristiqueBatimentPayloadWeb) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
new ApiResponse<>(true, caracteristiqueBatimentService.updateCaracteristiqueBatiment(id, caracteristiqueBatiment), "Caracteristique du batiment mise à jour avec succès."),
|
new ApiResponse<>(true, caracteristiqueBatimentService.updateCaracteristiqueBatiment(id, caracteristiqueBatimentPayloadWeb), "Caracteristique du batiment mise à jour avec succès."),
|
||||||
HttpStatus.OK
|
HttpStatus.OK
|
||||||
);
|
);
|
||||||
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
||||||
@@ -156,7 +148,54 @@ public class CaracteristiqueBatimentController {
|
|||||||
public ResponseEntity<?> getCaracteristiqueBatimentById(@PathVariable Long id) {
|
public ResponseEntity<?> getCaracteristiqueBatimentById(@PathVariable Long id) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
new ApiResponse<>(true, caracteristiqueBatimentService.getCaracteristiqueBatimentById(id), "Caracteristique du batiment trouvée avec succès."),
|
new ApiResponse<>(true, caracteristiqueBatimentService.getCaracteristiqueBatimentToDto(id), "Caracteristique du batiment trouvé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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/by-enquete-batiment-id/{batimentId}")
|
||||||
|
public ResponseEntity<?> getCaracteristiqueBatimentByBatimentId(@PathVariable Long enquteBatimentId) {
|
||||||
|
try {
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, caracteristiqueBatimentService.getCaracteristiqueBatimentListByEnqueteBatiment(enquteBatimentId), "Caracteristique du batiment trouvé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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page/by-enquete-batiment-id/{batimentId}")
|
||||||
|
public ResponseEntity<?> getCaracteristiqueBatimentByEnqueteBatimentIdPaged(@PathVariable Long enquteBatimentId,@RequestParam int pageNo, @RequestParam int pageSize) {
|
||||||
|
try {
|
||||||
|
Pageable pageable = PageRequest.of(pageNo, pageSize);
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, caracteristiqueBatimentService.getCaracteristiqueBatimentListByEnqueteBatimentPageable(enquteBatimentId,pageable), "Caracteristique du batiment trouvée avec succès."),
|
||||||
HttpStatus.OK
|
HttpStatus.OK
|
||||||
);
|
);
|
||||||
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueUniteLogement;
|
|||||||
import io.gmss.fiscad.exceptions.*;
|
import io.gmss.fiscad.exceptions.*;
|
||||||
import io.gmss.fiscad.interfaces.rfu.metier.CaracteristiqueUniteLogementService;
|
import io.gmss.fiscad.interfaces.rfu.metier.CaracteristiqueUniteLogementService;
|
||||||
import io.gmss.fiscad.paylaods.ApiResponse;
|
import io.gmss.fiscad.paylaods.ApiResponse;
|
||||||
|
import io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueUniteLogementPayloadWeb;
|
||||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
@@ -35,11 +36,11 @@ public class CaracteristiqueUniteLogementController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
public ResponseEntity<?> createCaracteristiqueUniteLogement(@RequestBody @Valid @Validated CaracteristiqueUniteLogement caracteristiqueUniteLogement) {
|
public ResponseEntity<?> createCaracteristiqueUniteLogement(@RequestBody @Valid @Validated CaracteristiqueUniteLogementPayloadWeb caracteristiqueUniteLogementPayloadWeb) {
|
||||||
try {
|
try {
|
||||||
caracteristiqueUniteLogement = caracteristiqueUniteLogementService.createCaracteristiqueUniteLogement(caracteristiqueUniteLogement);
|
caracteristiqueUniteLogementPayloadWeb = caracteristiqueUniteLogementService.createCaracteristiqueUniteLogement(caracteristiqueUniteLogementPayloadWeb);
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
new ApiResponse<>(true, caracteristiqueUniteLogement, "Caracteristique Unite Logement créé avec succès."),
|
new ApiResponse<>(true, caracteristiqueUniteLogementPayloadWeb, "Caracteristique Unite Logement créé avec succès."),
|
||||||
HttpStatus.OK
|
HttpStatus.OK
|
||||||
);
|
);
|
||||||
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
||||||
@@ -59,10 +60,10 @@ public class CaracteristiqueUniteLogementController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
public ResponseEntity<?> updateCaracteristiqueUniteLogement(@PathVariable Long id, @RequestBody CaracteristiqueUniteLogement caracteristiqueUniteLogement) {
|
public ResponseEntity<?> updateCaracteristiqueUniteLogement(@PathVariable Long id, @RequestBody CaracteristiqueUniteLogementPayloadWeb caracteristiqueUniteLogementPayloadWeb) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
new ApiResponse<>(true, caracteristiqueUniteLogementService.updateCaracteristiqueUniteLogement(id, caracteristiqueUniteLogement), "Caracteristique Unite Logement mise à jour avec succès."),
|
new ApiResponse<>(true, caracteristiqueUniteLogementService.updateCaracteristiqueUniteLogement(id, caracteristiqueUniteLogementPayloadWeb), "Caracteristique Unite Logement mise à jour avec succès."),
|
||||||
HttpStatus.OK
|
HttpStatus.OK
|
||||||
);
|
);
|
||||||
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
||||||
@@ -174,4 +175,51 @@ public class CaracteristiqueUniteLogementController {
|
|||||||
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/by-enquete-ulo-id/{enqueteUloId}")
|
||||||
|
public ResponseEntity<?> getAllCaracteristiqueUniteLogementListByEul(@PathVariable Long enqueteUloId) {
|
||||||
|
try {
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, caracteristiqueUniteLogementService.getCaracteristiqueUniteLogementListbyEul(enqueteUloId), "Liste des Caracteristiques Unite Logement 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page//by-enquete-ulo-id/{enqueteUloId}")
|
||||||
|
public ResponseEntity<?> getAllCaracteristiqueUniteLogementByEulPaged(@PathVariable Long enqueteUloId,@RequestParam int pageNo, @RequestParam int pageSize) {
|
||||||
|
try {
|
||||||
|
Pageable pageable = PageRequest.of(pageNo, pageSize);
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, caracteristiqueUniteLogementService.getCaracteristiqueUniteLogementListByEul(enqueteUloId,pageable), "Liste des Caracteristiques Unite Logement 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ public class Enquete extends BaseEntity implements Serializable {
|
|||||||
private Long montantAnnuelleLocation;
|
private Long montantAnnuelleLocation;
|
||||||
private Long valeurParcelleEstime;
|
private Long valeurParcelleEstime;
|
||||||
private Long valeurParcelleReel;
|
private Long valeurParcelleReel;
|
||||||
|
private String ncProprietaire;
|
||||||
|
|
||||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
|
|||||||
@@ -101,6 +101,11 @@ public class EnqueteServiceImpl implements EnqueteService {
|
|||||||
throw new BadRequestException("Echec de l'enregistrement : Propriétaire inexistant");
|
throw new BadRequestException("Echec de l'enregistrement : Propriétaire inexistant");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Optional<Parcelle> optionalParcelle = parcelleRepository.findById(enquetePayLoadWeb.getParcelleId());
|
||||||
|
if (!optionalParcelle.isPresent()) {
|
||||||
|
throw new BadRequestException("Echec de l'enregistrement : Parcelle inexistante");
|
||||||
|
}
|
||||||
|
|
||||||
Optional<ZoneRfu> optionalZoneRfu = zoneRfuRepository.findById(enquetePayLoadWeb.getZoneRfuId());
|
Optional<ZoneRfu> optionalZoneRfu = zoneRfuRepository.findById(enquetePayLoadWeb.getZoneRfuId());
|
||||||
if (!optionalZoneRfu.isPresent()) {
|
if (!optionalZoneRfu.isPresent()) {
|
||||||
throw new BadRequestException("Echec de l'enregistrement : zone inexistante");
|
throw new BadRequestException("Echec de l'enregistrement : zone inexistante");
|
||||||
|
|||||||
@@ -1,43 +1,56 @@
|
|||||||
package io.gmss.fiscad.implementations.rfu.metier;
|
package io.gmss.fiscad.implementations.rfu.metier;
|
||||||
|
|
||||||
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueBatiment;
|
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueBatiment;
|
||||||
|
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueParcelle;
|
||||||
import io.gmss.fiscad.exceptions.BadRequestException;
|
import io.gmss.fiscad.exceptions.BadRequestException;
|
||||||
import io.gmss.fiscad.exceptions.NotFoundException;
|
import io.gmss.fiscad.exceptions.NotFoundException;
|
||||||
import io.gmss.fiscad.interfaces.rfu.metier.CaracteristiqueBatimentService;
|
import io.gmss.fiscad.interfaces.rfu.metier.CaracteristiqueBatimentService;
|
||||||
|
import io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueBatimentPayloadWeb;
|
||||||
import io.gmss.fiscad.persistence.repositories.rfu.metier.CaracteristiqueBatimentRepository;
|
import io.gmss.fiscad.persistence.repositories.rfu.metier.CaracteristiqueBatimentRepository;
|
||||||
|
import io.gmss.fiscad.persistence.repositories.rfu.metier.EnqueteBatimentRepository;
|
||||||
|
import io.gmss.fiscad.service.EntityFromPayLoadService;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
@AllArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
public class CaracteristiqueBatimentServiceImpl implements CaracteristiqueBatimentService {
|
public class CaracteristiqueBatimentServiceImpl implements CaracteristiqueBatimentService {
|
||||||
|
|
||||||
private final CaracteristiqueBatimentRepository caracteristiqueBatimentRepository;
|
private final CaracteristiqueBatimentRepository caracteristiqueBatimentRepository;
|
||||||
|
private final EntityFromPayLoadService entityFromPayLoadService;
|
||||||
|
private final EnqueteBatimentRepository enqueteBatimentRepository;
|
||||||
|
|
||||||
public CaracteristiqueBatimentServiceImpl(CaracteristiqueBatimentRepository caracteristiqueBatimentRepository) {
|
|
||||||
this.caracteristiqueBatimentRepository = caracteristiqueBatimentRepository;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CaracteristiqueBatiment createCaracteristiqueBatiment(CaracteristiqueBatiment caracteristiqueBatiment) throws BadRequestException {
|
public CaracteristiqueBatimentPayloadWeb createCaracteristiqueBatiment(CaracteristiqueBatimentPayloadWeb caracteristiqueBatimentPayloadWeb) throws BadRequestException {
|
||||||
if (caracteristiqueBatiment.getId() != null) {
|
if (caracteristiqueBatimentPayloadWeb.getId() != null) {
|
||||||
throw new BadRequestException("Impossible de créer une nouvelle caracteristique de batiment ayant un id non null.");
|
throw new BadRequestException("Impossible de créer une nouvelle caracteristique de batiment ayant un id non null.");
|
||||||
}
|
}
|
||||||
return caracteristiqueBatimentRepository.save(caracteristiqueBatiment);
|
if (!enqueteBatimentRepository.existsById(caracteristiqueBatimentPayloadWeb.getEnqueteBatimentId())) {
|
||||||
|
throw new BadRequestException("Veuillez préciser l'enquete");
|
||||||
|
}
|
||||||
|
|
||||||
|
CaracteristiqueBatiment caracteristiqueBatiment= entityFromPayLoadService.getCaracteristiqueBatimentFromPayLoadWeb(caracteristiqueBatimentPayloadWeb);
|
||||||
|
caracteristiqueBatiment =caracteristiqueBatimentRepository.save(caracteristiqueBatiment);
|
||||||
|
return caracteristiqueBatimentRepository.findCaracteristiqueBatimentToDto(caracteristiqueBatiment.getId()).orElse(null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CaracteristiqueBatiment updateCaracteristiqueBatiment(Long id, CaracteristiqueBatiment caracteristiqueBatiment) throws NotFoundException {
|
public CaracteristiqueBatimentPayloadWeb updateCaracteristiqueBatiment(Long id, CaracteristiqueBatimentPayloadWeb caracteristiqueBatimentPayloadWeb) throws NotFoundException {
|
||||||
if (caracteristiqueBatiment.getId() == null) {
|
if (caracteristiqueBatimentPayloadWeb.getId() == null) {
|
||||||
throw new BadRequestException("Impossible de mettre à jour une nouvelle caracteristique de batiment ayant un id null.");
|
throw new BadRequestException("Impossible de mettre à jour une nouvelle caracteristique de batiment ayant un id null.");
|
||||||
}
|
}
|
||||||
if (!caracteristiqueBatimentRepository.existsById(caracteristiqueBatiment.getId())) {
|
if (!caracteristiqueBatimentRepository.existsById(caracteristiqueBatimentPayloadWeb.getId())) {
|
||||||
throw new NotFoundException("Impossible de trouver la nouvelle caracteristique de batiment spécifié dans notre base de données.");
|
throw new NotFoundException("Impossible de trouver la nouvelle caracteristique de batiment spécifié dans notre base de données.");
|
||||||
}
|
}
|
||||||
return caracteristiqueBatimentRepository.save(caracteristiqueBatiment);
|
CaracteristiqueBatiment caracteristiqueBatiment= entityFromPayLoadService.getCaracteristiqueBatimentFromPayLoadWeb(caracteristiqueBatimentPayloadWeb);
|
||||||
|
caracteristiqueBatiment =caracteristiqueBatimentRepository.save(caracteristiqueBatiment);
|
||||||
|
return caracteristiqueBatimentRepository.findCaracteristiqueBatimentToDto(caracteristiqueBatiment.getId()).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -51,23 +64,34 @@ public class CaracteristiqueBatimentServiceImpl implements CaracteristiqueBatime
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<CaracteristiqueBatiment> getCaracteristiqueBatimentList(Pageable pageable) {
|
public Page<CaracteristiqueBatimentPayloadWeb> getCaracteristiqueBatimentList(Pageable pageable) {
|
||||||
return caracteristiqueBatimentRepository.findAll(pageable);
|
return caracteristiqueBatimentRepository.findAllCaracteristiqueBatimentToDtoPageable(pageable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CaracteristiqueBatiment> getCaracteristiqueBatimentList() {
|
public List<CaracteristiqueBatimentPayloadWeb> getCaracteristiqueBatimentList() {
|
||||||
return caracteristiqueBatimentRepository.findAll();
|
return caracteristiqueBatimentRepository.findAllCaracteristiqueBatimentToDto();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<CaracteristiqueBatiment> getCaracteristiqueBatimentById(Long id) {
|
public Optional<CaracteristiqueBatimentPayloadWeb> getCaracteristiqueBatimentToDto(Long id) {
|
||||||
if (caracteristiqueBatimentRepository.existsById(id)) {
|
if (caracteristiqueBatimentRepository.existsById(id)) {
|
||||||
return caracteristiqueBatimentRepository.findById(id);
|
return caracteristiqueBatimentRepository.findCaracteristiqueBatimentToDto(id);
|
||||||
} else {
|
} else {
|
||||||
throw new NotFoundException("Impossible de trouver la caractéristique spécifiée dans la base de données.");
|
throw new NotFoundException("Impossible de trouver la caractéristique spécifiée dans la base de données.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<CaracteristiqueBatimentPayloadWeb> getCaracteristiqueBatimentListByEnqueteBatimentPageable(Long enqueteBatimentId, Pageable pageable) {
|
||||||
|
return caracteristiqueBatimentRepository.findAllCaracteristiqueBatimentByEnqueteBatimentToDtoPageable(enqueteBatimentId,pageable);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CaracteristiqueBatimentPayloadWeb> getCaracteristiqueBatimentListByEnqueteBatiment(Long enqueteBatimentId) {
|
||||||
|
return caracteristiqueBatimentRepository.findAllCaracteristiqueBatimentByEnqueteBatimentToDto(enqueteBatimentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,43 +1,56 @@
|
|||||||
package io.gmss.fiscad.implementations.rfu.metier;
|
package io.gmss.fiscad.implementations.rfu.metier;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueBatiment;
|
||||||
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueUniteLogement;
|
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueUniteLogement;
|
||||||
import io.gmss.fiscad.exceptions.BadRequestException;
|
import io.gmss.fiscad.exceptions.BadRequestException;
|
||||||
import io.gmss.fiscad.exceptions.NotFoundException;
|
import io.gmss.fiscad.exceptions.NotFoundException;
|
||||||
import io.gmss.fiscad.interfaces.rfu.metier.CaracteristiqueUniteLogementService;
|
import io.gmss.fiscad.interfaces.rfu.metier.CaracteristiqueUniteLogementService;
|
||||||
|
import io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueUniteLogementPayloadWeb;
|
||||||
import io.gmss.fiscad.persistence.repositories.rfu.metier.CaracteristiqueUniteLogementRepository;
|
import io.gmss.fiscad.persistence.repositories.rfu.metier.CaracteristiqueUniteLogementRepository;
|
||||||
|
import io.gmss.fiscad.persistence.repositories.rfu.metier.EnqueteUniteLogementRepository;
|
||||||
|
import io.gmss.fiscad.service.EntityFromPayLoadService;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
@AllArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
public class CaracteristiqueUniteLogementServiceImpl implements CaracteristiqueUniteLogementService {
|
public class CaracteristiqueUniteLogementServiceImpl implements CaracteristiqueUniteLogementService {
|
||||||
|
|
||||||
private final CaracteristiqueUniteLogementRepository caracteristiqueUniteLogementRepository;
|
private final CaracteristiqueUniteLogementRepository caracteristiqueUniteLogementRepository;
|
||||||
|
private final EntityFromPayLoadService entityFromPayLoadService;
|
||||||
|
private final EnqueteUniteLogementRepository enqueteUniteLogementRepository;
|
||||||
|
|
||||||
|
|
||||||
public CaracteristiqueUniteLogementServiceImpl(CaracteristiqueUniteLogementRepository caracteristiqueUniteLogementRepository) {
|
|
||||||
this.caracteristiqueUniteLogementRepository = caracteristiqueUniteLogementRepository;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CaracteristiqueUniteLogement createCaracteristiqueUniteLogement(CaracteristiqueUniteLogement caracteristiqueUniteLogement) throws BadRequestException {
|
public CaracteristiqueUniteLogementPayloadWeb createCaracteristiqueUniteLogement(CaracteristiqueUniteLogementPayloadWeb caracteristiqueUniteLogementPayloadWeb) throws BadRequestException {
|
||||||
if (caracteristiqueUniteLogement.getId() != null) {
|
if (caracteristiqueUniteLogementPayloadWeb.getId() != null) {
|
||||||
throw new BadRequestException("Impossible de créer une nouvelle caracteristique d'unité de logement ayant un id non null.");
|
throw new BadRequestException("Impossible de créer une nouvelle caracteristique d'unité de logement ayant un id non null.");
|
||||||
}
|
}
|
||||||
return caracteristiqueUniteLogementRepository.save(caracteristiqueUniteLogement);
|
if (!enqueteUniteLogementRepository.existsById(caracteristiqueUniteLogementPayloadWeb.getEnqueteUniteLogementId())) {
|
||||||
|
throw new BadRequestException("Veuillez préciser l'enquete.");
|
||||||
|
}
|
||||||
|
|
||||||
|
CaracteristiqueUniteLogement caracteristiqueUniteLogement= entityFromPayLoadService.getCaracteristiqueUniteLogementFromPayLoadWeb(caracteristiqueUniteLogementPayloadWeb);
|
||||||
|
caracteristiqueUniteLogement =caracteristiqueUniteLogementRepository.save(caracteristiqueUniteLogement);
|
||||||
|
return caracteristiqueUniteLogementRepository.findCaracteristiqueUniteLogementToDto(caracteristiqueUniteLogement.getId()).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CaracteristiqueUniteLogement updateCaracteristiqueUniteLogement(Long id, CaracteristiqueUniteLogement caracteristiqueUniteLogement) throws NotFoundException {
|
public CaracteristiqueUniteLogementPayloadWeb updateCaracteristiqueUniteLogement(Long id, CaracteristiqueUniteLogementPayloadWeb caracteristiqueUniteLogementPayloadWeb) throws NotFoundException {
|
||||||
if (caracteristiqueUniteLogement.getId() == null) {
|
if (caracteristiqueUniteLogementPayloadWeb.getId() == null) {
|
||||||
throw new BadRequestException("Impossible de mettre à jour une nouvelle caracteristique d'unité de logement ayant un id null.");
|
throw new BadRequestException("Impossible de mettre à jour une nouvelle caracteristique d'unité de logement ayant un id null.");
|
||||||
}
|
}
|
||||||
if (!caracteristiqueUniteLogementRepository.existsById(caracteristiqueUniteLogement.getId())) {
|
if (!caracteristiqueUniteLogementRepository.existsById(caracteristiqueUniteLogementPayloadWeb.getId())) {
|
||||||
throw new NotFoundException("Impossible de trouver la nouvelle caracteristique d'unité de logement spécifiée dans notre base de données.");
|
throw new NotFoundException("Impossible de trouver la nouvelle caracteristique d'unité de logement spécifiée dans notre base de données.");
|
||||||
}
|
}
|
||||||
return caracteristiqueUniteLogementRepository.save(caracteristiqueUniteLogement);
|
CaracteristiqueUniteLogement caracteristiqueUniteLogement= entityFromPayLoadService.getCaracteristiqueUniteLogementFromPayLoadWeb(caracteristiqueUniteLogementPayloadWeb);
|
||||||
|
caracteristiqueUniteLogement =caracteristiqueUniteLogementRepository.save(caracteristiqueUniteLogement);
|
||||||
|
return caracteristiqueUniteLogementRepository.findCaracteristiqueUniteLogementToDto(caracteristiqueUniteLogement.getId()).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -51,23 +64,33 @@ public class CaracteristiqueUniteLogementServiceImpl implements CaracteristiqueU
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<CaracteristiqueUniteLogement> getCaracteristiqueUniteLogementList(Pageable pageable) {
|
public Page<CaracteristiqueUniteLogementPayloadWeb> getCaracteristiqueUniteLogementList(Pageable pageable) {
|
||||||
return caracteristiqueUniteLogementRepository.findAll(pageable);
|
return caracteristiqueUniteLogementRepository.findAllCaracteristiqueUniteLogementToDtoPageable(pageable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CaracteristiqueUniteLogement> getCaracteristiqueUniteLogementList() {
|
public List<CaracteristiqueUniteLogementPayloadWeb> getCaracteristiqueUniteLogementList() {
|
||||||
return caracteristiqueUniteLogementRepository.findAll();
|
return caracteristiqueUniteLogementRepository.findAllCaracteristiqueUniteLogementToDto();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<CaracteristiqueUniteLogement> getCaracteristiqueUniteLogementById(Long id) {
|
public Optional<CaracteristiqueUniteLogementPayloadWeb> getCaracteristiqueUniteLogementById(Long id) {
|
||||||
if (caracteristiqueUniteLogementRepository.existsById(id)) {
|
if (caracteristiqueUniteLogementRepository.existsById(id)) {
|
||||||
return caracteristiqueUniteLogementRepository.findById(id);
|
return caracteristiqueUniteLogementRepository.findCaracteristiqueUniteLogementToDto(id);
|
||||||
} else {
|
} else {
|
||||||
throw new NotFoundException("Impossible de trouver la caracteristique d'unité de logement spécifiée dans la base de données.");
|
throw new NotFoundException("Impossible de trouver la caracteristique d'unité de logement spécifiée dans la base de données.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<CaracteristiqueUniteLogementPayloadWeb> getCaracteristiqueUniteLogementListByEul(Long eul, Pageable pageable) {
|
||||||
|
return caracteristiqueUniteLogementRepository.findAllCaracteristiqueUniteLogementByEnqueteUloToDtoPageable(eul,pageable);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CaracteristiqueUniteLogementPayloadWeb> getCaracteristiqueUniteLogementListbyEul(Long eul) {
|
||||||
|
return caracteristiqueUniteLogementRepository.findAllCaracteristiqueUniteLogementByEnqueteUloToDto(eul);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package io.gmss.fiscad.interfaces.rfu.metier;
|
|||||||
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueBatiment;
|
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueBatiment;
|
||||||
import io.gmss.fiscad.exceptions.BadRequestException;
|
import io.gmss.fiscad.exceptions.BadRequestException;
|
||||||
import io.gmss.fiscad.exceptions.NotFoundException;
|
import io.gmss.fiscad.exceptions.NotFoundException;
|
||||||
|
import io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueBatimentPayloadWeb;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
@@ -11,15 +12,19 @@ import java.util.Optional;
|
|||||||
|
|
||||||
public interface CaracteristiqueBatimentService {
|
public interface CaracteristiqueBatimentService {
|
||||||
|
|
||||||
CaracteristiqueBatiment createCaracteristiqueBatiment(CaracteristiqueBatiment caracteristiqueBatiment) throws BadRequestException;
|
CaracteristiqueBatimentPayloadWeb createCaracteristiqueBatiment(CaracteristiqueBatimentPayloadWeb caracteristiqueBatimentPayloadWeb) throws BadRequestException;
|
||||||
|
|
||||||
CaracteristiqueBatiment updateCaracteristiqueBatiment(Long id, CaracteristiqueBatiment caracteristiqueBatiment) throws NotFoundException;
|
CaracteristiqueBatimentPayloadWeb updateCaracteristiqueBatiment(Long id, CaracteristiqueBatimentPayloadWeb caracteristiqueBatimentPayloadWeb) throws NotFoundException;
|
||||||
|
|
||||||
void deleteCaracteristiqueBatiment(Long id) throws NotFoundException;
|
void deleteCaracteristiqueBatiment(Long id) throws NotFoundException;
|
||||||
|
|
||||||
Page<CaracteristiqueBatiment> getCaracteristiqueBatimentList(Pageable pageable);
|
Page<CaracteristiqueBatimentPayloadWeb> getCaracteristiqueBatimentList(Pageable pageable);
|
||||||
|
|
||||||
List<CaracteristiqueBatiment> getCaracteristiqueBatimentList();
|
List<CaracteristiqueBatimentPayloadWeb> getCaracteristiqueBatimentList();
|
||||||
|
|
||||||
Optional<CaracteristiqueBatiment> getCaracteristiqueBatimentById(Long id);
|
Optional<CaracteristiqueBatimentPayloadWeb> getCaracteristiqueBatimentToDto(Long id);
|
||||||
|
|
||||||
|
Page<CaracteristiqueBatimentPayloadWeb> getCaracteristiqueBatimentListByEnqueteBatimentPageable(Long enqueteBatimentId, Pageable pageable);
|
||||||
|
|
||||||
|
List<CaracteristiqueBatimentPayloadWeb> getCaracteristiqueBatimentListByEnqueteBatiment(Long enqueteBatimentId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package io.gmss.fiscad.interfaces.rfu.metier;
|
|||||||
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueUniteLogement;
|
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueUniteLogement;
|
||||||
import io.gmss.fiscad.exceptions.BadRequestException;
|
import io.gmss.fiscad.exceptions.BadRequestException;
|
||||||
import io.gmss.fiscad.exceptions.NotFoundException;
|
import io.gmss.fiscad.exceptions.NotFoundException;
|
||||||
|
import io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueUniteLogementPayloadWeb;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
@@ -11,15 +12,18 @@ import java.util.Optional;
|
|||||||
|
|
||||||
public interface CaracteristiqueUniteLogementService {
|
public interface CaracteristiqueUniteLogementService {
|
||||||
|
|
||||||
CaracteristiqueUniteLogement createCaracteristiqueUniteLogement(CaracteristiqueUniteLogement caracteristiqueUniteLogement) throws BadRequestException;
|
CaracteristiqueUniteLogementPayloadWeb createCaracteristiqueUniteLogement(CaracteristiqueUniteLogementPayloadWeb caracteristiqueUniteLogementPayloadWeb) throws BadRequestException;
|
||||||
|
|
||||||
CaracteristiqueUniteLogement updateCaracteristiqueUniteLogement(Long id, CaracteristiqueUniteLogement caracteristiqueUniteLogement) throws NotFoundException;
|
CaracteristiqueUniteLogementPayloadWeb updateCaracteristiqueUniteLogement(Long id, CaracteristiqueUniteLogementPayloadWeb caracteristiqueUniteLogementPayloadWeb) throws NotFoundException;
|
||||||
|
|
||||||
void deleteCaracteristiqueUniteLogement(Long id) throws NotFoundException;
|
void deleteCaracteristiqueUniteLogement(Long id) throws NotFoundException;
|
||||||
|
|
||||||
Page<CaracteristiqueUniteLogement> getCaracteristiqueUniteLogementList(Pageable pageable);
|
Page<CaracteristiqueUniteLogementPayloadWeb> getCaracteristiqueUniteLogementList(Pageable pageable);
|
||||||
|
|
||||||
List<CaracteristiqueUniteLogement> getCaracteristiqueUniteLogementList();
|
List<CaracteristiqueUniteLogementPayloadWeb> getCaracteristiqueUniteLogementList();
|
||||||
|
|
||||||
Optional<CaracteristiqueUniteLogement> getCaracteristiqueUniteLogementById(Long id);
|
Optional<CaracteristiqueUniteLogementPayloadWeb> getCaracteristiqueUniteLogementById(Long id);
|
||||||
|
Page<CaracteristiqueUniteLogementPayloadWeb> getCaracteristiqueUniteLogementListByEul(Long id,Pageable pageable);
|
||||||
|
|
||||||
|
List<CaracteristiqueUniteLogementPayloadWeb> getCaracteristiqueUniteLogementListbyEul(Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package io.gmss.fiscad.paylaods.request.crudweb;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueBatiment;
|
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueBatiment;
|
||||||
|
import io.gmss.fiscad.entities.rfu.parametre.Exercice;
|
||||||
import io.gmss.fiscad.enums.StatutEnquete;
|
import io.gmss.fiscad.enums.StatutEnquete;
|
||||||
import jakarta.persistence.EnumType;
|
import jakarta.persistence.EnumType;
|
||||||
import jakarta.persistence.Enumerated;
|
import jakarta.persistence.Enumerated;
|
||||||
@@ -52,9 +53,13 @@ public class EnqueteBatimentPayloadWeb {
|
|||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private StatutEnquete statutEnquete;
|
private StatutEnquete statutEnquete;
|
||||||
|
private Long exerciceId;
|
||||||
|
private Integer exerciceAnnee;
|
||||||
|
|
||||||
public EnqueteBatimentPayloadWeb(Long id, String observation, String autreMenuisierie, String autreMur, boolean sbee, String numCompteurSbee, boolean soneb, String numCompteurSoneb, int nbreLotUnite, int nbreUniteLocation, Float superficieLouee, Float superficieAuSol, LocalDate dateEnquete, int nbreMenage, int nbreHabitant, Long montantMensuelLocation, Long montantLocatifAnnuelDeclare, Long nbreEtage, Long valeurBatimentEstime, Long valeurBatimentReel, int nbreMoisLocation, String autreCaracteristiquePhysique, LocalDate dateDebutExcemption, LocalDate dateFinExcemption, Long batimentId, String batimentNub, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, Long enqueteurId, String enqueteurNom, String enqueteurPrenom,
|
public EnqueteBatimentPayloadWeb(Long id, String observation, String autreMenuisierie, String autreMur, boolean sbee, String numCompteurSbee, boolean soneb, String numCompteurSoneb, int nbreLotUnite, int nbreUniteLocation, Float superficieLouee, Float superficieAuSol, LocalDate dateEnquete, int nbreMenage, int nbreHabitant, Long montantMensuelLocation, Long montantLocatifAnnuelDeclare, Long nbreEtage, Long valeurBatimentEstime, Long valeurBatimentReel, int nbreMoisLocation, String autreCaracteristiquePhysique, LocalDate dateDebutExcemption, LocalDate dateFinExcemption, Long batimentId, String batimentNub, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, Long enqueteurId, String enqueteurNom, String enqueteurPrenom,
|
||||||
StatutEnquete statutEnquete) {
|
StatutEnquete statutEnquete,
|
||||||
|
Long exerciceId,
|
||||||
|
Integer exerciceAnnee) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.observation = observation;
|
this.observation = observation;
|
||||||
this.autreMenuisierie = autreMenuisierie;
|
this.autreMenuisierie = autreMenuisierie;
|
||||||
@@ -89,5 +94,7 @@ public class EnqueteBatimentPayloadWeb {
|
|||||||
this.enqueteurNom = enqueteurNom;
|
this.enqueteurNom = enqueteurNom;
|
||||||
this.enqueteurPrenom = enqueteurPrenom;
|
this.enqueteurPrenom = enqueteurPrenom;
|
||||||
this.statutEnquete = statutEnquete;
|
this.statutEnquete = statutEnquete;
|
||||||
|
this.exerciceId = exerciceId;
|
||||||
|
this.exerciceAnnee = exerciceAnnee;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,74 @@ public interface CaracteristiqueBatimentRepository extends JpaRepository<Caracte
|
|||||||
""")
|
""")
|
||||||
Optional<CaracteristiqueBatimentPayloadWeb> findCaracteristiqueBatimentToDto(@Param("caracteristiqueBatimentId") Long caracteristiqueBatimentId);
|
Optional<CaracteristiqueBatimentPayloadWeb> findCaracteristiqueBatimentToDto(@Param("caracteristiqueBatimentId") Long caracteristiqueBatimentId);
|
||||||
|
|
||||||
|
// @Query("""
|
||||||
|
// SELECT new io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueBatimentPayloadWeb(
|
||||||
|
// cb.id,
|
||||||
|
// eb.id,
|
||||||
|
// eb.dateEnquete,
|
||||||
|
// ex.annee,
|
||||||
|
// ca.id,
|
||||||
|
// ca.code,
|
||||||
|
// ca.libelle,
|
||||||
|
// cb.valeur,
|
||||||
|
// cb.observation
|
||||||
|
// )
|
||||||
|
// FROM CaracteristiqueBatiment cb
|
||||||
|
// JOIN cb.caracteristique ca
|
||||||
|
// JOIN cb.enqueteBatiment eb
|
||||||
|
// JOIN eb.exercice ex
|
||||||
|
// WHERE cb.id = :caracteristiqueBatimentId
|
||||||
|
// """)
|
||||||
|
// Optional<CaracteristiqueBatimentPayloadWeb> findCaracteristiqueBatimentToDto(@Param("caracteristiqueBatimentId") Long caracteristiqueBatimentId);
|
||||||
|
|
||||||
|
@Query("""
|
||||||
|
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueBatimentPayloadWeb(
|
||||||
|
cb.id,
|
||||||
|
eb.id,
|
||||||
|
eb.dateEnquete,
|
||||||
|
ex.annee,
|
||||||
|
ca.id,
|
||||||
|
ca.code,
|
||||||
|
ca.libelle,
|
||||||
|
cb.valeur,
|
||||||
|
cb.observation
|
||||||
|
)
|
||||||
|
FROM CaracteristiqueBatiment cb
|
||||||
|
JOIN cb.caracteristique ca
|
||||||
|
JOIN cb.enqueteBatiment eb
|
||||||
|
JOIN eb.exercice ex
|
||||||
|
""")
|
||||||
|
List<CaracteristiqueBatimentPayloadWeb> findAllCaracteristiqueBatimentToDto();
|
||||||
|
|
||||||
|
@Query(value = """
|
||||||
|
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueBatimentPayloadWeb(
|
||||||
|
cb.id,
|
||||||
|
eb.id,
|
||||||
|
eb.dateEnquete,
|
||||||
|
ex.annee,
|
||||||
|
ca.id,
|
||||||
|
ca.code,
|
||||||
|
ca.libelle,
|
||||||
|
cb.valeur,
|
||||||
|
cb.observation
|
||||||
|
)
|
||||||
|
FROM CaracteristiqueBatiment cb
|
||||||
|
JOIN cb.caracteristique ca
|
||||||
|
JOIN cb.enqueteBatiment eb
|
||||||
|
JOIN eb.exercice ex
|
||||||
|
WHERE eb.id = :enqueteBatimentId
|
||||||
|
""",
|
||||||
|
countQuery = """
|
||||||
|
SELECT COUNT(distinct cb)
|
||||||
|
FROM CaracteristiqueBatiment cb
|
||||||
|
JOIN cb.caracteristique ca
|
||||||
|
JOIN cb.enqueteBatiment eb
|
||||||
|
JOIN eb.exercice ex
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
Page<CaracteristiqueBatimentPayloadWeb> findAllCaracteristiqueBatimentToDtoPageable(Pageable pageable);
|
||||||
|
|
||||||
|
|
||||||
@Query("""
|
@Query("""
|
||||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueBatimentPayloadWeb(
|
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueBatimentPayloadWeb(
|
||||||
cb.id,
|
cb.id,
|
||||||
|
|||||||
@@ -56,12 +56,12 @@ public interface CaracteristiqueUniteLogementRepository extends JpaRepository<Ca
|
|||||||
cul.observation
|
cul.observation
|
||||||
)
|
)
|
||||||
FROM CaracteristiqueUniteLogement cul
|
FROM CaracteristiqueUniteLogement cul
|
||||||
JOIN cul.caracteristique ca
|
LEFT JOIN cul.caracteristique ca
|
||||||
JOIN cul.enqueteUniteLogement eul
|
LEFT JOIN cul.enqueteUniteLogement eul
|
||||||
JOIN eul.exercice ex
|
LEFT JOIN eul.exercice ex
|
||||||
WHERE cul.id = :caracteristiqueUniteLogementId
|
WHERE cul.id = :caracteristiqueUniteLogementId
|
||||||
""")
|
""")
|
||||||
Optional<CaracteristiqueUniteLogementPayloadWeb> findCaracteristiqueUniteLogementToDto(@Param("caracteristiqueBatimentId") Long caracteristiqueBatimentId);
|
Optional<CaracteristiqueUniteLogementPayloadWeb> findCaracteristiqueUniteLogementToDto(@Param("caracteristiqueUniteLogementId") Long caracteristiqueUniteLogementId);
|
||||||
|
|
||||||
@Query("""
|
@Query("""
|
||||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueUniteLogementPayloadWeb(
|
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueUniteLogementPayloadWeb(
|
||||||
@@ -76,12 +76,31 @@ public interface CaracteristiqueUniteLogementRepository extends JpaRepository<Ca
|
|||||||
cul.observation
|
cul.observation
|
||||||
)
|
)
|
||||||
FROM CaracteristiqueUniteLogement cul
|
FROM CaracteristiqueUniteLogement cul
|
||||||
JOIN cul.caracteristique ca
|
LEFT JOIN cul.caracteristique ca
|
||||||
JOIN cul.enqueteUniteLogement eul
|
LEFT JOIN cul.enqueteUniteLogement eul
|
||||||
JOIN eul.exercice ex
|
LEFT JOIN eul.exercice ex
|
||||||
WHERE cul.id = :enqueteUniteLogementId
|
WHERE cul.id = :enqueteUniteLogementId
|
||||||
""")
|
""")
|
||||||
List<CaracteristiqueUniteLogementPayloadWeb> findAllCaracteristiqueUniteLogementByEnqueteUniteLogementToDto(@Param("enqueteUniteLogementId") Long enqueteUniteLogementId);
|
List<CaracteristiqueUniteLogementPayloadWeb> findAllCaracteristiqueUniteLogementByEnqueteUloToDto(@Param("enqueteUniteLogementId") Long enqueteUniteLogementId);
|
||||||
|
|
||||||
|
@Query("""
|
||||||
|
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueUniteLogementPayloadWeb(
|
||||||
|
cul.id,
|
||||||
|
eul.id,
|
||||||
|
eul.dateEnquete,
|
||||||
|
ex.annee,
|
||||||
|
ca.id,
|
||||||
|
ca.code,
|
||||||
|
ca.libelle,
|
||||||
|
cul.valeur,
|
||||||
|
cul.observation
|
||||||
|
)
|
||||||
|
FROM CaracteristiqueUniteLogement cul
|
||||||
|
LEFT JOIN cul.caracteristique ca
|
||||||
|
LEFT JOIN cul.enqueteUniteLogement eul
|
||||||
|
LEFT JOIN eul.exercice ex
|
||||||
|
""")
|
||||||
|
List<CaracteristiqueUniteLogementPayloadWeb> findAllCaracteristiqueUniteLogementToDto();
|
||||||
|
|
||||||
@Query(value = """
|
@Query(value = """
|
||||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueUniteLogementPayloadWeb(
|
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueUniteLogementPayloadWeb(
|
||||||
@@ -96,20 +115,48 @@ public interface CaracteristiqueUniteLogementRepository extends JpaRepository<Ca
|
|||||||
cul.observation
|
cul.observation
|
||||||
)
|
)
|
||||||
FROM CaracteristiqueUniteLogement cul
|
FROM CaracteristiqueUniteLogement cul
|
||||||
JOIN cul.caracteristique ca
|
LEFT JOIN cul.caracteristique ca
|
||||||
JOIN cul.enqueteUniteLogement eul
|
LEFT JOIN cul.enqueteUniteLogement eul
|
||||||
JOIN eul.exercice ex
|
LEFT JOIN eul.exercice ex
|
||||||
WHERE cul.id = :enqueteUniteLogementId
|
WHERE cul.id = :enqueteUniteLogementId
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
SELECT COUNT(distinct cul)
|
SELECT COUNT(distinct cul)
|
||||||
FROM CaracteristiqueUniteLogement cul
|
FROM CaracteristiqueUniteLogement cul
|
||||||
JOIN cul.caracteristique ca
|
LEFT JOIN cul.caracteristique ca
|
||||||
JOIN cul.enqueteUniteLogement eul
|
LEFT JOIN cul.enqueteUniteLogement eul
|
||||||
JOIN eul.exercice ex
|
LEFT JOIN eul.exercice ex
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
Page<CaracteristiqueUniteLogementPayloadWeb> findAllCaracteristiqueUniteLogementToDtoPageable(Pageable pageable);
|
||||||
|
|
||||||
|
@Query(value = """
|
||||||
|
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CaracteristiqueUniteLogementPayloadWeb(
|
||||||
|
cul.id,
|
||||||
|
eul.id,
|
||||||
|
eul.dateEnquete,
|
||||||
|
ex.annee,
|
||||||
|
ca.id,
|
||||||
|
ca.code,
|
||||||
|
ca.libelle,
|
||||||
|
cul.valeur,
|
||||||
|
cul.observation
|
||||||
|
)
|
||||||
|
FROM CaracteristiqueUniteLogement cul
|
||||||
|
LEFT JOIN cul.caracteristique ca
|
||||||
|
LEFT JOIN cul.enqueteUniteLogement eul
|
||||||
|
LEFT JOIN eul.exercice ex
|
||||||
|
WHERE cul.id = :enqueteUniteLogementId
|
||||||
|
""",
|
||||||
|
countQuery = """
|
||||||
|
SELECT COUNT(distinct cul)
|
||||||
|
FROM CaracteristiqueUniteLogement cul
|
||||||
|
LEFT JOIN cul.caracteristique ca
|
||||||
|
LEFT JOIN cul.enqueteUniteLogement eul
|
||||||
|
LEFT JOIN eul.exercice ex
|
||||||
WHERE cul.id = :enqueteUniteLogementId
|
WHERE cul.id = :enqueteUniteLogementId
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
Page<CaracteristiqueUniteLogementPayloadWeb> findAllCaracteristiqueUniteLogementByEnqueteBatimentToDtoPageable(@Param("enqueteUniteLogementId") Long enqueteUniteLogementId, Pageable pageable);
|
Page<CaracteristiqueUniteLogementPayloadWeb> findAllCaracteristiqueUniteLogementByEnqueteUloToDtoPageable(@Param("enqueteUniteLogementId") Long enqueteUniteLogementId, Pageable pageable);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,12 +94,15 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
u.id,
|
u.id,
|
||||||
u.nom,
|
u.nom,
|
||||||
u.prenom,
|
u.prenom,
|
||||||
eb.statutEnquete
|
eb.statutEnquete,
|
||||||
|
ex.id,
|
||||||
|
ex.annee
|
||||||
)
|
)
|
||||||
FROM EnqueteBatiment eb
|
FROM EnqueteBatiment eb
|
||||||
LEFT JOIN eb.batiment b
|
LEFT JOIN eb.batiment b
|
||||||
LEFT JOIN eb.personne p
|
LEFT JOIN eb.personne p
|
||||||
LEFT JOIN eb.user u
|
LEFT JOIN eb.user u
|
||||||
|
LEFT JOIN eb.exercice ex
|
||||||
Where eb.id = :enqueteBatimentId
|
Where eb.id = :enqueteBatimentId
|
||||||
""")
|
""")
|
||||||
Optional<EnqueteBatimentPayloadWeb> findEnqueteBatimentByIdToDto(@Param("enqueteBatimentId") Long enqueteBatimentId);
|
Optional<EnqueteBatimentPayloadWeb> findEnqueteBatimentByIdToDto(@Param("enqueteBatimentId") Long enqueteBatimentId);
|
||||||
@@ -142,12 +145,15 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
u.id,
|
u.id,
|
||||||
u.nom,
|
u.nom,
|
||||||
u.prenom,
|
u.prenom,
|
||||||
eb.statutEnquete
|
eb.statutEnquete,
|
||||||
|
ex.id,
|
||||||
|
ex.annee
|
||||||
)
|
)
|
||||||
FROM EnqueteBatiment eb
|
FROM EnqueteBatiment eb
|
||||||
LEFT JOIN eb.batiment b
|
LEFT JOIN eb.batiment b
|
||||||
LEFT JOIN eb.personne p
|
LEFT JOIN eb.personne p
|
||||||
LEFT JOIN eb.user u
|
LEFT JOIN eb.user u
|
||||||
|
LEFT JOIN eb.exercice ex
|
||||||
""")
|
""")
|
||||||
List<EnqueteBatimentPayloadWeb> findAllEnqueteBatimentToDto();
|
List<EnqueteBatimentPayloadWeb> findAllEnqueteBatimentToDto();
|
||||||
|
|
||||||
@@ -190,12 +196,15 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
u.id,
|
u.id,
|
||||||
u.nom,
|
u.nom,
|
||||||
u.prenom,
|
u.prenom,
|
||||||
eb.statutEnquete
|
eb.statutEnquete,
|
||||||
|
ex.id,
|
||||||
|
ex.annee
|
||||||
)
|
)
|
||||||
FROM EnqueteBatiment eb
|
FROM EnqueteBatiment eb
|
||||||
LEFT JOIN eb.batiment b
|
LEFT JOIN eb.batiment b
|
||||||
LEFT JOIN eb.personne p
|
LEFT JOIN eb.personne p
|
||||||
LEFT JOIN eb.user u
|
LEFT JOIN eb.user u
|
||||||
|
LEFT JOIN eb.exercice ex
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
SELECT COUNT(eb)
|
SELECT COUNT(eb)
|
||||||
@@ -244,12 +253,15 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
u.id,
|
u.id,
|
||||||
u.nom,
|
u.nom,
|
||||||
u.prenom,
|
u.prenom,
|
||||||
eb.statutEnquete
|
eb.statutEnquete,
|
||||||
|
ex.id,
|
||||||
|
ex.annee
|
||||||
)
|
)
|
||||||
FROM EnqueteBatiment eb
|
FROM EnqueteBatiment eb
|
||||||
LEFT JOIN eb.batiment b
|
LEFT JOIN eb.batiment b
|
||||||
LEFT JOIN eb.personne p
|
LEFT JOIN eb.personne p
|
||||||
LEFT JOIN eb.user u
|
LEFT JOIN eb.user u
|
||||||
|
LEFT JOIN eb.exercice ex
|
||||||
WHERE b.id = :batimentId
|
WHERE b.id = :batimentId
|
||||||
""")
|
""")
|
||||||
List<EnqueteBatimentPayloadWeb> findAllByBatimentToDto(
|
List<EnqueteBatimentPayloadWeb> findAllByBatimentToDto(
|
||||||
@@ -295,12 +307,15 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
u.id,
|
u.id,
|
||||||
u.nom,
|
u.nom,
|
||||||
u.prenom,
|
u.prenom,
|
||||||
eb.statutEnquete
|
eb.statutEnquete,
|
||||||
|
ex.id,
|
||||||
|
ex.annee
|
||||||
)
|
)
|
||||||
FROM EnqueteBatiment eb
|
FROM EnqueteBatiment eb
|
||||||
LEFT JOIN eb.batiment b
|
LEFT JOIN eb.batiment b
|
||||||
LEFT JOIN eb.personne p
|
LEFT JOIN eb.personne p
|
||||||
LEFT JOIN eb.user u
|
LEFT JOIN eb.user u
|
||||||
|
LEFT JOIN eb.exercice ex
|
||||||
WHERE b.id = :batimentId
|
WHERE b.id = :batimentId
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
|
|||||||
@@ -573,9 +573,9 @@ public class EntityFromPayLoadService {
|
|||||||
Optional<UniteLogement> optionalUniteLogement = Optional.empty();
|
Optional<UniteLogement> optionalUniteLogement = Optional.empty();
|
||||||
Optional<User> optionalUser = Optional.empty();
|
Optional<User> optionalUser = Optional.empty();
|
||||||
|
|
||||||
if(enqueteUniteLogementPayloadWeb.getExerciceId()!=null)
|
// if(enqueteUniteLogementPayloadWeb.getExerciceId()!=null)
|
||||||
optionalExercice= exerciceRepository.findById(enqueteUniteLogementPayloadWeb.getExerciceId());
|
// optionalExercice= exerciceRepository.findById(enqueteUniteLogementPayloadWeb.getExerciceId());
|
||||||
eul.setExercice(optionalExercice.orElse(null));
|
// eul.setExercice(optionalExercice.orElse(null));
|
||||||
|
|
||||||
if(enqueteUniteLogementPayloadWeb.getUniteLogementId()!=null)
|
if(enqueteUniteLogementPayloadWeb.getUniteLogementId()!=null)
|
||||||
optionalUniteLogement= uniteLogementRepository.findById(enqueteUniteLogementPayloadWeb.getUniteLogementId());
|
optionalUniteLogement= uniteLogementRepository.findById(enqueteUniteLogementPayloadWeb.getUniteLogementId());
|
||||||
@@ -589,6 +589,13 @@ public class EntityFromPayLoadService {
|
|||||||
eul.setUser(optionalUser.orElse(null));
|
eul.setUser(optionalUser.orElse(null));
|
||||||
|
|
||||||
|
|
||||||
|
if (enqueteUniteLogementPayloadWeb.getExerciceId() != null) {
|
||||||
|
Exercice exercice = new Exercice();
|
||||||
|
exercice.setId(enqueteUniteLogementPayloadWeb.getExerciceId());
|
||||||
|
eul.setExercice(exercice);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
eul.setId(enqueteUniteLogementPayloadWeb.getId());
|
eul.setId(enqueteUniteLogementPayloadWeb.getId());
|
||||||
eul.setObservation(enqueteUniteLogementPayloadWeb.getObservation());
|
eul.setObservation(enqueteUniteLogementPayloadWeb.getObservation());
|
||||||
eul.setNbrePiece(enqueteUniteLogementPayloadWeb.getNbrePiece());
|
eul.setNbrePiece(enqueteUniteLogementPayloadWeb.getNbrePiece());
|
||||||
@@ -640,6 +647,11 @@ public class EntityFromPayLoadService {
|
|||||||
user.setId(enqueteBatimentPayloadWeb.getEnqueteurId());
|
user.setId(enqueteBatimentPayloadWeb.getEnqueteurId());
|
||||||
enqueteBatiment.setUser(user);
|
enqueteBatiment.setUser(user);
|
||||||
}
|
}
|
||||||
|
if (enqueteBatimentPayloadWeb.getExerciceId() != null) {
|
||||||
|
Exercice exercice = new Exercice();
|
||||||
|
exercice.setId(enqueteBatimentPayloadWeb.getExerciceId());
|
||||||
|
enqueteBatiment.setExercice(exercice);
|
||||||
|
}
|
||||||
|
|
||||||
// ======================
|
// ======================
|
||||||
// Champs simples
|
// Champs simples
|
||||||
@@ -714,6 +726,13 @@ public class EntityFromPayLoadService {
|
|||||||
enquete.setZoneRfu(zoneRfu);
|
enquete.setZoneRfu(zoneRfu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (enquetePayLoadWeb.getExerviceId() != null) {
|
||||||
|
Exercice exercice = new Exercice();
|
||||||
|
exercice.setId(enquetePayLoadWeb.getExerviceId());
|
||||||
|
enquete.setExercice(exercice);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ======================
|
// ======================
|
||||||
// Champs simples
|
// Champs simples
|
||||||
@@ -739,6 +758,7 @@ public class EntityFromPayLoadService {
|
|||||||
enquete.setMontantAnnuelleLocation(enquetePayLoadWeb.getMontantAnnuelleLocation());
|
enquete.setMontantAnnuelleLocation(enquetePayLoadWeb.getMontantAnnuelleLocation());
|
||||||
enquete.setValeurParcelleEstime(enquetePayLoadWeb.getValeurParcelleEstime());
|
enquete.setValeurParcelleEstime(enquetePayLoadWeb.getValeurParcelleEstime());
|
||||||
enquete.setValeurParcelleReel(enquetePayLoadWeb.getValeurParcelleReel());
|
enquete.setValeurParcelleReel(enquetePayLoadWeb.getValeurParcelleReel());
|
||||||
|
enquete.setSynchronise(true);
|
||||||
|
|
||||||
return enquete;
|
return enquete;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user