noti วินัย
This commit is contained in:
parent
9e513d3f1a
commit
ae990c0c5f
21 changed files with 244 additions and 1508 deletions
|
|
@ -235,66 +235,12 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
p.PositionOld,
|
||||
p.OrganizationOld,
|
||||
p.PositionDate,
|
||||
// Avatar = p.Profile.Avatar == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Profile.Avatar.Id,
|
||||
// RetirementOtherDocs = p.RetirementOtherDocs.Where(d => d.Document != null).Select(d => new { d.Document.Id, d.Document.FileName }),
|
||||
CommandType = p.CommandType == null ? null : p.CommandType.Name,
|
||||
})
|
||||
.FirstOrDefaultAsync();
|
||||
if (data == null)
|
||||
return Error(GlobalMessages.DataNotFound, 404);
|
||||
|
||||
// var retirementOtherDocs = new List<dynamic>();
|
||||
// foreach (var doc in data.RetirementOtherDocs)
|
||||
// {
|
||||
// var _doc = new
|
||||
// {
|
||||
// doc.FileName,
|
||||
// PathName = await _documentService.ImagesPath(doc.Id)
|
||||
// };
|
||||
// retirementOtherDocs.Add(_doc);
|
||||
// }
|
||||
// var _data = new
|
||||
// {
|
||||
// data.Id,
|
||||
// data.ProfileId,
|
||||
// data.CitizenId,
|
||||
// data.Prefix,
|
||||
// data.PrefixId,
|
||||
// data.Firstname,
|
||||
// data.Lastname,
|
||||
// data.DateOfBirth,
|
||||
// data.Gender,
|
||||
// data.Nationality,
|
||||
// data.Race,
|
||||
// data.Religion,
|
||||
// data.BloodGroup,
|
||||
// data.Relationship,
|
||||
// data.TelephoneNumber,
|
||||
// data.Status,
|
||||
// data.Amount,
|
||||
// data.RecruitDate,
|
||||
// data.PosNo,
|
||||
// data.Position,
|
||||
// data.PositionPathSide,
|
||||
// data.PositionType,
|
||||
// data.PositionLine,
|
||||
// data.PositionLevel,
|
||||
// data.OrganizationPositionId,
|
||||
// data.CreatedAt,
|
||||
// data.Reason,
|
||||
// data.MilitaryDate,
|
||||
// data.EducationOld,
|
||||
// data.AmountOld,
|
||||
// data.PositionTypeOld,
|
||||
// data.PositionLevelOld,
|
||||
// data.PositionNumberOld,
|
||||
// data.OrganizationPositionOld,
|
||||
// data.PositionDate,
|
||||
// // Avatar = data.Avatar == Guid.Parse("00000000-0000-0000-0000-000000000000") ? null : await _documentService.ImagesPath(data.Avatar),
|
||||
// // Docs = retirementOtherDocs,
|
||||
// data.CommandType,
|
||||
// };
|
||||
|
||||
return Success(data);
|
||||
}
|
||||
|
||||
|
|
@ -317,32 +263,6 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
}
|
||||
var retirementOther = new RetirementOther
|
||||
{
|
||||
// Profile = profile,
|
||||
// CitizenId = profile.CitizenId,
|
||||
// Prefix = profile.Prefix,
|
||||
// Firstname = profile.FirstName,
|
||||
// Lastname = profile.LastName,
|
||||
// DateOfBirth = profile.BirthDate,
|
||||
// Gender = profile.Gender,
|
||||
// Nationality = profile.Nationality,
|
||||
// Race = profile.Race,
|
||||
// Religion = await _context.Religions.FindAsync(profile.ReligionId),
|
||||
// BloodGroup = await _context.BloodGroups.FindAsync(profile.BloodGroupId),
|
||||
// Relationship = await _context.Relationships.FindAsync(profile.RelationshipId),
|
||||
// TelephoneNumber = profile.TelephoneNumber,
|
||||
// EducationOld = profile.Educations.Count() == 0 ? null : $"{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Degree}-{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Field}",
|
||||
// AmountOld = profile.Salaries.Count() == 0 ? null : profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount,
|
||||
// PositionLevelOld = profile.PositionLevel == null ? null : profile.PositionLevel.Name,
|
||||
// PositionTypeOld = profile.PositionType == null ? null : profile.PositionType.Name,
|
||||
// PositionNumberOld = profile.PosNo == null ? null : profile.PosNo.Name,
|
||||
// OrganizationPositionOld = profile.Position == null ? profile.Oc : $"{profile.Position.Name}-{profile.Oc}",
|
||||
// PositionNumber = profile.PosNo,
|
||||
// PositionPath = profile.Position,
|
||||
// PositionPathSide = await _context.PositionPathSides.FindAsync(profile.PositionPathSideId),
|
||||
// PositionType = profile.PositionType,
|
||||
// PositionLine = await _context.PositionLines.FindAsync(profile.PositionLineId),
|
||||
// PositionLevel = profile.PositionLevel,
|
||||
// OrganizationPositionId = p.OrganizationPosition == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.OrganizationPosition.Id,
|
||||
Status = "WAITTING",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue