From 38be118e157816f70a0b79cf76b59118d8148cc5 Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Mon, 1 Jul 2024 21:44:11 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=9A=E0=B8=B1?= =?UTF-8?q?=E0=B9=89=E0=B8=99=E0=B8=97=E0=B8=B6=E0=B8=81=E0=B9=80=E0=B8=84?= =?UTF-8?q?=E0=B8=A3=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=87=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=8A=E0=B8=A2=E0=B9=8C=E0=B9=84=E0=B8=9B=20=E0=B8=81?= =?UTF-8?q?=E0=B8=9E7=20=E0=B9=83=E0=B8=AB=E0=B8=A1=E0=B9=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Insignias/PostProfileInsigniaDto.cs | 36 ++++++++----------- .../Controllers/InsigniaReceiveController.cs | 26 +++++++------- .../Controllers/InsigniaRequestController.cs | 28 +++++++-------- 3 files changed, 43 insertions(+), 47 deletions(-) diff --git a/BMA.EHR.Application/Responses/Insignias/PostProfileInsigniaDto.cs b/BMA.EHR.Application/Responses/Insignias/PostProfileInsigniaDto.cs index 903976f7..5677f667 100644 --- a/BMA.EHR.Application/Responses/Insignias/PostProfileInsigniaDto.cs +++ b/BMA.EHR.Application/Responses/Insignias/PostProfileInsigniaDto.cs @@ -1,39 +1,33 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace BMA.EHR.Application.Responses.Insignias +namespace BMA.EHR.Application.Responses.Insignias { public class PostProfileInsigniaDto { - public Guid ProfileId { get; set; } + public Guid profileId { get; set; } - public int Year { get; set; } = 0; + public int year { get; set; } = 0; - public string No { get; set; } = string.Empty; + public string no { get; set; } = string.Empty; - public string Volume { get; set; } = string.Empty; + public string volume { get; set; } = string.Empty; - public string Section { get; set; } = string.Empty; + public string section { get; set; } = string.Empty; - public string Page { get; set; } = string.Empty; + public string page { get; set; } = string.Empty; - public DateTime ReceiveDate { get; set; } = DateTime.MinValue; + public DateTime receiveDate { get; set; } = DateTime.MinValue; - public Guid InsigniaId { get; set; } + public Guid insigniaId { get; set; } - public DateTime DateAnnounce { get; set; } = DateTime.MinValue; + public DateTime dateAnnounce { get; set; } = DateTime.MinValue; - public string Issue { get; set; } = string.Empty; + public string issue { get; set; } = string.Empty; - public string VolumeNo { get; set; } = string.Empty; + public string volumeNo { get; set; } = string.Empty; - public DateTime? RefCommandDate { get; set; } + public DateTime? refCommandDate { get; set; } - public string RefCommandNo { get; set; } = string.Empty; + public string refCommandNo { get; set; } = string.Empty; - public string Note { get; set; } = string.Empty; + public string note { get; set; } = string.Empty; } } diff --git a/BMA.EHR.Insignia.Service/Controllers/InsigniaReceiveController.cs b/BMA.EHR.Insignia.Service/Controllers/InsigniaReceiveController.cs index f9993b3d..e42bc488 100644 --- a/BMA.EHR.Insignia.Service/Controllers/InsigniaReceiveController.cs +++ b/BMA.EHR.Insignia.Service/Controllers/InsigniaReceiveController.cs @@ -162,18 +162,20 @@ namespace BMA.EHR.Insignia.Service.Controllers { await _userProfileRepository.PostProfileInsigniaAsync(new PostProfileInsigniaDto { - ProfileId = Guid.Parse(p.FkProfileId), - Year = item.InsigniaDateannounce.Value.Year, - No = p.InsigniaNo, - Volume = item.InsigniaVolume, - Section = item.InsigniaSection, - Page = p.InsigniaPage, - ReceiveDate = item.InsigniaDatereceive.Value, - InsigniaId = p.Kp7InsigniaId, - DateAnnounce = item.InsigniaDateannounce.Value, - Issue = item.InsigniaIssue, - VolumeNo = item.InsigniaVolumeno.Value.ToString(), - + profileId = Guid.Parse(p.FkProfileId), + year = item.InsigniaDateannounce.Value.Year, + no = p.InsigniaNo, + volume = item.InsigniaVolume, + section = item.InsigniaSection, + page = p.InsigniaPage, + receiveDate = item.InsigniaDatereceive.Value, + insigniaId = p.Kp7InsigniaId, + dateAnnounce = item.InsigniaDateannounce.Value, + issue = item.InsigniaIssue, + volumeNo = item.InsigniaVolumeno.Value.ToString(), + note = "", + refCommandDate = null, + refCommandNo = "", }, AccessToken); } diff --git a/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs b/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs index 7a898b6b..01489df5 100644 --- a/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs +++ b/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs @@ -1906,20 +1906,20 @@ namespace BMA.EHR.Insignia.Service.Controllers var profileInsignia = new PostProfileInsigniaDto { - ProfileId = profile.ProfileId.Value, - Year = insigniaNote.Year, - No = profile.No, - VolumeNo = profile.VolumeNo, - Section = profile.Section, - Page = profile.Page, - ReceiveDate = profile.DateReceive.Value, - DateAnnounce = profile.Date.Value, - InsigniaId = profile.RequestInsignia.Id, - Issue = "", - Note = "", - RefCommandDate = DateTime.MinValue, - RefCommandNo = "", - Volume = "", + profileId = profile.ProfileId.Value, + year = insigniaNote.Year, + no = profile.No, + volumeNo = profile.VolumeNo, + section = profile.Section, + page = profile.Page, + receiveDate = profile.DateReceive.Value, + dateAnnounce = profile.Date.Value, + insigniaId = profile.RequestInsignia.Id, + issue = "", + note = "", + refCommandDate = null, + refCommandNo = "", + volume = "", }; await _userProfileRepository.PostProfileInsigniaAsync(profileInsignia, AccessToken);