fix select placement round
This commit is contained in:
parent
9aa444b40b
commit
085b684980
3 changed files with 24 additions and 1 deletions
|
|
@ -182,6 +182,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
.Include(x => x.OrganizationPosition)
|
.Include(x => x.OrganizationPosition)
|
||||||
.ThenInclude(x => x!.Organization)
|
.ThenInclude(x => x!.Organization)
|
||||||
//.Where(x => x.OrganizationPosition!.Organization!.Id == command.OwnerGovId)
|
//.Where(x => x.OrganizationPosition!.Organization!.Id == command.OwnerGovId)
|
||||||
|
.Where(x => x.Placement.Id == command.Placement.Id)
|
||||||
.Where(x => !otherCommandReceivers.Contains(x.CitizenId!))
|
.Where(x => !otherCommandReceivers.Contains(x.CitizenId!))
|
||||||
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
||||||
.Where(x => x.Draft! == true)
|
.Where(x => x.Draft! == true)
|
||||||
|
|
@ -246,6 +247,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
.Include(x => x.OrganizationPosition)
|
.Include(x => x.OrganizationPosition)
|
||||||
.ThenInclude(x => x!.Organization)
|
.ThenInclude(x => x!.Organization)
|
||||||
//.Where(x => x.OrganizationPosition!.Organization!.Id == command.OwnerGovId)
|
//.Where(x => x.OrganizationPosition!.Organization!.Id == command.OwnerGovId)
|
||||||
|
.Where(x => x.Placement.Id == command.Placement.Id)
|
||||||
.Where(x => !otherCommandReceivers.Contains(x.CitizenId!))
|
.Where(x => !otherCommandReceivers.Contains(x.CitizenId!))
|
||||||
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
||||||
.Where(x => x.Draft! == true)
|
.Where(x => x.Draft! == true)
|
||||||
|
|
@ -311,6 +313,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
.Include(x => x.OrganizationPosition)
|
.Include(x => x.OrganizationPosition)
|
||||||
.ThenInclude(x => x!.Organization)
|
.ThenInclude(x => x!.Organization)
|
||||||
//.Where(x => x.OrganizationPosition!.Organization!.Id == command.OwnerGovId)
|
//.Where(x => x.OrganizationPosition!.Organization!.Id == command.OwnerGovId)
|
||||||
|
.Where(x => x.Placement.Id == command.Placement.Id)
|
||||||
.Where(x => !otherCommandReceivers.Contains(x.CitizenId!))
|
.Where(x => !otherCommandReceivers.Contains(x.CitizenId!))
|
||||||
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
||||||
.Where(x => x.Draft! == true)
|
.Where(x => x.Draft! == true)
|
||||||
|
|
@ -375,6 +378,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
.Include(x => x.Prefix)
|
.Include(x => x.Prefix)
|
||||||
.Include(x => x.OrganizationPosition)
|
.Include(x => x.OrganizationPosition)
|
||||||
.ThenInclude(x => x!.Organization)
|
.ThenInclude(x => x!.Organization)
|
||||||
|
.Where(x => x.Placement.Id == command.Placement.Id)
|
||||||
.Where(x => !otherCommandReceivers.Contains(x.CitizenId!))
|
.Where(x => !otherCommandReceivers.Contains(x.CitizenId!))
|
||||||
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
||||||
.Where(x => x.Draft! == true)
|
.Where(x => x.Draft! == true)
|
||||||
|
|
@ -5981,6 +5985,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,22 @@ namespace BMA.EHR.Application.Repositories
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<List<Placement>> GetAllPlacementAsync()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var data = await _dbContext.Set<Placement>()
|
||||||
|
.Include(p => p.PlacementType)
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<List<Placement>> GetQualifyingPlacementAsync()
|
public async Task<List<Placement>> GetQualifyingPlacementAsync()
|
||||||
{
|
{
|
||||||
var data = await _dbContext.Set<Placement>()
|
var data = await _dbContext.Set<Placement>()
|
||||||
|
|
|
||||||
|
|
@ -2601,7 +2601,9 @@ namespace BMA.EHR.Command.Service.Controllers
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var rawData = commandCode.Trim().ToUpper() == "C-PM-01" ? await _placementRepository.GetCompetitivePlacementAsync() : await _placementRepository.GetQualifyingPlacementAsync();
|
var rawData = commandCode.Trim().ToUpper() == "C-PM-01" ? await _placementRepository.GetCompetitivePlacementAsync() :
|
||||||
|
commandCode.Trim().ToUpper() == "C-PM-02" ? await _placementRepository.GetQualifyingPlacementAsync() :
|
||||||
|
await _placementRepository.GetAllPlacementAsync();
|
||||||
|
|
||||||
|
|
||||||
var data = rawData.Select(x => new
|
var data = rawData.Select(x => new
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue