แก้รายชื่อแนบท้ายไม่แสดง
This commit is contained in:
parent
8a84d7faa8
commit
10207e76f0
5 changed files with 106 additions and 15 deletions
|
|
@ -5,10 +5,8 @@ using BMA.EHR.Domain.Models.MetaData;
|
|||
using BMA.EHR.Domain.Models.Organizations;
|
||||
using BMA.EHR.Domain.Models.Placement;
|
||||
using BMA.EHR.Domain.Shared;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Transactions;
|
||||
using Command = BMA.EHR.Domain.Models.Commands.Core.Command;
|
||||
|
||||
namespace BMA.EHR.Application.Repositories.Commands
|
||||
|
|
@ -93,7 +91,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
else
|
||||
{
|
||||
if (command.Receivers != null || command!.Receivers!.Count > 0)
|
||||
if (command.Receivers != null && command!.Receivers!.Count > 0)
|
||||
{
|
||||
return command.Receivers;
|
||||
}
|
||||
|
|
@ -110,9 +108,10 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
|
||||
// 2. Query
|
||||
var appointPeople = await _dbContext.Set<PlacementProfile>()
|
||||
.Include(x => x.Prefix)
|
||||
.Include(x => x.OrganizationPosition)
|
||||
.ThenInclude(x => x.Organization)
|
||||
//.Where(x => x.OrganizationPosition.Organization.Id )
|
||||
//.Where(x => x.OrganizationPosition!.Organization!.Id == command.OwnerGovId)
|
||||
.Where(x => !otherCommandReceivers.Contains(x.CitizenId!))
|
||||
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
||||
.Where(x => x.Draft! == true)
|
||||
|
|
@ -624,6 +623,26 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
}
|
||||
}
|
||||
|
||||
//public async Task<Guid> GetRootOcIdAsync(Guid ocId)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// var data = await _dbContext.Set<OrganizationEntity>().AsQueryable()
|
||||
|
||||
|
||||
// .FirstOrDefaultAsync(o => o.Id == ocId);
|
||||
|
||||
// if(data == null)
|
||||
// throw new Exception(GlobalMessages.OrganizationNotFound);
|
||||
|
||||
// return data.Government!.Id
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// throw;
|
||||
// }
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue