diff --git a/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs index d91a32dd..ef11e021 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs @@ -573,7 +573,8 @@ namespace BMA.EHR.Application.Repositories.Commands FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", PlacementCommandIssuer = r.Command.PlacementCommandIssuer, PlacementCommandNo = r.Command.PlacementCommandNo.ToThaiNumber(), - PlacementCommandDate = r.Command.PlacementCommandDate == null ? "" : r.Command.PlacementCommandDate.Value.ToThaiFullDate3().ToThaiNumber() + PlacementCommandDate = r.Command.PlacementCommandDate == null ? "" : r.Command.PlacementCommandDate.Value.ToThaiFullDate3().ToThaiNumber(), + Subject = $"เรื่อง {r.Command.CommandSubject}", }) .ToListAsync(); if (raw_data == null) @@ -608,7 +609,8 @@ namespace BMA.EHR.Application.Repositories.Commands FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", PlacementCommandIssuer = r.Command.PlacementCommandIssuer, PlacementCommandNo = r.Command.PlacementCommandNo.ToThaiNumber(), - PlacementCommandDate = r.Command.PlacementCommandDate == null ? "" : r.Command.PlacementCommandDate.Value.ToThaiFullDate3().ToThaiNumber() + PlacementCommandDate = r.Command.PlacementCommandDate == null ? "" : r.Command.PlacementCommandDate.Value.ToThaiFullDate3().ToThaiNumber(), + Subject = $"เรื่อง {r.Command.CommandSubject}", }) .ToListAsync(); if (raw_data == null) @@ -898,7 +900,8 @@ namespace BMA.EHR.Application.Repositories.Commands GuiltyBasis = r.Command.GuiltyBasis.ToThaiNumber(), ConclusionFireNo = r.Command!.ConclusionFireNo.ToThaiNumber(), ConclusionFireDate = r.Command.ConclusionFireDate == null ? "" : r.Command.ConclusionFireDate.Value.ToThaiFullDate3().ToThaiNumber(), - ConclusionFireResolution = r.Command.ConclusionFireResolution.ToThaiNumber() + ConclusionFireResolution = r.Command.ConclusionFireResolution.ToThaiNumber(), + Subject = $"เรื่อง {r.Command.CommandSubject}", }) .ToList(); @@ -952,7 +955,8 @@ namespace BMA.EHR.Application.Repositories.Commands GuiltyBasis = r.Command.GuiltyBasis.ToThaiNumber(), ConclusionFireNo = r.Command!.ConclusionFireNo.ToThaiNumber(), ConclusionFireDate = r.Command.ConclusionFireDate == null ? "" : r.Command.ConclusionFireDate.Value.ToThaiFullDate3().ToThaiNumber(), - ConclusionFireResolution = r.Command.ConclusionFireResolution.ToThaiNumber() + ConclusionFireResolution = r.Command.ConclusionFireResolution.ToThaiNumber(), + Subject = $"เรื่อง {r.Command.CommandSubject}", }) .ToList(); diff --git a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs index b22bfafd..55987cd8 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs @@ -6695,9 +6695,9 @@ namespace BMA.EHR.Application.Repositories.Commands Double MonthSalaryAmount = 0; if (profile != null && profile.Salaries.Count() > 0) { - SalaryAmount = placementProfile.Amount == null || placementProfile.Amount == 0 ? profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value : 0; - PositionSalaryAmount = placementProfile.PositionSalaryAmount == null || placementProfile.PositionSalaryAmount == 0 ? profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().PositionSalaryAmount.Value : 0; - MonthSalaryAmount = placementProfile.MouthSalaryAmount == null || placementProfile.MouthSalaryAmount == 0 ? profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().MouthSalaryAmount.Value : 0; + SalaryAmount = placementProfile.Amount == null || placementProfile.Amount == 0 ? (profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount != null ? profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value : 0) : 0; + PositionSalaryAmount = placementProfile.PositionSalaryAmount == null || placementProfile.PositionSalaryAmount == 0 ? (profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().PositionSalaryAmount != null ? profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().PositionSalaryAmount.Value : 0) : 0; + MonthSalaryAmount = placementProfile.MouthSalaryAmount == null || placementProfile.MouthSalaryAmount == 0 ? (profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().MouthSalaryAmount != null ? profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().MouthSalaryAmount.Value : 0) : 0; } return new PlacementSalaryResponse diff --git a/BMA.EHR.Application/Responses/Reports/CommandType11Response.cs b/BMA.EHR.Application/Responses/Reports/CommandType11Response.cs index 7e45cdac..3e80b20d 100644 --- a/BMA.EHR.Application/Responses/Reports/CommandType11Response.cs +++ b/BMA.EHR.Application/Responses/Reports/CommandType11Response.cs @@ -23,5 +23,6 @@ public string PlacementCommandNo { get; set; } = string.Empty; public string PlacementCommandDate { get; set; } = string.Empty; + public string Subject { get; set; } = string.Empty; } } diff --git a/BMA.EHR.Application/Responses/Reports/CommandType18Response.cs b/BMA.EHR.Application/Responses/Reports/CommandType18Response.cs index 31636db8..49c6baab 100644 --- a/BMA.EHR.Application/Responses/Reports/CommandType18Response.cs +++ b/BMA.EHR.Application/Responses/Reports/CommandType18Response.cs @@ -39,5 +39,6 @@ public string ConclusionFireDate { get; set; } = string.Empty; public string ConclusionFireResolution { get; set; } = string.Empty; + public string Subject { get; set; } = string.Empty; } }