fix amountOld
This commit is contained in:
parent
d08b4ca723
commit
9e99e985cd
7 changed files with 16 additions and 13 deletions
|
|
@ -810,7 +810,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
OldPositionType = p.PositionTypeOld == null ? "-" : p.PositionTypeOld,
|
||||
OldPositionLevel = p.PositionLevelOld == null ? "-" : p.PositionLevelOld,
|
||||
OldPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(),
|
||||
OldSalary = p.Amount == null ? "-" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
LeaveDate = "-",
|
||||
NewOc = p.root == null ? p.position == null ? "-" : $"{p.position}/-" :
|
||||
p.node == 4
|
||||
|
|
|
|||
|
|
@ -2435,7 +2435,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
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.Amount == null ? "-" : p.Amount.Value.ToNumericNoDecimalText().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}" :
|
||||
|
|
|
|||
|
|
@ -941,7 +941,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
? p.PositionOld == null ? $"{p.rootOld}" : $"{p.PositionOld}/{p.rootOld}" : "-",
|
||||
OldPositionType = p.PositionTypeOld ?? "-",
|
||||
OldPositionLevel = p.PositionLevelOld ?? "-",
|
||||
OldSalary = p.Amount == null ? "-" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = p.root == null ? p.position == null ? "-" : $"{p.position}/-" :
|
||||
p.node == 4
|
||||
? p.position == null ? $"{p.child4}/{p.child3}/{p.child2}/{p.child1}/{p.root}" : $"{p.position}/{p.child4}/{p.child3}/{p.child2}/{p.child1}/{p.root}" :
|
||||
|
|
|
|||
|
|
@ -403,6 +403,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
(org.result.root == null ? "" : org.result.root);
|
||||
retirementOther.OrganizationPositionOld = org.result.position + "/" + retirementOther.OrganizationOld;
|
||||
retirementOther.EducationOld = org.result.education;
|
||||
retirementOther.AmountOld = org.result.salary;
|
||||
}
|
||||
await _context.RetirementOthers.AddAsync(retirementOther);
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
@ -701,7 +702,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
OldPositionType = p.PositionTypeOld == null ? "-" : p.PositionTypeOld,
|
||||
OldPositionLevel = p.PositionLevelOld == null ? "-" : p.PositionLevelOld,
|
||||
OldPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(),
|
||||
OldSalary = p.Amount == null ? "-" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
OldSalary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
LeaveDate = p.LeaveDate == null ? "-" : p.LeaveDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
NewOc = (p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld) + "/" + (p.rootOld == null ? "" : p.rootOld),
|
||||
NewPositionType = p.PositionTypeOld == null ? "-" : p.PositionTypeOld,
|
||||
|
|
@ -893,7 +894,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
OldPositionType = p.PositionTypeOld == null ? "-" : p.PositionTypeOld,
|
||||
OldPositionLevel = p.PositionLevelOld == null ? "-" : p.PositionLevelOld,
|
||||
OldPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(),
|
||||
OldSalary = p.Amount == null ? "-" : p.Amount.Value.ToNumericNoDecimalText().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.rootOld == null ? p.PositionOld == null ? "-" : $"{p.PositionOld}/-" :
|
||||
|
|
|
|||
|
|
@ -337,6 +337,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
(org.result.child1 == null ? "" : org.result.child1 + "/") +
|
||||
(org.result.root == null ? "" : org.result.root);
|
||||
retirementOut.OrganizationPositionOld = org.result.position + "/" + retirementOut.OrganizationOld;
|
||||
retirementOut.AmountOld = org.result.salary;
|
||||
}
|
||||
await _context.RetirementOuts.AddAsync(retirementOut);
|
||||
await _context.SaveChangesAsync();
|
||||
|
|
|
|||
|
|
@ -2362,14 +2362,14 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
No = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
PositionName = p.PositionOld ?? "",
|
||||
Organization = p.OrganizationPositionOld ?? "",
|
||||
PositionLevel = p.PositionLevelOld ?? "",
|
||||
PositionType = p.PositionTypeOld ?? "",
|
||||
PositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
|
||||
ActiveDate = p.ActiveDate == null ? "" : p.ActiveDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Salary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
Remark = p.Reason ?? "",
|
||||
PositionName = p.PositionOld ?? "-",
|
||||
Organization = p.OrganizationPositionOld ?? "-",
|
||||
PositionLevel = p.PositionLevelOld ?? "-",
|
||||
PositionType = p.PositionTypeOld ?? "-",
|
||||
PositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(),
|
||||
ActiveDate = p.ActiveDate == null ? "-" : p.ActiveDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Salary = p.AmountOld == null ? "-" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
Remark = p.Reason ?? "-",
|
||||
RemarkHorizontal = r.RemarkHorizontal,
|
||||
RemarkVertical = r.RemarkVertical,
|
||||
}).ToList();
|
||||
|
|
|
|||
|
|
@ -45,5 +45,6 @@ namespace BMA.EHR.Retirement.Service.Requests
|
|||
public string? posNo { get; set; }
|
||||
public DateTime? leaveDate { get; set; }
|
||||
public string? education { get; set; }
|
||||
public double? salary { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue