feat(agency_report): แสดงข้อ 13.1-13.4 วิสัยทัศน์/ค่านิยม/เอกลักษณ์/อัตลักษณ์ ในรายงาน
continuous-integration/drone/push Build is passing

เดิมรายงานยังผูกกับ checkbox แบบเก่า 7 ตัวเลือก (bool_13_1-7) ที่หน้าเว็บไม่ได้ใช้แล้ว
เปลี่ยนเป็นแสดงชื่อ+ตัวชี้วัดที่เลือกจริงของแต่ละหมวด (รวมข้อความด้วยขึ้นบรรทัดใหม่)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FyqMVwbVZLfTe8QJSmrUjQ
This commit is contained in:
Nut.ไปเรื่อย
2026-09-02 07:27:13 +07:00
parent 1dbec66fb2
commit 3ce12e73fc
3 changed files with 108 additions and 18 deletions
+16
View File
@@ -25,6 +25,13 @@ namespace rmutr_report.Controllers
this._setting = setting; this._setting = setting;
} }
private static string JoinNames(IEnumerable<string> names)
{
return names == null
? ""
: string.Join("\n", names.Where(n => !string.IsNullOrWhiteSpace(n)));
}
[HttpPost, Route("reports/agency_result_report/{type}")] [HttpPost, Route("reports/agency_result_report/{type}")]
[ApiExplorerSettings(GroupName = "reports")] [ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetAgencyReport([FromRoute] string type, [FromBody] List<agency_report> agencyReports) public IActionResult GetAgencyReport([FromRoute] string type, [FromBody] List<agency_report> agencyReports)
@@ -61,6 +68,15 @@ namespace rmutr_report.Controllers
agencyReport.text_25_1 = agencyReport.bool_25_1 == true ? "X" : ""; agencyReport.text_25_1 = agencyReport.bool_25_1 == true ? "X" : "";
agencyReport.text_25_2 = agencyReport.bool_25_2 == true ? "X" : ""; agencyReport.text_25_2 = agencyReport.bool_25_2 == true ? "X" : "";
agencyReport.vision_names_text = JoinNames(agencyReport.agency_report_visions?.Select(c => c.vision_name_th));
agencyReport.vision_indicators_text = JoinNames(agencyReport.agency_report_vision_indicators?.Select(c => c.vision_indicator_name));
agencyReport.popularity_names_text = JoinNames(agencyReport.agency_report_popularities?.Select(c => c.popularity_name_th));
agencyReport.popularity_indicators_text = JoinNames(agencyReport.agency_report_popularity_indicators?.Select(c => c.popularity_indicator_name));
agencyReport.uniqueness_names_text = JoinNames(agencyReport.agency_report_uniquenesses?.Select(c => c.uniqueness_name_th));
agencyReport.uniqueness_indicators_text = JoinNames(agencyReport.agency_report_uniqueness_indicators?.Select(c => c.uniqueness_indicator_name));
agencyReport.identity_names_text = JoinNames(agencyReport.agency_report_identities?.Select(c => c.identity_name_th));
agencyReport.identity_indicators_text = JoinNames(agencyReport.agency_report_identity_indicators?.Select(c => c.identity_indicator_name));
} }
if (_setting == null || string.IsNullOrEmpty(_setting.report_path)) if (_setting == null || string.IsNullOrEmpty(_setting.report_path))
+68
View File
@@ -304,6 +304,74 @@ public class agency_report
public string text_26_4_row_3_3 { get; set; } public string text_26_4_row_3_3 { get; set; }
public bool? is_sent { get; set; } public bool? is_sent { get; set; }
public List<agency_report_detail> agency_report_details { get; set; } public List<agency_report_detail> agency_report_details { get; set; }
// 13. วิสัยทัศน์ /ค่านิยม/เอกลักษณ์ / อัตลักษณ์
public List<agency_report_popularity> agency_report_popularities { get; set; }
public List<agency_report_vision> agency_report_visions { get; set; }
public List<agency_report_uniqueness> agency_report_uniquenesses { get; set; }
public List<agency_report_identity> agency_report_identities { get; set; }
public List<agency_report_vision_indicator> agency_report_vision_indicators { get; set; }
public List<agency_report_uniqueness_indicator> agency_report_uniqueness_indicators { get; set; }
public List<agency_report_identity_indicator> agency_report_identity_indicators { get; set; }
public List<agency_report_popularity_indicator> agency_report_popularity_indicators { get; set; }
// ข้อความรวม (คั่นด้วยขึ้นบรรทัดใหม่) สำหรับแสดงในรายงาน คำนวณใน AgencyReport.Controller.cs
public string vision_names_text { get; set; }
public string vision_indicators_text { get; set; }
public string popularity_names_text { get; set; }
public string popularity_indicators_text { get; set; }
public string uniqueness_names_text { get; set; }
public string uniqueness_indicators_text { get; set; }
public string identity_names_text { get; set; }
public string identity_indicators_text { get; set; }
}
public class agency_report_popularity
{
public Guid? popularity_uid { get; set; }
public string popularity_name_th { get; set; }
}
public class agency_report_vision
{
public Guid? vision_uid { get; set; }
public string vision_name_th { get; set; }
}
public class agency_report_uniqueness
{
public Guid? uniqueness_uid { get; set; }
public string uniqueness_name_th { get; set; }
}
public class agency_report_identity
{
public Guid? identity_uid { get; set; }
public string identity_name_th { get; set; }
}
public class agency_report_vision_indicator
{
public Guid? vision_indicator_uid { get; set; }
public string vision_indicator_name { get; set; }
}
public class agency_report_uniqueness_indicator
{
public Guid? uniqueness_indicator_uid { get; set; }
public string uniqueness_indicator_name { get; set; }
}
public class agency_report_identity_indicator
{
public Guid? identity_indicator_uid { get; set; }
public string identity_indicator_name { get; set; }
}
public class agency_report_popularity_indicator
{
public Guid? popularity_indicator_uid { get; set; }
public string popularity_indicator_name { get; set; }
} }
public class agency_report_detail public class agency_report_detail
+24 -18
View File
@@ -462,27 +462,33 @@
</ReportPage> </ReportPage>
<ReportPage Name="Page4" PaperHeight="300" Watermark.Font="Arial, 60pt"> <ReportPage Name="Page4" PaperHeight="300" Watermark.Font="Arial, 60pt">
<ReportTitleBand Name="ReportTitle1" Width="718.2" Height="37.8"> <ReportTitleBand Name="ReportTitle1" Width="718.2" Height="37.8">
<TextObject Name="Text5" Left="9.45" Width="708.75" Height="28.35" Text="13. ผลการดำเนินโครงการนี้สอดคล้องค่านิยม (D - MOVE UP) ของมหาวิทยาลัยด้านใด" Font="TH Sarabun New, 16pt, style=Bold"/> <TextObject Name="Text5" Left="9.45" Width="708.75" Height="28.35" Text="13. วิสัยทัศน์ /ค่านิยม/เอกลักษณ์ / อัตลักษณ์" Font="TH Sarabun New, 16pt, style=Bold"/>
</ReportTitleBand> </ReportTitleBand>
<DataBand Name="Data4" Top="42.74" Width="718.2" Height="330.75" DataSource="agency_report"> <DataBand Name="Data4" Top="42.74" Width="718.2" Height="510.3" DataSource="agency_report">
<TextObject Name="Text458" Left="75.6" Width="642.6" Height="28.35" Text="Digital innovation (มุ่งสร้างนวัตกรรมดิจิทัลวิถีใหม่)" Font="TH Sarabun New, 16pt"/> <TextObject Name="Text13x1Header" Left="9.45" Top="0" Width="708.75" Height="28.35" Text="13.1 วิสัยทัศน์" Font="TH Sarabun New, 16pt, style=Bold"/>
<TextObject Name="Text459" Left="47.25" Top="3.78" Width="18.9" Height="18.9" Border.Lines="All" Text="[agency_report.text_13_1]" HorzAlign="Center" VertAlign="Center" Font="TH Sarabun New, 16pt"/> <TextObject Name="Text13x1NamesLabel" Left="9.45" Top="28.35" Width="349.65" Height="18.9" Text="ชื่อ" Font="TH Sarabun New, 14pt"/>
<TextObject Name="Text460" Left="75.6" Top="28.35" Width="642.6" Height="28.35" Text="Moral (มีคุณธรรม ศรัทธาหลักธรรมาภิบาล)" Font="TH Sarabun New, 16pt"/> <TextObject Name="Text13x1IndicatorsLabel" Left="368.55" Top="28.35" Width="349.65" Height="18.9" Text="ตัวชี้วัด" Font="TH Sarabun New, 14pt"/>
<TextObject Name="Text461" Left="47.25" Top="32.13" Width="18.9" Height="18.9" Border.Lines="All" Text="[agency_report.text_13_2]" HorzAlign="Center" VertAlign="Center" Font="TH Sarabun New, 16pt"/> <TextObject Name="Text13x1Names" Left="9.45" Top="47.25" Width="349.65" Height="56.7" Text="[agency_report.vision_names_text]" Font="TH Sarabun New, 16pt" Clip="false"/>
<TextObject Name="Text462" Left="75.6" Top="56.7" Width="642.6" Height="28.35" Text="Open mind (ใจเปิดกว้างในการเรียนรู้ตลอดชีวิต)" Font="TH Sarabun New, 16pt"/> <TextObject Name="Text13x1Indicators" Left="368.55" Top="47.25" Width="349.65" Height="56.7" Text="[agency_report.vision_indicators_text]" Font="TH Sarabun New, 16pt" Clip="false"/>
<TextObject Name="Text463" Left="47.25" Top="60.48" Width="18.9" Height="18.9" Border.Lines="All" Text="[agency_report.text_13_3]" HorzAlign="Center" VertAlign="Center" Font="TH Sarabun New, 16pt"/> <TextObject Name="Text13x2Header" Left="9.45" Top="103.95" Width="708.75" Height="28.35" Text="13.2 ค่านิยม" Font="TH Sarabun New, 16pt, style=Bold"/>
<TextObject Name="Text464" Left="75.6" Top="85.05" Width="642.6" Height="28.35" Text="Value (สอนสร้างเสริมเพิ่มคุณค่า)" Font="TH Sarabun New, 16pt"/> <TextObject Name="Text13x2NamesLabel" Left="9.45" Top="132.3" Width="349.65" Height="18.9" Text="ชื่อ" Font="TH Sarabun New, 14pt"/>
<TextObject Name="Text465" Left="47.25" Top="88.83" Width="18.9" Height="18.9" Border.Lines="All" Text="[agency_report.text_13_4]" HorzAlign="Center" VertAlign="Center" Font="TH Sarabun New, 16pt"/> <TextObject Name="Text13x2IndicatorsLabel" Left="368.55" Top="132.3" Width="349.65" Height="18.9" Text="ตัวชี้วัด" Font="TH Sarabun New, 14pt"/>
<TextObject Name="Text466" Left="75.6" Top="113.4" Width="642.6" Height="28.35" Text="Eentrepreneurship (สำนึกความเป็นผู้ประกอบการ)" Font="TH Sarabun New, 16pt"/> <TextObject Name="Text13x2Names" Left="9.45" Top="151.2" Width="349.65" Height="56.7" Text="[agency_report.popularity_names_text]" Font="TH Sarabun New, 16pt" Clip="false"/>
<TextObject Name="Text467" Left="47.25" Top="117.18" Width="18.9" Height="18.9" Border.Lines="All" Text="[agency_report.text_13_5]" HorzAlign="Center" VertAlign="Center" Font="TH Sarabun New, 16pt"/> <TextObject Name="Text13x2Indicators" Left="368.55" Top="151.2" Width="349.65" Height="56.7" Text="[agency_report.popularity_indicators_text]" Font="TH Sarabun New, 16pt" Clip="false"/>
<TextObject Name="Text468" Left="75.6" Top="141.75" Width="642.6" Height="28.35" Text="Unity (สมัครสมานสามัคคี)" Font="TH Sarabun New, 16pt"/>
<TextObject Name="Text469" Left="47.25" Top="145.53" Width="18.9" Height="18.9" Border.Lines="All" Text="[agency_report.text_13_6]" HorzAlign="Center" VertAlign="Center" Font="TH Sarabun New, 16pt"/>
<TextObject Name="Text470" Left="75.6" Top="170.1" Width="642.6" Height="28.35" Text="Porfessional (มืออาชีพ ประสิทธิภาพดีมีวินัยและจรรยาบรรณ)" Font="TH Sarabun New, 16pt"/>
<TextObject Name="Text471" Left="47.25" Top="173.88" Width="18.9" Height="18.9" Border.Lines="All" Text="[agency_report.text_13_7]" HorzAlign="Center" VertAlign="Center" Font="TH Sarabun New, 16pt"/>
<TextObject Name="Text472" Left="9.45" Top="207.9" Width="396.9" Height="28.35" Text="สามารถนำไปพัฒนาอย่างไร " Font="TH Sarabun New, 16pt"/> <TextObject Name="Text472" Left="9.45" Top="207.9" Width="396.9" Height="28.35" Text="สามารถนำไปพัฒนาอย่างไร " Font="TH Sarabun New, 16pt"/>
<TextObject Name="Text473" Left="9.45" Top="236.25" Width="708.75" Height="66.15" Text="[agency_report.text_13_remark]" Font="TH Sarabun New, 16pt" Clip="false"/> <TextObject Name="Text473" Left="9.45" Top="236.25" Width="708.75" Height="66.15" Text="[agency_report.text_13_remark]" Font="TH Sarabun New, 16pt" Clip="false"/>
<TextObject Name="Text474" Left="9.45" Top="302.4" Width="708.75" Height="28.35" Text="14.1 ตัวชี้วัดผลสัมฤทธิ์" Font="TH Sarabun New, 16pt, style=Bold"/> <TextObject Name="Text13x3Header" Left="9.45" Top="302.4" Width="708.75" Height="28.35" Text="13.3 เอกลักษณ์" Font="TH Sarabun New, 16pt, style=Bold"/>
<DataBand Name="Data6" Top="378.43" Width="718.2" Height="28.35" DataSource="agency_report_details"> <TextObject Name="Text13x3NamesLabel" Left="9.45" Top="330.75" Width="349.65" Height="18.9" Text="ชื่อ" Font="TH Sarabun New, 14pt"/>
<TextObject Name="Text13x3IndicatorsLabel" Left="368.55" Top="330.75" Width="349.65" Height="18.9" Text="ตัวชี้วัด" Font="TH Sarabun New, 14pt"/>
<TextObject Name="Text13x3Names" Left="9.45" Top="349.65" Width="349.65" Height="56.7" Text="[agency_report.uniqueness_names_text]" Font="TH Sarabun New, 16pt" Clip="false"/>
<TextObject Name="Text13x3Indicators" Left="368.55" Top="349.65" Width="349.65" Height="56.7" Text="[agency_report.uniqueness_indicators_text]" Font="TH Sarabun New, 16pt" Clip="false"/>
<TextObject Name="Text13x4Header" Left="9.45" Top="406.35" Width="708.75" Height="28.35" Text="13.4 อัตลักษณ์" Font="TH Sarabun New, 16pt, style=Bold"/>
<TextObject Name="Text13x4NamesLabel" Left="9.45" Top="434.7" Width="349.65" Height="18.9" Text="ชื่อ" Font="TH Sarabun New, 14pt"/>
<TextObject Name="Text13x4IndicatorsLabel" Left="368.55" Top="434.7" Width="349.65" Height="18.9" Text="ตัวชี้วัด" Font="TH Sarabun New, 14pt"/>
<TextObject Name="Text13x4Names" Left="9.45" Top="453.6" Width="349.65" Height="56.7" Text="[agency_report.identity_names_text]" Font="TH Sarabun New, 16pt" Clip="false"/>
<TextObject Name="Text13x4Indicators" Left="368.55" Top="453.6" Width="349.65" Height="56.7" Text="[agency_report.identity_indicators_text]" Font="TH Sarabun New, 16pt" Clip="false"/>
<TextObject Name="Text474" Left="9.45" Top="510.3" Width="708.75" Height="28.35" Text="14.1 ตัวชี้วัดผลสัมฤทธิ์" Font="TH Sarabun New, 16pt, style=Bold"/>
<DataBand Name="Data6" Top="538.65" Width="718.2" Height="28.35" DataSource="agency_report_details">
<TextObject Name="Text476" Left="9.45" Width="708.75" Height="28.35" Text="[agency_report.agency_report_details.text_1]" Font="TH Sarabun New, 16pt" Clip="false"/> <TextObject Name="Text476" Left="9.45" Width="708.75" Height="28.35" Text="[agency_report.agency_report_details.text_1]" Font="TH Sarabun New, 16pt" Clip="false"/>
</DataBand> </DataBand>
</DataBand> </DataBand>