diff --git a/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs index f9558467..c93ac4f9 100644 --- a/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/InsigniaReportRepository.cs @@ -642,15 +642,15 @@ namespace BMA.EHR.Application.Repositories.Reports InsigniaInitial = r.RequestInsignia.ShortName, InsigniaName = r.RequestInsignia.Name, ProfileId = r.Profile.Id, - CitizenId = r.Profile.CitizenId, + CitizenId = r.Profile.CitizenId == null ? null : r.Profile.CitizenId.ToThaiNumber(), FullName = $"{r.Profile.Prefix?.Name}{r.Profile.FirstName} {r.Profile.LastName}", ShowProfileId = r.Profile.Id, Type = r.Profile.PositionType == null ? "-" : r.Profile.PositionType.Name, AcademicStanding = "", Level = r.Profile.PositionLevel == null ? "-" : r.Profile.PositionLevel.Name, - DateStart = r.Profile.DateStart == null ? null : r.Profile.DateStart.Value.ToThaiShortDate(), - SalaryAmount = r.Profile.Salaries.Count() == 0 ? 0 : - r.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount, + DateStart = r.Profile.DateStart == null ? null : r.Profile.DateStart.Value.ToThaiShortDate().ToThaiNumber(), + SalaryAmount = r.Profile.Salaries.Count() == 0 ? "-" : + Convert.ToInt32(r.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount).ToNumericText().ToThaiNumber(), InsigniaRecv = "", InsigniaRecvDate = "", InsigniaRequest = r.RequestInsignia.ShortName, @@ -911,23 +911,23 @@ namespace BMA.EHR.Application.Repositories.Reports .ToListAsync(); foreach (var insigniaPeriod in insigniaPeriods) { - if (insigniaPeriod.EndDate.AddDays(-insigniaPeriod.Amount).Date == DateTime.Now.Date) - { - await _repositoryNoti.PushNotificationAsync( - Guid.Parse("08db721d-ade4-480e-8d84-0853946a0ea5"), - $"แจ้งเตือนรอบการเสนอขอ {insigniaPeriod.Name} รอบที่{insigniaPeriod.Round}", - $"แจ้งเตือนรอบการเสนอขอ {insigniaPeriod.Name} รอบที่{insigniaPeriod.Round}", - "", - true - ); - await _repositoryNoti.PushNotificationAsync( - Guid.Parse("08db721d-adff-47b0-8762-41cd5c991001"), - $"แจ้งเตือนรอบการเสนอขอ {insigniaPeriod.Name} รอบที่{insigniaPeriod.Round}", - $"แจ้งเตือนรอบการเสนอขอ {insigniaPeriod.Name} รอบที่{insigniaPeriod.Round}", - "", - true - ); - } + // if (insigniaPeriod.EndDate.AddDays(-insigniaPeriod.Amount).Date == DateTime.Now.Date) + // { + await _repositoryNoti.PushNotificationAsync( + Guid.Parse("08db721d-ade4-480e-8d84-0853946a0ea5"), + $"แจ้งเตือนรอบการเสนอขอ {insigniaPeriod.Name} รอบที่{insigniaPeriod.Round} {insigniaPeriod.EndDate.AddDays(-insigniaPeriod.Amount).Date}", + $"แจ้งเตือนรอบการเสนอขอ {insigniaPeriod.Name} รอบที่{insigniaPeriod.Round} {DateTime.Now.Date}", + "", + true + ); + await _repositoryNoti.PushNotificationAsync( + Guid.Parse("08db721d-adff-47b0-8762-41cd5c991001"), + $"แจ้งเตือนรอบการเสนอขอ {insigniaPeriod.Name} รอบที่{insigniaPeriod.Round}", + $"แจ้งเตือนรอบการเสนอขอ {insigniaPeriod.Name} รอบที่{insigniaPeriod.Round}", + "", + true + ); + // } } } diff --git a/BMA.EHR.Report.Service/Controllers/RetireReportController.cs b/BMA.EHR.Report.Service/Controllers/RetireReportController.cs index 4e8ce7d1..4987498e 100644 --- a/BMA.EHR.Report.Service/Controllers/RetireReportController.cs +++ b/BMA.EHR.Report.Service/Controllers/RetireReportController.cs @@ -102,7 +102,7 @@ namespace BMA.EHR.Report.Service.Controllers { report = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream); } - report.ReportParameters["Type"].Value = returnfile != "ยกเลิกประกาศเกษียณข้าราชการ.pdf" && returnfile != "แก้ไขประกาศเกษียณข้าราชการ.pdf" && returnfile != "ยกเลิกประกาศเกษียณลูกจ้างประจำ.pdf" && returnfile != "แก้ไขประกาศเกษียณลูกจ้างประจำ.pdf" ? "1" : "0"; + report.ReportParameters["Type"].Value = (returnfile != "ยกเลิกประกาศเกษียณข้าราชการ.pdf" && returnfile != "ยกเลิกประกาศเกษียณข้าราชการ.docx") && (returnfile != "แก้ไขประกาศเกษียณข้าราชการ.pdf" && returnfile != "แก้ไขประกาศเกษียณข้าราชการ.docx") && (returnfile != "ยกเลิกประกาศเกษียณลูกจ้างประจำ.pdf" && returnfile != "ยกเลิกประกาศเกษียณลูกจ้างประจำ.docx") && (returnfile != "แก้ไขประกาศเกษียณลูกจ้างประจำ.pdf" && returnfile != "แก้ไขประกาศเกษียณลูกจ้างประจำ.docx") ? "1" : "0"; var _profileList = new List(); var _count=0; var tmpOc1 = string.Empty; diff --git a/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-1.trdp b/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-1.trdp index 6d1f4684..9f497b28 100644 Binary files a/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-1.trdp and b/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-1.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/42-แบบ ขร4 บัญชีแสดงคุณสมบัติของข้าราชการซึ่งเสนอขอเครื่องราชฯ.trdp b/BMA.EHR.Report.Service/Reports/42-แบบ ขร4 บัญชีแสดงคุณสมบัติของข้าราชการซึ่งเสนอขอเครื่องราชฯ.trdp index 7c370803..d7eb4a75 100644 Binary files a/BMA.EHR.Report.Service/Reports/42-แบบ ขร4 บัญชีแสดงคุณสมบัติของข้าราชการซึ่งเสนอขอเครื่องราชฯ.trdp and b/BMA.EHR.Report.Service/Reports/42-แบบ ขร4 บัญชีแสดงคุณสมบัติของข้าราชการซึ่งเสนอขอเครื่องราชฯ.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/44-บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ.trdp b/BMA.EHR.Report.Service/Reports/44-บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ.trdp index 4b14992d..dd9302cd 100644 Binary files a/BMA.EHR.Report.Service/Reports/44-บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ.trdp and b/BMA.EHR.Report.Service/Reports/44-บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ.trdp differ diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs index f8ff68d2..d9dfd9d9 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs @@ -640,9 +640,9 @@ namespace BMA.EHR.Retirement.Service.Controllers } var num = 1; - var old_retire = retire.RetirementProfiles.OrderByDescending(x => x.Order).FirstOrDefault(); - if (old_retire != null) - num = old_retire.Order + 1; + // var old_retire = retire.RetirementProfiles.OrderByDescending(x => x.Order).FirstOrDefault(); + // if (old_retire != null) + // num = old_retire.Order + 1; var data = new RetirementProfile {