Merge branch 'develop' into work

This commit is contained in:
Kittapath 2023-09-08 15:24:27 +07:00
commit cba981e432
4 changed files with 2760 additions and 32 deletions

View file

@ -1,6 +1,4 @@
using Amazon.Runtime.Internal.Transform; using BMA.EHR.Application.Common.Interfaces;
using Amazon.S3.Model.Internal.MarshallTransformations;
using BMA.EHR.Application.Common.Interfaces;
using BMA.EHR.Application.Responses.Reports; using BMA.EHR.Application.Responses.Reports;
using BMA.EHR.Domain.Extensions; using BMA.EHR.Domain.Extensions;
using BMA.EHR.Domain.Models.Commands.Core; using BMA.EHR.Domain.Models.Commands.Core;
@ -278,7 +276,7 @@ namespace BMA.EHR.Application.Repositories.Commands
} }
var report_data = (from r in raw_data var report_data = (from r in raw_data
join p in _dbContext.Set<PlacementProfile>() join p in _dbContext.Set<PlacementAppointment>()
.Include(x => x.OrganizationPosition) .Include(x => x.OrganizationPosition)
.ThenInclude(x => x.Organization) .ThenInclude(x => x.Organization)
.Include(x => x.PositionPath) .Include(x => x.PositionPath)

File diff suppressed because it is too large Load diff

View file

@ -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>()

View file

@ -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