แก้รายงาน เปลี่ยน font => THSarabunPSK และแก้การแสดงผลเลขไทย
This commit is contained in:
parent
122fe5be90
commit
3fc878f340
42 changed files with 331 additions and 309 deletions
|
|
@ -78,23 +78,25 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PositionNumber)
|
||||
.Include(x => x.PositionType)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
orderby r.Sequence
|
||||
select new CommandType01Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
Oc = _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
PositionName = p.PositionPath == null ? "" : p.PositionPath!.Name,
|
||||
PositionLevel = p.PositionLevel == null ? "" : p.PositionLevel.Name,
|
||||
PositionType = p.PositionType == null ? "" : p.PositionType.Name,
|
||||
PositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name,
|
||||
Salary = p.Amount == null ? 0 : p.Amount.Value,
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiFullDate3(),
|
||||
ExamNumber = p.ExamNumber == null ? 0 : p.ExamNumber.Value,
|
||||
PlacementName = $"{p.Placement.Name} ครั้งที่ {p.Placement.Round}/{p.Placement.Year.ToThaiYear()}"
|
||||
PositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name.ToThaiNumber(),
|
||||
Salary = p.Amount == null ? "0" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
ExamNumber = p.ExamNumber == null ? "0" : p.ExamNumber.Value.ToString().ToThaiNumber(),
|
||||
PlacementName = $"{p.Placement.Name.ToThaiNumber()} ครั้งที่ {p.Placement.Round.ToThaiNumber()}/{p.Placement.Year.ToThaiYear().ToString().ToThaiNumber()}"
|
||||
}).ToList();
|
||||
|
||||
return report_data;
|
||||
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
@ -125,19 +127,21 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PositionNumber)
|
||||
.Include(x => x.PositionType)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
orderby r.Sequence
|
||||
select new CommandType01Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
Oc = _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
PositionName = p.PositionPath == null ? "" : p.PositionPath!.Name,
|
||||
PositionLevel = p.PositionLevel == null ? "" : p.PositionLevel.Name,
|
||||
PositionType = p.PositionType == null ? "" : p.PositionType.Name,
|
||||
PositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name,
|
||||
Salary = p.Amount == null ? 0 : p.Amount.Value,
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiFullDate3(),
|
||||
ExamNumber = p.ExamNumber == null ? 0 : p.ExamNumber.Value,
|
||||
PlacementName = $"{p.Placement.Name} ครั้งที่ {p.Placement.Round}/{p.Placement.Year.ToThaiYear()}"
|
||||
PositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name.ToThaiNumber(),
|
||||
Salary = p.Amount == null ? "" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
ExamNumber = p.ExamNumber == null ? "" : p.ExamNumber.Value.ToString().ToThaiNumber(),
|
||||
PlacementName = $"{p.Placement.Name.ToThaiNumber()} ครั้งที่ {p.Placement.Round.ToThaiNumber()}/{p.Placement.Year.ToThaiYear().ToString().ToThaiNumber()}"
|
||||
}).ToList();
|
||||
|
||||
return report_data;
|
||||
|
|
@ -177,23 +181,25 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PosNo)
|
||||
.Include(x => x.Salaries)
|
||||
on r.CitizenId equals pf.CitizenId
|
||||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
OldOc = pf.Oc == null ? "" : pf.Oc.Replace("/", " "),
|
||||
OldPositionName = pf.Position == null ? "" : pf.Position.Name,
|
||||
OldPositionLevel = pf.PositionLevel == null ? "" : pf.PositionLevel.Name,
|
||||
OldPositionType = pf.PositionType == null ? "" : pf.PositionType.Name,
|
||||
OldPositionNumber = pf.PosNo == null ? "" : pf.PosNo.Name,
|
||||
OldSalary = pf.Salaries == null || pf.Salaries.Count == 0 ? 0 : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value,
|
||||
OldPositionNumber = pf.PosNo == null ? "" : pf.PosNo.Name.ToThaiNumber(),
|
||||
OldSalary = pf.Salaries == null || pf.Salaries.Count == 0 ? "" : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
NewPositionName = p.PositionPath == null ? "" : p.PositionPath!.Name,
|
||||
NewPositionLevel = p.PositionLevel == null ? "" : p.PositionLevel.Name,
|
||||
NewPositionType = p.PositionType == null ? "" : p.PositionType.Name,
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name,
|
||||
NewSalary = p.Amount == null ? 0 : p.Amount.Value,
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiFullDate3()
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name.ToThaiNumber(),
|
||||
NewSalary = p.Amount == null ? "" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
@ -234,23 +240,25 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PosNo)
|
||||
.Include(x => x.Salaries)
|
||||
on r.CitizenId equals pf.CitizenId
|
||||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
OldOc = pf.Oc == null ? "" : pf.Oc.Replace("/", " "),
|
||||
OldPositionName = pf.Position == null ? "" : pf.Position.Name,
|
||||
OldPositionLevel = pf.PositionLevel == null ? "" : pf.PositionLevel.Name,
|
||||
OldPositionType = pf.PositionType == null ? "" : pf.PositionType.Name,
|
||||
OldPositionNumber = pf.PosNo == null ? "" : pf.PosNo.Name,
|
||||
OldSalary = pf.Salaries == null || pf.Salaries.Count == 0 ? 0 : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value,
|
||||
OldPositionNumber = pf.PosNo == null ? "" : pf.PosNo.Name.ToThaiNumber(),
|
||||
OldSalary = pf.Salaries == null || pf.Salaries.Count == 0 ? "" : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
NewPositionName = p.PositionPath == null ? "" : p.PositionPath!.Name,
|
||||
NewPositionLevel = p.PositionLevel == null ? "" : p.PositionLevel.Name,
|
||||
NewPositionType = p.PositionType == null ? "" : p.PositionType.Name,
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name,
|
||||
NewSalary = p.Amount == null ? 0 : p.Amount.Value,
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiFullDate3()
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name.ToThaiNumber(),
|
||||
NewSalary = p.Amount == null ? 0 : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
@ -291,23 +299,25 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PosNo)
|
||||
.Include(x => x.Salaries)
|
||||
on r.CitizenId equals pf.CitizenId
|
||||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
OldOc = pf.Oc == null ? "" : pf.Oc.Replace("/", " "),
|
||||
OldPositionName = pf.Position == null ? "" : pf.Position.Name,
|
||||
OldPositionLevel = pf.PositionLevel == null ? "" : pf.PositionLevel.Name,
|
||||
OldPositionType = pf.PositionType == null ? "" : pf.PositionType.Name,
|
||||
OldPositionNumber = pf.PosNo == null ? "" : pf.PosNo.Name,
|
||||
OldSalary = pf.Salaries == null || pf.Salaries.Count == 0 ? 0 : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value,
|
||||
OldPositionNumber = pf.PosNo == null ? "" : pf.PosNo.Name.ToThaiNumber(),
|
||||
OldSalary = pf.Salaries == null || pf.Salaries.Count == 0 ? "" : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
NewPositionName = p.PositionPath == null ? "" : p.PositionPath!.Name,
|
||||
NewPositionLevel = p.PositionLevel == null ? "" : p.PositionLevel.Name,
|
||||
NewPositionType = p.PositionType == null ? "" : p.PositionType.Name,
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name,
|
||||
NewSalary = r.Amount == null ? 0 : r.Amount.Value,
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiFullDate3()
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name.ToThaiNumber(),
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
@ -348,23 +358,25 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PosNo)
|
||||
.Include(x => x.Salaries)
|
||||
on r.CitizenId equals pf.CitizenId
|
||||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
OldOc = pf.Oc == null ? "" : pf.Oc.Replace("/", " "),
|
||||
OldPositionName = pf.Position == null ? "" : pf.Position.Name,
|
||||
OldPositionLevel = pf.PositionLevel == null ? "" : pf.PositionLevel.Name,
|
||||
OldPositionType = pf.PositionType == null ? "" : pf.PositionType.Name,
|
||||
OldPositionNumber = pf.PosNo == null ? "" : pf.PosNo.Name,
|
||||
OldSalary = pf.Salaries == null || pf.Salaries.Count == 0 ? 0 : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value,
|
||||
OldPositionNumber = pf.PosNo == null ? "" : pf.PosNo.Name.ToThaiNumber(),
|
||||
OldSalary = pf.Salaries == null || pf.Salaries.Count == 0 ? "" : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
NewPositionName = p.PositionPath == null ? "" : p.PositionPath!.Name,
|
||||
NewPositionLevel = p.PositionLevel == null ? "" : p.PositionLevel.Name,
|
||||
NewPositionType = p.PositionType == null ? "" : p.PositionType.Name,
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name,
|
||||
NewSalary = r.Amount == null ? 0 : r.Amount.Value,
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiFullDate3()
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name.ToThaiNumber(),
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
@ -409,23 +421,25 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PositionNumber)
|
||||
.Include(x => x.PositionType)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
OldOc = p.Profile.Oc == null ? "" : p.Profile.Oc.Replace("/", " "),
|
||||
OldPositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name,
|
||||
OldPositionLevel = p.Profile.PositionLevel == null ? "" : p.Profile.PositionLevel.Name,
|
||||
OldPositionType = p.Profile.PositionType == null ? "" : p.Profile.PositionType.Name,
|
||||
OldPositionNumber = p.Profile.PosNo == null ? "" : p.Profile.PosNo.Name,
|
||||
OldSalary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? 0 : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value,
|
||||
OldPositionNumber = p.Profile.PosNo == null ? "" : p.Profile.PosNo.Name.ToThaiNumber(),
|
||||
OldSalary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? "" : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = p.OrganizationPosition == null ? "" : _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
NewPositionName = p.PositionPath == null ? "" : p.PositionPath!.Name,
|
||||
NewPositionLevel = p.PositionLevel == null ? "" : p.PositionLevel.Name,
|
||||
NewPositionType = p.PositionType == null ? "" : p.PositionType.Name,
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name,
|
||||
NewSalary = p.Amount == null ? 0 : p.Amount.Value,
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiFullDate3()
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name.ToThaiNumber(),
|
||||
NewSalary = p.Amount == null ? "" : p.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
@ -470,23 +484,25 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PositionNumber)
|
||||
.Include(x => x.PositionType)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
OldOc = p.Profile.Oc == null ? "" : p.Profile.Oc.Replace("/", " "),
|
||||
OldPositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name,
|
||||
OldPositionLevel = p.Profile.PositionLevel == null ? "" : p.Profile.PositionLevel.Name,
|
||||
OldPositionType = p.Profile.PositionType == null ? "" : p.Profile.PositionType.Name,
|
||||
OldPositionNumber = p.Profile.PosNo == null ? "" : p.Profile.PosNo.Name,
|
||||
OldSalary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? 0 : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value,
|
||||
OldPositionNumber = p.Profile.PosNo == null ? "" : p.Profile.PosNo.Name.ToThaiNumber(),
|
||||
OldSalary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? "" : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = p.OrganizationPosition == null ? "" : _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
NewPositionName = p.PositionPath == null ? "" : p.PositionPath!.Name,
|
||||
NewPositionLevel = p.PositionLevel == null ? "" : p.PositionLevel.Name,
|
||||
NewPositionType = p.PositionType == null ? "" : p.PositionType.Name,
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name,
|
||||
NewSalary = r.Amount == null ? 0 : r.Amount.Value,
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiFullDate3()
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name.ToThaiNumber(),
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
@ -507,17 +523,17 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Where(c => c.Command.Id == id)
|
||||
.Select(r => new CommandType11Response
|
||||
{
|
||||
CommandNo = r.Command.CommandNo,
|
||||
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString(),
|
||||
CommandAffectDate = r.Command.CommandAffectDate == null ? "" : r.Command.CommandAffectDate.Value.ToThaiFullDate3(),
|
||||
CommandNo = r.Command.CommandNo.ToThaiNumber(),
|
||||
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||
CommandAffectDate = r.Command.CommandAffectDate == null ? "" : r.Command.CommandAffectDate.Value.ToThaiFullDate3().ToThaiNumber(),
|
||||
IssuerOrganizationName = r.Command.IssuerOrganizationName,
|
||||
AuthorizedUserFullName = r.Command.AuthorizedUserFullName,
|
||||
AuthorizedPosition = r.Command.AuthorizedPosition,
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
PlacementCommandIssuer = r.Command.PlacementCommandIssuer,
|
||||
PlacementCommandNo = r.Command.PlacementCommandNo,
|
||||
PlacementCommandDate = r.Command.PlacementCommandDate == null ? "" : r.Command.PlacementCommandDate.Value.ToThaiFullDate3()
|
||||
PlacementCommandNo = r.Command.PlacementCommandNo.ToThaiNumber(),
|
||||
PlacementCommandDate = r.Command.PlacementCommandDate == null ? "" : r.Command.PlacementCommandDate.Value.ToThaiFullDate3().ToThaiNumber()
|
||||
})
|
||||
.ToListAsync();
|
||||
if (raw_data == null)
|
||||
|
|
@ -542,17 +558,17 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Where(c => c.Command.Id == id)
|
||||
.Select(r => new CommandType11Response
|
||||
{
|
||||
CommandNo = r.Command.CommandNo,
|
||||
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString(),
|
||||
CommandAffectDate = r.Command.CommandAffectDate == null ? "" : r.Command.CommandAffectDate.Value.ToThaiFullDate3(),
|
||||
CommandNo = r.Command.CommandNo.ToThaiNumber(),
|
||||
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||
CommandAffectDate = r.Command.CommandAffectDate == null ? "" : r.Command.CommandAffectDate.Value.ToThaiFullDate3().ToThaiNumber(),
|
||||
IssuerOrganizationName = r.Command.IssuerOrganizationName,
|
||||
AuthorizedUserFullName = r.Command.AuthorizedUserFullName,
|
||||
AuthorizedPosition = r.Command.AuthorizedPosition,
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
PlacementCommandIssuer = r.Command.PlacementCommandIssuer,
|
||||
PlacementCommandNo = r.Command.PlacementCommandNo,
|
||||
PlacementCommandDate = r.Command.PlacementCommandDate == null ? "" : r.Command.PlacementCommandDate.Value.ToThaiFullDate3()
|
||||
PlacementCommandNo = r.Command.PlacementCommandNo.ToThaiNumber(),
|
||||
PlacementCommandDate = r.Command.PlacementCommandDate == null ? "" : r.Command.PlacementCommandDate.Value.ToThaiFullDate3().ToThaiNumber()
|
||||
})
|
||||
.ToListAsync();
|
||||
if (raw_data == null)
|
||||
|
|
@ -591,16 +607,18 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PosNo)
|
||||
.Include(x => x.Salaries)
|
||||
on r.CitizenId equals pf.CitizenId
|
||||
orderby r.Sequence
|
||||
select new CommandType13Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
Organization = pf.Oc == null ? "" : pf.Oc.Replace("/", " "),
|
||||
PositionName = pf.Position == null ? "" : pf.Position.Name,
|
||||
PositionLevel = pf.PositionLevel == null ? "" : pf.PositionLevel.Name,
|
||||
PositionType = pf.PositionType == null ? "" : pf.PositionType.Name,
|
||||
PositionNumber = pf.PosNo == null ? "" : pf.PosNo.Name,
|
||||
Salary = pf.Salaries == null || pf.Salaries.Count == 0 ? 0 : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value,
|
||||
PositionNumber = pf.PosNo == null ? "" : pf.PosNo.Name.ToThaiNumber(),
|
||||
Salary = pf.Salaries == null || pf.Salaries.Count == 0 ? "" : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
ActiveDate = "",
|
||||
ReceiveOrganizationName = r.Command!.ReceiveOrganizationName
|
||||
})
|
||||
|
|
@ -634,23 +652,25 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.PositionNumber)
|
||||
.Include(x => x.PositionType)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
orderby r.Sequence
|
||||
select new CommandType03Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
OldOc = p.OrganizationPositionOld,
|
||||
OldPositionName = p.OrganizationPositionOld,
|
||||
OldPositionLevel = p.PositionLevelOld,
|
||||
OldPositionType = p.PositionTypeOld,
|
||||
OldPositionNumber = p.PositionNumberOld,
|
||||
OldSalary = p.AmountOld == null ? 0 : p.AmountOld.Value,
|
||||
OldPositionNumber = p.PositionNumberOld.ToThaiNumber(),
|
||||
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
NewOc = _organizationCommonRepository.GetOrganizationNameFullPath(p.OrganizationPosition!.Organization!.Id, false, false, "/"),
|
||||
NewPositionName = p.PositionPath == null ? "" : p.PositionPath!.Name,
|
||||
NewPositionLevel = p.PositionLevel == null ? "" : p.PositionLevel.Name,
|
||||
NewPositionType = p.PositionType == null ? "" : p.PositionType.Name,
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name,
|
||||
NewSalary = r.Amount == null ? 0 : r.Amount.Value,
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiFullDate3()
|
||||
NewPositionNumber = p.PositionNumber == null ? "" : p.PositionNumber.Name.ToThaiNumber(),
|
||||
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
AppointDate = p.RecruitDate == null ? "" : p.RecruitDate.Value.ToThaiShortDate2().ToThaiNumber()
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
@ -675,14 +695,16 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(p => p.Profile)
|
||||
.ThenInclude(p => p.Position)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
orderby r.Sequence
|
||||
select new CommandType15Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name,
|
||||
Organization = p.Organization,
|
||||
StartDate = p.DateStart == null ? "" : p.DateStart.Value.ToThaiFullDate3(),
|
||||
EndDate = p.DateEnd == null ? "" : p.DateEnd.Value.ToThaiFullDate3(),
|
||||
StartDate = p.DateStart == null ? "" : p.DateStart.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
EndDate = p.DateEnd == null ? "" : p.DateEnd.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
@ -714,17 +736,19 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(p => p.Profile)
|
||||
.ThenInclude(p => p.Salaries)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
orderby r.Sequence
|
||||
select new CommandType17Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name,
|
||||
Organization = p.OrganizationPositionOld,
|
||||
PositionLevel = p.PositionLevelOld,
|
||||
PositionType = p.PositionTypeOld,
|
||||
PositionNumber = p.PositionNumberOld,
|
||||
ActiveDate = p.ActiveDate == null ? "" : p.ActiveDate.Value.ToThaiFullDate3(),
|
||||
Salary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? 0 : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value,
|
||||
PositionNumber = p.PositionNumberOld.ToThaiNumber(),
|
||||
ActiveDate = p.ActiveDate == null ? "" : p.ActiveDate.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
Salary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? "" : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
Remark = p.Reason ?? ""
|
||||
})
|
||||
.ToList();
|
||||
|
|
@ -757,11 +781,12 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(p => p.Profile)
|
||||
.ThenInclude(p => p.Salaries)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
orderby r.Sequence
|
||||
select new CommandType18Response
|
||||
{
|
||||
CommandNo = r.Command.CommandNo,
|
||||
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString(),
|
||||
CommandAffectDate = r.Command.CommandAffectDate == null ? "" : r.Command.CommandAffectDate.Value.ToThaiFullDate3(),
|
||||
CommandNo = r.Command.CommandNo.ToThaiNumber(),
|
||||
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||
CommandAffectDate = r.Command.CommandAffectDate == null ? "" : r.Command.CommandAffectDate.Value.ToThaiFullDate3().ToThaiNumber(),
|
||||
IssuerOrganizationName = r.Command.IssuerOrganizationName,
|
||||
AuthorizedUserFullName = r.Command.AuthorizedUserFullName,
|
||||
AuthorizedPosition = r.Command.AuthorizedPosition,
|
||||
|
|
@ -771,12 +796,12 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
Organization = p.OrganizationPositionOld,
|
||||
PositionLevel = p.PositionLevelOld,
|
||||
PositionType = p.PositionTypeOld,
|
||||
PositionNumber = p.PositionNumberOld,
|
||||
Salary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? 0 : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value,
|
||||
PositionNumber = p.PositionNumberOld.ToThaiNumber(),
|
||||
Salary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? "" : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
Fault = r.Command.Fault,
|
||||
GuiltyBasis = r.Command.GuiltyBasis,
|
||||
ConclusionFireNo = r.Command!.ConclusionFireNo,
|
||||
ConclusionFireDate = r.Command.ConclusionFireDate == null ? "" : r.Command.ConclusionFireDate.Value.ToThaiFullDate3(),
|
||||
ConclusionFireNo = r.Command!.ConclusionFireNo.ToThaiNumber(),
|
||||
ConclusionFireDate = r.Command.ConclusionFireDate == null ? "" : r.Command.ConclusionFireDate.Value.ToThaiFullDate3().ToThaiNumber(),
|
||||
ConclusionFireResolution = r.Command.ConclusionFireResolution
|
||||
})
|
||||
.ToList();
|
||||
|
|
@ -809,11 +834,12 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(p => p.Profile)
|
||||
.ThenInclude(p => p.Salaries)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
orderby r.Sequence
|
||||
select new CommandType18Response
|
||||
{
|
||||
CommandNo = r.Command.CommandNo,
|
||||
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString(),
|
||||
CommandAffectDate = r.Command.CommandAffectDate == null ? "" : r.Command.CommandAffectDate.Value.ToThaiFullDate3(),
|
||||
CommandNo = r.Command.CommandNo.ToThaiNumber(),
|
||||
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||
CommandAffectDate = r.Command.CommandAffectDate == null ? "" : r.Command.CommandAffectDate.Value.ToThaiFullDate3().ToThaiNumber(),
|
||||
IssuerOrganizationName = r.Command.IssuerOrganizationName,
|
||||
AuthorizedUserFullName = r.Command.AuthorizedUserFullName,
|
||||
AuthorizedPosition = r.Command.AuthorizedPosition,
|
||||
|
|
@ -823,12 +849,12 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
Organization = p.OrganizationPositionOld,
|
||||
PositionLevel = p.PositionLevelOld,
|
||||
PositionType = p.PositionTypeOld,
|
||||
PositionNumber = p.PositionNumberOld,
|
||||
Salary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? 0 : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value,
|
||||
PositionNumber = p.PositionNumberOld.ToThaiNumber(),
|
||||
Salary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? "" : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
Fault = r.Command.Fault,
|
||||
GuiltyBasis = r.Command.GuiltyBasis,
|
||||
ConclusionFireNo = r.Command!.ConclusionFireNo,
|
||||
ConclusionFireDate = r.Command.ConclusionFireDate == null ? "" : r.Command.ConclusionFireDate.Value.ToThaiFullDate3(),
|
||||
ConclusionFireNo = r.Command!.ConclusionFireNo.ToThaiNumber(),
|
||||
ConclusionFireDate = r.Command.ConclusionFireDate == null ? "" : r.Command.ConclusionFireDate.Value.ToThaiFullDate3().ToThaiNumber(),
|
||||
ConclusionFireResolution = r.Command.ConclusionFireResolution
|
||||
})
|
||||
.ToList();
|
||||
|
|
@ -863,9 +889,9 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
on r.RefPlacementProfileId equals p.Id
|
||||
select new CommandType18Response
|
||||
{
|
||||
CommandNo = r.Command.CommandNo,
|
||||
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString(),
|
||||
CommandAffectDate = r.Command.CommandAffectDate == null ? "" : r.Command.CommandAffectDate.Value.ToThaiFullDate3(),
|
||||
CommandNo = r.Command.CommandNo.ToThaiNumber(),
|
||||
CommandYear = r.Command.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
|
||||
CommandAffectDate = r.Command.CommandAffectDate == null ? "" : r.Command.CommandAffectDate.Value.ToThaiFullDate3().ToThaiNumber(),
|
||||
IssuerOrganizationName = r.Command.IssuerOrganizationName,
|
||||
AuthorizedUserFullName = r.Command.AuthorizedUserFullName,
|
||||
AuthorizedPosition = r.Command.AuthorizedPosition,
|
||||
|
|
@ -875,12 +901,12 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
Organization = p.OrganizationPositionOld,
|
||||
PositionLevel = p.PositionLevelOld,
|
||||
PositionType = p.PositionTypeOld,
|
||||
PositionNumber = p.PositionNumberOld,
|
||||
Salary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? 0 : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value,
|
||||
PositionNumber = p.PositionNumberOld.ToThaiNumber(),
|
||||
Salary = p.Profile.Salaries == null || p.Profile.Salaries.Count == 0 ? "" : p.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
Fault = r.Command.Fault,
|
||||
GuiltyBasis = r.Command.GuiltyBasis,
|
||||
ConclusionFireNo = r.Command!.ConclusionFireNo,
|
||||
ConclusionFireDate = r.Command.ConclusionFireDate == null ? "" : r.Command.ConclusionFireDate.Value.ToThaiFullDate3(),
|
||||
ConclusionFireNo = r.Command!.ConclusionFireNo.ToThaiNumber(),
|
||||
ConclusionFireDate = r.Command.ConclusionFireDate == null ? "" : r.Command.ConclusionFireDate.Value.ToThaiFullDate3().ToThaiNumber(),
|
||||
ConclusionFireResolution = r.Command.ConclusionFireResolution
|
||||
})
|
||||
.ToList();
|
||||
|
|
@ -917,18 +943,19 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Include(x => x.Profile)
|
||||
.ThenInclude(x => x.PosNo)
|
||||
on r.RefPlacementProfileId equals p.Id
|
||||
|
||||
orderby r.Sequence
|
||||
select new CommandType21Response
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId,
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
Organization = p.Profile!.EmployeeOc,
|
||||
PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name,
|
||||
PositionLevel = p.Profile.PositionLevel == null ? "" : p.Profile.PositionLevel.Name,
|
||||
PositionType = p.Profile.PositionType == null ? "" : p.Profile.PositionType.Name,
|
||||
PositionNumber = p.Profile.PosNo == null ? "" : p.Profile.PosNo.Name,
|
||||
Salary = r.Amount == null ? 0 : r.Amount.Value,
|
||||
RetireDate = p.Profile.BirthDate.CalculateRetireDate().ToThaiFullDate3()
|
||||
PositionNumber = p.Profile.PosNo == null ? "" : p.Profile.PosNo.Name.ToThaiNumber(),
|
||||
Salary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
RetireDate = p.Profile.BirthDate.CalculateRetireDate().ToThaiShortDate2().ToThaiNumber()
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue