แก้ ออก คำ สั่ง
This commit is contained in:
parent
e862829246
commit
604b234c4b
15 changed files with 897 additions and 845 deletions
|
|
@ -198,6 +198,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
.Select(p => new
|
||||
{
|
||||
p.Id,
|
||||
p.citizenId,
|
||||
p.profileId,
|
||||
p.prefix,
|
||||
p.firstName,
|
||||
|
|
@ -791,32 +792,32 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportAttachment([FromBody] ReportPersonRequest req)
|
||||
public async Task<ActionResult<ResponseObject>> PostReportAttachment([FromBody] ReportAttachmentRequest req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var report_data = await _context.PlacementTransfers
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.Select(p => new
|
||||
{
|
||||
//Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
//CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
|
||||
//FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
Seq = "",
|
||||
CitizenId = "",
|
||||
FullName = "",
|
||||
Organization = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
|
||||
PositionName = p.PositionOld == null ? "" : p.PositionOld,
|
||||
PositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
|
||||
PositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
|
||||
PositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
|
||||
Salary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
ActiveDate = p.Date == null ? "" : p.Date.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
//ReceiveOrganizationName = r.Command!.ReceiveOrganizationName ?? "",
|
||||
ReceiveOrganizationName = "",
|
||||
Reason = p.Reason ?? ""
|
||||
})
|
||||
.ToListAsync();
|
||||
var report_data = (from p in _context.PlacementTransfers
|
||||
.Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString()))
|
||||
.ToList()
|
||||
join r in req.refIds
|
||||
on p.Id.ToString() equals r.refId
|
||||
orderby r.Sequence
|
||||
select new
|
||||
{
|
||||
Seq = r.Sequence.ToString().ToThaiNumber(),
|
||||
CitizenId = r.CitizenId == null ? "-" : r.CitizenId.ToThaiNumber(),
|
||||
FullName = $"{r.Prefix}{r.FirstName} {r.LastName}",
|
||||
Organization = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld,
|
||||
PositionName = p.PositionOld == null ? "" : p.PositionOld,
|
||||
PositionLevel = p.PositionLevelOld == null ? "" : p.PositionLevelOld,
|
||||
PositionType = p.PositionTypeOld == null ? "" : p.PositionTypeOld,
|
||||
PositionNumber = p.PositionNumberOld == null ? "" : p.PositionNumberOld.ToThaiNumber(),
|
||||
Salary = p.AmountOld == null ? "" : p.AmountOld.Value.ToNumericNoDecimalText().ToThaiNumber(),
|
||||
ActiveDate = p.Date == null ? "" : p.Date.Value.ToThaiShortDate2().ToThaiNumber(),
|
||||
//ReceiveOrganizationName = r.Command!.ReceiveOrganizationName ?? "",
|
||||
ReceiveOrganizationName = "",
|
||||
Reason = p.Reason ?? ""
|
||||
}).ToList();
|
||||
return Success(report_data);
|
||||
}
|
||||
catch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue