null fix
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
kamonwan taengsuk
2023-08-29 13:34:47 +07:00
parent 036f9476e0
commit c29c95b2e6
10 changed files with 52 additions and 40 deletions

View File

@@ -19,7 +19,7 @@ namespace rmutr_report.Controllers
public ProjectPrincipleRationale(Setting setting)
{
this._setting = setting;
_setting = setting;
}
[HttpPost, Route("reports/project_principle_rationale/{type}")]
@@ -27,36 +27,42 @@ namespace rmutr_report.Controllers
public IActionResult GetProjectReport([FromRoute] string type, [FromBody] project_principle_rationale project)
{
var total = project.activity.Count;
//var total2 = project.sixteenth.Count;
foreach (var v in project.activity)
if (project.activity != null)
{
if (v.activity != null)
foreach (var v in project.activity)
{
//var total = project.activity.Select(r => r.count).Sum(t => t.Value);
project.together_with = "ประกอบด้วยกิจกรรมหรือโครงการย่อย " + total + " โครงการดังนี้คือ";
}
else
{
project.together_with = null;
if (v.activity != null)
{
//var total = project.activity.Select(r => r.count).Sum(t => t.Value);
project.together_with = "ประกอบด้วยกิจกรรมหรือโครงการย่อย " + total + " โครงการดังนี้คือ";
}
else
{
project.together_with = null;
}
}
}
foreach (var v in project.eighth)
if (project.eighth != null)
{
string na = "ประเด็นยุทธศาสตร์ที่ ";
v.strategic_issues = na + v.strategic_issues;
string na2 = "กลยุทธ์ที่ ";
v.measure = na2 + v.measure;
foreach (var v in project.eighth)
{
string na = "ประเด็นยุทธศาสตร์ที่ ";
v.strategic_issues = na + v.strategic_issues;
string na2 = "กลยุทธ์ที่ ";
v.measure = na2 + v.measure;
}
}
foreach (var vv in project.fourteenth)
if (project.fourteenth != null)
{
// string na = "องค์ประกอบที่ " ;
// vv.component = na + vv.component;
string na2 = "ตัวบ่งชี้ที่ ";
vv.indicator = na2 + vv.indicator;
foreach (var vv in project.fourteenth)
{
// string na = "องค์ประกอบที่ " ;
// vv.component = na + vv.component;
string na2 = "ตัวบ่งชี้ที่ ";
vv.indicator = na2 + vv.indicator;
}
}
if (project.eighteenth != null)
@@ -204,36 +210,42 @@ namespace rmutr_report.Controllers
public IActionResult GetProject2Report([FromRoute] string type, [FromBody] project_principle_rationale project)
{
var total = project.activity.Count;
//var total2 = project.sixteenth.Count;
foreach (var v in project.activity)
if (project.activity != null)
{
if (v.activity != null)
foreach (var v in project.activity)
{
//var total = project.activity.Select(r => r.count).Sum(t => t.Value);
project.together_with = "ประกอบด้วยกิจกรรมหรือโครงการย่อย " + total + " โครงการดังนี้คือ";
}
else
{
project.together_with = null;
if (v.activity != null)
{
//var total = project.activity.Select(r => r.count).Sum(t => t.Value);
project.together_with = "ประกอบด้วยกิจกรรมหรือโครงการย่อย " + total + " โครงการดังนี้คือ";
}
else
{
project.together_with = null;
}
}
}
foreach (var v in project.eighth)
if (project.eighth != null)
{
string na = "ประเด็นยุทธศาสตร์ที่ ";
v.strategic_issues = na + v.strategic_issues;
string na2 = "กลยุทธ์ที่ ";
v.measure = na2 + v.measure;
foreach (var v in project.eighth)
{
string na = "ประเด็นยุทธศาสตร์ที่ ";
v.strategic_issues = na + v.strategic_issues;
string na2 = "กลยุทธ์ที่ ";
v.measure = na2 + v.measure;
}
}
foreach (var vv in project.fourteenth)
if (project.fourteenth != null)
{
foreach (var vv in project.fourteenth)
{
// string na = "องค์ประกอบที่ " ;
// vv.component = na + vv.component;
string na2 = "ตัวบ่งชี้ที่ ";
vv.indicator = na2 + vv.indicator;
}
}
if (project.eighteenth != null)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
16932047384453843
16932907245525519