insignia note
This commit is contained in:
parent
15cb83db64
commit
6b680cb9dd
1 changed files with 36 additions and 9 deletions
|
|
@ -8,6 +8,7 @@ using BMA.EHR.Domain.Models.Insignias;
|
||||||
using BMA.EHR.Domain.Models.MetaData;
|
using BMA.EHR.Domain.Models.MetaData;
|
||||||
using BMA.EHR.Domain.Shared;
|
using BMA.EHR.Domain.Shared;
|
||||||
using BMA.EHR.Infrastructure.MessageQueue;
|
using BMA.EHR.Infrastructure.MessageQueue;
|
||||||
|
using BMA.EHR.Infrastructure.Migrations.LeaveDb;
|
||||||
using BMA.EHR.Infrastructure.Persistence;
|
using BMA.EHR.Infrastructure.Persistence;
|
||||||
using BMA.EHR.Insignia.Service.Requests;
|
using BMA.EHR.Insignia.Service.Requests;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
|
@ -755,7 +756,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
var org = _userProfileRepository.GetOc(ocId, 0, AccessToken);
|
var org = _userProfileRepository.GetOc(ocId, 0, AccessToken);
|
||||||
|
|
||||||
requestNew.RequestStatus = "st6";
|
requestNew.RequestStatus = "st6";
|
||||||
|
|
||||||
requestNew.RequestNote = "";
|
requestNew.RequestNote = "";
|
||||||
await _repositoryNoti.PushNotificationAsync(
|
await _repositoryNoti.PushNotificationAsync(
|
||||||
Guid.Parse("08dbc953-64d9-497a-87a3-0244eade622c"),
|
Guid.Parse("08dbc953-64d9-497a-87a3-0244eade622c"),
|
||||||
|
|
@ -1164,7 +1165,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
LastUpdatedAt = DateTime.Now,
|
LastUpdatedAt = DateTime.Now,
|
||||||
|
|
||||||
// Add Information for reused in API Call
|
// Add Information for reused in API Call
|
||||||
ProfileType = "officer",
|
ProfileType = profile.ProfileType ?? "officer",
|
||||||
Prefix = profile.Prefix,
|
Prefix = profile.Prefix,
|
||||||
FirstName = profile.FirstName,
|
FirstName = profile.FirstName,
|
||||||
LastName = profile.LastName,
|
LastName = profile.LastName,
|
||||||
|
|
@ -1316,6 +1317,24 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
LastUpdateFullName = FullName ?? "System Administrator",
|
LastUpdateFullName = FullName ?? "System Administrator",
|
||||||
LastUpdateUserId = UserId ?? "",
|
LastUpdateUserId = UserId ?? "",
|
||||||
LastUpdatedAt = DateTime.Now,
|
LastUpdatedAt = DateTime.Now,
|
||||||
|
|
||||||
|
|
||||||
|
// Add Information for reused in API Call
|
||||||
|
ProfileType = profileOld.ProfileType ?? "officer",
|
||||||
|
Prefix = profileOld.Prefix,
|
||||||
|
FirstName = profileOld.FirstName,
|
||||||
|
LastName = profileOld.LastName,
|
||||||
|
CitizenId = profileOld.CitizenId,
|
||||||
|
BirthDate = profileOld.BirthDate,
|
||||||
|
DateAppoint = profileOld.DateAppoint,
|
||||||
|
Position = profileOld.Position,
|
||||||
|
Gender = profileOld.Gender,
|
||||||
|
PosTypeName = profileOld.PosTypeName,
|
||||||
|
PosLevelName = profileOld.PosLevelName,
|
||||||
|
PosNo = profileOld.PosNo,
|
||||||
|
Amount = profileOld.Amount,
|
||||||
|
PositionSalaryAmount = profileOld.PositionSalaryAmount,
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1603,7 +1622,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
|
|
||||||
return Success(_insigniaNoteProfiles);
|
return Success(_insigniaNoteProfiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// list รายชื่อบันทึกผลการได้รับพระราชทานเครื่องราชอิสริยสภรณ์/การจ่ายใบกำกับ ไม่ validate สิทธิ์
|
/// list รายชื่อบันทึกผลการได้รับพระราชทานเครื่องราชอิสริยสภรณ์/การจ่ายใบกำกับ ไม่ validate สิทธิ์
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -1769,12 +1788,20 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
.Select(x => new
|
.Select(x => new
|
||||||
{
|
{
|
||||||
Id = x.Id,
|
Id = x.Id,
|
||||||
Profile = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken),
|
|
||||||
|
Prefix = x.Prefix,
|
||||||
|
FirstName = x.FirstName,
|
||||||
|
LastName = x.LastName,
|
||||||
|
CitizenId = x.CitizenId,
|
||||||
|
Positon = x.Position ?? "",
|
||||||
|
ProfileType = x.ProfileType,
|
||||||
|
|
||||||
|
//Profile = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken),
|
||||||
//Prefix = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).Prefix,
|
//Prefix = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).Prefix,
|
||||||
//Position = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).Position,
|
//Position = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).Position,
|
||||||
//ProfileType = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).ProfileType,
|
//ProfileType = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).ProfileType,
|
||||||
OcId = Guid.Empty,
|
OcId = Guid.Empty,
|
||||||
CitizenId = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).CitizenId,
|
//CitizenId = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).CitizenId,
|
||||||
//FullName = $"{_userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).Prefix}{_userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).FirstName} {_userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).LastName}",
|
//FullName = $"{_userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).Prefix}{_userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).FirstName} {_userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).LastName}",
|
||||||
RequestInsignia = x.RequestInsignia.Name,
|
RequestInsignia = x.RequestInsignia.Name,
|
||||||
RequestInsigniaId = x.RequestInsignia.Id,
|
RequestInsigniaId = x.RequestInsignia.Id,
|
||||||
|
|
@ -1798,11 +1825,11 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
var _insigniaNoteProfile = new
|
var _insigniaNoteProfile = new
|
||||||
{
|
{
|
||||||
insigniaNoteProfile.Id,
|
insigniaNoteProfile.Id,
|
||||||
Prefix = insigniaNoteProfile.Profile is not null ? insigniaNoteProfile.Profile.Prefix : "",
|
Prefix = insigniaNoteProfile.Prefix ?? "",
|
||||||
Position = insigniaNoteProfile.Profile is not null ? insigniaNoteProfile.Profile.Position : "",
|
Position = insigniaNoteProfile.Positon,
|
||||||
insigniaNoteProfile.CitizenId,
|
insigniaNoteProfile.CitizenId,
|
||||||
ProfileType = insigniaNoteProfile.Profile is not null ? insigniaNoteProfile.Profile.ProfileType : "",
|
ProfileType = insigniaNoteProfile.ProfileType ?? "",
|
||||||
FullName = insigniaNoteProfile.Profile is not null ? $"{insigniaNoteProfile.Profile.Prefix}{insigniaNoteProfile.Profile.FirstName} {insigniaNoteProfile.Profile.LastName}" : "",
|
FullName = $"{insigniaNoteProfile.Prefix ?? ""}{insigniaNoteProfile.FirstName ?? ""} {insigniaNoteProfile.LastName ?? ""}",
|
||||||
insigniaNoteProfile.RequestInsignia,
|
insigniaNoteProfile.RequestInsignia,
|
||||||
insigniaNoteProfile.RequestInsigniaId,
|
insigniaNoteProfile.RequestInsigniaId,
|
||||||
insigniaNoteProfile.RequestInsigniaShortName,
|
insigniaNoteProfile.RequestInsigniaShortName,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue