fusion maj parcelle,batiment,ulo et leur enquete #173
@@ -124,6 +124,7 @@ public class EnqueteController {
|
|||||||
@PutMapping("/rejet")
|
@PutMapping("/rejet")
|
||||||
public ResponseEntity<?> rejeterEnquete(@RequestBody EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
public ResponseEntity<?> rejeterEnquete(@RequestBody EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
new ApiResponse<>(true, enqueteService.rejeterEnquete(enqueteTraitementPayLoad), "Rejet effectuée avec succès."),
|
new ApiResponse<>(true, enqueteService.rejeterEnquete(enqueteTraitementPayLoad), "Rejet effectuée avec succès."),
|
||||||
HttpStatus.OK
|
HttpStatus.OK
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import io.gmss.fiscad.enums.StatutEnquete;
|
|||||||
import io.gmss.fiscad.exceptions.*;
|
import io.gmss.fiscad.exceptions.*;
|
||||||
import io.gmss.fiscad.interfaces.rfu.metier.EnqueteBatimentService;
|
import io.gmss.fiscad.interfaces.rfu.metier.EnqueteBatimentService;
|
||||||
import io.gmss.fiscad.paylaods.ApiResponse;
|
import io.gmss.fiscad.paylaods.ApiResponse;
|
||||||
|
import io.gmss.fiscad.paylaods.request.EnqueteTraitementPayLoad;
|
||||||
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteBatimentPayloadWeb;
|
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteBatimentPayloadWeb;
|
||||||
import io.gmss.fiscad.security.CurrentUser;
|
import io.gmss.fiscad.security.CurrentUser;
|
||||||
import io.gmss.fiscad.security.UserPrincipal;
|
import io.gmss.fiscad.security.UserPrincipal;
|
||||||
@@ -23,6 +24,8 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.client.HttpClientErrorException;
|
import org.springframework.web.client.HttpClientErrorException;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "api/enquete-batiment", produces = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(value = "api/enquete-batiment", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
@@ -288,4 +291,98 @@ public class EnqueteBatimentController {
|
|||||||
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("/validation")
|
||||||
|
public ResponseEntity<?> validerEnquete(@RequestBody EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
||||||
|
try {
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, enqueteBatimentService.validerEnquete(enqueteTraitementPayLoad), "Validation effectué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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/rejet")
|
||||||
|
public ResponseEntity<?> rejeterEnquete(@RequestBody EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, enqueteBatimentService.rejeterEnquete(enqueteTraitementPayLoad), "Rejet effectué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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/validation-lot")
|
||||||
|
public ResponseEntity<?> validerEnqueteParLot(@RequestBody List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads) {
|
||||||
|
try {
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, enqueteBatimentService.validerEnquete(enqueteTraitementPayLoads), "Validation effectué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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/rejet-lot")
|
||||||
|
public ResponseEntity<?> rejeterEnqueteParLot(@RequestBody List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads) {
|
||||||
|
try {
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, enqueteBatimentService.rejeterEnquete(enqueteTraitementPayLoads), "Rejet effectué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.enums.StatutEnquete;
|
|||||||
import io.gmss.fiscad.exceptions.*;
|
import io.gmss.fiscad.exceptions.*;
|
||||||
import io.gmss.fiscad.interfaces.rfu.metier.EnqueteUniteLogementService;
|
import io.gmss.fiscad.interfaces.rfu.metier.EnqueteUniteLogementService;
|
||||||
import io.gmss.fiscad.paylaods.ApiResponse;
|
import io.gmss.fiscad.paylaods.ApiResponse;
|
||||||
|
import io.gmss.fiscad.paylaods.request.EnqueteTraitementPayLoad;
|
||||||
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteUniteLogementPayloadWeb;
|
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteUniteLogementPayloadWeb;
|
||||||
import io.gmss.fiscad.security.CurrentUser;
|
import io.gmss.fiscad.security.CurrentUser;
|
||||||
import io.gmss.fiscad.security.UserPrincipal;
|
import io.gmss.fiscad.security.UserPrincipal;
|
||||||
@@ -23,6 +24,8 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.client.HttpClientErrorException;
|
import org.springframework.web.client.HttpClientErrorException;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "api/enquete-unite-logement", produces = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(value = "api/enquete-unite-logement", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
@@ -288,4 +291,98 @@ public class EnqueteUniteLogementController {
|
|||||||
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("/validation")
|
||||||
|
public ResponseEntity<?> validerEnquete(@RequestBody EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
||||||
|
try {
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, enqueteUniteLogementService.validerEnquete(enqueteTraitementPayLoad), "Validation effectué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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/rejet")
|
||||||
|
public ResponseEntity<?> rejeterEnquete(@RequestBody EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, enqueteUniteLogementService.rejeterEnquete(enqueteTraitementPayLoad), "Rejet effectué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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/validation-lot")
|
||||||
|
public ResponseEntity<?> validerEnqueteParLot(@RequestBody List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads) {
|
||||||
|
try {
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, enqueteUniteLogementService.validerEnquete(enqueteTraitementPayLoads), "Validation effectué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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/rejet-lot")
|
||||||
|
public ResponseEntity<?> rejeterEnqueteParLot(@RequestBody List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads) {
|
||||||
|
try {
|
||||||
|
return new ResponseEntity<>(
|
||||||
|
new ApiResponse<>(true, enqueteUniteLogementService.rejeterEnquete(enqueteTraitementPayLoads), "Rejet effectué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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,14 @@ public class EnqueteBatiment extends BaseEntity implements Serializable {
|
|||||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
private LocalDate dateEnquete;
|
private LocalDate dateEnquete;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||||
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
|
private LocalDate dateValidation;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||||
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
|
private LocalDate dateRejet;
|
||||||
|
private String descriptionMotifRejet;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Exercice exercice;
|
private Exercice exercice;
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,15 @@ public class EnqueteUniteLogement extends BaseEntity implements Serializable {
|
|||||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
private LocalDate dateEnquete;
|
private LocalDate dateEnquete;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||||
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
|
private LocalDate dateValidation;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||||
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
|
private LocalDate dateRejet;
|
||||||
|
private String descriptionMotifRejet;
|
||||||
private String observation;
|
private String observation;
|
||||||
private Long uniteLogementExternalKey;
|
private Long uniteLogementExternalKey;
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ import jakarta.persistence.EntityManager;
|
|||||||
import jakarta.persistence.PersistenceContext;
|
import jakarta.persistence.PersistenceContext;
|
||||||
import jakarta.persistence.Query;
|
import jakarta.persistence.Query;
|
||||||
import jakarta.transaction.Transactional;
|
import jakarta.transaction.Transactional;
|
||||||
|
import jakarta.ws.rs.NotAcceptableException;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.modelmapper.ModelMapper;
|
import org.modelmapper.ModelMapper;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -352,7 +353,7 @@ public class EnqueteServiceImpl implements EnqueteService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Enquete validerEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
public EnquetePayLoadWeb validerEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
||||||
if (enqueteTraitementPayLoad == null) {
|
if (enqueteTraitementPayLoad == null) {
|
||||||
throw new BadRequestException("Impossible de valider une enquête ayant un id null.");
|
throw new BadRequestException("Impossible de valider une enquête ayant un id null.");
|
||||||
}
|
}
|
||||||
@@ -360,15 +361,22 @@ public class EnqueteServiceImpl implements EnqueteService {
|
|||||||
if (!optionalEnquete.isPresent()) {
|
if (!optionalEnquete.isPresent()) {
|
||||||
throw new NotFoundException("Impossible de trouver l'enquête que vous désirez valider.");
|
throw new NotFoundException("Impossible de trouver l'enquête que vous désirez valider.");
|
||||||
}
|
}
|
||||||
|
if(optionalEnquete.get().getStatutEnquete()==StatutEnquete.CLOTURE ||
|
||||||
|
optionalEnquete.get().getStatutEnquete()==StatutEnquete.REJETE ){
|
||||||
|
throw new NotAcceptableException("Impossible de valider : Le statut actuel "+optionalEnquete.get().getStatutEnquete()+" ne le permet pas.");
|
||||||
|
}
|
||||||
|
|
||||||
Enquete enquete = optionalEnquete.get();
|
Enquete enquete = optionalEnquete.get();
|
||||||
enquete.setDateValidation(LocalDate.now());
|
enquete.setDateValidation(LocalDate.now());
|
||||||
enquete.setStatutEnquete(StatutEnquete.VALIDE);
|
enquete.setStatutEnquete(StatutEnquete.VALIDE);
|
||||||
enquete.setSynchronise(true);
|
enquete.setSynchronise(true);
|
||||||
return enqueteRepository.save(enquete);
|
|
||||||
|
enquete= enqueteRepository.save(enquete);
|
||||||
|
return enqueteRepository.findEnqueteToDto(enquete.getId()).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Enquete rejeterEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
public EnquetePayLoadWeb rejeterEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
||||||
if (enqueteTraitementPayLoad.getIdBackend() == null) {
|
if (enqueteTraitementPayLoad.getIdBackend() == null) {
|
||||||
throw new BadRequestException("Impossible de rejeter une enquête ayant un id null.");
|
throw new BadRequestException("Impossible de rejeter une enquête ayant un id null.");
|
||||||
}
|
}
|
||||||
@@ -376,38 +384,43 @@ public class EnqueteServiceImpl implements EnqueteService {
|
|||||||
if (!optionalEnquete.isPresent()) {
|
if (!optionalEnquete.isPresent()) {
|
||||||
throw new NotFoundException("Impossible de trouver l'enquête que vous désirez rejeter.");
|
throw new NotFoundException("Impossible de trouver l'enquête que vous désirez rejeter.");
|
||||||
}
|
}
|
||||||
|
if(optionalEnquete.get().getStatutEnquete()==StatutEnquete.CLOTURE ||
|
||||||
|
optionalEnquete.get().getStatutEnquete()==StatutEnquete.VALIDE ){
|
||||||
|
throw new NotAcceptableException("Impossible de rejeter : Le statut actuel "+optionalEnquete.get().getStatutEnquete()+" ne le permet pas.");
|
||||||
|
}
|
||||||
Enquete enquete = optionalEnquete.get();
|
Enquete enquete = optionalEnquete.get();
|
||||||
enquete.setDateRejet(LocalDate.now());
|
enquete.setDateRejet(LocalDate.now());
|
||||||
enquete.setDescriptionMotifRejet(enqueteTraitementPayLoad.getMotifRejet());
|
enquete.setDescriptionMotifRejet(enqueteTraitementPayLoad.getMotifRejet());
|
||||||
enquete.setStatutEnquete(StatutEnquete.REJETE);
|
enquete.setStatutEnquete(StatutEnquete.REJETE);
|
||||||
enquete.setSynchronise(false);
|
enquete.setSynchronise(false);
|
||||||
return enqueteRepository.save(enquete);
|
enquete= enqueteRepository.save(enquete);
|
||||||
|
return enqueteRepository.findEnqueteToDto(enquete.getId()).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Enquete> validerEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads) {
|
public List<EnquetePayLoadWeb> validerEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads) {
|
||||||
List<Enquete> enquetes = new ArrayList<>();
|
List<EnquetePayLoadWeb> enquetePayLoadWebs = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
for (EnqueteTraitementPayLoad enqueteTraitementPayLoad : enqueteTraitementPayLoads) {
|
for (EnqueteTraitementPayLoad enqueteTraitementPayLoad : enqueteTraitementPayLoads) {
|
||||||
enquetes.add(validerEnquete(enqueteTraitementPayLoad));
|
enquetePayLoadWebs.add(validerEnquete(enqueteTraitementPayLoad));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
enquetes.add(null);
|
enquetePayLoadWebs.add(null);
|
||||||
}
|
}
|
||||||
return enquetes;
|
return enquetePayLoadWebs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Enquete> rejeterEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads) {
|
public List<EnquetePayLoadWeb> rejeterEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads) {
|
||||||
List<Enquete> enquetes = new ArrayList<>();
|
List<EnquetePayLoadWeb> enquetePayLoadWebs = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
for (EnqueteTraitementPayLoad enqueteTraitementPayLoad : enqueteTraitementPayLoads) {
|
for (EnqueteTraitementPayLoad enqueteTraitementPayLoad : enqueteTraitementPayLoads) {
|
||||||
enquetes.add(rejeterEnquete(enqueteTraitementPayLoad));
|
enquetePayLoadWebs.add(rejeterEnquete(enqueteTraitementPayLoad));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
enquetes.add(null);
|
enquetePayLoadWebs.add(null);
|
||||||
}
|
}
|
||||||
return enquetes;
|
return enquetePayLoadWebs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -14,9 +14,11 @@ import io.gmss.fiscad.interfaces.decoupage.SecteurService;
|
|||||||
import io.gmss.fiscad.interfaces.rfu.metier.BatimentService;
|
import io.gmss.fiscad.interfaces.rfu.metier.BatimentService;
|
||||||
import io.gmss.fiscad.interfaces.rfu.metier.CaracteristiqueBatimentService;
|
import io.gmss.fiscad.interfaces.rfu.metier.CaracteristiqueBatimentService;
|
||||||
import io.gmss.fiscad.interfaces.rfu.metier.EnqueteBatimentService;
|
import io.gmss.fiscad.interfaces.rfu.metier.EnqueteBatimentService;
|
||||||
|
import io.gmss.fiscad.paylaods.request.EnqueteTraitementPayLoad;
|
||||||
import io.gmss.fiscad.paylaods.request.crudweb.BaremRfuNonBatiPayloadWeb;
|
import io.gmss.fiscad.paylaods.request.crudweb.BaremRfuNonBatiPayloadWeb;
|
||||||
import io.gmss.fiscad.paylaods.request.crudweb.BatimentPaylaodWeb;
|
import io.gmss.fiscad.paylaods.request.crudweb.BatimentPaylaodWeb;
|
||||||
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteBatimentPayloadWeb;
|
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteBatimentPayloadWeb;
|
||||||
|
import io.gmss.fiscad.paylaods.request.crudweb.EnquetePayLoadWeb;
|
||||||
import io.gmss.fiscad.persistence.repositories.infocad.metier.EnqueteRepository;
|
import io.gmss.fiscad.persistence.repositories.infocad.metier.EnqueteRepository;
|
||||||
import io.gmss.fiscad.persistence.repositories.infocad.metier.UploadRepository;
|
import io.gmss.fiscad.persistence.repositories.infocad.metier.UploadRepository;
|
||||||
import io.gmss.fiscad.persistence.repositories.infocad.parametre.PersonneRepository;
|
import io.gmss.fiscad.persistence.repositories.infocad.parametre.PersonneRepository;
|
||||||
@@ -24,12 +26,14 @@ import io.gmss.fiscad.persistence.repositories.rfu.metier.BatimentRepository;
|
|||||||
import io.gmss.fiscad.persistence.repositories.rfu.metier.EnqueteBatimentRepository;
|
import io.gmss.fiscad.persistence.repositories.rfu.metier.EnqueteBatimentRepository;
|
||||||
import io.gmss.fiscad.service.EntityFromPayLoadService;
|
import io.gmss.fiscad.service.EntityFromPayLoadService;
|
||||||
import jakarta.transaction.Transactional;
|
import jakarta.transaction.Transactional;
|
||||||
|
import jakarta.ws.rs.NotAcceptableException;
|
||||||
import lombok.AllArgsConstructor;
|
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.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@@ -172,4 +176,74 @@ public class EnqueteBatimentServiceImpl implements EnqueteBatimentService {
|
|||||||
|
|
||||||
return enqueteBatimentRepository.findAllEnqueteBatimentByQuartierByStatutToDtoPageable(quartierId,secteurIds,statutEnquete,pageable);
|
return enqueteBatimentRepository.findAllEnqueteBatimentByQuartierByStatutToDtoPageable(quartierId,secteurIds,statutEnquete,pageable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnqueteBatimentPayloadWeb validerEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
||||||
|
if (enqueteTraitementPayLoad == null || enqueteTraitementPayLoad.getIdBackend()==null) {
|
||||||
|
throw new BadRequestException("Impossible de valider une enquête ayant un id null.");
|
||||||
|
}
|
||||||
|
Optional<EnqueteBatiment> optionalEnqueteBatiment = enqueteBatimentRepository.findById(enqueteTraitementPayLoad.getIdBackend());
|
||||||
|
if (!optionalEnqueteBatiment.isPresent()) {
|
||||||
|
throw new NotFoundException("Impossible de trouver l'enquête que vous désirez valider.");
|
||||||
|
}
|
||||||
|
if(optionalEnqueteBatiment.get().getStatutEnquete()==StatutEnquete.CLOTURE ||
|
||||||
|
optionalEnqueteBatiment.get().getStatutEnquete()==StatutEnquete.REJETE ){
|
||||||
|
throw new NotAcceptableException("Impossible de valider : Le statut actuel "+optionalEnqueteBatiment.get().getStatutEnquete()+" ne le permet pas.");
|
||||||
|
}
|
||||||
|
|
||||||
|
EnqueteBatiment enqueteBatiment = optionalEnqueteBatiment.get();
|
||||||
|
enqueteBatiment.setDateValidation(LocalDate.now());
|
||||||
|
enqueteBatiment.setStatutEnquete(StatutEnquete.VALIDE);
|
||||||
|
|
||||||
|
enqueteBatiment= enqueteBatimentRepository.save(enqueteBatiment);
|
||||||
|
return enqueteBatimentRepository.findEnqueteBatimentByIdToDto(enqueteBatiment.getId()).orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnqueteBatimentPayloadWeb rejeterEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
||||||
|
if (enqueteTraitementPayLoad == null || enqueteTraitementPayLoad.getIdBackend()==null) {
|
||||||
|
throw new BadRequestException("Impossible de rejeter une enquête ayant un id null.");
|
||||||
|
}
|
||||||
|
Optional<EnqueteBatiment> optionalEnqueteBatiment = enqueteBatimentRepository.findById(enqueteTraitementPayLoad.getIdBackend());
|
||||||
|
if (!optionalEnqueteBatiment.isPresent()) {
|
||||||
|
throw new NotFoundException("Impossible de trouver l'enquête que vous désirez rejeter.");
|
||||||
|
}
|
||||||
|
if(optionalEnqueteBatiment.get().getStatutEnquete()==StatutEnquete.CLOTURE ||
|
||||||
|
optionalEnqueteBatiment.get().getStatutEnquete()==StatutEnquete.VALIDE ){
|
||||||
|
throw new NotAcceptableException("Impossible de rejeter : Le statut actuel "+optionalEnqueteBatiment.get().getStatutEnquete()+" ne le permet pas.");
|
||||||
|
}
|
||||||
|
EnqueteBatiment enqueteBatiment = optionalEnqueteBatiment.get();
|
||||||
|
enqueteBatiment.setDateRejet(LocalDate.now());
|
||||||
|
enqueteBatiment.setDescriptionMotifRejet(enqueteTraitementPayLoad.getMotifRejet());
|
||||||
|
enqueteBatiment.setStatutEnquete(StatutEnquete.REJETE);
|
||||||
|
enqueteBatiment= enqueteBatimentRepository.save(enqueteBatiment);
|
||||||
|
return enqueteBatimentRepository.findEnqueteBatimentByIdToDto(enqueteBatiment.getId()).orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<EnqueteBatimentPayloadWeb> validerEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads) {
|
||||||
|
List<EnqueteBatimentPayloadWeb> enqueteBatimentPayloadWebs = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
for (EnqueteTraitementPayLoad enqueteTraitementPayLoad : enqueteTraitementPayLoads) {
|
||||||
|
enqueteBatimentPayloadWebs.add(validerEnquete(enqueteTraitementPayLoad));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
enqueteBatimentPayloadWebs.add(null);
|
||||||
|
}
|
||||||
|
return enqueteBatimentPayloadWebs;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<EnqueteBatimentPayloadWeb> rejeterEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads) {
|
||||||
|
List<EnqueteBatimentPayloadWeb> enqueteBatimentPayloadWebs = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
for (EnqueteTraitementPayLoad enqueteTraitementPayLoad : enqueteTraitementPayLoads) {
|
||||||
|
enqueteBatimentPayloadWebs.add(rejeterEnquete(enqueteTraitementPayLoad));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
enqueteBatimentPayloadWebs.add(null);
|
||||||
|
}
|
||||||
|
return enqueteBatimentPayloadWebs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import io.gmss.fiscad.interfaces.decoupage.SecteurService;
|
|||||||
import io.gmss.fiscad.interfaces.rfu.metier.CaracteristiqueUniteLogementService;
|
import io.gmss.fiscad.interfaces.rfu.metier.CaracteristiqueUniteLogementService;
|
||||||
import io.gmss.fiscad.interfaces.rfu.metier.EnqueteUniteLogementService;
|
import io.gmss.fiscad.interfaces.rfu.metier.EnqueteUniteLogementService;
|
||||||
import io.gmss.fiscad.interfaces.rfu.metier.UniteLogementService;
|
import io.gmss.fiscad.interfaces.rfu.metier.UniteLogementService;
|
||||||
|
import io.gmss.fiscad.paylaods.request.EnqueteTraitementPayLoad;
|
||||||
|
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteBatimentPayloadWeb;
|
||||||
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteUniteLogementPayloadWeb;
|
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteUniteLogementPayloadWeb;
|
||||||
import io.gmss.fiscad.paylaods.request.crudweb.UniteLogementPaylaodWeb;
|
import io.gmss.fiscad.paylaods.request.crudweb.UniteLogementPaylaodWeb;
|
||||||
import io.gmss.fiscad.persistence.repositories.infocad.metier.EnqueteRepository;
|
import io.gmss.fiscad.persistence.repositories.infocad.metier.EnqueteRepository;
|
||||||
@@ -21,12 +23,14 @@ import io.gmss.fiscad.persistence.repositories.rfu.metier.EnqueteUniteLogementRe
|
|||||||
import io.gmss.fiscad.persistence.repositories.rfu.metier.UniteLogementRepository;
|
import io.gmss.fiscad.persistence.repositories.rfu.metier.UniteLogementRepository;
|
||||||
import io.gmss.fiscad.service.EntityFromPayLoadService;
|
import io.gmss.fiscad.service.EntityFromPayLoadService;
|
||||||
import jakarta.transaction.Transactional;
|
import jakarta.transaction.Transactional;
|
||||||
|
import jakarta.ws.rs.NotAcceptableException;
|
||||||
import lombok.AllArgsConstructor;
|
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.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@@ -174,4 +178,74 @@ public class EnqueteUniteLogementServiceImpl implements EnqueteUniteLogementServ
|
|||||||
|
|
||||||
return enqueteUniteLogementRepository.findAllEnqueteUniteLogementByQuartierByStatutToDtoPageable(quartierId,secteurIds,statutEnquete,pageable);
|
return enqueteUniteLogementRepository.findAllEnqueteUniteLogementByQuartierByStatutToDtoPageable(quartierId,secteurIds,statutEnquete,pageable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnqueteUniteLogementPayloadWeb validerEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
||||||
|
if (enqueteTraitementPayLoad == null || enqueteTraitementPayLoad.getIdBackend()==null) {
|
||||||
|
throw new BadRequestException("Impossible de valider une enquête ayant un id null.");
|
||||||
|
}
|
||||||
|
Optional<EnqueteUniteLogement> optionalEnqueteUniteLogement = enqueteUniteLogementRepository.findById(enqueteTraitementPayLoad.getIdBackend());
|
||||||
|
if (!optionalEnqueteUniteLogement.isPresent()) {
|
||||||
|
throw new NotFoundException("Impossible de trouver l'enquête que vous désirez valider.");
|
||||||
|
}
|
||||||
|
if(optionalEnqueteUniteLogement.get().getStatutEnquete()==StatutEnquete.CLOTURE ||
|
||||||
|
optionalEnqueteUniteLogement.get().getStatutEnquete()==StatutEnquete.REJETE ){
|
||||||
|
throw new NotAcceptableException("Impossible de valider : Le statut actuel "+optionalEnqueteUniteLogement.get().getStatutEnquete()+" ne le permet pas.");
|
||||||
|
}
|
||||||
|
|
||||||
|
EnqueteUniteLogement enqueteUniteLogement = optionalEnqueteUniteLogement.get();
|
||||||
|
enqueteUniteLogement.setDateValidation(LocalDate.now());
|
||||||
|
enqueteUniteLogement.setStatutEnquete(StatutEnquete.VALIDE);
|
||||||
|
|
||||||
|
enqueteUniteLogement= enqueteUniteLogementRepository.save(enqueteUniteLogement);
|
||||||
|
return enqueteUniteLogementRepository.findEnqueteUniteLogementToDto(enqueteUniteLogement.getId()).orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnqueteUniteLogementPayloadWeb rejeterEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad) {
|
||||||
|
if (enqueteTraitementPayLoad == null || enqueteTraitementPayLoad.getIdBackend()==null) {
|
||||||
|
throw new BadRequestException("Impossible de rejeter une enquête ayant un id null.");
|
||||||
|
}
|
||||||
|
Optional<EnqueteUniteLogement> optionalEnqueteUniteLogement = enqueteUniteLogementRepository.findById(enqueteTraitementPayLoad.getIdBackend());
|
||||||
|
if (!optionalEnqueteUniteLogement.isPresent()) {
|
||||||
|
throw new NotFoundException("Impossible de trouver l'enquête que vous désirez rejeter.");
|
||||||
|
}
|
||||||
|
if(optionalEnqueteUniteLogement.get().getStatutEnquete()==StatutEnquete.CLOTURE ||
|
||||||
|
optionalEnqueteUniteLogement.get().getStatutEnquete()==StatutEnquete.VALIDE ){
|
||||||
|
throw new NotAcceptableException("Impossible de rejeter : Le statut actuel "+optionalEnqueteUniteLogement.get().getStatutEnquete()+" ne le permet pas.");
|
||||||
|
}
|
||||||
|
EnqueteUniteLogement enqueteUniteLogement = optionalEnqueteUniteLogement.get();
|
||||||
|
enqueteUniteLogement.setDateRejet(LocalDate.now());
|
||||||
|
enqueteUniteLogement.setDescriptionMotifRejet(enqueteTraitementPayLoad.getMotifRejet());
|
||||||
|
enqueteUniteLogement.setStatutEnquete(StatutEnquete.REJETE);
|
||||||
|
enqueteUniteLogement= enqueteUniteLogementRepository.save(enqueteUniteLogement);
|
||||||
|
return enqueteUniteLogementRepository.findEnqueteUniteLogementToDto(enqueteUniteLogement.getId()).orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<EnqueteUniteLogementPayloadWeb> validerEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads) {
|
||||||
|
List<EnqueteUniteLogementPayloadWeb> enqueteUniteLogementPayloadWebs = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
for (EnqueteTraitementPayLoad enqueteTraitementPayLoad : enqueteTraitementPayLoads) {
|
||||||
|
enqueteUniteLogementPayloadWebs.add(validerEnquete(enqueteTraitementPayLoad));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
enqueteUniteLogementPayloadWebs.add(null);
|
||||||
|
}
|
||||||
|
return enqueteUniteLogementPayloadWebs;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<EnqueteUniteLogementPayloadWeb> rejeterEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads) {
|
||||||
|
List<EnqueteUniteLogementPayloadWeb> enqueteUniteLogementPayloadWebs = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
for (EnqueteTraitementPayLoad enqueteTraitementPayLoad : enqueteTraitementPayLoads) {
|
||||||
|
enqueteUniteLogementPayloadWebs.add(rejeterEnquete(enqueteTraitementPayLoad));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
enqueteUniteLogementPayloadWebs.add(null);
|
||||||
|
}
|
||||||
|
return enqueteUniteLogementPayloadWebs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,13 +40,13 @@ public interface EnqueteService {
|
|||||||
|
|
||||||
Optional<EnquetePayLoadWeb> getEnqueteById(Long id);
|
Optional<EnquetePayLoadWeb> getEnqueteById(Long id);
|
||||||
|
|
||||||
Enquete validerEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad);
|
EnquetePayLoadWeb validerEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad);
|
||||||
|
|
||||||
Enquete rejeterEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad);
|
EnquetePayLoadWeb rejeterEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad);
|
||||||
|
|
||||||
List<Enquete> validerEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads);
|
List<EnquetePayLoadWeb> validerEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads);
|
||||||
|
|
||||||
List<Enquete> rejeterEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads);
|
List<EnquetePayLoadWeb> rejeterEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads);
|
||||||
|
|
||||||
Enquete finaliserEnquete(Long enqueteId);
|
Enquete finaliserEnquete(Long enqueteId);
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import io.gmss.fiscad.entities.rfu.metier.EnqueteBatiment;
|
|||||||
import io.gmss.fiscad.enums.StatutEnquete;
|
import io.gmss.fiscad.enums.StatutEnquete;
|
||||||
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.EnqueteTraitementPayLoad;
|
||||||
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteBatimentPayloadWeb;
|
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteBatimentPayloadWeb;
|
||||||
import io.gmss.fiscad.paylaods.request.crudweb.EnquetePayLoadWeb;
|
import io.gmss.fiscad.paylaods.request.crudweb.EnquetePayLoadWeb;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -31,4 +32,12 @@ public interface EnqueteBatimentService {
|
|||||||
|
|
||||||
Page<EnqueteBatimentPayloadWeb> getEnqueteBatimentListByQuartierByStatutPageableToDto(Long userId, Long quartierId, StatutEnquete statutEnquete, Pageable pageable);
|
Page<EnqueteBatimentPayloadWeb> getEnqueteBatimentListByQuartierByStatutPageableToDto(Long userId, Long quartierId, StatutEnquete statutEnquete, Pageable pageable);
|
||||||
|
|
||||||
|
EnqueteBatimentPayloadWeb validerEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad);
|
||||||
|
|
||||||
|
EnqueteBatimentPayloadWeb rejeterEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad);
|
||||||
|
|
||||||
|
List<EnqueteBatimentPayloadWeb> validerEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads);
|
||||||
|
|
||||||
|
List<EnqueteBatimentPayloadWeb> rejeterEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import io.gmss.fiscad.entities.rfu.metier.EnqueteUniteLogement;
|
|||||||
import io.gmss.fiscad.enums.StatutEnquete;
|
import io.gmss.fiscad.enums.StatutEnquete;
|
||||||
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.EnqueteTraitementPayLoad;
|
||||||
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteBatimentPayloadWeb;
|
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteBatimentPayloadWeb;
|
||||||
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteUniteLogementPayloadWeb;
|
import io.gmss.fiscad.paylaods.request.crudweb.EnqueteUniteLogementPayloadWeb;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -32,4 +33,11 @@ public interface EnqueteUniteLogementService {
|
|||||||
|
|
||||||
Page<EnqueteUniteLogementPayloadWeb> getEnqueteUniteLogementListByQuartierByStatutPageableToDto(Long userId, Long quartierId, StatutEnquete statutEnquete, Pageable pageable);
|
Page<EnqueteUniteLogementPayloadWeb> getEnqueteUniteLogementListByQuartierByStatutPageableToDto(Long userId, Long quartierId, StatutEnquete statutEnquete, Pageable pageable);
|
||||||
|
|
||||||
|
EnqueteUniteLogementPayloadWeb validerEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad);
|
||||||
|
|
||||||
|
EnqueteUniteLogementPayloadWeb rejeterEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad);
|
||||||
|
|
||||||
|
List<EnqueteUniteLogementPayloadWeb> validerEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads);
|
||||||
|
|
||||||
|
List<EnqueteUniteLogementPayloadWeb> rejeterEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user