ออกคำสั่ง 27
This commit is contained in:
parent
6c09c68c5c
commit
a89b8e0453
7 changed files with 18120 additions and 27 deletions
|
|
@ -1029,39 +1029,39 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
}
|
||||
|
||||
var report_data = (from r in raw_data
|
||||
join p in _dbContext.Set<OrganizationEmployeeProfile>()
|
||||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.Position)
|
||||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.PositionLevel)
|
||||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.PositionType)
|
||||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.PosNo)
|
||||
.Include(x => x.OrgEmployee)
|
||||
.ThenInclude(x => x.OrganizationAgency)
|
||||
.ThenInclude(x => x.OrganizationOrganization)
|
||||
//.Include(x => x.OrgEmployee)
|
||||
//.ThenInclude(x => x.PosNo)
|
||||
.Include(x => x.OrgEmployee)
|
||||
.ThenInclude(x => x.PositionEmployeePosition)
|
||||
.Include(x => x.OrgEmployee)
|
||||
.ThenInclude(x => x.OrganizationPositionEmployeeLevels)
|
||||
.ThenInclude(x => x.PositionEmployeeLevel)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
// join p in _dbContext.Set<OrganizationEmployeeProfile>()
|
||||
// .Include(x => x.Profile)
|
||||
// .ThenInclude(x => x.Position)
|
||||
// .Include(x => x.Profile)
|
||||
// .ThenInclude(x => x.PositionLevel)
|
||||
// .Include(x => x.Profile)
|
||||
// .ThenInclude(x => x.PositionType)
|
||||
// .Include(x => x.Profile)
|
||||
// .ThenInclude(x => x.PosNo)
|
||||
// .Include(x => x.OrgEmployee)
|
||||
// .ThenInclude(x => x.OrganizationAgency)
|
||||
// .ThenInclude(x => x.OrganizationOrganization)
|
||||
// //.Include(x => x.OrgEmployee)
|
||||
// //.ThenInclude(x => x.PosNo)
|
||||
// .Include(x => x.OrgEmployee)
|
||||
// .ThenInclude(x => x.PositionEmployeePosition)
|
||||
// .Include(x => x.OrgEmployee)
|
||||
// .ThenInclude(x => x.OrganizationPositionEmployeeLevels)
|
||||
// .ThenInclude(x => x.PositionEmployeeLevel)
|
||||
// on r.RefPlacementProfileId equals p.Id
|
||||
orderby r.Sequence
|
||||
select new CommandType21Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId.ToThaiNumber(),
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
Organization = p.OrgEmployee == null || p.OrgEmployee!.OrganizationAgency == null || p.OrgEmployee!.OrganizationAgency!.OrganizationOrganization == null ? "" : p.OrgEmployee!.OrganizationAgency!.OrganizationOrganization!.Name,
|
||||
PositionName = p.OrgEmployee == null || p.OrgEmployee.PositionEmployeePosition == null ? "" : p.OrgEmployee.PositionEmployeePosition.Name.ToThaiNumber(),
|
||||
PositionLevel = p.OrgEmployee == null || p.OrgEmployee.OrganizationPositionEmployeeLevels == null ? "" : p.OrgEmployee.OrganizationPositionEmployeeLevels.First().PositionEmployeeLevel.Name.ToThaiNumber(),
|
||||
PositionType = p.Profile.PositionType == null ? "" : p.Profile.PositionType.Name.ToThaiNumber(),
|
||||
PositionNumber = p.OrgEmployee.PosNo == null ? "" : p.OrgEmployee.PosNo.ToThaiNumber(),
|
||||
Organization = r.Organization == null ? "" : r.Organization.ToThaiNumber(),
|
||||
PositionName = r.PositionName == null ? "" : r.PositionName.ToThaiNumber(),
|
||||
PositionLevel = r.PositionLevel == null ? "" : r.PositionLevel.ToThaiNumber(),
|
||||
PositionType = r.PositionType == null ? "" : r.PositionType.ToThaiNumber(),
|
||||
PositionNumber = r.PositionNumber == null ? "" : r.PositionNumber.ToThaiNumber(),
|
||||
Salary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
RetireDate = p.Profile.BirthDate.CalculateRetireDate().ToThaiFullDate3().ToThaiNumber(),
|
||||
RetireDate = r.BirthDate == null ? "" : r.BirthDate.Value.CalculateRetireDate().ToThaiFullDate3().ToThaiNumber(),
|
||||
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber()
|
||||
})
|
||||
.ToList();
|
||||
|
|
|
|||
|
|
@ -1596,8 +1596,14 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
Prefix = d.prefix == null ? "" : d.prefix,
|
||||
FirstName = d.firstName,
|
||||
LastName = d.lastName,
|
||||
RefPlacementProfileId = d.profileId == null ? null : Guid.Parse(d.profileId),
|
||||
RefPlacementProfileId = d.id,
|
||||
RefDisciplineId = d.id,
|
||||
Organization = d.Organization,
|
||||
PositionName = d.PositionName,
|
||||
PositionLevel = d.PositionLevel,
|
||||
PositionType = d.PositionType,
|
||||
PositionNumber = d.PositionNumber,
|
||||
BirthDate = d.BirthDate,
|
||||
};
|
||||
seq++;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,5 +16,13 @@
|
|||
public string lastName { get; set; } = string.Empty;
|
||||
public string? profileId { get; set; } = string.Empty;
|
||||
// public Guid? commandId { get; set; } = Guid.Empty;
|
||||
|
||||
|
||||
public DateTime? BirthDate { get; set; }
|
||||
public string? Organization { get; set; }
|
||||
public string? PositionName { get; set; }
|
||||
public string? PositionLevel { get; set; }
|
||||
public string? PositionType { get; set; }
|
||||
public string? PositionNumber { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue