bug fixed
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
kamonwan taengsuk
2023-11-21 16:13:10 +07:00
parent f7cd049397
commit b2820e7ac7
29 changed files with 585 additions and 1535 deletions

View File

@@ -168,15 +168,38 @@ namespace rmutr_report.Controllers
[SwaggerOperation("รายงานค่าสอนพิเศษ")]
[HttpPost, Route("reports/teaching_fee_extra_ro_three/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetTeachExReport([FromRoute] string type, [FromBody] teaching_fee_ro_three three)
public IActionResult GetTeachExReport([FromRoute] string type, [FromBody] teaching_fee_extra_ro_three three)
{
var s = three.data.ToList();
int r = 1;
foreach (var d in three.data)
{
d.row_no = r.ToString();
r++;
d.total = d.month_1 + d.month_2 + d.month_3 + d.month_4 + d.month_5 + d.month_6 + d.month_7 +
d.month_8 + d.month_9 +
d.month_10 + d.month_11 + d.month_12;
var threes = new List<teaching_fee_ro_three>() { three };
}
three.month_1 = three.data.Sum(d => d.month_1);
three.month_2 = three.data.Sum(d => d.month_2);
three.month_3 = three.data.Sum(d => d.month_3);
three.month_4= three.data.Sum(d => d.month_4);
three.month_5 = three.data.Sum(d => d.month_5);
three.month_6 = three.data.Sum(d => d.month_6);
three.month_7 = three.data.Sum(d => d.month_7);
three.month_8 = three.data.Sum(d => d.month_8);
three.month_9 = three.data.Sum(d => d.month_9);
three.month_10 = three.data.Sum(d => d.month_10);
three.month_11 = three.data.Sum(d => d.month_11);
three.month_12 = three.data.Sum(d => d.month_12);
three.total = s.Sum(d=>d.total);
var threes = new List<teaching_fee_extra_ro_three>() { three };
Report report = new Report();
report.Load(_setting.report_path + "teaching_fee_extra.frx");
report.RegisterData(threes, "teaching_fee_ro_three");
report.RegisterData(threes, "teaching_fee_extra_ro_three");
report.Prepare();
MemoryStream stream = new MemoryStream();
@@ -215,7 +238,12 @@ namespace rmutr_report.Controllers
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetTeachReport([FromRoute] string type, [FromBody] teaching_fee_ro_three three)
{
// three.table_1_ba_2 = three.data.Sum(d => d.number_of_hours_ba_2);
// three.table_1_ma_2 = three.data.Sum(d => d.number_of_hours_ma_2);
// three.table_1_teaching_fee_1 = three.data.Sum(d => d.teaching_fee_1);
// three.table_1_teaching_fee_2 = three.data.Sum(d => d.teaching_fee_2);
// three.table_1_total = three.data.Sum(d => d.total);
var threes = new List<teaching_fee_ro_three>() { three };
@@ -260,7 +288,15 @@ namespace rmutr_report.Controllers
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetTeachWorkloadReport([FromRoute] string type, [FromBody] teaching_fee_ro_three three)
{
// three.table_1_ba_1 = three.data.Sum(d => d.number_of_hours_ba_1);
// three.table_1_ma_1 = three.data.Sum(d => d.number_of_hours_ma_1);
// three.table_1_ba_2 = three.data.Sum(d => d.number_of_hours_ba_2);
// three.table_1_ma_2 = three.data.Sum(d => d.number_of_hours_ma_2);
// three.table_1_ba_3 = three.data.Sum(d => d.number_of_hours_ba_3);
// three.table_1_ma_3 = three.data.Sum(d => d.number_of_hours_ma_3);
// three.table_1_teaching_fee_1 = three.data.Sum(d => d.teaching_fee_1);
// three.table_1_teaching_fee_2 = three.data.Sum(d => d.teaching_fee_2);
// three.table_1_total = three.data.Sum(d => d.total);
var threes = new List<teaching_fee_ro_three>() { three };