From 2f37334444d5500c9c9c7a0ab9d27643a88a2d88 Mon Sep 17 00:00:00 2001 From: moss <> Date: Tue, 27 May 2025 11:18:06 +0700 Subject: [PATCH] edit insignia emp --- .../Repositories/UserProfileRepository.cs | 2 +- .../Insignias/PostProfileEmpInsigniaDto.cs | 33 +++++++++++++++++++ .../Insignias/PostProfileInsigniaDto.cs | 3 +- .../Controllers/InsigniaRequestController.cs | 4 +-- 4 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 BMA.EHR.Application/Responses/Insignias/PostProfileEmpInsigniaDto.cs diff --git a/BMA.EHR.Application/Repositories/UserProfileRepository.cs b/BMA.EHR.Application/Repositories/UserProfileRepository.cs index d59794e6..11fea71b 100644 --- a/BMA.EHR.Application/Repositories/UserProfileRepository.cs +++ b/BMA.EHR.Application/Repositories/UserProfileRepository.cs @@ -1051,7 +1051,7 @@ namespace BMA.EHR.Application.Repositories } - public async Task PostProfileEmpInsigniaAsync(PostProfileInsigniaDto body, string? accessToken) + public async Task PostProfileEmpInsigniaAsync(PostProfileEmpInsigniaDto body, string? accessToken) { try { diff --git a/BMA.EHR.Application/Responses/Insignias/PostProfileEmpInsigniaDto.cs b/BMA.EHR.Application/Responses/Insignias/PostProfileEmpInsigniaDto.cs new file mode 100644 index 00000000..d01fbd8c --- /dev/null +++ b/BMA.EHR.Application/Responses/Insignias/PostProfileEmpInsigniaDto.cs @@ -0,0 +1,33 @@ +namespace BMA.EHR.Application.Responses.Insignias +{ + public class PostProfileEmpInsigniaDto + { + public Guid profileEmployeeId { get; set; } + + public int year { get; set; } = 0; + + public string no { get; set; } = string.Empty; + + public string volume { get; set; } = string.Empty; + + public string section { get; set; } = string.Empty; + + public string page { get; set; } = string.Empty; + + public DateTime receiveDate { get; set; } = DateTime.MinValue; + + public Guid insigniaId { get; set; } + + public DateTime dateAnnounce { get; set; } = DateTime.MinValue; + + public string issue { get; set; } = string.Empty; + + public string volumeNo { get; set; } = string.Empty; + + public DateTime? refCommandDate { get; set; } + + public string refCommandNo { get; set; } = string.Empty; + + public string note { get; set; } = string.Empty; + } +} diff --git a/BMA.EHR.Application/Responses/Insignias/PostProfileInsigniaDto.cs b/BMA.EHR.Application/Responses/Insignias/PostProfileInsigniaDto.cs index 5ac913fa..5677f667 100644 --- a/BMA.EHR.Application/Responses/Insignias/PostProfileInsigniaDto.cs +++ b/BMA.EHR.Application/Responses/Insignias/PostProfileInsigniaDto.cs @@ -2,8 +2,7 @@ { public class PostProfileInsigniaDto { - public Guid? profileId { get; set; } - public Guid? profileEmployeeId { get; set; } + public Guid profileId { get; set; } public int year { get; set; } = 0; diff --git a/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs b/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs index 82197af6..d2095a1c 100644 --- a/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs +++ b/BMA.EHR.Insignia/Controllers/InsigniaRequestController.cs @@ -1822,7 +1822,7 @@ namespace BMA.EHR.Insignia.Service.Controllers } else { - var profileInsigniaBody = new PostProfileInsigniaDto + var profileInsigniaBody = new PostProfileEmpInsigniaDto { profileEmployeeId = profile.Id, year = insigniaNote.Year, @@ -1889,7 +1889,7 @@ namespace BMA.EHR.Insignia.Service.Controllers } else { - var profileInsigniaBody = new PostProfileInsigniaDto + var profileInsigniaBody = new PostProfileEmpInsigniaDto { profileEmployeeId = profileInsignia.ProfileId.Value, year = insigniaNote.Year,