fix : เครื่องราชย์ + บันทึกเครื่องราชย์

This commit is contained in:
Suphonchai Phoonsawat 2024-06-28 12:27:55 +07:00
parent def2b8f7fe
commit 26ccf67dad
5 changed files with 92 additions and 5 deletions

View file

@ -5179,10 +5179,9 @@ namespace BMA.EHR.Application.Repositories
.Include(x => x.Document)
//.Include(x => x.Organization)
//.ThenInclude(x => x.OrganizationOrganization)
.Where(x => x.OrganizationId != null)
.FirstOrDefaultAsync(x => x.Period.Id == period.Id && x.OrganizationId == ocId);
var oc = _userProfileRepository.GetOc(request.OrganizationId, 0, AccessToken);
var oc = _userProfileRepository.GetOc(ocId, 0, AccessToken);
return new InsigniaResults
{

View file

@ -1,4 +1,5 @@
using BMA.EHR.Application.Common.Interfaces;
using BMA.EHR.Application.Responses.Insignias;
using BMA.EHR.Application.Responses.Organizations;
using BMA.EHR.Application.Responses.Profiles;
using BMA.EHR.Domain.Models.HR;
@ -533,6 +534,25 @@ namespace BMA.EHR.Application.Repositories
}
}
public async Task PostProfileInsigniaAsync(PostProfileInsigniaDto body, string? accessToken)
{
try
{
var apiPath = $"{_configuration["API"]}/org/profile/insignia";
var profiles = new List<SearchProfileDto>();
var apiResult = await PostExternalAPIBooleanAsync(apiPath, accessToken ?? "", body);
}
catch
{
throw;
}
}
#endregion
}
}

View file

@ -22,7 +22,7 @@ namespace BMA.EHR.Application.Requests
public string InsigniaName { get; set; }
public string InsigniaPage { get; set; }
public string InsigniaNo { get; set; }
public int? Kp7InsigniaId { get; set; }
public Guid Kp7InsigniaId { get; set; }
}
public class DocReceive
{

View file

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMA.EHR.Application.Responses.Insignias
{
public class PostProfileInsigniaDto
{
public Guid ProfileId { 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;
}
}