|
|
|
/*
|
|
|
|
* API du serveur de l'application de digitalisation des EP
|
|
|
|
*
|
|
|
|
* API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire.
|
|
|
|
*
|
|
|
|
* OpenAPI spec version: 1.3.4
|
|
|
|
*
|
|
|
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
|
|
*/
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Swashbuckle.AspNetCore.Annotations;
|
|
|
|
using Swashbuckle.AspNetCore.SwaggerGen;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using IO.Swagger.Attributes;
|
|
|
|
using IO.Swagger.Security;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using IO.Swagger.DTO;
|
|
|
|
|
|
|
|
namespace IO.Swagger.Controllers
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
[ApiController]
|
|
|
|
public class EpApiController : ControllerBase
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>Récupérer la liste de tous les EP collaborateurs</remarks>
|
|
|
|
/// <param name="asc">Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false)</param>
|
|
|
|
/// <param name="numPage">Numéro de la page du tableau qui affiche les données</param>
|
|
|
|
/// <param name="parPAge">Nombre d'éléments affiché sur chaque page du tableau</param>
|
|
|
|
/// <param name="idAgence">id de l'agence à laquelle sont rattachées les données à récupérer</param>
|
|
|
|
/// <param name="idBU">id de la business unit à laquelle sont rattachées les données à récupérer</param>
|
|
|
|
/// <param name="statutEP">Statut de l'EP</param>
|
|
|
|
/// <param name="texte">Texte permettant d'identifier l'objet rechercher</param>
|
|
|
|
/// <param name="tri">Colonne du tableau sur lequel le tri s'effectue</param>
|
|
|
|
/// <response code="200">OK</response>
|
|
|
|
/// <response code="403">Acces interdit</response>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("/api/ep")]
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
|
|
|
[ValidateModelState]
|
|
|
|
[SwaggerOperation("GetEP")]
|
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(List<EpInformationDTO>), description: "OK")]
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")]
|
|
|
|
public virtual IActionResult GetEP([FromQuery][Required()]bool? asc, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]long? idAgence, [FromQuery]long? idBU, [FromQuery]int? statutEP, [FromQuery]string texte, [FromQuery]string tri)
|
|
|
|
{
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(200, default(List<EpInformationDTO>));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(403, default(ErreurDTO));
|
|
|
|
string exampleJson = null;
|
|
|
|
exampleJson = "[ {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n}, {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n} ]";
|
|
|
|
|
|
|
|
var example = exampleJson != null
|
|
|
|
? JsonConvert.DeserializeObject<List<EpInformationDTO>>(exampleJson)
|
|
|
|
: default(List<EpInformationDTO>); //TODO: Change the data returned
|
|
|
|
return new ObjectResult(example);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>Récupérer la liste des EP d'un collaborateur</remarks>
|
|
|
|
/// <param name="asc">Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false)</param>
|
|
|
|
/// <param name="idCollaborateur">id collaborateur</param>
|
|
|
|
/// <param name="numPage">Numéro de la page du tableau qui affiche les données</param>
|
|
|
|
/// <param name="parPAge">Nombre d'éléments affiché sur chaque page du tableau</param>
|
|
|
|
/// <param name="statutEP">Statut de l'EP</param>
|
|
|
|
/// <param name="texte">Texte permettant d'identifier l'objet rechercher</param>
|
|
|
|
/// <param name="tri">Colonne du tableau sur lequel le tri s'effectue</param>
|
|
|
|
/// <response code="200">OK</response>
|
|
|
|
/// <response code="403">Acces interdit</response>
|
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("/api/ep/collaborateur/{idCollaborateur}")]
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
|
|
|
[ValidateModelState]
|
|
|
|
[SwaggerOperation("GetEPByCollaborateur")]
|
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(List<EpInformationDTO>), description: "OK")]
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")]
|
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")]
|
|
|
|
public virtual IActionResult GetEPByCollaborateur([FromQuery][Required()]bool? asc, [FromRoute][Required]Guid? idCollaborateur, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]int? statutEP, [FromQuery]string texte, [FromQuery]string tri)
|
|
|
|
{
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(200, default(List<EpInformationDTO>));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(403, default(ErreurDTO));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(404, default(ErreurDTO));
|
|
|
|
string exampleJson = null;
|
|
|
|
exampleJson = "[ {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n}, {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n} ]";
|
|
|
|
|
|
|
|
var example = exampleJson != null
|
|
|
|
? JsonConvert.DeserializeObject<List<EpInformationDTO>>(exampleJson)
|
|
|
|
: default(List<EpInformationDTO>); //TODO: Change the data returned
|
|
|
|
return new ObjectResult(example);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>Récupérer un EP par son id</remarks>
|
|
|
|
/// <param name="idEP">id EP</param>
|
|
|
|
/// <response code="200">OK</response>
|
|
|
|
/// <response code="403">Acces interdit</response>
|
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("/api/ep/{idEP}")]
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
|
|
|
[ValidateModelState]
|
|
|
|
[SwaggerOperation("GetEPById")]
|
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(EpDTO), description: "OK")]
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")]
|
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")]
|
|
|
|
public virtual IActionResult GetEPById([FromRoute][Required]long? idEP)
|
|
|
|
{
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(200, default(EpDTO));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(403, default(ErreurDTO));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(404, default(ErreurDTO));
|
|
|
|
string exampleJson = null;
|
|
|
|
exampleJson = "{\n \"augmentationSalaire\" : {\n \"id\" : 4,\n \"augmentation\" : 7.386282,\n \"message\" : \"message\",\n \"primeMission\" : 1.2315135\n },\n \"dateSaisie\" : \"2000-01-23T04:56:07.000+00:00\",\n \"documents\" : [ {\n \"id\" : 1,\n \"type\" : \"type\",\n \"saisies\" : [ {\n \"note\" : 7,\n \"texte2\" : \"texte2\",\n \"texte\" : \"texte\",\n \"id\" : \"id\",\n \"champ\" : {\n \"typeChamp\" : \"typeChamp\",\n \"ordre\" : 5,\n \"texte\" : \"texte\",\n \"section\" : \"section\",\n \"soussection\" : \"soussection\",\n \"id\" : 4,\n \"typeSaisie\" : \"typeSaisie\"\n },\n \"typeSaisie\" : 6,\n \"niveau\" : 1\n }, {\n \"note\" : 7,\n \"texte2\" : \"texte2\",\n \"texte\" : \"texte\",\n \"id\" : \"id\",\n \"champ\" : {\n \"typeChamp\" : \"typeChamp\",\n \"ordre\" : 5,\n \"texte\" : \"texte\",\n \"section\" : \"section\",\n \"soussection\" : \"soussection\",\n \"id\" : 4,\n \"typeSaisie\" : \"typeSaisie\"\n },\n \"typeSaisie\" : 6,\n \"niveau\" : 1\n } ]\n }, {\n \"id\" : 1,\n \"type\" : \"type\",\n \"saisies\" : [ {\n \"note\" : 7,\n \"texte2\" : \"texte2\",\n \"texte\" : \"texte\",\n \"id\" : \"id\",\n \"champ\" : {\n \"typeChamp\" : \"typeChamp\",\n \"ordre\" : 5,\n \"texte\" : \"texte\",\n \"section\" : \"section\",\n \"soussection\" : \"soussection\",\n \"id\" : 4,\n \"typeSaisie\" : \"typeSaisie\"\n },\n \"typeSaisie\" : 6,\n \"niveau\" : 1\n }, {\n \"note\" : 7,\n \"texte2\" : \"texte2\",\n \"texte\" : \"texte\",\n \"id\" : \"id\",\n \"champ\" : {\n \"typeChamp\" : \"typeChamp\",\n \"ordre\" : 5,\n \"texte\" : \"texte\",\n \"section\" : \"section\",\n \"soussection\" : \"soussection\",\n \"id\" : 4,\n \"typeSaisie\" : \"typeSaisie\"\n },\n \"typeSaisie\" : 6,\n \"niveau\" : 1\n } ]\n } ],\n \"propositionsEntretien\" : [ {\n \"typeEntretien\" : {\n \"libelle\" : \"libelle\",\n \"id\" : 5\n },\n \"dateEntretien\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 1\n }, {\n \"typeEntretien\" : {\n \"libelle\" : \"libelle\",\n \"id\" : 5\n },\n \"dateEntretien\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 1\n } ],\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"demandesFormation\" : [ {\n \"reponse\" : true,\n \"commentaireRefus\" : \"commentaireRefus\",\n \"libelle\" : \"libelle\",\n \"description\" : \"description\",\n \"dateDerniereReponse\" : \"2000-01-23T04:56:07.000+00:00\",\n \"theme\" : {\n \"id\" : 9,\n \"demandesFormation\" : [ null, null ],\n \"nom\" : \"nom\"\n },\n \"id\" : 7,\n \"ep\" : {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n },\n \"demandeRH\" : false,\n \"dateDemande\" : \"2000-01-23
|
|
|
|
|
|
|
|
var example = exampleJson != null
|
|
|
|
? JsonConvert.DeserializeObject<EpDTO>(exampleJson)
|
|
|
|
: default(EpDTO); //TODO: Change the data returned
|
|
|
|
return new ObjectResult(example);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>Récupérer la liste de tous les EP fait passer par le référent</remarks>
|
|
|
|
/// <param name="asc">Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false)</param>
|
|
|
|
/// <param name="idReferent">id referent</param>
|
|
|
|
/// <param name="numPage">Numéro de la page du tableau qui affiche les données</param>
|
|
|
|
/// <param name="parPAge">Nombre d'éléments affiché sur chaque page du tableau</param>
|
|
|
|
/// <param name="texte">Texte permettant d'identifier l'objet rechercher</param>
|
|
|
|
/// <param name="tri">Colonne du tableau sur lequel le tri s'effectue</param>
|
|
|
|
/// <response code="200">OK</response>
|
|
|
|
/// <response code="403">Acces interdit</response>
|
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("/api/ep/referent/{idReferent}")]
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
|
|
|
[ValidateModelState]
|
|
|
|
[SwaggerOperation("GetEPByReferent")]
|
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(List<EpInformationDTO>), description: "OK")]
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")]
|
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")]
|
|
|
|
public virtual IActionResult GetEPByReferent([FromQuery][Required()]bool? asc, [FromRoute][Required]Guid? idReferent, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]string texte, [FromQuery]string tri)
|
|
|
|
{
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(200, default(List<EpInformationDTO>));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(403, default(ErreurDTO));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(404, default(ErreurDTO));
|
|
|
|
string exampleJson = null;
|
|
|
|
exampleJson = "[ {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n}, {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n} ]";
|
|
|
|
|
|
|
|
var example = exampleJson != null
|
|
|
|
? JsonConvert.DeserializeObject<List<EpInformationDTO>>(exampleJson)
|
|
|
|
: default(List<EpInformationDTO>); //TODO: Change the data returned
|
|
|
|
return new ObjectResult(example);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>Récupérer la liste de tous les prochaines EP collaborateurs</remarks>
|
|
|
|
/// <param name="asc">Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false)</param>
|
|
|
|
/// <param name="numPage">Numéro de la page du tableau qui affiche les données</param>
|
|
|
|
/// <param name="parPAge">Nombre d'éléments affiché sur chaque page du tableau</param>
|
|
|
|
/// <param name="idAgence">id de l'agence à laquelle sont rattachées les données à récupérer</param>
|
|
|
|
/// <param name="idBU">id de la business unit à laquelle sont rattachées les données à récupérer</param>
|
|
|
|
/// <param name="texte">Texte permettant d'identifier l'objet rechercher</param>
|
|
|
|
/// <param name="tri">Colonne du tableau sur lequel le tri s'effectue</param>
|
|
|
|
/// <response code="200">OK</response>
|
|
|
|
/// <response code="403">Acces interdit</response>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("/api/ep/enCours")]
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
|
|
|
[ValidateModelState]
|
|
|
|
[SwaggerOperation("GetEPEnCours")]
|
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(List<EpInformationDTO>), description: "OK")]
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")]
|
|
|
|
public virtual IActionResult GetEPEnCours([FromQuery][Required()]bool? asc, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]long? idAgence, [FromQuery]long? idBU, [FromQuery]string texte, [FromQuery]string tri)
|
|
|
|
{
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(200, default(List<EpInformationDTO>));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(403, default(ErreurDTO));
|
|
|
|
string exampleJson = null;
|
|
|
|
exampleJson = "[ {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n}, {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n} ]";
|
|
|
|
|
|
|
|
var example = exampleJson != null
|
|
|
|
? JsonConvert.DeserializeObject<List<EpInformationDTO>>(exampleJson)
|
|
|
|
: default(List<EpInformationDTO>); //TODO: Change the data returned
|
|
|
|
return new ObjectResult(example);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>Récupérer la liste de tous les EP collaborateur signés</remarks>
|
|
|
|
/// <param name="asc">Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false)</param>
|
|
|
|
/// <param name="numPage">Numéro de la page du tableau qui affiche les données</param>
|
|
|
|
/// <param name="parPAge">Nombre d'éléments affiché sur chaque page du tableau</param>
|
|
|
|
/// <param name="idAgence">id de l'agence à laquelle sont rattachées les données à récupérer</param>
|
|
|
|
/// <param name="idBU">id de la business unit à laquelle sont rattachées les données à récupérer</param>
|
|
|
|
/// <param name="texte">Texte permettant d'identifier l'objet rechercher</param>
|
|
|
|
/// <param name="tri">Colonne du tableau sur lequel le tri s'effectue</param>
|
|
|
|
/// <response code="200">OK</response>
|
|
|
|
/// <response code="403">Acces interdit</response>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("/api/ep/signes")]
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
|
|
|
[ValidateModelState]
|
|
|
|
[SwaggerOperation("GetEPSignes")]
|
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(List<EpInformationDTO>), description: "OK")]
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")]
|
|
|
|
public virtual IActionResult GetEPSignes([FromQuery][Required()]bool? asc, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]long? idAgence, [FromQuery]long? idBU, [FromQuery]string texte, [FromQuery]string tri)
|
|
|
|
{
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(200, default(List<EpInformationDTO>));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(403, default(ErreurDTO));
|
|
|
|
string exampleJson = null;
|
|
|
|
exampleJson = "[ {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n}, {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n} ]";
|
|
|
|
|
|
|
|
var example = exampleJson != null
|
|
|
|
? JsonConvert.DeserializeObject<List<EpInformationDTO>>(exampleJson)
|
|
|
|
: default(List<EpInformationDTO>); //TODO: Change the data returned
|
|
|
|
return new ObjectResult(example);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>Récupérer les détails sur quand aura lieu le prochain EP du collaborateur</remarks>
|
|
|
|
/// <param name="idCollaborateur">id collaborateur</param>
|
|
|
|
/// <response code="200">OK</response>
|
|
|
|
/// <response code="403">Acces interdit</response>
|
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("/api/ep/collaborateur/{idCollaborateur}/prochain")]
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
|
|
|
[ValidateModelState]
|
|
|
|
[SwaggerOperation("GetProchainEPCollaborateur")]
|
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(ProchainEPDTO), description: "OK")]
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")]
|
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")]
|
|
|
|
public virtual IActionResult GetProchainEPCollaborateur([FromRoute][Required]Guid? idCollaborateur)
|
|
|
|
{
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(200, default(ProchainEPDTO));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(403, default(ErreurDTO));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(404, default(ErreurDTO));
|
|
|
|
string exampleJson = null;
|
|
|
|
exampleJson = "{\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6\n}";
|
|
|
|
|
|
|
|
var example = exampleJson != null
|
|
|
|
? JsonConvert.DeserializeObject<ProchainEPDTO>(exampleJson)
|
|
|
|
: default(ProchainEPDTO); //TODO: Change the data returned
|
|
|
|
return new ObjectResult(example);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>Récupérer la liste de tous les prochaines EP que fera passer le référent</remarks>
|
|
|
|
/// <param name="asc">Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false)</param>
|
|
|
|
/// <param name="idReferent">id referent</param>
|
|
|
|
/// <param name="numPage">Numéro de la page du tableau qui affiche les données</param>
|
|
|
|
/// <param name="parPAge">Nombre d'éléments affiché sur chaque page du tableau</param>
|
|
|
|
/// <param name="texte">Texte permettant d'identifier l'objet rechercher</param>
|
|
|
|
/// <param name="tri">Colonne du tableau sur lequel le tri s'effectue</param>
|
|
|
|
/// <response code="200">OK</response>
|
|
|
|
/// <response code="403">Acces interdit</response>
|
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("/api/ep/referent/{idReferent}/prochains")]
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
|
|
|
[ValidateModelState]
|
|
|
|
[SwaggerOperation("GetProchainsEPByReferent")]
|
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(List<EpInformationDTO>), description: "OK")]
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")]
|
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")]
|
|
|
|
public virtual IActionResult GetProchainsEPByReferent([FromQuery][Required()]bool? asc, [FromRoute][Required]Guid? idReferent, [FromQuery][Required()]int? numPage, [FromQuery][Required()]int? parPAge, [FromQuery]string texte, [FromQuery]string tri)
|
|
|
|
{
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(200, default(List<EpInformationDTO>));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(403, default(ErreurDTO));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(404, default(ErreurDTO));
|
|
|
|
string exampleJson = null;
|
|
|
|
exampleJson = "[ {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n}, {\n \"obligatoire\" : true,\n \"dateDisponibilite\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : 6,\n \"collaborateur\" : {\n \"businessUnit\" : {\n \"agence\" : {\n \"bu\" : [ null, null ],\n \"id\" : 6,\n \"nom\" : \"nom\"\n },\n \"id\" : 0,\n \"nom\" : \"nom\"\n },\n \"referent\" : {\n \"mailApside\" : \"\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\",\n \"collaborateurs\" : [ null, null ]\n },\n \"mailApside\" : \"\",\n \"dateArrivee\" : \"2000-01-23T04:56:07.000+00:00\",\n \"id\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\",\n \"dateDepart\" : \"2000-01-23T04:56:07.000+00:00\",\n \"nom\" : \"nom\",\n \"prenom\" : \"prenom\"\n },\n \"statut\" : 1\n} ]";
|
|
|
|
|
|
|
|
var example = exampleJson != null
|
|
|
|
? JsonConvert.DeserializeObject<List<EpInformationDTO>>(exampleJson)
|
|
|
|
: default(List<EpInformationDTO>); //TODO: Change the data returned
|
|
|
|
return new ObjectResult(example);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>Faire un rappel de signature EP</remarks>
|
|
|
|
/// <param name="idEP">id EP</param>
|
|
|
|
/// <response code="201">Notification de rappel envoyé</response>
|
|
|
|
/// <response code="403">Acces interdit</response>
|
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("/api/ep/{idEP}/rappelSignature")]
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
|
|
|
[ValidateModelState]
|
|
|
|
[SwaggerOperation("RappelSignature")]
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")]
|
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")]
|
|
|
|
public virtual IActionResult RappelSignature([FromRoute][Required]long? idEP)
|
|
|
|
{
|
|
|
|
//TODO: Uncomment the next line to return response 201 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(201);
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(403, default(ErreurDTO));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(404, default(ErreurDTO));
|
|
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>Récupérer le prochain EP du collaborateur dans le but de le saisir</remarks>
|
|
|
|
/// <param name="idCollaborateur">id collaborateur</param>
|
|
|
|
/// <response code="200">OK</response>
|
|
|
|
/// <response code="403">Acces interdit</response>
|
|
|
|
/// <response code="404">Ressource n'a pas été trouvée</response>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("/api/ep/collaborateur/{idCollaborateur}/prochain/saisir")]
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
|
|
|
[ValidateModelState]
|
|
|
|
[SwaggerOperation("SaisieProchainEP")]
|
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(EpSaisieDTO), description: "OK")]
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")]
|
|
|
|
[SwaggerResponse(statusCode: 404, type: typeof(ErreurDTO), description: "Ressource n'a pas été trouvée")]
|
|
|
|
public virtual IActionResult SaisieProchainEP([FromRoute][Required]Guid? idCollaborateur)
|
|
|
|
{
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(200, default(EpSaisieDTO));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(403, default(ErreurDTO));
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 404 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(404, default(ErreurDTO));
|
|
|
|
string exampleJson = null;
|
|
|
|
exampleJson = "{\n \"cv\" : \"cv\",\n \"documents\" : [ {\n \"id\" : 1,\n \"type\" : \"type\",\n \"saisies\" : [ {\n \"note\" : 7,\n \"texte2\" : \"texte2\",\n \"texte\" : \"texte\",\n \"id\" : \"id\",\n \"champ\" : {\n \"typeChamp\" : \"typeChamp\",\n \"ordre\" : 5,\n \"texte\" : \"texte\",\n \"section\" : \"section\",\n \"soussection\" : \"soussection\",\n \"id\" : 4,\n \"typeSaisie\" : \"typeSaisie\"\n },\n \"typeSaisie\" : 6,\n \"niveau\" : 1\n }, {\n \"note\" : 7,\n \"texte2\" : \"texte2\",\n \"texte\" : \"texte\",\n \"id\" : \"id\",\n \"champ\" : {\n \"typeChamp\" : \"typeChamp\",\n \"ordre\" : 5,\n \"texte\" : \"texte\",\n \"section\" : \"section\",\n \"soussection\" : \"soussection\",\n \"id\" : 4,\n \"typeSaisie\" : \"typeSaisie\"\n },\n \"typeSaisie\" : 6,\n \"niveau\" : 1\n } ]\n }, {\n \"id\" : 1,\n \"type\" : \"type\",\n \"saisies\" : [ {\n \"note\" : 7,\n \"texte2\" : \"texte2\",\n \"texte\" : \"texte\",\n \"id\" : \"id\",\n \"champ\" : {\n \"typeChamp\" : \"typeChamp\",\n \"ordre\" : 5,\n \"texte\" : \"texte\",\n \"section\" : \"section\",\n \"soussection\" : \"soussection\",\n \"id\" : 4,\n \"typeSaisie\" : \"typeSaisie\"\n },\n \"typeSaisie\" : 6,\n \"niveau\" : 1\n }, {\n \"note\" : 7,\n \"texte2\" : \"texte2\",\n \"texte\" : \"texte\",\n \"id\" : \"id\",\n \"champ\" : {\n \"typeChamp\" : \"typeChamp\",\n \"ordre\" : 5,\n \"texte\" : \"texte\",\n \"section\" : \"section\",\n \"soussection\" : \"soussection\",\n \"id\" : 4,\n \"typeSaisie\" : \"typeSaisie\"\n },\n \"typeSaisie\" : 6,\n \"niveau\" : 1\n } ]\n } ],\n \"choixEntretien\" : {\n \"libelle\" : \"libelle\",\n \"id\" : 5\n },\n \"obligatoire\" : true,\n \"objectif\" : [ {\n \"libelle\" : \"libelle\",\n \"id\" : 5\n }, {\n \"libelle\" : \"libelle\",\n \"id\" : 5\n } ],\n \"id\" : 0,\n \"datePrevisionnelle\" : \"2000-01-23T04:56:07.000+00:00\",\n \"type\" : \"type\",\n \"objectifPrecedent\" : [ {\n \"libelle\" : \"libelle\",\n \"id\" : 2,\n \"atteint\" : true,\n \"commentaire\" : \"commentaire\"\n }, {\n \"libelle\" : \"libelle\",\n \"id\" : 2,\n \"atteint\" : true,\n \"commentaire\" : \"commentaire\"\n } ]\n}";
|
|
|
|
|
|
|
|
var example = exampleJson != null
|
|
|
|
? JsonConvert.DeserializeObject<EpSaisieDTO>(exampleJson)
|
|
|
|
: default(EpSaisieDTO); //TODO: Change the data returned
|
|
|
|
return new ObjectResult(example);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>Mettre à jour l'EP déjà saisie</remarks>
|
|
|
|
/// <param name="body"></param>
|
|
|
|
/// <param name="idEP">id EP</param>
|
|
|
|
/// <response code="200">EP mise à jour avec succès</response>
|
|
|
|
/// <response code="403">Acces interdit</response>
|
|
|
|
[HttpPut]
|
|
|
|
[Route("/api/ep/{idEP}/updateep")]
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
|
|
|
[ValidateModelState]
|
|
|
|
[SwaggerOperation("UpdateEP")]
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")]
|
|
|
|
public virtual IActionResult UpdateEP([FromBody]EpDTO body, [FromRoute][Required]long? idEP)
|
|
|
|
{
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(200);
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(403, default(ErreurDTO));
|
|
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>Poursuivre le processus de l'EP ou bien seulement sauvegarder les modifications</remarks>
|
|
|
|
/// <param name="body"></param>
|
|
|
|
/// <param name="idEP">id EP</param>
|
|
|
|
/// <response code="200">EP mise à jour avec succès</response>
|
|
|
|
/// <response code="403">Acces interdit</response>
|
|
|
|
[HttpPut]
|
|
|
|
[Route("/api/ep/{idEP}/updatesaisie")]
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
|
|
|
|
[ValidateModelState]
|
|
|
|
[SwaggerOperation("UpdateSaisieEP")]
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")]
|
|
|
|
public virtual IActionResult UpdateSaisieEP([FromBody]EpSaisieDTO body, [FromRoute][Required]long? idEP)
|
|
|
|
{
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(200);
|
|
|
|
|
|
|
|
//TODO: Uncomment the next line to return response 403 or use other options such as return this.NotFound(), return this.BadRequest(..), ...
|
|
|
|
// return StatusCode(403, default(ErreurDTO));
|
|
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|