diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs index 777bef02..55ab30a7 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs @@ -738,9 +738,10 @@ namespace BMA.EHR.Retirement.Service.Controllers (p.child2 == null ? "" : $"{p.child2}\n") + (p.child1 == null ? "" : $"{p.child1}\n") + (p.root == null ? "" : $"{p.root}"), - NewPositionType = p.PositionTypeOld == null ? "-" : p.PositionTypeOld, - NewPositionLevel = p.PositionLevelOld == null ? "-" : p.PositionLevelOld, - NewPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.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(),