แก้บั้นทึกเครื่องราชย์ไป กพ7 ใหม่

This commit is contained in:
Suphonchai Phoonsawat 2024-07-01 21:44:11 +07:00
parent 6c42209217
commit 38be118e15
3 changed files with 43 additions and 47 deletions

View file

@ -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;
}
}

View file

@ -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);
}

View file

@ -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);