แก้โครงสร้างพ้นราชการ

This commit is contained in:
Kittapath 2024-05-03 17:39:10 +07:00
parent 18d75f4b04
commit db712d586a
41 changed files with 125142 additions and 411 deletions

View file

@ -177,6 +177,8 @@ namespace BMA.EHR.Retirement.Service.Controllers
p.PositionLevelOld,
p.PositionNumberOld,
p.OrganizationPositionOld,
p.PositionOld,
p.OrganizationOld,
// Avatar = p.Profile.Avatar == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Profile.Avatar.Id,
})
.FirstOrDefaultAsync();
@ -289,6 +291,17 @@ namespace BMA.EHR.Retirement.Service.Controllers
retirementOut.posTypeName = org.result.posTypeName;
retirementOut.posLevelId = org.result.posLevelId;
retirementOut.posLevelName = org.result.posLevelName;
retirementOut.PositionOld = org.result.position;
retirementOut.PositionLevelOld = org.result.posLevelName;
retirementOut.PositionTypeOld = org.result.posTypeName;
retirementOut.PositionNumberOld = org.result.nodeShortName + org.result.posMasterNo;
retirementOut.OrganizationOld = (org.result.child4 == null ? "" : org.result.child4 + "/") +
(org.result.child3 == null ? "" : org.result.child3 + "/") +
(org.result.child2 == null ? "" : org.result.child2 + "/") +
(org.result.child1 == null ? "" : org.result.child1 + "/") +
(org.result.root == null ? "" : org.result.root + "/");
retirementOut.OrganizationPositionOld = org.result.position + "-" + retirementOut.OrganizationOld;
}
await _context.RetirementOuts.AddAsync(retirementOut);
await _context.SaveChangesAsync();