Compare commits
6 Commits
ad28588b0a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 953deff41c | |||
| ea7e693759 | |||
| ae2f5bd188 | |||
| aa8a24f81e | |||
| 6b954c7467 | |||
| 71e566da25 |
@@ -36,7 +36,7 @@ public class DeclarationNcController {
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
public ResponseEntity<?> createDeclarationNc(@RequestBody @Valid @Validated DeclarationNcPayloadWeb declarationNcPayloadWeb) {
|
||||
public ResponseEntity<?> createDeclarationNc(@RequestBody DeclarationNcPayloadWeb declarationNcPayloadWeb) {
|
||||
try {
|
||||
declarationNcPayloadWeb = declarationNcService.createDeclarationNc(declarationNcPayloadWeb);
|
||||
return new ResponseEntity<>(
|
||||
|
||||
@@ -116,52 +116,52 @@ public class DonneesImpositionTfuController {
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public ResponseEntity<?> getAllDonneesImpositionTfuList() {
|
||||
try {
|
||||
return new ResponseEntity<>(
|
||||
new ApiResponse<>(true, donneesImpositionTfuService.getDonneesImpositionTfuList(), "Liste des impositions chargée avec succès."),
|
||||
HttpStatus.OK
|
||||
);
|
||||
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
|
||||
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
|
||||
FileStorageException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
|
||||
} catch (NullPointerException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
// @GetMapping("/all")
|
||||
// public ResponseEntity<?> getAllDonneesImpositionTfuList() {
|
||||
// try {
|
||||
// return new ResponseEntity<>(
|
||||
// new ApiResponse<>(true, donneesImpositionTfuService.getDonneesImpositionTfuList(), "Liste des impositions chargée avec succès."),
|
||||
// HttpStatus.OK
|
||||
// );
|
||||
// } catch (HttpClientErrorException.MethodNotAllowed e) {
|
||||
// logger.error(e.getLocalizedMessage());
|
||||
// return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
|
||||
// } catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
|
||||
// FileStorageException e) {
|
||||
// logger.error(e.getLocalizedMessage());
|
||||
// return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
|
||||
// } catch (NullPointerException e) {
|
||||
// logger.error(e.getLocalizedMessage());
|
||||
// return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
// } catch (Exception e) {
|
||||
// logger.error(e.getLocalizedMessage());
|
||||
// return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
// }
|
||||
// }
|
||||
|
||||
@GetMapping("/all-paged")
|
||||
public ResponseEntity<?> getAllDonneesImpositionTfuPaged(@RequestParam int pageNo, @RequestParam int pageSize) {
|
||||
try {
|
||||
Pageable pageable = PageRequest.of(pageNo, pageSize);
|
||||
return new ResponseEntity<>(
|
||||
new ApiResponse<>(true, donneesImpositionTfuService.getDonneesImpositionTfuList(pageable), "Liste des impositions chargée avec succès."),
|
||||
HttpStatus.OK
|
||||
);
|
||||
} catch (HttpClientErrorException.MethodNotAllowed e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
|
||||
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
|
||||
FileStorageException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
|
||||
} catch (NullPointerException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
// @GetMapping("/all-paged")
|
||||
// public ResponseEntity<?> getAllDonneesImpositionTfuPaged(@RequestParam int pageNo, @RequestParam int pageSize) {
|
||||
// try {
|
||||
// Pageable pageable = PageRequest.of(pageNo, pageSize);
|
||||
// return new ResponseEntity<>(
|
||||
// new ApiResponse<>(true, donneesImpositionTfuService.getDonneesImpositionTfuList(pageable), "Liste des impositions chargée avec succès."),
|
||||
// HttpStatus.OK
|
||||
// );
|
||||
// } catch (HttpClientErrorException.MethodNotAllowed e) {
|
||||
// logger.error(e.getLocalizedMessage());
|
||||
// return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
|
||||
// } catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
|
||||
// FileStorageException e) {
|
||||
// logger.error(e.getLocalizedMessage());
|
||||
// return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
|
||||
// } catch (NullPointerException e) {
|
||||
// logger.error(e.getLocalizedMessage());
|
||||
// return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
// } catch (Exception e) {
|
||||
// logger.error(e.getLocalizedMessage());
|
||||
// return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
@GetMapping("/all-page/by-imposition-id/{impositionId}")
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package io.gmss.fiscad.entities.interface_sigibe;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import io.gmss.fiscad.deserializer.LocalDateDeserializer;
|
||||
import io.gmss.fiscad.entities.BaseEntity;
|
||||
import io.gmss.fiscad.entities.decoupage.Quartier;
|
||||
import io.gmss.fiscad.entities.infocad.parametre.Personne;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Entity
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DeclarationSpontaneBien extends BaseEntity implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private Long idImposition ;
|
||||
private String rImposition ;
|
||||
private String ifu ;
|
||||
private String rCommune ;
|
||||
private String rQuartier ;
|
||||
private String qipQuartier;
|
||||
private String qipIlot;
|
||||
private String qipParcelle;
|
||||
private String nup;
|
||||
private String gpsLatitude;
|
||||
private String gpsLongitude;
|
||||
private String commentaire;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateValidation;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateInformation;
|
||||
private Long valeurBatiment;
|
||||
private Long nub;
|
||||
private Long nul;
|
||||
private Long montantLocatifAnnuel ;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateConstruction;
|
||||
private Float superficieSolBat;
|
||||
private Float superficieSolUlot;
|
||||
private Float superficieParcelle;
|
||||
private String usage;
|
||||
private Boolean bati;
|
||||
@ManyToOne
|
||||
private Personne personne;
|
||||
@ManyToOne
|
||||
private Quartier quartier;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package io.gmss.fiscad.entities.interface_sigibe;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import io.gmss.fiscad.deserializer.LocalDateDeserializer;
|
||||
import io.gmss.fiscad.entities.BaseEntity;
|
||||
import io.gmss.fiscad.entities.infocad.parametre.Personne;
|
||||
import io.gmss.fiscad.entities.infocad.parametre.PositionRepresentation;
|
||||
import io.gmss.fiscad.entities.infocad.parametre.TypeContestation;
|
||||
import io.gmss.fiscad.entities.infocad.parametre.TypeRepresentation;
|
||||
import io.gmss.fiscad.enums.SourceDonnee;
|
||||
import io.gmss.fiscad.enums.TypeDroit;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Entity
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EpaiementAcompte extends BaseEntity implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private Long idPaiementAcompte;
|
||||
private Long idPaiementImpot;
|
||||
private String rDoc;
|
||||
private String rImpot;
|
||||
private String idImpotType;
|
||||
private String idImpotNature;
|
||||
private String ifu;
|
||||
private String rCommune;
|
||||
private String rQuartier;
|
||||
private String qipQuartier;
|
||||
private String qipIlot;
|
||||
private String qipParcelle;
|
||||
private String nup;
|
||||
private Long exercice;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateValidation;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateAvisCredit;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateRapprochement;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateInformation;
|
||||
private Long montantPayer;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package io.gmss.fiscad.entities.interface_sigibe;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import io.gmss.fiscad.deserializer.LocalDateDeserializer;
|
||||
import io.gmss.fiscad.entities.BaseEntity;
|
||||
import io.gmss.fiscad.enums.SourceDonnee;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Entity
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EpaiementRetenu extends BaseEntity implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private Long idPaiementRetenue;
|
||||
private Long idEdiGenerique;
|
||||
private Long idPaiementImpot;
|
||||
private String rDoc;
|
||||
private String rImpot;
|
||||
private String idImpotType;
|
||||
private String idImpotNature;
|
||||
private String ifuPayeur;
|
||||
private String ifuRetenue;
|
||||
private String rCommune;
|
||||
private String rQuartier;
|
||||
private String qipQuartier;
|
||||
private String qipIlot;
|
||||
private String qipParcelle;
|
||||
private String nup;
|
||||
private Long exercice;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateValidation;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateAvisCredit;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateRapprochement;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateInformation;
|
||||
private Long montantPayer;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package io.gmss.fiscad.entities.interface_sigibe;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import io.gmss.fiscad.deserializer.LocalDateDeserializer;
|
||||
import io.gmss.fiscad.entities.BaseEntity;
|
||||
import io.gmss.fiscad.enums.SourceDonnee;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Entity
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PaiementAvis extends BaseEntity implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private Long idPaiementImpot;
|
||||
private Long idAvis;
|
||||
private Long idUniteFoncier;
|
||||
private Long idContribuableFoncier;
|
||||
private String rDoc;
|
||||
private String rImpot;
|
||||
private String idImpotType;
|
||||
private String idImpotNature;
|
||||
private String ifu;
|
||||
private String rCommune;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateValidation;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateAvisCredit;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateRapprochement;
|
||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateInformation;
|
||||
private Long montantPayer;
|
||||
|
||||
}
|
||||
@@ -62,4 +62,6 @@ public class CommuneCentreAssignation extends BaseEntity implements Serializable
|
||||
private String nc;
|
||||
|
||||
private String ifu;
|
||||
|
||||
private String adresseContact ;
|
||||
}
|
||||
@@ -36,19 +36,22 @@ public class DeclarationNc extends BaseEntity implements Serializable {
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateDerniereDeclaration;
|
||||
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
private LocalDate dateDeclarationNc;
|
||||
|
||||
private String nc;
|
||||
private String q;
|
||||
private String i;
|
||||
private String p;
|
||||
private String numeroTitreFoncier;
|
||||
private String nup;
|
||||
private String observation;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
private Structure structure;
|
||||
|
||||
|
||||
private Long enqueteExternalKey;
|
||||
|
||||
@JsonIgnore
|
||||
|
||||
@@ -114,6 +114,10 @@ public class DonneesImpositionTfu extends BaseEntity implements Serializable {
|
||||
private Float tauxTfu;
|
||||
private Long tfuPiscine;
|
||||
private Float montantTaxe;
|
||||
private Float penalite;
|
||||
private Float retenuIrf ;
|
||||
private Float acompte ;
|
||||
private Float montantRestant ;
|
||||
private Float montantTaxeBrut; //montant de la taxe calculée sans comparaisons avec TFU MINI
|
||||
private Float tfuCalculeTauxPropParc;
|
||||
private Float tfuSuperficieAuSolReel;
|
||||
|
||||
@@ -12,6 +12,7 @@ import io.gmss.fiscad.persistence.repositories.infocad.parametre.PersonneReposit
|
||||
import io.gmss.fiscad.persistence.repositories.infocad.parametre.StructureRepository;
|
||||
import io.gmss.fiscad.persistence.repositories.rfu.metier.CommuneCentreAssignationRepository;
|
||||
import io.gmss.fiscad.service.EntityFromPayLoadService;
|
||||
import jakarta.ws.rs.NotAcceptableException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
@@ -60,7 +61,7 @@ public class CommuneCentreAssignationServiceImpl implements CommuneCentreAssigna
|
||||
|
||||
Optional<CommuneCentreAssignationPaylaodWeb> communeCentreAssignationPaylaodWebOptional=communeCentreAssignationRepository.findbyCommuneAndPersonne(user.getStructure().getCommune().getId(),communeCentreAssignationPaylaodWeb.getPersonneId());
|
||||
if(communeCentreAssignationPaylaodWeb.getId()==null && communeCentreAssignationPaylaodWebOptional.isPresent()){
|
||||
throw new BadRequestException("Impossible de créer une nouvelle assignation de centre: Le contribuable est déjà assigné au centre : "+communeCentreAssignationPaylaodWebOptional.get().getStructureNom());
|
||||
throw new NotAcceptableException("Impossible de créer une nouvelle assignation de centre: Le contribuable est déjà assigné au centre : "+communeCentreAssignationPaylaodWebOptional.get().getStructureNom());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -38,6 +38,11 @@ public class DeclarationNcServiceImpl implements DeclarationNcService {
|
||||
if (!structureRepository.existsById(declarationNcPayloadWeb.getStructureId())) {
|
||||
throw new BadRequestException("Veuillez préciser le centre.");
|
||||
}
|
||||
List<DeclarationNcPayloadWeb> declarationNcPayloadWebs= declarationNcRepository.findAllDeclarationNcByNcNotPersonneToDto(declarationNcPayloadWeb.getNc(),declarationNcPayloadWeb.getPersonneId());
|
||||
|
||||
if (!declarationNcPayloadWebs.isEmpty()) {
|
||||
throw new BadRequestException("Ce numéro Contribuable est déjà rattaché à un autre IFU");
|
||||
}
|
||||
|
||||
DeclarationNc declarationNc= entityFromPayLoadService.getDeclarationNcFromPayLoadWeb(declarationNcPayloadWeb);
|
||||
declarationNc =declarationNcRepository.save(declarationNc);
|
||||
|
||||
@@ -27,11 +27,11 @@ public class CommuneCentreAssignationPaylaodWeb {
|
||||
private String parcelleContactQ;
|
||||
private String parcelleContactI;
|
||||
private String parcelleContactP;
|
||||
private String adresseContact;
|
||||
|
||||
public CommuneCentreAssignationPaylaodWeb(Long id, String code, String nom, Long communeId, String communeCode, String communeNom, Long structureId, String structureCode, String structureNom, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, String personneIfu, String personneNc, String personneNpi, Long parcelleContactId, String parcelleContactQuartierCode, String parcelleContactQ, String parcelleContactI, String parcelleContactP) {
|
||||
public CommuneCentreAssignationPaylaodWeb(Long id, Long communeId, String communeCode, String communeNom, Long structureId, String structureCode, String structureNom, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, String personneIfu, String personneNc, String personneNpi, Long parcelleContactId, String parcelleContactQuartierCode, String parcelleContactQ, String parcelleContactI, String parcelleContactP,
|
||||
String adresseContact) {
|
||||
this.id = id;
|
||||
this.code = code;
|
||||
this.nom = nom;
|
||||
this.communeId = communeId;
|
||||
this.communeCode = communeCode;
|
||||
this.communeNom = communeNom;
|
||||
@@ -50,5 +50,6 @@ public class CommuneCentreAssignationPaylaodWeb {
|
||||
this.parcelleContactQ = parcelleContactQ;
|
||||
this.parcelleContactI = parcelleContactI;
|
||||
this.parcelleContactP = parcelleContactP;
|
||||
this.adresseContact=adresseContact;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,11 @@ public class DeclarationNcPayloadWeb {
|
||||
private LocalDate dateDerniereDeclaration;
|
||||
private LocalDate dateDeclarationNc;
|
||||
private String nc;
|
||||
private String q;
|
||||
private String i;
|
||||
private String p;
|
||||
private String numeroTitreFoncier;
|
||||
private String nup;
|
||||
private Long structureId;
|
||||
private String structureCode;
|
||||
private String structureNom;
|
||||
@@ -24,7 +29,14 @@ public class DeclarationNcPayloadWeb {
|
||||
private String personneRaisonSociale;
|
||||
private String observation;
|
||||
|
||||
public DeclarationNcPayloadWeb(Long id, LocalDate dateDerniereDeclaration, LocalDate dateDeclarationNc, String nc, Long structureId, String structureCode, String structureNom, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, String observation) {
|
||||
public DeclarationNcPayloadWeb(Long id, LocalDate dateDerniereDeclaration, LocalDate dateDeclarationNc, String nc, Long structureId, String structureCode, String structureNom, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale,
|
||||
String observation,
|
||||
String q,
|
||||
String i,
|
||||
String p,
|
||||
String numeroTitreFoncier,
|
||||
String nup
|
||||
) {
|
||||
this.id = id;
|
||||
this.dateDerniereDeclaration = dateDerniereDeclaration;
|
||||
this.dateDeclarationNc = dateDeclarationNc;
|
||||
@@ -36,6 +48,11 @@ public class DeclarationNcPayloadWeb {
|
||||
this.personneNom = personneNom;
|
||||
this.personnePrenom = personnePrenom;
|
||||
this.personneRaisonSociale = personneRaisonSociale;
|
||||
this.q = q;
|
||||
this.i = i;
|
||||
this.p = p;
|
||||
this.numeroTitreFoncier = numeroTitreFoncier;
|
||||
this.observation = observation;
|
||||
this.nup = nup;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +123,12 @@ FROM impositions_tfu imp
|
||||
ON st.id = cca.structure_id
|
||||
where dimp.personne_id is not null ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
select * from e_avis_detail_view
|
||||
where qip_quartier='6431' and qip_ilot='1656' and qip_parcelle='C' ;
|
||||
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
- recuperation et cumul des acomptes par exercice, commune, ifu et parcelle
|
||||
- recuperation et cumul des rirf par exercice, commune, ifu et parcelle
|
||||
*/
|
||||
|
||||
CREATE OR REPLACE FUNCTION public.maj_donnees_imposition_tfu_irf_(
|
||||
p_impositions_tfu_id BIGINT
|
||||
)
|
||||
RETURNS INTEGER
|
||||
LANGUAGE plpgsql
|
||||
AS $$
|
||||
DECLARE
|
||||
v_rows_inserted INTEGER;
|
||||
v_annee INTEGER;
|
||||
v_structure_id INTEGER;
|
||||
BEGIN
|
||||
SELECT ex.annee, it.structure_id
|
||||
INTO STRICT v_annee, v_structure_id
|
||||
FROM impositions_tfu it
|
||||
JOIN exercice ex ON ex.id = it.exercice_id
|
||||
WHERE it.id = p_impositions_tfu_id;
|
||||
|
||||
WITH cumulRetenu as (
|
||||
select ifu_retenue,
|
||||
r_commune,
|
||||
r_quartier,
|
||||
qip_quartier,
|
||||
qip_ilot,
|
||||
qip_parcelle,
|
||||
nup,
|
||||
exercice,
|
||||
sum(montant_payer) as cumul_retenu
|
||||
from epaiement_retenu
|
||||
where exercice = v_annee
|
||||
group by ifu_retenue, r_commune, r_quartier,
|
||||
qip_quartier, qip_ilot, qip_parcelle,
|
||||
nup, exercice
|
||||
)
|
||||
UPDATE donnees_imposition_tfu dimp
|
||||
SET
|
||||
retenu_irf = coalesce(cr.cumul_retenu,0),
|
||||
montant_restant = dimp.montant_taxe
|
||||
- coalesce(cr.cumul_retenu,0)
|
||||
FROM donnees_imposition_tfu dimp2
|
||||
LEFT JOIN cumulRetenu cr ON (
|
||||
cr.exercice = dimp2.annee
|
||||
AND cr.r_commune = dimp2.code_commune
|
||||
AND cr.ifu_retenue = dimp2.ifu
|
||||
AND cr.r_quartier = dimp2.code_quartier_village
|
||||
AND cr.qip_quartier = dimp2.q
|
||||
AND cr.qip_ilot = dimp2.ilot
|
||||
AND cr.qip_parcelle = dimp2.parcelle
|
||||
AND cr.nup = dimp2.nup
|
||||
AND cr.nup = dimp2.nup
|
||||
)
|
||||
WHERE dimp.id = dimp2.id
|
||||
AND dimp.impositions_tfu_id = p_impositions_tfu_id
|
||||
AND dimp.nature_impot ='IRF';
|
||||
|
||||
|
||||
WITH cumulAcompte as (
|
||||
select ifu,
|
||||
r_commune,
|
||||
r_quartier,
|
||||
qip_quartier,
|
||||
qip_ilot,
|
||||
qip_parcelle,
|
||||
nup,
|
||||
exercice,
|
||||
sum(montant_payer) as cumul_acompte
|
||||
from epaiement_acompte
|
||||
where exercice = v_annee
|
||||
group by ifu, r_commune, r_quartier,
|
||||
qip_quartier, qip_ilot, qip_parcelle,
|
||||
nup, exercice
|
||||
)
|
||||
UPDATE donnees_imposition_tfu dimp
|
||||
SET
|
||||
acompte = coalesce(ac.cumul_acompte,0),
|
||||
montant_restant = dimp.montant_taxe
|
||||
- coalesce(ac.cumul_acompte,0)
|
||||
FROM donnees_imposition_tfu dimp2
|
||||
LEFT JOIN cumulAcompte ac ON (
|
||||
ac.exercice = dimp2.annee
|
||||
AND ac.r_commune = dimp2.code_commune
|
||||
AND ac.ifu = dimp2.ifu
|
||||
AND ac.r_quartier = dimp2.code_quartier_village
|
||||
AND ac.qip_quartier = dimp2.q
|
||||
AND ac.qip_ilot = dimp2.ilot
|
||||
AND ac.qip_parcelle = dimp2.parcelle
|
||||
AND ac.nup = dimp2.nup
|
||||
)
|
||||
WHERE dimp.id = dimp2.id
|
||||
AND dimp.impositions_tfu_id = p_impositions_tfu_id
|
||||
AND dimp.nature_impot in ('FNB','FB');
|
||||
|
||||
GET DIAGNOSTICS v_rows_inserted = ROW_COUNT;
|
||||
|
||||
RETURN v_rows_inserted;
|
||||
END;
|
||||
$$ ;
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
value = """
|
||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CommuneCentreAssignationPaylaodWeb(
|
||||
cca.id,
|
||||
cca.nc,
|
||||
cca.ifu,
|
||||
c.id,
|
||||
c.code,
|
||||
c.nom,
|
||||
@@ -39,7 +37,8 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
q.code,
|
||||
parc.q,
|
||||
parc.i,
|
||||
parc.p
|
||||
parc.p,
|
||||
cca.adresseContact
|
||||
)
|
||||
FROM CommuneCentreAssignation cca
|
||||
LEFT JOIN cca.commune c
|
||||
@@ -59,8 +58,6 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
value = """
|
||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CommuneCentreAssignationPaylaodWeb(
|
||||
cca.id,
|
||||
cca.nc,
|
||||
cca.ifu,
|
||||
c.id,
|
||||
c.code,
|
||||
c.nom,
|
||||
@@ -78,7 +75,8 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
q.code,
|
||||
parc.q,
|
||||
parc.i,
|
||||
parc.p
|
||||
parc.p,
|
||||
cca.adresseContact
|
||||
)
|
||||
FROM CommuneCentreAssignation cca
|
||||
JOIN cca.structure s
|
||||
@@ -104,8 +102,6 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
value = """
|
||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CommuneCentreAssignationPaylaodWeb(
|
||||
cca.id,
|
||||
cca.nc,
|
||||
cca.ifu,
|
||||
c.id,
|
||||
c.code,
|
||||
c.nom,
|
||||
@@ -123,7 +119,8 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
q.code,
|
||||
parc.q,
|
||||
parc.i,
|
||||
parc.p
|
||||
parc.p,
|
||||
cca.adresseContact
|
||||
)
|
||||
FROM CommuneCentreAssignation cca
|
||||
JOIN cca.commune c
|
||||
@@ -148,8 +145,6 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
value = """
|
||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CommuneCentreAssignationPaylaodWeb(
|
||||
cca.id,
|
||||
cca.nc,
|
||||
cca.ifu,
|
||||
c.id,
|
||||
c.code,
|
||||
c.nom,
|
||||
@@ -167,7 +162,8 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
q.code,
|
||||
parc.q,
|
||||
parc.i,
|
||||
parc.p
|
||||
parc.p,
|
||||
cca.adresseContact
|
||||
)
|
||||
FROM CommuneCentreAssignation cca
|
||||
JOIN cca.structure s
|
||||
@@ -195,8 +191,6 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
@Query("""
|
||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CommuneCentreAssignationPaylaodWeb(
|
||||
cca.id,
|
||||
cca.nc,
|
||||
cca.ifu,
|
||||
c.id,
|
||||
c.code,
|
||||
c.nom,
|
||||
@@ -214,7 +208,8 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
q.code,
|
||||
parc.q,
|
||||
parc.i,
|
||||
parc.p
|
||||
parc.p,
|
||||
cca.adresseContact
|
||||
)
|
||||
FROM CommuneCentreAssignation cca
|
||||
JOIN cca.structure s
|
||||
@@ -236,8 +231,6 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
@Query("""
|
||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CommuneCentreAssignationPaylaodWeb(
|
||||
cca.id,
|
||||
cca.nc,
|
||||
cca.ifu,
|
||||
c.id,
|
||||
c.code,
|
||||
c.nom,
|
||||
@@ -255,7 +248,8 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
q.code,
|
||||
parc.q,
|
||||
parc.i,
|
||||
parc.p
|
||||
parc.p,
|
||||
cca.adresseContact
|
||||
)
|
||||
FROM CommuneCentreAssignation cca
|
||||
JOIN cca.structure s
|
||||
@@ -274,8 +268,6 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
@Query("""
|
||||
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CommuneCentreAssignationPaylaodWeb(
|
||||
cca.id,
|
||||
cca.nc,
|
||||
cca.ifu,
|
||||
c.id,
|
||||
c.code,
|
||||
c.nom,
|
||||
@@ -293,7 +285,8 @@ public interface CommuneCentreAssignationRepository extends JpaRepository<Commun
|
||||
q.code,
|
||||
parc.q,
|
||||
parc.i,
|
||||
parc.p
|
||||
parc.p,
|
||||
cca.adresseContact
|
||||
)
|
||||
FROM CommuneCentreAssignation cca
|
||||
JOIN cca.structure s
|
||||
|
||||
@@ -28,7 +28,12 @@ public interface DeclarationNcRepository extends JpaRepository<DeclarationNc, Lo
|
||||
p.nom,
|
||||
p.prenom,
|
||||
p.raisonSociale,
|
||||
d.observation
|
||||
d.observation,
|
||||
d.q,
|
||||
d.i,
|
||||
d.p,
|
||||
d.numeroTitreFoncier,
|
||||
d.nup
|
||||
)
|
||||
FROM DeclarationNc d
|
||||
LEFT JOIN d.structure s
|
||||
@@ -50,7 +55,12 @@ public interface DeclarationNcRepository extends JpaRepository<DeclarationNc, Lo
|
||||
p.nom,
|
||||
p.prenom,
|
||||
p.raisonSociale,
|
||||
d.observation
|
||||
d.observation,
|
||||
d.q,
|
||||
d.i,
|
||||
d.p,
|
||||
d.numeroTitreFoncier,
|
||||
d.nup
|
||||
)
|
||||
FROM DeclarationNc d
|
||||
LEFT JOIN d.structure s
|
||||
@@ -71,7 +81,12 @@ public interface DeclarationNcRepository extends JpaRepository<DeclarationNc, Lo
|
||||
p.nom,
|
||||
p.prenom,
|
||||
p.raisonSociale,
|
||||
d.observation
|
||||
d.observation,
|
||||
d.q,
|
||||
d.i,
|
||||
d.p,
|
||||
d.numeroTitreFoncier,
|
||||
d.nup
|
||||
)
|
||||
FROM DeclarationNc d
|
||||
LEFT JOIN d.structure s
|
||||
@@ -93,7 +108,12 @@ public interface DeclarationNcRepository extends JpaRepository<DeclarationNc, Lo
|
||||
p.nom,
|
||||
p.prenom,
|
||||
p.raisonSociale,
|
||||
d.observation
|
||||
d.observation,
|
||||
d.q,
|
||||
d.i,
|
||||
d.p,
|
||||
d.numeroTitreFoncier,
|
||||
d.nup
|
||||
)
|
||||
FROM DeclarationNc d
|
||||
LEFT JOIN d.structure s
|
||||
@@ -116,7 +136,12 @@ public interface DeclarationNcRepository extends JpaRepository<DeclarationNc, Lo
|
||||
p.nom,
|
||||
p.prenom,
|
||||
p.raisonSociale,
|
||||
d.observation
|
||||
d.observation,
|
||||
d.q,
|
||||
d.i,
|
||||
d.p,
|
||||
d.numeroTitreFoncier,
|
||||
d.nup
|
||||
)
|
||||
FROM DeclarationNc d
|
||||
LEFT JOIN d.structure s
|
||||
@@ -135,4 +160,34 @@ public interface DeclarationNcRepository extends JpaRepository<DeclarationNc, Lo
|
||||
Pageable pageable
|
||||
);
|
||||
|
||||
|
||||
@Query("""
|
||||
SELECT distinct new io.gmss.fiscad.paylaods.request.crudweb.DeclarationNcPayloadWeb(
|
||||
d.id,
|
||||
d.dateDerniereDeclaration,
|
||||
d.dateDeclarationNc,
|
||||
d.nc,
|
||||
s.id,
|
||||
s.code,
|
||||
s.nom,
|
||||
p.id,
|
||||
p.nom,
|
||||
p.prenom,
|
||||
p.raisonSociale,
|
||||
d.observation,
|
||||
d.q,
|
||||
d.i,
|
||||
d.p,
|
||||
d.numeroTitreFoncier,
|
||||
d.nup
|
||||
)
|
||||
FROM DeclarationNc d
|
||||
LEFT JOIN d.structure s
|
||||
LEFT JOIN d.personne p
|
||||
WHERE d.nc= :nc
|
||||
and p.id <> :personneId
|
||||
""")
|
||||
List<DeclarationNcPayloadWeb> findAllDeclarationNcByNcNotPersonneToDto(@Param("nc") String nc, @Param("personneId") Long personneId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -211,6 +211,11 @@ public class EntityFromPayLoadService {
|
||||
declarationNc.setStructure(optionalStructure.orElse(null));
|
||||
declarationNc.setPersonne(optionalPersonne.orElse(null));
|
||||
declarationNc.setNc(declarationNcPayloadWeb.getNc());
|
||||
declarationNc.setQ(declarationNcPayloadWeb.getQ());
|
||||
declarationNc.setI(declarationNcPayloadWeb.getI());
|
||||
declarationNc.setP(declarationNcPayloadWeb.getP());
|
||||
declarationNc.setNumeroTitreFoncier(declarationNcPayloadWeb.getNumeroTitreFoncier());
|
||||
declarationNc.setNup(declarationNcPayloadWeb.getNup());
|
||||
declarationNc.setDateDerniereDeclaration(declarationNcPayloadWeb.getDateDerniereDeclaration());
|
||||
declarationNc.setDateDeclarationNc(declarationNcPayloadWeb.getDateDeclarationNc());
|
||||
return declarationNc ;
|
||||
@@ -1010,6 +1015,8 @@ public class EntityFromPayLoadService {
|
||||
communeCentreAssignation.setPersonne(personne);
|
||||
}
|
||||
|
||||
communeCentreAssignation.setAdresseContact(communeCentreAssignationPaylaodWeb.getAdresseContact());
|
||||
|
||||
// if (communeCentreAssignationPaylaodWeb.getCommuneId() != null) {
|
||||
// Commune commune = new Commune();
|
||||
// commune.setId(communeCentreAssignationPaylaodWeb.getCommuneId());
|
||||
|
||||
@@ -6,7 +6,7 @@ spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
|
||||
spring.jpa.open-in-view=false
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
jwt.jwtSecret=ImThEVeryB@dS@lt@302839_
|
||||
jwt.jwtExpirationInMs=7776000000
|
||||
jwt.jwtExpirationInMs=7776000000
|
||||
spring.application.name=infocad
|
||||
#logging.file.name=fiscad.log
|
||||
logging.level.org.springframework.security=DEBUG
|
||||
|
||||
Reference in New Issue
Block a user