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;
}
}
diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs
index 18595896..01834a1a 100644
--- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs
+++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs
@@ -522,8 +522,8 @@ namespace BMA.EHR.Placement.Service.Controllers
/// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
/// ไม่ได้ Login เข้าระบบ
/// เมื่อเกิดข้อผิดพลาดในการทำงาน
- [HttpPut("report/{commandTypeId:length(36)}")]
- public async Task> PostToReport([FromBody] PlacementProfileRequest req, Guid commandTypeId)
+ [HttpPost("report")]
+ public async Task> PostToReport([FromBody] PlacementProfileRequest req)
{
foreach (var item in req.Id)
{
@@ -533,7 +533,7 @@ namespace BMA.EHR.Placement.Service.Controllers
if (uppdated == null)
continue;
- uppdated.CommandType = await _context.CommandTypes.FindAsync(commandTypeId);
+ // uppdated.CommandType = await _context.CommandTypes.FindAsync(commandTypeId);
uppdated.Status = "REPORT";
uppdated.LastUpdateFullName = FullName ?? "System Administrator";
uppdated.LastUpdateUserId = UserId ?? "";
diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs
index 29c29dd9..82183194 100644
--- a/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs
+++ b/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs
@@ -310,6 +310,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
{
if (!req.Type.Trim().ToUpper().Contains("EMPLOYEE") && !req.Type.Trim().ToUpper().Contains("OFFICER"))
return Error("ประเภทพ้นราชการไม่ถูกต้อง");
+ if (req.Year == 0)
+ {
+ req.Year = DateTime.Now.Year;
+ if (req.Year > 2500)
+ req.Year = req.Year - 543;
+ }
var round = 1;
var retire = await _context.RetirementPeriods