Merge branch 'develop' of github.com:Frappet/BMA-EHR-BackEnd into develop

This commit is contained in:
kittapath 2024-10-22 10:54:50 +07:00
commit d8d3838d5c
3 changed files with 156 additions and 95 deletions

View file

@ -814,6 +814,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ ปลดออกจากราชการ",
amount = r.amount,
positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount,
}).ToList();
var baseAPIOrg = _configuration["API"];
@ -907,6 +910,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ ไล่ออกจากราชการ",
amount = r.amount,
positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount,
}).ToList();
var baseAPIOrg = _configuration["API"];
@ -1058,6 +1064,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ พักจากราชการ",
amount = r.amount,
positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount,
}).ToList();
var baseAPIOrg = _configuration["API"];
@ -1167,6 +1176,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ ให้ออกจากราชการไว้ก่อน",
amount = r.amount,
positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount,
}).ToList();
var baseAPIOrg = _configuration["API"];
@ -1275,6 +1287,9 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ ลงโทษ ภาคทัณฑ์",
amount = r.amount,
positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount,
}).ToList();
var baseAPIOrg = _configuration["API"];
@ -1382,7 +1397,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ ตัดเงินเดือน"
unStigma = "คำสั่งลงโทษ ตัดเงินเดือน",
amount = r.amount,
positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount,
}).ToList();
var baseAPIOrg = _configuration["API"];
@ -1490,7 +1508,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งลงโทษ ลดขั้นเงินเดือน"
unStigma = "คำสั่งลงโทษ ลดขั้นเงินเดือน",
amount = r.amount,
positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount,
}).ToList();
var baseAPIOrg = _configuration["API"];
@ -1598,7 +1619,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งเพิ่มโทษ"
unStigma = "คำสั่งเพิ่มโทษ",
amount = r.amount,
positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount,
}).ToList();
var baseAPIOrg = _configuration["API"];
@ -1706,7 +1730,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
refCommandDate = DateTime.Now,
detail = p.DisciplineDisciplinary.Title,
level = p.DisciplineDisciplinary.DisciplinaryFaultLevel,
unStigma = "คำสั่งงดโทษ"
unStigma = "คำสั่งงดโทษ",
amount = r.amount,
positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount,
}).ToList();
var baseAPIOrg = _configuration["API"];
@ -1830,7 +1857,10 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
refCommandDate = DateTime.Now,
detail = p.DisciplineInvestigate.Title,
level = "",
unStigma = "คำสั่งยุติเรื่อง"
unStigma = "คำสั่งยุติเรื่อง",
amount = r.amount,
positionSalaryAmount = r.positionSalaryAmount,
mouthSalaryAmount = r.mouthSalaryAmount,
}).ToList();
var baseAPIOrg = _configuration["API"];
var apiUrlOrg = $"{baseAPIOrg}/org/command/excexute/salary-leave-discipline";

View file

@ -817,23 +817,23 @@ namespace BMA.EHR.Placement.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) + "/" + (p.rootOld == null ? "" : p.rootOld),
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(),
OldOc = (p.OrganizationPositionOld == null ? "-" : p.OrganizationPositionOld) + "/" + (p.rootOld == null ? "" : p.rootOld),
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 = "",
NewOc = (p.position == null ? "" : p.position) + "/" + (p.root == null ? "" : p.root),
NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
NewPositionNumber = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
NewPositionNumber = p.posMasterNo == null ? "-" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
RemarkHorizontal = r.RemarkHorizontal,
RemarkVertical = r.RemarkVertical,
}).ToList();

View file

@ -1557,31 +1557,31 @@ namespace BMA.EHR.Placement.Service.Controllers
{
No = r.Sequence.ToString().ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" :
p.PlacementEducations.FirstOrDefault().Degree,
PositionName = p.positionName == null ? "" : p.positionName,
ExamNumber = p.ExamNumber == null ? "0" : p.ExamNumber.Value.ToString().ToThaiNumber(),
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" :
p.PlacementEducations.FirstOrDefault().Degree,
PositionName = p.positionName == null ? "-" : p.positionName,
ExamNumber = p.ExamNumber == null ? "-" : p.ExamNumber.Value.ToString().ToThaiNumber(),
PlacementName = $"{p.Placement.Name.ToThaiNumber()} ครั้งที่ {p.Placement.Round.ToThaiNumber()}/{p.Placement.Year.ToThaiYear().ToString().ToThaiNumber()}",
Oc = p.root == null ? "" :
p.node == 4 ? $"{p.child4}/{p.child3}/{p.child2}/{p.child1}/{p.root}" :
p.node == 3 ? $"{p.child3}/{p.child2}/{p.child1}/{p.root}" :
p.node == 2 ? $"{p.child2}/{p.child1}/{p.root}" :
p.node == 1 ? $"{p.child1}/{p.root}" :
p.node == 0 ? $"{p.root}" : "",
PositionType = p.posTypeName == null ? "" : p.posTypeName,
PositionLevel = p.posLevelName == null ? "" : p.posLevelName,
PositionNumber = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
Salary = r.Amount == null ? "0" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(),
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
p.node == 4 ? $"{p.child4}/{p.child3}/{p.child2}/{p.child1}/{p.root}" :
p.node == 3 ? $"{p.child3}/{p.child2}/{p.child1}/{p.root}" :
p.node == 2 ? $"{p.child2}/{p.child1}/{p.root}" :
p.node == 1 ? $"{p.child1}/{p.root}" :
p.node == 0 ? $"{p.root}" : "",
PositionType = p.posTypeName == null ? "-" : p.posTypeName,
PositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
PositionNumber = p.posMasterNo == null ? "-" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
Salary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(),
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
RemarkHorizontal = r.RemarkHorizontal,
RemarkVertical = r.RemarkVertical,
OccupationPosition = p.OccupationPosition == null ? "" : p.OccupationPosition, //ตำแหน่งเก่าก่อนสอบ
PositionCandidate = p.PositionCandidate == null ? "" : p.PositionCandidate.Name //ตำแหน่งที่สอบแข่งขัน
OccupationPosition = p.OccupationPosition == null ? "-" : p.OccupationPosition, //ตำแหน่งเก่าก่อนสอบ
PositionCandidate = p.PositionCandidate == null ? "-" : p.PositionCandidate.Name //ตำแหน่งที่สอบแข่งขัน
}).ToList();
return Success(report_data);
}
@ -1811,6 +1811,7 @@ namespace BMA.EHR.Placement.Service.Controllers
var report_data = (from p in _context.PlacementProfiles
.Include(x => x.Placement)
.Include(x => x.PlacementEducations)
.Include(x => x.PositionCandidate)
// .ThenInclude(x => x.PlacementType)
.Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString()))
// .Where(x => x.Placement!.PlacementType!.Name != "สอบแข่งขัน")
@ -1823,24 +1824,30 @@ namespace BMA.EHR.Placement.Service.Controllers
{
No = r.Sequence.ToString().ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" :
p.PlacementEducations.FirstOrDefault().Degree,
PositionName = p.positionName == null ? "" : p.positionName,
ExamNumber = p.ExamNumber == null ? "0" : p.ExamNumber.Value.ToString().ToThaiNumber(),
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" :
p.PlacementEducations.FirstOrDefault().Degree,
PositionName = p.positionName == null ? "-" : p.positionName,
ExamNumber = p.ExamNumber == null ? "-" : p.ExamNumber.Value.ToString().ToThaiNumber(),
PlacementName = $"{p.Placement.Name.ToThaiNumber()} ครั้งที่ {p.Placement.Round.ToThaiNumber()}/{p.Placement.Year.ToThaiYear().ToString().ToThaiNumber()}",
Oc = (p.positionName == null ? "" : p.positionName) + "/" + (p.root == null ? "" : p.root),
PositionType = p.posTypeName == null ? "" : p.posTypeName,
PositionLevel = p.posLevelName == null ? "" : p.posLevelName,
PositionNumber = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
Salary = r.Amount == null ? "0" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(),
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
Oc = p.root == null ? "" :
p.node == 4 ? $"{p.child4}/{p.child3}/{p.child2}/{p.child1}/{p.root}" :
p.node == 3 ? $"{p.child3}/{p.child2}/{p.child1}/{p.root}" :
p.node == 2 ? $"{p.child2}/{p.child1}/{p.root}" :
p.node == 1 ? $"{p.child1}/{p.root}" :
p.node == 0 ? $"{p.root}" : "",
PositionType = p.posTypeName == null ? "-" : p.posTypeName,
PositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
PositionNumber = p.posMasterNo == null ? "-" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
Salary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(),
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
RemarkHorizontal = r.RemarkHorizontal,
RemarkVertical = r.RemarkVertical,
PositionCandidate = p.PositionCandidate == null ? "-" : p.PositionCandidate.Name
}).ToList();
return Success(report_data);
}
@ -2084,29 +2091,41 @@ namespace BMA.EHR.Placement.Service.Controllers
{
No = r.Sequence.ToString().ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" :
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" :
p.PlacementEducations.FirstOrDefault().Degree,
OldOc = (p.positionNameOld == null ? "" : p.positionNameOld) + "/" + (p.rootOld == null ? "" : p.rootOld),
OldPositionType = p.posTypeNameOld == null ? "" : p.posTypeNameOld,
OldPositionLevel = p.posLevelNameOld == null ? "" : p.posLevelNameOld,
OldPositionNumber = p.posMasterNoOld == null ? "" :
OldOc = p.rootOld == null ? "" :
p.nodeOld == "4" ? $"{p.child4Old}/{p.child3Old}/{p.child2Old}/{p.child1Old}/{p.rootOld}" :
p.nodeOld == "3" ? $"{p.child3Old}/{p.child2Old}/{p.child1Old}/{p.rootOld}" :
p.nodeOld == "2" ? $"{p.child2Old}/{p.child1Old}/{p.rootOld}" :
p.nodeOld == "1" ? $"{p.child1Old}/{p.rootOld}" :
p.nodeOld == "0" ? $"{p.rootOld}" : "",
OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld,
OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld,
OldPositionNumber = p.posMasterNoOld == null ? "-" :
p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "",
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
NewOc = (p.positionName == null ? "" : p.positionName) + "/" + (p.root == null ? "" : p.root),
NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
NewPositionNumber = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
NewSalary = p.Amount == null ? "" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
OldPosition = p.positionNameOld == null ? "-" : p.positionNameOld,
NewOc = p.root == null ? "" :
p.node == 4 ? $"{p.child4}/{p.child3}/{p.child2}/{p.child1}/{p.root}" :
p.node == 3 ? $"{p.child3}/{p.child2}/{p.child1}/{p.root}" :
p.node == 2 ? $"{p.child2}/{p.child1}/{p.root}" :
p.node == 1 ? $"{p.child1}/{p.root}" :
p.node == 0 ? $"{p.root}" : "",
NewPosition = p.positionName == null ? "-" : p.positionName,
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
NewPositionNumber = p.posMasterNo == null ? "-" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
RemarkHorizontal = r.RemarkHorizontal,
RemarkVertical = r.RemarkVertical,
}).ToList();
@ -2256,29 +2275,41 @@ namespace BMA.EHR.Placement.Service.Controllers
{
No = r.Sequence.ToString().ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" :
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" :
p.PlacementEducations.FirstOrDefault().Degree,
OldOc = (p.positionNameOld == null ? "" : p.positionNameOld) + "/" + (p.rootOld == null ? "" : p.rootOld),
OldPositionType = p.posTypeNameOld == null ? "" : p.posTypeNameOld,
OldPositionLevel = p.posLevelNameOld == null ? "" : p.posLevelNameOld,
OldPositionNumber = p.posMasterNoOld == null ? "" :
p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "",
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
NewOc = (p.positionName == null ? "" : p.positionName) + "/" + (p.root == null ? "" : p.root),
NewPositionType = p.posTypeName == null ? "" : p.posTypeName,
NewPositionLevel = p.posLevelName == null ? "" : p.posLevelName,
NewPositionNumber = p.posMasterNo == null ? "" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
AppointDate = p.ReportingDate == null ? "" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
OldOc = p.rootOld == null ? "" :
p.nodeOld == "4" ? $"{p.child4Old}/{p.child3Old}/{p.child2Old}/{p.child1Old}/{p.rootOld}" :
p.nodeOld == "3" ? $"{p.child3Old}/{p.child2Old}/{p.child1Old}/{p.rootOld}" :
p.nodeOld == "2" ? $"{p.child2Old}/{p.child1Old}/{p.rootOld}" :
p.nodeOld == "1" ? $"{p.child1Old}/{p.rootOld}" :
p.nodeOld == "0" ? $"{p.rootOld}" : "",
OldPosition = p.positionNameOld == null ? "-" : p.positionNameOld,
OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld,
OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld,
OldPositionNumber = p.posMasterNoOld == null ? "-" :
p.nodeOld == "4" ? $"{p.child4ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "3" ? $"{p.child3ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "2" ? $"{p.child2ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "1" ? $"{p.child1ShortNameOld}{p.posMasterNoOld}".ToThaiNumber() :
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "",
OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
NewOc = p.root == null ? "" :
p.node == 4 ? $"{p.child4}/{p.child3}/{p.child2}/{p.child1}/{p.root}" :
p.node == 3 ? $"{p.child3}/{p.child2}/{p.child1}/{p.root}" :
p.node == 2 ? $"{p.child2}/{p.child1}/{p.root}" :
p.node == 1 ? $"{p.child1}/{p.root}" :
p.node == 0 ? $"{p.root}" : "",
NewPosition = p.positionName == null ? "-" : p.positionName,
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
NewPositionNumber = p.posMasterNo == null ? "-" :
p.node == 4 ? $"{p.child4ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 3 ? $"{p.child3ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 2 ? $"{p.child2ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 1 ? $"{p.child1ShortName}{p.posMasterNo}".ToThaiNumber() :
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "",
NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
RemarkHorizontal = r.RemarkHorizontal,
RemarkVertical = r.RemarkVertical,
}).ToList();