#1271 (1) placement and retirement

This commit is contained in:
AdisakKanthawilang 2025-03-24 15:36:28 +07:00
parent c1a20aca35
commit 6cb0ddff6b
11 changed files with 203 additions and 339 deletions

View file

@ -1628,17 +1628,12 @@ namespace BMA.EHR.Placement.Service.Controllers
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.positionName == null ? "-" : $"{p.positionName}/-" :
p.node == 4
? p.positionName == null ? $"{p.child4} {p.child3} {p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child4} {p.child3} {p.child2} {p.child1} {p.root}" :
p.node == 3
? p.positionName == null ? $"{p.child3} {p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child3} {p.child2} {p.child1} {p.root}" :
p.node == 2
? p.positionName == null ? $"{p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child2} {p.child1} {p.root}" :
p.node == 1
? p.positionName == null ? $"{p.child1} {p.root}" : $"{p.positionName} {p.child1} {p.root}" :
p.node == 0
? p.positionName == null ? $"{p.root}" : $"{p.positionName} {p.root}" : "-",
Oc = (p.positionName == null ? "" : $"{p.positionName}\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}"),
PositionType = p.posTypeName == null ? "-" : p.posTypeName,
PositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
PositionNumber = p.posMasterNo == null ? "-" :
@ -1652,17 +1647,12 @@ namespace BMA.EHR.Placement.Service.Controllers
CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(),
OccupationPosition = p.OccupationPosition == null ? "-" : p.OccupationPosition, //ตำแหน่งเก่าก่อนสอบ
PositionCandidate = p.PositionCandidate, //ตำแหน่งที่สอบแข่งขัน
OcCandidate = p.root == null ? p.positionName == null ? "-" : $"{p.positionName}/-" :
p.node == 4
? p.positionName == null ? $"{p.child4} {p.child3} {p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child4} {p.child3} {p.child2} {p.child1} {p.root}" :
p.node == 3
? p.positionName == null ? $"{p.child3} {p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child3} {p.child2} {p.child1} {p.root}" :
p.node == 2
? p.positionName == null ? $"{p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child2} {p.child1} {p.root}" :
p.node == 1
? p.positionName == null ? $"{p.child1} {p.root}" : $"{p.positionName} {p.child1} {p.root}" :
p.node == 0
? p.positionName == null ? $"{p.root}" : $"{p.positionName} {p.root}" : "-",
OcCandidate = (p.positionName == null ? "" : $"{p.positionName}\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}"),
RemarkHorizontal = r.RemarkHorizontal,
RemarkVertical = r.RemarkVertical,
}).ToList();
@ -1968,17 +1958,12 @@ namespace BMA.EHR.Placement.Service.Controllers
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.positionName == null ? "-" : $"{p.positionName}/-" :
p.node == 4
? p.positionName == null ? $"{p.child4} {p.child3} {p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child4} {p.child3} {p.child2} {p.child1} {p.root}" :
p.node == 3
? p.positionName == null ? $"{p.child3} {p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child3} {p.child2} {p.child1} {p.root}" :
p.node == 2
? p.positionName == null ? $"{p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child2} {p.child1} {p.root}" :
p.node == 1
? p.positionName == null ? $"{p.child1} {p.root}" : $"{p.positionName} {p.child1} {p.root}" :
p.node == 0
? p.positionName == null ? $"{p.root}" : $"{p.positionName} {p.root}" : "-",
Oc = (p.positionName == null ? "" : $"{p.positionName}\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}"),
PositionType = p.posTypeName == null ? "-" : p.posTypeName,
PositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
PositionNumber = p.posMasterNo == null ? "-" :
@ -2296,17 +2281,12 @@ namespace BMA.EHR.Placement.Service.Controllers
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" :
p.PlacementEducations.FirstOrDefault().Degree,
OldOc = p.rootOld == null ? p.positionNameOld == null ? "-" : $"{p.positionNameOld}/-" :
p.nodeOld == "4"
? p.positionNameOld == null ? $"{p.child4Old} {p.child3Old} {p.child2Old} {p.child1Old} {p.rootOld}" : $"{p.positionNameOld} {p.child4Old} {p.child3Old} {p.child2Old} {p.child1Old} {p.rootOld}" :
p.nodeOld == "3"
? p.positionNameOld == null ? $"{p.child3Old} {p.child2Old} {p.child1Old} {p.rootOld}" : $"{p.positionNameOld} {p.child3Old} {p.child2Old} {p.child1Old} {p.rootOld}" :
p.nodeOld == "2"
? p.positionNameOld == null ? $"{p.child2Old} {p.child1Old} {p.rootOld}" : $"{p.positionNameOld} {p.child2Old} {p.child1Old} {p.rootOld}" :
p.nodeOld == "1"
? p.positionNameOld == null ? $"{p.child1Old} {p.rootOld}" : $"{p.positionNameOld} {p.child1Old} {p.rootOld}" :
p.nodeOld == "0"
? p.positionNameOld == null ? $"{p.rootOld}" : $"{p.positionNameOld} {p.rootOld}" : "-",
OldOc = (p.positionNameOld == null ? "" : $"{p.positionNameOld}\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}"),
OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld,
OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld,
OldPositionNumber = p.posMasterNoOld == null ? "-" :
@ -2317,17 +2297,12 @@ namespace BMA.EHR.Placement.Service.Controllers
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "-",
OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
OldPosition = p.positionNameOld == null ? "-" : p.positionNameOld,
NewOc = p.root == null ? p.positionName == null ? "-" : $"{p.positionName}/-" :
p.node == 4
? p.positionName == null ? $"{p.child4} {p.child3} {p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child4} {p.child3} {p.child2} {p.child1} {p.root}" :
p.node == 3
? p.positionName == null ? $"{p.child3} {p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child3} {p.child2} {p.child1} {p.root}" :
p.node == 2
? p.positionName == null ? $"{p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child2} {p.child1} {p.root}" :
p.node == 1
? p.positionName == null ? $"{p.child1} {p.root}" : $"{p.positionName} {p.child1} {p.root}" :
p.node == 0
? p.positionName == null ? $"{p.root}" : $"{p.positionName} {p.root}" : "-",
NewOc = (p.positionName == null ? "" : $"{p.positionName}\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}"),
NewPosition = p.positionName == null ? "-" : p.positionName,
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
@ -2536,17 +2511,12 @@ namespace BMA.EHR.Placement.Service.Controllers
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" :
p.PlacementEducations.FirstOrDefault().Degree,
OldOc = p.rootOld == null ? p.positionNameOld == null ? "-" : $"{p.positionNameOld}/-" :
p.nodeOld == "4"
? p.positionNameOld == null ? $"{p.child4Old} {p.child3Old} {p.child2Old} {p.child1Old} {p.rootOld}" : $"{p.positionNameOld} {p.child4Old} {p.child3Old} {p.child2Old} {p.child1Old} {p.rootOld}" :
p.nodeOld == "3"
? p.positionNameOld == null ? $"{p.child3Old} {p.child2Old} {p.child1Old} {p.rootOld}" : $"{p.positionNameOld} {p.child3Old} {p.child2Old} {p.child1Old} {p.rootOld}" :
p.nodeOld == "2"
? p.positionNameOld == null ? $"{p.child2Old} {p.child1Old} {p.rootOld}" : $"{p.positionNameOld} {p.child2Old} {p.child1Old} {p.rootOld}" :
p.nodeOld == "1"
? p.positionNameOld == null ? $"{p.child1Old} {p.rootOld}" : $"{p.positionNameOld} {p.child1Old} {p.rootOld}" :
p.nodeOld == "0"
? p.positionNameOld == null ? $"{p.rootOld}" : $"{p.positionNameOld} {p.rootOld}" : "-",
OldOc = (p.positionNameOld == null ? "" : $"{p.positionNameOld}\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}"),
OldPosition = p.positionNameOld == null ? "-" : p.positionNameOld,
OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld,
OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld,
@ -2557,17 +2527,12 @@ namespace BMA.EHR.Placement.Service.Controllers
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.positionName == null ? "-" : $"{p.positionName}/-" :
p.node == 4
? p.positionName == null ? $"{p.child4} {p.child3} {p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child4} {p.child3} {p.child2} {p.child1} {p.root}" :
p.node == 3
? p.positionName == null ? $"{p.child3} {p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child3} {p.child2} {p.child1} {p.root}" :
p.node == 2
? p.positionName == null ? $"{p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child2} {p.child1} {p.root}" :
p.node == 1
? p.positionName == null ? $"{p.child1} {p.root}" : $"{p.positionName} {p.child1} {p.root}" :
p.node == 0
? p.positionName == null ? $"{p.root}" : $"{p.positionName} {p.root}" : "-",
NewOc = (p.positionName == null ? "" : $"{p.positionName}\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}"),
NewPosition = p.positionName == null ? "-" : p.positionName,
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
@ -2765,17 +2730,12 @@ namespace BMA.EHR.Placement.Service.Controllers
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "-" :
p.PlacementEducations.FirstOrDefault().Degree,
OldOc = p.rootOld == null ? p.positionNameOld == null ? "-" : $"{p.positionNameOld}/-" :
p.nodeOld == "4"
? p.positionNameOld == null ? $"{p.child4Old} {p.child3Old} {p.child2Old} {p.child1Old} {p.rootOld}" : $"{p.positionNameOld} {p.child4Old} {p.child3Old} {p.child2Old} {p.child1Old} {p.rootOld}" :
p.nodeOld == "3"
? p.positionNameOld == null ? $"{p.child3Old} {p.child2Old} {p.child1Old} {p.rootOld}" : $"{p.positionNameOld} {p.child3Old} {p.child2Old} {p.child1Old} {p.rootOld}" :
p.nodeOld == "2"
? p.positionNameOld == null ? $"{p.child2Old} {p.child1Old} {p.rootOld}" : $"{p.positionNameOld} {p.child2Old} {p.child1Old} {p.rootOld}" :
p.nodeOld == "1"
? p.positionNameOld == null ? $"{p.child1Old} {p.rootOld}" : $"{p.positionNameOld} {p.child1Old} {p.rootOld}" :
p.nodeOld == "0"
? p.positionNameOld == null ? $"{p.rootOld}" : $"{p.positionNameOld} {p.rootOld}" : "-",
OldOc = (p.positionNameOld == null ? "" : $"{p.positionNameOld}\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}"),
OldPositionType = p.posTypeNameOld == null ? "-" : p.posTypeNameOld,
OldPositionLevel = p.posLevelNameOld == null ? "-" : p.posLevelNameOld,
OldPositionNumber = p.posMasterNoOld == null ? "-" :
@ -2786,17 +2746,12 @@ namespace BMA.EHR.Placement.Service.Controllers
p.nodeOld == "0" ? $"{p.rootShortNameOld}{p.posMasterNoOld}".ToThaiNumber() : "-",
OldSalary = p.Amount == null ? "-" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
LeaveDate = "-",
NewOc = p.root == null ? p.positionName == null ? "-" : $"{p.positionName}/-" :
p.node == 4
? p.positionName == null ? $"{p.child4} {p.child3} {p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child4} {p.child3} {p.child2} {p.child1} {p.root}" :
p.node == 3
? p.positionName == null ? $"{p.child3} {p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child3} {p.child2} {p.child1} {p.root}" :
p.node == 2
? p.positionName == null ? $"{p.child2} {p.child1} {p.root}" : $"{p.positionName} {p.child2} {p.child1} {p.root}" :
p.node == 1
? p.positionName == null ? $"{p.child1} {p.root}" : $"{p.positionName} {p.child1} {p.root}" :
p.node == 0
? p.positionName == null ? $"{p.root}" : $"{p.positionName} {p.root}" : "-",
NewOc = (p.positionName == null ? "" : $"{p.positionName}\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}"),
NewPositionType = p.posTypeName == null ? "-" : p.posTypeName,
NewPositionLevel = p.posLevelName == null ? "-" : p.posLevelName,
NewPositionNumber = p.posMasterNo == null ? "-" :