api เครื่องราช
This commit is contained in:
parent
6a572144ab
commit
cb33987976
11 changed files with 5290 additions and 5321 deletions
|
|
@ -116,9 +116,21 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
BmaOfficer = x.IsOfficer,
|
||||
StatusId = x.PlacementStatus,
|
||||
Draft = x.Draft,
|
||||
Number = x.Number,
|
||||
ExamNumber = x.ExamNumber,
|
||||
Deferment = x.IsRelief,
|
||||
}).ToListAsync();
|
||||
|
||||
ContainDate = x.RecruitDate,
|
||||
OrganizationPositionId = x.OrganizationPosition == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.OrganizationPosition.Id,
|
||||
PosNoId = x.PositionNumber == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionNumber.Id,
|
||||
PositionId = x.PositionPath == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionPath.Id,
|
||||
PositionLevelId = x.PositionLevel == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionLevel.Id,
|
||||
PositionLineId = x.PositionLine == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionLine.Id,
|
||||
PositionPathSideId = x.PositionPathSide == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionPathSide.Id,
|
||||
PositionTypeId = x.PositionType == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionType.Id,
|
||||
SalaryAmount = x.Amount,
|
||||
MouthSalaryAmount = x.MouthSalaryAmount,
|
||||
PositionSalaryAmount = x.PositionSalaryAmount,
|
||||
}).OrderBy(x => x.ExamNumber).ToListAsync();
|
||||
|
||||
var result = new List<dynamic>();
|
||||
foreach (var p in data)
|
||||
|
|
@ -139,8 +151,20 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
|
||||
p.StatusId,
|
||||
p.Draft,
|
||||
p.Number,
|
||||
p.ExamNumber,
|
||||
p.Deferment,
|
||||
|
||||
p.ContainDate,
|
||||
p.OrganizationPositionId,
|
||||
p.PosNoId,
|
||||
p.PositionId,
|
||||
p.PositionLevelId,
|
||||
p.PositionLineId,
|
||||
p.PositionPathSideId,
|
||||
p.PositionTypeId,
|
||||
p.SalaryAmount,
|
||||
p.MouthSalaryAmount,
|
||||
p.PositionSalaryAmount,
|
||||
};
|
||||
result.Add(_data);
|
||||
}
|
||||
|
|
@ -157,6 +181,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
.Where(x => x.Placement.Id == examId)
|
||||
.Where(x => x.OrganizationPosition != null)
|
||||
.Where(x => x.OrganizationPosition.Organization != null)
|
||||
.Where(x => x.Draft == true)
|
||||
.Where(x => ocIdList.Contains(x.OrganizationPosition.Organization.Id))
|
||||
.Select(x => new
|
||||
{
|
||||
|
|
@ -174,9 +199,21 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
BmaOfficer = x.IsOfficer,
|
||||
StatusId = x.PlacementStatus,
|
||||
Draft = x.Draft,
|
||||
Number = x.Number,
|
||||
ExamNumber = x.ExamNumber,
|
||||
Deferment = x.IsRelief,
|
||||
}).OrderBy(x => x.Number).ToListAsync();
|
||||
|
||||
ContainDate = x.RecruitDate,
|
||||
OrganizationPositionId = x.OrganizationPosition == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.OrganizationPosition.Id,
|
||||
PosNoId = x.PositionNumber == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionNumber.Id,
|
||||
PositionId = x.PositionPath == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionPath.Id,
|
||||
PositionLevelId = x.PositionLevel == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionLevel.Id,
|
||||
PositionLineId = x.PositionLine == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionLine.Id,
|
||||
PositionPathSideId = x.PositionPathSide == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionPathSide.Id,
|
||||
PositionTypeId = x.PositionType == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionType.Id,
|
||||
SalaryAmount = x.Amount,
|
||||
MouthSalaryAmount = x.MouthSalaryAmount,
|
||||
PositionSalaryAmount = x.PositionSalaryAmount,
|
||||
}).OrderBy(x => x.ExamNumber).ToListAsync();
|
||||
|
||||
var result = new List<dynamic>();
|
||||
foreach (var p in data)
|
||||
|
|
@ -197,8 +234,20 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
|
||||
p.StatusId,
|
||||
p.Draft,
|
||||
p.Number,
|
||||
p.ExamNumber,
|
||||
p.Deferment,
|
||||
|
||||
p.ContainDate,
|
||||
p.OrganizationPositionId,
|
||||
p.PosNoId,
|
||||
p.PositionId,
|
||||
p.PositionLevelId,
|
||||
p.PositionLineId,
|
||||
p.PositionPathSideId,
|
||||
p.PositionTypeId,
|
||||
p.SalaryAmount,
|
||||
p.MouthSalaryAmount,
|
||||
p.PositionSalaryAmount,
|
||||
};
|
||||
result.Add(_data);
|
||||
}
|
||||
|
|
@ -550,6 +599,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
var person = await _context.PlacementProfiles.FindAsync(req.PersonalId);
|
||||
if (person == null)
|
||||
return Error(GlobalMessages.DataNotFound, 404);
|
||||
if (person.Draft == true)
|
||||
return Error("ไม่สามารถแก้ไขข้อมูลนี้ได้เนื่องจากเผยแพร่ไปแล้ว");
|
||||
|
||||
if (req.PosNoId != null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue