diff --git a/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs index 1e9eb62c..ff5fa3e3 100644 --- a/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs @@ -400,9 +400,43 @@ namespace BMA.EHR.Application.Repositories.Reports p.RemarkHorizontal, }) .FirstOrDefaultAsync(); + if (data == null) + data = await _dbContext.Set().AsQueryable() + .Where(x => x.Id == id) + .Select(p => new + { + p.Id, + p.prefix, + p.firstName, + p.lastName, + p.profileId, + p.Location, + p.SendDate, + p.ActiveDate, + p.Reason, + p.Status, + salary = p.AmountOld, + p.ApproveReason, + p.RejectReason, + p.IsActive, + p.CreatedAt, + p.PositionTypeOld, + p.PositionLevelOld, + p.PositionNumberOld, + p.OrganizationPositionOld, + p.OligarchReject, + p.OligarchApproveReason, + p.OligarchRejectReason, + p.OligarchRejectDate, + p.CommanderReject, + p.CommanderApproveReason, + p.CommanderRejectReason, + p.CommanderRejectDate, + p.RemarkHorizontal, + }) + .FirstOrDefaultAsync(); if (data == null) return null; - var _data = new { data.Id, diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs index 356ee3eb..ceeba566 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs @@ -149,7 +149,8 @@ namespace BMA.EHR.Retirement.Service.Controllers p.IsActive, }) .ToListAsync(); - if (status != null && status.Trim().ToUpper() != "WAITTING") + //if (status != null && status.Trim().ToUpper() != "WAITTING") + if (status != null) retirementOuts = retirementOuts.Where(x => x.Status.Contains(status.Trim().ToUpper())).ToList(); return Success(retirementOuts); }