features/crud_entites #131
@@ -0,0 +1,180 @@
|
|||||||
|
package io.gmss.fiscad.controllers.rfu.parametre;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.rfu.parametre.Usage;
|
||||||
|
import io.gmss.fiscad.exceptions.*;
|
||||||
|
import io.gmss.fiscad.interfaces.rfu.parametre.UsageService;
|
||||||
|
import io.gmss.fiscad.paylaods.ApiResponse;
|
||||||
|
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.data.domain.PageRequest;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.client.HttpClientErrorException;
|
||||||
|
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "api/usage", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
@SecurityRequirement(name = "bearer")
|
||||||
|
@Tag(name = "Usage")
|
||||||
|
public class UsageController {
|
||||||
|
|
||||||
|
private final UsageService usageService;
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(UsageController.class);
|
||||||
|
|
||||||
|
public UsageController(UsageService usageService) {
|
||||||
|
this.usageService = usageService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
public ResponseEntity<?> createUsage(@RequestBody @Valid @Validated Usage usage) {
|
||||||
|
try {
|
||||||
|
usage = usageService.createUsage(usage);
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, usage, "Usage créé 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update/{id}")
|
||||||
|
public ResponseEntity<?> updateUsage(@PathVariable Long id, @RequestBody Usage usage) {
|
||||||
|
try {
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, usageService.updateUsage(id, usage), "Usage mis à jour 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete/{id}")
|
||||||
|
public ResponseEntity<?> deleteUsager(@PathVariable Long id) {
|
||||||
|
try {
|
||||||
|
usageService.deleteUsage(id);
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, "Usage supprimé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("/all")
|
||||||
|
public ResponseEntity<?> getAllUsageList() {
|
||||||
|
try {
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, usageService.getUsageList(), "Liste des usages 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("/all-paged")
|
||||||
|
public ResponseEntity<?> getAllUsagePaged(@RequestParam int pageNo, @RequestParam int pageSize) {
|
||||||
|
try {
|
||||||
|
Pageable pageable = PageRequest.of(pageNo, pageSize);
|
||||||
|
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, usageService.getUsageList(pageable), "Liste des usages 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("/id/{id}")
|
||||||
|
public ResponseEntity<?> getUsageById(@PathVariable Long id) {
|
||||||
|
try {
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, usageService.getUsageById(id), "Usage 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -6,6 +6,7 @@ import io.gmss.fiscad.entities.decoupage.Quartier;
|
|||||||
import io.gmss.fiscad.entities.infocad.parametre.NatureDomaine;
|
import io.gmss.fiscad.entities.infocad.parametre.NatureDomaine;
|
||||||
import io.gmss.fiscad.entities.infocad.parametre.TypeDomaine;
|
import io.gmss.fiscad.entities.infocad.parametre.TypeDomaine;
|
||||||
import io.gmss.fiscad.entities.rfu.metier.Batiment;
|
import io.gmss.fiscad.entities.rfu.metier.Batiment;
|
||||||
|
import io.gmss.fiscad.entities.rfu.parametre.Usage;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
@@ -70,6 +71,8 @@ public class Parcelle extends BaseEntity implements Serializable {
|
|||||||
private String numeroRue ;
|
private String numeroRue ;
|
||||||
private Boolean batie;
|
private Boolean batie;
|
||||||
private Integer nombrePiscine;
|
private Integer nombrePiscine;
|
||||||
|
@ManyToOne
|
||||||
|
private Usage usage;
|
||||||
// private String ncProprietaire ;
|
// private String ncProprietaire ;
|
||||||
// @JsonIgnore
|
// @JsonIgnore
|
||||||
// @OneToMany(mappedBy = "parcelle")
|
// @OneToMany(mappedBy = "parcelle")
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import io.gmss.fiscad.entities.BaseEntity;
|
|||||||
import io.gmss.fiscad.entities.infocad.metier.Parcelle;
|
import io.gmss.fiscad.entities.infocad.metier.Parcelle;
|
||||||
import io.gmss.fiscad.entities.infocad.metier.Tpe;
|
import io.gmss.fiscad.entities.infocad.metier.Tpe;
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
|
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
|
||||||
|
import io.gmss.fiscad.entities.rfu.parametre.Usage;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -51,6 +52,9 @@ public class Batiment extends BaseEntity implements Serializable {
|
|||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Parcelle parcelle;
|
private Parcelle parcelle;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
private Usage usage;
|
||||||
|
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private CategorieBatiment categorieBatiment ;
|
private CategorieBatiment categorieBatiment ;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import io.gmss.fiscad.entities.infocad.parametre.Personne;
|
|||||||
import io.gmss.fiscad.entities.rfu.parametre.Caracteristique;
|
import io.gmss.fiscad.entities.rfu.parametre.Caracteristique;
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
|
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.Exercice;
|
import io.gmss.fiscad.entities.rfu.parametre.Exercice;
|
||||||
|
import io.gmss.fiscad.entities.rfu.parametre.Usage;
|
||||||
import io.gmss.fiscad.entities.user.User;
|
import io.gmss.fiscad.entities.user.User;
|
||||||
import io.gmss.fiscad.enums.StatutEnquete;
|
import io.gmss.fiscad.enums.StatutEnquete;
|
||||||
import io.gmss.fiscad.enums.StatutEnregistrement;
|
import io.gmss.fiscad.enums.StatutEnregistrement;
|
||||||
@@ -131,4 +132,6 @@ public class EnqueteBatiment extends BaseEntity implements Serializable {
|
|||||||
private StatutEnquete statutEnquete;
|
private StatutEnquete statutEnquete;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private CategorieBatiment categorieBatiment ;
|
private CategorieBatiment categorieBatiment ;
|
||||||
|
@ManyToOne
|
||||||
|
private Usage usage ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import io.gmss.fiscad.entities.infocad.metier.Upload;
|
|||||||
import io.gmss.fiscad.entities.infocad.parametre.Personne;
|
import io.gmss.fiscad.entities.infocad.parametre.Personne;
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
|
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.Exercice;
|
import io.gmss.fiscad.entities.rfu.parametre.Exercice;
|
||||||
|
import io.gmss.fiscad.entities.rfu.parametre.Usage;
|
||||||
import io.gmss.fiscad.entities.user.User;
|
import io.gmss.fiscad.entities.user.User;
|
||||||
import io.gmss.fiscad.enums.StatutEnquete;
|
import io.gmss.fiscad.enums.StatutEnquete;
|
||||||
import io.gmss.fiscad.enums.StatutEnregistrement;
|
import io.gmss.fiscad.enums.StatutEnregistrement;
|
||||||
@@ -119,4 +120,6 @@ public class EnqueteUniteLogement extends BaseEntity implements Serializable {
|
|||||||
private StatutEnquete statutEnquete;
|
private StatutEnquete statutEnquete;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private CategorieBatiment categorieBatiment ;
|
private CategorieBatiment categorieBatiment ;
|
||||||
|
@ManyToOne
|
||||||
|
private Usage usage ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import io.gmss.fiscad.deserializer.LocalDateDeserializer;
|
|||||||
import io.gmss.fiscad.entities.BaseEntity;
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
import io.gmss.fiscad.entities.infocad.metier.Tpe;
|
import io.gmss.fiscad.entities.infocad.metier.Tpe;
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
|
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
|
||||||
|
import io.gmss.fiscad.entities.rfu.parametre.Usage;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -40,6 +41,8 @@ public class UniteLogement extends BaseEntity implements Serializable {
|
|||||||
private List<EnqueteUniteLogement> enqueteUniteLogements;
|
private List<EnqueteUniteLogement> enqueteUniteLogements;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Batiment batiment;
|
private Batiment batiment;
|
||||||
|
@ManyToOne
|
||||||
|
private Usage usage;
|
||||||
private Long batimentExternalKey;
|
private Long batimentExternalKey;
|
||||||
private Long idDerniereEnquete;
|
private Long idDerniereEnquete;
|
||||||
private Float SuperficieLouee;
|
private Float SuperficieLouee;
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package io.gmss.fiscad.entities.rfu.parametre;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.hibernate.annotations.Where;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Entity
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Where(clause = " deleted = false")
|
||||||
|
public class Usage extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
private String code;
|
||||||
|
private String nom;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package io.gmss.fiscad.implementations.rfu.parametre;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.rfu.parametre.Usage;
|
||||||
|
import io.gmss.fiscad.exceptions.BadRequestException;
|
||||||
|
import io.gmss.fiscad.exceptions.NotFoundException;
|
||||||
|
import io.gmss.fiscad.interfaces.rfu.parametre.UsageService;
|
||||||
|
import io.gmss.fiscad.persistence.repositories.rfu.parametre.UsageRepository;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class UsageServiceImpl implements UsageService {
|
||||||
|
private final UsageRepository usageRepository;
|
||||||
|
|
||||||
|
public UsageServiceImpl(UsageRepository usageRepository) {
|
||||||
|
this.usageRepository = usageRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Usage createUsage(Usage usage) throws BadRequestException {
|
||||||
|
if (usage.getId() != null) {
|
||||||
|
throw new BadRequestException("Impossible de créer une nouvelle campgne ayant un id non null.");
|
||||||
|
}
|
||||||
|
return usageRepository.save(usage);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Usage updateUsage(Long id, Usage usage) throws NotFoundException {
|
||||||
|
if (usage.getId() == null) {
|
||||||
|
throw new BadRequestException("Impossible de mettre à jour une nouvelle usage ayant un id null.");
|
||||||
|
}
|
||||||
|
if (!usageRepository.existsById(usage.getId())) {
|
||||||
|
throw new NotFoundException("Impossible de trouver la usage spécifiée dans notre base de données.");
|
||||||
|
}
|
||||||
|
return usageRepository.save(usage);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteUsage(Long id) throws NotFoundException {
|
||||||
|
Optional<Usage> usageOptional = usageRepository.findById(id);
|
||||||
|
if (usageOptional.isPresent()) {
|
||||||
|
usageRepository.deleteById(usageOptional.get().getId());
|
||||||
|
} else {
|
||||||
|
throw new NotFoundException("Impossible de trouver la usage spécifiée dans notre base de données.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Page<Usage> getUsageList(Pageable pageable) {
|
||||||
|
return usageRepository.findAll(pageable);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Usage> getUsageList() {
|
||||||
|
return usageRepository.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<Usage> getUsageById(Long id) {
|
||||||
|
return usageRepository.findById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package io.gmss.fiscad.interfaces.rfu.parametre;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.rfu.parametre.Usage;
|
||||||
|
import io.gmss.fiscad.exceptions.BadRequestException;
|
||||||
|
import io.gmss.fiscad.exceptions.NotFoundException;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface UsageService {
|
||||||
|
|
||||||
|
Usage createUsage(Usage usage) throws BadRequestException;
|
||||||
|
|
||||||
|
Usage updateUsage(Long id, Usage usage) throws NotFoundException;
|
||||||
|
|
||||||
|
void deleteUsage(Long id) throws NotFoundException;
|
||||||
|
|
||||||
|
Page<Usage> getUsageList(Pageable pageable);
|
||||||
|
|
||||||
|
List<Usage> getUsageList();
|
||||||
|
|
||||||
|
|
||||||
|
Optional<Usage> getUsageById(Long id);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -32,6 +32,9 @@ public class BatimentPaylaodWeb {
|
|||||||
private Long valeurBatimentEstime;
|
private Long valeurBatimentEstime;
|
||||||
private Long valeurBatimentReel;
|
private Long valeurBatimentReel;
|
||||||
private Long montantMensuelLocation;
|
private Long montantMensuelLocation;
|
||||||
|
private Long usageId;
|
||||||
|
private String usageNom;
|
||||||
|
|
||||||
public BatimentPaylaodWeb(Long id,
|
public BatimentPaylaodWeb(Long id,
|
||||||
String nub,
|
String nub,
|
||||||
String code,
|
String code,
|
||||||
@@ -56,7 +59,9 @@ public class BatimentPaylaodWeb {
|
|||||||
Long montantLocatifAnnuelCalcule,
|
Long montantLocatifAnnuelCalcule,
|
||||||
Long valeurBatimentEstime,
|
Long valeurBatimentEstime,
|
||||||
Long valeurBatimentReel,
|
Long valeurBatimentReel,
|
||||||
Long montantMensuelLocation) {
|
Long montantMensuelLocation,
|
||||||
|
Long usageId,
|
||||||
|
String usageNom) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.nub = nub;
|
this.nub = nub;
|
||||||
this.code = code;
|
this.code = code;
|
||||||
@@ -82,5 +87,7 @@ public class BatimentPaylaodWeb {
|
|||||||
this.valeurBatimentEstime = valeurBatimentEstime ;
|
this.valeurBatimentEstime = valeurBatimentEstime ;
|
||||||
this.valeurBatimentReel = valeurBatimentReel ;
|
this.valeurBatimentReel = valeurBatimentReel ;
|
||||||
this.montantMensuelLocation = montantMensuelLocation ;
|
this.montantMensuelLocation = montantMensuelLocation ;
|
||||||
|
this.usageId = usageId ;
|
||||||
|
this.usageNom = usageNom ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ public class EnqueteBatimentPayloadWeb {
|
|||||||
private String categorieBatimentStanding;
|
private String categorieBatimentStanding;
|
||||||
private Integer nombrePiscine;
|
private Integer nombrePiscine;
|
||||||
private Long montantLocatifAnnuelCalcule;
|
private Long montantLocatifAnnuelCalcule;
|
||||||
|
private Long usageId;
|
||||||
|
private String usageNom;
|
||||||
|
|
||||||
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,
|
||||||
@@ -78,7 +80,9 @@ public class EnqueteBatimentPayloadWeb {
|
|||||||
String categorieBatimentCode,
|
String categorieBatimentCode,
|
||||||
String categorieBatimentStanding,
|
String categorieBatimentStanding,
|
||||||
Integer nombrePiscine,
|
Integer nombrePiscine,
|
||||||
Long montantLocatifAnnuelCalcule
|
Long montantLocatifAnnuelCalcule,
|
||||||
|
Long usageId,
|
||||||
|
String usageNom
|
||||||
) {
|
) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.observation = observation;
|
this.observation = observation;
|
||||||
@@ -125,6 +129,7 @@ public class EnqueteBatimentPayloadWeb {
|
|||||||
this.categorieBatimentStanding = categorieBatimentStanding;
|
this.categorieBatimentStanding = categorieBatimentStanding;
|
||||||
this.nombrePiscine = nombrePiscine;
|
this.nombrePiscine = nombrePiscine;
|
||||||
this.montantLocatifAnnuelCalcule = montantLocatifAnnuelCalcule;
|
this.montantLocatifAnnuelCalcule = montantLocatifAnnuelCalcule;
|
||||||
|
this.usageId = usageId ;
|
||||||
|
this.usageNom = usageNom ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ public class EnqueteUniteLogementPayloadWeb {
|
|||||||
private String categorieBatimentStanding;
|
private String categorieBatimentStanding;
|
||||||
private Long montantLocatifAnnuelCalcule;
|
private Long montantLocatifAnnuelCalcule;
|
||||||
private Integer nombrePiscine;
|
private Integer nombrePiscine;
|
||||||
|
private Long usageId;
|
||||||
|
private String usageNom;
|
||||||
public EnqueteUniteLogementPayloadWeb(Long id, String observation, Integer nbrePiece, Integer nbreHabitant, Integer nbreMenage, Boolean enLocation, Integer nbreMoisLocation, Long montantMensuelLocation, Long montantLocatifAnnuelDeclare, Long valeurUniteLogementEstime, Long valeurUniteLogementReel, Float superficieLouee, Float superficieAuSol, LocalDate dateEnquete, Boolean sbee, Boolean soneb, String numCompteurSbee, String numCompteurSoneb, LocalDate dateDebutExemption, LocalDate dateFinExemption, Long uniteLogementId, String uniteLogementNumeroEtage, String uniteLogementNul, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, Long enqueteurId, String enqueteurNom, String enqueteurPrenom, Long exerciceId, Integer exerciceAnnee,
|
public EnqueteUniteLogementPayloadWeb(Long id, String observation, Integer nbrePiece, Integer nbreHabitant, Integer nbreMenage, Boolean enLocation, Integer nbreMoisLocation, Long montantMensuelLocation, Long montantLocatifAnnuelDeclare, Long valeurUniteLogementEstime, Long valeurUniteLogementReel, Float superficieLouee, Float superficieAuSol, LocalDate dateEnquete, Boolean sbee, Boolean soneb, String numCompteurSbee, String numCompteurSoneb, LocalDate dateDebutExemption, LocalDate dateFinExemption, Long uniteLogementId, String uniteLogementNumeroEtage, String uniteLogementNul, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, Long enqueteurId, String enqueteurNom, String enqueteurPrenom, Long exerciceId, Integer exerciceAnnee,
|
||||||
StatutEnquete statutEnquete,
|
StatutEnquete statutEnquete,
|
||||||
String representantNom,
|
String representantNom,
|
||||||
@@ -64,7 +66,9 @@ public class EnqueteUniteLogementPayloadWeb {
|
|||||||
String categorieBatimentCode,
|
String categorieBatimentCode,
|
||||||
String categorieBatimentStanding,
|
String categorieBatimentStanding,
|
||||||
Integer nombrePiscine,
|
Integer nombrePiscine,
|
||||||
Long montantLocatifAnnuelCalcule
|
Long montantLocatifAnnuelCalcule,
|
||||||
|
Long usageId,
|
||||||
|
String usageNom
|
||||||
) {
|
) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.observation = observation;
|
this.observation = observation;
|
||||||
@@ -108,5 +112,7 @@ public class EnqueteUniteLogementPayloadWeb {
|
|||||||
this.categorieBatimentStanding = categorieBatimentStanding;
|
this.categorieBatimentStanding = categorieBatimentStanding;
|
||||||
this.nombrePiscine = nombrePiscine;
|
this.nombrePiscine = nombrePiscine;
|
||||||
this.montantLocatifAnnuelCalcule = montantLocatifAnnuelCalcule;
|
this.montantLocatifAnnuelCalcule = montantLocatifAnnuelCalcule;
|
||||||
|
this.usageId = usageId ;
|
||||||
|
this.usageNom = usageNom ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ public class UniteLogementPaylaodWeb {
|
|||||||
private Long valeurUniteLogementEstime;
|
private Long valeurUniteLogementEstime;
|
||||||
private Long valeurUniteLogementReel;
|
private Long valeurUniteLogementReel;
|
||||||
private Integer nombrePiscine;
|
private Integer nombrePiscine;
|
||||||
|
private Long usageId;
|
||||||
|
private String usageNom;
|
||||||
|
|
||||||
public UniteLogementPaylaodWeb(Long id, String nul, String numeroEtage, String code, Long batimentId, Float superficieAuSol, Float superficieLouee, String batimentNub, String observation, LocalDate dateConstruction, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale,Long enqueteUniteLogementCourantId,
|
public UniteLogementPaylaodWeb(Long id, String nul, String numeroEtage, String code, Long batimentId, Float superficieAuSol, Float superficieLouee, String batimentNub, String observation, LocalDate dateConstruction, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale,Long enqueteUniteLogementCourantId,
|
||||||
Long categorieBatimentId,
|
Long categorieBatimentId,
|
||||||
@@ -41,7 +43,10 @@ public class UniteLogementPaylaodWeb {
|
|||||||
Long montantLocatifAnnuelCalcule,
|
Long montantLocatifAnnuelCalcule,
|
||||||
Long valeurUniteLogementEstime,
|
Long valeurUniteLogementEstime,
|
||||||
Long valeurUniteLogementReel,
|
Long valeurUniteLogementReel,
|
||||||
Integer nombrePiscine) {
|
Integer nombrePiscine,
|
||||||
|
Long usageId,
|
||||||
|
String usageNom
|
||||||
|
) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.nul = nul;
|
this.nul = nul;
|
||||||
this.numeroEtage = numeroEtage;
|
this.numeroEtage = numeroEtage;
|
||||||
@@ -66,5 +71,7 @@ public class UniteLogementPaylaodWeb {
|
|||||||
this.valeurUniteLogementEstime = valeurUniteLogementEstime;
|
this.valeurUniteLogementEstime = valeurUniteLogementEstime;
|
||||||
this.valeurUniteLogementReel = valeurUniteLogementReel;
|
this.valeurUniteLogementReel = valeurUniteLogementReel;
|
||||||
this.nombrePiscine = nombrePiscine;
|
this.nombrePiscine = nombrePiscine;
|
||||||
|
this.usageId = usageId ;
|
||||||
|
this.usageNom = usageNom ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,9 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
|
|||||||
eb.montantLocatifAnnuelCalcule,
|
eb.montantLocatifAnnuelCalcule,
|
||||||
eb.valeurBatimentEstime,
|
eb.valeurBatimentEstime,
|
||||||
eb.valeurBatimentReel,
|
eb.valeurBatimentReel,
|
||||||
eb.montantMensuelLocation
|
eb.montantMensuelLocation,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM Batiment b
|
FROM Batiment b
|
||||||
JOIN b.parcelle p
|
JOIN b.parcelle p
|
||||||
@@ -73,6 +75,7 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
|
|||||||
WHERE eb2.batiment = b
|
WHERE eb2.batiment = b
|
||||||
)
|
)
|
||||||
LEFT JOIN eb.personne per
|
LEFT JOIN eb.personne per
|
||||||
|
LEFT JOIN eb.usage us
|
||||||
WHERE b.id = :batimentId
|
WHERE b.id = :batimentId
|
||||||
""")
|
""")
|
||||||
Optional<BatimentPaylaodWeb> findBatimentAvecOccupantCourantToDto(@Param("batimentId") Long batimentId);
|
Optional<BatimentPaylaodWeb> findBatimentAvecOccupantCourantToDto(@Param("batimentId") Long batimentId);
|
||||||
@@ -103,7 +106,9 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
|
|||||||
eb.montantLocatifAnnuelCalcule,
|
eb.montantLocatifAnnuelCalcule,
|
||||||
eb.valeurBatimentEstime,
|
eb.valeurBatimentEstime,
|
||||||
eb.valeurBatimentReel,
|
eb.valeurBatimentReel,
|
||||||
eb.montantMensuelLocation
|
eb.montantMensuelLocation,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM Batiment b
|
FROM Batiment b
|
||||||
JOIN b.parcelle p
|
JOIN b.parcelle p
|
||||||
@@ -116,6 +121,7 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
|
|||||||
WHERE eb2.batiment = b
|
WHERE eb2.batiment = b
|
||||||
)
|
)
|
||||||
LEFT JOIN eb.personne per
|
LEFT JOIN eb.personne per
|
||||||
|
LEFT JOIN eb.usage us
|
||||||
""")
|
""")
|
||||||
List<BatimentPaylaodWeb> findAllBatimentsAvecOccupantCourantToDto();
|
List<BatimentPaylaodWeb> findAllBatimentsAvecOccupantCourantToDto();
|
||||||
|
|
||||||
@@ -147,7 +153,9 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
|
|||||||
eb.montantLocatifAnnuelCalcule,
|
eb.montantLocatifAnnuelCalcule,
|
||||||
eb.valeurBatimentEstime,
|
eb.valeurBatimentEstime,
|
||||||
eb.valeurBatimentReel,
|
eb.valeurBatimentReel,
|
||||||
eb.montantMensuelLocation
|
eb.montantMensuelLocation ,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM Batiment b
|
FROM Batiment b
|
||||||
JOIN b.parcelle p
|
JOIN b.parcelle p
|
||||||
@@ -160,6 +168,7 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
|
|||||||
WHERE eb2.batiment = b
|
WHERE eb2.batiment = b
|
||||||
)
|
)
|
||||||
LEFT JOIN eb.personne per
|
LEFT JOIN eb.personne per
|
||||||
|
LEFT JOIN eb.usage us
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
SELECT COUNT(b)
|
SELECT COUNT(b)
|
||||||
@@ -196,7 +205,9 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
|
|||||||
eb.montantLocatifAnnuelCalcule,
|
eb.montantLocatifAnnuelCalcule,
|
||||||
eb.valeurBatimentEstime,
|
eb.valeurBatimentEstime,
|
||||||
eb.valeurBatimentReel,
|
eb.valeurBatimentReel,
|
||||||
eb.montantMensuelLocation
|
eb.montantMensuelLocation ,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM Batiment b
|
FROM Batiment b
|
||||||
JOIN b.parcelle p
|
JOIN b.parcelle p
|
||||||
@@ -209,6 +220,7 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
|
|||||||
WHERE eb2.batiment = b
|
WHERE eb2.batiment = b
|
||||||
)
|
)
|
||||||
LEFT JOIN eb.personne per
|
LEFT JOIN eb.personne per
|
||||||
|
LEFT JOIN eb.usage us
|
||||||
WHERE p.id = :parcelleId
|
WHERE p.id = :parcelleId
|
||||||
""")
|
""")
|
||||||
List<BatimentPaylaodWeb> findAllBatimentsAvecOccupantCourantByParcelleToDto(
|
List<BatimentPaylaodWeb> findAllBatimentsAvecOccupantCourantByParcelleToDto(
|
||||||
@@ -244,7 +256,9 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
|
|||||||
eb.montantLocatifAnnuelCalcule,
|
eb.montantLocatifAnnuelCalcule,
|
||||||
eb.valeurBatimentEstime,
|
eb.valeurBatimentEstime,
|
||||||
eb.valeurBatimentReel,
|
eb.valeurBatimentReel,
|
||||||
eb.montantMensuelLocation
|
eb.montantMensuelLocation,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM Batiment b
|
FROM Batiment b
|
||||||
JOIN b.parcelle p
|
JOIN b.parcelle p
|
||||||
@@ -257,6 +271,7 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
|
|||||||
WHERE eb2.batiment = b
|
WHERE eb2.batiment = b
|
||||||
)
|
)
|
||||||
LEFT JOIN eb.personne per
|
LEFT JOIN eb.personne per
|
||||||
|
LEFT JOIN eb.usage us
|
||||||
WHERE p.id = :parcelleId
|
WHERE p.id = :parcelleId
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
|
|||||||
@@ -105,7 +105,9 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
cb.code,
|
cb.code,
|
||||||
cb.standing,
|
cb.standing,
|
||||||
eb.nombrePiscine,
|
eb.nombrePiscine,
|
||||||
eb.montantLocatifAnnuelCalcule
|
eb.montantLocatifAnnuelCalcule,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM EnqueteBatiment eb
|
FROM EnqueteBatiment eb
|
||||||
LEFT JOIN eb.batiment b
|
LEFT JOIN eb.batiment b
|
||||||
@@ -113,6 +115,7 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
LEFT JOIN eb.user u
|
LEFT JOIN eb.user u
|
||||||
LEFT JOIN eb.exercice ex
|
LEFT JOIN eb.exercice ex
|
||||||
LEFT JOIN eb.categorieBatiment cb
|
LEFT JOIN eb.categorieBatiment cb
|
||||||
|
LEFT JOIN eb.usage us
|
||||||
Where eb.id = :enqueteBatimentId
|
Where eb.id = :enqueteBatimentId
|
||||||
""")
|
""")
|
||||||
Optional<EnqueteBatimentPayloadWeb> findEnqueteBatimentByIdToDto(@Param("enqueteBatimentId") Long enqueteBatimentId);
|
Optional<EnqueteBatimentPayloadWeb> findEnqueteBatimentByIdToDto(@Param("enqueteBatimentId") Long enqueteBatimentId);
|
||||||
@@ -166,7 +169,9 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
cb.code,
|
cb.code,
|
||||||
cb.standing,
|
cb.standing,
|
||||||
eb.nombrePiscine,
|
eb.nombrePiscine,
|
||||||
eb.montantLocatifAnnuelCalcule
|
eb.montantLocatifAnnuelCalcule,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM EnqueteBatiment eb
|
FROM EnqueteBatiment eb
|
||||||
LEFT JOIN eb.batiment b
|
LEFT JOIN eb.batiment b
|
||||||
@@ -174,6 +179,7 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
LEFT JOIN eb.user u
|
LEFT JOIN eb.user u
|
||||||
LEFT JOIN eb.exercice ex
|
LEFT JOIN eb.exercice ex
|
||||||
LEFT JOIN eb.categorieBatiment cb
|
LEFT JOIN eb.categorieBatiment cb
|
||||||
|
LEFT JOIN eb.usage us
|
||||||
""")
|
""")
|
||||||
List<EnqueteBatimentPayloadWeb> findAllEnqueteBatimentToDto();
|
List<EnqueteBatimentPayloadWeb> findAllEnqueteBatimentToDto();
|
||||||
|
|
||||||
@@ -227,7 +233,9 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
cb.code,
|
cb.code,
|
||||||
cb.standing,
|
cb.standing,
|
||||||
eb.nombrePiscine,
|
eb.nombrePiscine,
|
||||||
eb.montantLocatifAnnuelCalcule
|
eb.montantLocatifAnnuelCalcule,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM EnqueteBatiment eb
|
FROM EnqueteBatiment eb
|
||||||
LEFT JOIN eb.batiment b
|
LEFT JOIN eb.batiment b
|
||||||
@@ -235,6 +243,7 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
LEFT JOIN eb.user u
|
LEFT JOIN eb.user u
|
||||||
LEFT JOIN eb.exercice ex
|
LEFT JOIN eb.exercice ex
|
||||||
LEFT JOIN eb.categorieBatiment cb
|
LEFT JOIN eb.categorieBatiment cb
|
||||||
|
LEFT JOIN eb.usage us
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
SELECT COUNT(eb)
|
SELECT COUNT(eb)
|
||||||
@@ -294,7 +303,9 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
cb.code,
|
cb.code,
|
||||||
cb.standing,
|
cb.standing,
|
||||||
eb.nombrePiscine,
|
eb.nombrePiscine,
|
||||||
eb.montantLocatifAnnuelCalcule
|
eb.montantLocatifAnnuelCalcule,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM EnqueteBatiment eb
|
FROM EnqueteBatiment eb
|
||||||
LEFT JOIN eb.batiment b
|
LEFT JOIN eb.batiment b
|
||||||
@@ -302,6 +313,7 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
LEFT JOIN eb.user u
|
LEFT JOIN eb.user u
|
||||||
LEFT JOIN eb.exercice ex
|
LEFT JOIN eb.exercice ex
|
||||||
LEFT JOIN eb.categorieBatiment cb
|
LEFT JOIN eb.categorieBatiment cb
|
||||||
|
LEFT JOIN eb.usage us
|
||||||
WHERE b.id = :batimentId
|
WHERE b.id = :batimentId
|
||||||
""")
|
""")
|
||||||
List<EnqueteBatimentPayloadWeb> findAllByBatimentToDto(
|
List<EnqueteBatimentPayloadWeb> findAllByBatimentToDto(
|
||||||
@@ -358,7 +370,9 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
cb.code,
|
cb.code,
|
||||||
cb.standing,
|
cb.standing,
|
||||||
eb.nombrePiscine,
|
eb.nombrePiscine,
|
||||||
eb.montantLocatifAnnuelCalcule
|
eb.montantLocatifAnnuelCalcule,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM EnqueteBatiment eb
|
FROM EnqueteBatiment eb
|
||||||
LEFT JOIN eb.batiment b
|
LEFT JOIN eb.batiment b
|
||||||
@@ -366,6 +380,7 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
|
|||||||
LEFT JOIN eb.user u
|
LEFT JOIN eb.user u
|
||||||
LEFT JOIN eb.exercice ex
|
LEFT JOIN eb.exercice ex
|
||||||
LEFT JOIN eb.categorieBatiment cb
|
LEFT JOIN eb.categorieBatiment cb
|
||||||
|
LEFT JOIN eb.usage us
|
||||||
WHERE b.id = :batimentId
|
WHERE b.id = :batimentId
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
|
|||||||
@@ -98,7 +98,9 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
cb.code,
|
cb.code,
|
||||||
cb.standing,
|
cb.standing,
|
||||||
eul.nombrePiscine,
|
eul.nombrePiscine,
|
||||||
eul.montantLocatifAnnuelCalcule
|
eul.montantLocatifAnnuelCalcule,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM EnqueteUniteLogement eul
|
FROM EnqueteUniteLogement eul
|
||||||
LEFT JOIN eul.uniteLogement ul
|
LEFT JOIN eul.uniteLogement ul
|
||||||
@@ -106,6 +108,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
LEFT JOIN eul.user u
|
LEFT JOIN eul.user u
|
||||||
LEFT JOIN eul.exercice ex
|
LEFT JOIN eul.exercice ex
|
||||||
LEFT JOIN eul.categorieBatiment cb
|
LEFT JOIN eul.categorieBatiment cb
|
||||||
|
LEFT JOIN eul.usage us
|
||||||
WHERE eul.id = :enqueteUniteLogementId
|
WHERE eul.id = :enqueteUniteLogementId
|
||||||
""")
|
""")
|
||||||
Optional<EnqueteUniteLogementPayloadWeb> findEnqueteUniteLogementToDto(@Param("enqueteUniteLogementId") Long enqueteUniteLogementId);
|
Optional<EnqueteUniteLogementPayloadWeb> findEnqueteUniteLogementToDto(@Param("enqueteUniteLogementId") Long enqueteUniteLogementId);
|
||||||
@@ -157,7 +160,9 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
cb.code,
|
cb.code,
|
||||||
cb.standing,
|
cb.standing,
|
||||||
eul.nombrePiscine,
|
eul.nombrePiscine,
|
||||||
eul.montantLocatifAnnuelCalcule
|
eul.montantLocatifAnnuelCalcule,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM EnqueteUniteLogement eul
|
FROM EnqueteUniteLogement eul
|
||||||
LEFT JOIN eul.uniteLogement ul
|
LEFT JOIN eul.uniteLogement ul
|
||||||
@@ -165,6 +170,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
LEFT JOIN eul.user u
|
LEFT JOIN eul.user u
|
||||||
LEFT JOIN eul.exercice ex
|
LEFT JOIN eul.exercice ex
|
||||||
LEFT JOIN eul.categorieBatiment cb
|
LEFT JOIN eul.categorieBatiment cb
|
||||||
|
LEFT JOIN eul.usage us
|
||||||
""")
|
""")
|
||||||
List<EnqueteUniteLogementPayloadWeb> findAllEnqueteUniteLogementToDto();
|
List<EnqueteUniteLogementPayloadWeb> findAllEnqueteUniteLogementToDto();
|
||||||
|
|
||||||
@@ -217,7 +223,9 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
cb.code,
|
cb.code,
|
||||||
cb.standing,
|
cb.standing,
|
||||||
eul.nombrePiscine,
|
eul.nombrePiscine,
|
||||||
eul.montantLocatifAnnuelCalcule
|
eul.montantLocatifAnnuelCalcule,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM EnqueteUniteLogement eul
|
FROM EnqueteUniteLogement eul
|
||||||
LEFT JOIN eul.uniteLogement ul
|
LEFT JOIN eul.uniteLogement ul
|
||||||
@@ -225,6 +233,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
LEFT JOIN eul.user u
|
LEFT JOIN eul.user u
|
||||||
LEFT JOIN eul.exercice ex
|
LEFT JOIN eul.exercice ex
|
||||||
LEFT JOIN eul.categorieBatiment cb
|
LEFT JOIN eul.categorieBatiment cb
|
||||||
|
LEFT JOIN eul.usage us
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
SELECT COUNT(eul)
|
SELECT COUNT(eul)
|
||||||
@@ -283,7 +292,9 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
cb.code,
|
cb.code,
|
||||||
cb.standing,
|
cb.standing,
|
||||||
eul.nombrePiscine,
|
eul.nombrePiscine,
|
||||||
eul.montantLocatifAnnuelCalcule
|
eul.montantLocatifAnnuelCalcule,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM EnqueteUniteLogement eul
|
FROM EnqueteUniteLogement eul
|
||||||
LEFT JOIN eul.uniteLogement ul
|
LEFT JOIN eul.uniteLogement ul
|
||||||
@@ -291,6 +302,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
LEFT JOIN eul.user u
|
LEFT JOIN eul.user u
|
||||||
LEFT JOIN eul.exercice ex
|
LEFT JOIN eul.exercice ex
|
||||||
LEFT JOIN eul.categorieBatiment cb
|
LEFT JOIN eul.categorieBatiment cb
|
||||||
|
LEFT JOIN eul.usage us
|
||||||
WHERE ul.id = :uniteLogementId
|
WHERE ul.id = :uniteLogementId
|
||||||
""")
|
""")
|
||||||
List<EnqueteUniteLogementPayloadWeb> findAllByUniteLogementToDto(
|
List<EnqueteUniteLogementPayloadWeb> findAllByUniteLogementToDto(
|
||||||
@@ -345,7 +357,9 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
cb.code,
|
cb.code,
|
||||||
cb.standing,
|
cb.standing,
|
||||||
eul.nombrePiscine,
|
eul.nombrePiscine,
|
||||||
eul.montantLocatifAnnuelCalcule
|
eul.montantLocatifAnnuelCalcule,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM EnqueteUniteLogement eul
|
FROM EnqueteUniteLogement eul
|
||||||
LEFT JOIN eul.uniteLogement ul
|
LEFT JOIN eul.uniteLogement ul
|
||||||
@@ -353,6 +367,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
LEFT JOIN eul.user u
|
LEFT JOIN eul.user u
|
||||||
LEFT JOIN eul.exercice ex
|
LEFT JOIN eul.exercice ex
|
||||||
LEFT JOIN eul.categorieBatiment cb
|
LEFT JOIN eul.categorieBatiment cb
|
||||||
|
LEFT JOIN eul.usage us
|
||||||
WHERE ul.id = :uniteLogementId
|
WHERE ul.id = :uniteLogementId
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
@@ -413,7 +428,9 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
cb.code,
|
cb.code,
|
||||||
cb.standing,
|
cb.standing,
|
||||||
eul.nombrePiscine,
|
eul.nombrePiscine,
|
||||||
eul.montantLocatifAnnuelCalcule
|
eul.montantLocatifAnnuelCalcule,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM EnqueteUniteLogement eul
|
FROM EnqueteUniteLogement eul
|
||||||
LEFT JOIN eul.uniteLogement ul
|
LEFT JOIN eul.uniteLogement ul
|
||||||
@@ -421,6 +438,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
LEFT JOIN eul.user u
|
LEFT JOIN eul.user u
|
||||||
LEFT JOIN eul.exercice ex
|
LEFT JOIN eul.exercice ex
|
||||||
LEFT JOIN eul.categorieBatiment cb
|
LEFT JOIN eul.categorieBatiment cb
|
||||||
|
LEFT JOIN eul.usage us
|
||||||
WHERE ex.id = :exerciceId
|
WHERE ex.id = :exerciceId
|
||||||
""")
|
""")
|
||||||
List<EnqueteUniteLogementPayloadWeb> findAllByExerciceToDto(
|
List<EnqueteUniteLogementPayloadWeb> findAllByExerciceToDto(
|
||||||
@@ -475,7 +493,9 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
cb.code,
|
cb.code,
|
||||||
cb.standing,
|
cb.standing,
|
||||||
eul.nombrePiscine,
|
eul.nombrePiscine,
|
||||||
eul.montantLocatifAnnuelCalcule
|
eul.montantLocatifAnnuelCalcule ,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM EnqueteUniteLogement eul
|
FROM EnqueteUniteLogement eul
|
||||||
LEFT JOIN eul.uniteLogement ul
|
LEFT JOIN eul.uniteLogement ul
|
||||||
@@ -483,6 +503,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
|
|||||||
LEFT JOIN eul.user u
|
LEFT JOIN eul.user u
|
||||||
LEFT JOIN eul.exercice ex
|
LEFT JOIN eul.exercice ex
|
||||||
LEFT JOIN eul.categorieBatiment cb
|
LEFT JOIN eul.categorieBatiment cb
|
||||||
|
LEFT JOIN eul.usage us
|
||||||
WHERE ex.id = :exerciceId
|
WHERE ex.id = :exerciceId
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
|
|||||||
@@ -62,7 +62,9 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
|||||||
eul.montantLocatifAnnuelCalcule,
|
eul.montantLocatifAnnuelCalcule,
|
||||||
eul.valeurUniteLogementEstime,
|
eul.valeurUniteLogementEstime,
|
||||||
eul.valeurUniteLogementReel,
|
eul.valeurUniteLogementReel,
|
||||||
eul.nombrePiscine
|
eul.nombrePiscine,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM UniteLogement ul
|
FROM UniteLogement ul
|
||||||
JOIN ul.batiment b
|
JOIN ul.batiment b
|
||||||
@@ -75,6 +77,7 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
|||||||
WHERE eul2.uniteLogement = ul
|
WHERE eul2.uniteLogement = ul
|
||||||
)
|
)
|
||||||
LEFT JOIN eul.personne per
|
LEFT JOIN eul.personne per
|
||||||
|
LEFT JOIN eul.user us
|
||||||
WHERE ul.id = :uniteLogementId
|
WHERE ul.id = :uniteLogementId
|
||||||
""")
|
""")
|
||||||
Optional<UniteLogementPaylaodWeb> findUniteLogementAvecOccupantCourantToDto(@Param("uniteLogementId") Long uniteLogementId);
|
Optional<UniteLogementPaylaodWeb> findUniteLogementAvecOccupantCourantToDto(@Param("uniteLogementId") Long uniteLogementId);
|
||||||
@@ -106,7 +109,9 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
|||||||
eul.montantLocatifAnnuelCalcule,
|
eul.montantLocatifAnnuelCalcule,
|
||||||
eul.valeurUniteLogementEstime,
|
eul.valeurUniteLogementEstime,
|
||||||
eul.valeurUniteLogementReel,
|
eul.valeurUniteLogementReel,
|
||||||
eul.nombrePiscine
|
eul.nombrePiscine ,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM UniteLogement ul
|
FROM UniteLogement ul
|
||||||
JOIN ul.batiment b
|
JOIN ul.batiment b
|
||||||
@@ -119,6 +124,7 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
|||||||
WHERE eul2.uniteLogement = ul
|
WHERE eul2.uniteLogement = ul
|
||||||
)
|
)
|
||||||
LEFT JOIN eul.personne per
|
LEFT JOIN eul.personne per
|
||||||
|
LEFT JOIN eul.usage us
|
||||||
""")
|
""")
|
||||||
List<UniteLogementPaylaodWeb> findAllUnitesLogementAvecOccupantCourantToDto();
|
List<UniteLogementPaylaodWeb> findAllUnitesLogementAvecOccupantCourantToDto();
|
||||||
|
|
||||||
@@ -151,7 +157,9 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
|||||||
eul.montantLocatifAnnuelCalcule,
|
eul.montantLocatifAnnuelCalcule,
|
||||||
eul.valeurUniteLogementEstime,
|
eul.valeurUniteLogementEstime,
|
||||||
eul.valeurUniteLogementReel,
|
eul.valeurUniteLogementReel,
|
||||||
eul.nombrePiscine
|
eul.nombrePiscine,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM UniteLogement ul
|
FROM UniteLogement ul
|
||||||
JOIN ul.batiment b
|
JOIN ul.batiment b
|
||||||
@@ -164,6 +172,7 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
|||||||
WHERE eul2.uniteLogement = ul
|
WHERE eul2.uniteLogement = ul
|
||||||
)
|
)
|
||||||
LEFT JOIN eul.personne per
|
LEFT JOIN eul.personne per
|
||||||
|
LEFT JOIN eul.usage us
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
SELECT COUNT(ul)
|
SELECT COUNT(ul)
|
||||||
@@ -201,7 +210,9 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
|||||||
eul.montantLocatifAnnuelCalcule,
|
eul.montantLocatifAnnuelCalcule,
|
||||||
eul.valeurUniteLogementEstime,
|
eul.valeurUniteLogementEstime,
|
||||||
eul.valeurUniteLogementReel,
|
eul.valeurUniteLogementReel,
|
||||||
eul.nombrePiscine
|
eul.nombrePiscine ,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM UniteLogement ul
|
FROM UniteLogement ul
|
||||||
JOIN ul.batiment b
|
JOIN ul.batiment b
|
||||||
@@ -214,6 +225,7 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
|||||||
WHERE eul2.uniteLogement = ul
|
WHERE eul2.uniteLogement = ul
|
||||||
)
|
)
|
||||||
LEFT JOIN eul.personne per
|
LEFT JOIN eul.personne per
|
||||||
|
LEFT JOIN eul.usage us
|
||||||
WHERE b.id = :batimentId
|
WHERE b.id = :batimentId
|
||||||
""")
|
""")
|
||||||
List<UniteLogementPaylaodWeb> findUnitesLogementAvecOccupantCourantByBatimentToDto(
|
List<UniteLogementPaylaodWeb> findUnitesLogementAvecOccupantCourantByBatimentToDto(
|
||||||
@@ -248,7 +260,9 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
|||||||
eul.montantLocatifAnnuelCalcule,
|
eul.montantLocatifAnnuelCalcule,
|
||||||
eul.valeurUniteLogementEstime,
|
eul.valeurUniteLogementEstime,
|
||||||
eul.valeurUniteLogementReel,
|
eul.valeurUniteLogementReel,
|
||||||
eul.nombrePiscine
|
eul.nombrePiscine ,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM UniteLogement ul
|
FROM UniteLogement ul
|
||||||
JOIN ul.batiment b
|
JOIN ul.batiment b
|
||||||
@@ -261,6 +275,7 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
|||||||
WHERE eul2.uniteLogement = ul
|
WHERE eul2.uniteLogement = ul
|
||||||
)
|
)
|
||||||
LEFT JOIN eul.personne per
|
LEFT JOIN eul.personne per
|
||||||
|
LEFT JOIN eul.usage us
|
||||||
WHERE b.id = :batimentId
|
WHERE b.id = :batimentId
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
@@ -301,7 +316,9 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
|||||||
eul.montantLocatifAnnuelCalcule,
|
eul.montantLocatifAnnuelCalcule,
|
||||||
eul.valeurUniteLogementEstime,
|
eul.valeurUniteLogementEstime,
|
||||||
eul.valeurUniteLogementReel,
|
eul.valeurUniteLogementReel,
|
||||||
eul.nombrePiscine
|
eul.nombrePiscine ,
|
||||||
|
us.id,
|
||||||
|
us.nom
|
||||||
)
|
)
|
||||||
FROM UniteLogement ul
|
FROM UniteLogement ul
|
||||||
JOIN ul.batiment b
|
JOIN ul.batiment b
|
||||||
@@ -314,6 +331,7 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
|
|||||||
WHERE eul2.uniteLogement = ul
|
WHERE eul2.uniteLogement = ul
|
||||||
)
|
)
|
||||||
LEFT JOIN eul.personne per
|
LEFT JOIN eul.personne per
|
||||||
|
LEFT JOIN eul.usage us
|
||||||
where b.parcelle.id = :parcelleId
|
where b.parcelle.id = :parcelleId
|
||||||
""")
|
""")
|
||||||
List<UniteLogementPaylaodWeb> findAllUnitesLogementAvecOccupantCourantByParcelleToDto(@Param("parcelleId") Long parcelleId);
|
List<UniteLogementPaylaodWeb> findAllUnitesLogementAvecOccupantCourantByParcelleToDto(@Param("parcelleId") Long parcelleId);
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package io.gmss.fiscad.persistence.repositories.rfu.parametre;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.rfu.parametre.Usage;
|
||||||
|
import io.gmss.fiscad.entities.rfu.parametre.ZoneRfu;
|
||||||
|
import io.gmss.fiscad.paylaods.response.synchronisation.ZoneRfuSyncResponse;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface UsageRepository extends JpaRepository<Usage, Long> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -7,10 +7,7 @@ import io.gmss.fiscad.entities.infocad.metier.Piece;
|
|||||||
import io.gmss.fiscad.entities.infocad.metier.Upload;
|
import io.gmss.fiscad.entities.infocad.metier.Upload;
|
||||||
import io.gmss.fiscad.entities.infocad.parametre.*;
|
import io.gmss.fiscad.entities.infocad.parametre.*;
|
||||||
import io.gmss.fiscad.entities.rfu.metier.*;
|
import io.gmss.fiscad.entities.rfu.metier.*;
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.Caracteristique;
|
import io.gmss.fiscad.entities.rfu.parametre.*;
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
|
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.Exercice;
|
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.ZoneRfu;
|
|
||||||
import io.gmss.fiscad.entities.user.AvoirFonction;
|
import io.gmss.fiscad.entities.user.AvoirFonction;
|
||||||
import io.gmss.fiscad.entities.user.Fonction;
|
import io.gmss.fiscad.entities.user.Fonction;
|
||||||
import io.gmss.fiscad.entities.user.Profile;
|
import io.gmss.fiscad.entities.user.Profile;
|
||||||
@@ -632,6 +629,12 @@ public class EntityFromPayLoadService {
|
|||||||
eul.setCategorieBatiment(categorieBatiment);
|
eul.setCategorieBatiment(categorieBatiment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (enqueteUniteLogementPayloadWeb.getUsageId() != null) {
|
||||||
|
Usage usage = new Usage();
|
||||||
|
usage.setId(enqueteUniteLogementPayloadWeb.getUsageId());
|
||||||
|
eul.setUsage(usage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
eul.setId(enqueteUniteLogementPayloadWeb.getId());
|
eul.setId(enqueteUniteLogementPayloadWeb.getId());
|
||||||
eul.setObservation(enqueteUniteLogementPayloadWeb.getObservation());
|
eul.setObservation(enqueteUniteLogementPayloadWeb.getObservation());
|
||||||
@@ -701,6 +704,12 @@ public class EntityFromPayLoadService {
|
|||||||
enqueteBatiment.setCategorieBatiment(categorieBatiment);
|
enqueteBatiment.setCategorieBatiment(categorieBatiment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (enqueteBatimentPayloadWeb.getUsageId() != null) {
|
||||||
|
Usage usage = new Usage();
|
||||||
|
usage.setId(enqueteBatimentPayloadWeb.getUsageId());
|
||||||
|
enqueteBatiment.setUsage(usage);
|
||||||
|
}
|
||||||
|
|
||||||
// ======================
|
// ======================
|
||||||
// Champs simples
|
// Champs simples
|
||||||
// ======================
|
// ======================
|
||||||
|
|||||||
Reference in New Issue
Block a user