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