แก้api เกษียญอื่นๆให้เหมือนรับโอน

This commit is contained in:
Kittapath 2023-08-16 02:35:43 +07:00
parent 243700bd53
commit 1b70ad6816
22 changed files with 15373 additions and 389 deletions

View file

@ -70,6 +70,7 @@ namespace BMA.EHR.Placement.Service.Controllers
p.DateOfBirth,
Gender = p.Gender == null ? null : p.Gender.Name,
p.Status,
p.Amount,
p.RecruitDate,
PositionNumber = p.PositionNumber == null ? null : p.PositionNumber.Name,
PositionPath = p.PositionPath == null ? null : p.PositionPath.Name,
@ -121,7 +122,8 @@ namespace BMA.EHR.Placement.Service.Controllers
{
p.Id,
p.CitizenId,
Prefix = p.Prefix == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Prefix.Id,
Prefix = p.Prefix == null ? null : p.Prefix.Name,
PrefixId = p.Prefix == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Prefix.Id,
p.Firstname,
p.Lastname,
p.DateOfBirth,
@ -133,6 +135,7 @@ namespace BMA.EHR.Placement.Service.Controllers
Relationship = p.Relationship == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Relationship.Id,
p.TelephoneNumber,
p.Status,
p.Amount,
p.RecruitDate,
PosNoId = p.PositionNumber == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PositionNumber.Id,
PositionId = p.PositionPath == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PositionPath.Id,
@ -170,6 +173,7 @@ namespace BMA.EHR.Placement.Service.Controllers
data.Id,
data.CitizenId,
data.Prefix,
data.PrefixId,
data.Firstname,
data.Lastname,
data.DateOfBirth,
@ -181,6 +185,7 @@ namespace BMA.EHR.Placement.Service.Controllers
data.Relationship,
data.TelephoneNumber,
data.Status,
data.Amount,
data.RecruitDate,
data.PosNoId,
data.PositionId,
@ -358,6 +363,7 @@ namespace BMA.EHR.Placement.Service.Controllers
uppdated.PositionType = save;
}
uppdated.Amount = req.Amount;
uppdated.RecruitDate = req.RecruitDate;
uppdated.Status = "PENDING";
uppdated.LastUpdateFullName = FullName ?? "System Administrator";
@ -382,7 +388,7 @@ namespace BMA.EHR.Placement.Service.Controllers
var uppdated = await _context.PlacementRelocations
.FirstOrDefaultAsync(x => x.Id == id);
if (uppdated == null)
return Error(GlobalMessages.PlacementTransferNotFound, 404);
return Error(GlobalMessages.PlacementRelocationNotFound, 404);
if (req.PrefixId != null)