Compare commits

...

5 Commits

  1. 105
      EPAServeur.Tests/Services/EpDetailsServiceTests.cs
  2. 210
      EPAServeur/Context/DataSeeder.cs
  3. 4
      EPAServeur/Context/EpContext.cs
  4. 55
      EPAServeur/DTO/CommentaireAssistantDTO.cs
  5. 164
      EPAServeur/DTO/EpDTO.cs
  6. 2
      EPAServeur/DTO/TypeEntretienDTO.cs
  7. 9
      EPAServeur/IServices/ITransformDTO.cs
  8. 4
      EPAServeur/Models/EP/ChoixTypeEntretien.cs
  9. 14
      EPAServeur/Services/EpDetailsService.cs
  10. 121
      EPAServeur/Services/TransformDTO.cs

@ -37,7 +37,7 @@ namespace EPAServeur.Tests.Services
context.Database.EnsureDeleted(); context.Database.EnsureDeleted();
context.Database.EnsureCreated(); context.Database.EnsureCreated();
context.SaveChanges(); context.SaveChanges();
DataSeeder.AddTypesEntretien(context);
DataSeeder.AddEp(context); DataSeeder.AddEp(context);
foreach (var entity in context.ChangeTracker.Entries()) foreach (var entity in context.ChangeTracker.Entries())
@ -166,27 +166,116 @@ namespace EPAServeur.Tests.Services
} }
#endregion #endregion
#region Récupérer EP avec RDV entretiens #region Récupérer EP avec RDV entretiens
[TestCase(2)]
[TestCase(5)]
[TestCase(12)]
public async Task GetEp_GetRDVEntretien(long idEp)
{
IEpDetailsService epDetailsService = new EpDetailsService(context, transformDTO, collaborateurService);
EpDTO epDTO = await epDetailsService.GetEp(idEp);
Assert.IsNotNull(epDTO);
Assert.IsNotNull(epDTO.RdvEntretien);
Assert.IsNotNull(epDTO.RdvEntretien.DateEntretien);
}
[TestCase(1, 0)]
[TestCase(2, 3)]
[TestCase(5, 2)]
[TestCase(11, 0)]
[TestCase(13, 0)]
public async Task GetEp_GetPropositionRDVEntretien(long idEp, int count)
{
IEpDetailsService epDetailsService = new EpDetailsService(context, transformDTO, collaborateurService);
EpDTO epDTO = await epDetailsService.GetEp(idEp);
Assert.IsNotNull(epDTO);
if( count == 0)
{
Assert.IsNull(epDTO.PropositionsEntretien);
}
else
{
Assert.IsNotNull(epDTO.PropositionsEntretien);
Assert.AreEqual(epDTO.PropositionsEntretien.Count, count);
Assert.IsTrue(epDTO.PropositionsEntretien.Count <= 3);
Assert.IsTrue(epDTO.PropositionsEntretien.Count > 0);
Assert.Less(epDTO.Statut, StatutEp.Effectue);
}
}
#endregion #endregion
#region Récupérer EP avec type entretien #region Récupérer EP avec choix type entretien
[TestCase(1, 0)]
[TestCase(2, 4)]
[TestCase(4, 1)]
[TestCase(5, 2)]
[TestCase(10, 0)]
[TestCase(12, 0)]
public async Task GetEp_GetChoixTypeEntretien(long idEp, int count)
{
IEpDetailsService epDetailsService = new EpDetailsService(context, transformDTO, collaborateurService);
EpDTO epDTO = await epDetailsService.GetEp(idEp);
Assert.IsNotNull(epDTO);
if (count == 0)
{
Assert.IsNull(epDTO.ChoixTypeEntretien);
}
else
{
Assert.IsNotNull(epDTO.ChoixTypeEntretien);
Assert.AreEqual(epDTO.ChoixTypeEntretien.Count, count);
Assert.Less(epDTO.Statut, StatutEp.Effectue);
}
}
#endregion #endregion
#region Objectifs
[TestCase(3, true)]
[TestCase(7, false)]
[TestCase(10, true)]
public async Task GetEp_Objectifs_ObjectifsPrecedents(long idEp, bool possedeObjectifsPref)
{
IEpDetailsService epDetailsService = new EpDetailsService(context, transformDTO, collaborateurService);
EpDTO epDTO = await epDetailsService.GetEp(idEp);
Assert.IsNotNull(epDTO);
Assert.IsNotNull(epDTO.Objectifs);
Assert.AreEqual(3, epDTO.Objectifs.Count);
if (possedeObjectifsPref)
{
Assert.IsNotNull(epDTO.ObjectifsPrecedent);
Assert.AreEqual(3, epDTO.ObjectifsPrecedent.Count);
}else
{
Assert.IsNull(epDTO.ObjectifsPrecedent);
}
#region Récupérer EP avec demandes de formation }
#endregion #endregion
#region Demande EPI
[TestCase(4)]
[TestCase(8)]
[TestCase(13)]
public async Task GetEp_GetDemandeEPI(long idEp)
{
IEpDetailsService epDetailsService = new EpDetailsService(context, transformDTO, collaborateurService);
EpDTO epDTO = await epDetailsService.GetEp(idEp);
Assert.IsNotNull(epDTO);
Assert.IsNotNull(epDTO.DemandeEPI);
Assert.IsTrue(epDTO.Collaborateur.Id.Equals(epDTO.DemandeEPI.Collaborateur.Id));
Assert.AreEqual(epDTO.DemandeEPI.EtatDemande, EtatDemande.Validee);
}
#endregion
#region Récupérer EP avec demandes de formation
#endregion
#region
#endregion
#region
#endregion
#region #region
#endregion #endregion

@ -63,16 +63,16 @@ namespace EPAServeur.Context
//TypeEntretien //TypeEntretien
TypeEntretien typeSite, typeClient, typeVisio, typeTelephone; TypeEntretien typeSite, typeClient, typeVisio, typeTelephone;
typeSite = new TypeEntretien { Libelle = "Sur site" }; typeSite = new TypeEntretien { IdTypeEntretien = 1, Libelle = "Sur site" };
epContext.TypeEntretien.Add(typeSite); epContext.TypeEntretien.Add(typeSite);
typeClient = new TypeEntretien { Libelle = "Chez le client" }; typeClient = new TypeEntretien { IdTypeEntretien = 2, Libelle = "Chez le client" };
epContext.TypeEntretien.Add(typeClient); epContext.TypeEntretien.Add(typeClient);
typeVisio = new TypeEntretien { Libelle = "Visioconférence" }; typeVisio = new TypeEntretien { IdTypeEntretien = 3, Libelle = "Visioconférence" };
epContext.TypeEntretien.Add(typeVisio); epContext.TypeEntretien.Add(typeVisio);
typeTelephone = new TypeEntretien { Libelle = "Téléphonique" }; typeTelephone = new TypeEntretien { IdTypeEntretien = 4, Libelle = "Téléphonique" };
epContext.TypeEntretien.Add(typeTelephone); epContext.TypeEntretien.Add(typeTelephone);
epContext.SaveChanges(); epContext.SaveChanges();
@ -84,11 +84,29 @@ namespace EPAServeur.Context
/// <param name="epContext"></param> /// <param name="epContext"></param>
public static void AddEp(EpContext epContext) public static void AddEp(EpContext epContext)
{ {
TypeEntretien typeSite, typeClient, typeVisio, typeTelephone;
typeSite = epContext.TypeEntretien.Find((long)1);
typeClient = epContext.TypeEntretien.Find((long)2);
typeVisio = epContext.TypeEntretien.Find((long)3);
typeTelephone = epContext.TypeEntretien.Find((long)4);
Engagement eg1, eg2, eg3, eg4; Engagement eg1, eg2, eg3, eg4;
ParticipationEP p1, p2, p3, p4, p5; ParticipationEP p1, p2, p3, p4, p5;
CommentaireAssistant ca1, ca2, ca3; CommentaireAssistant ca1, ca2, ca3;
DemandeDelegation dm1, dm2, dm3; DemandeDelegation dm1, dm2, dm3;
RdvEntretien rdv1, rdv2, rdv3;
RdvEntretien proposition1, proposition2, proposition3;
ChoixTypeEntretien choix1, choix2, choix3, choix4, choix5, choix6, choix7;
Objectif objectif1, objectif2, objectif3, objectif4, objectif5, objectif6, objectif7, objectif8, objectif9;
ObjectifPrecedent objectifPrecedent1, objectifPrecedent2, objectifPrecedent3, objectifPrecedent4, objectifPrecedent5, objectifPrecedent6;
DemandeEPI demandeEPI1, demandeEPI2, demandeEPI3;
//Ep en cours //Ep en cours
Ep epEnCours1, epEnCours2, epEnCours3, epEnCours4, epEnCours5, epEnCours6, epEnCours7, epEnCours8, epEnCours9; Ep epEnCours1, epEnCours2, epEnCours3, epEnCours4, epEnCours5, epEnCours6, epEnCours7, epEnCours8, epEnCours9;
@ -141,6 +159,60 @@ namespace EPAServeur.Context
RaisonDemande = "Raison quelconque 1" RaisonDemande = "Raison quelconque 1"
}; };
epEnCours2.DemandeDelegation = dm1; epEnCours2.DemandeDelegation = dm1;
rdv1 = new RdvEntretien()
{
IdRdvEntretien = 1,
DateEntretien = new DateTime(),
EpChoixRDV = epEnCours2,
TypeEntretien = typeClient,
EpProposition = epEnCours2
};
epEnCours2.RdvEntretien = rdv1;
proposition1 = new RdvEntretien()
{
DateEntretien = new DateTime(),
EpProposition = epEnCours2,
IdRdvEntretien = 2,
TypeEntretien = typeSite
};
proposition2 = new RdvEntretien()
{
DateEntretien = new DateTime(),
EpProposition = epEnCours2,
IdRdvEntretien = 3,
TypeEntretien = typeVisio
};
epEnCours2.PropositionsRDV = new List<RdvEntretien>(new[] { rdv1, proposition1, proposition2 });
choix1 = new ChoixTypeEntretien()
{
Ep = epEnCours2,
Ordre = 0,
TypeEntretien = typeClient
};
choix2 = new ChoixTypeEntretien()
{
Ep = epEnCours2,
Ordre = 1,
TypeEntretien = typeSite
};
choix3 = new ChoixTypeEntretien()
{
Ep = epEnCours2,
Ordre = 2,
TypeEntretien = typeVisio
};
choix4 = new ChoixTypeEntretien()
{
Ep = epEnCours2,
Ordre = 3,
TypeEntretien = typeTelephone
};
epEnCours2.ChoixTypeEntretien = new List<ChoixTypeEntretien>() { choix1, choix2, choix3, choix4 };
epContext.Ep.Add(epEnCours2); epContext.Ep.Add(epEnCours2);
@ -170,7 +242,20 @@ namespace EPAServeur.Context
EstPermanente = false EstPermanente = false
}; };
epEnCours3.Participants = new List<ParticipationEP>(new[] { p1, p2 }); epEnCours3.Participants = new List<ParticipationEP>(new[] { p1, p2 });
objectif1 = new Objectif() { Ep = epEnCours3, Libelle = "Objectif1" };
objectif2 = new Objectif() { Ep = epEnCours3, Libelle = "Objectif2" };
objectif3 = new Objectif() { Ep = epEnCours3, Libelle = "Objectif3" };
objectifPrecedent1 = new ObjectifPrecedent() { Ep = epEnCours3, Libelle = "ObjectifPrec1", Commentaire = "Commentaire", StatutObjectif = StatutObjectif.Atteint };
objectifPrecedent2 = new ObjectifPrecedent() { Ep = epEnCours3, Libelle = "ObjectifPrec2", Commentaire = "Commentaire", StatutObjectif = StatutObjectif.Partiel };
objectifPrecedent3 = new ObjectifPrecedent() { Ep = epEnCours3, Libelle = "ObjectifPrec3", Commentaire = "Commentaire", StatutObjectif = StatutObjectif.Partiel };
epEnCours3.Objectifs = new List<Objectif>() { objectif1, objectif2, objectif3 };
epEnCours3.ObjectifsPrecedents = new List<ObjectifPrecedent>() { objectifPrecedent1, objectifPrecedent2, objectifPrecedent3 };
epContext.Ep.Add(epEnCours3); epContext.Ep.Add(epEnCours3);
epEnCours4 = new Ep() epEnCours4 = new Ep()
@ -193,7 +278,28 @@ namespace EPAServeur.Context
EtatDemande = EtatDemande.EnAttente, EtatDemande = EtatDemande.EnAttente,
RaisonDemande = "Raison quelconque 2" RaisonDemande = "Raison quelconque 2"
}; };
demandeEPI1 = new DemandeEPI()
{
IdReferent = new Guid("eb8b0f33-f529-4985-861e-1207f3312bb5"),
Ep = epEnCours4,
DateDemande = new DateTime(),
DateReponse = new DateTime(),
EtatDemande = EtatDemande.Validee,
IdCollaborateur = new Guid("a0f40e2a-cc03-4032-a627-5389e1281c64")
};
epEnCours4.DemandeEPI = demandeEPI1;
epEnCours4.DemandeDelegation = dm2; epEnCours4.DemandeDelegation = dm2;
choix5 = new ChoixTypeEntretien()
{
Ep = epEnCours4,
Ordre = 0,
TypeEntretien = typeSite
};
epEnCours4.ChoixTypeEntretien = new List<ChoixTypeEntretien>() { choix5 };
epContext.Ep.Add(epEnCours4); epContext.Ep.Add(epEnCours4);
epEnCours5 = new Ep() epEnCours5 = new Ep()
@ -208,6 +314,8 @@ namespace EPAServeur.Context
IdCollaborateur = new Guid("17b87130-0e9d-4b78-b0e3-a11e5f70318d"), IdCollaborateur = new Guid("17b87130-0e9d-4b78-b0e3-a11e5f70318d"),
Obligatoire = true, Obligatoire = true,
}; };
p3 = new ParticipationEP() p3 = new ParticipationEP()
{ {
Ep = epEnCours5, Ep = epEnCours5,
@ -215,6 +323,45 @@ namespace EPAServeur.Context
EstPermanente = false EstPermanente = false
}; };
epEnCours5.Participants = new List<ParticipationEP>(new[] { p3 }); epEnCours5.Participants = new List<ParticipationEP>(new[] { p3 });
rdv2 = new RdvEntretien()
{
DateEntretien = new DateTime(),
EpProposition = epEnCours5,
IdRdvEntretien = 4,
TypeEntretien = typeSite,
EpChoixRDV = epEnCours5
};
proposition3 = new RdvEntretien()
{
DateEntretien = new DateTime(),
EpProposition = epEnCours5,
IdRdvEntretien = 5,
TypeEntretien = typeVisio
};
epEnCours5.PropositionsRDV = new List<RdvEntretien>(new[] { rdv2, proposition3 });
epEnCours5.RdvEntretien = rdv2;
choix6 = new ChoixTypeEntretien()
{
Ep = epEnCours5,
Ordre = 0,
TypeEntretien = typeSite
};
choix7 = new ChoixTypeEntretien()
{
Ep = epEnCours5,
Ordre = 1,
TypeEntretien = typeVisio
};
epEnCours5.ChoixTypeEntretien = new List<ChoixTypeEntretien>() { choix6, choix7 };
epContext.Ep.Add(epEnCours5); epContext.Ep.Add(epEnCours5);
epEnCours6 = new Ep() epEnCours6 = new Ep()
@ -274,6 +421,11 @@ namespace EPAServeur.Context
IdCollaborateur = new Guid("4f3fcd23-a1e4-4c9e-afa2-d06ca9216491"), IdCollaborateur = new Guid("4f3fcd23-a1e4-4c9e-afa2-d06ca9216491"),
Obligatoire = false, Obligatoire = false,
}; };
objectif4 = new Objectif() { Ep = epEnCours7, Libelle = "Objectif4" };
objectif5 = new Objectif() { Ep = epEnCours7, Libelle = "Objectif5" };
objectif6 = new Objectif() { Ep = epEnCours7, Libelle = "Objectif6" };
epEnCours7.Objectifs = new List<Objectif>() { objectif4, objectif5, objectif6 };
epContext.Ep.Add(epEnCours7); epContext.Ep.Add(epEnCours7);
epEnCours8 = new Ep() epEnCours8 = new Ep()
@ -298,6 +450,17 @@ namespace EPAServeur.Context
RaisonDemande = "Raison quelconque 3" RaisonDemande = "Raison quelconque 3"
}; };
epEnCours8.DemandeDelegation = dm3; epEnCours8.DemandeDelegation = dm3;
demandeEPI2 = new DemandeEPI()
{
IdReferent = new Guid("ea027734-ff0f-4308-8879-133a09fb3c46"),
Ep = epEnCours8,
DateDemande = new DateTime(),
DateReponse = new DateTime(),
EtatDemande = EtatDemande.Validee,
IdCollaborateur = new Guid("0968ccd3-1ef5-4041-83f3-1c76afb02bbf"),
};
epEnCours8.DemandeEPI = demandeEPI2;
epEnCours9 = new Ep() epEnCours9 = new Ep()
{ {
@ -342,6 +505,17 @@ namespace EPAServeur.Context
}; };
epSigne1.Engagements = new List<Engagement>(); epSigne1.Engagements = new List<Engagement>();
epSigne1.Engagements.Add(eg4); epSigne1.Engagements.Add(eg4);
objectif7 = new Objectif() { Ep = epSigne1, Libelle = "Objectif7" };
objectif8 = new Objectif() { Ep = epSigne1, Libelle = "Objectif8" };
objectif9 = new Objectif() { Ep = epSigne1, Libelle = "Objectif9" };
objectifPrecedent4 = new ObjectifPrecedent() { Ep = epSigne1, Libelle = "ObjectifPrec4", Commentaire = "Commentaire", StatutObjectif = StatutObjectif.NonAtteint };
objectifPrecedent5 = new ObjectifPrecedent() { Ep = epSigne1, Libelle = "ObjectifPrec5", Commentaire = "Commentaire", StatutObjectif = StatutObjectif.NonAtteint };
objectifPrecedent6 = new ObjectifPrecedent() { Ep = epSigne1, Libelle = "ObjectifPrec6", Commentaire = "Commentaire", StatutObjectif = StatutObjectif.Atteint };
epSigne1.Objectifs = new List<Objectif>() { objectif7, objectif8, objectif9 };
epSigne1.ObjectifsPrecedents = new List<ObjectifPrecedent>() { objectifPrecedent4, objectifPrecedent6, objectifPrecedent5 };
epContext.Ep.Add(epSigne1); epContext.Ep.Add(epSigne1);
epSigne2 = new Ep() epSigne2 = new Ep()
@ -384,8 +558,21 @@ namespace EPAServeur.Context
IdCollaborateur = new Guid("b5254c6c-7caa-435f-a4bb-e0cf92559832"), IdCollaborateur = new Guid("b5254c6c-7caa-435f-a4bb-e0cf92559832"),
Obligatoire = false, Obligatoire = false,
}; };
rdv3 = new RdvEntretien()
{
IdRdvEntretien = 6,
TypeEntretien = typeVisio,
DateEntretien = new DateTime(),
EpChoixRDV = epSigne3
};
epSigne3.RdvEntretien = rdv3;
epContext.Ep.Add(epSigne3); epContext.Ep.Add(epSigne3);
epSigne4 = new Ep() epSigne4 = new Ep()
{ {
DateDisponibilite = new DateTime(2017, 1, 20), DateDisponibilite = new DateTime(2017, 1, 20),
@ -398,6 +585,17 @@ namespace EPAServeur.Context
IdCollaborateur = new Guid("a0f40e2a-cc03-4032-a627-5389e1281c64"), IdCollaborateur = new Guid("a0f40e2a-cc03-4032-a627-5389e1281c64"),
Obligatoire = false, Obligatoire = false,
}; };
demandeEPI3 = new DemandeEPI()
{
IdReferent = new Guid("eb8b0f33-f529-4985-861e-1207f3312bb5"),
IdCollaborateur = new Guid("a0f40e2a-cc03-4032-a627-5389e1281c64"),
DateDemande = new DateTime(),
EtatDemande = EtatDemande.Validee,
DateReponse = new DateTime(),
Ep = epSigne4
};
epSigne4.DemandeEPI = demandeEPI3;
epContext.Ep.Add(epSigne4); epContext.Ep.Add(epSigne4);
epSigne5 = new Ep() epSigne5 = new Ep()

@ -107,6 +107,7 @@ namespace EPAServeur.Context
{ {
entity.HasKey(e => e.IdRdvEntretien); entity.HasKey(e => e.IdRdvEntretien);
entity.Property(e => e.IdRdvEntretien).ValueGeneratedOnAdd(); entity.Property(e => e.IdRdvEntretien).ValueGeneratedOnAdd();
entity.HasOne(e => e.TypeEntretien).WithMany(t => t.RdvEntretiens);
}); });
modelBuilder.Entity<ReferentEP>(entity => modelBuilder.Entity<ReferentEP>(entity =>
@ -116,7 +117,7 @@ namespace EPAServeur.Context
modelBuilder.Entity<ChoixTypeEntretien>(entity => modelBuilder.Entity<ChoixTypeEntretien>(entity =>
{ {
entity.HasKey(e => e.Ordre); entity.HasKey(e => e.IdChoixTypeEntretien);
}); });
@ -141,6 +142,7 @@ namespace EPAServeur.Context
{ {
entity.HasKey(e => e.IdTypeEntretien); entity.HasKey(e => e.IdTypeEntretien);
entity.HasIndex(e => e.Libelle).IsUnique(); entity.HasIndex(e => e.Libelle).IsUnique();
entity.HasMany<ChoixTypeEntretien>(e => e.ChoixTypeEntretien).WithOne(c => c.TypeEntretien);
}); });
modelBuilder.Entity<CommentaireAssistant>(entity => modelBuilder.Entity<CommentaireAssistant>(entity =>

@ -3,7 +3,7 @@
* *
* API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. * 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.6 * OpenAPI spec version: 1.3.7
* *
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*/ */
@ -19,33 +19,40 @@ using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace IO.Swagger.DTO namespace IO.Swagger.DTO
{ {
/// <summary> /// <summary>
/// DTO contenant le commentaire d&#x27;un assistant sur l&#x27;EP. /// DTO contenant le commentaire d&#x27;un assistant sur l&#x27;EP.
/// </summary> /// </summary>
[DataContract] [DataContract]
public partial class CommentaireAssistantDTO : IEquatable<CommentaireAssistantDTO> public partial class CommentaireAssistantDTO : IEquatable<CommentaireAssistantDTO>
{ {
/// <summary> /// <summary>
/// Id du commentaire assistant /// Id du commentaire assistant
/// </summary> /// </summary>
/// <value>Id du commentaire assistant</value> /// <value>Id du commentaire assistant</value>
[DataMember(Name="id")] [DataMember(Name = "id")]
public long? Id { get; set; } public long? Id { get; set; }
/// <summary> /// <summary>
/// Id de l&#x27;assistant qui a écrit le commentaire /// Id de l&#x27;assistant qui a écrit le commentaire
/// </summary> /// </summary>
/// <value>Id de l&#x27;assistant qui a écrit le commentaire</value> /// <value>Id de l&#x27;assistant qui a écrit le commentaire</value>
[DataMember(Name="idAssistante")] [Required]
public Guid? IdAssistante { get; set; } [DataMember(Name = "idAssistant")]
public Guid? IdAssistant { get; set; }
/// <summary>
/// Gets or Sets Assistant
/// </summary>
[DataMember(Name = "assistant")]
public string Assistant { get; set; }
/// <summary> /// <summary>
/// Le commentaire de l’assistant /// Le commentaire de l’assistant
/// </summary> /// </summary>
/// <value>Le commentaire de l’assistant</value> /// <value>Le commentaire de l’assistant</value>
[Required] [Required]
[DataMember(Name="commentaire")] [DataMember(Name = "commentaire")]
public string Commentaire { get; set; } public string Commentaire { get; set; }
/// <summary> /// <summary>
@ -57,7 +64,8 @@ namespace IO.Swagger.DTO
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.Append("class CommentaireAssistantDTO {\n"); sb.Append("class CommentaireAssistantDTO {\n");
sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" IdAssistante: ").Append(IdAssistante).Append("\n"); sb.Append(" IdAssistant: ").Append(IdAssistant).Append("\n");
sb.Append(" Assistant: ").Append(Assistant).Append("\n");
sb.Append(" Commentaire: ").Append(Commentaire).Append("\n"); sb.Append(" Commentaire: ").Append(Commentaire).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
return sb.ToString(); return sb.ToString();
@ -94,17 +102,22 @@ namespace IO.Swagger.DTO
if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true; if (ReferenceEquals(this, other)) return true;
return return
( (
Id == other.Id || Id == other.Id ||
Id != null && Id != null &&
Id.Equals(other.Id) Id.Equals(other.Id)
) && ) &&
(
IdAssistant == other.IdAssistant ||
IdAssistant != null &&
IdAssistant.Equals(other.IdAssistant)
) &&
( (
IdAssistante == other.IdAssistante || Assistant == other.Assistant ||
IdAssistante != null && Assistant != null &&
IdAssistante.Equals(other.IdAssistante) Assistant.Equals(other.Assistant)
) && ) &&
( (
Commentaire == other.Commentaire || Commentaire == other.Commentaire ||
Commentaire != null && Commentaire != null &&
@ -122,18 +135,20 @@ namespace IO.Swagger.DTO
{ {
var hashCode = 41; var hashCode = 41;
// Suitable nullity checks etc, of course :) // Suitable nullity checks etc, of course :)
if (Id != null) if (Id != null)
hashCode = hashCode * 59 + Id.GetHashCode(); hashCode = hashCode * 59 + Id.GetHashCode();
if (IdAssistante != null) if (IdAssistant != null)
hashCode = hashCode * 59 + IdAssistante.GetHashCode(); hashCode = hashCode * 59 + IdAssistant.GetHashCode();
if (Commentaire != null) if (Assistant != null)
hashCode = hashCode * 59 + Assistant.GetHashCode();
if (Commentaire != null)
hashCode = hashCode * 59 + Commentaire.GetHashCode(); hashCode = hashCode * 59 + Commentaire.GetHashCode();
return hashCode; return hashCode;
} }
} }
#region Operators #region Operators
#pragma warning disable 1591 #pragma warning disable 1591
public static bool operator ==(CommentaireAssistantDTO left, CommentaireAssistantDTO right) public static bool operator ==(CommentaireAssistantDTO left, CommentaireAssistantDTO right)
{ {
@ -145,7 +160,7 @@ namespace IO.Swagger.DTO
return !Equals(left, right); return !Equals(left, right);
} }
#pragma warning restore 1591 #pragma warning restore 1591
#endregion Operators #endregion Operators
} }
} }

@ -3,7 +3,7 @@
* *
* API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. * 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.6 * OpenAPI spec version: 1.3.7
* *
* Generated by: https://github.com/swagger-api/swagger-codegen.git * Generated by: https://github.com/swagger-api/swagger-codegen.git
*/ */
@ -20,26 +20,26 @@ using Newtonsoft.Json;
using IO.Swagger.Enum; using IO.Swagger.Enum;
namespace IO.Swagger.DTO namespace IO.Swagger.DTO
{ {
/// <summary> /// <summary>
/// DTO contenant l&#x27;ensemble des informations d&#x27;un EP. /// DTO contenant l&#x27;ensemble des informations d&#x27;un EP.
/// </summary> /// </summary>
[DataContract] [DataContract]
public partial class EpDTO : IEquatable<EpDTO> public partial class EpDTO : IEquatable<EpDTO>
{ {
/// <summary> /// <summary>
/// Id de l’EP /// Id de l’EP
/// </summary> /// </summary>
/// <value>Id de l’EP</value> /// <value>Id de l’EP</value>
[Required] [Required]
[DataMember(Name="id")] [DataMember(Name = "id")]
public long? Id { get; set; } public long? Id { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Type /// Gets or Sets Type
/// </summary> /// </summary>
[Required] [Required]
[DataMember(Name="type")] [DataMember(Name = "type")]
public TypeEp Type { get; set; } public TypeEp Type { get; set; }
/// <summary> /// <summary>
@ -47,7 +47,7 @@ namespace IO.Swagger.DTO
/// </summary> /// </summary>
/// <value>Date à partir de laquelle l&#x27;EP peut être saisi</value> /// <value>Date à partir de laquelle l&#x27;EP peut être saisi</value>
[Required] [Required]
[DataMember(Name="dateDisponibilite")] [DataMember(Name = "dateDisponibilite")]
public DateTime? DateDisponibilite { get; set; } public DateTime? DateDisponibilite { get; set; }
/// <summary> /// <summary>
@ -55,35 +55,35 @@ namespace IO.Swagger.DTO
/// </summary> /// </summary>
/// <value>Date à laquelle l&#x27;EP est prévu, la date par défaut est celle de l&#x27;anniversaire du collaborateur (+6 mois pour EPS)</value> /// <value>Date à laquelle l&#x27;EP est prévu, la date par défaut est celle de l&#x27;anniversaire du collaborateur (+6 mois pour EPS)</value>
[Required] [Required]
[DataMember(Name="datePrevisionnelle")] [DataMember(Name = "datePrevisionnelle")]
public DateTime? DatePrevisionnelle { get; set; } public DateTime? DatePrevisionnelle { get; set; }
/// <summary> /// <summary>
/// Date à laquelle le collaborateur a signé l&#x27;EP /// Date à laquelle le collaborateur a signé l&#x27;EP
/// </summary> /// </summary>
/// <value>Date à laquelle le collaborateur a signé l&#x27;EP</value> /// <value>Date à laquelle le collaborateur a signé l&#x27;EP</value>
[DataMember(Name="dateSignatureCollaborateur")] [DataMember(Name = "dateSignatureCollaborateur")]
public DateTime? DateSignatureCollaborateur { get; set; } public DateTime? DateSignatureCollaborateur { get; set; }
/// <summary> /// <summary>
/// Date à laquelle le référent a signé l&#x27;EP /// Date à laquelle le référent a signé l&#x27;EP
/// </summary> /// </summary>
/// <value>Date à laquelle le référent a signé l&#x27;EP</value> /// <value>Date à laquelle le référent a signé l&#x27;EP</value>
[DataMember(Name="dateSignatureReferent")] [DataMember(Name = "dateSignatureReferent")]
public DateTime? DateSignatureReferent { get; set; } public DateTime? DateSignatureReferent { get; set; }
/// <summary> /// <summary>
/// Date à laquelle l’EP a été saisi par le collaborateur /// Date à laquelle l’EP a été saisi par le collaborateur
/// </summary> /// </summary>
/// <value>Date à laquelle l’EP a été saisi par le collaborateur</value> /// <value>Date à laquelle l’EP a été saisi par le collaborateur</value>
[DataMember(Name="dateSaisie")] [DataMember(Name = "dateSaisie")]
public DateTime? DateSaisie { get; set; } public DateTime? DateSaisie { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Statut /// Gets or Sets Statut
/// </summary> /// </summary>
[Required] [Required]
[DataMember(Name="statut")] [DataMember(Name = "statut")]
public StatutEp Statut { get; set; } public StatutEp Statut { get; set; }
/// <summary> /// <summary>
@ -91,107 +91,107 @@ namespace IO.Swagger.DTO
/// </summary> /// </summary>
/// <value>Nom du CV Apside du collaborateur</value> /// <value>Nom du CV Apside du collaborateur</value>
[Required] [Required]
[DataMember(Name="cv")] [DataMember(Name = "cv")]
public string Cv { get; set; } public string Cv { get; set; }
/// <summary> /// <summary>
/// Gets or Sets PropositionsEntretien /// Gets or Sets PropositionsEntretien
/// </summary> /// </summary>
[DataMember(Name="propositionsEntretien")] [DataMember(Name = "propositionsEntretien")]
public List<RDVEntretienDTO> PropositionsEntretien { get; set; } public List<RDVEntretienDTO> PropositionsEntretien { get; set; }
/// <summary> /// <summary>
/// Gets or Sets RdvEntretien /// Gets or Sets RdvEntretien
/// </summary> /// </summary>
[DataMember(Name="rdvEntretien")] [DataMember(Name = "rdvEntretien")]
public RDVEntretienDTO RdvEntretien { get; set; } public RDVEntretienDTO RdvEntretien { get; set; }
/// <summary> /// <summary>
/// Gets or Sets ChoixTypeEntretien /// Gets or Sets ChoixTypeEntretien
/// </summary> /// </summary>
[DataMember(Name="choixTypeEntretien")] [DataMember(Name = "choixTypeEntretien")]
public TypeEntretienDTO ChoixTypeEntretien { get; set; } public List<TypeEntretienDTO> ChoixTypeEntretien { get; set; }
/// <summary> /// <summary>
/// Indique si oui ou non l&#x27;EP doit obligatoirement être effectué /// Indique si oui ou non l&#x27;EP doit obligatoirement être effectué
/// </summary> /// </summary>
/// <value>Indique si oui ou non l&#x27;EP doit obligatoirement être effectué</value> /// <value>Indique si oui ou non l&#x27;EP doit obligatoirement être effectué</value>
[Required] [Required]
[DataMember(Name="obligatoire")] [DataMember(Name = "obligatoire")]
public bool? Obligatoire { get; set; } public bool? Obligatoire { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Objectifs /// Gets or Sets Objectifs
/// </summary> /// </summary>
[Required] [Required]
[DataMember(Name="objectifs")] [DataMember(Name = "objectifs")]
public List<ObjectifDTO> Objectifs { get; set; } public List<ObjectifDTO> Objectifs { get; set; }
/// <summary> /// <summary>
/// Gets or Sets ObjectifsPrecedent /// Gets or Sets ObjectifsPrecedent
/// </summary> /// </summary>
[DataMember(Name="objectifsPrecedent")] [DataMember(Name = "objectifsPrecedent")]
public List<ObjectifPrecedentDTO> ObjectifsPrecedent { get; set; } public List<ObjectifPrecedentDTO> ObjectifsPrecedent { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Collaborateur /// Gets or Sets Collaborateur
/// </summary> /// </summary>
[DataMember(Name="collaborateur")] [DataMember(Name = "collaborateur")]
public CollaborateurDTO Collaborateur { get; set; } public CollaborateurDTO Collaborateur { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Referent /// Gets or Sets Referent
/// </summary> /// </summary>
[DataMember(Name="referent")] [DataMember(Name = "referent")]
public CollaborateurDTO Referent { get; set; } public CollaborateurDTO Referent { get; set; }
/// <summary> /// <summary>
/// Gets or Sets DemandesFormation /// Gets or Sets DemandesFormation
/// </summary> /// </summary>
[DataMember(Name="demandesFormation")] [DataMember(Name = "demandesFormation")]
public List<DemandeFormationDTO> DemandesFormation { get; set; } public List<DemandeFormationDTO> DemandesFormation { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Participants /// Gets or Sets Participants
/// </summary> /// </summary>
[DataMember(Name="participants")] [DataMember(Name = "participants")]
public List<ParticipationEPDTO> Participants { get; set; } public List<ParticipationEPDTO> Participants { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Engagements /// Gets or Sets Engagements
/// </summary> /// </summary>
[DataMember(Name="engagements")] [DataMember(Name = "engagements")]
public List<EngagementDTO> Engagements { get; set; } public List<EngagementDTO> Engagements { get; set; }
/// <summary> /// <summary>
/// Gets or Sets AugmentationSalaire /// Gets or Sets AugmentationSalaire
/// </summary> /// </summary>
[DataMember(Name="augmentationSalaire")] [DataMember(Name = "augmentationSalaire")]
public AugmentationSalaireDTO AugmentationSalaire { get; set; } public AugmentationSalaireDTO AugmentationSalaire { get; set; }
/// <summary> /// <summary>
/// Gets or Sets DemandesDelegation /// Gets or Sets DemandesDelegation
/// </summary> /// </summary>
[DataMember(Name="demandesDelegation")] [DataMember(Name = "demandesDelegation")]
public DemandeDelegationDTO DemandesDelegation { get; set; } public DemandeDelegationDTO DemandesDelegation { get; set; }
/// <summary> /// <summary>
/// Gets or Sets DemandeEPI /// Gets or Sets DemandeEPI
/// </summary> /// </summary>
[DataMember(Name="demandeEPI")] [DataMember(Name = "demandeEPI")]
public DemandeEPIDTO DemandeEPI { get; set; } public DemandeEPIDTO DemandeEPI { get; set; }
/// <summary> /// <summary>
/// Gets or Sets Documents /// Gets or Sets Documents
/// </summary> /// </summary>
[Required] [Required]
[DataMember(Name="documents")] [DataMember(Name = "documents")]
public List<DocumentDTO> Documents { get; set; } public List<DocumentDTO> Documents { get; set; }
/// <summary> /// <summary>
/// Gets or Sets CommentairesAssistant /// Gets or Sets CommentairesAssistant
/// </summary> /// </summary>
[DataMember(Name="commentairesAssistant")] [DataMember(Name = "commentairesAssistant")]
public List<CommentaireAssistantDTO> CommentairesAssistant { get; set; } public List<CommentaireAssistantDTO> CommentairesAssistant { get; set; }
/// <summary> /// <summary>
@ -262,127 +262,127 @@ namespace IO.Swagger.DTO
if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true; if (ReferenceEquals(this, other)) return true;
return return
( (
Id == other.Id || Id == other.Id ||
Id != null && Id != null &&
Id.Equals(other.Id) Id.Equals(other.Id)
) && ) &&
( (
Type == other.Type || Type == other.Type ||
Type != null && Type != null &&
Type.Equals(other.Type) Type.Equals(other.Type)
) && ) &&
( (
DateDisponibilite == other.DateDisponibilite || DateDisponibilite == other.DateDisponibilite ||
DateDisponibilite != null && DateDisponibilite != null &&
DateDisponibilite.Equals(other.DateDisponibilite) DateDisponibilite.Equals(other.DateDisponibilite)
) && ) &&
( (
DatePrevisionnelle == other.DatePrevisionnelle || DatePrevisionnelle == other.DatePrevisionnelle ||
DatePrevisionnelle != null && DatePrevisionnelle != null &&
DatePrevisionnelle.Equals(other.DatePrevisionnelle) DatePrevisionnelle.Equals(other.DatePrevisionnelle)
) && ) &&
( (
DateSignatureCollaborateur == other.DateSignatureCollaborateur || DateSignatureCollaborateur == other.DateSignatureCollaborateur ||
DateSignatureCollaborateur != null && DateSignatureCollaborateur != null &&
DateSignatureCollaborateur.Equals(other.DateSignatureCollaborateur) DateSignatureCollaborateur.Equals(other.DateSignatureCollaborateur)
) && ) &&
( (
DateSignatureReferent == other.DateSignatureReferent || DateSignatureReferent == other.DateSignatureReferent ||
DateSignatureReferent != null && DateSignatureReferent != null &&
DateSignatureReferent.Equals(other.DateSignatureReferent) DateSignatureReferent.Equals(other.DateSignatureReferent)
) && ) &&
( (
DateSaisie == other.DateSaisie || DateSaisie == other.DateSaisie ||
DateSaisie != null && DateSaisie != null &&
DateSaisie.Equals(other.DateSaisie) DateSaisie.Equals(other.DateSaisie)
) && ) &&
( (
Statut == other.Statut || Statut == other.Statut ||
Statut != null && Statut != null &&
Statut.Equals(other.Statut) Statut.Equals(other.Statut)
) && ) &&
( (
Cv == other.Cv || Cv == other.Cv ||
Cv != null && Cv != null &&
Cv.Equals(other.Cv) Cv.Equals(other.Cv)
) && ) &&
( (
PropositionsEntretien == other.PropositionsEntretien || PropositionsEntretien == other.PropositionsEntretien ||
PropositionsEntretien != null && PropositionsEntretien != null &&
PropositionsEntretien.SequenceEqual(other.PropositionsEntretien) PropositionsEntretien.SequenceEqual(other.PropositionsEntretien)
) && ) &&
( (
RdvEntretien == other.RdvEntretien || RdvEntretien == other.RdvEntretien ||
RdvEntretien != null && RdvEntretien != null &&
RdvEntretien.Equals(other.RdvEntretien) RdvEntretien.Equals(other.RdvEntretien)
) && ) &&
( (
ChoixTypeEntretien == other.ChoixTypeEntretien || ChoixTypeEntretien == other.ChoixTypeEntretien ||
ChoixTypeEntretien != null && ChoixTypeEntretien != null &&
ChoixTypeEntretien.Equals(other.ChoixTypeEntretien) ChoixTypeEntretien.SequenceEqual(other.ChoixTypeEntretien)
) && ) &&
( (
Obligatoire == other.Obligatoire || Obligatoire == other.Obligatoire ||
Obligatoire != null && Obligatoire != null &&
Obligatoire.Equals(other.Obligatoire) Obligatoire.Equals(other.Obligatoire)
) && ) &&
( (
Objectifs == other.Objectifs || Objectifs == other.Objectifs ||
Objectifs != null && Objectifs != null &&
Objectifs.SequenceEqual(other.Objectifs) Objectifs.SequenceEqual(other.Objectifs)
) && ) &&
( (
ObjectifsPrecedent == other.ObjectifsPrecedent || ObjectifsPrecedent == other.ObjectifsPrecedent ||
ObjectifsPrecedent != null && ObjectifsPrecedent != null &&
ObjectifsPrecedent.SequenceEqual(other.ObjectifsPrecedent) ObjectifsPrecedent.SequenceEqual(other.ObjectifsPrecedent)
) && ) &&
( (
Collaborateur == other.Collaborateur || Collaborateur == other.Collaborateur ||
Collaborateur != null && Collaborateur != null &&
Collaborateur.Equals(other.Collaborateur) Collaborateur.Equals(other.Collaborateur)
) && ) &&
( (
Referent == other.Referent || Referent == other.Referent ||
Referent != null && Referent != null &&
Referent.Equals(other.Referent) Referent.Equals(other.Referent)
) && ) &&
( (
DemandesFormation == other.DemandesFormation || DemandesFormation == other.DemandesFormation ||
DemandesFormation != null && DemandesFormation != null &&
DemandesFormation.SequenceEqual(other.DemandesFormation) DemandesFormation.SequenceEqual(other.DemandesFormation)
) && ) &&
( (
Participants == other.Participants || Participants == other.Participants ||
Participants != null && Participants != null &&
Participants.SequenceEqual(other.Participants) Participants.SequenceEqual(other.Participants)
) && ) &&
( (
Engagements == other.Engagements || Engagements == other.Engagements ||
Engagements != null && Engagements != null &&
Engagements.SequenceEqual(other.Engagements) Engagements.SequenceEqual(other.Engagements)
) && ) &&
( (
AugmentationSalaire == other.AugmentationSalaire || AugmentationSalaire == other.AugmentationSalaire ||
AugmentationSalaire != null && AugmentationSalaire != null &&
AugmentationSalaire.Equals(other.AugmentationSalaire) AugmentationSalaire.Equals(other.AugmentationSalaire)
) && ) &&
( (
DemandesDelegation == other.DemandesDelegation || DemandesDelegation == other.DemandesDelegation ||
DemandesDelegation != null && DemandesDelegation != null &&
DemandesDelegation.Equals(other.DemandesDelegation) DemandesDelegation.Equals(other.DemandesDelegation)
) && ) &&
( (
DemandeEPI == other.DemandeEPI || DemandeEPI == other.DemandeEPI ||
DemandeEPI != null && DemandeEPI != null &&
DemandeEPI.Equals(other.DemandeEPI) DemandeEPI.Equals(other.DemandeEPI)
) && ) &&
( (
Documents == other.Documents || Documents == other.Documents ||
Documents != null && Documents != null &&
Documents.SequenceEqual(other.Documents) Documents.SequenceEqual(other.Documents)
) && ) &&
( (
CommentairesAssistant == other.CommentairesAssistant || CommentairesAssistant == other.CommentairesAssistant ||
CommentairesAssistant != null && CommentairesAssistant != null &&
@ -400,62 +400,62 @@ namespace IO.Swagger.DTO
{ {
var hashCode = 41; var hashCode = 41;
// Suitable nullity checks etc, of course :) // Suitable nullity checks etc, of course :)
if (Id != null) if (Id != null)
hashCode = hashCode * 59 + Id.GetHashCode(); hashCode = hashCode * 59 + Id.GetHashCode();
if (Type != null) if (Type != null)
hashCode = hashCode * 59 + Type.GetHashCode(); hashCode = hashCode * 59 + Type.GetHashCode();
if (DateDisponibilite != null) if (DateDisponibilite != null)
hashCode = hashCode * 59 + DateDisponibilite.GetHashCode(); hashCode = hashCode * 59 + DateDisponibilite.GetHashCode();
if (DatePrevisionnelle != null) if (DatePrevisionnelle != null)
hashCode = hashCode * 59 + DatePrevisionnelle.GetHashCode(); hashCode = hashCode * 59 + DatePrevisionnelle.GetHashCode();
if (DateSignatureCollaborateur != null) if (DateSignatureCollaborateur != null)
hashCode = hashCode * 59 + DateSignatureCollaborateur.GetHashCode(); hashCode = hashCode * 59 + DateSignatureCollaborateur.GetHashCode();
if (DateSignatureReferent != null) if (DateSignatureReferent != null)
hashCode = hashCode * 59 + DateSignatureReferent.GetHashCode(); hashCode = hashCode * 59 + DateSignatureReferent.GetHashCode();
if (DateSaisie != null) if (DateSaisie != null)
hashCode = hashCode * 59 + DateSaisie.GetHashCode(); hashCode = hashCode * 59 + DateSaisie.GetHashCode();
if (Statut != null) if (Statut != null)
hashCode = hashCode * 59 + Statut.GetHashCode(); hashCode = hashCode * 59 + Statut.GetHashCode();
if (Cv != null) if (Cv != null)
hashCode = hashCode * 59 + Cv.GetHashCode(); hashCode = hashCode * 59 + Cv.GetHashCode();
if (PropositionsEntretien != null) if (PropositionsEntretien != null)
hashCode = hashCode * 59 + PropositionsEntretien.GetHashCode(); hashCode = hashCode * 59 + PropositionsEntretien.GetHashCode();
if (RdvEntretien != null) if (RdvEntretien != null)
hashCode = hashCode * 59 + RdvEntretien.GetHashCode(); hashCode = hashCode * 59 + RdvEntretien.GetHashCode();
if (ChoixTypeEntretien != null) if (ChoixTypeEntretien != null)
hashCode = hashCode * 59 + ChoixTypeEntretien.GetHashCode(); hashCode = hashCode * 59 + ChoixTypeEntretien.GetHashCode();
if (Obligatoire != null) if (Obligatoire != null)
hashCode = hashCode * 59 + Obligatoire.GetHashCode(); hashCode = hashCode * 59 + Obligatoire.GetHashCode();
if (Objectifs != null) if (Objectifs != null)
hashCode = hashCode * 59 + Objectifs.GetHashCode(); hashCode = hashCode * 59 + Objectifs.GetHashCode();
if (ObjectifsPrecedent != null) if (ObjectifsPrecedent != null)
hashCode = hashCode * 59 + ObjectifsPrecedent.GetHashCode(); hashCode = hashCode * 59 + ObjectifsPrecedent.GetHashCode();
if (Collaborateur != null) if (Collaborateur != null)
hashCode = hashCode * 59 + Collaborateur.GetHashCode(); hashCode = hashCode * 59 + Collaborateur.GetHashCode();
if (Referent != null) if (Referent != null)
hashCode = hashCode * 59 + Referent.GetHashCode(); hashCode = hashCode * 59 + Referent.GetHashCode();
if (DemandesFormation != null) if (DemandesFormation != null)
hashCode = hashCode * 59 + DemandesFormation.GetHashCode(); hashCode = hashCode * 59 + DemandesFormation.GetHashCode();
if (Participants != null) if (Participants != null)
hashCode = hashCode * 59 + Participants.GetHashCode(); hashCode = hashCode * 59 + Participants.GetHashCode();
if (Engagements != null) if (Engagements != null)
hashCode = hashCode * 59 + Engagements.GetHashCode(); hashCode = hashCode * 59 + Engagements.GetHashCode();
if (AugmentationSalaire != null) if (AugmentationSalaire != null)
hashCode = hashCode * 59 + AugmentationSalaire.GetHashCode(); hashCode = hashCode * 59 + AugmentationSalaire.GetHashCode();
if (DemandesDelegation != null) if (DemandesDelegation != null)
hashCode = hashCode * 59 + DemandesDelegation.GetHashCode(); hashCode = hashCode * 59 + DemandesDelegation.GetHashCode();
if (DemandeEPI != null) if (DemandeEPI != null)
hashCode = hashCode * 59 + DemandeEPI.GetHashCode(); hashCode = hashCode * 59 + DemandeEPI.GetHashCode();
if (Documents != null) if (Documents != null)
hashCode = hashCode * 59 + Documents.GetHashCode(); hashCode = hashCode * 59 + Documents.GetHashCode();
if (CommentairesAssistant != null) if (CommentairesAssistant != null)
hashCode = hashCode * 59 + CommentairesAssistant.GetHashCode(); hashCode = hashCode * 59 + CommentairesAssistant.GetHashCode();
return hashCode; return hashCode;
} }
} }
#region Operators #region Operators
#pragma warning disable 1591 #pragma warning disable 1591
public static bool operator ==(EpDTO left, EpDTO right) public static bool operator ==(EpDTO left, EpDTO right)
{ {
@ -467,7 +467,7 @@ namespace IO.Swagger.DTO
return !Equals(left, right); return !Equals(left, right);
} }
#pragma warning restore 1591 #pragma warning restore 1591
#endregion Operators #endregion Operators
} }
} }

@ -32,7 +32,7 @@ namespace IO.Swagger.DTO
/// <value>Id du type de l&#x27;entretien</value> /// <value>Id du type de l&#x27;entretien</value>
[Required] [Required]
[DataMember(Name="id")] [DataMember(Name="id")]
public int? Id { get; set; } public long? Id { get; set; }
/// <summary> /// <summary>
/// Texte du type de l&#x27;entretien /// Texte du type de l&#x27;entretien

@ -79,11 +79,12 @@ namespace EPAServeur.IServices
DemandeEPIDTO GetDemandeEPIDTO(DemandeEPI demande, IEnumerable<CollaborateurDTO> collaborateurDTOs); DemandeEPIDTO GetDemandeEPIDTO(DemandeEPI demande, IEnumerable<CollaborateurDTO> collaborateurDTOs);
AugmentationSalaireDTO GetAugmentationSalaireDTO(AugmentationSalaire augmentation); AugmentationSalaireDTO GetAugmentationSalaireDTO(AugmentationSalaire augmentation);
RDVEntretienDTO GetRDVEntretienDTO(RdvEntretien rdvEntretien); RDVEntretienDTO GetRDVEntretienDTO(RdvEntretien rdvEntretien);
TypeEntretienDTO GetEntretienDTO(ChoixTypeEntretien choixTypeEntretien); TypeEntretienDTO GetTypeEntretienDTO(TypeEntretien typeEntretien);
DemandeFormationDTO GetDemandeFormationDTOEP(DemandeFormation demandeFormation); List<RDVEntretienDTO> GetRDVEntretienDTOs(List<RdvEntretien> rdvEntretiens);
List<TypeEntretienDTO> GetTypeEntretienDTOs(List<ChoixTypeEntretien> choixTypeEntretiens);
DocumentDTO GetDocumentDTO(Document document); DocumentDTO GetDocumentDTO(Document document);
ObjectifDTO GetObjectifDTO(Objectif objectif); List<ObjectifDTO> GetObjectifDTOs(List<Objectif> objectifs);
ObjectifPrecedentDTO GetObjectifPrecedentDTO(ObjectifPrecedent objectifPrecedent); List<ObjectifPrecedentDTO> GetObjectifPrecedentDTO(List<ObjectifPrecedent> objectifsPrecedents);

@ -10,6 +10,10 @@ namespace EPAServeur.Models.EP
/// </summary> /// </summary>
public class ChoixTypeEntretien public class ChoixTypeEntretien
{ {
/// <summary>
/// Id
/// </summary>
public long IdChoixTypeEntretien { get; internal set; }
/// <summary> /// <summary>
/// Numéro d’ordre de préférence /// Numéro d’ordre de préférence
/// </summary> /// </summary>

@ -31,13 +31,21 @@ namespace EPAServeur.Services
.Include(ep => ep.Participants) .Include(ep => ep.Participants)
.Include(ep => ep.CommentairesAssistant) .Include(ep => ep.CommentairesAssistant)
.Include(ep => ep.DemandeDelegation) .Include(ep => ep.DemandeDelegation)
.Include(ep => ep.RdvEntretien).ThenInclude(rdv => rdv.TypeEntretien)
.Include(ep => ep.PropositionsRDV).ThenInclude(rdv => rdv.TypeEntretien)
.Include(ep => ep.ChoixTypeEntretien).ThenInclude( c => c.TypeEntretien)
.Include(ep => ep.Objectifs)
.Include(ep => ep.ObjectifsPrecedents)
.Include(ep => ep.DemandeEPI)
.FirstOrDefaultAsync(ep => ep.IdEP.Equals(id)); .FirstOrDefaultAsync(ep => ep.IdEP.Equals(id));
if (ep == null) if (ep == null)
throw new EpNotFoundException(); throw new EpNotFoundException();
//ajouter tous les guids liés à l'EP et aux attributs de l'EP //ajouter tous les guids liés à l'EP et aux attributs de l'EP
List<Guid?> guids = new List<Guid?>(); List<Guid?> guids = new List<Guid?>
guids.Add(ep.IdCollaborateur); {
ep.IdCollaborateur
};
if (ep.IdReferent.HasValue) if (ep.IdReferent.HasValue)
guids.Add(ep.IdCollaborateur); guids.Add(ep.IdCollaborateur);
if (ep.Participants != null && ep.Participants.Any()) if (ep.Participants != null && ep.Participants.Any())
@ -46,6 +54,8 @@ namespace EPAServeur.Services
guids.AddRange(ep.CommentairesAssistant.SelectMany(p => new[] { (Guid?)p.IdAssistant })); guids.AddRange(ep.CommentairesAssistant.SelectMany(p => new[] { (Guid?)p.IdAssistant }));
if (ep.DemandeDelegation != null) if (ep.DemandeDelegation != null)
guids.Add(ep.DemandeDelegation.IdReferent); guids.Add(ep.DemandeDelegation.IdReferent);
if (ep.DemandeEPI != null && ep.DemandeEPI.IdReferent != null)
guids.Add(ep.DemandeEPI.IdReferent);
IEnumerable<CollaborateurDTO> collaborateurDTOs = await collaborateurService.GetCollaborateurDTOsAsync(guids); IEnumerable<CollaborateurDTO> collaborateurDTOs = await collaborateurService.GetCollaborateurDTOsAsync(guids);

@ -65,6 +65,12 @@ namespace EPAServeur.Services
Participants = GetParticipantsDTO(ep.Participants, collaborateurDTOs), Participants = GetParticipantsDTO(ep.Participants, collaborateurDTOs),
CommentairesAssistant = GetCommentaireAssistant(ep.CommentairesAssistant, collaborateurDTOs), CommentairesAssistant = GetCommentaireAssistant(ep.CommentairesAssistant, collaborateurDTOs),
DemandesDelegation = GetDemandeDelegationDTO(ep.DemandeDelegation, collaborateurDTOs), DemandesDelegation = GetDemandeDelegationDTO(ep.DemandeDelegation, collaborateurDTOs),
RdvEntretien = GetRDVEntretienDTO(ep.RdvEntretien),
PropositionsEntretien = GetRDVEntretienDTOs(ep.PropositionsRDV),
ChoixTypeEntretien = GetTypeEntretienDTOs(ep.ChoixTypeEntretien),
Objectifs = GetObjectifDTOs(ep.Objectifs),
ObjectifsPrecedent = GetObjectifPrecedentDTO(ep.ObjectifsPrecedents),
DemandeEPI = GetDemandeEPIDTO(ep.DemandeEPI, collaborateurDTOs)
}; };
} }
@ -223,7 +229,8 @@ namespace EPAServeur.Services
{ {
Commentaire = ca.Commentaire, Commentaire = ca.Commentaire,
Id = ca.IdCommentaireAssistant, Id = ca.IdCommentaireAssistant,
IdAssistante = ca.IdAssistant IdAssistant = ca.IdAssistant,
Assistant = c.Nom + " " + c.Prenom
}); });
} }
} }
@ -284,7 +291,18 @@ namespace EPAServeur.Services
/// <returns></returns> /// <returns></returns>
public DemandeEPIDTO GetDemandeEPIDTO(DemandeEPI demande, IEnumerable<CollaborateurDTO> collaborateurDTOs) public DemandeEPIDTO GetDemandeEPIDTO(DemandeEPI demande, IEnumerable<CollaborateurDTO> collaborateurDTOs)
{ {
throw new NotImplementedException(); if (demande == null)
return null;
return new DemandeEPIDTO()
{
Collaborateur = collaborateurDTOs.FirstOrDefault(c => c.Id.Equals(demande.IdCollaborateur)),
Id = demande.IdDemandeEPI,
DateDemande = demande.DateDemande,
DateReponse = demande.DateReponse,
EtatDemande = demande.EtatDemande,
RaisonRefus = demande.RaisonRefus,
Referent = collaborateurDTOs.FirstOrDefault(c => c.Id.Equals(demande.IdReferent))
};
} }
@ -333,19 +351,23 @@ namespace EPAServeur.Services
return engagements.Select(engagment => GetEngagementDTO(engagment, null, false)).ToList(); return engagements.Select(engagment => GetEngagementDTO(engagment, null, false)).ToList();
} }
public TypeEntretienDTO GetEntretienDTO(ChoixTypeEntretien choixTypeEntretien) public TypeEntretienDTO GetTypeEntretienDTO(TypeEntretien typeEntretien)
{ {
throw new NotImplementedException(); return new TypeEntretienDTO()
} {
Id = typeEntretien.IdTypeEntretien,
Libelle = typeEntretien.Libelle
};
}
/// <summary> /// <summary>
/// Transformer un objet Ep en objet EpInformationDTO. /// Transformer un objet Ep en objet EpInformationDTO.
/// La liste de collaborateurs est utilisé pour alimenter la propriété Collaborateur et la propriété Referent de l'objet EpInformationDTO. /// La liste de collaborateurs est utilisé pour alimenter la propriété Collaborateur et la propriété Referent de l'objet EpInformationDTO.
/// </summary> /// </summary>
/// <param name="ep"></param> /// <param name="ep"></param>
/// <param name="collaborateurs"></param> /// <param name="collaborateurs"></param>
/// <returns></returns> /// <returns></returns>
public EpInformationDTO GetEpInformationDTO(Ep ep, IEnumerable<CollaborateurDTO> collaborateurs) public EpInformationDTO GetEpInformationDTO(Ep ep, IEnumerable<CollaborateurDTO> collaborateurs)
{ {
CollaborateurDTO collaborateur; CollaborateurDTO collaborateur;
CollaborateurDTO referent; CollaborateurDTO referent;
@ -522,15 +544,6 @@ namespace EPAServeur.Services
return modeFormationDTO; return modeFormationDTO;
} }
public ObjectifDTO GetObjectifDTO(Objectif objectif)
{
throw new NotImplementedException();
}
public ObjectifPrecedentDTO GetObjectifPrecedentDTO(ObjectifPrecedent objectifPrecedent)
{
throw new NotImplementedException();
}
/// <summary> /// <summary>
/// Transformer un objet OrigineFormationDTO en objet OrigineFormation. /// Transformer un objet OrigineFormationDTO en objet OrigineFormation.
@ -643,7 +656,21 @@ namespace EPAServeur.Services
public RDVEntretienDTO GetRDVEntretienDTO(RdvEntretien rdvEntretien) public RDVEntretienDTO GetRDVEntretienDTO(RdvEntretien rdvEntretien)
{ {
throw new NotImplementedException(); if (rdvEntretien == null)
return null;
return new RDVEntretienDTO()
{
Id = rdvEntretien.IdRdvEntretien,
DateEntretien = rdvEntretien.DateEntretien,
TypeEntretien = GetTypeEntretienDTO(rdvEntretien.TypeEntretien)
};
}
public List<RDVEntretienDTO> GetRDVEntretienDTOs(List<RdvEntretien> rdvEntretiens)
{
if (rdvEntretiens == null || !rdvEntretiens.Any())
return null;
return rdvEntretiens.Select(rdv => GetRDVEntretienDTO(rdv)).ToList();
} }
@ -728,12 +755,20 @@ namespace EPAServeur.Services
return statutFormationDTO; return statutFormationDTO;
} }
/// <summary> public List<TypeEntretienDTO> GetTypeEntretienDTOs(List<ChoixTypeEntretien> choixTypeEntretiens)
/// Transformer un objet TypeFormationDTO en objet TypeFormation. {
/// </summary> if (choixTypeEntretiens == null || !choixTypeEntretiens.Any())
/// <param name="typeFormationDTO"></param> return null;
/// <returns></returns> return choixTypeEntretiens.OrderBy(c => c.Ordre).Select(c => GetTypeEntretienDTO(c.TypeEntretien)).ToList();
public TypeFormation GetTypeFormation(TypeFormationDTO typeFormationDTO)
}
/// <summary>
/// Transformer un objet TypeFormationDTO en objet TypeFormation.
/// </summary>
/// <param name="typeFormationDTO"></param>
/// <returns></returns>
public TypeFormation GetTypeFormation(TypeFormationDTO typeFormationDTO)
{ {
if (typeFormationDTO == null) if (typeFormationDTO == null)
return null; return null;
@ -870,5 +905,29 @@ namespace EPAServeur.Services
return engagement; return engagement;
} }
}
public List<ObjectifDTO> GetObjectifDTOs(List<Objectif> objectifs)
{
if (objectifs == null || !objectifs.Any())
return null;
return objectifs.Select(o => new ObjectifDTO()
{
Id = o.IdObjectif,
Libelle = o.Libelle
}).ToList();
}
public List<ObjectifPrecedentDTO> GetObjectifPrecedentDTO(List<ObjectifPrecedent> objectifsPrecedents)
{
if (objectifsPrecedents == null || !objectifsPrecedents.Any())
return null;
return objectifsPrecedents.Select(o => new ObjectifPrecedentDTO()
{
Id = o.IdObjectif,
Libelle = o.Libelle,
StatutObjectif = o.StatutObjectif,
Commentaire = o.Commentaire
}).ToList();
}
}
} }

Loading…
Cancel
Save