แก้โค้ดรายงาน บช 1 ให้เรียงลำดับ
บช 2-3 แสดงรายชื่อ และการเรียงลำดับ
This commit is contained in:
parent
23b3bdbbd0
commit
2940777197
6 changed files with 780 additions and 485 deletions
|
|
@ -108,7 +108,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
});
|
||||
}
|
||||
|
||||
var items = result_data.OrderBy(x => x.GovernmentCode).ThenBy(x => x.PositionNumberInt).ToList();
|
||||
//var items = result_data.OrderBy(x => x.GovernmentCode).ThenBy(x => x.PositionNumberInt).ToList();
|
||||
|
||||
var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Report", "Organization", $"rptAccount1.trdp");
|
||||
ReportPackager reportPackager = new ReportPackager();
|
||||
|
|
@ -118,7 +118,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
report = (Telerik.Reporting.Report)reportPackager.UnpackageDocument(sourceStream);
|
||||
}
|
||||
|
||||
report.DataSource = items;
|
||||
report.DataSource = result_data;
|
||||
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
|
||||
|
||||
InstanceReportSource instanceReportSource = new InstanceReportSource()
|
||||
|
|
@ -130,7 +130,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
ReportProcessor reportProcessor = new ReportProcessor(_configuration);
|
||||
RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, deviceInfo);
|
||||
|
||||
var first_record = items.FirstOrDefault();
|
||||
var first_record = result_data.FirstOrDefault();
|
||||
|
||||
var content = result.DocumentBytes;
|
||||
return File(content, "application/pdf", $"รายงานบัญชี1_{first_record.RootOcName}_.pdf");
|
||||
|
|
@ -141,17 +141,18 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// รายงานบัญชี 2
|
||||
/// </summary>
|
||||
/// <param name="id">รหัสสำนัก</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อแสดงรายงานสำเร็จ</response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
|
||||
[HttpGet("account2/{id:length(36)}")]
|
||||
/// <summary>
|
||||
/// รายงานบัญชี 2
|
||||
/// </summary>
|
||||
/// <param name="id">รหัสสำนัก</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อแสดงรายงานสำเร็จ</response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
|
||||
[HttpGet("account2/{id:length(36)}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
|
|
@ -211,7 +212,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
}
|
||||
|
||||
|
||||
var items = result_data.OrderBy(x => x.GovernmentCode).ThenBy(x => x.PositionNumberInt).ToList();
|
||||
//var items = result_data.OrderBy(x => x.GovernmentCode).ThenBy(x => x.PositionNumberInt).ToList();
|
||||
|
||||
var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Report", "Organization", $"rptAccount2.trdp");
|
||||
ReportPackager reportPackager = new ReportPackager();
|
||||
|
|
@ -221,7 +222,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
report = (Telerik.Reporting.Report)reportPackager.UnpackageDocument(sourceStream);
|
||||
}
|
||||
|
||||
report.DataSource = items;
|
||||
report.DataSource = result_data;
|
||||
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
|
||||
|
||||
InstanceReportSource instanceReportSource = new InstanceReportSource()
|
||||
|
|
@ -233,7 +234,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
ReportProcessor reportProcessor = new ReportProcessor(_configuration);
|
||||
RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, deviceInfo);
|
||||
|
||||
var first_record = items.FirstOrDefault();
|
||||
var first_record = result_data.FirstOrDefault();
|
||||
|
||||
var content = result.DocumentBytes;
|
||||
return File(content, "application/pdf", $"รายงานบัญชี2_{first_record.RootOcName}_.pdf");
|
||||
|
|
@ -315,7 +316,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
}
|
||||
|
||||
|
||||
var items = result_data.OrderBy(x => x.GovernmentCode).ThenBy(x => x.PositionNumberInt).ToList();
|
||||
//var items = result_data.OrderBy(x => x.GovernmentCode).ThenBy(x => x.PositionNumberInt).ToList();
|
||||
|
||||
var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Report", "Organization", $"rptAccount3.trdp");
|
||||
ReportPackager reportPackager = new ReportPackager();
|
||||
|
|
@ -325,7 +326,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
report = (Telerik.Reporting.Report)reportPackager.UnpackageDocument(sourceStream);
|
||||
}
|
||||
|
||||
report.DataSource = items;
|
||||
report.DataSource = result_data;
|
||||
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
|
||||
|
||||
InstanceReportSource instanceReportSource = new InstanceReportSource()
|
||||
|
|
@ -337,7 +338,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
ReportProcessor reportProcessor = new ReportProcessor(_configuration);
|
||||
RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, deviceInfo);
|
||||
|
||||
var first_record = items.FirstOrDefault();
|
||||
var first_record = result_data.FirstOrDefault();
|
||||
|
||||
var content = result.DocumentBytes;
|
||||
return File(content, "application/pdf", $"รายงานบัญชี3_{first_record.RootOcName}_.pdf");
|
||||
|
|
|
|||
|
|
@ -40,5 +40,7 @@ namespace BMA.EHR.Profile.Service.Models.HR
|
|||
public virtual List<ProfileEducationHistory> ProfileEducationHistorys { get; set; } = new List<ProfileEducationHistory>();
|
||||
public virtual Profile? Profile { get; set; }
|
||||
|
||||
public virtual Guid? ProfileId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,10 @@ namespace BMA.EHR.MetaData.Service.Models
|
|||
[Required, MaxLength(100), Column(Order = 2), Comment("ชื่อย่อระดับตำแหน่ง")]
|
||||
public string ShortName { get; set; } = string.Empty;
|
||||
|
||||
[Column(Order = 3), Comment("สถานะการใช้งาน")]
|
||||
[Column(Order = 3), Comment("ลำดับชั้นของระดับตำแหน่ง")]
|
||||
public int Level { get; set; } = 0;
|
||||
|
||||
[Column(Order = 4), Comment("สถานะการใช้งาน")]
|
||||
public bool IsActive { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue