แก้ กก

This commit is contained in:
kittapath 2024-10-31 12:54:13 +07:00
parent c724246081
commit a31447c278
5 changed files with 18536 additions and 53 deletions

View file

@ -211,16 +211,15 @@ namespace BMA.EHR.Placement.Service.Controllers
posTypeName = x.posTypeName,
posLevelId = x.posLevelId,
posLevelName = x.posLevelName,
PositionCandidate = x.PositionCandidate == null ? null : x.PositionCandidate.Name,
PositionCandidateId = x.PositionCandidate == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionCandidate.Id,
ReportingDate = x.ReportingDate,
StatusId = x.PlacementStatus,
Draft = x.Draft,
typeCommand = x.typeCommand,
IsOfficer = x.IsOfficer,
IsRelief = x.IsRelief,
posLevelCandidateId = x.PositionLevel == null ? (Guid?)null : x.PositionLevel.Id,
posTypeCandidateId = x.PositionType == null ? (Guid?)null : x.PositionType.Id,
posLevelCandidate = x.PositionLevel,
posTypeCandidate = x.PositionType,
positionCandidate = x.positionName,
}).OrderBy(x => x.ExamNumber).ToListAsync();
var result1 = new List<dynamic>();
@ -269,16 +268,15 @@ namespace BMA.EHR.Placement.Service.Controllers
p.posTypeName,
p.posLevelId,
p.posLevelName,
p.PositionCandidate,
p.PositionCandidateId,
p.ReportingDate,
BmaOfficer = p.IsOfficer == true ? "OFFICER" : null,
p.StatusId,
p.Draft,
p.typeCommand,
p.IsRelief,
p.posLevelCandidateId,
p.posTypeCandidateId,
p.posLevelCandidate,
p.posTypeCandidate,
p.positionCandidate,
};
result1.Add(_data1);
}
@ -325,16 +323,15 @@ namespace BMA.EHR.Placement.Service.Controllers
posTypeName = x.posTypeName,
posLevelId = x.posLevelId,
posLevelName = x.posLevelName,
PositionCandidate = x.PositionCandidate == null ? null : x.PositionCandidate.Name,
PositionCandidateId = x.PositionCandidate == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : x.PositionCandidate.Id,
ReportingDate = x.ReportingDate,
StatusId = x.PlacementStatus,
Draft = x.Draft,
typeCommand = x.typeCommand,
IsOfficer = x.IsOfficer,
IsRelief = x.IsRelief,
posLevelCandidateId = x.posLevelIdOld != null ? Guid.Parse(x.posLevelIdOld) : (x.PositionLevel == null ? (Guid?)null : x.PositionLevel.Id),
posTypeCandidateId = x.posTypeIdOld != null ? Guid.Parse(x.posTypeIdOld) : (x.PositionType == null ? (Guid?)null : x.PositionType.Id),
posLevelCandidate = x.PositionLevel,
posTypeCandidate = x.PositionType,
positionCandidate = x.positionName,
}).OrderBy(x => x.ExamNumber).ToListAsync();
var result = new List<dynamic>();
@ -383,16 +380,15 @@ namespace BMA.EHR.Placement.Service.Controllers
p.posTypeName,
p.posLevelId,
p.posLevelName,
p.PositionCandidate,
p.PositionCandidateId,
p.ReportingDate,
BmaOfficer = p.IsOfficer == true ? "OFFICER" : null,
p.StatusId,
p.Draft,
p.typeCommand,
p.IsRelief,
p.posLevelCandidateId,
p.posTypeCandidateId,
p.posLevelCandidate,
p.posTypeCandidate,
p.positionCandidate,
};
result.Add(_data);
}
@ -438,8 +434,7 @@ namespace BMA.EHR.Placement.Service.Controllers
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,
positionCandidate = x.positionName,
Gender = x.Gender,
Relationship = x.Relationship,
BloodGroup = x.BloodGroup,
@ -550,7 +545,6 @@ namespace BMA.EHR.Placement.Service.Controllers
data.Age,
data.Telephone,
data.PositionCandidate,
data.PositionCandidateId,
data.Gender,
data.Relationship,
data.BloodGroup,
@ -1547,7 +1541,6 @@ namespace BMA.EHR.Placement.Service.Controllers
var report_data = (from p in _context.PlacementProfiles
.Include(x => x.Placement)
.Include(x => x.PlacementEducations)
.Include(x => x.PositionCandidate)
// .ThenInclude(x => x.PlacementType)
.Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString()))
// .Where(x => x.Placement!.PlacementType!.Name != "สอบแข่งขัน")
@ -1587,18 +1580,18 @@ namespace BMA.EHR.Placement.Service.Controllers
Salary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(),
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
OccupationPosition = p.OccupationPosition == null ? "-" : p.OccupationPosition, //ตำแหน่งเก่าก่อนสอบ
PositionCandidate = p.PositionCandidate == null ? "-" : p.PositionCandidate.Name, //ตำแหน่งที่สอบแข่งขัน
PositionCandidate = p.positionName, //ตำแหน่งที่สอบแข่งขัน
OcCandidate = p.root == null ? p.PositionCandidate == null ? "-" : $"{p.PositionCandidate}/-" :
p.node == 4
? p.PositionCandidate.Name == null ? $"{p.child4}/{p.child3}/{p.child2}/{p.child1}/{p.root}" : $"{p.PositionCandidate.Name}/{p.child4}/{p.child3}/{p.child2}/{p.child1}/{p.root}" :
? p.positionName == null ? $"{p.child4}/{p.child3}/{p.child2}/{p.child1}/{p.root}" : $"{p.positionName}/{p.child4}/{p.child3}/{p.child2}/{p.child1}/{p.root}" :
p.node == 3
? p.PositionCandidate.Name == null ? $"{p.child3}/{p.child2}/{p.child1}/{p.root}" : $"{p.PositionCandidate.Name}/{p.child3}/{p.child2}/{p.child1}/{p.root}" :
? p.positionName == null ? $"{p.child3}/{p.child2}/{p.child1}/{p.root}" : $"{p.positionName}/{p.child3}/{p.child2}/{p.child1}/{p.root}" :
p.node == 2
? p.PositionCandidate.Name == null ? $"{p.child2}/{p.child1}/{p.root}" : $"{p.PositionCandidate.Name}/{p.child2}/{p.child1}/{p.root}" :
? p.positionName == null ? $"{p.child2}/{p.child1}/{p.root}" : $"{p.positionName}/{p.child2}/{p.child1}/{p.root}" :
p.node == 1
? p.PositionCandidate.Name == null ? $"{p.child1}/{p.root}" : $"{p.PositionCandidate.Name}/{p.child1}/{p.root}" :
? p.positionName == null ? $"{p.child1}/{p.root}" : $"{p.positionName}/{p.child1}/{p.root}" :
p.node == 0
? p.PositionCandidate.Name == null ? $"{p.root}" : $"{p.PositionCandidate.Name}/{p.root}" : "-",
? p.positionName == null ? $"{p.root}" : $"{p.positionName}/{p.root}" : "-",
RemarkHorizontal = r.RemarkHorizontal,
RemarkVertical = r.RemarkVertical,
}).ToList();
@ -1859,7 +1852,6 @@ namespace BMA.EHR.Placement.Service.Controllers
var report_data = (from p in _context.PlacementProfiles
.Include(x => x.Placement)
.Include(x => x.PlacementEducations)
.Include(x => x.PositionCandidate)
// .ThenInclude(x => x.PlacementType)
.Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString()))
// .Where(x => x.Placement!.PlacementType!.Name != "สอบแข่งขัน")
@ -1898,7 +1890,7 @@ namespace BMA.EHR.Placement.Service.Controllers
p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-",
Salary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(),
AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(),
PositionCandidate = p.PositionCandidate == null ? "-" : p.PositionCandidate.Name,
PositionCandidate = p.positionName,
RemarkHorizontal = r.RemarkHorizontal,
RemarkVertical = r.RemarkVertical,
}).ToList();