Merge branch 'develop' into develop-tee
This commit is contained in:
commit
aaac593edb
96 changed files with 32606 additions and 1 deletions
|
|
@ -106,6 +106,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
FullName = x.Prefix == null ? null : x.Prefix.Name + $"{x.Firstname} {x.Lastname}",
|
||||
IdCard = x.CitizenId,
|
||||
ProfilePhoto = x.Id,
|
||||
PositionCandidate = x.PositionCandidate == null ? null : x.PositionCandidate.Name,
|
||||
PositionCandidateId = x.PositionCandidate == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionCandidate.Id,
|
||||
OrganizationName = x.OrganizationPosition == null ? null : (x.OrganizationPosition.Organization == null ? null : (x.OrganizationPosition.Organization.OrganizationOrganization == null ? null : x.OrganizationPosition.Organization.OrganizationOrganization.Name)),////
|
||||
OrganizationShortName = x.OrganizationPosition == null ? null : (x.OrganizationPosition.Organization == null ? null : (x.OrganizationPosition.Organization.OrganizationShortName == null ? null : x.OrganizationPosition.Organization.OrganizationShortName.Name)),////
|
||||
PositionNumber = x.PositionNumber == null ? null : x.PositionNumber.Name,
|
||||
|
|
@ -113,6 +115,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
ReportingDate = x.ReportingDate,
|
||||
BmaOfficer = x.IsOfficer,
|
||||
StatusId = x.PlacementStatus,
|
||||
Draft = x.Draft,
|
||||
Number = x.Number,
|
||||
Deferment = x.IsRelief,
|
||||
}).ToListAsync();
|
||||
|
|
@ -126,6 +129,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
p.FullName,
|
||||
p.IdCard,
|
||||
p.ProfilePhoto,
|
||||
p.PositionCandidate,
|
||||
p.PositionCandidateId,
|
||||
p.OrganizationName,
|
||||
p.OrganizationShortName,
|
||||
p.PositionNumber,
|
||||
|
|
@ -133,6 +138,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
p.ReportingDate,
|
||||
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
|
||||
p.StatusId,
|
||||
p.Draft,
|
||||
p.Number,
|
||||
p.Deferment,
|
||||
};
|
||||
|
|
@ -158,6 +164,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
FullName = x.Prefix == null ? null : x.Prefix.Name + $"{x.Firstname} {x.Lastname}",
|
||||
IdCard = x.CitizenId,
|
||||
ProfilePhoto = x.Id,
|
||||
PositionCandidate = x.PositionCandidate == null ? null : x.PositionCandidate.Name,
|
||||
PositionCandidateId = x.PositionCandidate == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionCandidate.Id,
|
||||
OrganizationName = x.OrganizationPosition == null ? null : (x.OrganizationPosition.Organization == null ? null : (x.OrganizationPosition.Organization.OrganizationOrganization == null ? null : x.OrganizationPosition.Organization.OrganizationOrganization.Name)),////
|
||||
OrganizationShortName = x.OrganizationPosition == null ? null : (x.OrganizationPosition.Organization == null ? null : (x.OrganizationPosition.Organization.OrganizationShortName == null ? null : x.OrganizationPosition.Organization.OrganizationShortName.Name)),////
|
||||
PositionNumber = x.PositionNumber == null ? null : x.PositionNumber.Name,
|
||||
|
|
@ -165,6 +173,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
ReportingDate = x.ReportingDate,
|
||||
BmaOfficer = x.IsOfficer,
|
||||
StatusId = x.PlacementStatus,
|
||||
Draft = x.Draft,
|
||||
Number = x.Number,
|
||||
Deferment = x.IsRelief,
|
||||
}).OrderBy(x => x.Number).ToListAsync();
|
||||
|
|
@ -178,6 +187,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
p.FullName,
|
||||
p.IdCard,
|
||||
p.ProfilePhoto,
|
||||
p.PositionCandidate,
|
||||
p.PositionCandidateId,
|
||||
p.OrganizationName,
|
||||
p.OrganizationShortName,
|
||||
p.PositionNumber,
|
||||
|
|
@ -185,6 +196,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
p.ReportingDate,
|
||||
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
|
||||
p.StatusId,
|
||||
p.Draft,
|
||||
p.Number,
|
||||
p.Deferment,
|
||||
};
|
||||
|
|
@ -225,10 +237,13 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
Firstname = x.Firstname,
|
||||
Lastname = x.Lastname,
|
||||
Nationality = x.Nationality,
|
||||
Draft = x.Draft,
|
||||
Race = x.Race,
|
||||
DateOfBirth = x.DateOfBirth,
|
||||
Age = x.DateOfBirth == null ? null : x.DateOfBirth.Value.CalculateAgeStrV2(0, 0),
|
||||
Telephone = x.Telephone,
|
||||
PositionCandidate = x.PositionCandidate == null ? null : x.PositionCandidate.Name,
|
||||
PositionCandidateId = x.PositionCandidate == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionCandidate.Id,
|
||||
Gender = x.Gender == null ? null : x.Gender.Name,
|
||||
GenderId = x.Gender == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.Gender.Id,
|
||||
Relationship = x.Relationship == null ? null : x.Relationship.Name,
|
||||
|
|
@ -246,6 +261,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
{
|
||||
Id = p.Id,
|
||||
EducationLevel = p.EducationLevel == null ? null : p.EducationLevel.Name,
|
||||
EducationLevelId = p.EducationLevel == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.EducationLevel.Id,
|
||||
Institute = p.Institute,
|
||||
Degree = p.Degree,
|
||||
Field = p.Field,
|
||||
|
|
@ -260,6 +276,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
StartDate = p.StartDate,
|
||||
EndDate = p.EndDate,
|
||||
PositionPath = p.PositionPath == null ? null : p.PositionPath.Name,
|
||||
PositionPathId = p.PositionPath == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.PositionPath.Id,
|
||||
IsEducation = p.IsEducation,
|
||||
}),
|
||||
RegistAddress = x.RegistAddress,
|
||||
|
|
@ -328,11 +345,14 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
data.FullName,
|
||||
data.Firstname,
|
||||
data.Lastname,
|
||||
data.Draft,
|
||||
data.Nationality,
|
||||
data.Race,
|
||||
data.DateOfBirth,
|
||||
data.Age,
|
||||
data.Telephone,
|
||||
data.PositionCandidate,
|
||||
data.PositionCandidateId,
|
||||
data.Gender,
|
||||
data.GenderId,
|
||||
data.Relationship,
|
||||
|
|
@ -583,6 +603,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
return Error(GlobalMessages.PositionTypeNotFound, 404);
|
||||
person.PositionType = save;
|
||||
}
|
||||
person.Draft = false;
|
||||
person.Amount = req.SalaryAmount;
|
||||
person.MouthSalaryAmount = req.MouthSalaryAmount;
|
||||
person.PositionSalaryAmount = req.PositionSalaryAmount;
|
||||
|
|
@ -894,6 +915,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
DurationYear = req.DurationYear,
|
||||
Other = req.Other,
|
||||
FundName = req.FundName,
|
||||
IsDate = req.IsDate,
|
||||
FinishDate = req.FinishDate,
|
||||
StartDate = req.StartDate,
|
||||
EndDate = req.EndDate,
|
||||
|
|
@ -939,6 +961,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
education.DurationYear = req.DurationYear;
|
||||
education.Other = req.Other;
|
||||
education.FundName = req.FundName;
|
||||
education.IsDate = req.IsDate;
|
||||
education.FinishDate = req.FinishDate;
|
||||
education.StartDate = req.StartDate;
|
||||
education.EndDate = req.EndDate;
|
||||
|
|
@ -972,5 +995,25 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
return Success(position);
|
||||
}
|
||||
|
||||
[HttpPut("position/{placementId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> UpdatePositionDraft([FromBody] List<Guid> items, Guid placementId)
|
||||
{
|
||||
var placement = await _context.Placements
|
||||
.FirstOrDefaultAsync(x => x.Id == placementId);
|
||||
if (placement == null)
|
||||
return Error(GlobalMessages.DataNotFound, 404);
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
var profile = await _context.PlacementProfiles
|
||||
.FirstOrDefaultAsync(x => x.Id == item);
|
||||
if (profile != null)
|
||||
profile.Draft = true;
|
||||
}
|
||||
_context.SaveChanges();
|
||||
|
||||
return Success();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ namespace BMA.EHR.Placement.Service.Requests
|
|||
public int DurationYear { get; set; }
|
||||
public string? Other { get; set; }
|
||||
public string? FundName { get; set; }
|
||||
public bool? IsDate { get; set; }
|
||||
public DateTime? FinishDate { get; set; }
|
||||
public DateTime? StartDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue