From a0cfb23350e0b22b87453155f9bf41e447493f2c Mon Sep 17 00:00:00 2001 From: Bright Date: Wed, 10 Sep 2025 16:41:41 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=81=E0=B8=99?= =?UTF-8?q?=E0=B8=9A=E0=B8=97=E0=B9=89=E0=B8=B2=E0=B8=A2=E0=B8=84=E0=B8=B3?= =?UTF-8?q?=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=E0=B8=84=E0=B8=B3=E0=B8=AA?= =?UTF-8?q?=E0=B8=B1=E0=B9=88=E0=B8=87=E0=B8=9A=E0=B8=A3=E0=B8=A3=E0=B8=88?= =?UTF-8?q?=E0=B8=B8=E0=B8=81=E0=B8=A5=E0=B8=B1=E0=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/RetirementOtherController.cs | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs index 5a3d4413..d71fabda 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs @@ -740,7 +740,7 @@ namespace BMA.EHR.Retirement.Service.Controllers No = r.Sequence.ToString().ToThaiNumber(), FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", Education = p.EducationOld == null ? "-" : p.EducationOld, - OldOc = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld, + OldOc = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld.ToThaiNumber(), OldPositionType = p.PositionTypeOld == null ? "-" : p.PositionTypeOld, OldPositionLevel = p.PositionLevelOld == null ? "-" : p.PositionLevelOld, OldPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), @@ -752,7 +752,7 @@ namespace BMA.EHR.Retirement.Service.Controllers (p.child3 == null ? "" : $"{p.child3}\n") + (p.child2 == null ? "" : $"{p.child2}\n") + (p.child1 == null ? "" : $"{p.child1}\n") + - (p.root == null ? "" : $"{p.root}"), + (p.root == null ? "" : $"{p.root}").ToThaiNumber(), NewPositionType = p.posTypeName == null ? "-" : p.posTypeName, NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName, NewPositionNumber = p.rootShortName == null && p.posMasterNo == null ? null : $"{(p.child1ShortName == null ? p.rootShortName : (p.child2ShortName == null ? p.child1ShortName : (p.child3ShortName == null ? p.child2ShortName : (p.child4ShortName == null ? p.child3ShortName : p.child4ShortName))))}" + @@ -983,23 +983,24 @@ namespace BMA.EHR.Retirement.Service.Controllers No = r.Sequence.ToString().ToThaiNumber(), FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", Education = p.EducationOld == null ? "-" : p.EducationOld, - OldOc = p.OrganizationPositionOld == null ? "-" : p.OrganizationPositionOld, + OldOc = p.OrganizationPositionOld == null ? "-" : p.OrganizationPositionOld.ToThaiNumber(), OldPositionType = p.PositionTypeOld == null ? "-" : p.PositionTypeOld, OldPositionLevel = p.PositionLevelOld == null ? "-" : p.PositionLevelOld, OldPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), LeaveDate = p.LeaveDate == null ? "-" : p.LeaveDate.Value.ToThaiShortDate2().ToThaiNumber(), MilitaryDate = p.MilitaryDate == null ? "-" : p.MilitaryDate.Value.ToThaiShortDate2().ToThaiNumber(), - NewOc = (p.PositionOld == null ? "" : $"{p.PositionOld}\n") + - (p.PositionExecutiveOld == null ? "" : (p.positionExecutiveFieldOld == null ? $"{p.PositionExecutiveOld}\n" : $"{p.PositionExecutiveOld}({p.positionExecutiveFieldOld})\n")) + - (p.child4Old == null ? "" : $"{p.child4Old}\n") + - (p.child3Old == null ? "" : $"{p.child3Old}\n") + - (p.child2Old == null ? "" : $"{p.child2Old}\n") + - (p.child1Old == null ? "" : $"{p.child1Old}\n") + - (p.rootOld == null ? "" : $"{p.rootOld}"), - NewPositionType = p.PositionTypeOld == null ? "-" : p.PositionTypeOld, - NewPositionLevel = p.PositionLevelOld == null ? "-" : p.PositionLevelOld, - NewPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), + NewOc = (p.position == null ? "" : $"{p.position}\n") + + (p.PositionExecutive == null ? "" : (p.positionExecutiveField == null ? $"{p.PositionExecutive}\n" : $"{p.PositionExecutive}({p.positionExecutiveField})\n")) + + (p.child4 == null ? "" : $"{p.child4}\n") + + (p.child3 == null ? "" : $"{p.child3}\n") + + (p.child2 == null ? "" : $"{p.child2}\n") + + (p.child1 == null ? "" : $"{p.child1}\n") + + (p.root == null ? "" : $"{p.root}").ToThaiNumber(), + NewPositionType = p.posTypeName == null ? "-" : p.posTypeName, + NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName, + NewPositionNumber = p.rootShortName == null && p.posMasterNo == null ? null : $"{(p.child1ShortName == null ? p.rootShortName : (p.child2ShortName == null ? p.child1ShortName : (p.child3ShortName == null ? p.child2ShortName : (p.child4ShortName == null ? p.child3ShortName : p.child4ShortName))))}" + + $" {p.posMasterNo?.ToString().ToThaiNumber()}", NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.PositionDate == null ? "-" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(), CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(),