แนบท้ายคำสั่ง (5,6, 7, 8, 9,13, 14, 15)

This commit is contained in:
Bright 2024-06-27 18:02:07 +07:00
parent 92e298c745
commit 417c7b0071
2 changed files with 214 additions and 65 deletions

View file

@ -92,7 +92,7 @@ namespace BMA.EHR.Application.Repositories.Commands
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" : Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" :
p.PlacementEducations.FirstOrDefault().Degree, p.PlacementEducations.FirstOrDefault().Degree,
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Oc = p.root == null ? "" : p.root, Oc = p.root == null ? "" : p.root,
PositionName = p.positionName == null ? "" : p.positionName, PositionName = p.positionName == null ? "" : p.positionName,
@ -151,7 +151,7 @@ namespace BMA.EHR.Application.Repositories.Commands
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" : Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" :
p.PlacementEducations.FirstOrDefault().Degree, p.PlacementEducations.FirstOrDefault().Degree,
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Oc = p.root == null ? "" : p.root, Oc = p.root == null ? "" : p.root,
PositionName = p.positionName == null ? "" : p.positionName, PositionName = p.positionName == null ? "" : p.positionName,
@ -215,7 +215,7 @@ namespace BMA.EHR.Application.Repositories.Commands
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" : Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" :
p.PlacementEducations.FirstOrDefault().Degree, p.PlacementEducations.FirstOrDefault().Degree,
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
OldOc = pf.Oc == null ? "" : pf.Oc.Replace("/", " "), OldOc = pf.Oc == null ? "" : pf.Oc.Replace("/", " "),
Probation = pf.IsProbation ? "(อยู่ระหว่างปฏิบัติหน้าที่ราชการ)" : "", Probation = pf.IsProbation ? "(อยู่ระหว่างปฏิบัติหน้าที่ราชการ)" : "",
@ -285,7 +285,7 @@ namespace BMA.EHR.Application.Repositories.Commands
Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" : Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" :
p.PlacementEducations.FirstOrDefault().Degree, p.PlacementEducations.FirstOrDefault().Degree,
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
OldOc = pf.Oc == null ? "" : pf.Oc.Replace("/", " "), OldOc = pf.Oc == null ? "" : pf.Oc.Replace("/", " "),
OldPositionName = pf.Position == null ? "" : pf.Position.Name, OldPositionName = pf.Position == null ? "" : pf.Position.Name,
@ -351,13 +351,13 @@ namespace BMA.EHR.Application.Repositories.Commands
{ {
Education = p.EducationOld == null ? "-" : p.EducationOld, Education = p.EducationOld == null ? "-" : p.EducationOld,
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
OldOc = p.rootOld == null ? "" : p.rootOld, OldOc = p.rootOld == null ? "" : p.rootOld,
OldPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld, OldPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld, OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
OldPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld, OldPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
OldPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld, OldPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
OldSalaryDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(), OldSalaryDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
NewOc = p.root == null ? "" : p.root, NewOc = p.root == null ? "" : p.root,
@ -421,13 +421,13 @@ namespace BMA.EHR.Application.Repositories.Commands
// pf.Educations.OrderByDescending(x => x.StartDate).FirstOrDefault().Degree, // pf.Educations.OrderByDescending(x => x.StartDate).FirstOrDefault().Degree,
Education = p.EducationOld == null ? "-" : p.EducationOld, Education = p.EducationOld == null ? "-" : p.EducationOld,
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
OldOc = p.rootOld == null ? "" : p.rootOld, OldOc = p.rootOld == null ? "" : p.rootOld,
OldPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld, OldPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld, OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
OldPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld, OldPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
OldPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld, OldPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
OldSalaryDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(), OldSalaryDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
NewOc = p.root == null ? "" : p.root, NewOc = p.root == null ? "" : p.root,
@ -475,20 +475,20 @@ namespace BMA.EHR.Application.Repositories.Commands
{ {
Education = p.EducationOld == null ? "-" : p.EducationOld, Education = p.EducationOld == null ? "-" : p.EducationOld,
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
OldOc = p.rootOld == null ? "" : p.rootOld, OldOc = p.rootOld == null ? "" : p.rootOld,
OldPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld, OldPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld, OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
OldPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld, OldPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
OldPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld, OldPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
OldSalaryDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(), OldSalaryDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
NewOc = p.rootOld == null ? "" : p.rootOld, NewOc = p.rootOld == null ? "" : p.rootOld,
NewPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld, NewPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
NewPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld, NewPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
NewPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld, NewPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
NewPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld, NewPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
AppointDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(), AppointDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
LeaveDate = p.LeaveDate == null ? "" : p.LeaveDate.Value.ToThaiShortDate2().ToThaiNumber(), LeaveDate = p.LeaveDate == null ? "" : p.LeaveDate.Value.ToThaiShortDate2().ToThaiNumber(),
@ -525,20 +525,20 @@ namespace BMA.EHR.Application.Repositories.Commands
{ {
Education = p.EducationOld == null ? "-" : p.EducationOld, Education = p.EducationOld == null ? "-" : p.EducationOld,
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
OldOc = p.rootOld == null ? "" : p.rootOld, OldOc = p.rootOld == null ? "" : p.rootOld,
OldPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld, OldPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld, OldPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
OldPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld, OldPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
OldPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld, OldPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), OldSalary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
OldSalaryDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(), OldSalaryDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
NewOc = p.rootOld == null ? "" : p.rootOld, NewOc = p.rootOld == null ? "" : p.rootOld,
NewPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld, NewPositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
NewPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld, NewPositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
NewPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld, NewPositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
NewPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld, NewPositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), NewSalary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
AppointDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(), AppointDate = p.PositionDate == null ? "" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(),
LeaveDate = p.LeaveDate == null ? "" : p.LeaveDate.Value.ToThaiShortDate2().ToThaiNumber(), LeaveDate = p.LeaveDate == null ? "" : p.LeaveDate.Value.ToThaiShortDate2().ToThaiNumber(),
@ -570,7 +570,7 @@ namespace BMA.EHR.Application.Repositories.Commands
IssuerOrganizationName = r.Command.IssuerOrganizationName, IssuerOrganizationName = r.Command.IssuerOrganizationName,
AuthorizedUserFullName = r.Command.AuthorizedUserFullName, AuthorizedUserFullName = r.Command.AuthorizedUserFullName,
AuthorizedPosition = r.Command.AuthorizedPosition, AuthorizedPosition = r.Command.AuthorizedPosition,
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
PlacementCommandIssuer = r.Command.PlacementCommandIssuer ?? "", PlacementCommandIssuer = r.Command.PlacementCommandIssuer ?? "",
PlacementCommandNo = r.Command.PlacementCommandNo == null ? "" : r.Command.PlacementCommandNo.ToThaiNumber(), PlacementCommandNo = r.Command.PlacementCommandNo == null ? "" : r.Command.PlacementCommandNo.ToThaiNumber(),
@ -606,7 +606,7 @@ namespace BMA.EHR.Application.Repositories.Commands
IssuerOrganizationName = r.Command.IssuerOrganizationName, IssuerOrganizationName = r.Command.IssuerOrganizationName,
AuthorizedUserFullName = r.Command.AuthorizedUserFullName, AuthorizedUserFullName = r.Command.AuthorizedUserFullName,
AuthorizedPosition = r.Command.AuthorizedPosition, AuthorizedPosition = r.Command.AuthorizedPosition,
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
PlacementCommandIssuer = r.Command.PlacementCommandIssuer ?? "", PlacementCommandIssuer = r.Command.PlacementCommandIssuer ?? "",
PlacementCommandNo = r.Command.PlacementCommandNo == null ? "" : r.Command.PlacementCommandNo.ToThaiNumber(), PlacementCommandNo = r.Command.PlacementCommandNo == null ? "" : r.Command.PlacementCommandNo.ToThaiNumber(),
@ -647,13 +647,13 @@ namespace BMA.EHR.Application.Repositories.Commands
select new CommandType13Response select new CommandType13Response
{ {
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Organization = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld, Organization = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
PositionName = p.PositionOld == null ? "" : p.PositionOld, PositionName = p.PositionOld == null ? "" : p.PositionOld,
PositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld, PositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
PositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld, PositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
PositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld, PositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
Salary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(), Salary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
//Salary = pf.Salaries == null || pf.Salaries.Count == 0 ? "" : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), //Salary = pf.Salaries == null || pf.Salaries.Count == 0 ? "" : pf.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount.Value.ToNumericNoDecimalText().ToThaiNumber(),
ActiveDate = p.Date == null ? "" : p.Date.Value.ToThaiShortDate2().ToThaiNumber(), ActiveDate = p.Date == null ? "" : p.Date.Value.ToThaiShortDate2().ToThaiNumber(),
@ -695,7 +695,7 @@ namespace BMA.EHR.Application.Repositories.Commands
{ {
Education = p.EducationOld == null ? "-" : p.EducationOld, Education = p.EducationOld == null ? "-" : p.EducationOld,
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
OldOc = p.OrganizationPositionOld ?? "", OldOc = p.OrganizationPositionOld ?? "",
OldPositionName = p.OrganizationPositionOld ?? "", OldPositionName = p.OrganizationPositionOld ?? "",
@ -744,7 +744,7 @@ namespace BMA.EHR.Application.Repositories.Commands
select new CommandType15Response select new CommandType15Response
{ {
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
PositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld, PositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
// PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name, // PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name,
@ -836,7 +836,7 @@ namespace BMA.EHR.Application.Repositories.Commands
select new CommandType17Response select new CommandType17Response
{ {
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
PositionName = p.PositionOld ?? "", PositionName = p.PositionOld ?? "",
Organization = p.OrganizationPositionOld ?? "", Organization = p.OrganizationPositionOld ?? "",
@ -888,7 +888,7 @@ namespace BMA.EHR.Application.Repositories.Commands
IssuerOrganizationName = r.Command.IssuerOrganizationName, IssuerOrganizationName = r.Command.IssuerOrganizationName,
AuthorizedUserFullName = r.Command.AuthorizedUserFullName, AuthorizedUserFullName = r.Command.AuthorizedUserFullName,
AuthorizedPosition = r.Command.AuthorizedPosition, AuthorizedPosition = r.Command.AuthorizedPosition,
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
// PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name, // PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name,
Organization = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld, Organization = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
@ -943,7 +943,7 @@ namespace BMA.EHR.Application.Repositories.Commands
IssuerOrganizationName = r.Command.IssuerOrganizationName, IssuerOrganizationName = r.Command.IssuerOrganizationName,
AuthorizedUserFullName = r.Command.AuthorizedUserFullName, AuthorizedUserFullName = r.Command.AuthorizedUserFullName,
AuthorizedPosition = r.Command.AuthorizedPosition, AuthorizedPosition = r.Command.AuthorizedPosition,
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name, PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name,
Organization = p.OrganizationPositionOld ?? "", Organization = p.OrganizationPositionOld ?? "",
@ -997,7 +997,7 @@ namespace BMA.EHR.Application.Repositories.Commands
IssuerOrganizationName = r.Command.IssuerOrganizationName, IssuerOrganizationName = r.Command.IssuerOrganizationName,
AuthorizedUserFullName = r.Command.AuthorizedUserFullName, AuthorizedUserFullName = r.Command.AuthorizedUserFullName,
AuthorizedPosition = r.Command.AuthorizedPosition, AuthorizedPosition = r.Command.AuthorizedPosition,
CitizenId = r.CitizenId, CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name, PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name,
Organization = p.OrganizationPositionOld ?? "", Organization = p.OrganizationPositionOld ?? "",
@ -1060,7 +1060,7 @@ namespace BMA.EHR.Application.Repositories.Commands
select new CommandType21Response select new CommandType21Response
{ {
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId.ToThaiNumber(), CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Organization = r.Organization == null ? "" : r.Organization.ToThaiNumber(), Organization = r.Organization == null ? "" : r.Organization.ToThaiNumber(),
PositionName = r.PositionName == null ? "" : r.PositionName.ToThaiNumber(), PositionName = r.PositionName == null ? "" : r.PositionName.ToThaiNumber(),
@ -1192,7 +1192,7 @@ namespace BMA.EHR.Application.Repositories.Commands
select new CommandType21Response select new CommandType21Response
{ {
Seq = r.Sequence.ToString().ToThaiNumber(), Seq = r.Sequence.ToString().ToThaiNumber(),
CitizenId = r.CitizenId.ToThaiNumber(), CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
Organization = p.OrganizationPositionOld ?? "", Organization = p.OrganizationPositionOld ?? "",
PositionName = p.PositionOld ?? "", PositionName = p.PositionOld ?? "",
@ -1311,7 +1311,7 @@ namespace BMA.EHR.Application.Repositories.Commands
{ {
fullName = $"{org.result.prefix}{org.result.firstName} {org.result.lastName}", fullName = $"{org.result.prefix}{org.result.firstName} {org.result.lastName}",
positionname = org.result.position, positionname = org.result.position,
positionno = org.result.posNo, positionno = org.result.posNo == null ? null : org.result.posNo.ToThaiNumber(),
organizationname = org.result.organization, organizationname = org.result.organization,
salary = org.result.salary == null ? null : org.result.salary.Value.ToNumericNoDecimalText().ToString(), salary = org.result.salary == null ? null : org.result.salary.Value.ToNumericNoDecimalText().ToString(),
}; };

View file

@ -599,14 +599,33 @@ namespace BMA.EHR.Report.Service.Controllers
{ {
try try
{ {
var command = await _repository.GetByIdAsync(commandId); //var command = await _repository.GetByIdAsync(commandId);
if (command == null) //if (command == null)
//{
// throw new Exception(GlobalMessages.CommandNotFound);
//}
var raw_data = await _repository.GetByIdAsync(commandId);
if (raw_data == null)
{ {
throw new Exception(GlobalMessages.CommandNotFound); throw new Exception(GlobalMessages.CommandNotFound);
} }
var command = new
{
CommandNo = raw_data.CommandNo.ToThaiNumber(),
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
IssuerOrganizationName = raw_data.IssuerOrganizationName,
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
};
var data = await _commandReportRepository.GetCommandType05_06AttachmentAsync(commandId); var data = await _commandReportRepository.GetCommandType05_06AttachmentAsync(commandId);
return data; return new
{
CommandNo = command.CommandNo,
CommandYear = command.CommandYear,
IssuerOrganizationName = command.IssuerOrganizationName,
CommandExcecuteDate = command.CommandExcecuteDate,
data = data,
};
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"05-06-แนบท้ายคำสั่งแต่งตั้ง-คำสั่งเลื่อน.trdp"); //var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"05-06-แนบท้ายคำสั่งแต่งตั้ง-คำสั่งเลื่อน.trdp");
//ReportPackager reportPackager = new ReportPackager(); //ReportPackager reportPackager = new ReportPackager();
@ -720,14 +739,34 @@ namespace BMA.EHR.Report.Service.Controllers
{ {
try try
{ {
var command = await _repository.GetByIdAsync(commandId); //var command = await _repository.GetByIdAsync(commandId);
if (command == null) //if (command == null)
//{
// throw new Exception(GlobalMessages.CommandNotFound);
//}
var raw_data = await _repository.GetByIdAsync(commandId);
if (raw_data == null)
{ {
throw new Exception(GlobalMessages.CommandNotFound); throw new Exception(GlobalMessages.CommandNotFound);
} }
var command = new
{
CommandNo = raw_data.CommandNo.ToThaiNumber(),
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
IssuerOrganizationName = raw_data.IssuerOrganizationName,
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
};
var data = await _commandReportRepository.GetCommandType05_06AttachmentAsync(commandId); var data = await _commandReportRepository.GetCommandType05_06AttachmentAsync(commandId);
return data; return new
{
CommandNo = command.CommandNo,
CommandYear = command.CommandYear,
IssuerOrganizationName = command.IssuerOrganizationName,
CommandExcecuteDate = command.CommandExcecuteDate,
data = data,
};
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"05-06-แนบท้ายคำสั่งแต่งตั้ง-คำสั่งเลื่อน.trdp"); //var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"05-06-แนบท้ายคำสั่งแต่งตั้ง-คำสั่งเลื่อน.trdp");
//ReportPackager reportPackager = new ReportPackager(); //ReportPackager reportPackager = new ReportPackager();
@ -839,14 +878,33 @@ namespace BMA.EHR.Report.Service.Controllers
{ {
try try
{ {
var command = await _repository.GetByIdAsync(commandId); //var command = await _repository.GetByIdAsync(commandId);
if (command == null) //if (command == null)
//{
// throw new Exception(GlobalMessages.CommandNotFound);
//}
var raw_data = await _repository.GetByIdAsync(commandId);
if (raw_data == null)
{ {
throw new Exception(GlobalMessages.CommandNotFound); throw new Exception(GlobalMessages.CommandNotFound);
} }
var command = new
{
CommandNo = raw_data.CommandNo.ToThaiNumber(),
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
IssuerOrganizationName = raw_data.IssuerOrganizationName,
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
};
var data = await _commandReportRepository.GetCommandType07AttachmentAsync(commandId); var data = await _commandReportRepository.GetCommandType07AttachmentAsync(commandId);
return data; return new
{
CommandNo = command.CommandNo,
CommandYear = command.CommandYear,
IssuerOrganizationName = command.IssuerOrganizationName,
CommandExcecuteDate = command.CommandExcecuteDate,
data = data,
};
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"07-แนบท้ายคำสั่งย้าย.trdp"); //var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"07-แนบท้ายคำสั่งย้าย.trdp");
//ReportPackager reportPackager = new ReportPackager(); //ReportPackager reportPackager = new ReportPackager();
@ -908,7 +966,6 @@ namespace BMA.EHR.Report.Service.Controllers
CommandNo = raw_data.CommandNo.ToThaiNumber(), CommandNo = raw_data.CommandNo.ToThaiNumber(),
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(), CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
IssuerOrganizationName = raw_data.IssuerOrganizationName, IssuerOrganizationName = raw_data.IssuerOrganizationName,
ConclusionRegisterNo = raw_data.ConclusionRegisterNo == null ? "" : raw_data.ConclusionRegisterNo.ToThaiNumber(),
ConclusionRegisterDate = raw_data.ConclusionRegisterDate == null ? "" : raw_data.ConclusionRegisterDate.Value.ToThaiFullDate3().ToThaiNumber(), ConclusionRegisterDate = raw_data.ConclusionRegisterDate == null ? "" : raw_data.ConclusionRegisterDate.Value.ToThaiFullDate3().ToThaiNumber(),
ConclusionResultNo = raw_data.ConclusionResultNo == null ? "" : raw_data.ConclusionResultNo.ToThaiNumber(), ConclusionResultNo = raw_data.ConclusionResultNo == null ? "" : raw_data.ConclusionResultNo.ToThaiNumber(),
ConclusionResultDate = raw_data.ConclusionResultDate == null ? "" : raw_data.ConclusionResultDate.Value.ToThaiFullDate3().ToThaiNumber(), ConclusionResultDate = raw_data.ConclusionResultDate == null ? "" : raw_data.ConclusionResultDate.Value.ToThaiFullDate3().ToThaiNumber(),
@ -960,14 +1017,31 @@ namespace BMA.EHR.Report.Service.Controllers
{ {
try try
{ {
var command = await _repository.GetByIdAsync(commandId); //var command = await _repository.GetByIdAsync(commandId);
if (command == null) //if (command == null)
//{
// throw new Exception(GlobalMessages.CommandNotFound);
//}
var raw_data = await _repository.GetByIdAsync(commandId);
if (raw_data == null)
{ {
throw new Exception(GlobalMessages.CommandNotFound); throw new Exception(GlobalMessages.CommandNotFound);
} }
var command = new
{
CommandNo = raw_data.CommandNo.ToThaiNumber(),
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
IssuerOrganizationName = raw_data.IssuerOrganizationName,
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
};
var data = await _commandReportRepository.GetCommandType08AttachmentAsync(commandId); var data = await _commandReportRepository.GetCommandType08AttachmentAsync(commandId);
return data; return new {
CommandNo = command.CommandNo,
CommandYear = command.CommandYear,
IssuerOrganizationName = command.IssuerOrganizationName,
CommandExcecuteDate = command.CommandExcecuteDate,
data = data,
};
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"08-คำสั่งบรรจุและแต่งตั้งข้าราชการฯกลับเข้ารับราชการ-6.trdp"); //var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"08-คำสั่งบรรจุและแต่งตั้งข้าราชการฯกลับเข้ารับราชการ-6.trdp");
//ReportPackager reportPackager = new ReportPackager(); //ReportPackager reportPackager = new ReportPackager();
@ -1084,14 +1158,32 @@ namespace BMA.EHR.Report.Service.Controllers
{ {
try try
{ {
var command = await _repository.GetByIdAsync(commandId); //var command = await _repository.GetByIdAsync(commandId);
if (command == null) //if (command == null)
//{
// throw new Exception(GlobalMessages.CommandNotFound);
//}
var raw_data = await _repository.GetByIdAsync(commandId);
if (raw_data == null)
{ {
throw new Exception(GlobalMessages.CommandNotFound); throw new Exception(GlobalMessages.CommandNotFound);
} }
var command = new
{
CommandNo = raw_data.CommandNo.ToThaiNumber(),
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
IssuerOrganizationName = raw_data.IssuerOrganizationName,
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
};
var data = await _commandReportRepository.GetCommandType09AttachmentAsync(commandId); var data = await _commandReportRepository.GetCommandType09AttachmentAsync(commandId);
return data; return new
{
CommandNo = command.CommandNo,
CommandYear = command.CommandYear,
IssuerOrganizationName = command.IssuerOrganizationName,
CommandExcecuteDate = command.CommandExcecuteDate,
data = data,
};
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"09-คำสั่งบรรจุและแต่งตั้งผู้ออกไปรับราชการทหารกลับเข้ารับราชการ-8.trdp"); //var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"09-คำสั่งบรรจุและแต่งตั้งผู้ออกไปรับราชการทหารกลับเข้ารับราชการ-8.trdp");
//ReportPackager reportPackager = new ReportPackager(); //ReportPackager reportPackager = new ReportPackager();
@ -1378,14 +1470,32 @@ namespace BMA.EHR.Report.Service.Controllers
{ {
try try
{ {
var command = await _repository.GetByIdAsync(commandId); //var command = await _repository.GetByIdAsync(commandId);
if (command == null) //if (command == null)
//{
// throw new Exception(GlobalMessages.CommandNotFound);
//}
var raw_data = await _repository.GetByIdAsync(commandId);
if (raw_data == null)
{ {
throw new Exception(GlobalMessages.CommandNotFound); throw new Exception(GlobalMessages.CommandNotFound);
} }
var command = new
{
CommandNo = raw_data.CommandNo.ToThaiNumber(),
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
IssuerOrganizationName = raw_data.IssuerOrganizationName,
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
};
var data = await _commandReportRepository.GetCommandType13AttachmentAsync(commandId); var data = await _commandReportRepository.GetCommandType13AttachmentAsync(commandId);
return data; return new
{
CommandNo = command.CommandNo,
CommandYear = command.CommandYear,
IssuerOrganizationName = command.IssuerOrganizationName,
CommandExcecuteDate = command.CommandExcecuteDate,
data = data,
};
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"27-คำสั่งให้โอนข้าราชการกรุงเทพมหานครสามัญ-2.trdp"); //var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"27-คำสั่งให้โอนข้าราชการกรุงเทพมหานครสามัญ-2.trdp");
//ReportPackager reportPackager = new ReportPackager(); //ReportPackager reportPackager = new ReportPackager();
@ -1500,14 +1610,33 @@ namespace BMA.EHR.Report.Service.Controllers
{ {
try try
{ {
var command = await _repository.GetByIdAsync(commandId); //var command = await _repository.GetByIdAsync(commandId);
if (command == null) //if (command == null)
//{
// throw new Exception(GlobalMessages.CommandNotFound);
//}
var raw_data = await _repository.GetByIdAsync(commandId);
if (raw_data == null)
{ {
throw new Exception(GlobalMessages.CommandNotFound); throw new Exception(GlobalMessages.CommandNotFound);
} }
var command = new
{
CommandNo = raw_data.CommandNo.ToThaiNumber(),
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
IssuerOrganizationName = raw_data.IssuerOrganizationName,
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
};
var data = await _commandReportRepository.GetCommandType14AttachmentAsync(commandId); var data = await _commandReportRepository.GetCommandType14AttachmentAsync(commandId);
return data; return new
{
CommandNo = command.CommandNo,
CommandYear = command.CommandYear,
IssuerOrganizationName = command.IssuerOrganizationName,
CommandExcecuteDate = command.CommandExcecuteDate,
data = data,
};
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"28-คำสั่งรับโอนข้าราชการกรุงเทพมหานครสามัญ5-10.trdp"); //var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"28-คำสั่งรับโอนข้าราชการกรุงเทพมหานครสามัญ5-10.trdp");
//ReportPackager reportPackager = new ReportPackager(); //ReportPackager reportPackager = new ReportPackager();
@ -1619,14 +1748,34 @@ namespace BMA.EHR.Report.Service.Controllers
{ {
try try
{ {
var command = await _repository.GetByIdAsync(commandId); //var command = await _repository.GetByIdAsync(commandId);
if (command == null) //if (command == null)
//{
// throw new Exception(GlobalMessages.CommandNotFound);
//}
var raw_data = await _repository.GetByIdAsync(commandId);
if (raw_data == null)
{ {
throw new Exception(GlobalMessages.CommandNotFound); throw new Exception(GlobalMessages.CommandNotFound);
} }
var command = new
{
CommandNo = raw_data.CommandNo.ToThaiNumber(),
CommandYear = raw_data.CommandYear.ToInteger().ToThaiYear().ToString().ToThaiNumber(),
IssuerOrganizationName = raw_data.IssuerOrganizationName,
CommandExcecuteDate = raw_data.CommandExcecuteDate != null ? raw_data.CommandExcecuteDate.Value.ToThaiFullDate3().ToThaiNumber() : "-",
};
var data = await _commandReportRepository.GetCommandType15AttachmentAsync(commandId); var data = await _commandReportRepository.GetCommandType15AttachmentAsync(commandId);
return data; return new
{
CommandNo = command.CommandNo,
CommandYear = command.CommandYear,
IssuerOrganizationName = command.IssuerOrganizationName,
CommandExcecuteDate = command.CommandExcecuteDate,
data = data,
};
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"29-คำสั่งให้ช่วยราชการ-2.trdp"); //var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"29-คำสั่งให้ช่วยราชการ-2.trdp");
//ReportPackager reportPackager = new ReportPackager(); //ReportPackager reportPackager = new ReportPackager();
@ -3079,7 +3228,7 @@ namespace BMA.EHR.Report.Service.Controllers
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}"); //return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
var data = new var data = new
{ {
template = "C-PM-05", template = "C-PM-05-attachment",
reportName = "docx-report", reportName = "docx-report",
data = contentData data = contentData
}; };
@ -3175,7 +3324,7 @@ namespace BMA.EHR.Report.Service.Controllers
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}"); //return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
var data = new var data = new
{ {
template = "C-PM-06", template = "C-PM-06-attachment",
reportName = "docx-report", reportName = "docx-report",
data = contentData data = contentData
}; };
@ -3271,7 +3420,7 @@ namespace BMA.EHR.Report.Service.Controllers
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}"); //return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
var data = new var data = new
{ {
template = "C-PM-07", template = "C-PM-07-attachment",
reportName = "docx-report", reportName = "docx-report",
data = contentData data = contentData
}; };
@ -3367,7 +3516,7 @@ namespace BMA.EHR.Report.Service.Controllers
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}"); //return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
var data = new var data = new
{ {
template = "C-PM-08", template = "C-PM-08-attachment",
reportName = "docx-report", reportName = "docx-report",
data = contentData data = contentData
}; };
@ -3463,7 +3612,7 @@ namespace BMA.EHR.Report.Service.Controllers
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}"); //return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
var data = new var data = new
{ {
//template = "DP6_006", template = "C-PM-09-attachment",
reportName = "docx-report", reportName = "docx-report",
data = contentData data = contentData
}; };
@ -3715,7 +3864,7 @@ namespace BMA.EHR.Report.Service.Controllers
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}"); //return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
var data = new var data = new
{ {
template = "C-PM-13", template = "C-PM-13-attachment",
reportName = "docx-report", reportName = "docx-report",
data = contentData data = contentData
}; };
@ -3811,7 +3960,7 @@ namespace BMA.EHR.Report.Service.Controllers
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}"); //return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
var data = new var data = new
{ {
template = "C-PM-14", template = "C-PM-14-attachment",
reportName = "docx-report", reportName = "docx-report",
data = contentData data = contentData
}; };
@ -3907,7 +4056,7 @@ namespace BMA.EHR.Report.Service.Controllers
//return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}"); //return File(contentData, mimeType, $"command-attachment-{cmd.CommandNo}-{cmd.CommandYear.ToInteger().ToThaiYear()}.{exportType.Trim().ToLower()}");
var data = new var data = new
{ {
template = "C-PM-15", template = "C-PM-15-attachment",
reportName = "docx-report", reportName = "docx-report",
data = contentData data = contentData
}; };