avant ajout de la logique traitement différé de la synchronisation
This commit is contained in:
@@ -12,6 +12,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.client.HttpClientErrorException;
|
import org.springframework.web.client.HttpClientErrorException;
|
||||||
|
|
||||||
@@ -20,6 +21,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Actuer concerné")
|
@Tag(name = "Actuer concerné")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class ActeurConcerneController {
|
public class ActeurConcerneController {
|
||||||
|
|
||||||
private final ActeurConcerneService acteurConcerneService;
|
private final ActeurConcerneService acteurConcerneService;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
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;
|
||||||
@@ -27,6 +28,7 @@ import java.util.List;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Commentaire")
|
@Tag(name = "Commentaire")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class CommentaireController {
|
public class CommentaireController {
|
||||||
|
|
||||||
private final CommentaireService commentaireService;
|
private final CommentaireService commentaireService;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import org.springframework.data.domain.Pageable;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
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;
|
||||||
@@ -27,6 +28,7 @@ import java.util.List;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Enquête")
|
@Tag(name = "Enquête")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class EnqueteController {
|
public class EnqueteController {
|
||||||
|
|
||||||
private final EnqueteService enqueteService;
|
private final EnqueteService enqueteService;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import org.springframework.data.domain.Pageable;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "ParcelleGeometrie")
|
@Tag(name = "ParcelleGeometrie")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class ParcelleGeomController {
|
public class ParcelleGeomController {
|
||||||
|
|
||||||
private final ParcelleGeomService parcelleGeomService;
|
private final ParcelleGeomService parcelleGeomService;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "api/personne", produces = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(value = "api/personne", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class PersonneController {
|
public class PersonneController {
|
||||||
|
|
||||||
private final PersonneService personneService;
|
private final PersonneService personneService;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.springframework.data.domain.Pageable;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
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;
|
||||||
@@ -25,6 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Tpe")
|
@Tag(name = "Tpe")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class TpeController {
|
public class TpeController {
|
||||||
|
|
||||||
private final TpeService tpeService;
|
private final TpeService tpeService;
|
||||||
@@ -60,7 +62,7 @@ public class TpeController {
|
|||||||
@PostMapping("/re-create")
|
@PostMapping("/re-create")
|
||||||
public ResponseEntity<?> reCreateTpe(@RequestBody @Valid @Validated Tpe tpe) {
|
public ResponseEntity<?> reCreateTpe(@RequestBody @Valid @Validated Tpe tpe) {
|
||||||
try{
|
try{
|
||||||
tpe = tpeService.reCreateExistTpe(tpe);
|
tpe = tpeService.majTpe(tpe.getId(),tpe);
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
new ApiResponse<>(true, tpe, "Tpe créé avec succès."),
|
new ApiResponse<>(true, tpe, "Tpe créé avec succès."),
|
||||||
HttpStatus.OK
|
HttpStatus.OK
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import org.springframework.http.HttpHeaders;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
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 org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
@@ -34,6 +35,7 @@ import java.time.format.DateTimeFormatter;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Upload")
|
@Tag(name = "Upload")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class UploadController {
|
public class UploadController {
|
||||||
|
|
||||||
boolean headIsValid = false;
|
boolean headIsValid = false;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Bloc")
|
@Tag(name = "Bloc")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class BlocController {
|
public class BlocController {
|
||||||
|
|
||||||
private final BlocService blocService;
|
private final BlocService blocService;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Mode d'acquisition")
|
@Tag(name = "Mode d'acquisition")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class ModeAcquisitionController {
|
public class ModeAcquisitionController {
|
||||||
|
|
||||||
private final ModeAcquisitionService modeAcquisitionService;
|
private final ModeAcquisitionService modeAcquisitionService;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Nature domaine")
|
@Tag(name = "Nature domaine")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class NatureDomaineController {
|
public class NatureDomaineController {
|
||||||
|
|
||||||
private final NatureDomaineService natureDomaineService;
|
private final NatureDomaineService natureDomaineService;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Position représentation")
|
@Tag(name = "Position représentation")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class PositionRepresentationController {
|
public class PositionRepresentationController {
|
||||||
|
|
||||||
private final PositionRepresentationService positionRepresentationService;
|
private final PositionRepresentationService positionRepresentationService;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Profession")
|
@Tag(name = "Profession")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class ProfessionController {
|
public class ProfessionController {
|
||||||
|
|
||||||
private final ProfessionService professionService;
|
private final ProfessionService professionService;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Situation géographique")
|
@Tag(name = "Situation géographique")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class SituationGeographiqueController {
|
public class SituationGeographiqueController {
|
||||||
|
|
||||||
private final SituationGeographiqueService situationGeographiqueService;
|
private final SituationGeographiqueService situationGeographiqueService;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Situation matrimoniale")
|
@Tag(name = "Situation matrimoniale")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class SituationMatrimonialeController {
|
public class SituationMatrimonialeController {
|
||||||
|
|
||||||
private final SituationMatrimonialeService situationMatrimonialeService;
|
private final SituationMatrimonialeService situationMatrimonialeService;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Source de droit")
|
@Tag(name = "Source de droit")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class SourceDroitController {
|
public class SourceDroitController {
|
||||||
|
|
||||||
private final SourceDroitService sourceDroitService;
|
private final SourceDroitService sourceDroitService;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Structure")
|
@Tag(name = "Structure")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class StructureController {
|
public class StructureController {
|
||||||
|
|
||||||
private final StructureService structureService;
|
private final StructureService structureService;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Type de contestation")
|
@Tag(name = "Type de contestation")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class TypeContestationController {
|
public class TypeContestationController {
|
||||||
|
|
||||||
private final TypeContestationService typeContestationService;
|
private final TypeContestationService typeContestationService;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Type de domaine")
|
@Tag(name = "Type de domaine")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class TypeDomaineController {
|
public class TypeDomaineController {
|
||||||
|
|
||||||
private final TypeDomaineService typeDomaineService;
|
private final TypeDomaineService typeDomaineService;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Type de personne")
|
@Tag(name = "Type de personne")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class TypePersonneController {
|
public class TypePersonneController {
|
||||||
|
|
||||||
private final TypePersonneService typePersonneService;
|
private final TypePersonneService typePersonneService;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Type de pièce")
|
@Tag(name = "Type de pièce")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class TypePieceController {
|
public class TypePieceController {
|
||||||
|
|
||||||
private final TypePieceService typePieceService;
|
private final TypePieceService typePieceService;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
|
|||||||
@SecurityRequirement(name = "bearer")
|
@SecurityRequirement(name = "bearer")
|
||||||
@Tag(name = "Type de représentation")
|
@Tag(name = "Type de représentation")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public class TypeRepresentationController {
|
public class TypeRepresentationController {
|
||||||
|
|
||||||
private final TypeRepresentationService typeRepresentationService;
|
private final TypeRepresentationService typeRepresentationService;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
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 org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
@@ -26,6 +27,7 @@ import java.util.List;
|
|||||||
@Tag(name = "Synchronisation")
|
@Tag(name = "Synchronisation")
|
||||||
@CrossOrigin(origins = "*")
|
@CrossOrigin(origins = "*")
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
|
||||||
public class SynchronisationController {
|
public class SynchronisationController {
|
||||||
private final SynchronisationService synchronisationService;
|
private final SynchronisationService synchronisationService;
|
||||||
private final EnqueteService enqueteService;
|
private final EnqueteService enqueteService;
|
||||||
@@ -80,6 +82,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
@Transactional
|
@Transactional
|
||||||
@PostMapping("/personnes")
|
@PostMapping("/personnes")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncPersonne(@RequestBody List<PersonnePayLoad> personnePayLoads) {
|
public ResponseEntity<?> syncPersonne(@RequestBody List<PersonnePayLoad> personnePayLoads) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -103,6 +106,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/membre-groupe")
|
@PostMapping("/membre-groupe")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncMembreGroupe(@RequestBody List<MembreGroupePayLoad> membreGroupePayLoads) {
|
public ResponseEntity<?> syncMembreGroupe(@RequestBody List<MembreGroupePayLoad> membreGroupePayLoads) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -126,6 +130,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/enquete")
|
@PostMapping("/enquete")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncEnquete(@RequestBody List<EnquetePayLoad> enquetePayLoads) {
|
public ResponseEntity<?> syncEnquete(@RequestBody List<EnquetePayLoad> enquetePayLoads) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -149,6 +154,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/parcelle")
|
@PostMapping("/parcelle")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncParcelle(@RequestBody List<ParcellePayLoad> parcellePayLoads) {
|
public ResponseEntity<?> syncParcelle(@RequestBody List<ParcellePayLoad> parcellePayLoads) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -172,6 +178,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/piece")
|
@PostMapping("/piece")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncPiece(@RequestBody List<PiecePayLoad> piecePayLoads) {
|
public ResponseEntity<?> syncPiece(@RequestBody List<PiecePayLoad> piecePayLoads) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -196,6 +203,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/acteur-concerne")
|
@PostMapping("/acteur-concerne")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncActeurConcerne(@RequestBody List<ActeurConcernePayLoad> piecePayLoads) {
|
public ResponseEntity<?> syncActeurConcerne(@RequestBody List<ActeurConcernePayLoad> piecePayLoads) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -221,6 +229,7 @@ public class SynchronisationController {
|
|||||||
|
|
||||||
//@PostMapping("/files")
|
//@PostMapping("/files")
|
||||||
@PostMapping(path = "/files")
|
@PostMapping(path = "/files")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncFiles(@RequestPart(required = true) MultipartFile file,
|
public ResponseEntity<?> syncFiles(@RequestPart(required = true) MultipartFile file,
|
||||||
@RequestParam(value = "idBackend",required = false) Long idBackend,
|
@RequestParam(value = "idBackend",required = false) Long idBackend,
|
||||||
@RequestParam(value = "externalKey",required = true) Long externalKey,
|
@RequestParam(value = "externalKey",required = true) Long externalKey,
|
||||||
@@ -274,6 +283,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(path = "/synchronise/all-enquete-data")
|
@PostMapping(path = "/synchronise/all-enquete-data")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncAllEnqueteData(@ModelAttribute EnqueteAllDataPayload enqueteAllDataPayload) {
|
public ResponseEntity<?> syncAllEnqueteData(@ModelAttribute EnqueteAllDataPayload enqueteAllDataPayload) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -297,6 +307,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(path = "/synchronise/enquete/confirme-from-mobile")
|
@PostMapping(path = "/synchronise/enquete/confirme-from-mobile")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncAllEnqueteData(@RequestBody List<Long> longList) {
|
public ResponseEntity<?> syncAllEnqueteData(@RequestBody List<Long> longList) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -326,6 +337,7 @@ public class SynchronisationController {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@PostMapping(path = "/batiment")
|
@PostMapping(path = "/batiment")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncBatiment(@RequestBody List<BatimentPaylaod> batimentPaylaods) {
|
public ResponseEntity<?> syncBatiment(@RequestBody List<BatimentPaylaod> batimentPaylaods) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -350,6 +362,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(path = "/unite-logement")
|
@PostMapping(path = "/unite-logement")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncUniteLogement(@RequestBody List<UniteLogementPaylaod> uniteLogementPaylaods) {
|
public ResponseEntity<?> syncUniteLogement(@RequestBody List<UniteLogementPaylaod> uniteLogementPaylaods) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -374,6 +387,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(path = "/caracteristique-batiment")
|
@PostMapping(path = "/caracteristique-batiment")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncCaracteristiqueBatiment(@RequestBody List<CaracteristiqueBatimentPaylod> caracteristiqueBatimentPaylods) {
|
public ResponseEntity<?> syncCaracteristiqueBatiment(@RequestBody List<CaracteristiqueBatimentPaylod> caracteristiqueBatimentPaylods) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -398,6 +412,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(path = "/caracteristique-parcelle")
|
@PostMapping(path = "/caracteristique-parcelle")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncCaracteristiqueParcelle(@RequestBody List<CaracteristiqueParcellePaylod> caracteristiqueParcellePaylods) {
|
public ResponseEntity<?> syncCaracteristiqueParcelle(@RequestBody List<CaracteristiqueParcellePaylod> caracteristiqueParcellePaylods) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -422,6 +437,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(path = "/caracteristique-unite-logement")
|
@PostMapping(path = "/caracteristique-unite-logement")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncCaracteristiqueUniteLogement(@RequestBody List<CaracteristiqueUniteLogementPaylod> caracteristiqueUniteLogementPaylods) {
|
public ResponseEntity<?> syncCaracteristiqueUniteLogement(@RequestBody List<CaracteristiqueUniteLogementPaylod> caracteristiqueUniteLogementPaylods) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -446,6 +462,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/enquete-batiment")
|
@PostMapping("/enquete-batiment")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncEnqueteBatiment(@RequestBody List<EnqueteBatimentPayload> enqueteBatimentPayloads) {
|
public ResponseEntity<?> syncEnqueteBatiment(@RequestBody List<EnqueteBatimentPayload> enqueteBatimentPayloads) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -470,6 +487,7 @@ public class SynchronisationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/enquete-unite-logement")
|
@PostMapping("/enquete-unite-logement")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> syncEnqueteUniteLogement(@RequestBody List<EnqueteUniteLogementPayload> enqueteUniteLogementPayloads) {
|
public ResponseEntity<?> syncEnqueteUniteLogement(@RequestBody List<EnqueteUniteLogementPayload> enqueteUniteLogementPayloads) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
@@ -496,6 +514,7 @@ public class SynchronisationController {
|
|||||||
|
|
||||||
|
|
||||||
@GetMapping("/traiter-non-synch-to-mobile/{terminalId}")
|
@GetMapping("/traiter-non-synch-to-mobile/{terminalId}")
|
||||||
|
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
|
||||||
public ResponseEntity<?> getEnqueteValideNonSynch(@PathVariable Long terminalId) {
|
public ResponseEntity<?> getEnqueteValideNonSynch(@PathVariable Long terminalId) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(
|
return new ResponseEntity<>(
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.ActeurConcernePayLoad;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataActeurConcerne extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private ActeurConcernePayLoad acteurConcernePayLoad ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.BatimentPaylaod;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataBatiment extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private BatimentPaylaod batimentPaylaod ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.CaracteristiqueBatimentPaylod;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataCaracteristiqueBatiment extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private CaracteristiqueBatimentPaylod caracteristiqueBatimentPaylod ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.CaracteristiqueParcellePaylod;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataCaracteristiqueParcelle extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private CaracteristiqueParcellePaylod caracteristiqueParcellePaylod ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.CaracteristiqueUniteLogementPaylod;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataCaracteristiqueUniteLogement extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private CaracteristiqueUniteLogementPaylod caracteristiqueUniteLogementPaylod ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.EnquetePayLoad;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataEnquete extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private EnquetePayLoad enquetePayLoad ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.EnqueteBatimentPayload;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataEnqueteBatiment extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private EnqueteBatimentPayload enqueteBatimentPayload ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.EnqueteUniteLogementPayload;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataEnqueteUniteLogement extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private EnqueteUniteLogementPayload enqueteUniteLogementPayload ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.MembreGroupePayLoad;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataMembreGroupe extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private MembreGroupePayLoad membreGroupePayLoad ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.ParcellePayLoad;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataParcelle extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private ParcellePayLoad parcellePayLoad ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.PersonnePayLoad;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataPersonne extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private PersonnePayLoad personnePayLoad ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.PiecePayLoad;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataPiece extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private PiecePayLoad piecePayLoad ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.ParcellePayLoad;
|
||||||
|
import io.gmss.fiscad.paylaods.request.UniteLogementPaylaod;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataUniteLogement extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private UniteLogementPaylaod uniteLogementPaylaod ;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package io.gmss.fiscad.entities.metadata;
|
||||||
|
|
||||||
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
||||||
|
import io.gmss.fiscad.entities.BaseEntity;
|
||||||
|
import io.gmss.fiscad.paylaods.request.UploadPayLoad;
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.Type;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class MobileDataUpload extends BaseEntity implements Serializable {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Type(JsonBinaryType.class)
|
||||||
|
@Column(columnDefinition = "jsonb")
|
||||||
|
private UploadPayLoad uploadPayLoad ;
|
||||||
|
}
|
||||||
18
src/main/java/io/gmss/fiscad/enums/TypeObjet.java
Normal file
18
src/main/java/io/gmss/fiscad/enums/TypeObjet.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package io.gmss.fiscad.enums;
|
||||||
|
|
||||||
|
public enum TypeObjet {
|
||||||
|
PARCELLE,
|
||||||
|
PERSONNE,
|
||||||
|
MEMBREGROUPE,
|
||||||
|
ACTEURCONCERNER,
|
||||||
|
PIECE,
|
||||||
|
UPLOAD,
|
||||||
|
BATIMENT,
|
||||||
|
UNITELOGEMENT,
|
||||||
|
ENQUETEBATIMENT,
|
||||||
|
ENQUETEUNITELOGEMENT,
|
||||||
|
CARACTERISTIQUEPARCELLE,
|
||||||
|
CARACTERISTIQUEBATIMENT,
|
||||||
|
CARACTERISTIQUEUNITELOGEMENT
|
||||||
|
}
|
||||||
|
|
||||||
@@ -69,6 +69,8 @@ public class TpeServiceImpl implements TpeService {
|
|||||||
tpe.getModel(),
|
tpe.getModel(),
|
||||||
tpe.getCodeEquipe()
|
tpe.getCodeEquipe()
|
||||||
);
|
);
|
||||||
|
}else{
|
||||||
|
tpeRepository.save(optionalTpe.get());
|
||||||
}
|
}
|
||||||
return tpe ;
|
return tpe ;
|
||||||
}
|
}
|
||||||
@@ -127,6 +129,7 @@ public class TpeServiceImpl implements TpeService {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Tpe reCreateExistTpe(Tpe tpe) throws BadRequestException {
|
public Tpe reCreateExistTpe(Tpe tpe) throws BadRequestException {
|
||||||
|
|
||||||
tpeRepository.save(tpe);
|
tpeRepository.save(tpe);
|
||||||
return tpe;
|
return tpe;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,17 +5,13 @@ import io.gmss.fiscad.entities.decoupage.Nationalite;
|
|||||||
import io.gmss.fiscad.entities.decoupage.Quartier;
|
import io.gmss.fiscad.entities.decoupage.Quartier;
|
||||||
import io.gmss.fiscad.entities.infocad.metier.*;
|
import io.gmss.fiscad.entities.infocad.metier.*;
|
||||||
import io.gmss.fiscad.entities.infocad.parametre.*;
|
import io.gmss.fiscad.entities.infocad.parametre.*;
|
||||||
import io.gmss.fiscad.entities.metadata.PieceMetaData;
|
import io.gmss.fiscad.entities.metadata.*;
|
||||||
import io.gmss.fiscad.entities.metadata.UploadMetaData;
|
|
||||||
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.Caracteristique;
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.TypeCaracteristique;
|
import io.gmss.fiscad.entities.rfu.parametre.TypeCaracteristique;
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.ZoneRfu;
|
import io.gmss.fiscad.entities.rfu.parametre.ZoneRfu;
|
||||||
import io.gmss.fiscad.entities.user.User;
|
import io.gmss.fiscad.entities.user.User;
|
||||||
import io.gmss.fiscad.enums.Categorie;
|
import io.gmss.fiscad.enums.*;
|
||||||
import io.gmss.fiscad.enums.ProfileApp;
|
|
||||||
import io.gmss.fiscad.enums.StatusEnquete;
|
|
||||||
import io.gmss.fiscad.enums.StatutEnregistrement;
|
|
||||||
import io.gmss.fiscad.interfaces.infocad.metier.ParcelleGeomService;
|
import io.gmss.fiscad.interfaces.infocad.metier.ParcelleGeomService;
|
||||||
import io.gmss.fiscad.interfaces.synchronisation.SynchronisationService;
|
import io.gmss.fiscad.interfaces.synchronisation.SynchronisationService;
|
||||||
import io.gmss.fiscad.interfaces.user.UserService;
|
import io.gmss.fiscad.interfaces.user.UserService;
|
||||||
@@ -24,8 +20,7 @@ import io.gmss.fiscad.paylaods.response.*;
|
|||||||
import io.gmss.fiscad.repositories.decoupage.*;
|
import io.gmss.fiscad.repositories.decoupage.*;
|
||||||
import io.gmss.fiscad.repositories.infocad.metier.*;
|
import io.gmss.fiscad.repositories.infocad.metier.*;
|
||||||
import io.gmss.fiscad.repositories.infocad.parametre.*;
|
import io.gmss.fiscad.repositories.infocad.parametre.*;
|
||||||
import io.gmss.fiscad.repositories.metadata.PieceMetaDataRepository;
|
import io.gmss.fiscad.repositories.metadata.*;
|
||||||
import io.gmss.fiscad.repositories.metadata.UploadMetaDataRepository;
|
|
||||||
import io.gmss.fiscad.repositories.rfu.metier.*;
|
import io.gmss.fiscad.repositories.rfu.metier.*;
|
||||||
import io.gmss.fiscad.repositories.rfu.parametre.CaracteristiqueRepository;
|
import io.gmss.fiscad.repositories.rfu.parametre.CaracteristiqueRepository;
|
||||||
import io.gmss.fiscad.repositories.rfu.parametre.TypeCaracteristiqueRepository;
|
import io.gmss.fiscad.repositories.rfu.parametre.TypeCaracteristiqueRepository;
|
||||||
@@ -96,6 +91,20 @@ public class SynchronisationServiceImpl implements SynchronisationService {
|
|||||||
private final CaracteristiqueParcelleRepository caracteristiqueParcelleRepository;
|
private final CaracteristiqueParcelleRepository caracteristiqueParcelleRepository;
|
||||||
private final CaracteristiqueUniteLogementRepository caracteristiqueUniteLogementRepository;
|
private final CaracteristiqueUniteLogementRepository caracteristiqueUniteLogementRepository;
|
||||||
private final ParcelleGeomService parcelleGeomService;
|
private final ParcelleGeomService parcelleGeomService;
|
||||||
|
|
||||||
|
private final MobileDataEnqueteBatimentRepository mobileDataEnqueteBatimentRepository;
|
||||||
|
private final MobileDataActeurConcerneRepository mobileDataActeurConcerneRepository;
|
||||||
|
private final MobileDataPersonneRepository mobileDataPersonneRepository;
|
||||||
|
private final MobileDataMembreGroupeRepository mobileDataMembreGroupeRepository;
|
||||||
|
private final MobileDataPieceRepository mobileDataPieceRepository;
|
||||||
|
private final MobileDataUploadRepository mobileDataUploadRepository;
|
||||||
|
private final MobileDataEnqueteRepository mobileDataEnqueteRepository;
|
||||||
|
private final MobileDataCaracteristiqueParcelleRepository mobileDataCaracteristiqueParcelleRepository;
|
||||||
|
private final MobileDataEnqueteUniteLogementRepository mobileDataEnqueteUniteLogementRepository;
|
||||||
|
private final MobileDataCaracteristiqueBatimentRepository mobileDataCaracteristiqueBatimentRepository;
|
||||||
|
private final MobileDataCaracteristiqueUniteLogementRepository mobileDataCaracteristiqueUniteLogementRepository;
|
||||||
|
private final MobileDataUniteLogementRepository mobileDataUniteLogementRepository;
|
||||||
|
private final MobileDataParcelleRepository mobileDataParcelleRepository;
|
||||||
@Value("${io.gmss.fiscad.profile}")
|
@Value("${io.gmss.fiscad.profile}")
|
||||||
private String profile;
|
private String profile;
|
||||||
|
|
||||||
@@ -227,6 +236,9 @@ public class SynchronisationServiceImpl implements SynchronisationService {
|
|||||||
syncResponses.add(syncResponse);
|
syncResponses.add(syncResponse);
|
||||||
return syncResponses;
|
return syncResponses;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//saveMobileData(personnePayLoads,TypeObjet.PERSONNE);
|
||||||
|
|
||||||
personnePayLoads.forEach(personnePayLoad -> {
|
personnePayLoads.forEach(personnePayLoad -> {
|
||||||
try {
|
try {
|
||||||
System.out.println(personnePayLoad);
|
System.out.println(personnePayLoad);
|
||||||
@@ -292,11 +304,67 @@ public class SynchronisationServiceImpl implements SynchronisationService {
|
|||||||
return syncResponses;
|
return syncResponses;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private <T> void saveMobileData(List<T> payloads, TypeObjet typeObjet) {
|
||||||
|
switch (typeObjet){
|
||||||
|
case PERSONNE -> {
|
||||||
|
payloads.forEach(payLoad -> {
|
||||||
|
PersonnePayLoad p= (PersonnePayLoad) payLoad ;
|
||||||
|
MobileDataPersonne mobileDataPersonne=new MobileDataPersonne();
|
||||||
|
mobileDataPersonne.setPersonnePayLoad(p);
|
||||||
|
|
||||||
|
Optional<MobileDataPersonne> optionalMobileDataPersonne=
|
||||||
|
mobileDataPersonneRepository.findByPersonnePayLoad_TerminalIdAndPersonnePayLoad_ExternalKey(p.getTerminalId(),p.getExternalKey());
|
||||||
|
if(optionalMobileDataPersonne.isPresent()){
|
||||||
|
mobileDataPersonne=optionalMobileDataPersonne.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
case MEMBREGROUPE -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
case ACTEURCONCERNER -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
case PIECE -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
case UPLOAD -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
case BATIMENT -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
case UNITELOGEMENT -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
case ENQUETEBATIMENT -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
case ENQUETEUNITELOGEMENT -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
case CARACTERISTIQUEPARCELLE -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
case CARACTERISTIQUEBATIMENT -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
case CARACTERISTIQUEUNITELOGEMENT -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
case PARCELLE -> {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void deleteFromPersonne(Long idBackend) {
|
private void deleteFromPersonne(Long idBackend) {
|
||||||
uploadRepository.deleteUploadByMembreGroupe_PersonneRepresantee_Id(idBackend);
|
uploadRepository.deleteUploadByMembreGroupe_PersonneRepresantee_Id(idBackend);
|
||||||
uploadRepository.deleteUploadByPiece_Personne_Id(idBackend);
|
uploadRepository.deleteUploadByPiece_Personne_Id(idBackend);
|
||||||
|
|
||||||
uploadRepository.deleteUploadByPersonne_Id(idBackend);
|
uploadRepository.deleteUploadByPersonne_Id(idBackend);
|
||||||
membreGroupeRepository.deleteMembreGroupeByPersonneRepresantante_Id(idBackend);
|
membreGroupeRepository.deleteMembreGroupeByPersonneRepresantante_Id(idBackend);
|
||||||
pieceRepository.deletePieceByPersonne_Id(idBackend);
|
pieceRepository.deletePieceByPersonne_Id(idBackend);
|
||||||
@@ -482,9 +550,17 @@ public class SynchronisationServiceImpl implements SynchronisationService {
|
|||||||
membreGroupe.setExternalKey(membreGroupePayLoad.getExternalKey());
|
membreGroupe.setExternalKey(membreGroupePayLoad.getExternalKey());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (membreGroupePayLoad.getEnqueteId() != null) {
|
||||||
|
Optional<Enquete> optionalEnquete = enqueteRepository.findFirstByExternalKeyAndTerminal_Id(membreGroupePayLoad.getEnqueteId(),membreGroupePayLoad.getTerminalId());
|
||||||
|
membreGroupe.setExternalKey(membreGroupePayLoad.getExternalKey());
|
||||||
|
membreGroupe.setEnqueteId(optionalEnquete.get().getId());
|
||||||
|
}
|
||||||
|
|
||||||
membreGroupe.setMax_numero_acteur_concerne_id(membreGroupePayLoad.getMax_numero_acteur_concerne_id());
|
membreGroupe.setMax_numero_acteur_concerne_id(membreGroupePayLoad.getMax_numero_acteur_concerne_id());
|
||||||
membreGroupe.setMax_numero_piece_id(membreGroupePayLoad.getMax_numero_piece_id());
|
membreGroupe.setMax_numero_piece_id(membreGroupePayLoad.getMax_numero_piece_id());
|
||||||
membreGroupe.setEnqueteId(membreGroupePayLoad.getEnqueteId());
|
membreGroupe.setEnqueteExternalKey(membreGroupePayLoad.getEnqueteId());
|
||||||
|
|
||||||
membreGroupe.setBlocId(membreGroupePayLoad.getBlocId());
|
membreGroupe.setBlocId(membreGroupePayLoad.getBlocId());
|
||||||
membreGroupe.setObservation(membreGroupePayLoad.getObservation());
|
membreGroupe.setObservation(membreGroupePayLoad.getObservation());
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ package io.gmss.fiscad.repositories.infocad.metier;
|
|||||||
|
|
||||||
import io.gmss.fiscad.entities.infocad.metier.MembreGroupe;
|
import io.gmss.fiscad.entities.infocad.metier.MembreGroupe;
|
||||||
import io.gmss.fiscad.paylaods.response.restoration.MembreGroupePayLoad;
|
import io.gmss.fiscad.paylaods.response.restoration.MembreGroupePayLoad;
|
||||||
|
import jakarta.transaction.Transactional;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -10,7 +12,8 @@ import java.util.Optional;
|
|||||||
|
|
||||||
public interface MembreGroupeRepository extends JpaRepository<MembreGroupe, Long> {
|
public interface MembreGroupeRepository extends JpaRepository<MembreGroupe, Long> {
|
||||||
Optional<MembreGroupe> findFirstByExternalKeyAndTerminal_Id(Long externalKey, Long terminalId);
|
Optional<MembreGroupe> findFirstByExternalKeyAndTerminal_Id(Long externalKey, Long terminalId);
|
||||||
|
@Modifying
|
||||||
|
@Transactional
|
||||||
void deleteMembreGroupeByPersonneRepresantante_Id(Long personneRepresenteId);
|
void deleteMembreGroupeByPersonneRepresantante_Id(Long personneRepresenteId);
|
||||||
|
|
||||||
@Query(value = "Select " +
|
@Query(value = "Select " +
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ public interface PieceRepository extends JpaRepository<Piece, Long> {
|
|||||||
@Transactional
|
@Transactional
|
||||||
void deletePieceByEnqueteId(Long enqueteId);
|
void deletePieceByEnqueteId(Long enqueteId);
|
||||||
|
|
||||||
|
@Modifying
|
||||||
|
@Transactional
|
||||||
void deletePieceByPersonne_Id(Long personneId);
|
void deletePieceByPersonne_Id(Long personneId);
|
||||||
|
|
||||||
@Query(value = "Select " +
|
@Query(value = "Select " +
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ import java.util.List;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
public interface UploadRepository extends JpaRepository<Upload, Long> {
|
public interface UploadRepository extends JpaRepository<Upload, Long> {
|
||||||
|
@Modifying
|
||||||
|
@Transactional
|
||||||
void deleteUploadByPiece_Personne_Id(Long personneId);
|
void deleteUploadByPiece_Personne_Id(Long personneId);
|
||||||
|
|
||||||
//void deleteUploadByPiece_ActeurConcerne_Enquete_Id(Long enqueteId);
|
//void deleteUploadByPiece_ActeurConcerne_Enquete_Id(Long enqueteId);
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataActeurConcerne;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataUpload;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataActeurConcerneRepository extends JpaRepository<MobileDataActeurConcerne, Long> {
|
||||||
|
Optional<MobileDataActeurConcerne> findByActeurConcernePayLoad_TerminalIdAndActeurConcernePayLoad_ExternalKey(Long terminalId,Long ExternalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataActeurConcerne;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataBatiment;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataBatimentRepository extends JpaRepository<MobileDataBatiment, Long> {
|
||||||
|
Optional<MobileDataBatiment> findMobileDataBatimentByBatimentPaylaod_TerminalIdAndBatimentPaylaod_ExternalKey(Long terminalId, Long externalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataCaracteristiqueBatiment;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataUpload;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataCaracteristiqueBatimentRepository extends JpaRepository<MobileDataCaracteristiqueBatiment, Long> {
|
||||||
|
Optional<MobileDataCaracteristiqueBatiment> findByCaracteristiqueBatimentPaylod_TerminalIdAndCaracteristiqueBatimentPaylod_ExternalKey(Long terminalId,Long externalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataCaracteristiqueParcelle;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataUpload;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataCaracteristiqueParcelleRepository extends JpaRepository<MobileDataCaracteristiqueParcelle, Long> {
|
||||||
|
Optional<MobileDataCaracteristiqueParcelle> findByCaracteristiqueParcellePaylod_TerminalIdAndCaracteristiqueParcellePaylod_ExternalKey(Long terminalId,Long externalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataCaracteristiqueUniteLogement;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataUpload;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataCaracteristiqueUniteLogementRepository extends JpaRepository<MobileDataCaracteristiqueUniteLogement, Long> {
|
||||||
|
Optional<MobileDataCaracteristiqueUniteLogement> findByCaracteristiqueUniteLogementPaylod_TerminalIdAndCaracteristiqueUniteLogementPaylod_ExternalKey(Long terminalId,Long externalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataActeurConcerne;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataEnqueteBatiment;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataEnqueteBatimentRepository extends JpaRepository<MobileDataEnqueteBatiment, Long> {
|
||||||
|
Optional<MobileDataEnqueteBatiment> findByEnqueteBatimentPayload_TerminalIdAndEnqueteBatimentPayload_ExternalKey(Long terminalId,Long externalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataEnquete;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataUpload;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataEnqueteRepository extends JpaRepository<MobileDataEnquete, Long> {
|
||||||
|
Optional<MobileDataEnquete> findByEnquetePayLoad_TerminalIdAndEnquetePayLoad_ExternalKey(Long terminalId,Long externalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataActeurConcerne;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataEnqueteUniteLogement;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataEnqueteUniteLogementRepository extends JpaRepository<MobileDataEnqueteUniteLogement, Long> {
|
||||||
|
Optional<MobileDataEnqueteUniteLogement> findByEnqueteUniteLogementPayload_TerminalIdAndEnqueteUniteLogementPayload_ExternalKey(Long terminalId,Long externalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataActeurConcerne;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataMembreGroupe;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataMembreGroupeRepository extends JpaRepository<MobileDataMembreGroupe, Long> {
|
||||||
|
Optional<MobileDataMembreGroupe> findByMembreGroupePayLoad_TerminalIdAndMembreGroupePayLoad_ExternalKey(Long terminalId,Long externalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataParcelle;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataUpload;
|
||||||
|
import org.modelmapper.internal.bytebuddy.dynamic.DynamicType;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataParcelleRepository extends JpaRepository<MobileDataParcelle, Long> {
|
||||||
|
Optional<MobileDataParcelle> findByParcellePayLoad_TerminalIdAndParcellePayLoad_ExternalKey(Long terminalId,Long externalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataActeurConcerne;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataPersonne;
|
||||||
|
import org.modelmapper.internal.bytebuddy.dynamic.DynamicType;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataPersonneRepository extends JpaRepository<MobileDataPersonne, Long> {
|
||||||
|
Optional<MobileDataPersonne> findByPersonnePayLoad_TerminalIdAndPersonnePayLoad_ExternalKey(Long terminalId,Long externalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataActeurConcerne;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataPiece;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataPieceRepository extends JpaRepository<MobileDataPiece, Long> {
|
||||||
|
Optional<MobileDataPiece> findByPiecePayLoad_TerminalIdAndPiecePayLoad_ExternalKey(Long terminalId,Long externalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataActeurConcerne;
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataUniteLogement;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataUniteLogementRepository extends JpaRepository<MobileDataUniteLogement, Long> {
|
||||||
|
Optional<MobileDataUniteLogement> findByUniteLogementPaylaod_TerminalIdAndUniteLogementPaylaod_ExternalKey(Long terminalId,Long externalKey);
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package io.gmss.fiscad.repositories.metadata;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.metadata.MobileDataUpload;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public interface MobileDataUploadRepository extends JpaRepository<MobileDataUpload, Long> {
|
||||||
|
Optional<MobileDataUpload> findByUploadPayLoad_TerminalIdAndUploadPayLoad_ExternalKey(Long terminalId,Long externalKey);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user