From c3cc2d0b94e14ec0da535bc5f12cce57c70ed183 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Tue, 19 Sep 2023 19:33:02 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= =?UTF-8?q?=E0=B9=83=E0=B8=9A=E0=B9=80=E0=B8=AA=E0=B8=A3=E0=B9=87=E0=B8=88?= =?UTF-8?q?=E0=B9=83=E0=B8=9A=E0=B8=81=E0=B8=B3=E0=B8=81=E0=B8=B1=E0=B8=9A?= =?UTF-8?q?=E0=B9=80=E0=B8=84=E0=B8=A3=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=87?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repositories/Reports/RetireReportRepository.cs | 14 +++++++------- .../Controllers/InsigniaRequestController.cs | 12 ++++++++---- .../Controllers/RetirementResignController.cs | 3 ++- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs index 987e6340..d1deb5a1 100644 --- a/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs @@ -136,17 +136,17 @@ namespace BMA.EHR.Application.Repositories.Reports remove = x.Remove, profileId = x.Profile.Id, citizenId = x.Profile.CitizenId, - prefix = x.Profile.Prefix == null ? string.Empty : x.Profile.Prefix.Name, + prefix = x.Profile.Prefix == null ? "" : x.Profile.Prefix.Name, fullName = $"{(x.Profile.Prefix == null ? null : x.Profile.Prefix.Name)}{x.Profile.FirstName} {x.Profile.LastName}", organizationOrganization = x.Profile.OrganizationOrganization, ocId = x.Profile.OcId, - position = x.Profile.Position == null ? string.Empty : x.Profile.Position.Name, - positionType = x.Profile.PositionType == null ? string.Empty : x.Profile.PositionType.Name, + position = x.Profile.Position == null ? "-" : x.Profile.Position.Name, + positionType = x.Profile.PositionType == null ? "-" : x.Profile.PositionType.Name, positionExecutive = x.Profile.PositionExecutive, - posNo = x.Profile.PosNo == null ? string.Empty : x.Profile.PosNo.Name, - positionEmployeePosition = x.Profile.PositionEmployeePosition == null ? null : x.Profile.PositionEmployeePosition.Name, - positionEmployeeLevel = x.Profile.PositionEmployeeLevel == null ? null : x.Profile.PositionEmployeeLevel.Name, - positionEmployeeGroup = x.Profile.PositionEmployeeGroup == null ? null : x.Profile.PositionEmployeeGroup.Name, + posNo = x.Profile.PosNo == null ? "-" : x.Profile.PosNo.Name, + positionEmployeePosition = x.Profile.PositionEmployeePosition == null ? "-" : x.Profile.PositionEmployeePosition.Name, + positionEmployeeLevel = x.Profile.PositionEmployeeLevel == null ? "-" : x.Profile.PositionEmployeeLevel.Name, + positionEmployeeGroup = x.Profile.PositionEmployeeGroup == null ? "-" : x.Profile.PositionEmployeeGroup.Name, posNoEmployee = x.Profile.PosNoEmployee, }) .ToListAsync(); diff --git a/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs b/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs index 66ebe246..9029a133 100644 --- a/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs +++ b/BMA.EHR.Insignia.Service/Controllers/InsigniaRequestController.cs @@ -124,7 +124,8 @@ namespace BMA.EHR.Insignia.Service.Controllers ret = oc + "/" + ret; } - ret = ret.Substring(0, ret.Length - 1); + if (ret.Length > 2) + ret = ret.Substring(0, ret.Length - 1); return ret; } @@ -1462,6 +1463,9 @@ namespace BMA.EHR.Insignia.Service.Controllers } else { + profileInsignia.DatePayment = req.DatePayment; + profileInsignia.TypePayment = req.TypePayment; + profileInsignia.Address = req.Address; if (profileInsignia.Status != "DONE") { profileInsignia.Issue = req.Issue; @@ -1472,9 +1476,9 @@ namespace BMA.EHR.Insignia.Service.Controllers profileInsignia.Section = req.Section; profileInsignia.Page = req.Page; profileInsignia.No = req.No; - profileInsignia.DatePayment = req.DatePayment; - profileInsignia.TypePayment = req.TypePayment; - profileInsignia.Address = req.Address; + // profileInsignia.DatePayment = req.DatePayment; + // profileInsignia.TypePayment = req.TypePayment; + // profileInsignia.Address = req.Address; profileInsignia.RequestInsignia = insignia; profileInsignia.LastUpdateFullName = FullName ?? "System Administrator"; profileInsignia.LastUpdateUserId = UserId ?? ""; diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs index b4cac7f0..6781d1e1 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs @@ -95,7 +95,8 @@ namespace BMA.EHR.Retirement.Service.Controllers ret = oc + "/" + ret; } - ret = ret.Substring(0, ret.Length - 1); + if (ret.Length > 2) + ret = ret.Substring(0, ret.Length - 1); return ret; }