fix
Some checks failed
release-dev / release-dev (push) Failing after 13s

This commit is contained in:
Suphonchai Phoonsawat 2024-08-30 13:45:32 +07:00
parent 689c425acb
commit a098620b7b

View file

@ -5,6 +5,7 @@ using BMA.EHR.Application.Responses.Insignias;
using BMA.EHR.Domain.Common;
using BMA.EHR.Domain.Extensions;
using BMA.EHR.Domain.Models.Insignias;
using BMA.EHR.Domain.Models.MetaData;
using BMA.EHR.Domain.Shared;
using BMA.EHR.Infrastructure.MessageQueue;
using BMA.EHR.Infrastructure.Persistence;
@ -745,6 +746,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
var org = _userProfileRepository.GetOc(ocId, 0, AccessToken);
requestNew.RequestStatus = "st6";
requestNew.RequestNote = "";
await _repositoryNoti.PushNotificationAsync(
Guid.Parse("08dbc953-64d9-497a-87a3-0244eade622c"),
@ -1207,7 +1209,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
.FirstOrDefaultAsync(x => x.Id == insigniaPeriodId);
if (insigniaPeriod == null)
return Error(GlobalMessages.InsigniaRequestNotFound);
insigniaPeriod.IsLock = true;
//insigniaPeriod.IsLock = true;
var insigniaNote = await _context.InsigniaNotes
.Include(x => x.InsigniaNoteProfiles)
// .ThenInclude(x => x.Profile)
@ -1317,7 +1319,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
.FirstOrDefaultAsync(x => x.Id == insigniaPeriodId);
if (insigniaPeriod == null)
return Error(GlobalMessages.InsigniaRequestNotFound);
insigniaPeriod.IsLock = true;
//insigniaPeriod.IsLock = true;
await _context.SaveChangesAsync();
return Success();
}
@ -1560,12 +1562,13 @@ namespace BMA.EHR.Insignia.Service.Controllers
.Select(x => new
{
Id = x.Id,
Prefix = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).Prefix,
Position = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).Position,
ProfileType = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).ProfileType,
Profile = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken),
//Prefix = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).Prefix,
//Position = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).Position,
//ProfileType = _userProfileRepository.GetOfficerProfileById(x.ProfileId.Value, AccessToken).ProfileType,
OcId = Guid.Empty,
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,
RequestInsigniaId = x.RequestInsignia.Id,
RequestInsigniaShortName = x.RequestInsignia.ShortName,
@ -1588,11 +1591,11 @@ namespace BMA.EHR.Insignia.Service.Controllers
var _insigniaNoteProfile = new
{
insigniaNoteProfile.Id,
insigniaNoteProfile.Prefix,
insigniaNoteProfile.Position,
Prefix = insigniaNoteProfile.Profile is not null ? insigniaNoteProfile.Profile.Prefix : "",
Position = insigniaNoteProfile.Profile is not null ? insigniaNoteProfile.Profile.Position : "",
insigniaNoteProfile.CitizenId,
insigniaNoteProfile.ProfileType,
insigniaNoteProfile.FullName,
ProfileType = insigniaNoteProfile.Profile is not null ? insigniaNoteProfile.Profile.ProfileType : "",
FullName = insigniaNoteProfile.Profile is not null ? $"{insigniaNoteProfile.Profile.Prefix}{insigniaNoteProfile.Profile.FirstName} {insigniaNoteProfile.Profile.LastName}" : "",
insigniaNoteProfile.RequestInsignia,
insigniaNoteProfile.RequestInsigniaId,
insigniaNoteProfile.RequestInsigniaShortName,