From 124109bf578491df573455e0ab59aeb6910c270b Mon Sep 17 00:00:00 2001 From: Bright Date: Mon, 28 Apr 2025 18:41:34 +0700 Subject: [PATCH] fix issue #1401 --- .../Controllers/RetirementOtherController.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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(),