269 Commits

Author SHA1 Message Date
Nut.ไปเรื่อย ab319d5a59 fix(form_1_2): truncate at last word boundary instead of mid-word
continuous-integration/drone/push Build is passing
Replaced the inline Substring-based truncation (which cut mid-word,
e.g. "...เนื่องจากป") with a TruncateAtWord() helper in the report's
ScriptText that backs off to the last space before the length limit
when one exists, falling back to a hard cut only when the text has no
spaces at all within that range (common in run-on Thai text).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 20:37:09 +07:00
Nut.ไปเรื่อย ff353b65f9 fix(form_1_2): cap reason/workload text length to prevent page overflow
continuous-integration/drone/push Build is passing
FastReport doesn't support splitting a single growing text object
mid-paragraph across multiple physical pages — an oversized field
just clips at the page boundary instead of flowing to a new page.
Capped the free-text fields most prone to this (reason, old/new
workload) at 200-300 characters with a "..." suffix when truncated,
so pathologically long input degrades gracefully instead of clipping
mid-sentence or overlapping following content.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 18:50:07 +07:00
Nut.ไปเรื่อย 2aa1e455e8 fix(form_1_2): keep checklist in same band as reason text so it grows correctly
continuous-integration/drone/push Build is passing
Data1b (the checklist section) was a separate sibling band positioned
right after P1PositionsList. FastReport's CanGrow only reliably shifts
down objects within the SAME band — a long reason text growing past
its declared box didn't push the next sibling band down with it,
causing visible overlap. Merged the checklist into P1PositionsList so
everything shares one growable band.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 18:39:17 +07:00
Nut.ไปเรื่อย 7ba816ca90 fix(form_1_2): pull "โดยมีเหตุผลและความจำเป็นดังนี้" from per-position reason
continuous-integration/drone/push Build is passing
overall_reason is never populated on this record (or apparently any
real one) — the actual "เหตุผลความจำเป็น" data users fill in on the web
form lives on form_1_2_positions.reason (the same field already shown
on page 2). Moved the heading+value into the position-list band so it
reads from there instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 18:20:52 +07:00
Nut.ไปเรื่อย bd567443fd fix(form_1_2): move position list right after สังกัด งาน, per sample
continuous-integration/drone/push Build is passing
Split the page-1 band into Data1a (header through สังกัด งาน + the
list heading) and Data1b (เหตุผล.../checklist), with the repeating
position list band in between — matching the reference form's actual
ordering instead of pushing the list to the bottom of the page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 13:48:00 +07:00
Nut.ไปเรื่อย 932eb26791 fix(form_1_2): keep page 1's position summary on the same physical page
continuous-integration/drone/push Build is passing
Data1's declared Height (1000) consumed nearly the whole A4 page,
pushing the sibling P1PositionsList band onto its own extra page.
Trimmed to 810 (just past the last real content) so both bands share
page 1 as intended. Also widened the "ที่ อว 0653." label — it was
being clipped at the old narrow width.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 13:37:36 +07:00
Nut.ไปเรื่อย 62fbf99073 feat(form_1_2): add New2570 fields to local model, fix report template
continuous-integration/drone/push Build is passing
Two fixes needed together to make the new 3-page เอกสารแนบ ร.1 template
actually render:

1. rmutr_report keeps its own separate copy of the form_1_2 C# model
   (Models/RoReport/form_1_2.cs), which never got the New2570-spec
   fields (division_name, request_count, overall_reason, signer_*,
   approver_*) or the form_1_2_positions child list that rmutr-api's
   model already has. FastReport's RegisterData binds by reflecting
   the actual runtime object, so any Dictionary column not present on
   this local class silently fails to compile ("does not exist in
   current context") for every field on it.

2. Nested BusinessObjectDataSource fields must be referenced by their
   full dotted path from the report root ([form_1_2.form_1_2_positions.
   field]), not the bare child name ([form_1_2_positions.field]) —
   confirmed against another working report (academic_position.frx)
   in this same codebase that uses the identical nesting pattern
   correctly.

Verified locally: report now compiles and reaches PDF export (the
only remaining local failure is a NullReferenceException in libgdiplus
font handling specific to this macOS dev machine, unrelated to the
report itself — production runs Linux where this already works for
every other report using TH Sarabun New).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 13:32:39 +07:00
Nut.ไปเรื่อย 9292bc2782 feat(form_1_2): rebuild report as 3-page เอกสารแนบ ร.1 attachment form
continuous-integration/drone/push Build is passing
Replaces the old 1-page บันทึกข้อความ memo layout (which didn't match
the actual paper form used) with the real 3-page แนบ ร.1 attachment:
page 1 summary + position list, page 2 old/new position detail table
(repeats once per position via form_1_2_positions, one A4 sheet per
อัตรา), page 3 signatures + หัวหน้าหน่วยงาน decision. All blanks bound
to existing form_1_2 / form_1_2_positions fields (no new backend
fields needed — the New2570 spec fields were already there, just
never wired into a template).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 13:12:20 +07:00
Nut.ไปเรื่อย 540130f52c fix(form_1_2): guard null date/start_working before .Value to prevent 500
continuous-integration/drone/push Build is passing
GetForm2Report ("ร1. แบบฟอร์มเสนอขอปรับเปลี่ยนชื่อตำแหน่ง") called
.Value on nullable DateTime fields unconditionally, crashing with
InvalidOperationException whenever a record's date or start_working
was null — exactly what happened for form_1_2_uid
377a46dc-7131-4b58-ac7e-c9b54900ac34 (date is null in production).
Mirrors the null-check pattern the sibling GetForm3Report already
uses for the same kind of field.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
2026-09-08 12:48:44 +07:00
Nut.ไปเรื่อย 3ce12e73fc 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
2026-09-02 07:27:13 +07:00
Nut.ไปเรื่อย 1dbec66fb2 style(kpi-finance): use colored / emoji for บรรลุ/ไม่บรรลุ
continuous-integration/drone/push Build is passing
Requested a rounder icon-badge look closer to a reference screenshot;
color glyph emoji render that way natively in Excel without needing
manual font-color styling (which colored ✓/✗ can't fully replicate).
2026-09-01 15:50:39 +07:00
Nut.ไปเรื่อย 413f141593 style(kpi-finance): make the บรรลุ/ไม่บรรลุ mark bolder and colored
continuous-integration/drone/push Build is passing
Was a plain black "√"/"X" at the same 16pt as the rest of the row.
Now: green ✓ (#2E7D32) for achieved, red ✗ (#C62828) for not achieved,
bold, 20pt.
2026-09-01 15:41:43 +07:00
Nut.ไปเรื่อย 400f0dbfd1 chore: retrigger CI (webhook missed previous push)
continuous-integration/drone/push Build is passing
2026-09-01 12:16:25 +07:00
Nut.ไปเรื่อย ebb67d536f style(kpi): change strategic-issue header band color to #CAD1EB
Was XLColor.PurpleX11; requested lighter blue-purple for the
kpi_performance_result Excel export section header bars.
2026-09-01 12:10:46 +07:00
Nut.ไปเรื่อย 966d34d1fe fix(kpi): don't number vision/values/uniqueness/identity as strategic issues
continuous-integration/drone/push Build is passing
Add is_reference_section flag to header_data/detail_kpi_data so the
kpi_performance_result and detail_kpi Excel exports render the 4
reference-indicator sections (วิสัยทัศน์/ค่านิยม/เอกลักษณ์/อัตลักษณ์)
with their bare category name instead of a "ประเด็นยุทธ์ศาสตร์ที่ N"
prefix, and skip them in the real strategic-issue numbering.
2026-08-31 15:34:23 +07:00
Nut.ไปเรื่อย 076f8ed4d7 fix(kpi): move vision/values/uniqueness/identity sections above the strategic indicator table
continuous-integration/drone/push Build is passing
Matches the field order on the budget policy form itself, where these
4 categories are entered before ประเด็นยุทธศาสตร์/เป้าหมายหลัก/ตัวชี้วัดกลยุทธ์.
2026-08-27 11:20:40 +07:00
Nut.ไปเรื่อย bbfcaa088e feat(kpi): render vision/values/uniqueness/identity indicator sections in budget policy Excel export
continuous-integration/drone/push Build is passing
Mirrors the existing indicator table layout for the 4 new reference
sections coming from rmutr-api (unit, target value, 3 responsible-role
columns), reusing the same 8-column styling as the strategic indicators.
2026-08-26 19:15:26 +07:00
Nut.ไปเรื่อย e2fcd26b8f feat: emit live Excel formulas for operating-expense subtotal rows
continuous-integration/drone/push Build is passing
Switch the xls/xlsx export in GetExpensesReport from FastReport's
Excel2007Export (which always writes static numbers) to a ClosedXML-
built workbook, so subtotal/header rows get real =SUM-style FormulaA1
formulas instead of pre-computed values. Row hierarchy is inferred
generically from the "no" field's dot-depth and the expenditure_budget
indentation prefix, so it works for any request, not just one record.
pdf/doc export still uses the FastReport .frx template, unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LvxSgUzvZcd4mXfDWGssxm
2026-08-26 12:04:26 +07:00
Nut.ไปเรื่อย ec4b99f53e feat: emit live Excel formulas for ร.15 revenue-estimate semester rows
continuous-integration/drone/push Build is passing
Replace static computed values for F/H/J/L/N/P/R with FormulaA1 cell
formulas (=B-D, =(F*10)/100, etc.) so the exported report is auditable
and recalculates in Excel, matching a reference ร15.xlsx. P/R now use
the per-row contribution/framework percent passed from rmutr-api
instead of a fixed 40%.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhYYmBPw4LhYXoDnTNz2xV
2026-08-05 11:27:28 +07:00
kamonwan taengsuk d9bc1f742f fix(durable_articles_three): add subject field to model
continuous-integration/drone/push Build is passing
FRX template references [durable_articles_three.subject] but the
model was missing the property, causing FastReport binding to fail
and the report endpoint to return 500.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 20:54:10 +07:00
kamonwan taengsuk 65303d336b feat(durable_articles_three): add ชื่อเรื่อง row under ผลผลิต
continuous-integration/drone/push Build is passing
Bind to durable_articles_three.subject and shift the following
elements (รายการครุภัณฑ์ header, data band, footer, summary band)
down by 28.35 to make room.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 18:16:00 +07:00
Nut.ไปเรื่อย a9172dd5ef Add Excel SUM formulas for header rows in equipment five-year report
continuous-integration/drone/push Build is passing
Replace hardcoded aggregated values with Excel SUM formulas at each
hierarchy level: พื้นที่ (area) sums detail rows, คณะ (faculty) sums
area rows, ผลผลิต (output) sums faculty rows, แผนงาน (plan) sums
output rows — for columns I-M (price_1 through price_5).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 11:24:07 +07:00
kamonwan taengsuk b896c28643 update font report
continuous-integration/drone/push Build is passing
2026-02-04 16:52:10 +07:00
kamonwan taengsuk c4371d9265 update font report
continuous-integration/drone/push Build is passing
2026-02-04 16:47:37 +07:00
kamonwan taengsuk 910cb84b09 Bug Fixed
continuous-integration/drone/push Build is passing
2025-08-06 16:16:44 +07:00
kamonwan taengsuk 5f3b98cb74 Bug Fixed
continuous-integration/drone/push Build is passing
2025-08-06 13:44:42 +07:00
kamonwan taengsuk 965469e1df Bug Fixed
continuous-integration/drone/push Build is passing
2025-08-06 13:40:31 +07:00
kamonwan taengsuk 6cf455d37b upgrade .net
continuous-integration/drone/push Build is passing
2025-08-06 13:17:28 +07:00
kamonwan taengsuk cf506ae3f9 Fix color
continuous-integration/drone/push Build is passing
2025-06-30 14:00:10 +07:00
kamonwan taengsuk 5d4509b121 Fix color
continuous-integration/drone/push Build is passing
2025-06-30 13:22:35 +07:00
kamonwan taengsuk 266fd83299 Bug Fixed
continuous-integration/drone/push Build is passing
2025-06-19 14:19:31 +07:00
kamonwan taengsuk d18005c6c5 Fix color 2025-06-19 14:15:30 +07:00
kamonwan taengsuk 667609ce73 Fix color
continuous-integration/drone/push Build is passing
2025-06-19 11:17:56 +07:00
kamonwan taengsuk b99b6fbfed Bug Fixed
continuous-integration/drone/push Build is passing
2025-06-16 11:59:40 +07:00
kamonwan taengsuk 1fecc2fb9c Bug Fixed
continuous-integration/drone/push Build is passing
2025-05-28 16:24:55 +07:00
kamonwan taengsuk 208c13e0c3 Bug Fixed
continuous-integration/drone/push Build is passing
2025-05-07 13:32:10 +07:00
kamonwan taengsuk 90e53f8d31 Bug Fixed
continuous-integration/drone/push Build is passing
2025-05-07 13:03:52 +07:00
kamonwan taengsuk 122d54d871 Bug Fixed
continuous-integration/drone/push Build is passing
2025-04-11 14:05:32 +07:00
kamonwan taengsuk f1d1c166bf Bug Fixed
continuous-integration/drone/push Build is passing
2025-03-20 11:57:56 +07:00
kamonwan taengsuk a598c9dbee Bug Fixed
continuous-integration/drone/push Build is passing
2025-03-19 16:23:26 +07:00
kamonwan taengsuk ab9de38b48 Bug Fixed 2025-03-19 16:15:25 +07:00
kamonwan taengsuk 5e9cdba67a Bug Fixed 2025-03-19 16:11:43 +07:00
kamonwan taengsuk 335c760260 Bug Fixed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
2025-03-19 16:02:28 +07:00
kamonwan taengsuk fc127f2ab6 Bug Fixed
continuous-integration/drone/push Build is passing
2025-03-01 14:12:56 +07:00
kamonwan taengsuk c5e56063e2 Bug Fixed
continuous-integration/drone/push Build is passing
2025-02-25 19:09:42 +07:00
kamonwan taengsuk a4b9c896dd Bug Fixed
continuous-integration/drone/push Build is passing
2025-02-21 21:27:34 +07:00
kamonwan taengsuk 5d2d463a8c Bug Fixed
continuous-integration/drone/push Build is passing
2025-02-21 14:46:51 +07:00
kamonwan taengsuk 731803e190 Add สงป 301
continuous-integration/drone/push Build is passing
2025-02-20 11:59:31 +07:00
kamonwan taengsuk 12da4e1939 Bug Fixed
continuous-integration/drone/push Build is passing
2025-02-05 18:07:29 +07:00
kamonwan taengsuk a49490890e Bug Fixed
continuous-integration/drone/push Build is passing
2025-02-05 17:55:31 +07:00
kamonwan taengsuk 5abb0843e4 Fix Report
continuous-integration/drone/push Build is passing
2025-01-27 12:01:44 +07:00
kamonwan taengsuk 9a4f0e95ea Change Name Report
continuous-integration/drone/push Build is passing
2025-01-27 11:49:16 +07:00
kamonwan taengsuk c0f203eef8 Add Report
continuous-integration/drone/push Build is passing
2025-01-27 11:11:12 +07:00
kamonwan taengsuk 91cff19bff fix color font frx
continuous-integration/drone/push Build is passing
2024-11-25 19:03:41 +07:00
kamonwan taengsuk e298ba30cb add color font frx
continuous-integration/drone/push Build is passing
2024-11-25 17:32:27 +07:00
kamonwan taengsuk 2aa5821fff edit format excel
continuous-integration/drone/push Build is passing
2024-10-04 13:18:29 +07:00
kamonwan taengsuk ca8e2cd529 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-25 11:02:59 +07:00
kamonwan taengsuk 5587ae4b01 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-24 12:14:12 +07:00
kamonwan taengsuk 70b81462ed Add ง4 v_1
continuous-integration/drone/push Build is passing
2024-09-24 11:07:23 +07:00
kamonwan taengsuk ad34df712d Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-19 20:02:56 +07:00
kamonwan taengsuk e935842a13 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-19 19:44:45 +07:00
kamonwan taengsuk 30d76230dd Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-19 19:29:12 +07:00
kamonwan taengsuk 20eeb0f51a Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-19 19:21:00 +07:00
kamonwan taengsuk 767cd57cb5 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-19 18:25:53 +07:00
kamonwan taengsuk 62b89761e4 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-19 16:30:47 +07:00
kamonwan taengsuk 5c4bae857b Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-19 14:36:18 +07:00
kamonwan taengsuk 7a8a09e336 Update
continuous-integration/drone/push Build is passing
2024-09-19 14:22:51 +07:00
kamonwan taengsuk 106a978269 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-19 13:09:51 +07:00
kamonwan taengsuk ad0b43ca48 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-18 17:48:56 +07:00
kamonwan taengsuk d3ca59bb68 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-18 14:35:21 +07:00
kamonwan taengsuk 090cfeecc7 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-18 14:17:37 +07:00
kamonwan taengsuk 455baf90de Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-18 12:24:09 +07:00
kamonwan taengsuk 8e237bbb5b Resize text
continuous-integration/drone/push Build is passing
2024-09-18 12:16:42 +07:00
kamonwan taengsuk 84e8167aca Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-18 11:21:27 +07:00
kamonwan taengsuk 270216d8d7 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-18 11:04:45 +07:00
kamonwan taengsuk 41fa5d1398 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-17 16:09:59 +07:00
kamonwan taengsuk f26091d1c7 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-17 16:02:39 +07:00
kamonwan taengsuk 438286ba8b Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-04 15:27:55 +07:00
kamonwan taengsuk fe5bea66d7 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-04 14:20:02 +07:00
kamonwan taengsuk b009389dc0 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-04 12:37:45 +07:00
kamonwan taengsuk ed25cb4cc4 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-04 12:17:58 +07:00
kamonwan taengsuk 6c1f04df78 Bug Fixed
continuous-integration/drone/push Build is passing
2024-09-04 11:44:03 +07:00
kamonwan taengsuk 6e62fa7286 Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-30 11:18:04 +07:00
kamonwan taengsuk 47d0145272 Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-30 10:45:51 +07:00
kamonwan taengsuk f3c022b8fb WrapText
continuous-integration/drone/push Build is passing
2024-08-29 18:30:39 +07:00
kamonwan taengsuk fa07e5428e Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-29 16:15:00 +07:00
kamonwan taengsuk 053e87d51f Resize Font
continuous-integration/drone/push Build is passing
2024-08-29 16:03:50 +07:00
kamonwan taengsuk d36bb505e0 Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-29 15:24:57 +07:00
kamonwan taengsuk e9e51a0dfc Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-29 15:15:39 +07:00
kamonwan taengsuk 62e9bfb30a Add invest
continuous-integration/drone/push Build is passing
2024-08-29 13:20:38 +07:00
kamonwan taengsuk da8805020d Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-29 09:50:31 +07:00
kamonwan taengsuk e2a3977734 Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-28 19:46:08 +07:00
kamonwan taengsuk fcb163b058 Update
continuous-integration/drone/push Build is passing
2024-08-28 19:34:20 +07:00
kamonwan taengsuk e3335ae91e Update
continuous-integration/drone/push Build is passing
2024-08-28 17:07:57 +07:00
kamonwan taengsuk 9c37d45f5c Set UnlimitedHeight
continuous-integration/drone/push Build is passing
2024-08-28 11:07:43 +07:00
kamonwan taengsuk 7e05f00fd3 Resize A4
continuous-integration/drone/push Build is passing
2024-08-27 13:30:20 +07:00
kamonwan taengsuk 3334b4cb0b Update
continuous-integration/drone/push Build is passing
2024-08-26 19:45:07 +07:00
kamonwan taengsuk 8e90a5c766 Resize A4
continuous-integration/drone/push Build is passing
2024-08-26 12:03:02 +07:00
kamonwan taengsuk 8f6a0b8c14 Resize A4
continuous-integration/drone/push Build is passing
2024-08-26 11:36:58 +07:00
kamonwan taengsuk 3680fa2e1f Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-26 09:02:45 +07:00
kamonwan taengsuk 9f3a5950c6 Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-23 20:13:50 +07:00
kamonwan taengsuk a58f124c5e Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-23 13:33:24 +07:00
kamonwan taengsuk 7137b4f2c2 Remove code
continuous-integration/drone/push Build is passing
2024-08-22 14:52:15 +07:00
kamonwan taengsuk 28053412e7 Update
continuous-integration/drone/push Build is passing
2024-08-20 19:01:05 +07:00
kamonwan taengsuk be50663796 Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-20 17:28:12 +07:00
kamonwan taengsuk e889c93e21 Update
continuous-integration/drone/push Build is passing
2024-08-20 17:07:20 +07:00
kamonwan taengsuk ad7e631bf7 Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-20 16:28:44 +07:00
kamonwan taengsuk f307b01f57 Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-20 16:17:15 +07:00
kamonwan taengsuk 1301ecaeca Update
continuous-integration/drone/push Build is passing
2024-08-20 14:17:25 +07:00
kamonwan taengsuk db320cf03d Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-14 16:57:32 +07:00
kamonwan taengsuk 6d258f2639 Bug Fixed
continuous-integration/drone/push Build is passing
2024-08-14 16:49:07 +07:00
kamonwan taengsuk a1f853b870 Update
continuous-integration/drone/push Build is passing
2024-08-07 17:30:09 +07:00
kamonwan taengsuk 14cf3e4081 ๊Update
continuous-integration/drone/push Build is passing
2024-06-18 18:45:05 +07:00
kamonwan taengsuk 0a4fd17b65 Update
continuous-integration/drone/push Build is passing
2024-06-17 11:32:58 +07:00
kamonwan taengsuk 3094fae4b7 Bug Fixed
continuous-integration/drone/push Build is passing
2024-03-19 11:13:31 +07:00
kamonwan taengsuk 989c7f9035 Bug Fixed
continuous-integration/drone/push Build is passing
2024-03-12 11:18:07 +07:00
kamonwan taengsuk e01a898db7 Merge remote-tracking branch 'origin/master'
continuous-integration/drone/push Build is passing
2024-03-07 13:37:04 +07:00
kamonwan taengsuk 960cc2a554 Bug Fixed 2024-03-07 13:36:50 +07:00
nutchayut f6018ab02e Update .drone.yml
continuous-integration/drone/push Build is passing
2024-03-07 02:48:32 +00:00
kamonwan taengsuk 2a8c6920cc Bug Fixed
continuous-integration/drone Build is passing
2024-03-05 14:00:49 +07:00
kamonwan taengsuk d24ac73eb6 Bug Fixed
continuous-integration/drone Build is passing
2024-03-04 13:05:34 +07:00
kamonwan taengsuk b67c660989 Bug Fixed
continuous-integration/drone Build is passing
2024-03-04 12:37:53 +07:00
kamonwan taengsuk b6f7bf5ecd Bug Fixed
continuous-integration/drone Build is passing
2024-02-29 14:02:01 +07:00
kamonwan taengsuk d9cde960ea Bug Fixed
continuous-integration/drone Build is passing
2024-02-29 13:34:39 +07:00
kamonwan taengsuk a3a35fca78 Bug Fixed
continuous-integration/drone Build is passing
2024-02-29 13:16:42 +07:00
kamonwan taengsuk 307a33884e Bug Fixed
continuous-integration/drone Build is passing
2024-02-29 13:12:48 +07:00
kamonwan taengsuk 85b3e08b73 Bug Fixed
continuous-integration/drone Build is passing
2024-02-21 10:09:26 +07:00
kamonwan taengsuk 42a0f46c26 Bug Fixed
continuous-integration/drone Build is passing
2024-02-21 10:03:34 +07:00
kamonwan taengsuk aa6b674ced Add report
continuous-integration/drone Build is passing
2024-02-16 14:13:50 +07:00
kamonwan taengsuk 5f44fa4ecb Bug Fixed
continuous-integration/drone Build is passing
2024-02-07 11:28:22 +07:00
kamonwan taengsuk 33f5fe5c2c Bug Fixed
continuous-integration/drone Build is passing
2024-02-07 10:55:52 +07:00
kamonwan taengsuk 11d4269f2a Bug Fixed
continuous-integration/drone Build is passing
2024-02-06 11:32:52 +07:00
kamonwan taengsuk 1cee2dea2f Bug Fixed
continuous-integration/drone Build is passing
2024-02-06 10:34:35 +07:00
kamonwan taengsuk 5c92b2dcb5 Bug fixed
continuous-integration/drone Build is passing
2024-01-29 11:35:42 +07:00
kamonwan taengsuk 13ee711c95 Bug fixed
continuous-integration/drone Build is passing
2024-01-29 11:19:22 +07:00
kamonwan taengsuk e8e6dd5396 Bug fixed
continuous-integration/drone Build is passing
2024-01-27 11:51:04 +07:00
kamonwan taengsuk e5550f59ac Bug fixed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
2024-01-27 11:10:31 +07:00
kamonwan taengsuk ad6e2f784f Fixed Font 2024-01-27 11:05:32 +07:00
kamonwan taengsuk a27a6625a4 Bug fixed 2024-01-25 15:36:36 +07:00
kamonwan taengsuk 58c6b922b5 Bug fixed 2024-01-25 15:20:10 +07:00
kamonwan taengsuk de2a162353 Bug fixed 2024-01-25 15:07:39 +07:00
kamonwan taengsuk d53fec0c56 Fixed font 2024-01-25 14:47:27 +07:00
kamonwan taengsuk bf6aa7d102 bug fixed
continuous-integration/drone/push Build is passing
2023-12-22 16:18:57 +07:00
kamonwan taengsuk da2936ee0d bug fixed
continuous-integration/drone/push Build is passing
2023-12-22 14:35:41 +07:00
kamonwan taengsuk f146dd1c74 update reports
continuous-integration/drone/push Build is passing
2023-12-20 12:29:15 +07:00
kamonwan taengsuk 499df06439 bug fixed
continuous-integration/drone/push Build is passing
2023-12-15 12:40:17 +07:00
kamonwan taengsuk 5942f73550 bug fixed
continuous-integration/drone/push Build is passing
2023-12-13 14:30:49 +07:00
kamonwan taengsuk bb28a07de1 bug fixed
continuous-integration/drone/push Build is passing
2023-12-13 11:46:40 +07:00
kamonwan taengsuk ca12ecf690 edited font
continuous-integration/drone/push Build is passing
2023-12-08 14:58:14 +07:00
kamonwan taengsuk 97b006aba9 bug fixed
continuous-integration/drone/push Build is passing
2023-12-07 16:45:03 +07:00
kamonwan taengsuk 54ecb6cf9c bug fixed
continuous-integration/drone/push Build is passing
2023-12-07 15:15:17 +07:00
kamonwan taengsuk 351d61ac8c bug fixed
continuous-integration/drone/push Build is passing
2023-12-07 14:20:23 +07:00
kamonwan taengsuk de4f5a0e7b bug fixed
continuous-integration/drone/push Build is passing
2023-12-06 17:10:48 +07:00
kamonwan taengsuk f4b732087a bug fixed
continuous-integration/drone/push Build is passing
2023-12-06 16:30:18 +07:00
kamonwan taengsuk e5491aee7e add auto font size
continuous-integration/drone/push Build is passing
2023-12-06 15:22:37 +07:00
kamonwan taengsuk 8474291f48 bug fixed
continuous-integration/drone/push Build is passing
2023-12-06 14:54:14 +07:00
kamonwan taengsuk 913edd07d3 edited Font
continuous-integration/drone/push Build is passing
2023-12-06 14:10:47 +07:00
kamonwan taengsuk 44e545bed8 edited Font
continuous-integration/drone/push Build is passing
2023-12-06 14:03:04 +07:00
kamonwan taengsuk 47e46da7a9 fixed
continuous-integration/drone/push Build is passing
2023-12-04 16:06:20 +07:00
kamonwan taengsuk 57579b2927 bug fixed
continuous-integration/drone/push Build is failing
2023-12-04 16:03:21 +07:00
kamonwan taengsuk 2182593a90 bug fixed
continuous-integration/drone/push Build is passing
2023-12-04 15:39:39 +07:00
kamonwan taengsuk 7206c9858e bug fixed
continuous-integration/drone/push Build is passing
2023-11-29 16:10:30 +07:00
kamonwan taengsuk fce87e9159 fixed
continuous-integration/drone/push Build is passing
2023-11-29 14:12:01 +07:00
kamonwan taengsuk bd223a48ae bug fixed
continuous-integration/drone/push Build is passing
2023-11-28 15:41:16 +07:00
kamonwan taengsuk 4e25c3a694 update
continuous-integration/drone/push Build is passing
2023-11-24 16:09:02 +07:00
kamonwan taengsuk 5ba7919b29 bug fixed
continuous-integration/drone/push Build is passing
2023-11-23 17:12:25 +07:00
kamonwan taengsuk 3a2f956d02 update
continuous-integration/drone/push Build is passing
2023-11-22 19:11:13 +07:00
kamonwan taengsuk 3666713748 bug fixed
continuous-integration/drone/push Build is passing
2023-11-22 14:57:37 +07:00
kamonwan taengsuk abc8eba8e8 bug fixed
continuous-integration/drone/push Build is passing
2023-11-22 14:40:09 +07:00
kamonwan taengsuk 5215337fae bug fixed
continuous-integration/drone/push Build is passing
2023-11-21 16:53:32 +07:00
kamonwan taengsuk b2820e7ac7 bug fixed
continuous-integration/drone/push Build is passing
2023-11-21 16:13:10 +07:00
kamonwan taengsuk f7cd049397 bug fixed
continuous-integration/drone/push Build is passing
2023-11-21 12:11:05 +07:00
kamonwan taengsuk 79dbb95213 bug fixed
continuous-integration/drone/push Build is passing
2023-11-20 16:32:59 +07:00
kamonwan taengsuk 79269514ba add ค่าควบคุมงานก่อสร้าง
continuous-integration/drone/push Build is passing
2023-11-17 10:52:31 +07:00
kamonwan taengsuk af9a9c8af5 bug fixed
continuous-integration/drone/push Build is passing
2023-11-16 17:56:47 +07:00
kamonwan taengsuk c5370d5128 bug fixed
continuous-integration/drone/push Build is passing
2023-11-16 15:02:58 +07:00
kamonwan taengsuk fcbea4a3f2 bug fixed
continuous-integration/drone/push Build is passing
2023-11-15 17:43:05 +07:00
kamonwan taengsuk 70f29a15e3 bug fixed
continuous-integration/drone/push Build is passing
2023-11-15 16:13:46 +07:00
kamonwan taengsuk 3459263972 bug fixed
continuous-integration/drone/push Build is passing
2023-11-15 15:51:33 +07:00
kamonwan taengsuk d37580b5cb bug fixed
continuous-integration/drone/push Build is passing
2023-11-15 15:18:42 +07:00
kamonwan taengsuk deecd47c0b order renew no
continuous-integration/drone/push Build is passing
2023-11-15 14:37:51 +07:00
kamonwan taengsuk d3e7645f85 fixed
continuous-integration/drone/push Build is passing
2023-11-08 17:58:19 +07:00
kamonwan taengsuk b43aa52b96 bug fixed
continuous-integration/drone/push Build is passing
2023-11-08 15:37:07 +07:00
kamonwan taengsuk 139d31a770 bug fixed
continuous-integration/drone/push Build is passing
2023-11-07 15:42:47 +07:00
kamonwan taengsuk ba2a5b966e update
continuous-integration/drone/push Build is passing
2023-11-06 17:19:58 +07:00
kamonwan taengsuk 4c9484d57e update
continuous-integration/drone/push Build is passing
2023-11-06 12:38:12 +07:00
kamonwan taengsuk 6fcb0a856a bug fixed
continuous-integration/drone/push Build is passing
2023-11-06 10:56:11 +07:00
kamonwan taengsuk e4dd5d42e7 bug fixed
continuous-integration/drone/push Build is passing
2023-10-26 19:09:00 +07:00
kamonwan taengsuk 8692fa50e6 update
continuous-integration/drone/push Build is passing
2023-10-26 17:54:19 +07:00
kamonwan taengsuk bcf6cb2b14 bug fixed
continuous-integration/drone/push Build is passing
2023-10-26 14:32:24 +07:00
kamonwan taengsuk a85294085d fixed
continuous-integration/drone/push Build is passing
2023-10-26 14:22:40 +07:00
kamonwan taengsuk 54c536d2d0 bug fixed
continuous-integration/drone/push Build is passing
2023-10-26 14:04:50 +07:00
kamonwan taengsuk 79f0834946 bug fixed
continuous-integration/drone/push Build is passing
2023-10-26 13:05:08 +07:00
kamonwan taengsuk 322e21659d fixed
continuous-integration/drone/push Build is passing
2023-10-26 10:10:02 +07:00
kamonwan taengsuk f8f5f36140 bug fixed
continuous-integration/drone/push Build is passing
2023-10-26 09:47:25 +07:00
kamonwan taengsuk c6309663d8 bug fixed
continuous-integration/drone/push Build is passing
2023-10-25 22:38:38 +07:00
kamonwan taengsuk 93b0a4385b fixed
continuous-integration/drone/push Build is passing
2023-10-24 18:30:53 +07:00
kamonwan taengsuk f70f734109 fixed
continuous-integration/drone/push Build is passing
2023-10-24 18:08:02 +07:00
kamonwan taengsuk b30f940a15 fixed
continuous-integration/drone/push Build is passing
2023-10-24 17:49:21 +07:00
kamonwan taengsuk 0a3bfeef2d fixed
continuous-integration/drone/push Build is passing
2023-10-24 17:37:26 +07:00
kamonwan taengsuk 5441324de9 update
continuous-integration/drone/push Build is passing
2023-10-21 21:09:37 +07:00
kamonwan taengsuk e206bf0efe add report
continuous-integration/drone/push Build is passing
2023-10-21 17:23:50 +07:00
kamonwan taengsuk 7919b1e39f bug fixed
continuous-integration/drone/push Build is passing
2023-10-20 11:44:22 +07:00
kamonwan taengsuk d3700f9327 fixed ง1
continuous-integration/drone/push Build is passing
2023-10-19 12:46:50 +07:00
kamonwan taengsuk 232969d7cd bug fixed
continuous-integration/drone/push Build is passing
2023-10-19 12:30:19 +07:00
kamonwan taengsuk 28f149b579 bug fixed
continuous-integration/drone/push Build is passing
2023-10-19 10:44:40 +07:00
kamonwan taengsuk d7509173f9 bug fixed
continuous-integration/drone/push Build is passing
2023-10-11 14:21:20 +07:00
kamonwan taengsuk c7c1a86edf bug fixed
continuous-integration/drone/push Build is passing
2023-10-10 17:42:19 +07:00
kamonwan taengsuk 7b946457ee bug fixed
continuous-integration/drone/push Build is passing
2023-10-10 17:32:01 +07:00
kamonwan taengsuk dc23d87855 bug fixed
continuous-integration/drone/push Build is passing
2023-10-06 11:23:18 +07:00
kamonwan taengsuk 93726110a4 bug fixed
continuous-integration/drone/push Build is passing
2023-10-05 15:59:57 +07:00
kamonwan taengsuk 4c94c2e3a7 bug fixed
continuous-integration/drone/push Build is passing
2023-10-04 18:55:25 +07:00
kamonwan taengsuk 2d6505f1c5 fixed
continuous-integration/drone/push Build is passing
2023-10-04 18:32:54 +07:00
kamonwan taengsuk e30767101c edit type
continuous-integration/drone/push Build is passing
2023-10-04 14:45:08 +07:00
kamonwan taengsuk cbddecb9d5 bug fixed
continuous-integration/drone/push Build is passing
2023-09-28 16:53:25 +07:00
kamonwan taengsuk 86e6717cf9 backward
continuous-integration/drone/push Build is passing
2023-09-27 15:35:12 +07:00
kamonwan taengsuk d3f411d2e5 fixed
continuous-integration/drone/push Build is passing
2023-09-27 13:35:01 +07:00
kamonwan taengsuk ad2149cba1 fixed align
continuous-integration/drone/push Build is passing
2023-09-26 16:08:33 +07:00
kamonwan taengsuk e3fa701ba9 add แบบรายงานผลการดำเนินงานโครงการ
continuous-integration/drone/push Build is passing
2023-09-21 14:34:28 +07:00
kamonwan taengsuk 670bb37581 bug fixed
continuous-integration/drone/push Build is passing
2023-09-06 13:52:07 +07:00
kamonwan taengsuk 06f8d47af3 bug fixed
continuous-integration/drone/push Build is passing
2023-09-04 15:36:33 +07:00
kamonwan taengsuk 63e37bf98d add field
continuous-integration/drone/push Build is passing
2023-09-04 15:31:14 +07:00
kamonwan taengsuk 1f02279f23 bug fixed
continuous-integration/drone/push Build is passing
2023-09-04 12:50:47 +07:00
kamonwan taengsuk 9988205756 bug fixed
continuous-integration/drone/push Build is passing
2023-09-01 16:28:43 +07:00
kamonwan taengsuk da3c9bf314 fixed
continuous-integration/drone/push Build is passing
2023-08-31 16:12:13 +07:00
kamonwan taengsuk f7680ffb3e bug fixed
continuous-integration/drone/push Build is passing
2023-08-30 17:22:25 +07:00
kamonwan taengsuk 0d68171be0 undo แบบฟอร์มสรุปรายจ่าย v1
continuous-integration/drone/push Build is passing
2023-08-29 14:55:51 +07:00
kamonwan taengsuk c29c95b2e6 null fix
continuous-integration/drone/push Build is passing
2023-08-29 13:34:47 +07:00
kamonwan taengsuk 036f9476e0 bug fixed
continuous-integration/drone/push Build is passing
2023-08-28 13:39:19 +07:00
kamonwan taengsuk 64e2a64c79 change background color
continuous-integration/drone/push Build is passing
2023-08-24 16:42:15 +07:00
kamonwan taengsuk 941116287e add decimal number
continuous-integration/drone/push Build is passing
2023-08-24 14:36:02 +07:00
kamonwan taengsuk 08101f4c85 fixed
continuous-integration/drone/push Build is passing
2023-08-23 15:55:43 +07:00
kamonwan taengsuk a8a3ca622f fix topic type
continuous-integration/drone/push Build is passing
2023-08-23 15:37:18 +07:00
kamonwan taengsuk 5d6843f33e add version2
continuous-integration/drone/push Build is passing
2023-08-22 17:07:36 +07:00
kamonwan taengsuk edf731702c bug fixed
continuous-integration/drone/push Build is passing
2023-08-22 12:27:04 +07:00
kamonwan taengsuk 80bbf8ca17 bug fixed
continuous-integration/drone/push Build is passing
2023-08-22 11:09:35 +07:00
kamonwan taengsuk 48f918060d fixed
continuous-integration/drone/push Build is passing
2023-08-22 10:53:06 +07:00
kamonwan taengsuk 8ade6577aa fixed
continuous-integration/drone/push Build is passing
2023-08-22 10:46:30 +07:00
kamonwan taengsuk 7a1b6be512 update
continuous-integration/drone/push Build is passing
2023-08-21 18:12:47 +07:00
kamonwan taengsuk b078d3ff42 update SwaggerOperation
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
2023-08-18 15:30:37 +07:00
kamonwan taengsuk 1080400c34 edit page height
continuous-integration/drone/push Build is passing
2023-08-18 14:22:57 +07:00
kamonwan taengsuk fb739a2307 auto font size
continuous-integration/drone/push Build is passing
2023-08-18 13:32:18 +07:00
kamonwan taengsuk 00d5f86d10 remove -list
continuous-integration/drone/push Build is passing
2023-08-18 13:02:23 +07:00
kamonwan taengsuk 36bf183c4a add report, fonts
continuous-integration/drone/push Build is passing
2023-08-16 18:04:03 +07:00
kamonwan taengsuk e5e9e6614b add report
continuous-integration/drone/push Build is passing
2023-08-16 14:03:57 +07:00
kamonwan taengsuk 9fd0c16fbf add report
continuous-integration/drone/push Build is passing
2023-08-16 12:01:11 +07:00
kamonwan taengsuk 7132b7c4ed add report and SwaggerOperation
continuous-integration/drone/push Build is passing
2023-08-15 17:53:36 +07:00
kamonwan taengsuk 171ec756e4 add personnel_report
continuous-integration/drone/push Build is passing
2023-08-11 15:00:02 +07:00
kamonwan taengsuk 0967dd97da update report
continuous-integration/drone/push Build is passing
2023-08-11 12:31:56 +07:00
kamonwan taengsuk 71f93ff704 edit array report summary
continuous-integration/drone/push Build is passing
2023-08-10 17:51:01 +07:00
kamonwan taengsuk 358938b6a4 delete gen row no
continuous-integration/drone Build is passing
2023-08-07 13:57:25 +07:00
kamonwan taengsuk fda5ad5da0 fixed
continuous-integration/drone Build is passing
2023-08-07 11:42:53 +07:00
kamonwan taengsuk 3444d901c5 fixed 2023-08-07 11:33:13 +07:00
kamonwan taengsuk 8be15fc9c7 remark - รายการ 2023-08-07 11:16:55 +07:00
kamonwan taengsuk bc55d24121 bug fixed
continuous-integration/drone/push Build is passing
2023-08-04 16:55:05 +07:00
kamonwan taengsuk 6e389605d9 bug fixed
continuous-integration/drone/push Build is passing
2023-08-04 16:35:52 +07:00
kamonwan taengsuk 1176c3a847 edit .drone.yml
continuous-integration/drone/push Build is passing
2023-08-04 16:27:40 +07:00
kamonwan taengsuk cfce43201d edit Dockerfile.dev
continuous-integration/drone/push Build is failing
2023-08-04 16:22:45 +07:00
kamonwan taengsuk 28a34ee269 edit Dockerfile.dev
continuous-integration/drone/push Build is failing
2023-08-04 16:18:25 +07:00
kamonwan taengsuk 8eaf796ac4 edit Dockerfile.dev 2023-08-04 16:17:32 +07:00
kamonwan taengsuk e39ab67be8 edit
continuous-integration/drone/push Build is failing
2023-08-04 16:10:42 +07:00
kamonwan taengsuk 9f0a9c41aa edit
continuous-integration/drone/push Build is failing
2023-08-04 16:07:30 +07:00
kamonwan taengsuk 2b2461f8b3 edit dockerfile
continuous-integration/drone/push Build is failing
2023-08-04 16:02:47 +07:00
kamonwan taengsuk 557e2dd8f5 edit Dockerfile
continuous-integration/drone/push Build is failing
2023-08-04 15:52:41 +07:00
kamonwan taengsuk 6e74a37a4d edit dockerfile
continuous-integration/drone/push Build is failing
2023-08-04 15:48:37 +07:00
kamonwan taengsuk dd7524e9a1 edit .drone
continuous-integration/drone/push Build is failing
2023-08-04 15:45:57 +07:00
kamonwan taengsuk cba2b7b99e update
continuous-integration/drone/push Build is failing
2023-08-04 15:41:26 +07:00
kamonwan taengsuk 8dc85bc2cf update
continuous-integration/drone/push Build is failing
2023-08-04 15:39:45 +07:00
kamonwan taengsuk 58ebed2c04 add .drone.yml 2023-08-04 15:29:21 +07:00
433 changed files with 60348 additions and 16867 deletions
+35
View File
@@ -0,0 +1,35 @@
kind: pipeline
type: docker
name: default
globals:
- &docker_creds
username:
from_secret: gitea_username
password:
from_secret: gitea_password
steps:
- name: API # building the API docker image
pull: if-not-exists
image: plugins/docker
settings:
dockerfile: Dockerfile
repo: gitea.71dev.com/kamonwantaengsuk/rmutr_report
tags: latest
registry: "gitea.71dev.com"
#dry_run: true
debug: false
<<: *docker_creds
- name: deploy
pull: if-not-exists
image: sinlead/drone-kubectl
settings:
kubernetes_server: "https://202.129.205.205:6443"
kubernetes_cert:
from_secret: kube_ca_certificate
kubernetes_token:
from_secret: kube_token
commands:
- kubectl --insecure-skip-tls-verify --namespace=rmutr rollout restart deployment/rmutr-report
+143
View File
@@ -0,0 +1,143 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using ClosedXML.Excel;
using FastReport;
using FastReport.Export.Csv;
using FastReport.Export.Mht;
using FastReport.Export.OoXML;
using FastReport.Export.Pdf;
using Microsoft.AspNetCore.Mvc;
using rmutr_report.Models;
using Swashbuckle.AspNetCore.Annotations;
namespace rmutr_report.Controllers
{
[SwaggerTag("สำหรับรายงานผลการดำเนินงานโครงการ")]
public class AgencyReport : Controller
{
public readonly Setting _setting;
public AgencyReport(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}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetAgencyReport([FromRoute] string type, [FromBody] List<agency_report> agencyReports)
{
if (agencyReports == null || agencyReports.Count == 0)
{
return BadRequest("Agency reports cannot be null or empty.");
}
foreach (var agencyReport in agencyReports)
{
if (agencyReport == null)
{
continue;
}
agencyReport.startdate = agencyReport.start_date?.ToString("dd MMMM yyyy",
CultureInfo.CreateSpecificCulture("th-TH")) ?? "";
agencyReport.enddate = agencyReport.end_date?.ToString("dd MMMM yyyy",
CultureInfo.CreateSpecificCulture("th-TH")) ?? "";
agencyReport.bool_11_1_text = agencyReport.bool_11_1 == true ? "X" : "";
agencyReport.bool_11_2_text = agencyReport.bool_11_2 == true ? "X" : "";
agencyReport.bool_11_3_text = agencyReport.bool_11_3 == true ? "X" : "";
agencyReport.text_13_1 = agencyReport.bool_13_1 == true ? "X" : "";
agencyReport.text_13_2 = agencyReport.bool_13_2 == true ? "X" : "";
agencyReport.text_13_3 = agencyReport.bool_13_3 == true ? "X" : "";
agencyReport.text_13_4 = agencyReport.bool_13_4 == true ? "X" : "";
agencyReport.text_13_5 = agencyReport.bool_13_5 == true ? "X" : "";
agencyReport.text_13_6 = agencyReport.bool_13_6 == true ? "X" : "";
agencyReport.text_13_7 = agencyReport.bool_13_7 == true ? "X" : "";
agencyReport.text_25_1 = agencyReport.bool_25_1 == 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))
{
return StatusCode(500, "Report settings are not configured.");
}
Report report = new Report();
try
{
report.Load(_setting.report_path + "agency_report.frx");
report.RegisterData(agencyReports, "agency_report");
report.Prepare();
}
catch (Exception ex)
{
return StatusCode(500, $"Report generation failed: {ex.Message}");
}
MemoryStream stream = new MemoryStream();
try
{
switch (type?.ToLower())
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
break;
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
break;
case "mht":
MHTExport mht = new MHTExport();
report.Export(mht, stream);
break;
case "doc":
case "docx":
Word2007Export word = new Word2007Export();
report.Export(word, stream);
break;
default:
return BadRequest("Unsupported export type.");
}
stream.Seek(0, SeekOrigin.Begin);
string contentType = type == "pdf" ? "application/pdf" :
type == "xls" || type == "xlsx" ? "application/vnd.ms-excel" :
type == "mht" ? "multipart/related" :
"application/vnd.ms-word";
return File(stream, contentType);
}
catch (Exception ex)
{
return StatusCode(500, $"File export failed: {ex.Message}");
}
}
}
}
File diff suppressed because it is too large Load Diff
@@ -29,42 +29,42 @@ namespace rmutr_report.Controllers
ws.Range("A1:M1").Style.Alignment.WrapText = true;
ws.Range("A1:M1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A1:M1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("A1").Style.Font.FontName = "TH Sarabun New";
ws.Cell("A1").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("A1").Style.Font.FontSize = 25;
ws.Range("A1:N1").Style.Font.Bold = true;
ws.Cell("N1").Value = "แบบ ง.6";
ws.Cell("N1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("N1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("N1").Style.Font.FontName = "TH Sarabun New";
ws.Cell("N1").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("N1").Style.Font.FontSize = 14;
ws.Cell("N1").Style.Font.Bold = true;
ws.Range("A2:D2").Merge().Value = "หน่วยงาน "+ _calculation_excess_tuition_fee.agency;
ws.Cell("A2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("A2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("A2").Style.Font.FontSize = 14;
ws.Cell("A2").Style.Font.Bold = true;
ws.Cell("A2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("A2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("E2:G2").Merge().Value = "พื้นที่ "+ _calculation_excess_tuition_fee.area;
ws.Cell("E2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("E2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("E2").Style.Font.FontSize = 14;
ws.Cell("E2").Style.Font.Bold = true;
ws.Cell("E2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("E2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("A3:G3").Merge().Value = "ผลผลิต "+ _calculation_excess_tuition_fee.product;
ws.Cell("A3").Style.Font.FontName = "TH Sarabun New";
ws.Cell("A3").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("A3").Style.Font.FontSize = 14;
ws.Cell("A3").Style.Font.Bold = true;
ws.Cell("A3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("A3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("A5:A6").Merge().Value = "ลำดับที่";
ws.Cell("A5").Style.Font.FontName = "TH Sarabun New";
ws.Cell("A5").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("A5").Style.Font.FontSize = 14;
ws.Cell("A5").Style.Font.Bold = true;
ws.Cell("A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("A5:A6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range("B5:C6").Merge().Value = "ชื่อ - สกุล (1)";
ws.Cell("B5").Style.Font.FontName = "TH Sarabun New";
ws.Cell("B5").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("B5").Style.Font.FontSize = 14;
ws.Cell("B5").Style.Font.Bold = true;
ws.Cell("B5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -72,7 +72,7 @@ namespace rmutr_report.Controllers
ws.Range("B5:C6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range("D5:D6").Merge().Value = "ตำแหน่ง (2)";
ws.Cell("D5").Style.Font.FontName = "TH Sarabun New";
ws.Cell("D5").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("D5").Style.Font.FontSize = 14;
ws.Cell("D5").Style.Font.Bold = true;
ws.Cell("D5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -80,7 +80,7 @@ namespace rmutr_report.Controllers
ws.Range("D5:D6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range("E5:E6").Merge().Value = "ประเภทบุคลากร (3)";
ws.Cell("E5").Style.Font.FontName = "TH Sarabun New";
ws.Cell("E5").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("E5").Style.Font.FontSize = 14;
ws.Cell("E5").Style.Font.Bold = true;
ws.Cell("E5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -89,7 +89,7 @@ namespace rmutr_report.Controllers
ws.Range("F5:H5").Merge().Value = "จำนวนชั่วโมงที่สอน / 1 ภาคการศึกษา "+_calculation_excess_tuition_fee.academic_semester_name_th1+
" / "+" "+_calculation_excess_tuition_fee.academic_year_name_th1+")";
ws.Cell("F5").Style.Font.FontName = "TH Sarabun New";
ws.Cell("F5").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("F5").Style.Font.FontSize = 14;
ws.Cell("F5").Style.Font.Bold = true;
ws.Cell("F5").Style.Alignment.WrapText = true;
@@ -98,7 +98,7 @@ namespace rmutr_report.Controllers
ws.Range("F5:H5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell("F6").Value = "จำนวนชั่วโมงที่สอนตามภาระงานแต่ละประเภท (ตามเกณฑ์) (4)";
ws.Cell("F6").Style.Font.FontName = "TH Sarabun New";
ws.Cell("F6").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("F6").Style.Font.FontSize = 14;
ws.Cell("F6").Style.Font.Bold = true;
ws.Cell("F6").Style.Alignment.WrapText = true;
@@ -107,7 +107,7 @@ namespace rmutr_report.Controllers
ws.Cell("F6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell("G6").Value = "จำนวนชั่วโมงที่สอนจริงตามภาระงานแต่ละประเภท (5)";
ws.Cell("G6").Style.Font.FontName = "TH Sarabun New";
ws.Cell("G6").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("G6").Style.Font.FontSize = 14;
ws.Cell("G6").Style.Font.Bold = true;
ws.Cell("G6").Style.Alignment.WrapText = true;
@@ -116,7 +116,7 @@ namespace rmutr_report.Controllers
ws.Cell("G6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell("H6").Value = "ผลต่าง ระหว่าง (5) - (4) = (6)";
ws.Cell("H6").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H6").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H6").Style.Font.FontSize = 14;
ws.Cell("H6").Style.Font.Bold = true;
ws.Cell("H6").Style.Alignment.WrapText = true;
@@ -125,7 +125,7 @@ namespace rmutr_report.Controllers
ws.Cell("H6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range("I5:I6").Merge().Value = "อัตราค่าสอน(400) x ( 6 ) = (7)";
ws.Cell("I5").Style.Font.FontName = "TH Sarabun New";
ws.Cell("I5").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("I5").Style.Font.FontSize = 14;
ws.Cell("I5").Style.Font.Bold = true;
ws.Cell("I5").Style.Alignment.WrapText = true;
@@ -135,7 +135,7 @@ namespace rmutr_report.Controllers
ws.Range("J5:L5").Merge().Value = "จำนวนชั่วโมงที่สอน / 1 ภาคการศึกษา "+_calculation_excess_tuition_fee.academic_semester_name_th2+
" / "+" "+_calculation_excess_tuition_fee.academic_year_name_th2+")";
ws.Cell("J5").Style.Font.FontName = "TH Sarabun New";
ws.Cell("J5").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("J5").Style.Font.FontSize = 14;
ws.Cell("J5").Style.Font.Bold = true;
ws.Cell("J5").Style.Alignment.WrapText = true;
@@ -144,7 +144,7 @@ namespace rmutr_report.Controllers
ws.Range("J5:L5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell("J6").Value = "จำนวนชั่วโมงที่สอนตามภาระงานแต่ละประเภท (ตามเกณฑ์) (8)";
ws.Cell("J6").Style.Font.FontName = "TH Sarabun New";
ws.Cell("J6").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("J6").Style.Font.FontSize = 14;
ws.Cell("J6").Style.Font.Bold = true;
ws.Cell("J6").Style.Alignment.WrapText = true;
@@ -153,7 +153,7 @@ namespace rmutr_report.Controllers
ws.Cell("J6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell("K6").Value = "จำนวนชั่วโมงที่สอนจริงตามภาระงานแต่ละประเภท (9)";
ws.Cell("K6").Style.Font.FontName = "TH Sarabun New";
ws.Cell("K6").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("K6").Style.Font.FontSize = 14;
ws.Cell("K6").Style.Font.Bold = true;
ws.Cell("K6").Style.Alignment.WrapText = true;
@@ -162,7 +162,7 @@ namespace rmutr_report.Controllers
ws.Cell("K6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell("L6").Value = "ผลต่าง ระหว่าง (9) - (8) = (10)";
ws.Cell("L6").Style.Font.FontName = "TH Sarabun New";
ws.Cell("L6").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("L6").Style.Font.FontSize = 14;
ws.Cell("L6").Style.Font.Bold = true;
ws.Cell("L6").Style.Alignment.WrapText = true;
@@ -171,7 +171,7 @@ namespace rmutr_report.Controllers
ws.Cell("L6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range("M5:M6").Merge().Value = "อัตราค่าสอน(400) x (10) = (11)";
ws.Cell("M5").Style.Font.FontName = "TH Sarabun New";
ws.Cell("M5").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("M5").Style.Font.FontSize = 14;
ws.Cell("M5").Style.Font.Bold = true;
ws.Cell("M5").Style.Alignment.WrapText = true;
@@ -180,7 +180,7 @@ namespace rmutr_report.Controllers
ws.Range("M5:M6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range("N5:N6").Merge().Value = "รวมงบประมาณ (7) + (11) = (12)";
ws.Cell("N5").Style.Font.FontName = "TH Sarabun New";
ws.Cell("N5").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("N5").Style.Font.FontSize = 14;
ws.Cell("N5").Style.Font.Bold = true;
ws.Cell("N5").Style.Alignment.WrapText = true;
@@ -266,7 +266,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 14).Value = expenses.teach_rate_1 + expenses.teach_rate_2;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 14)).Style.Font.FontName =
"TH Sarabun New";
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 14)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 14)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 14)).Style.Alignment.Vertical =
@@ -306,7 +306,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 14).Value = sum13;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 14)).Style.Font.FontName =
"TH Sarabun New";
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 14)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 14)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 14)).Style.Alignment.Vertical =
+33 -33
View File
@@ -137,21 +137,21 @@ namespace rmutr_report.Controllers
ws.Column(22).Width = 10;
ws.Column(23).Width = 10;
//ws.Range(ws.Cell(1, 1), ws.Cell(1, 30)).Style.Alignment.WrapText = true;
ws.Column(1).Style.Font.FontName = "TH Sarabun New";
ws.Column(1).Style.Font.FontName = "TH SarabunPSK";
ws.Column(1).Style.Font.FontSize = 16;
ws.Column(2).Style.Font.FontName = "TH Sarabun New";
ws.Column(2).Style.Font.FontName = "TH SarabunPSK";
ws.Column(2).Style.Font.FontSize = 16;
ws.Column(3).Style.Font.FontName = "TH Sarabun New";
ws.Column(3).Style.Font.FontName = "TH SarabunPSK";
ws.Column(3).Style.Font.FontSize = 16;
ws.Column(4).Style.Font.FontName = "TH Sarabun New";
ws.Column(4).Style.Font.FontName = "TH SarabunPSK";
ws.Column(4).Style.Font.FontSize = 16;
ws.Column(5).Style.Font.FontName = "TH Sarabun New";
ws.Column(5).Style.Font.FontName = "TH SarabunPSK";
ws.Column(5).Style.Font.FontSize = 16;
ws.Column(6).Style.Font.FontName = "TH Sarabun New";
ws.Column(6).Style.Font.FontName = "TH SarabunPSK";
ws.Column(6).Style.Font.FontSize = 16;
ws.Column(7).Style.Font.FontName = "TH Sarabun New";
ws.Column(7).Style.Font.FontName = "TH SarabunPSK";
ws.Column(7).Style.Font.FontSize = 16;
ws.Range("H3:W3").Style.Font.FontName = "TH Sarabun New";
ws.Range("H3:W3").Style.Font.FontName = "TH SarabunPSK";
ws.Range("H3:W3").Style.Font.FontSize = 16;
int col = 8;
int rowhead = 3;
@@ -168,7 +168,7 @@ namespace rmutr_report.Controllers
ws.Cell(rowhead, col).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(rowhead, col).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(rowhead, col).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Cell(rowhead,col).Style.Font.FontName = "TH Sarabun New";
ws.Cell(rowhead,col).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(rowhead,col).Style.Font.FontSize = 16;
ws.Cell(rowhead,col).Style.Alignment.WrapText = true;
col++;
@@ -179,7 +179,7 @@ namespace rmutr_report.Controllers
ws.Range("H2").Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("H2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -196,7 +196,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:I2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("I2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -213,7 +213,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:J2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("J2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -230,7 +230,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:K2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("K2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -246,7 +246,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:L2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("L2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -262,7 +262,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:M2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("M2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -280,7 +280,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:N2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("N2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -296,7 +296,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:O2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("O2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -312,7 +312,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:P2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("P2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -328,7 +328,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:Q2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("Q2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -345,7 +345,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:R2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("R2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -361,7 +361,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:S2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("S2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -377,7 +377,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:T2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("T2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -393,7 +393,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:U2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("U2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -409,7 +409,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:V2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("V2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -425,7 +425,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:W2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("W2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -441,7 +441,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:X2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("X2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -459,7 +459,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:Y2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("Y2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -477,7 +477,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:Z2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("Z2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -495,7 +495,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:AA2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("AA2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -759,17 +759,17 @@ namespace rmutr_report.Controllers
foreach (var i in data1.agencys)
{
ws.Cell(row, col2).Value = i.value;
ws.Cell(row, col2).Style.Alignment.SetTextRotation(90);
//ws.Cell(row, col2).Style.Alignment.SetTextRotation(90);
ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, col2).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Cell(row,col2).Style.Font.FontName = "TH Sarabun New";
ws.Cell(row,col2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row,col2).Style.Font.FontSize = 16;
ws.Cell(row,col2).Style.Alignment.WrapText = true;
col2++;
}
ws.Range(ws.Cell(row, 1),ws.Cell(row,27)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,27)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row,8),ws.Cell(row,27)).Style.Alignment.SetTextRotation(90);
//ws.Range(ws.Cell(row,8),ws.Cell(row,27)).Style.Alignment.SetTextRotation(90);
ws.Range(ws.Cell(row,8),ws.Cell(row,27)).Style.Alignment.WrapText = true;
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -799,7 +799,7 @@ namespace rmutr_report.Controllers
// ws.Cell(row, 23).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,27)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1),ws.Cell(row,27)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1),ws.Cell(row,27)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,27)).Style.Font.FontSize = 16;
row++;
rowno++;
+73 -73
View File
@@ -74,7 +74,7 @@ namespace rmutr_report.Controllers
// }
// ws.Range(ws.Cell(rowh, col1), ws.Cell(rowh, col1)).Merge().Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
// ws.Range(ws.Cell(rowh, col1), ws.Cell(rowh, col1)).Merge().Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
// ws.Range(ws.Cell(rowh, col1), ws.Cell(rowh, col1)).Merge().Style.Font.FontName = "TH Sarabun New";
// ws.Range(ws.Cell(rowh, col1), ws.Cell(rowh, col1)).Merge().Style.Font.FontName = "TH SarabunPSK";
// ws.Range(ws.Cell(rowh, col1), ws.Cell(rowh, col1)).Merge().Style.Font.SetBold().Font.FontSize = 16;
// col1++;
// ws.Cell("H3").Value = _kpi.text1;
@@ -146,21 +146,21 @@ namespace rmutr_report.Controllers
ws.Column(22).Width = 10;
ws.Column(23).Width = 10;
//ws.Range(ws.Cell(1, 1), ws.Cell(1, 30)).Style.Alignment.WrapText = true;
ws.Column(1).Style.Font.FontName = "TH Sarabun New";
ws.Column(1).Style.Font.FontName = "TH SarabunPSK";
ws.Column(1).Style.Font.FontSize = 16;
ws.Column(2).Style.Font.FontName = "TH Sarabun New";
ws.Column(2).Style.Font.FontName = "TH SarabunPSK";
ws.Column(2).Style.Font.FontSize = 16;
ws.Column(3).Style.Font.FontName = "TH Sarabun New";
ws.Column(3).Style.Font.FontName = "TH SarabunPSK";
ws.Column(3).Style.Font.FontSize = 16;
ws.Column(4).Style.Font.FontName = "TH Sarabun New";
ws.Column(4).Style.Font.FontName = "TH SarabunPSK";
ws.Column(4).Style.Font.FontSize = 16;
ws.Column(5).Style.Font.FontName = "TH Sarabun New";
ws.Column(5).Style.Font.FontName = "TH SarabunPSK";
ws.Column(5).Style.Font.FontSize = 16;
ws.Column(6).Style.Font.FontName = "TH Sarabun New";
ws.Column(6).Style.Font.FontName = "TH SarabunPSK";
ws.Column(6).Style.Font.FontSize = 16;
ws.Column(7).Style.Font.FontName = "TH Sarabun New";
ws.Column(7).Style.Font.FontName = "TH SarabunPSK";
ws.Column(7).Style.Font.FontSize = 16;
ws.Range("H3:W3").Style.Font.FontName = "TH Sarabun New";
ws.Range("H3:W3").Style.Font.FontName = "TH SarabunPSK";
ws.Range("H3:W3").Style.Font.FontSize = 16;
int col = 8;
int rowhead = 3;
@@ -180,7 +180,7 @@ namespace rmutr_report.Controllers
ws.Cell(rowhead, col).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(rowhead, col).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(rowhead, col).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Cell(rowhead,col).Style.Font.FontName = "TH Sarabun New";
ws.Cell(rowhead,col).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(rowhead,col).Style.Font.FontSize = 16;
ws.Cell(rowhead,col).Style.Alignment.WrapText = true;
col++;
@@ -191,7 +191,7 @@ namespace rmutr_report.Controllers
ws.Range("H2").Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("H2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -206,7 +206,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:I2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("I2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -221,7 +221,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:J2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("J2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -236,7 +236,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:K2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("K2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -251,7 +251,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:L2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("L2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -266,7 +266,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:M2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("M2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -281,7 +281,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:N2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("N2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -296,7 +296,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:O2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("O2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -311,7 +311,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:P2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("P2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -326,7 +326,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:Q2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("Q2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -342,7 +342,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:R2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("R2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -357,7 +357,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:S2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("S2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -372,7 +372,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:T2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("T2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -387,7 +387,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:U2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("U2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -402,7 +402,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:V2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("V2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -417,7 +417,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:W2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("W2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -432,7 +432,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:X2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("X2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -447,7 +447,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:Y2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("Y2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -462,7 +462,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:Z2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("Z2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -477,7 +477,7 @@ namespace rmutr_report.Controllers
ws.Range("H2:AA2").Merge().Value = "แผนปี "+_kpi.plan_year.Substring(2, 2)+" หน่วยงาน";
ws.Cell("H2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("H2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("H2").Style.Font.FontName = "TH Sarabun New";
ws.Cell("H2").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("H2").Style.Font.SetBold().Font.FontSize = 16;
ws.Cell("H2").Style.Alignment.WrapText = true;
ws.Cell("AA2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
@@ -500,8 +500,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:H4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:H4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("H4:H5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -516,8 +516,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:I4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:I4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("I4:I5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -532,8 +532,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:J4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:J4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("J4:J5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -548,8 +548,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:K4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:K4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("K4:K5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -564,8 +564,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:L4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:L4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("L4:L5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -580,8 +580,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:M4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:M4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("M4:M5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -596,8 +596,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:N4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:N4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("N4:N5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -612,8 +612,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:O4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:O4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("O4:O5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -628,8 +628,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:P4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:P4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("P4:P5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -644,8 +644,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:Q4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:Q4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("Q4:Q5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -660,8 +660,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:R4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:R4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("R4:R5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -676,8 +676,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:S4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:S4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("S4:S5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -692,8 +692,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:T4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:T4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("T4:T5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -708,8 +708,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:U4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:U4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("U4:U5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -724,8 +724,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:V4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:V4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("V4:V5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -740,8 +740,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:W4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:W4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("W4:W5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -756,8 +756,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:X4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:X4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("X4:X5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -772,8 +772,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:Y4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:Y4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("X4:Y5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -788,8 +788,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:Z4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:Z4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("X4:Z5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -804,8 +804,8 @@ namespace rmutr_report.Controllers
ws.Range("A4:AA4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:AA4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range("X4:AA5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
@@ -818,7 +818,7 @@ namespace rmutr_report.Controllers
// ws.Range("A4:W4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
// ws.Range("A4:W4").Style.Fill.BackgroundColor = XLColor.PurpleX11;
// ws.Cell("W4").Style.Border.RightBorder = XLBorderStyleValues.Thin;
// string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues;
// string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no + " " + header.strategic_issues);
// no++;
// ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
// ws.Cell(row, 1).Style.Border.OutsideBorder =
@@ -848,7 +848,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, col2).Style.Alignment.SetTextRotation(90);
ws.Cell(row, col2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, col2).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Cell(row,col2).Style.Font.FontName = "TH Sarabun New";
ws.Cell(row,col2).Style.Font.FontName = "TH SarabunPSK";
ws.Cell(row,col2).Style.Font.FontSize = 16;
ws.Cell(row, col2).Style.Alignment.WrapText = true;
col2++;
@@ -900,7 +900,7 @@ namespace rmutr_report.Controllers
// ws.Cell(row, 23).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
//ws.Range(ws.Cell(row, 1),ws.Cell(row,27)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1),ws.Cell(row,27)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1),ws.Cell(row,27)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,27)).Style.Font.FontSize = 16;
row++;
+137 -155
View File
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using ClosedXML.Excel;
using FastReport;
@@ -21,176 +22,157 @@ namespace rmutr_report.Controllers
{
this._setting = setting;
}
/// <summary>ระดับชั้นของแต่ละแถว อนุมานจาก "no" (จำนวนจุด) หรือ prefix ของ expenditure_budget
/// เมื่อไม่มี "no" — ใช้กำหนดว่าแถวไหนเป็นแถวสรุปยอด (มีลูก) ต้องใส่สูตรรวม แทนตัวเลขคงที่</summary>
private static int GetDepth(operating_expenses_detail item)
{
if (!string.IsNullOrEmpty(item.no)) return item.no.Count(c => c == '.');
if (item.expenditure_budget != null && item.expenditure_budget.StartsWith(" - ")) return 4;
if (item.expenditure_budget != null && item.expenditure_budget.StartsWith(" - ")) return 3;
return 0;
}
[HttpPost, Route("reports/operating_expenses/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetExpensesReport([FromRoute] string type,
[FromBody] operating_expenses _operating_expenses)
{
var _operating_expensess = new List<operating_expenses>() { _operating_expenses };
Report report = new Report();
report.Load(_setting.report_path + "operating_expenses.frx");
report.RegisterData(_operating_expensess, "operating_expenses");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
//return File(stream, "application/vnd.ms-excel");
string date = DateTime.Now.ToString("yyyyMMddHHmmss");
{
using var workbook = new XLWorkbook();
var ws = workbook.Worksheets.Add("ค่าใช้จ่ายดำเนินงาน");
ws.Column(1).Width = 11.03;
ws.Column(2).Width = 83.48;
ws.Column(3).Width = 26.77;
ws.Column(4).Width = 61.42;
void TitleRow(int row, string text, bool rightAlign = false)
{
var range = ws.Range(row, 1, row, 4).Merge();
range.Value = text;
range.Style.Font.FontName = "TH Sarabun New";
range.Style.Font.FontSize = 16;
range.Style.Font.Bold = true;
range.Style.Alignment.WrapText = true;
range.Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
range.Style.Alignment.Horizontal = rightAlign
? XLAlignmentHorizontalValues.Right
: XLAlignmentHorizontalValues.Center;
}
TitleRow(1, $"ปีงบประมาณ {_operating_expenses.budget_year} {_operating_expenses.plan}");
TitleRow(2, _operating_expenses.text);
TitleRow(3, $"{_operating_expenses.faculty_name_th} {_operating_expenses.budget_location_name_th}");
TitleRow(4, $"หน่วย : {_operating_expenses.total_amount:N0} บาท", rightAlign: true);
// แถว 5 เว้นว่างไว้ (ตามรูปแบบรายงานเดิม)
const int headerRow = 6;
var headers = new[]
{
"ลำดับที่", "งบรายจ่าย", $"คำขอตั้ง\nปี {_operating_expenses.request_year}", "สรุปคำชี้แจง"
};
for (var col = 1; col <= 4; col++)
{
var cell = ws.Cell(headerRow, col);
cell.Value = headers[col - 1];
cell.Style.Font.FontName = "TH Sarabun New";
cell.Style.Font.FontSize = 16;
cell.Style.Font.Bold = true;
cell.Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
cell.Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
cell.Style.Alignment.WrapText = true;
cell.Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
cell.Style.Border.InsideBorder = XLBorderStyleValues.Thin;
}
var data = _operating_expenses.data ?? new List<operating_expenses_detail>();
var depths = data.Select(GetDepth).ToList();
var startRow = headerRow + 1;
for (var i = 0; i < data.Count; i++)
{
var row = startRow + i;
var item = data[i];
var depth = depths[i];
// ลูกโดยตรง = แถวถัดไปที่ลึกกว่าพอดี 1 ชั้น หยุดเมื่อเจอแถวที่ลึกเท่ากันหรือตื้นกว่า
var childRows = new List<int>();
for (var j = i + 1; j < data.Count && depths[j] > depth; j++)
{
if (depths[j] == depth + 1) childRows.Add(startRow + j);
}
ws.Cell(row, 1).Value = item.no;
ws.Cell(row, 2).Value = item.expenditure_budget;
if (childRows.Any())
{
ws.Cell(row, 3).FormulaA1 = "=" + string.Join("+", childRows.Select(r => $"C{r}"));
}
else
{
ws.Cell(row, 3).Value = item.amount ?? 0;
}
ws.Cell(row, 4).Value = item.clarification_summary;
var range = ws.Range(row, 1, row, 4);
range.Style.Font.FontName = "TH Sarabun New";
range.Style.Font.FontSize = 14;
range.Style.Alignment.WrapText = true;
range.Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
range.Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
range.Style.Border.InsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
ws.Cell(row, 3).Style.NumberFormat.Format = "#,##0_);(#,##0)";
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
}
using var xlsStream = new MemoryStream();
workbook.SaveAs(xlsStream);
xlsStream.Seek(0, SeekOrigin.Begin);
var xlsDate = DateTime.Now.ToString("yyyyMMddHHmmss");
return File(
stream,
xlsStream.ToArray(),
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"operating_expenses_"+date + ".xlsx");
break;
"operating_expenses_" + xlsDate + ".xlsx");
}
case "pdf":
case "doc":
case "docx":
Word2007Export word = new Word2007Export();
report.Export(word, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "appllication/vnd.ms-word");
break;
{
var _operating_expensess = new List<operating_expenses>() { _operating_expenses };
Report report = new Report();
report.Load(_setting.report_path + "operating_expenses.frx");
report.RegisterData(_operating_expensess, "operating_expenses");
report.Prepare();
MemoryStream stream = new MemoryStream();
if (type == "pdf")
{
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
}
else
{
Word2007Export word = new Word2007Export();
report.Export(word, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "appllication/vnd.ms-word");
}
}
}
return Ok();
}
//{
// var workbook = new XLWorkbook();
// var ws = workbook.Worksheets.Add("ค่าใช้จ่ายดำเนินงาน");
// ws.Range("A1:D1").Merge().Value = "ปีงบประมาณ " + _operating_expenses.budget_year + " แผน " + _operating_expenses.plan;
// ws.Range("A1:D1").Style.Alignment.WrapText = true;
// ws.Range("A1:D1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
// ws.Range("A1:D1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
// ws.Cell("A1").Style.Font.FontName = "TH Sarabun New";
// ws.Cell("A1").Style.Font.FontSize = 14;
// ws.Range("A1:D1").Style.Font.Bold = true;
// ws.Range("A2:D2").Merge().Value = "ผลผลิต " + _operating_expenses.product+ " หน่วยงาน " + _operating_expenses.agency + " พื้นที่ "+_operating_expenses.area;
// ws.Range("A2:D2").Style.Alignment.WrapText = true;
// ws.Range("A2:D2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
// ws.Range("A2:D2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
// ws.Cell("A2").Style.Font.FontName = "TH Sarabun New";
// ws.Cell("A2").Style.Font.FontSize = 14;
// ws.Range("A2:D2").Style.Font.Bold = true;
// ws.Cell("D3").Value = "หน่วย : "+ _operating_expenses.total_amount +" บาท";
// ws.Cell("D3").Style.Font.FontName = "TH Sarabun New";
// ws.Cell("D3").Style.Font.FontSize = 14;
// ws.Cell("D3").Style.Font.Bold = true;
// ws.Cell("D3").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
// ws.Cell("D3").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
// //ws.Cell("D3").DataType = XLDataType.Number;
// ws.Cell("D3").Style.NumberFormat.NumberFormatId = 2;
// ws.Cell("A4").Value = "ลำดับที่";
// ws.Cell("A4").Style.Font.FontName = "TH Sarabun New";
// ws.Cell("A4").Style.Font.FontSize = 14;
// ws.Cell("A4").Style.Font.Bold = true;
// ws.Cell("A4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
// ws.Cell("A4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
// ws.Cell("A4").Style.Border.TopBorder = XLBorderStyleValues.Thin;
// ws.Cell("A4").Style.Border.RightBorder = XLBorderStyleValues.Thin;
// ws.Cell("A5").Style.Border.TopBorder = XLBorderStyleValues.Thin;
// ws.Cell("A5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
// ws.Cell("B4").Value = "งบรายจ่าย";
// ws.Cell("B4").Style.Font.FontName = "TH Sarabun New";
// ws.Cell("B4").Style.Font.FontSize = 14;
// ws.Cell("B4").Style.Font.Bold = true;
// ws.Cell("B4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
// ws.Cell("B4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
// ws.Cell("B4").Style.Border.TopBorder = XLBorderStyleValues.Thin;
// ws.Cell("B4").Style.Border.RightBorder = XLBorderStyleValues.Thin;
// ws.Cell("B5").Style.Border.TopBorder = XLBorderStyleValues.Thin;
// ws.Cell("B5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
// ws.Cell("C4").Value = "คำขอตั้ง";
// ws.Cell("C4").Style.Font.FontName = "TH Sarabun New";
// ws.Cell("C4").Style.Font.FontSize = 14;
// ws.Cell("C4").Style.Font.Bold = true;
// ws.Cell("C4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
// ws.Cell("C4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
// ws.Cell("C4").Style.Border.TopBorder = XLBorderStyleValues.Thin;
// ws.Cell("C4").Style.Border.RightBorder = XLBorderStyleValues.Thin;
// ws.Cell("C5").Style.Border.TopBorder = XLBorderStyleValues.Thin;
// ws.Cell("C5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
// ws.Cell("D4").Value = "สรุปคำชี้แจง";
// ws.Cell("D4").Style.Font.FontName = "TH Sarabun New";
// ws.Cell("D4").Style.Font.FontSize = 14;
// ws.Cell("D4").Style.Font.Bold = true;
// ws.Cell("D4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
// ws.Cell("D4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
// ws.Cell("D4").Style.Border.TopBorder = XLBorderStyleValues.Thin;
// ws.Cell("D4").Style.Border.RightBorder = XLBorderStyleValues.Thin;
// ws.Cell("D5").Style.Border.TopBorder = XLBorderStyleValues.Thin;
// ws.Cell("D5").Style.Border.RightBorder = XLBorderStyleValues.Thin;
// ws.Cell("A5").Style.Border.TopBorder = XLBorderStyleValues.None;
// ws.Cell("B5").Style.Border.TopBorder = XLBorderStyleValues.None;
// ws.Cell("C5").Style.Border.TopBorder = XLBorderStyleValues.None;
// ws.Cell("D5").Style.Border.TopBorder = XLBorderStyleValues.None;
//
// ws.Column(1).Width = 10;
// ws.Column(2).Width = 40;
// ws.Column(3).Width = 30;
// ws.Column(4).Width = 50;
// int row = 6;
// ws.Cell(row, 3).SetDataType(XLDataType.Number);
// if (_operating_expenses != null)
// {
// ws.Cell("C5").Value = "ปี "+_operating_expenses.request_year;
// ws.Cell("C5").Style.Alignment.WrapText = true;
// ws.Cell("C5").Style.Font.FontName = "TH Sarabun New";
// ws.Cell("C5").Style.Font.FontSize = 14;
// ws.Cell("C5").Style.Font.Bold = true;
// ws.Cell("C5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
// ws.Cell("C5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
//
// foreach (var expenses in _operating_expenses.data)
// {
// ws.Cell(row, 1).Value = "'"+expenses.no;
// ws.Cell(row, 2).Value = expenses.expenditure_budget;
// ws.Cell(row, 3).Value = expenses.amount;
// ws.Cell(row, 4).Value = expenses.clarification_summary;
//
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Font.FontName =
// "TH Sarabun New";
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Font.FontSize = 14;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Alignment.WrapText = true;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Alignment.Vertical =
// XLAlignmentVerticalValues.Center;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
// ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
// ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
// ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
// ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
// ws.Range(ws.Cell(5, 1), ws.Cell(5, 4)).Style.Font.Bold = true;
// ws.Range(ws.Cell(6, 1), ws.Cell(6, 4)).Style.Border.BottomBorder = XLBorderStyleValues.Double;
// ws.Range(ws.Cell(6, 1), ws.Cell(6, 4)).Style.Font.Bold = true;
// //ws.Cell(row, 3).Style.NumberFormat.NumberFormatId = 2;
// //ws.Cell(row, 3).DataType = XLDataType.Number;
// //ws.Cell(row,3).SetDataType(XLDataType.Number);
// ws.Cell(row,3).Style.NumberFormat.SetFormat("#,#");
//
// row++;
// }
// }
// using (var stream = new MemoryStream())
// {
// workbook.SaveAs(stream);
// var content = stream.ToArray();
// string date = DateTime.Now.ToString("yyyyMMddHHmmss");
// return File(
// content,
// "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
// "operatingexpenses_" + date + ".xlsx");
// }
//}
//}
}
}
}
+565 -4
View File
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using ClosedXML.Excel;
using FastReport;
using FastReport.Export.OoXML;
@@ -21,6 +22,7 @@ namespace rmutr_report.Controllers
this._setting = setting;
}
[SwaggerOperation("รับเงินแผ่นดิน")]
[HttpPost, Route("reports/receive_government/{type}")] //รับเงินแผ่นดิน
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetGovernmentBudgetReport([FromRoute] string type,
@@ -63,6 +65,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("การจัดสรรงบประมาณแผ่นดินรวมทุกแผนงาน, แผนงานบุคลากร, พื้นฐาน+ยุทธศาตร์")]
[HttpPost, Route("reports/budget_government_allocate/{type}")] // (พื้นฐาน+ยุทธศาตร์)
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetInStrAllocateReport([FromRoute] string type,
@@ -71,7 +74,7 @@ namespace rmutr_report.Controllers
var workbook = new XLWorkbook();
var ws = workbook.Worksheets.Add("การจัดสรรงบประมาณแผ่นดิน");
ws.Range("A1:S1").Merge().Value = "การจัดสรรงบประมาณแผ่นดิน ปีงบประมาณ พ.ศ. " + allocate.budget_year
+ " (" + allocate.report_name + ")";//" (แผนงาน พื้นฐาน และ แผนงาน ยุทธศาสตร์ฯ)";
+ " (" + allocate.report_name + ")"; //" (แผนงาน พื้นฐาน และ แผนงาน ยุทธศาสตร์ฯ)";
ws.Range("A1:S1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A1:S1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("A1:S1").Style.Font.FontName = "TH SarabunPSK";
@@ -394,7 +397,7 @@ namespace rmutr_report.Controllers
if (detail.color == 3) // ชื่อคณะ สีแดงอ่อน
{
ws.Range(ws.Cell(row, 1), ws.Cell(row + 1, 1)).Merge().Value = detail.list;
ws.Range(ws.Cell(row, 1), ws.Cell(row + 1, 1)).Merge().Value = detail.list;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 5)).Merge().Value = detail.total_budget_personnel;
ws.Range(ws.Cell(row, 6), ws.Cell(row, 9)).Merge().Value = detail.total_budget_operating;
ws.Range(ws.Cell(row, 10), ws.Cell(row, 11)).Merge().Value = detail.total_budget_investment;
@@ -428,6 +431,7 @@ namespace rmutr_report.Controllers
row++;
}
if (detail.color == 5) // ชื่อคณะ สีขาว
{
ws.Cell(row, 1).Value = "'- " + detail.list;
@@ -466,7 +470,7 @@ namespace rmutr_report.Controllers
if (detail.color == 4) // ชื่อย่อยคณะ สีเทาอ่อน
{
ws.Range(ws.Cell(row, 1), ws.Cell(row + 1, 1)).Merge().Value = detail.list;
ws.Range(ws.Cell(row, 1), ws.Cell(row + 1, 1)).Merge().Value = detail.list;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 5)).Merge().Value = detail.total_budget_personnel;
ws.Range(ws.Cell(row, 6), ws.Cell(row, 9)).Merge().Value = detail.total_budget_operating;
ws.Range(ws.Cell(row, 10), ws.Cell(row, 11)).Merge().Value = detail.total_budget_investment;
@@ -737,6 +741,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
row++;
}
if (detail2.color == 5) // ชื่อคณะ สีขาว detail
{
ws.Cell(row, 1).Value = null;
@@ -934,7 +939,6 @@ namespace rmutr_report.Controllers
ws.Cell(row, 17).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
row++;
}
}
}
@@ -948,5 +952,562 @@ namespace rmutr_report.Controllers
"budget_government_allocate" + ".xlsx");
}
}
[SwaggerOperation("1 รายการวัสดุ 2 รายการค่าใช้สอย")]
[HttpPost, Route("reports/national_budget_list/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetNationalBudgetListReport([FromRoute] string type,
[FromBody] national_budget_list _nationalBudgetList)
{
string item = "รายการวัสดุ (คำของบประมาณรายจ่าย ปี ";
string item2 = "รายการค่าใช้สอย (คำของบประมาณรายจ่าย ปี ";
if (_nationalBudgetList.report_type == 1)
{
_nationalBudgetList.budget_year = item + _nationalBudgetList.budget_year + ")";
foreach (var detail in _nationalBudgetList.data)
{
if (detail != null)
{
detail.total_amount = (detail.quantity * detail.unit_price);
}
}
}
if (_nationalBudgetList.report_type == 2)
{
_nationalBudgetList.budget_year = item2 + _nationalBudgetList.budget_year + ")";
foreach (var detail in _nationalBudgetList.data)
{
if (detail != null)
{
detail.total_amount = (detail.quantity * detail.unit_price*detail.quantity_month);
}
}
}
var nationalBudgetLists = new List<national_budget_list>() { _nationalBudgetList };
Report report = new Report();
if (_nationalBudgetList.report_type == 2)
{
report.Load(_setting.report_path + "national_budget_list_type2.frx");
report.RegisterData(nationalBudgetLists, "national_budget_list");
report.Prepare();
MemoryStream stream1 = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream1);
stream1.Seek(0, SeekOrigin.Begin);
return File(stream1, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream1);
stream1.Seek(0, SeekOrigin.Begin);
return File(
stream1,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"ค่าเช่าทรัพย์สิน" + ".xlsx");
}
}
if (_nationalBudgetList.report_type == 1)
{
report.Load(_setting.report_path + "national_budget_list.frx");
report.RegisterData(nationalBudgetLists, "national_budget_list");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"ค่าคณะกรรมการตรวจสอบพัสดุในงานจ้างก่อสร้าง" + ".xlsx");
}
}
return Ok();
}
[SwaggerOperation("ค่าประกันภัยรถยนต์ราชการ")]
[HttpPost, Route("reports/budget_progress_insurances/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetInsurancesListReport([FromRoute] string type,
[FromBody] budget_progress_insurances insurances)
{
foreach (var detail in insurances.data)
{
if (detail != null)
{
detail.total_amount = (detail.amount + detail.car_act);
}
switch (detail.month)
{
case 1:
detail.month_th = "มกราคม";
break;
case 2:
detail.month_th = "กุมภาพันธ์";
break;
case 3:
detail.month_th = "มีนาคม";
break;
case 4:
detail.month_th = "เมษายน";
break;
case 5:
detail.month_th = "พฤษภาคม";
break;
case 6:
detail.month_th = "มิถุนายน";
break;
case 7:
detail.month_th = "กรกฎาคม";
break;
case 8:
detail.month_th = "สิงหาคม";
break;
case 9:
detail.month_th = "กันยายน";
break;
case 10:
detail.month_th = "ตุลาคม";
break;
case 11:
detail.month_th = "พฤศจิกายน";
break;
case 12:
detail.month_th = "ธันวาคม";
break;
}
}
var _insurances = new List<budget_progress_insurances>() { insurances };
Report report = new Report();
report.Load(_setting.report_path + "budget_progress_insurances.frx");
report.RegisterData(_insurances, "budget_progress_insurances");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"ค่าประกันภัยรถยนต์ราชการ" + ".xlsx");
}
return Ok();
}
[SwaggerOperation("ค่าคณะกรรมการตรวจสอบพัสดุในงานจ้างก่อสร้าง,ค่าคณะกรรมการอื่น ๆ")]
[HttpPost, Route("reports/parcel_inspection_committee/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetCommitteeReport([FromRoute] string type,
[FromBody] parcel_inspection_committee committee)
{
int no = 1;
foreach (var data in committee.data)
{
data.list = "รายการ " + no;
no++;
foreach (var detail in data.data_detail)
{
if (detail != null)
{
data.total_amount = (detail.quantity * detail.quantity_person * detail.quantity_work *
detail.amount);
}
}
var s = committee.data.Sum(d => d.total_amount);
committee.total_all_amount = s;
}
var _committees = new List<parcel_inspection_committee>() { committee };
Report report = new Report();
report.Load(_setting.report_path + "other_committee_fee.frx");
report.RegisterData(_committees, "parcel_inspection_committee");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"national_budget_list" + ".xlsx");
}
return Ok();
}
[SwaggerOperation("ค่าจ้างให้บริการงานจ้างออกแบบ")]
[HttpPost, Route("reports/design_services/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetDesignServicesReport([FromRoute] string type,
[FromBody] parcel_inspection_committee committee)
{
int no = 1;
string per = "%";
foreach (var data in committee.data)
{
data.list = "รายการ " + no;
no++;
foreach (var detail in data.data_detail)
{
if (detail != null)
{
detail.unit = detail.quantity_work + per;
detail.amount = (detail.quantity * detail.quantity_person * detail.quantity_work) / 100;
}
}
var total = data.data_detail.Sum(d => d.amount);
data.total_amount = total;
var s = committee.data.Sum(d => d.total_amount);
committee.total_all_amount = s;
}
var _committees = new List<parcel_inspection_committee>() { committee };
Report report = new Report();
report.Load(_setting.report_path + "design_services.frx");
report.RegisterData(_committees, "parcel_inspection_committee");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"ค่าจ้างให้บริการงานจ้างออกแบบ" + ".xlsx");
}
return Ok();
}
[SwaggerOperation("ค่าอาหารทำการนอกเวลา 1 วันทำการปกติ 2 วันหยุดราชการ")]
[HttpPost, Route("reports/meal_costs_outside/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetDesignServicesReport([FromRoute] string type,
[FromBody] meal_costs_outside mealCostsOutsides)
{
var meals = mealCostsOutsides.data.ToList();
if (mealCostsOutsides.topic_type == 1)
{
mealCostsOutsides.topic = "วันทำการปกติ";
}
if (mealCostsOutsides.topic_type == 2)
{
mealCostsOutsides.topic = "วันหยุดราชการ";
}
foreach (var detail in mealCostsOutsides.data)
{
detail.total_amount = (detail.day * detail.person * detail.amount);
}
mealCostsOutsides.day = mealCostsOutsides.data.Sum(d => d.day);
mealCostsOutsides.person = mealCostsOutsides.data.Sum(d => d.person);
mealCostsOutsides.amount = mealCostsOutsides.data.Sum(d => d.amount);
mealCostsOutsides.total_amount = meals.Sum(f => f.total_amount);
var meal = new List<meal_costs_outside>() { mealCostsOutsides };
Report report = new Report();
report.Load(_setting.report_path + "meal_costs_outside.frx");
report.RegisterData(meal, "meal_costs_outside");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"ค่าอาหารทำการนอกเวลา" + ".xlsx");
}
return Ok();
}
[SwaggerOperation("ค่าเบี้ยเลี้ยง ที่พัก พาหนะ")]
[HttpPost, Route("reports/expense/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetExpenseReport([FromRoute] string type,
[FromBody] expense _expense)
{
var meals = _expense.data.ToList();
if (_expense.topic_type == 1)
{
_expense.topic = "ค่าเบี้ยเลี้ยง";
_expense.text_1 = "จำนวนเงิน/วัน";
_expense.text_2 = "จำนวน (วัน)";
foreach (var detail in _expense.data)
{
detail.total_amount =
(detail.quantity_1 * detail.quantity_2 * detail.quantity_3 * detail.quantity_4);
}
}
if (_expense.topic_type == 2)
{
_expense.topic = "ค่าเช่าที่พัก";
_expense.text_1 = "จำนวนเงิน/คน/คืน";
_expense.text_2 = "จำนวนวัน";
foreach (var detail in _expense.data)
{
detail.total_amount = (detail.quantity_1 * detail.quantity_2 * detail.quantity_3);
}
}
if (_expense.topic_type == 3)
{
_expense.topic = "ค่าพาหนะ";
_expense.text_1 = "จำนวนเงิน";
_expense.text_2 = "จำนวนครั้ง";
foreach (var detail in _expense.data)
{
detail.total_amount = (detail.quantity_1 * detail.quantity_2 * detail.quantity_3);
}
}
_expense.quantity_1 = _expense.data.Sum(d => d.quantity_1);
_expense.quantity_2 = _expense.data.Sum(d => d.quantity_2);
_expense.quantity_3 = _expense.data.Sum(d => d.quantity_3);
_expense.quantity_4 = _expense.data.Sum(d => d.quantity_4);
_expense.total_amount = meals.Sum(f => f.total_amount);
var expenses = new List<expense>() { _expense };
Report report = new Report();
if (_expense.topic_type == 1)
{
report.Load(_setting.report_path + "expense_allowance.frx");
report.RegisterData(expenses, "expense");
report.Prepare();
MemoryStream stream1 = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream1);
stream1.Seek(0, SeekOrigin.Begin);
return File(stream1, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream1);
stream1.Seek(0, SeekOrigin.Begin);
return File(
stream1,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"ค่าเบี้ยเลี้ยง" + ".xlsx");
}
}
if (_expense.topic_type != 1)
{
report.Load(_setting.report_path + "expense.frx");
report.RegisterData(expenses, "expense");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"ค่าใช้สอย" + ".xlsx");
}
}
return Ok();
}
[SwaggerOperation("แบบคำนวณค่าวัสดุการศึกษา")]
[HttpPost, Route("reports/material_edu_cal_form/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetCalFormReport([FromRoute] string type,
[FromBody] material_edu_cal_form calForm)
{
foreach (var data in calForm.data)
{
int row_no = 1;
var total = data.data_detail.ToList();
foreach (var detail2 in data.data_detail)
{
if (detail2.topic_type == 2)
{
detail2.no = row_no.ToString();
row_no++;
// detail2.total_amount_1 = detail2.amount_1*detail2.rate_1;
// detail2.total_amount_2 = detail2.amount_2*detail2.rate_2;
// detail2.total_all_amount = detail2.total_amount_1 + detail2.total_amount_2;
}
calForm.total_amount = calForm.data.Sum(d => d.amount);
}
}
var _cal = new List<material_edu_cal_form>() { calForm };
Report report = new Report();
report.Load(_setting.report_path + "material_edu_cal_form.frx");
report.RegisterData(_cal, "material_edu_cal_form");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"แบบคำนวณค่าวัสดุการศึกษา" + ".xlsx");
}
return Ok();
}
[SwaggerOperation("ค่าควบคุมงานก่อสร้าง")]
[HttpPost, Route("reports/control_cost_construction/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetConstructionReport([FromRoute] string type,
[FromBody] control_cost_construction _expense)
{
if (_expense.topic_type == 1)
{
_expense.topic = "ค่าควบคุมงานก่อสร้าง (หัวหน้าควบคุมงานก่อสร้าง)";
}
if (_expense.topic_type == 2)
{
_expense.topic = "ค่าควบคุมงานก่อสร้าง (ผู้ปฏิบัติการ)";
}
foreach (var detail in _expense.data)
{
detail.total_amount = (detail.quantity_day * detail.quantity_person * detail.amount);
}
var expenses = new List<control_cost_construction>() { _expense };
Report report = new Report();
report.Load(_setting.report_path + "control_cost_construction.frx");
report.RegisterData(expenses, "control_cost_construction");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"ค่าควบคุมงานก่อสร้าง" + ".xlsx");
}
return Ok();
}
}
}
+29 -15
View File
@@ -26,12 +26,12 @@ namespace rmutr_report.Controllers
{
var workbook = new XLWorkbook();
var ws = workbook.Worksheets.Add("ค่าเช่าบ้าน");
ws.Cell("F1").Value = "แบบ ง.1";
ws.Cell("F1").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("F1").Style.Font.FontSize = 16;
ws.Cell("F1").Style.Font.Bold = true;
ws.Cell("F1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("F1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("G1").Value = "แบบ ง.1";
ws.Cell("G1").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("G1").Style.Font.FontSize = 16;
ws.Cell("G1").Style.Font.Bold = true;
ws.Cell("G1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell("G1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("A2:F2").Merge().Value = "รายละเอียดประกอบการเสนอของบประมาณรายการ ค่าเช่าบ้าน ปีงบประมาณ" + _house_for_rent.budget_year;
ws.Range("A2:F2").Style.Alignment.WrapText = true;
ws.Range("A2:F2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -101,7 +101,14 @@ namespace rmutr_report.Controllers
ws.Cell("F5").Style.Font.FontSize = 16;
ws.Cell("F5").Style.Font.Bold = true;
ws.Cell("F5").Style.Alignment.WrapText = true;
ws.Range("A4:F5").Style.Fill.BackgroundColor = XLColor.SeaShell;
ws.Range("G4:G5").Merge().Value = "เบิกจ่ายจริง";
ws.Range("G4:G5").Style.Alignment.WrapText = true;
ws.Range("G4:G5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("G4:G5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("G4").Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
ws.Range("G4").Style.Font.FontSize = 16;
ws.Range("A3:F3").Style.Font.Bold = true;
ws.Range("A4:G5").Style.Fill.BackgroundColor = XLColor.SeaShell;
ws.Range("A4:F5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A4:F5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("A4:F5").Style.Border.OutsideBorder =
@@ -116,12 +123,17 @@ namespace rmutr_report.Controllers
XLBorderStyleValues.Thin;
ws.Range("E4:E5").Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range("G4:G5").Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range("G4:G5").Style.Border.TopBorder =
XLBorderStyleValues.Thin;
ws.Column(1).Width = 10;
ws.Column(2).Width = 40;
ws.Column(3).Width = 25;
ws.Column(4).Width = 15;
ws.Column(5).Width = 15;
ws.Column(6).Width = 15;
ws.Column(7).Width = 15;
int row = 6;
//int row2 = 9;
@@ -136,17 +148,18 @@ namespace rmutr_report.Controllers
ws.Cell(row, 4).Value = house.salary_rate;
ws.Cell(row, 5).Value = house.per_month;
ws.Cell(row, 6).Value = house.per_year;
ws.Cell(row, 7).Value = house.actual_disbursement;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Font.FontName =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 7)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.Vertical =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 7)).Style.Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 7)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 7)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 7)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.RightBorder =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 7)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
@@ -154,9 +167,10 @@ namespace rmutr_report.Controllers
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 6).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 7).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, 6)).SetDataType(XLDataType.Number);
ws.Range(ws.Cell(row, 4), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 4), ws.Cell(row, 7)).SetDataType(XLDataType.Number);
ws.Range(ws.Cell(row, 4), ws.Cell(row, 7)).Style.NumberFormat.SetFormat("#,#");
row++;
}
+52 -11
View File
@@ -105,21 +105,21 @@ namespace rmutr_report.Controllers
ws.Column(6).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Column(7).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Column(8).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Column(1).Style.Font.FontName = "TH Sarabun New";
ws.Column(1).Style.Font.FontName = "TH SarabunPSK";
ws.Column(1).Style.Font.FontSize = 16;
ws.Column(2).Style.Font.FontName = "TH Sarabun New";
ws.Column(2).Style.Font.FontName = "TH SarabunPSK";
ws.Column(2).Style.Font.FontSize = 16;
ws.Column(3).Style.Font.FontName = "TH Sarabun New";
ws.Column(3).Style.Font.FontName = "TH SarabunPSK";
ws.Column(3).Style.Font.FontSize = 16;
ws.Column(4).Style.Font.FontName = "TH Sarabun New";
ws.Column(4).Style.Font.FontName = "TH SarabunPSK";
ws.Column(4).Style.Font.FontSize = 16;
ws.Column(5).Style.Font.FontName = "TH Sarabun New";
ws.Column(5).Style.Font.FontName = "TH SarabunPSK";
ws.Column(5).Style.Font.FontSize = 16;
ws.Column(6).Style.Font.FontName = "TH Sarabun New";
ws.Column(6).Style.Font.FontName = "TH SarabunPSK";
ws.Column(6).Style.Font.FontSize = 16;
ws.Column(7).Style.Font.FontName = "TH Sarabun New";
ws.Column(7).Style.Font.FontName = "TH SarabunPSK";
ws.Column(7).Style.Font.FontSize = 16;
ws.Column(8).Style.Font.FontName = "TH Sarabun New";
ws.Column(8).Style.Font.FontName = "TH SarabunPSK";
ws.Column(8).Style.Font.FontSize = 16;
int col = 1;
int row = 4;
@@ -134,10 +134,16 @@ namespace rmutr_report.Controllers
ws.Range("A1:H1").Merge().Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A1:H1").Merge().Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("A1").Style.Font.Bold = true;
ws.Cell("A1").Style.Font.FontName = "TH Sarabun New";
ws.Cell("A1").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("A1").Style.Font.FontSize = 16;
ws.Range("D2:E2").Merge().Value = "ค่าเป้าหมาย ปี " + _kpi.academic_year.Substring(2, 2);
ws.Range("D2:E2").Style.Font.Bold = true;
WriteReferenceHeaders(ws, _kpi.vision_data, ref row, ref rowno);
WriteReferenceHeaders(ws, _kpi.popularity_data, ref row, ref rowno);
WriteReferenceHeaders(ws, _kpi.uniqueness_data, ref row, ref rowno);
WriteReferenceHeaders(ws, _kpi.identity_data, ref row, ref rowno);
foreach (var header in _kpi.header_data)
{
if (header.header_1 != null || header.header_1 != "")
@@ -271,8 +277,6 @@ namespace rmutr_report.Controllers
}
}
//}
// }
@@ -287,6 +291,43 @@ namespace rmutr_report.Controllers
"kpi_" + date + ".xlsx");
}
}
private void WriteReferenceHeaders(IXLWorksheet ws, List<kpi_reference_header> headers, ref int row, ref int rowno)
{
if (headers == null) return;
foreach (var header in headers)
{
if (!string.IsNullOrEmpty(header.header_1))
{
ws.Cell(row, 1).Value = header.header_1;
ws.Cell(row, 1).Style.Font.Bold = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 8)).Merge().Style.Fill.BackgroundColor = XLColor.Bisque;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 8)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
row++;
}
foreach (var data1 in header.data_detail ?? new List<kpi_data_details2>())
{
ws.Cell(row, 2).Value = rowno;
ws.Cell(row, 3).Value = data1.name;
ws.Cell(row, 4).Value = data1.unit;
ws.Cell(row, 5).Value = data1.value;
ws.Cell(row, 6).Value = data1.responsible_person;
ws.Cell(row, 7).Value = data1.responsible_work;
ws.Cell(row, 8).Value = data1.collector;
for (var c = 1; c <= 8; c++)
{
ws.Cell(row, c).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, c).Style.Border.LeftBorder = XLBorderStyleValues.Thin;
ws.Cell(row, c).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Cell(row, c).Style.Alignment.WrapText = true;
}
row++;
rowno++;
}
}
}
[HttpPost, Route("reports/kpi_performance_expenditure_budget/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetKpiBudgetReport([FromRoute] string type, [FromBody] kpi_performance_expenditure_budget kpiPerformance)
+16 -16
View File
@@ -97,35 +97,35 @@ namespace rmutr_report.Controllers
ws.Column(13).Width = 40;
ws.Column(14).Width = 40;
ws.Column(15).Width = 40;
ws.Column(1).Style.Font.FontName = "TH Sarabun New";
ws.Column(1).Style.Font.FontName = "TH SarabunPSK";
ws.Column(1).Style.Font.FontSize = 16;
ws.Column(2).Style.Font.FontName = "TH Sarabun New";
ws.Column(2).Style.Font.FontName = "TH SarabunPSK";
ws.Column(2).Style.Font.FontSize = 16;
ws.Column(3).Style.Font.FontName = "TH Sarabun New";
ws.Column(3).Style.Font.FontName = "TH SarabunPSK";
ws.Column(3).Style.Font.FontSize = 16;
ws.Column(4).Style.Font.FontName = "TH Sarabun New";
ws.Column(4).Style.Font.FontName = "TH SarabunPSK";
ws.Column(4).Style.Font.FontSize = 16;
ws.Column(5).Style.Font.FontName = "TH Sarabun New";
ws.Column(5).Style.Font.FontName = "TH SarabunPSK";
ws.Column(5).Style.Font.FontSize = 16;
ws.Column(6).Style.Font.FontName = "TH Sarabun New";
ws.Column(6).Style.Font.FontName = "TH SarabunPSK";
ws.Column(6).Style.Font.FontSize = 16;
ws.Column(7).Style.Font.FontName = "TH Sarabun New";
ws.Column(7).Style.Font.FontName = "TH SarabunPSK";
ws.Column(7).Style.Font.FontSize = 16;
ws.Column(8).Style.Font.FontName = "TH Sarabun New";
ws.Column(8).Style.Font.FontName = "TH SarabunPSK";
ws.Column(8).Style.Font.FontSize = 16;
ws.Column(9).Style.Font.FontName = "TH Sarabun New";
ws.Column(9).Style.Font.FontName = "TH SarabunPSK";
ws.Column(9).Style.Font.FontSize = 16;
ws.Column(10).Style.Font.FontName = "TH Sarabun New";
ws.Column(10).Style.Font.FontName = "TH SarabunPSK";
ws.Column(10).Style.Font.FontSize = 16;
ws.Column(11).Style.Font.FontName = "TH Sarabun New";
ws.Column(11).Style.Font.FontName = "TH SarabunPSK";
ws.Column(11).Style.Font.FontSize = 16;
ws.Column(12).Style.Font.FontName = "TH Sarabun New";
ws.Column(12).Style.Font.FontName = "TH SarabunPSK";
ws.Column(12).Style.Font.FontSize = 16;
ws.Column(13).Style.Font.FontName = "TH Sarabun New";
ws.Column(13).Style.Font.FontName = "TH SarabunPSK";
ws.Column(13).Style.Font.FontSize = 16;
ws.Column(14).Style.Font.FontName = "TH Sarabun New";
ws.Column(14).Style.Font.FontName = "TH SarabunPSK";
ws.Column(14).Style.Font.FontSize = 16;
ws.Column(15).Style.Font.FontName = "TH Sarabun New";
ws.Column(15).Style.Font.FontName = "TH SarabunPSK";
ws.Column(15).Style.Font.FontSize = 16;
int col = 1;
int row = 4;
@@ -192,7 +192,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 14).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 15).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,15)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1),ws.Cell(row,15)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1),ws.Cell(row,15)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,15)).Style.Font.FontSize = 16;
row++;
rowno++;
+6 -6
View File
@@ -54,15 +54,15 @@ namespace rmutr_report.Controllers
ws.Column(3).Width = 20;
ws.Column(4).Width = 30;
ws.Column(5).Width = 30;
ws.Column(1).Style.Font.FontName = "TH Sarabun New";
ws.Column(1).Style.Font.FontName = "TH SarabunPSK";
ws.Column(1).Style.Font.FontSize = 16;
ws.Column(2).Style.Font.FontName = "TH Sarabun New";
ws.Column(2).Style.Font.FontName = "TH SarabunPSK";
ws.Column(2).Style.Font.FontSize = 16;
ws.Column(3).Style.Font.FontName = "TH Sarabun New";
ws.Column(3).Style.Font.FontName = "TH SarabunPSK";
ws.Column(3).Style.Font.FontSize = 16;
ws.Column(4).Style.Font.FontName = "TH Sarabun New";
ws.Column(4).Style.Font.FontName = "TH SarabunPSK";
ws.Column(4).Style.Font.FontSize = 16;
ws.Column(5).Style.Font.FontName = "TH Sarabun New";
ws.Column(5).Style.Font.FontName = "TH SarabunPSK";
ws.Column(5).Style.Font.FontSize = 16;
int col = 1;
int row = 3;
@@ -110,7 +110,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,5)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1),ws.Cell(row,5)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1),ws.Cell(row,5)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,5)).Style.Font.FontSize = 16;
row++;
rowno++;
+698 -10
View File
@@ -28,6 +28,7 @@ namespace rmutr_report.Controllers
this._setting = setting;
}
[SwaggerOperation("ข้อมูลจำนวนบุคลากร")]
[HttpPost, Route("reports/personnel_summary/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetHrReport([FromRoute] string type, [FromBody] personnel_summary personnel_summarys)
@@ -85,6 +86,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("จำนวนบุคลากร สายวิชาการ และ สายสนับสนุน")]
[HttpPost, Route("reports/man_power/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetManReport([FromRoute] string type, [FromBody] List<man_power> man_powers)
@@ -129,6 +131,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("จำนวนบุคลากร สายสนับสนุน")]
[HttpPost, Route("reports/data_line_support/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetDataLineReport([FromRoute] string type, [FromBody] data_line_support data_line_supports)
@@ -173,6 +176,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("จำนวนบุคลากร สายวิชาการ จำแนกตามอัตรา มีคนครอง และอัตราว่าง")]
[HttpPost, Route("reports/data_line_academic/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetDataLineAcaReport([FromRoute] string type,
@@ -218,6 +222,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("จำนวนบุคลากร สายวิชาการ จำแนกตามอัตรา มีคนครอง และอัตราว่าง")]
[HttpPost, Route("reports/qualifications_teacher/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetQualificationsTeacherReport([FromRoute] string type,
@@ -263,6 +268,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("จำนวนบุคลากร สายวิชาการ ตามตำแหน่งทางวิชาการ")]
[HttpPost, Route("reports/academic_position/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetAcademicPositionReport([FromRoute] string type,
@@ -308,6 +314,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("หนังสือแจ้งผลการเลื่อนค่าตอบแทนพนักงานราชการ")]
[HttpPost, Route("reports/postponement_compensation/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetPostponementCompensationReport([FromRoute] string type,
@@ -495,6 +502,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("พนักงานราชการ")]
[HttpPost, Route("reports/personnel_salary_government_employee/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetPersonSalaryReport([FromRoute] string type,
@@ -1012,7 +1020,7 @@ namespace rmutr_report.Controllers
}
}
[SwaggerOperation("ข้าราชการ")]
[HttpPost, Route("reports/personnel_salary_government/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetPersonSalaryGovernmentReport([FromRoute] string type,
@@ -2105,7 +2113,7 @@ namespace rmutr_report.Controllers
}
}
[SwaggerOperation("ลูกจ้างประจํา")]
[HttpPost, Route("reports/personnel_salary_permanent/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetPersonSalaryReport([FromRoute] string type,
@@ -2797,6 +2805,7 @@ namespace rmutr_report.Controllers
}
}
[SwaggerOperation("ลูกจ้างชั่วคราว")]
[HttpPost, Route("reports/personnel_salary_temporary/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetTemporaryReport([FromRoute] string type,
@@ -3237,6 +3246,7 @@ namespace rmutr_report.Controllers
}
}
[SwaggerOperation("พนักงานมหาวิทยาลัย")]
[HttpPost, Route("reports/personnel_salary_university/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetPersonSalaryUniversityReport([FromRoute] string type,
@@ -4130,7 +4140,7 @@ namespace rmutr_report.Controllers
}
}
[SwaggerOperation("ค่าตอบแทนพนักงานราชการ")]
[HttpPost, Route("reports/set_personnel_budget/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetSetPersonBudgetReport([FromRoute] string type,
@@ -4809,6 +4819,7 @@ namespace rmutr_report.Controllers
}
}
[SwaggerOperation("การตั้งงบประมาณค่าใช้จ่ายบุคลากร")]
[HttpPost, Route("reports/personnel_expense_budget/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetSetPersonExBudgetReport([FromRoute] string type,
@@ -6215,6 +6226,7 @@ namespace rmutr_report.Controllers
}
}
[SwaggerOperation("บุคลากร งบประมาณแผ่นดิน")]
[HttpPost, Route("reports/national_budget/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetNationalBudgetReport([FromRoute] string type,
@@ -6480,6 +6492,7 @@ namespace rmutr_report.Controllers
}
}
[SwaggerOperation("งบประมาณ MTEF")]
[HttpPost, Route("reports/mtef_personnel/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetMtefReport([FromRoute] string type,
@@ -6863,6 +6876,7 @@ namespace rmutr_report.Controllers
}
}
[SwaggerOperation("ข้อมูลการตั้งงบประมาณค่าใช้จ่ายบุคลากร")]
[HttpPost, Route("reports/set_personnel_budget_university/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetSetPersonUniBudgetReport([FromRoute] string type,
@@ -8818,6 +8832,7 @@ namespace rmutr_report.Controllers
}
}
[SwaggerOperation("การตั้งงบประมาณค่าใช้จ่ายบุคลากร ของลูกจ้างประจำ")]
[HttpPost, Route("reports/set_personnel_budget_permanent/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetSetPersonPermanentReport([FromRoute] string type,
@@ -9483,13 +9498,14 @@ namespace rmutr_report.Controllers
}
}
[HttpPost, Route("reports/budget_proposal_details/{type}")]
[SwaggerOperation("รายละเอียดข้อเสนอวงเงิน, สรุปข้อเสนอวงเงิน")]
[HttpPost, Route("reports/budget_expenditure_proposal/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetPersonDetailReport([FromRoute] string type,
[FromBody] set_personnel_budget_permanent personnel)
[FromBody] budget_expenditure_proposal personnel)
{
var workbook = new XLWorkbook();
var ws = workbook.Worksheets.Add("รายละเอียด");
var ws = workbook.Worksheets.Add("Sheet1");
ws.Range("A1:AA1").Merge().Value = "รายละเอียดข้อเสนอวงเงินงบประมาณรายจ่ายประจำปีงบประมาณ พ.ศ. " +
personnel.academic_year_name_th;
ws.Range("A1:AA1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -9516,7 +9532,7 @@ namespace rmutr_report.Controllers
ws.Cell("A4").Style.Font.FontSize = 16;
ws.Cell("A4").Style.Font.Bold = true;
ws.Cell("A5").Value =
"ประเภทหน่วยงาน ..............(ส่วนราชการ/ส่วนราชการไม่สังกัดสำนักนายกรัฐมนตรี/รัฐวิสาหกิจ/องค์การมหาชน/หน่วยงานอิสระ/หน่วยงานศาล/หน่วยงานรัฐสภา/หน่วยงานอื่นของรัฐ)";
"ประเภทหน่วยงาน " + personnel.agency_type;
ws.Cell("A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell("A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("A5").Style.Font.FontName = "TH SarabunPSK";
@@ -9527,6 +9543,10 @@ namespace rmutr_report.Controllers
ws.Cell("AA5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell("AA5").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("AA5").Style.Font.FontSize = 16;
ws.Column(1).Width = 50;
ws.Column(2).Width = 15;
ws.Column(3).Width = 15;
ws.Column(4).Width = 15;
ws.Column(5).Width = 15;
ws.Column(6).Width = 15;
ws.Column(7).Width = 15;
@@ -9539,10 +9559,20 @@ namespace rmutr_report.Controllers
ws.Column(14).Width = 15;
ws.Column(15).Width = 15;
ws.Column(16).Width = 15;
ws.Column(17).Width = 30;
ws.Column(17).Width = 15;
ws.Column(18).Width = 15;
ws.Column(19).Width = 15;
ws.Column(20).Width = 15;
ws.Column(21).Width = 15;
ws.Column(22).Width = 15;
ws.Column(23).Width = 15;
ws.Column(24).Width = 15;
ws.Column(25).Width = 15;
ws.Column(26).Width = 15;
ws.Column(27).Width = 25;
int row = 12;
//int no = 1;
if (personnel != null)
{
ws.Range("A6:A11").Merge().Value = "รายการ";
@@ -9756,6 +9786,664 @@ namespace rmutr_report.Controllers
ws.Range("B11:Z11").Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Range("B11:Z11").Style.Border.LeftBorder = XLBorderStyleValues.Thin;
ws.Range("B7:Z11").Style.Alignment.WrapText = true;
foreach (var detail in personnel.budget_expenditure_proposal_details)
{
if (detail.topic_type == 1 && detail.topic == "รวมทั้งสิ้น")
{
ws.Cell(row, 1).Value = "รวมทั้งสิ้น";
ws.Cell(row, 2).Value = detail.act_year1_1;
ws.Cell(row, 3).Value = detail.act_year1_2;
ws.Cell(row, 4).Value = detail.disbursement_results_1;
ws.Cell(row, 5).Value = detail.disbursement_results_2;
ws.Cell(row, 6).Value = detail.budget_act_year2_1;
ws.Cell(row, 7).Value = detail.budget_act_year2_2;
ws.Cell(row, 8).Value = detail.adjust_the_base_year2_1;
ws.Cell(row, 9).Value = detail.adjust_the_base_year2_2;
ws.Cell(row, 10).Value = detail.request_1;
ws.Cell(row, 11).Value = detail.request_2;
ws.Cell(row, 12).Value = detail.offer_account1_1;
ws.Cell(row, 13).Value = detail.offer_account1_2;
ws.Cell(row, 14).Value = detail.offer_increase_decrease_1;
ws.Cell(row, 15).Value = detail.offer_increase_decrease_2;
ws.Cell(row, 16).Value = detail.offer_new_rate_1;
ws.Cell(row, 17).Value = detail.offer_new_rate_2;
ws.Cell(row, 18).Value = detail.offer_total_1;
ws.Cell(row, 19).Value = detail.offer_total_2;
ws.Cell(row, 20).Value = detail.increase_decrease_from_year_1;
ws.Cell(row, 21).Value = detail.increase_decrease_from_year_2;
ws.Cell(row, 22).Value = detail.increase_decrease_from_year_3;
ws.Cell(row, 23).Value = detail.increase_decrease_from_year_4;
ws.Cell(row, 24).Value = detail.mtef_1;
ws.Cell(row, 25).Value = detail.mtef_2;
ws.Cell(row, 26).Value = detail.mtef_3;
ws.Cell(row, 27).Value = detail.remark;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 27).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Fill.BackgroundColor =
XLColor.FromArgb(255, 242, 204);
ws.Cell(row, 3).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 5).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 7).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 9).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 11).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 13).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 15).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 17).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 19).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 22).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 24).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 25).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 26).Style.NumberFormat.SetFormat("#,#0.0000");
row++;
}
if (detail.topic_type == 1 && detail.topic != "รวมทั้งสิ้น")
{
ws.Cell(row, 1).Value = detail.topic;
ws.Cell(row, 2).Value = detail.act_year1_1;
ws.Cell(row, 3).Value = detail.act_year1_2;
ws.Cell(row, 4).Value = detail.disbursement_results_1;
ws.Cell(row, 5).Value = detail.disbursement_results_2;
ws.Cell(row, 6).Value = detail.budget_act_year2_1;
ws.Cell(row, 7).Value = detail.budget_act_year2_2;
ws.Cell(row, 8).Value = detail.adjust_the_base_year2_1;
ws.Cell(row, 9).Value = detail.adjust_the_base_year2_2;
ws.Cell(row, 10).Value = detail.request_1;
ws.Cell(row, 11).Value = detail.request_2;
ws.Cell(row, 12).Value = detail.offer_account1_1;
ws.Cell(row, 13).Value = detail.offer_account1_2;
ws.Cell(row, 14).Value = detail.offer_increase_decrease_1;
ws.Cell(row, 15).Value = detail.offer_increase_decrease_2;
ws.Cell(row, 16).Value = detail.offer_new_rate_1;
ws.Cell(row, 17).Value = detail.offer_new_rate_2;
ws.Cell(row, 18).Value = detail.offer_total_1;
ws.Cell(row, 19).Value = detail.offer_total_2;
ws.Cell(row, 20).Value = detail.increase_decrease_from_year_1;
ws.Cell(row, 21).Value = detail.increase_decrease_from_year_2;
ws.Cell(row, 22).Value = detail.increase_decrease_from_year_3;
ws.Cell(row, 23).Value = detail.increase_decrease_from_year_4;
ws.Cell(row, 24).Value = detail.mtef_1;
ws.Cell(row, 25).Value = detail.mtef_2;
ws.Cell(row, 26).Value = detail.mtef_3;
ws.Cell(row, 27).Value = detail.remark;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 27).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Fill.BackgroundColor =
XLColor.FromArgb(255, 242, 204);
ws.Cell(row, 3).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 5).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 7).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 9).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 11).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 13).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 15).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 17).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 19).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 22).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 24).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 25).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 26).Style.NumberFormat.SetFormat("#,#0.0000");
row++;
}
if (detail.topic_type == 2)
{
ws.Cell(row, 1).Value = detail.topic;
ws.Cell(row, 2).Value = detail.act_year1_1;
ws.Cell(row, 3).Value = detail.act_year1_2;
ws.Cell(row, 4).Value = detail.disbursement_results_1;
ws.Cell(row, 5).Value = detail.disbursement_results_2;
ws.Cell(row, 6).Value = detail.budget_act_year2_1;
ws.Cell(row, 7).Value = detail.budget_act_year2_2;
ws.Cell(row, 8).Value = detail.adjust_the_base_year2_1;
ws.Cell(row, 9).Value = detail.adjust_the_base_year2_2;
ws.Cell(row, 10).Value = detail.request_1;
ws.Cell(row, 11).Value = detail.request_2;
ws.Cell(row, 12).Value = detail.offer_account1_1;
ws.Cell(row, 13).Value = detail.offer_account1_2;
ws.Cell(row, 14).Value = detail.offer_increase_decrease_1;
ws.Cell(row, 15).Value = detail.offer_increase_decrease_2;
ws.Cell(row, 16).Value = detail.offer_new_rate_1;
ws.Cell(row, 17).Value = detail.offer_new_rate_2;
ws.Cell(row, 18).Value = detail.offer_total_1;
ws.Cell(row, 19).Value = detail.offer_total_2;
ws.Cell(row, 20).Value = detail.increase_decrease_from_year_1;
ws.Cell(row, 21).Value = detail.increase_decrease_from_year_2;
ws.Cell(row, 22).Value = detail.increase_decrease_from_year_3;
ws.Cell(row, 23).Value = detail.increase_decrease_from_year_4;
ws.Cell(row, 24).Value = detail.mtef_1;
ws.Cell(row, 25).Value = detail.mtef_2;
ws.Cell(row, 26).Value = detail.mtef_3;
ws.Cell(row, 27).Value = detail.remark;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 27).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Fill.BackgroundColor =
XLColor.FromArgb(198, 224, 180);
ws.Cell(row, 3).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 5).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 7).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 9).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 11).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 13).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 15).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 17).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 19).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 22).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 24).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 25).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 26).Style.NumberFormat.SetFormat("#,#0.0000");
row++;
}
if (detail.topic_type == 3)
{
ws.Cell(row, 1).Value = detail.topic;
ws.Cell(row, 2).Value = detail.act_year1_1;
ws.Cell(row, 3).Value = detail.act_year1_2;
ws.Cell(row, 4).Value = detail.disbursement_results_1;
ws.Cell(row, 5).Value = detail.disbursement_results_2;
ws.Cell(row, 6).Value = detail.budget_act_year2_1;
ws.Cell(row, 7).Value = detail.budget_act_year2_2;
ws.Cell(row, 8).Value = detail.adjust_the_base_year2_1;
ws.Cell(row, 9).Value = detail.adjust_the_base_year2_2;
ws.Cell(row, 10).Value = detail.request_1;
ws.Cell(row, 11).Value = detail.request_2;
ws.Cell(row, 12).Value = detail.offer_account1_1;
ws.Cell(row, 13).Value = detail.offer_account1_2;
ws.Cell(row, 14).Value = detail.offer_increase_decrease_1;
ws.Cell(row, 15).Value = detail.offer_increase_decrease_2;
ws.Cell(row, 16).Value = detail.offer_new_rate_1;
ws.Cell(row, 17).Value = detail.offer_new_rate_2;
ws.Cell(row, 18).Value = detail.offer_total_1;
ws.Cell(row, 19).Value = detail.offer_total_2;
ws.Cell(row, 20).Value = detail.increase_decrease_from_year_1;
ws.Cell(row, 21).Value = detail.increase_decrease_from_year_2;
ws.Cell(row, 22).Value = detail.increase_decrease_from_year_3;
ws.Cell(row, 23).Value = detail.increase_decrease_from_year_4;
ws.Cell(row, 24).Value = detail.mtef_1;
ws.Cell(row, 25).Value = detail.mtef_2;
ws.Cell(row, 26).Value = detail.mtef_3;
ws.Cell(row, 27).Value = detail.remark;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 27).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Fill.BackgroundColor =
XLColor.FromArgb(217, 225, 242);
ws.Cell(row, 3).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 5).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 7).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 9).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 11).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 13).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 15).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 17).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 19).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 22).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 24).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 25).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 26).Style.NumberFormat.SetFormat("#,#0.0000");
row++;
}
if (detail.topic_type == 4)
{
ws.Cell(row, 1).Value = detail.topic;
ws.Cell(row, 2).Value = detail.act_year1_1;
ws.Cell(row, 3).Value = detail.act_year1_2;
ws.Cell(row, 4).Value = detail.disbursement_results_1;
ws.Cell(row, 5).Value = detail.disbursement_results_2;
ws.Cell(row, 6).Value = detail.budget_act_year2_1;
ws.Cell(row, 7).Value = detail.budget_act_year2_2;
ws.Cell(row, 8).Value = detail.adjust_the_base_year2_1;
ws.Cell(row, 9).Value = detail.adjust_the_base_year2_2;
ws.Cell(row, 10).Value = detail.request_1;
ws.Cell(row, 11).Value = detail.request_2;
ws.Cell(row, 12).Value = detail.offer_account1_1;
ws.Cell(row, 13).Value = detail.offer_account1_2;
ws.Cell(row, 14).Value = detail.offer_increase_decrease_1;
ws.Cell(row, 15).Value = detail.offer_increase_decrease_2;
ws.Cell(row, 16).Value = detail.offer_new_rate_1;
ws.Cell(row, 17).Value = detail.offer_new_rate_2;
ws.Cell(row, 18).Value = detail.offer_total_1;
ws.Cell(row, 19).Value = detail.offer_total_2;
ws.Cell(row, 20).Value = detail.increase_decrease_from_year_1;
ws.Cell(row, 21).Value = detail.increase_decrease_from_year_2;
ws.Cell(row, 22).Value = detail.increase_decrease_from_year_3;
ws.Cell(row, 23).Value = detail.increase_decrease_from_year_4;
ws.Cell(row, 24).Value = detail.mtef_1;
ws.Cell(row, 25).Value = detail.mtef_2;
ws.Cell(row, 26).Value = detail.mtef_3;
ws.Cell(row, 27).Value = detail.remark;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 27).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Fill.BackgroundColor =
XLColor.FromArgb(252, 228, 214);
ws.Cell(row, 3).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 5).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 7).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 9).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 11).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 13).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 15).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 17).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 19).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 22).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 24).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 25).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 26).Style.NumberFormat.SetFormat("#,#0.0000");
row++;
}
if (detail.topic_type == 5)
{
ws.Cell(row, 1).Value = detail.topic;
ws.Cell(row, 2).Value = detail.act_year1_1;
ws.Cell(row, 3).Value = detail.act_year1_2;
ws.Cell(row, 4).Value = detail.disbursement_results_1;
ws.Cell(row, 5).Value = detail.disbursement_results_2;
ws.Cell(row, 6).Value = detail.budget_act_year2_1;
ws.Cell(row, 7).Value = detail.budget_act_year2_2;
ws.Cell(row, 8).Value = detail.adjust_the_base_year2_1;
ws.Cell(row, 9).Value = detail.adjust_the_base_year2_2;
ws.Cell(row, 10).Value = detail.request_1;
ws.Cell(row, 11).Value = detail.request_2;
ws.Cell(row, 12).Value = detail.offer_account1_1;
ws.Cell(row, 13).Value = detail.offer_account1_2;
ws.Cell(row, 14).Value = detail.offer_increase_decrease_1;
ws.Cell(row, 15).Value = detail.offer_increase_decrease_2;
ws.Cell(row, 16).Value = detail.offer_new_rate_1;
ws.Cell(row, 17).Value = detail.offer_new_rate_2;
ws.Cell(row, 18).Value = detail.offer_total_1;
ws.Cell(row, 19).Value = detail.offer_total_2;
ws.Cell(row, 20).Value = detail.increase_decrease_from_year_1;
ws.Cell(row, 21).Value = detail.increase_decrease_from_year_2;
ws.Cell(row, 22).Value = detail.increase_decrease_from_year_3;
ws.Cell(row, 23).Value = detail.increase_decrease_from_year_4;
ws.Cell(row, 24).Value = detail.mtef_1;
ws.Cell(row, 25).Value = detail.mtef_2;
ws.Cell(row, 26).Value = detail.mtef_3;
ws.Cell(row, 27).Value = detail.remark;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 27).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Fill.BackgroundColor =
XLColor.FromArgb(226, 239, 218);
ws.Cell(row, 3).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 5).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 7).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 9).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 11).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 13).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 15).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 17).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 19).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 22).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 24).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 25).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 26).Style.NumberFormat.SetFormat("#,#0.0000");
row++;
}
if (detail.topic_type == 6)
{
ws.Cell(row, 1).Value = " " + detail.topic;
ws.Cell(row, 2).Value = detail.act_year1_1;
ws.Cell(row, 3).Value = detail.act_year1_2;
ws.Cell(row, 4).Value = detail.disbursement_results_1;
ws.Cell(row, 5).Value = detail.disbursement_results_2;
ws.Cell(row, 6).Value = detail.budget_act_year2_1;
ws.Cell(row, 7).Value = detail.budget_act_year2_2;
ws.Cell(row, 8).Value = detail.adjust_the_base_year2_1;
ws.Cell(row, 9).Value = detail.adjust_the_base_year2_2;
ws.Cell(row, 10).Value = detail.request_1;
ws.Cell(row, 11).Value = detail.request_2;
ws.Cell(row, 12).Value = detail.offer_account1_1;
ws.Cell(row, 13).Value = detail.offer_account1_2;
ws.Cell(row, 14).Value = detail.offer_increase_decrease_1;
ws.Cell(row, 15).Value = detail.offer_increase_decrease_2;
ws.Cell(row, 16).Value = detail.offer_new_rate_1;
ws.Cell(row, 17).Value = detail.offer_new_rate_2;
ws.Cell(row, 18).Value = detail.offer_total_1;
ws.Cell(row, 19).Value = detail.offer_total_2;
ws.Cell(row, 20).Value = detail.increase_decrease_from_year_1;
ws.Cell(row, 21).Value = detail.increase_decrease_from_year_2;
ws.Cell(row, 22).Value = detail.increase_decrease_from_year_3;
ws.Cell(row, 23).Value = detail.increase_decrease_from_year_4;
ws.Cell(row, 24).Value = detail.mtef_1;
ws.Cell(row, 25).Value = detail.mtef_2;
ws.Cell(row, 26).Value = detail.mtef_3;
ws.Cell(row, 27).Value = detail.remark;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 27).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
//ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Fill.BackgroundColor = XLColor.FromArgb(252, 228, 214);
ws.Cell(row, 3).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 5).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 7).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 9).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 11).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 13).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 15).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 17).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 19).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 22).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 24).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 25).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 26).Style.NumberFormat.SetFormat("#,#0.0000");
row++;
}
if (detail.topic_type == 7)
{
ws.Cell(row, 1).Value = " " + detail.topic;
ws.Cell(row, 2).Value = detail.act_year1_1;
ws.Cell(row, 3).Value = detail.act_year1_2;
ws.Cell(row, 4).Value = detail.disbursement_results_1;
ws.Cell(row, 5).Value = detail.disbursement_results_2;
ws.Cell(row, 6).Value = detail.budget_act_year2_1;
ws.Cell(row, 7).Value = detail.budget_act_year2_2;
ws.Cell(row, 8).Value = detail.adjust_the_base_year2_1;
ws.Cell(row, 9).Value = detail.adjust_the_base_year2_2;
ws.Cell(row, 10).Value = detail.request_1;
ws.Cell(row, 11).Value = detail.request_2;
ws.Cell(row, 12).Value = detail.offer_account1_1;
ws.Cell(row, 13).Value = detail.offer_account1_2;
ws.Cell(row, 14).Value = detail.offer_increase_decrease_1;
ws.Cell(row, 15).Value = detail.offer_increase_decrease_2;
ws.Cell(row, 16).Value = detail.offer_new_rate_1;
ws.Cell(row, 17).Value = detail.offer_new_rate_2;
ws.Cell(row, 18).Value = detail.offer_total_1;
ws.Cell(row, 19).Value = detail.offer_total_2;
ws.Cell(row, 20).Value = detail.increase_decrease_from_year_1;
ws.Cell(row, 21).Value = detail.increase_decrease_from_year_2;
ws.Cell(row, 22).Value = detail.increase_decrease_from_year_3;
ws.Cell(row, 23).Value = detail.increase_decrease_from_year_4;
ws.Cell(row, 24).Value = detail.mtef_1;
ws.Cell(row, 25).Value = detail.mtef_2;
ws.Cell(row, 26).Value = detail.mtef_3;
ws.Cell(row, 27).Value = detail.remark;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 27).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
//ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Fill.BackgroundColor = XLColor.FromArgb(226, 239, 218);
ws.Cell(row, 3).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 5).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 7).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 9).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 11).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 13).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 15).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 17).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 19).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 22).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 24).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 25).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 26).Style.NumberFormat.SetFormat("#,#0.0000");
row++;
}
if (detail.topic_type == 8)
{
ws.Cell(row, 1).Value = " " + detail.topic;
ws.Cell(row, 2).Value = detail.act_year1_1;
ws.Cell(row, 3).Value = detail.act_year1_2;
ws.Cell(row, 4).Value = detail.disbursement_results_1;
ws.Cell(row, 5).Value = detail.disbursement_results_2;
ws.Cell(row, 6).Value = detail.budget_act_year2_1;
ws.Cell(row, 7).Value = detail.budget_act_year2_2;
ws.Cell(row, 8).Value = detail.adjust_the_base_year2_1;
ws.Cell(row, 9).Value = detail.adjust_the_base_year2_2;
ws.Cell(row, 10).Value = detail.request_1;
ws.Cell(row, 11).Value = detail.request_2;
ws.Cell(row, 12).Value = detail.offer_account1_1;
ws.Cell(row, 13).Value = detail.offer_account1_2;
ws.Cell(row, 14).Value = detail.offer_increase_decrease_1;
ws.Cell(row, 15).Value = detail.offer_increase_decrease_2;
ws.Cell(row, 16).Value = detail.offer_new_rate_1;
ws.Cell(row, 17).Value = detail.offer_new_rate_2;
ws.Cell(row, 18).Value = detail.offer_total_1;
ws.Cell(row, 19).Value = detail.offer_total_2;
ws.Cell(row, 20).Value = detail.increase_decrease_from_year_1;
ws.Cell(row, 21).Value = detail.increase_decrease_from_year_2;
ws.Cell(row, 22).Value = detail.increase_decrease_from_year_3;
ws.Cell(row, 23).Value = detail.increase_decrease_from_year_4;
ws.Cell(row, 24).Value = detail.mtef_1;
ws.Cell(row, 25).Value = detail.mtef_2;
ws.Cell(row, 26).Value = detail.mtef_3;
ws.Cell(row, 27).Value = detail.remark;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 27).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
//ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Fill.BackgroundColor = XLColor.FromArgb(226, 239, 218);
ws.Cell(row, 3).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 5).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 7).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 9).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 11).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 13).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 15).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 17).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 19).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 22).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 24).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 25).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 26).Style.NumberFormat.SetFormat("#,#0.0000");
row++;
}
if (detail.topic_type == 9)
{
ws.Cell(row, 1).Value = " " + detail.topic;
ws.Cell(row, 2).Value = detail.act_year1_1;
ws.Cell(row, 3).Value = detail.act_year1_2;
ws.Cell(row, 4).Value = detail.disbursement_results_1;
ws.Cell(row, 5).Value = detail.disbursement_results_2;
ws.Cell(row, 6).Value = detail.budget_act_year2_1;
ws.Cell(row, 7).Value = detail.budget_act_year2_2;
ws.Cell(row, 8).Value = detail.adjust_the_base_year2_1;
ws.Cell(row, 9).Value = detail.adjust_the_base_year2_2;
ws.Cell(row, 10).Value = detail.request_1;
ws.Cell(row, 11).Value = detail.request_2;
ws.Cell(row, 12).Value = detail.offer_account1_1;
ws.Cell(row, 13).Value = detail.offer_account1_2;
ws.Cell(row, 14).Value = detail.offer_increase_decrease_1;
ws.Cell(row, 15).Value = detail.offer_increase_decrease_2;
ws.Cell(row, 16).Value = detail.offer_new_rate_1;
ws.Cell(row, 17).Value = detail.offer_new_rate_2;
ws.Cell(row, 18).Value = detail.offer_total_1;
ws.Cell(row, 19).Value = detail.offer_total_2;
ws.Cell(row, 20).Value = detail.increase_decrease_from_year_1;
ws.Cell(row, 21).Value = detail.increase_decrease_from_year_2;
ws.Cell(row, 22).Value = detail.increase_decrease_from_year_3;
ws.Cell(row, 23).Value = detail.increase_decrease_from_year_4;
ws.Cell(row, 24).Value = detail.mtef_1;
ws.Cell(row, 25).Value = detail.mtef_2;
ws.Cell(row, 26).Value = detail.mtef_3;
ws.Cell(row, 27).Value = detail.remark;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 27).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 26)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
//ws.Range(ws.Cell(row, 1), ws.Cell(row, 27)).Style.Fill.BackgroundColor = XLColor.FromArgb(226, 239, 218);
ws.Cell(row, 3).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 5).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 7).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 9).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 11).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 13).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 15).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 17).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 19).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 22).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 24).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 25).Style.NumberFormat.SetFormat("#,#0.0000");
ws.Cell(row, 26).Style.NumberFormat.SetFormat("#,#0.0000");
row++;
}
}
ws.Cell(row, 1).Value =
"หมายเหตุ : 1. บัญชี 2 หมายถึง อัตราใหม่ เงินเพิ่มอื่นที่จ่ายควบกับเงินเดือนและค่าใช้จ่ายตามสิทธิที่กฎหมายกำหนดให้จ่ายแก่อัตราตั้งใหม่ 2. การกำหนดทะเบียนรายการ /ชื่อรายการ ต้องตรงกับชื่อที่กำหนดไว้ตามกฎหมาย และระเบียบที่เกี่ยวข้อง";
ws.Cell(row, 1).Style.Font.FontName =
"TH SarabunPSK";
ws.Cell(row, 1).Style.Font.FontSize = 16;
ws.Cell(row, 1).Style.Alignment.WrapText = true;
}
using (var stream1 = new MemoryStream())
@@ -9766,7 +10454,7 @@ namespace rmutr_report.Controllers
return File(
content,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"budget_proposal_details_" + date + ".xlsx");
"budget_expenditure_proposal_" + date + ".xlsx");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using ClosedXML.Excel;
using FastReport;
using FastReport.Export.Csv;
@@ -13,47 +14,391 @@ using Swashbuckle.AspNetCore.Annotations;
namespace rmutr_report.Controllers
{
[SwaggerTag("สำหรับรายงานคำขอโครงการพันธุกรรมพืช ง.5-2.1")]
public class plant_genetic_conservation_project: Controller
public class plant_genetic_conservation_project : Controller
{
readonly Setting _setting;
readonly Setting _setting;
public plant_genetic_conservation_project(Setting setting)
{
this._setting = setting;
}
[HttpPost, Route("reports/plant_genetic_conservation_project/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetConservationProjectReport([FromRoute] string type, [FromBody] conservation_project project)
{
foreach (var v in project.five)
{
string na = "ประเด็นยุทธศาสตร์ที่ " ;
v.strategic_issues = na + v.strategic_issues;
string na2 = "กลยุทธ์ที่ " ;
v.measure = na2 + v.measure;
}
foreach (var v in project.eleventh)
{
foreach (var vv in v.elevenths)
{
string na = "ครั้งที่ ";
vv.the_time = na + vv.the_time;
// string na2 = " จำนวน ";
// vv.count_day = na2 + vv.count_day + " วัน";
// if (project.count_day != null)
// {
// project.text3 = "จำนวน " + project.count_day + " วัน";
// }
[HttpPost, Route("reports/plant_genetic_conservation_project/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetConservationProjectReport([FromRoute] string type,
[FromBody] project_principle_rationale project)
{
if (project != null)
{
if (project.activity.Any())
{
if (project.activity == null)
{
foreach (var detail in project.activity)
{
detail.activity = null;
}
}
}
else
{
project.activity.Add(new activity_data()
{
activity = ""
});
}
if (project.ninth != null)
{
foreach (var vv in project.ninth)
{
if (vv.clause == "9.1 ตัวชี้วัดผลสัมฤทธิ์")
{
vv.clause = "12.1 ตัวชี้วัดผลสัมฤทธิ์";
}
if (vv.clause == "9.2 ตัวชี้วัดเชิงนโยบาย")
{
vv.clause = "12.2 ตัวชี้วัดเชิงนโยบาย";
}
if (vv.ninths.Any())
{
if (vv.ninths == null)
{
foreach (var detail6 in vv.ninths)
{
detail6.detail = null;
}
}
}
else
{
vv.ninths.Add(new ninth_data_detail()
{
detail = ""
});
}
}
}
if (project.sixteenths != null)
{
int t = 1;
foreach (var sixteenthData in project.sixteenths)
{
string a = "กิจกรรมที่ " + t + " ";
var sum1 = sixteenthData.sixteenths2.Sum(d => d.salaya);
var sum2 = sixteenthData.sixteenths2.Sum(d => d.bophitphimuk);
var sum3 = sixteenthData.sixteenths2.Sum(d => d.pohchang);
var sum4 = sixteenthData.sixteenths2.Sum(d => d.klai_kangwon);
sixteenthData.salaya_total = sum1;
sixteenthData.bophitphimuk_total = sum2;
sixteenthData.pohchang_total = sum3;
sixteenthData.klai_kangwon_total = sum4;
if (sixteenthData.activity_table != null)
{
sixteenthData.activity_table = a + sixteenthData.activity_table;
}
if (sixteenthData.activity_table == null)
{
sixteenthData.activity_table = null;
}
if (sixteenthData.total_target != null)
{
project.text1 = "ผลรวมกลุ่มเป้าหมาย " + sixteenthData.total_target;
}
if (sixteenthData.total_target == null)
{
project.text1 = "ผลรวมกลุ่มเป้าหมาย -";
}
if (sixteenthData.total_board != null)
{
project.text2 = "ผลรวมคณะกรรมการ " + sixteenthData.total_board;
}
if (sixteenthData.total_board == null)
{
project.text2 = "ผลรวมคณะกรรมการ -";
}
t++;
}
}
if (project.seventeenth != null)
{
int t = 1;
//int ti= 1;
foreach (var v in project.seventeenth)
{
string a = "กิจกรรมที่ " + t + " ";
if (v.activity != null)
{
v.activity = a + v.activity;
}
if (v.activity == null)
{
v.activity = null;
}
t++;
foreach (var vv in v.seventeenths)
{
string na = "ครั้งที่ ";
vv.the_time = na + "1";
//ti++;
foreach (var detail in vv.seventeenths2)
{
string in1 = "พื้นที่ (ภายในมหาวิทยาลัย) ";
string in2 = "ระบุสถานที่ ";
string out1 = "จังหวัด (ภายนอกมหาวิทยาลัย) ";
if (detail.internal_external1 == "ภายในมหาวิทยาลัย")
{
detail.text1 = "ภายในมหาวิทยาลัย";
detail.area_province1 = in1 + detail.area_province1;
detail.location1 = in2 + detail.location1;
}
if (detail.internal_external2 == "ภายนอกมหาวิทยาลัย")
{
detail.text2 = "ภายนอกมหาวิทยาลัย";
detail.area_province2 = out1 + detail.area_province2;
detail.location2 = in2 + detail.location2;
}
}
}
}
}
if (project.eighteenth != null)
{
int t = 1;
//int ti = 1;
foreach (var v in project.eighteenth)
{
string a = "กิจกรรมที่ " + t + " ";
if (v.activity != null)
{
v.activity = a + v.activity;
}
if (v.activity == null)
{
v.activity = null;
}
t++;
foreach (var vv in v.eighteenths)
{
string na = "ครั้งที่ ";
vv.the_time = na + vv.the_time;
//ti++;
string na2 = " จำนวน ";
vv.count_day = na2 + vv.count_day + " วัน";
if (project.count_day != null)
{
project.text3 = "จำนวน " + project.count_day + " วัน";
}
}
}
}
if (project.nineteenth != null)
{
int t = 1;
foreach (var v in project.nineteenth)
{
foreach (var vv in v.nineteenth_data_header)
{
string a = "กิจกรรมที่ " + t + " ";
if (vv.activity != null)
{
vv.activity = a + vv.activity;
}
if (vv.activity == null)
{
vv.activity = null;
}
t++;
}
}
}
if (project.twenty_one != null)
{
int t = 1;
foreach (var v in project.twenty_one)
{
string a = "กิจกรรมที่ " + t + " ";
if (v.activity != null)
{
v.activity = a + v.activity;
}
if (v.activity == null)
{
v.activity = null;
}
t++;
foreach (var vv in v.twenty_ones)
{
// if (vv.clause1 != null || vv.clause1 != "")
// {
// vv.clause1 = vv.clause1;
// }
//
// if (vv.clause2 != null || vv.clause2 != "")
// {
// vv.clause2 = vv.clause2;
// }
//
// if (vv.clause3 != null || vv.clause3 != "")
// {
// vv.clause3 = vv.clause3;
// }
//
// if (vv.clause4 != null || vv.clause4 != "")
// {
// vv.clause4 = vv.clause4;
// }
if (vv.count_quantitative != null)
{
string na = " หน่วยนับ";
vv.khrang1 = na;
}
if (vv.count_unit != null)
{
string na = "ผู้เข้าร่วมโครงการ ";
string na1 = " จำนวน ";
string na2 = " คน";
vv.text1 = na;
vv.text11 = na1;
vv.nuai_nap = na2;
}
if (vv.count_project != null)
{
vv.clause1 = "24.1 เชิงปริมาณ";
string na = "จำนวนครั้งที่ดำเนินโครงการ ";
string na2 = " ครั้ง";
vv.text2 = na;
vv.khrang2 = na2;
vv.text12 = "หน่วยนับ";
}
if (vv.count_training != null)
{
string na = "จำนวนการจัดอบรมและสัมมนา ";
string na2 = " เรื่อง";
vv.text3 = na;
vv.rueang = na2;
}
if (vv.count_knowledge != null)
{
string na = "จำนวนเผยแพร่ความรู้บริการวิชาการ ";
string na2 = " ครั้ง";
vv.text4 = na;
vv.khrang3 = na2;
}
if (vv.percentage_finish != null)
{
vv.clause2 = "24.2 เชิงเวลา";
// string na3 = "วัน/เดือน/ปี ที่จะดำเนินโครงการ ";
// string na4 = " ถึง ";
// vv.range = na4;
// vv.text5 = na3;
string na5 = "โครงการแล้วเสร็จตามเวลาที่กำหนด (ร้อยละ) ";
vv.text6 = na5;
}
if (vv.percentage1 != null || vv.percentage2 != null)
{
vv.clause3 = "24.3 เชิงคุณภาพ";
string na = "ผู้เข้าร่วมโครงการมีความรู้ความเข้าใจเพิ่มขึ้น (ร้อยละ) ";
string na1 = "ความพึงพอใจของผู้เข้ารับบริการในกระบวนการให้บริการ (ร้อยละ) ";
string na2 = "โครงการที่บรรลุผลตามวัตถุประสงค์ของโครงการ (ร้อยละ) ";
vv.text7 = na;
vv.text8 = na1;
vv.text9 = "ผู้เข้าร่วมโครงการสามารถนำความรู้ที่ได้รับไปบูรณาการอย่างไรบ้าง";
vv.text10 = na2;
}
if (vv.expenses != null)
{
vv.clause4 = "24.4 เชิงค่าใช้จ่าย";
vv.bath = " บาท";
}
}
}
}
}
var _project = new List<conservation_project>() {project};
if (project.twenty_four != null)
{
int t = 1;
foreach (var v in project.twenty_four)
{
string a = "กิจกรรมที่ " + t + " ";
if (v.activity != null)
{
v.activity = a + v.activity;
}
if (v.activity == null)
{
v.activity = null;
}
t++;
}
}
if (project.twenty_fifth != null)
{
int t = 1;
foreach (var v in project.twenty_fifth)
{
foreach (var acti in v.activity)
{
v.activitys = acti;
}
foreach (var locat in v.location)
{
v.locations = locat;
}
string a = "กิจกรรมที่ " + t + " ";
if (v.activity_display_name != null)
{
v.activity_display_name = a + v.activity_display_name;
}
if (v.activity_display_name == null)
{
v.activity_display_name = null;
}
t++;
}
}
var _project = new List<project_principle_rationale>() { project };
Report report = new Report();
report.Load(_setting.report_path + "plant_genetic_conservation_project.frx");
report.RegisterData(_project, "conservation_project");
report.RegisterData(_project, "project_principle_rationale");
report.Prepare();
MemoryStream stream = new MemoryStream();
@@ -84,7 +429,8 @@ namespace rmutr_report.Controllers
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "text/csv");
break;
case "doc": case "docx":
case "doc":
case "docx":
Word2007Export word = new Word2007Export();
report.Export(word, stream);
stream.Seek(0, SeekOrigin.Begin);
@@ -94,6 +440,5 @@ namespace rmutr_report.Controllers
return Ok();
}
}
}
@@ -0,0 +1,127 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using FastReport;
using FastReport.Export.OoXML;
using FastReport.Export.Pdf;
using Microsoft.AspNetCore.Mvc;
using rmutr_report.Models;
using Swashbuckle.AspNetCore.Annotations;
namespace rmutr_report.Controllers
{
[SwaggerTag("แบบรายงานผลการดำเนินงานโครงการ")]
public class projectPerformanceForm : Controller
{
readonly Setting _setting;
public projectPerformanceForm(Setting setting)
{
_setting = setting;
}
[HttpPost, Route("reports/project_performance_report_form/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetProjectPerformanceReport([FromRoute] string type,
[FromBody] project_performance_report_form reportForm)
{
if (reportForm.national_budget_money==true)
{
reportForm.check_box1 = "/";
}
if (reportForm.income_budget==true)
{
reportForm.check_box2 = "/";
}
if (reportForm.other==true)
{
reportForm.check_box3 = "/";
}
if (reportForm.digital_innovation==true)
{
reportForm.check_box4 = "/";
}
if (reportForm.moral==true)
{
reportForm.check_box5 = "/";
}
if (reportForm.open_mind==true)
{
reportForm.check_box6 = "/";
}
if (reportForm.value==true)
{
reportForm.check_box7 = "/";
}
if (reportForm.entrepreneurship==true)
{
reportForm.check_box8 = "/";
}
if (reportForm.unity==true)
{
reportForm.check_box9 = "/";
}
if (reportForm.porfessional==true)
{
reportForm.check_box10 = "/";
}
if (reportForm.check_twenty_four==true)
{
reportForm.check_twenty_four1 = "/";
}
if (reportForm.check_twenty_four==false)
{
reportForm.check_twenty_four2 = "/";
}
if (reportForm.project_style!=null)
{
foreach (var projects in reportForm.project_style)
{
if (projects.check == true)
{
projects.checkbox = "/";
}
if (projects.check == false)
{
projects.checkbox = null;
}
}
}
if (reportForm.twenty_four_table!=null)
{
var sum1 = reportForm.twenty_four_table.Sum(g => g.amount_1);
var sum2 = reportForm.twenty_four_table.Sum(g => g.amount_2);
reportForm.total_amount_1 = sum1;
reportForm.total_amount_2 = sum2;
}
var projectPerformance = new List<project_performance_report_form>() { reportForm };
Report report = new Report();
report.Load(_setting.report_path + "project_performance_report_form.frx");
report.RegisterData(projectPerformance, "project_performance_report_form");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"project_performance_report_form" + ".xlsx");
}
return Ok();
}
}
}
+37 -36
View File
@@ -84,21 +84,21 @@ namespace rmutr_report.Controllers
ws.Cell("D6").Style.Font.FontSize = 16;
ws.Cell("D6").Style.Font.Bold = true;
ws.Cell("D6").Style.Alignment.WrapText = true;
// ws.Cell("E5").Value = "ค่าซ่อมแซม";
// ws.Cell("E5").Style.Font.FontName = "TH SarabunPSK";
// ws.Cell("E5").Style.Font.FontSize = 16;
// ws.Cell("E5").Style.Font.Bold = true;
// ws.Cell("E5").Style.Alignment.WrapText = true;
// ws.Cell("E6").Value = "บาท/ปี";
// ws.Cell("E6").Style.Font.FontName = "TH SarabunPSK";
// ws.Cell("E6").Style.Font.FontSize = 16;
// ws.Cell("E6").Style.Font.Bold = true;
// ws.Cell("E6").Style.Alignment.WrapText = true;
ws.Cell("E5").Value = "ค่าซ่อมแซม";
ws.Cell("E5").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("E5").Style.Font.FontSize = 16;
ws.Cell("E5").Style.Font.Bold = true;
ws.Cell("E5").Style.Alignment.WrapText = true;
ws.Cell("E6").Value = "บาท/ปี";
ws.Cell("E6").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("E6").Style.Font.FontSize = 16;
ws.Cell("E6").Style.Font.Bold = true;
ws.Cell("E6").Style.Alignment.WrapText = true;
ws.Range("A5:D6").Style.Fill.BackgroundColor = XLColor.Gainsboro;
ws.Range("A5:D6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A5:D6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("A5:D6").Style.Border.OutsideBorder =
ws.Range("A5:E6").Style.Fill.BackgroundColor = XLColor.Gainsboro;
ws.Range("A5:E6").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A5:E6").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("A5:E6").Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range("A5:A6").Style.Border.RightBorder =
XLBorderStyleValues.Thin;
@@ -108,12 +108,13 @@ namespace rmutr_report.Controllers
XLBorderStyleValues.Thin;
ws.Range("D5:D6").Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range("E5:E6").Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Column(1).Width = 10;
ws.Column(2).Width = 40;
ws.Column(3).Width = 10;
ws.Column(4).Width = 15;
//ws.Column(5).Width = 15;
ws.Column(5).Width = 15;
int row = 7;
//int row2 = 9;
@@ -128,27 +129,27 @@ namespace rmutr_report.Controllers
ws.Cell(row, 2).Value = house.type_vehicle_transport;
ws.Cell(row, 3).Value = house.quantity;
ws.Cell(row, 4).Value = house.repair_rate;
//ws.Cell(row, 5).Value = house.amount;
ws.Cell(row, 5).Value = house.amount;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Font.FontName =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 5)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Alignment.Vertical =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 5)).Style.Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 5)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 5)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Border.OutsideBorder =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 5)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Border.RightBorder =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 5)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
//ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 4).SetDataType(XLDataType.Number);
ws.Cell(row, 4).Style.NumberFormat.SetFormat("#,#");
ws.Cell(row, 5).SetDataType(XLDataType.Number);
ws.Cell(row, 5).Style.NumberFormat.SetFormat("#,#");
row++;
}
@@ -158,31 +159,31 @@ namespace rmutr_report.Controllers
ws.Cell(row, 2).Value = house.type_vehicle_transport;
ws.Cell(row, 3).Value = house.quantity;
ws.Cell(row, 4).Value = house.repair_rate;
//ws.Cell(row, 5).Value = house.amount;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Font.FontName =
ws.Cell(row, 5).Value = house.amount;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 5)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 5)).Style.Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 5)).Style.Alignment.WrapText = true;
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, 3).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, 4).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
//ws.Cell(row, 5).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, 5).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 3).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 4).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
//ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 5).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Border.LeftBorder =
XLBorderStyleValues.None;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 4)).Style.Border.RightBorder =
ws.Range(ws.Cell(row, 2), ws.Cell(row, 5)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Cell(row, 1).Style.Border.RightBorder =
XLBorderStyleValues.None;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Border.OutsideBorder =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 5)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Cell(row, 4).SetDataType(XLDataType.Number);
ws.Cell(row, 4).Style.NumberFormat.SetFormat("#,#");
ws.Cell(row, 5).SetDataType(XLDataType.Number);
ws.Cell(row, 5).Style.NumberFormat.SetFormat("#,#");
row++;
}
}
+234 -118
View File
@@ -25,7 +25,7 @@ namespace rmutr_report.Controllers
{
this._setting = setting;
}
[SwaggerOperation("ร5. คำชี้แจงงบลงทุน ค่าที่ดินและสิ่งก่อสร้าง")]
[HttpPost, Route("reports/ro_five/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetRoFiveReport([FromRoute] string type, [FromBody] ro_five building_fours)
@@ -265,7 +265,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("ร8. ประมาณการรายรับจากงานวิจัยภายนอก")]
[HttpPost, Route("reports/external_research/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetExReport([FromRoute] string type, [FromBody] external_research external)
@@ -352,7 +352,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("ร9. ประมาณการรายรับจากงานบริการวิชาการ")]
[HttpPost, Route("reports/ro_nine/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetNineReport([FromRoute] string type, [FromBody] ro_nine external)
@@ -435,7 +435,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("ร10. ประมาณการรายรับจากการบริหารสินทรัพย์ที่ก่อให้เกิดรายได้")]
[HttpPost, Route("reports/ro_ten/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetTenReport([FromRoute] string type, [FromBody] ro_ten ten)
@@ -496,7 +496,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("ร11. ประมาณการรายรับจากรายได้ประเภทอื่น ๆ")]
[HttpPost, Route("reports/ro_eleven/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetEleReport([FromRoute] string type, [FromBody] ro_eleven eleven)
@@ -544,106 +544,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[HttpPost, Route("reports/revenue_estimate_income_summary/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetEstimateIncomeReport([FromRoute] string type,
[FromBody] revenue_estimate_income_summary estimate)
{
var s1 = estimate.data.Sum(d => d.science_1);
var s2 = estimate.data.Sum(d => d.social_1);
var s3 = estimate.data.Sum(d => d.science_2);
var s4 = estimate.data.Sum(d => d.social_2);
var s5 = estimate.data.Sum(d => d.total_register_fee);
var s6 = estimate.data.Sum(d => d.science_3);
var s7 = estimate.data.Sum(d => d.social_3);
var s8 = estimate.data.Sum(d => d.science_4);
var s9 = estimate.data.Sum(d => d.social_4);
var s10 = estimate.data.Sum(d => d.total_education_fee);
var s11 = estimate.data.Sum(d => d.total_science);
var s12 = estimate.data.Sum(d => d.total_social);
var s13 = estimate.data.Sum(d => d.total_science_social);
estimate.sum_1 = s1;
estimate.sum_2 = s2;
estimate.sum_3 = s3;
estimate.sum_4 = s4;
estimate.sum_5 = s5;
estimate.sum_6 = s6;
estimate.sum_7 = s7;
estimate.sum_8 = s8;
estimate.sum_9 = s9;
estimate.sum_10 = s10;
estimate.sum_11 = s11;
estimate.sum_12 = s12;
estimate.sum_13 = s13;
var estimateEducation = new List<revenue_estimate_income_summary>() { estimate };
Report report = new Report();
report.Load(_setting.report_path + "revenue_estimate_income_summary.frx");
report.RegisterData(estimateEducation, "revenue_estimate_income_summary");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"estimateincome_" + ".xlsx");
}
return Ok();
}
[HttpPost, Route("reports/revenue_estimate_education_fee/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetEstimateReport([FromRoute] string type,
[FromBody] revenue_estimate_education_fee estimate)
{
var estimateEducation = new List<revenue_estimate_education_fee>() { estimate };
Report report = new Report();
report.Load(_setting.report_path + "revenue_estimate_education_fee.frx");
report.RegisterData(estimateEducation, "revenue_estimate_education_fee");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"estimateEducation" + ".xlsx");
}
return Ok();
}
[SwaggerOperation("ร12. ประมาณการรายรับภาคปกติของคณะศิลปศาสตร์จาก ค่าหน่วยกิตที่ลงทะเบียน")]
[HttpPost, Route("reports/revenue_estimate_register_credits/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetRegisterCreditsReport([FromRoute] string type,
@@ -1579,7 +1480,7 @@ namespace rmutr_report.Controllers
XLColor.FromArgb(255, 255, 153);
ws.Range(ws.Cell(row, 1), ws.Cell(row, 3)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row, rowhead2 + 6).Style.Alignment.Horizontal =
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 6)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 6)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
@@ -1711,6 +1612,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 7)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 7)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 7)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 7)).Style.Border.RightBorder =
@@ -1836,6 +1739,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 8)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 8)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 8)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 8)).Style.Border.RightBorder =
@@ -1961,6 +1866,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 9)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 8)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 9)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 9)).Style.Border.RightBorder =
@@ -2086,6 +1993,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 10)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 10)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 10)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 10)).Style.Border.RightBorder =
@@ -2211,6 +2120,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 11)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 11)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 11)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 11)).Style.Border.RightBorder =
@@ -2336,6 +2247,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 12)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 12)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 12)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 12)).Style.Border.RightBorder =
@@ -2461,6 +2374,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 13)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 13)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 13)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 13)).Style.Border.RightBorder =
@@ -2586,6 +2501,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 14)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 14)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 14)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 14)).Style.Border.RightBorder =
@@ -2711,6 +2628,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 15)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 15)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 15)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 15)).Style.Border.RightBorder =
@@ -2836,6 +2755,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 16)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 16)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 16)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 16)).Style.Border.RightBorder =
@@ -2961,6 +2882,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 17)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 17)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 17)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 17)).Style.Border.RightBorder =
@@ -3086,6 +3009,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 18)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 18)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 18)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 18)).Style.Border.RightBorder =
@@ -3211,6 +3136,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 19)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 19)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 19)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 19)).Style.Border.RightBorder =
@@ -3336,6 +3263,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 20)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 20)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 20)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 20)).Style.Border.RightBorder =
@@ -3461,6 +3390,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 21)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 21)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 21)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 20)).Style.Border.RightBorder =
@@ -3586,6 +3517,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 22)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 22)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 22)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 22)).Style.Border.RightBorder =
@@ -3711,6 +3644,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 23)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 23)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 23)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 23)).Style.Border.RightBorder =
@@ -3836,6 +3771,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 24)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 24)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 24)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 24)).Style.Border.RightBorder =
@@ -3961,6 +3898,8 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 25)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 4), ws.Cell(row, rowhead2 + 25)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 3), ws.Cell(row, rowhead2 + 25)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, rowhead2 + 25)).Style.Border.RightBorder =
@@ -4058,19 +3997,135 @@ namespace rmutr_report.Controllers
"revenueEstimate_register" + ".xlsx");
}
}
[SwaggerOperation("ร13. ประมาณการรายรับภาคปกติของคณะศิลปศาสตร์จาก ค่าบำรุงการศึกษา")]
[HttpPost, Route("reports/revenue_estimate_education_fee/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetEstimateReport([FromRoute] string type,
[FromBody] revenue_estimate_education_fee estimate)
{
if (estimate.budget_project_name_th != null)
{
string myStr = estimate.budget_project_name_th;
string[] projectname = myStr.Split("ผู้สำเร็จการศึกษา");
foreach (string projectnames in projectname)
{
estimate.side = projectnames;
}
}
var estimateEducation = new List<revenue_estimate_education_fee>() { estimate };
Report report = new Report();
report.Load(_setting.report_path + "revenue_estimate_education_fee.frx");
report.RegisterData(estimateEducation, "revenue_estimate_education_fee");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"estimateEducation" + ".xlsx");
}
return Ok();
}
[SwaggerOperation("ร14. แบบฟอร์มสรุปรายรับคณะศิลปศาสตร์จากการจัดการศึกษาให้กับคณะอื่น")]
[HttpPost, Route("reports/revenue_estimate_income_summary/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetEstimateIncomeReport([FromRoute] string type,
[FromBody] revenue_estimate_income_summary estimate)
{
var s1 = estimate.data.Sum(d => d.science_1);
var s2 = estimate.data.Sum(d => d.social_1);
var s3 = estimate.data.Sum(d => d.science_2);
var s4 = estimate.data.Sum(d => d.social_2);
var s5 = estimate.data.Sum(d => d.total_register_fee);
var s6 = estimate.data.Sum(d => d.science_3);
var s7 = estimate.data.Sum(d => d.social_3);
var s8 = estimate.data.Sum(d => d.science_4);
var s9 = estimate.data.Sum(d => d.social_4);
var s10 = estimate.data.Sum(d => d.total_education_fee);
var s11 = estimate.data.Sum(d => d.total_science);
var s12 = estimate.data.Sum(d => d.total_social);
var s13 = estimate.data.Sum(d => d.total_science_social);
estimate.sum_1 = s1;
estimate.sum_2 = s2;
estimate.sum_3 = s3;
estimate.sum_4 = s4;
estimate.sum_5 = s5;
estimate.sum_6 = s6;
estimate.sum_7 = s7;
estimate.sum_8 = s8;
estimate.sum_9 = s9;
estimate.sum_10 = s10;
estimate.sum_11 = s11;
estimate.sum_12 = s12;
estimate.sum_13 = s13;
var estimateEducation = new List<revenue_estimate_income_summary>() { estimate };
Report report = new Report();
report.Load(_setting.report_path + "revenue_estimate_income_summary.frx");
report.RegisterData(estimateEducation, "revenue_estimate_income_summary");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"estimateincome_" + ".xlsx");
}
return Ok();
}
[SwaggerOperation("ร1. แบบฟอร์มเสนอขอปรับเปลี่ยนชื่อตำแหน่ง")]
[HttpPost, Route("reports/form_1_2/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetForm2Report([FromRoute] string type,
[FromBody] form_1_2 form1)
{
form1.dates = form1.date.Value.ToString("dd MMMM yyyy", CultureInfo.CreateSpecificCulture("th-TH"));
form1.day_start_workings =
form1.start_working.Value.ToString("dd", CultureInfo.CreateSpecificCulture("th-TH"));
form1.month_start_workings =
form1.start_working.Value.ToString("MMMM", CultureInfo.CreateSpecificCulture("th-TH"));
form1.year_start_workings =
form1.start_working.Value.ToString("yyyy", CultureInfo.CreateSpecificCulture("th-TH"));
if (form1.date != null)
{
form1.dates = form1.date.Value.ToString("dd MMMM yyyy", CultureInfo.CreateSpecificCulture("th-TH"));
}
if (form1.start_working != null)
{
form1.day_start_workings =
form1.start_working.Value.ToString("dd", CultureInfo.CreateSpecificCulture("th-TH"));
form1.month_start_workings =
form1.start_working.Value.ToString("MMMM", CultureInfo.CreateSpecificCulture("th-TH"));
form1.year_start_workings =
form1.start_working.Value.ToString("yyyy", CultureInfo.CreateSpecificCulture("th-TH"));
}
var form_1 = new List<form_1_2>() { form1 };
Report report = new Report();
@@ -4109,7 +4164,7 @@ namespace rmutr_report.Controllers
return Ok();
}
[SwaggerOperation("ร1. แบบฟอร์มเสนอขออัตราใหม่")]
[HttpPost, Route("reports/form_1_3/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetForm3Report([FromRoute] string type,
@@ -4284,15 +4339,17 @@ namespace rmutr_report.Controllers
return Ok();
}
[HttpPost, Route("reports/budget_income_qualification/{type}")]
[SwaggerOperation("ร1. แบบฟอร์มเสนอขอปรับคุณวุฒิ")]
[HttpPost, Route("reports/budget_income_qualification/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetForm1Report([FromRoute] string type,
[FromBody] form_1_1 form1)
{
if (form1.budget_income_qualification_date!=null)
if (form1.budget_income_qualification_date != null)
{
form1.budget_income_qualification_dates = form1.budget_income_qualification_date.Value.ToString("dd MMMM yyyy", CultureInfo.CreateSpecificCulture("th-TH"));
form1.budget_income_qualification_dates =
form1.budget_income_qualification_date.Value.ToString("dd MMMM yyyy",
CultureInfo.CreateSpecificCulture("th-TH"));
}
if (form1.budget_project_date != null)
@@ -4341,6 +4398,65 @@ namespace rmutr_report.Controllers
"budget_income_qualification" + ".xlsx");
}
return Ok();
}
[SwaggerOperation("รายงานสรุปประมาณการรายรับ หลักสูตรสหกิจศึกษา")]
[HttpPost, Route("reports/summary_income_cooperative/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetCooperativeReport([FromRoute] string type,
[FromBody] summary_income_cooperative cooperative)
{
/*var sum1 = cooperative.data.Where(j=>j.topic_type==3).Sum(d => d.revenue_estimates);
var sum2 = cooperative.data.Where(j=>j.topic_type==3).Sum(d => d.deduct_expenses_percent60);
var sum3 = cooperative.data.Where(j=>j.topic_type==3).Sum(d => d.deduct_expenses_percent10);
var sum4 = cooperative.data.Where(j=>j.topic_type==3).Sum(d => d.balance);
var sum5 = cooperative.data.Where(j=>j.topic_type==3).Sum(d => d.deduct_tuition_fees);
var sum6 = cooperative.data.Where(j=>j.topic_type==3).Sum(d => d.balance_university);*/
foreach (var detail in cooperative.data)
{
if (detail.topic_type == 4)
{
string myStr = detail.topic;
string[] projectname = myStr.Split("ผู้สำเร็จการศึกษา");
foreach (string projectnames in projectname)
{
detail.topic = "รวม "+ projectnames;
}
}
}
var cooperatives = new List<summary_income_cooperative>() { cooperative };
Report report = new Report();
report.Load(_setting.report_path + "summary_income_cooperative.frx");
report.RegisterData(cooperatives, "summary_income_cooperative");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"Cooperative" + ".xlsx");
}
return Ok();
}
}
File diff suppressed because it is too large Load Diff
+62 -43
View File
@@ -14,7 +14,6 @@ using Swashbuckle.AspNetCore.Annotations;
namespace rmutr_report.Controllers
{
[SwaggerTag("สำหรับรายงาน ร.2 คำขอชี้แจงงบบุคลากร")]
public class RoTwo : Controller
{
readonly Setting _setting;
@@ -26,69 +25,89 @@ namespace rmutr_report.Controllers
[HttpPost, Route("reports/personnel_statement/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetRoThreeReport([FromRoute] string type, [FromBody] personnel_statement personnel_statements)
public IActionResult GetRoThreeReport([FromRoute] string type,
[FromBody] personnel_statement personnel_statements)
{
int no = 1;
int no_2 = 1;
foreach (var personnelStatementDetail in personnel_statements.personnel_statement_details)
{
personnelStatementDetail.start_dates =
personnelStatementDetail.start_date.Value.ToString("dd/MM/yyyy",
CultureInfo.CreateSpecificCulture("th-TH"));
if (personnelStatementDetail.start_date != null)
{
personnelStatementDetail.start_dates =
personnelStatementDetail.start_date.Value.ToString("dd/MM/yyyy",
CultureInfo.CreateSpecificCulture("th-TH"));
}
else
{
personnelStatementDetail.start_dates = "";
}
if (personnelStatementDetail.topic_type == 2)
{
personnelStatementDetail.row_no = no;
no++;
}
}
foreach (var personnelStatementDetail2 in personnel_statements.personnel_statement_details_2)
{
personnelStatementDetail2.start_dates =
personnelStatementDetail2.start_date.Value.ToString("dd/MM/yyyy",
CultureInfo.CreateSpecificCulture("th-TH"));
if (personnelStatementDetail2.start_date != null)
{
personnelStatementDetail2.start_dates =
personnelStatementDetail2.start_date.Value.ToString("dd/MM/yyyy",
CultureInfo.CreateSpecificCulture("th-TH"));
}
else
{
personnelStatementDetail2.start_dates = "";
}
if (personnelStatementDetail2.topic_type == 2)
{
personnelStatementDetail2.row_no = no_2;
no_2++;
}
}
var personnelstatements = new List<personnel_statement>() { personnel_statements };
Report report = new Report();
report.Load(_setting.report_path + "personnel_statement.frx");
report.RegisterData(personnelstatements, "personnel_statement");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
//return File(stream, "application/vnd.ms-excel");
string date = DateTime.Now.ToString("yyyyMMddHHmmss");
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"personnel_statement_"+date + ".xlsx");
break;
case "doc":
case "docx":
Word2007Export word = new Word2007Export();
report.Export(word, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "appllication/vnd.ms-word");
break;
Report report = new Report();
report.Load(_setting.report_path + "personnel_statement.frx");
report.RegisterData(personnelstatements, "personnel_statement");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
//return File(stream, "application/vnd.ms-excel");
string date = DateTime.Now.ToString("yyyyMMddHHmmss");
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"personnel_statement_" + date + ".xlsx");
break;
case "doc":
case "docx":
Word2007Export word = new Word2007Export();
report.Export(word, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "appllication/vnd.ms-word");
break;
}
return Ok();
}
return Ok();
}
}
}
+14 -14
View File
@@ -150,7 +150,7 @@ namespace rmutr_report.Controllers
" มหาวิทยาลัยเทคโนโลยีราชมงคลรัตนโกสินทร์";
ws.Cell("A1").Style.Font.Bold = true;
ws.Cell("A1").Style.Alignment.WrapText = true;
ws.Cell("A1").Style.Font.FontName = "TH Sarabun New";
ws.Cell("A1").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("A1").Style.Font.FontSize = 16;
ws.Range("A1:AD1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("A1:AD1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -254,7 +254,7 @@ namespace rmutr_report.Controllers
ws.Column(25).Width = 10;
ws.Column(26).Width = 10;
ws.Column(27).Width = 10;
ws.Range("A2:AD3").Style.Font.FontName = "TH Sarabun New";
ws.Range("A2:AD3").Style.Font.FontName = "TH SarabunPSK";
ws.Range("A2:AD3").Style.Font.FontSize = 16;
ws.Range("A2:AD3").Style.Fill.BackgroundColor =
XLColor.Bisque;
@@ -310,7 +310,7 @@ namespace rmutr_report.Controllers
header.female5 + header.female6;
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.Bold = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
@@ -365,7 +365,7 @@ namespace rmutr_report.Controllers
detail.female5 + detail.female6;
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
@@ -421,7 +421,7 @@ namespace rmutr_report.Controllers
header.female5 + header.female6;
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.Bold = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
@@ -475,7 +475,7 @@ namespace rmutr_report.Controllers
header.female5 + header.female6;
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.Bold = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
@@ -529,7 +529,7 @@ namespace rmutr_report.Controllers
header.female5 + header.female6;
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
XLColor.BabyBlue;
@@ -584,7 +584,7 @@ namespace rmutr_report.Controllers
detail.female5 + detail.female6;
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
@@ -652,7 +652,7 @@ namespace rmutr_report.Controllers
detail.female5 + detail.female6;
ws.Cell(row, 29).Value = sums1 + sums2 + sums3 + sums4 + sums5 + sums6;
ws.Cell(row, 30).Value = sumsroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
// ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
// ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
@@ -708,7 +708,7 @@ namespace rmutr_report.Controllers
header.female5 + header.female6;
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
XLColor.Gainsboro;
@@ -771,7 +771,7 @@ namespace rmutr_report.Controllers
detail.female5 + detail.female6;
ws.Cell(row, 29).Value = sums1 + sums2 + sums3 + sums4 + sums5 + sums6;
ws.Cell(row, 30).Value = sumsroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
@@ -829,7 +829,7 @@ namespace rmutr_report.Controllers
header.female5 + header.female6;
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor = XLColor.White;
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Fill.BackgroundColor = XLColor.White;
@@ -892,7 +892,7 @@ namespace rmutr_report.Controllers
detail.female5 + detail.female6;
ws.Cell(row, 29).Value = sums1 + sums2 + sums3 + sums4 + sums5 + sums6;
ws.Cell(row, 30).Value = sumsroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
@@ -945,7 +945,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 28).Value = null;
ws.Cell(row, 29).Value = null;
ws.Cell(row, 30).Value = null;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
XLColor.White;
+34 -4
View File
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using ClosedXML.Excel;
using Microsoft.AspNetCore.Mvc;
using rmutr_report.Models;
@@ -35,7 +36,7 @@ namespace rmutr_report.Controllers
ws.Cell("A1").Style.Font.FontSize = 16;
ws.Range("A1:J1").Style.Font.Bold = true;
ws.Range("A2:J2").Merge().Value =
"ผลผลิต " + _study_material.product + " คณะ " + _study_material.faculty;
"ผลผลิต " + _study_material.product +" " + _study_material.faculty;
ws.Range("A2:J2").Style.Alignment.WrapText = true;
ws.Range("A2:J2").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range("A2:J2").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
@@ -143,11 +144,13 @@ namespace rmutr_report.Controllers
var row1 = ws.Row(3);
row1.Height = 20;
int row = 6;
if (_study_material != null)
{
foreach (var data in _study_material.data1)
{
// ws.Cell(row, 1).Value = "ภาคการศึกษา " + data.academic_semester + "/" + data.academic_year;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 10)).Style.Font.FontName =
// "TH SarabunPSK";
@@ -180,6 +183,8 @@ namespace rmutr_report.Controllers
// ws.Cell(row, 1).Value = "ภาคการศึกษา " + data.academic_semester + "/" + data.academic_year;
ws.Cell(row, 2).Value =
"ชั้นปีที่ " + data2.year_class + " (รหัส " + data.academic_year + ")";
ws.Cell(row, 9).Value = data2.total_cost_science;
ws.Cell(row, 10).Value = data2.total_cost_social;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 10)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 10)).Style.Font.FontSize = 16;
@@ -208,7 +213,7 @@ namespace rmutr_report.Controllers
row++;
foreach (var data3 in data2.data3)
{
//_study_material.text = " - สาขา ";
if (data3.academic_semester == "รวม" ||
data3.academic_semester == "รวม 1 ปีภาคการศึกษา")
{
@@ -291,12 +296,12 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 3), ws.Cell(row, 10)).Style.NumberFormat.SetFormat("#,#");
//row++;
}
row++;
}
}
// if (data.academic_semester != "รวม")
// {
// ws.Cell(row, 1).Value = data.academic_semester;
@@ -378,6 +383,31 @@ namespace rmutr_report.Controllers
// row++;
// }
}
if (_study_material.total_cost_science !=null &&_study_material.total_cost_social !=null)
{
ws.Range(ws.Cell(row, 1), ws.Cell(row, 8)).Merge().Value = "รวมทั้งหมด";
ws.Cell(row, 9).Value = _study_material.total_cost_science;
ws.Cell(row, 10).Value = _study_material.total_cost_social;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 10)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 10)).Style.Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 10)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 10)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 8)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row, 9).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Cell(row, 10).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 10)).Style.Font.Bold = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 10)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 10)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 9), ws.Cell(row, 10)).SetDataType(XLDataType.Number);
ws.Range(ws.Cell(row, 9), ws.Cell(row, 10)).Style.NumberFormat.SetFormat("#,#");
}
}
using (var stream = new MemoryStream())
File diff suppressed because it is too large Load Diff
+341
View File
@@ -0,0 +1,341 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using FastReport;
using FastReport.Export.OoXML;
using FastReport.Export.Pdf;
using Microsoft.AspNetCore.Mvc;
using rmutr_report.Models;
using Swashbuckle.AspNetCore.Annotations;
namespace rmutr_report.Controllers
{
[SwaggerTag("สำหรับรายงาน invest")]
public class SummaryInvest : Controller
{
readonly Setting _setting;
public SummaryInvest(Setting setting)
{
_setting = setting;
}
[SwaggerOperation("จัดทำค่าครุภัณฑ์ Key e-Budgeting")]
[HttpPost, Route("reports/summary_invest/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetEBudgetingReport([FromRoute] string type, [FromBody] summary_invest summaryInvest)
{
var summaryInvests = new List<summary_invest>() { summaryInvest };
if (summaryInvest.total_budget != summaryInvest.unit_price)
{
summaryInvest.total_budget = summaryInvest.unit_price;
}
foreach (var summaryInvestYear in summaryInvest.years)
{
if (summaryInvestYear.total_budget != summaryInvestYear.unit_price)
{
summaryInvestYear.total_budget = summaryInvestYear.unit_price;
}
foreach (var plan in summaryInvestYear.plans)
{
if (plan.total_budget != plan.unit_price)
{
plan.total_budget = plan.unit_price;
}
foreach (var project in plan.projects)
{
if (project.total_budget != project.unit_price)
{
project.total_budget = project.unit_price;
}
foreach (var faculty in project.facultys)
{
if (faculty.total_budget != faculty.unit_price)
{
faculty.total_budget = faculty.unit_price;
}
foreach (var assetList in faculty.asset_lists)
{
if (assetList.total != assetList.unit_price)
{
assetList.total = assetList.unit_price;
}
if (assetList.total == null && assetList.amount == 1)
{
assetList.total = assetList.unit_price;
}
if (assetList.amount > 1)
{
assetList.total = assetList.unit_price * assetList.amount;
}
// if ((assetList.unit_price ?? 0) == 0 && (assetList.amount ?? 1) == 1)
// {
// assetList.total = 0;
// }
// else if ((assetList.unit_price ?? 0) > 0 && (assetList.amount ?? 1) > 1)
// {
// assetList.total = assetList.unit_price * assetList.amount;
// }
// else if (assetList.total == null)
// {
// assetList.total = assetList.unit_price;
// }
}
foreach (var constructList in faculty.construct_lists)
{
if (constructList.total != constructList.unit_price)
{
constructList.total = constructList.unit_price;
}
if (constructList.total == null && constructList.amount == 1)
{
constructList.total = constructList.unit_price;
}
if (constructList.amount > 1)
{
constructList.total = constructList.unit_price * constructList.amount;
}
}
}
}
}
}
Report report = new Report();
report.Load(_setting.report_path + "summary_invest.frx");
report.RegisterData(summaryInvests, "summary_invest");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"summary_invest" + ".xlsx");
break;
}
return Ok();
}
[SwaggerOperation("จัดทำค่าครุภัณฑ์ (ใบเสนอราคา)")]
[HttpPost, Route("reports/summary_invest_preview/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetSummaryInvestPreviewReport([FromRoute] string type,
[FromBody] summary_invest_v2 summaryInvest)
{
var summaryInvests = new List<summary_invest_v2>() { summaryInvest };
if (summaryInvest != null)
{
if (summaryInvest.total_budget != summaryInvest.unit_price)
{
summaryInvest.total_budget = summaryInvest.unit_price;
}
foreach (var summaryInvestYear in summaryInvest.years)
{
if (summaryInvestYear.total_budget != summaryInvestYear.unit_price)
{
summaryInvestYear.total_budget = summaryInvestYear.unit_price;
}
foreach (var plan in summaryInvestYear.plans)
{
if (plan.total_budget != plan.unit_price)
{
plan.total_budget = plan.unit_price;
}
if (!plan.asset_lists?.Any() ?? true)
{
plan.asset_lists = plan.construct_lists?.ToList() ?? new List<summary_invest_list_v2>();
}
foreach (var assetList in plan.asset_lists)
{
string formattedSeller = assetList.seller.Replace("<br>", " ");
string pattern = @"<a href=.*?>(.*?)<\/a>";
MatchCollection matches = Regex.Matches(assetList.file, pattern);
string formattedFile = "";
if (assetList.is_approve == true)
{
assetList.approve_name = "อนุมัติแล้ว";
}
assetList.seller2 = formattedSeller;
foreach (Match match in matches)
{
formattedFile += match.Groups[1].Value + " ";
}
formattedFile = formattedFile.Trim();
assetList.file2 = formattedFile;
if (assetList.total != assetList.unit_price)
{
assetList.total = assetList.unit_price;
}
if (assetList.total == null && assetList.amount == 1)
{
assetList.total = assetList.unit_price;
}
if (assetList.amount > 1)
{
assetList.total = assetList.unit_price * assetList.amount;
}
}
}
}
}
Report report = new Report();
report.Load(_setting.report_path + "summary_invest_preview.frx");
report.RegisterData(summaryInvests, "summary_invest");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"summary_invest_preview" + ".xlsx");
break;
}
return Ok();
}
[SwaggerOperation("จัดสรรค่าครุภัณฑ์")]
[HttpPost, Route("reports/summary_invest_approve/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetSummaryInvestApproveReport([FromRoute] string type,
[FromBody] summary_invest_v2 summaryInvest)
{
var summaryInvests = new List<summary_invest_v2>() { summaryInvest };
if (summaryInvest != null)
{
foreach (var summaryInvestYear in summaryInvest.years)
{
foreach (var plan in summaryInvestYear.plans!)
{
if (!plan.asset_lists?.Any() ?? true)
{
plan.asset_lists = plan.construct_lists?.ToList() ?? new List<summary_invest_list_v2>();
}
var validAssets = plan.asset_lists.Where(x => x.unit_price.HasValue && x.unit_price > 0);
if (validAssets.Any())
{
plan.unit_price = validAssets.Sum(x => x.unit_price) ?? 0;
plan.total_budget = validAssets.Sum(x => x.total_budget) ?? 0;
}
else
{
plan.unit_price = 0;
plan.total_budget = 0;
}
if (summaryInvestYear.plans != null && summaryInvestYear.plans.Any())
{
var validPlanAssets = summaryInvestYear.plans.SelectMany(p => p.asset_lists)
.Where(x => x.unit_price.HasValue && x.unit_price > 0);
if (validPlanAssets.Any())
{
summaryInvest.unit_price = validPlanAssets.Sum(x => x.unit_price) ?? 0;
summaryInvest.total_budget = validPlanAssets.Sum(x => x.total_budget) ?? 0;
summaryInvestYear.unit_price = validPlanAssets.Sum(x => x.unit_price) ?? 0;
summaryInvestYear.total_budget = validPlanAssets.Sum(x => x.total_budget) ?? 0;
}
else
{
summaryInvest.unit_price = 0;
summaryInvest.total_budget = 0;
summaryInvestYear.unit_price = 0;
summaryInvestYear.total_budget = 0;
}
}
foreach (var assetList in plan.asset_lists)
{
string formattedSeller = assetList.seller.Replace("<br>", " ");
string pattern = @"<a href=.*?>(.*?)<\/a>";
MatchCollection matches = Regex.Matches(assetList.file, pattern);
string formattedFile = "";
if (assetList.is_approve == true)
{
assetList.approve_name = "อนุมัติแล้ว";
}
assetList.seller2 = formattedSeller;
foreach (Match match in matches)
{
formattedFile += match.Groups[1].Value + " ";
}
assetList.file2 = formattedFile.Trim();
}
}
}
}
Report report = new Report();
report.Load(_setting.report_path + "summary_invest_approve.frx");
report.RegisterData(summaryInvests, "summary_invest");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(
stream,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"summary_invest_approve.xlsx");
}
return Ok();
}
}
}
+16 -16
View File
@@ -153,7 +153,7 @@ namespace rmutr_report.Controllers
" มหาวิทยาลัยเทคโนโลยีราชมงคลรัตนโกสินทร์";
ws.Cell("A1").Style.Font.Bold = true;
ws.Cell("A1").Style.Alignment.WrapText = true;
ws.Cell("A1").Style.Font.FontName = "TH Sarabun New";
ws.Cell("A1").Style.Font.FontName = "TH SarabunPSK";
ws.Cell("A1").Style.Font.FontSize = 16;
ws.Range("A1:AD1").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
ws.Range("A1:AD1").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
@@ -257,7 +257,7 @@ namespace rmutr_report.Controllers
ws.Column(25).Width = 10;
ws.Column(26).Width = 10;
ws.Column(27).Width = 10;
ws.Range("A2:AD3").Style.Font.FontName = "TH Sarabun New";
ws.Range("A2:AD3").Style.Font.FontName = "TH SarabunPSK";
ws.Range("A2:AD3").Style.Font.FontSize = 16;
ws.Range("A2:AD3").Style.Fill.BackgroundColor =
XLColor.Bisque;
@@ -313,7 +313,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.Bold = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
@@ -367,7 +367,7 @@ namespace rmutr_report.Controllers
// ws.Cell(row, 28).Value = detail.female7;
// ws.Cell(row, 29).Value = detail.total7;
// ws.Cell(row, 30).Value = detail.room7;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
// ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
// ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
@@ -421,7 +421,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.Bold = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
@@ -477,7 +477,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.Bold = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
@@ -534,7 +534,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor = XLColor.White;
ws.Range(ws.Cell(row, 3), ws.Cell(row, 30)).Style.Fill.BackgroundColor = XLColor.White;
@@ -586,7 +586,7 @@ namespace rmutr_report.Controllers
// ws.Cell(row, 28).Value = detail.female7;
// ws.Cell(row, 29).Value = detail.total7;
// ws.Cell(row, 30).Value = detail.room7;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
// // ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
// // ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
@@ -638,7 +638,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.Bold = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
@@ -694,7 +694,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
XLColor.MintGreen;
@@ -759,7 +759,7 @@ namespace rmutr_report.Controllers
detail.female5 + detail.female6;
ws.Cell(row, 29).Value = sums1 + sums2 + sums3 + sums4 + sums5 + sums6;
ws.Cell(row, 30).Value = sumsroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
@@ -816,7 +816,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
XLColor.BabyBlue;
@@ -881,7 +881,7 @@ namespace rmutr_report.Controllers
detail.female5 + detail.female6;
ws.Cell(row, 29).Value = sums1 + sums2 + sums3 + sums4 + sums5 + sums6;
ws.Cell(row, 30).Value = sumsroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
@@ -937,7 +937,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 29).Value = sum1 + sum2 + sum3 + sum4 + sum5 + sum6;
ws.Cell(row, 30).Value = sumroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
XLColor.Gainsboro;
@@ -1001,7 +1001,7 @@ namespace rmutr_report.Controllers
detail.female5 + detail.female6;
ws.Cell(row, 29).Value = sums1 + sums2 + sums3 + sums4 + sums5 + sums6;
ws.Cell(row, 30).Value = sumsroom;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
@@ -1057,7 +1057,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 28).Value = null;
ws.Cell(row, 29).Value = null;
ws.Cell(row, 30).Value = null;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 30)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Merge().Style.Fill.BackgroundColor =
XLColor.White;
+9 -46
View File
@@ -55,36 +55,6 @@ namespace rmutr_report.Controllers
}
}
// foreach (var bb in building_fours.material_construction_labor1)
// {
// if (bb != null)
// {
// bb.total_amount = bb.material_cost + bb.labor_unit;
// var f = building_fours.material_construction_labor1.Where(d => d.total_amount == d.total_amount)
// .Sum(o => o.total_amount);
// building_fours.material_total_amount1 = f;
// }
// }
// foreach (var bb in building_fours.material_construction_labor2)
// {
// if (bb != null)
// {
// bb.total_amount = bb.material_cost + bb.labor_unit;
// var f = building_fours.material_construction_labor2.Where(d => d.total_amount == d.total_amount)
// .Sum(o => o.total_amount);
// building_fours.material_total_amount2 = f;
// }
// }
// foreach (var bb in building_fours.material_construction_labor3)
// {
// if (bb != null)
// {
// bb.total_amount = bb.material_cost + bb.labor_unit;
// var f = building_fours.material_construction_labor3.Where(d => d.total_amount == d.total_amount)
// .Sum(o => o.total_amount);
// building_fours.material_total_amount3 = f;
// }
// }
foreach (var cc in building_fours.budget_limit)
{
if (cc != null)
@@ -157,11 +127,6 @@ namespace rmutr_report.Controllers
boqPrice.list = num.Insert(i, ",").Insert(j,",");
}
}
if (boqPrice.list=="20000000.0000")
{
boqPrice.list = "20,000,000";
}
}
}
@@ -242,29 +207,20 @@ namespace rmutr_report.Controllers
var _building_fours = new List<building_four>() { building_fours };
Report report = new Report();
report.Load(_setting.report_path + "building_fours.frx");
report.Load(_setting.report_path + "building_fours_v1.frx");
report.RegisterData(_building_fours, "building_four");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "view":
return File(stream, "application/pdf");
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/vnd.ms-excel");
break;
case "mht":
case "mht":
MHTExport mht = new MHTExport();
report.Export(mht, stream);
stream.Seek(0, SeekOrigin.Begin);
@@ -283,6 +239,13 @@ namespace rmutr_report.Controllers
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "appllication/vnd.ms-word");
break;
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
}
return Ok();
@@ -29,25 +29,7 @@ namespace rmutr_report.Controllers
public IActionResult GetHrReport([FromRoute] string type,
[FromBody] durable_articles_three durable_articles_threes)
{
//Console.WriteLine(durable_articles_threes.specification_data[0].data_detail[0].data_detail2);
// var a1 = durable_articles_threes.data.Sum(o => o.amount);
// if (durable_articles_threes.data!=null)
// {
// durable_articles_threes.total_amount = a1;
//
// }
// int a = 1;
// foreach (var q in durable_articles_threes.quotation)
// {
//
// string t = "ใบเสนอราคาบริษัทที่ " + a++ +" ";
// q.company = t + q.company;
// //a++;
// }
var _durable_articles_three = new List<durable_articles_three>() {durable_articles_threes};
var _durable_articles_three = new List<durable_articles_three>() { durable_articles_threes };
Report report = new Report();
report.Load(_setting.report_path + "durable_articles_three.frx");
@@ -65,12 +47,6 @@ namespace rmutr_report.Controllers
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/vnd.ms-excel");
break;
case "mht":
MHTExport mht = new MHTExport();
@@ -84,15 +60,55 @@ namespace rmutr_report.Controllers
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "text/csv");
break;
case "doc" : case "docx":
case "doc":
case "docx":
Word2007Export word = new Word2007Export();
report.Export(word, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "appllication/vnd.ms-word");
break;
}
case "xls":
case "xlsx":
Excel2007Export excelExport = new Excel2007Export();
// {
// ShowProgress = true,
// PageBreaks = true
// };
// var textObject3 = report.FindObject("Text3") as FastReport.TextObject;
// var textObject7 = report.FindObject("Text7") as FastReport.TextObject;
// var textObject8 = report.FindObject("Text8") as FastReport.TextObject;
// if (textObject3 != null)
// {
// textObject3.WordWrap = true;
// }
// if (textObject7 != null)
// {
// textObject7.WordWrap = true;
// }
// if (textObject8 != null)
// {
// textObject8.WordWrap = true;
//}
report.Export(excelExport, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
return Ok();
}
// static double GetTextHeight(string text, double fontSize, bool wrapText)
// {
// if (string.IsNullOrEmpty(text))
// return 0;
//
//
// const double lineHeightFactor = 1.2;
//
// int lines = wrapText ? text.Split(new[] { '\n' }, StringSplitOptions.None).Length : 1;
// return lines * (fontSize * lineHeightFactor);
// }
return Ok();
}
}
@@ -88,25 +88,25 @@ namespace rmutr_report.Controllers
ws.Column(9).Width = 20;
ws.Column(10).Width = 30;
ws.Column(1).Style.Font.FontName = "TH Sarabun New";
ws.Column(1).Style.Font.FontName = "TH SarabunPSK";
ws.Column(1).Style.Font.FontSize = 16;
ws.Column(2).Style.Font.FontName = "TH Sarabun New";
ws.Column(2).Style.Font.FontName = "TH SarabunPSK";
ws.Column(2).Style.Font.FontSize = 16;
ws.Column(3).Style.Font.FontName = "TH Sarabun New";
ws.Column(3).Style.Font.FontName = "TH SarabunPSK";
ws.Column(3).Style.Font.FontSize = 16;
ws.Column(4).Style.Font.FontName = "TH Sarabun New";
ws.Column(4).Style.Font.FontName = "TH SarabunPSK";
ws.Column(4).Style.Font.FontSize = 16;
ws.Column(5).Style.Font.FontName = "TH Sarabun New";
ws.Column(5).Style.Font.FontName = "TH SarabunPSK";
ws.Column(5).Style.Font.FontSize = 16;
ws.Column(6).Style.Font.FontName = "TH Sarabun New";
ws.Column(6).Style.Font.FontName = "TH SarabunPSK";
ws.Column(6).Style.Font.FontSize = 16;
ws.Column(7).Style.Font.FontName = "TH Sarabun New";
ws.Column(7).Style.Font.FontName = "TH SarabunPSK";
ws.Column(7).Style.Font.FontSize = 16;
ws.Column(8).Style.Font.FontName = "TH Sarabun New";
ws.Column(8).Style.Font.FontName = "TH SarabunPSK";
ws.Column(8).Style.Font.FontSize = 16;
ws.Column(9).Style.Font.FontName = "TH Sarabun New";
ws.Column(9).Style.Font.FontName = "TH SarabunPSK";
ws.Column(9).Style.Font.FontSize = 16;
ws.Column(10).Style.Font.FontName = "TH Sarabun New";
ws.Column(10).Style.Font.FontName = "TH SarabunPSK";
ws.Column(10).Style.Font.FontSize = 16;
int col = 1;
@@ -145,8 +145,10 @@ namespace rmutr_report.Controllers
ws.Cell(row, 5).Value = data1.responsible_person;
ws.Cell(row, 6).Value = data1.compiler_reporter;
ws.Cell(row, 7).Value = data1.plan_value;
ws.Cell(row, 7).Style.NumberFormat.Format = "#,##0.00";
ws.Cell(row, 8).Value = data1.result;
ws.Cell(row, 9).Value = data1.achieve;
ws.Cell(row, 8).Style.NumberFormat.Format = "#,##0.00";
ws.Cell(row, 9).Value = data1.achieve == "X" ? "❌" : "✅";
ws.Cell(row, 10).Value = data1.note;
ws.Range(ws.Cell(row, 1),ws.Cell(row,10)).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 1),ws.Cell(row,10)).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
@@ -164,8 +166,10 @@ namespace rmutr_report.Controllers
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,10)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1),ws.Cell(row,10)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1),ws.Cell(row,10)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,10)).Style.Font.FontSize = 16;
ws.Cell(row, 9).Style.Font.FontSize = 18;
row++;
rowno++;
}
@@ -46,7 +46,7 @@ namespace rmutr_report.Controllers
ws.Cell("F2").Value = "ผู้รวบรวมและรายงาน";
ws.Cell("F2").Style.Font.Bold = true;
ws.Cell("F2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell("G2").Value = "แผนปี" + _kpi.plan_year.Substring(2,2);
ws.Cell("G2").Value = "แผนปี" + _kpi.plan_year;//.Substring(2,2);
ws.Cell("G2").Style.Font.Bold = true;
ws.Cell("G2").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell("H2").Value = "ผลลัพธ์";
@@ -74,25 +74,25 @@ namespace rmutr_report.Controllers
ws.Column(8).Width = 10;
ws.Column(9).Width = 20;
ws.Column(10).Width = 30;
ws.Column(1).Style.Font.FontName = "TH Sarabun New";
ws.Column(1).Style.Font.FontName = "TH SarabunPSK";
ws.Column(1).Style.Font.FontSize = 16;
ws.Column(2).Style.Font.FontName = "TH Sarabun New";
ws.Column(2).Style.Font.FontName = "TH SarabunPSK";
ws.Column(2).Style.Font.FontSize = 16;
ws.Column(3).Style.Font.FontName = "TH Sarabun New";
ws.Column(3).Style.Font.FontName = "TH SarabunPSK";
ws.Column(3).Style.Font.FontSize = 16;
ws.Column(4).Style.Font.FontName = "TH Sarabun New";
ws.Column(4).Style.Font.FontName = "TH SarabunPSK";
ws.Column(4).Style.Font.FontSize = 16;
ws.Column(5).Style.Font.FontName = "TH Sarabun New";
ws.Column(5).Style.Font.FontName = "TH SarabunPSK";
ws.Column(5).Style.Font.FontSize = 16;
ws.Column(6).Style.Font.FontName = "TH Sarabun New";
ws.Column(6).Style.Font.FontName = "TH SarabunPSK";
ws.Column(6).Style.Font.FontSize = 16;
ws.Column(7).Style.Font.FontName = "TH Sarabun New";
ws.Column(7).Style.Font.FontName = "TH SarabunPSK";
ws.Column(7).Style.Font.FontSize = 16;
ws.Column(8).Style.Font.FontName = "TH Sarabun New";
ws.Column(8).Style.Font.FontName = "TH SarabunPSK";
ws.Column(8).Style.Font.FontSize = 16;
ws.Column(9).Style.Font.FontName = "TH Sarabun New";
ws.Column(9).Style.Font.FontName = "TH SarabunPSK";
ws.Column(9).Style.Font.FontSize = 16;
ws.Column(10).Style.Font.FontName = "TH Sarabun New";
ws.Column(10).Style.Font.FontName = "TH SarabunPSK";
ws.Column(10).Style.Font.FontSize = 16;
int col = 1;
int row = 3;
@@ -104,14 +104,14 @@ namespace rmutr_report.Controllers
{
foreach (var header in _kpi.header_data)
{
string kpiname = "ประเด็นยุทธ์ศาสตร์ที่ " + no +" " + header.strategic_issues;
no++;
string kpiname = header.is_reference_section ? header.strategic_issues : ("ประเด็นยุทธ์ศาสตร์ที่ " + no +" " + header.strategic_issues);
if (!header.is_reference_section) no++;
ws.Cell(row, 1).SetValue(kpiname).Style.Font.Bold = true;
// ws.Cell(row, 2).Value = header.header_1;
ws.Cell(row, 1).Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Cell(row, 1).Style.Fill.BackgroundColor = XLColor.FromHtml("#CAD1EB");
ws.Cell(row, 1).Style.Border.OutsideBorder =
XLBorderStyleValues.None;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 10)).Merge().Style.Fill.BackgroundColor = XLColor.PurpleX11;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 10)).Merge().Style.Fill.BackgroundColor = XLColor.FromHtml("#CAD1EB");
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
@@ -150,7 +150,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 10).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1),ws.Cell(row,10)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1),ws.Cell(row,10)).Style.Font.FontName = "TH Sarabun New";
ws.Range(ws.Cell(row, 1),ws.Cell(row,10)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(row, 1),ws.Cell(row,10)).Style.Font.FontSize = 16;
row++;
rowno++;
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using ClosedXML.Excel;
using FastReport;
using FastReport.Export.Csv;
@@ -19,141 +20,429 @@ namespace rmutr_report.Controllers
public ProjectPrincipleRationale(Setting setting)
{
this._setting = setting;
_setting = setting;
}
[HttpPost, Route("reports/project_principle_rationale/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
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 != null)
{
if (v.activity != null)
if (project.activity.Any())
{
//var total = project.activity.Select(r => r.count).Sum(t => t.Value);
project.together_with = "ประกอบด้วยกิจกรรมหรือโครงการย่อย " + total + " โครงการดังนี้คือ";
if (project.activity == null)
{
foreach (var detail in project.activity)
{
detail.activity = null;
}
}
}
else
{
project.together_with = null;
}
}
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)
{
// string na = "องค์ประกอบที่ " ;
// vv.component = na + vv.component;
string na2 = "ตัวบ่งชี้ที่ ";
vv.indicator = na2 + vv.indicator;
}
// project.count_activity = total2;
foreach (var v in project.eighteenth)
{
foreach (var vv in v.eighteenths)
{
string na = "ครั้งที่ ";
vv.the_time = na + vv.the_time;
string na2 = " จำนวน ";
vv.count_day = na2 + vv.count_day + " วัน";
if (project.count_day != null)
project.activity.Add(new activity_data()
{
project.text3 = "จำนวน " + project.count_day + " วัน";
activity = ""
});
}
if (project.ninth != null)
{
foreach (var vv in project.ninth)
{
if (vv.ninths.Any())
{
if (vv.ninths == null)
{
foreach (var detail6 in vv.ninths)
{
detail6.detail = null;
}
}
}
else
{
vv.ninths.Add(new ninth_data_detail()
{
detail = ""
});
}
}
}
}
if (project.total_target != null)
{
project.text1 = "ผลรวมกลุ่มเป้าหมาย " + project.total_target;
}
if (project.total_board != null)
{
project.text2 = "ผลรวมคณะกรรมการ " + project.total_board;
}
if (project.twenty_one != null)
{
// foreach (var vv in project.twenty_one)
// {
// if (vv.activity != null || vv.activity!= "")
// {
// vv.activity = vv.activity;
// }
// if (vv.clause1 != null || vv.clause1!= "")
// {
// vv.clause1 = vv.clause1;
// }
// if (vv.clause2 != null || vv.clause2!= "")
// {
// vv.clause2 = vv.clause2;
// }
// if (vv.clause3 != null || vv.clause3!= "")
// {
// vv.clause3 = vv.clause3;
// }
// if (vv.clause4 != null || vv.clause4!= "")
// {
// vv.clause4 = vv.clause4;
// }
// if (vv.count_unit != null || vv.count_unit != "")
// {
// string na = "ผู้เข้าร่วมโครงการ จำนวน ";
// string na2 = " หน่วยนับ";
// project.text1 = na + vv.count_unit + na2;
// }
//
// if (vv.count_project != null || vv.count_project != "")
// {
// string na = "จำนวนครั้งที่ดำเนินโครงการ ";
// string na2 = " ครั้ง";
// project.text2 = na + vv.count_project + na2;
// }
//
// if (vv.count_training != null || vv.count_training != "")
// {
// string na = "จำนวนการจัดอบรมและสัมมนา ";
// string na2 = " เรื่อง";
// project.text3 = na + vv.count_training + na2;
// }
//
// if (vv.count_knowledge != null || vv.count_knowledge != "")
// {
// string na = "จำนวนเผยแพร่ความรู้บริการวิชาการ ";
// string na2 = " ครั้ง";
// project.text4 = na + vv.count_knowledge + na2;
// }
// string na3 = "วัน/เดือน/ปี ที่จะดำเนินโครงการ ";
// string na4 = " ถึง ";
// project.text5 = na3 + vv.project_start_date + na4 + vv.project_end_date;
// string na5 = "โครงการแล้วเสร็จตามเวลาที่กำหนด (ร้อยละ) ";
// project.text6 = na5 + vv.percentage_finish;
//
// }
if (project.twenty_one == null)
if (project.sixteenths != null)
{
project.twenty_one = null;
int t = 1;
foreach (var sixteenthData in project.sixteenths)
{
string a = "กิจกรรมที่ " + t + " ";
var sum1 = sixteenthData.sixteenths2.Sum(d => d.salaya);
var sum2 = sixteenthData.sixteenths2.Sum(d => d.bophitphimuk);
var sum3 = sixteenthData.sixteenths2.Sum(d => d.pohchang);
var sum4 = sixteenthData.sixteenths2.Sum(d => d.klai_kangwon);
sixteenthData.salaya_total = sum1;
sixteenthData.bophitphimuk_total = sum2;
sixteenthData.pohchang_total = sum3;
sixteenthData.klai_kangwon_total = sum4;
if (sixteenthData.activity_table != null)
{
sixteenthData.activity_table = a + sixteenthData.activity_table;
}
if (sixteenthData.activity_table == null)
{
sixteenthData.activity_table = null;
}
if (sixteenthData.total_target != null)
{
project.text1 = "ผลรวมกลุ่มเป้าหมาย " + sixteenthData.total_target;
}
if (sixteenthData.total_target == null)
{
project.text1 = "ผลรวมกลุ่มเป้าหมาย -";
}
if (sixteenthData.total_board != null)
{
project.text2 = "ผลรวมคณะกรรมการ " + sixteenthData.total_board;
}
if (sixteenthData.total_board == null)
{
project.text2 = "ผลรวมคณะกรรมการ -";
}
t++;
}
}
if (project.seventeenth != null)
{
int t = 1;
//int ti= 1;
foreach (var v in project.seventeenth)
{
string a = "กิจกรรมที่ " + t + " ";
if (v.activity != null)
{
v.activity = a + v.activity;
}
if (v.activity == null)
{
v.activity = null;
}
t++;
foreach (var vv in v.seventeenths)
{
string na = "ครั้งที่ ";
vv.the_time = na + "1";
//ti++;
foreach (var detail in vv.seventeenths2)
{
string in1 = "พื้นที่ (ภายในมหาวิทยาลัย) ";
string in2 = "ระบุสถานที่ ";
string out1 = "จังหวัด (ภายนอกมหาวิทยาลัย) ";
if (detail.internal_external1 == "ภายในมหาวิทยาลัย")
{
detail.text1 = "ภายในมหาวิทยาลัย";
detail.area_province1 = in1 + detail.area_province1;
detail.location1 = in2 + detail.location1;
}
if (detail.internal_external2 == "ภายนอกมหาวิทยาลัย")
{
detail.text2 = "ภายนอกมหาวิทยาลัย";
detail.area_province2 = out1 + detail.area_province2;
detail.location2 = in2 + detail.location2;
}
}
}
}
}
if (project.eighteenth != null)
{
int t = 1;
//int ti = 1;
foreach (var v in project.eighteenth)
{
string a = "กิจกรรมที่ " + t + " ";
if (v.activity != null)
{
v.activity = a + v.activity;
}
if (v.activity == null)
{
v.activity = null;
}
t++;
foreach (var vv in v.eighteenths)
{
string na = "ครั้งที่ ";
vv.the_time = na + vv.the_time;
//ti++;
string na2 = " จำนวน ";
vv.count_day = na2 + vv.count_day + " วัน";
if (project.count_day != null)
{
project.text3 = "จำนวน " + project.count_day + " วัน";
}
}
}
}
if (project.nineteenth != null)
{
int t = 1;
foreach (var v in project.nineteenth)
{
foreach (var vv in v.nineteenth_data_header)
{
string a = "กิจกรรมที่ " + t + " ";
if (vv.activity != null)
{
vv.activity = a + vv.activity;
}
if (vv.activity == null)
{
vv.activity = null;
}
t++;
}
}
}
if (project.twenty_one != null)
{
foreach (var v in project.twenty_one)
{
if (v.activity != null || v.activity != "")
{
v.activity = v.activity;
}
foreach (var vv in v.twenty_ones)
{
// if (vv.clause1 != null || vv.clause1 != "")
// {
// vv.clause1 = vv.clause1;
// }
//
// if (vv.clause2 != null || vv.clause2 != "")
// {
// vv.clause2 = vv.clause2;
// }
//
// if (vv.clause3 != null || vv.clause3 != "")
// {
// vv.clause3 = vv.clause3;
// }
//
// if (vv.clause4 != null || vv.clause4 != "")
// {
// vv.clause4 = vv.clause4;
// }
if (vv.count_quantitative != null)
{
string na = " หน่วยนับ";
vv.khrang1 = na;
}
if (vv.count_unit != null)
{
string na = "ผู้เข้าร่วมโครงการ ";
string na1 = " จำนวน ";
string na2 = " คน";
vv.text1 = na;
vv.text11 = na1;
vv.nuai_nap = na2;
}
if (vv.count_project != null)
{
vv.clause1 = "21.1 เชิงปริมาณ";
string na = "จำนวนครั้งที่ดำเนินโครงการ ";
string na2 = " ครั้ง";
vv.text2 = na;
vv.khrang2 = na2;
vv.text12 = "หน่วยนับ";
}
if (vv.count_training != null)
{
string na = "จำนวนการจัดอบรมและสัมมนา ";
string na2 = " เรื่อง";
vv.text3 = na;
vv.rueang = na2;
}
if (vv.count_knowledge != null)
{
string na = "จำนวนเผยแพร่ความรู้บริการวิชาการ ";
string na2 = " ครั้ง";
vv.text4 = na;
vv.khrang3 = na2;
}
if (vv.project_start_date != null)
{
vv.clause2 = "21.2 เชิงเวลา";
string na3 = "วัน/เดือน/ปี ที่จะดำเนินโครงการ ";
string na4 = " ถึง ";
vv.range = na4;
vv.text5 = na3;
string na5 = "โครงการแล้วเสร็จตามเวลาที่กำหนด (ร้อยละ) ";
vv.text6 = na5;
}
if (vv.project_start_date == " - " || vv.project_end_date == " - ")
{
vv.text5 = null;
vv.range = null;
vv.project_start_date = null;
vv.project_end_date = null;
}
if (vv.day != null)
{
string na6 = "จำนวนวัน ";
vv.day = na6 + vv.day;
}
if (vv.day == null)
{
vv.day = null;
}
if (vv.percentage1 != null || vv.percentage2 != null || vv.percentage3 != null)
{
vv.clause3 = "21.3 เชิงคุณภาพ";
string na = "ผู้เข้าร่วมโครงการมีความรู้ความเข้าใจเพิ่มขึ้น (ร้อยละ) ";
string na1 = "ความพึงพอใจของผู้เข้ารับบริการในกระบวนการให้บริการ (ร้อยละ) ";
vv.text7 = na;
vv.text8 = na1;
vv.text9 = "ผู้เข้าร่วมโครงการสามารถนำความรู้ที่ได้รับไปบูรณาการอย่างไรบ้าง";
vv.text10 = "รายละเอียด";
vv.text13 = "โครงการที่บรรลุผลตามวัตถุประสงค์ของโครงการ (ร้อยละ) ";
}
if (vv.expenses != null)
{
vv.clause4 = "21.4 เชิงค่าใช้จ่าย";
vv.bath = " บาท";
}
}
}
}
if (project.twenty_four != null)
{
int no = 1;
int t = 1;
foreach (var v in project.twenty_four)
{
string aa = "กิจกรรมที่ " + t + " ";
if (v.activity != null)
{
v.activity = aa + v.activity;
}
if (v.activity == null)
{
v.activity = null;
}
t++;
foreach (var dataDetail in v.twenty_fours)
{
string a = "ชื่อผู้รับผิดชอบ กิจกรรมที่ " + no;
no++;
if (dataDetail.responsible_person != null)
{
dataDetail.text1 = a + " " + dataDetail.responsible_person;
}
string b = "หน่วยงาน / คณะ ";
if (dataDetail.agency != null)
{
dataDetail.text2 = b + dataDetail.agency;
}
string c = "พื้นที่ ";
if (dataDetail.area != null)
{
dataDetail.text3 = c + dataDetail.area;
}
string d = "เบอร์โทรศัพท์ภายใน ";
if (dataDetail.telephone_number != null)
{
dataDetail.text4 = d + dataDetail.telephone_number;
}
string e = "เบอร์มือถือ ";
if (dataDetail.mobile_number != null)
{
dataDetail.text5 = e + dataDetail.mobile_number;
}
string f = "อีเมล ";
if (dataDetail.email != null)
{
dataDetail.text6 = f + dataDetail.email;
}
}
}
}
if (project.twenty_fifth != null)
{
int t = 1;
foreach (var fifthData in project.twenty_fifth)
{
foreach (var acti in fifthData.activity)
{
fifthData.activitys = acti;
}
foreach (var locat in fifthData.location)
{
fifthData.locations = locat;
}
string a = "กิจกรรมที่ " + t + " ";
if (fifthData.activity_display_name != null)
{
fifthData.activity_display_name = a + fifthData.activity_display_name;
}
if (fifthData.activity_display_name == null)
{
fifthData.activity_display_name = null;
}
t++;
}
}
}
var _project = new List<project_principle_rationale>() { project };
Report report = new Report();
report.Load(_setting.report_path + "project_principle_rationale.frx");
report.Load(_setting.report_path + "project_principle_rationale_1.frx");
report.RegisterData(_project, "project_principle_rationale");
report.Prepare();
@@ -197,179 +486,220 @@ namespace rmutr_report.Controllers
return Ok();
}
[HttpPost, Route("reports/project_principle_rationale_no_activity/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
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 (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)
{
string na = "ประเด็นยุทธศาสตร์ที่ ";
v.strategic_issues = na + v.strategic_issues;
string na2 = "กลยุทธ์ที่ ";
v.measure = na2 + v.measure;
}
foreach (var vv in project.fourteenth)
{
// string na = "องค์ประกอบที่ " ;
// vv.component = na + vv.component;
string na2 = "ตัวบ่งชี้ที่ ";
vv.indicator = na2 + vv.indicator;
}
// project.count_activity = total2;
foreach (var v in project.eighteenth)
{
foreach (var vv in v.eighteenths)
{
string na = "ครั้งที่ ";
vv.the_time = na + vv.the_time;
string na2 = " จำนวน ";
vv.count_day = na2 + vv.count_day + " วัน";
if (project.count_day != null)
{
project.text3 = "จำนวน " + project.count_day + " วัน";
}
}
}
if (project.total_target != null)
{
project.text1 = "ผลรวมกลุ่มเป้าหมาย " + project.total_target;
}
if (project.total_board != null)
{
project.text2 = "ผลรวมคณะกรรมการ " + project.total_board;
}
if (project.twenty_one != null)
{
// foreach (var vv in project.twenty_one)
// {
// if (vv.activity != null || vv.activity!= "")
// {
// vv.activity = vv.activity;
// }
// if (vv.clause1 != null || vv.clause1!= "")
// {
// vv.clause1 = vv.clause1;
// }
// if (vv.clause2 != null || vv.clause2!= "")
// {
// vv.clause2 = vv.clause2;
// }
// if (vv.clause3 != null || vv.clause3!= "")
// {
// vv.clause3 = vv.clause3;
// }
// if (vv.clause4 != null || vv.clause4!= "")
// {
// vv.clause4 = vv.clause4;
// }
// if (vv.count_unit != null || vv.count_unit != "")
// {
// string na = "ผู้เข้าร่วมโครงการ จำนวน ";
// string na2 = " หน่วยนับ";
// project.text1 = na + vv.count_unit + na2;
// }
//
// if (vv.count_project != null || vv.count_project != "")
// {
// string na = "จำนวนครั้งที่ดำเนินโครงการ ";
// string na2 = " ครั้ง";
// project.text2 = na + vv.count_project + na2;
// }
//
// if (vv.count_training != null || vv.count_training != "")
// {
// string na = "จำนวนการจัดอบรมและสัมมนา ";
// string na2 = " เรื่อง";
// project.text3 = na + vv.count_training + na2;
// }
//
// if (vv.count_knowledge != null || vv.count_knowledge != "")
// {
// string na = "จำนวนเผยแพร่ความรู้บริการวิชาการ ";
// string na2 = " ครั้ง";
// project.text4 = na + vv.count_knowledge + na2;
// }
// string na3 = "วัน/เดือน/ปี ที่จะดำเนินโครงการ ";
// string na4 = " ถึง ";
// project.text5 = na3 + vv.project_start_date + na4 + vv.project_end_date;
// string na5 = "โครงการแล้วเสร็จตามเวลาที่กำหนด (ร้อยละ) ";
// project.text6 = na5 + vv.percentage_finish;
//
// }
if (project.twenty_one == null)
{
project.twenty_one = null;
}
}
var _project = new List<project_principle_rationale>() { project };
Report report = new Report();
report.Load(_setting.report_path + "project_principle_rationale_no_activity.frx");
report.RegisterData(_project, "project_principle_rationale");
report.Prepare();
MemoryStream stream = new MemoryStream();
switch (type)
{
case "pdf":
PDFExport pdf = new PDFExport();
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/vnd.ms-excel");
break;
case "mht":
MHTExport mht = new MHTExport();
report.Export(mht, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "multipart/related");
break;
case "csv":
CSVExport csv = new CSVExport();
report.Export(csv, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "text/csv");
break;
case "doc":
case "docx":
Word2007Export word = new Word2007Export();
report.Export(word, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "appllication/vnd.ms-word");
break;
}
return Ok();
}
// [HttpPost, Route("reports/project_principle_rationale_no_activity/{type}")]
// [ApiExplorerSettings(GroupName = "reports")]
// public IActionResult GetProject2Report([FromRoute] string type,
// [FromBody] project_principle_rationale project)
// {
// var total = project.activity.Count;
// if (project.activity != null)
// {
// foreach (var v in project.activity)
// {
// 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;
// }
// }
// }
//
// if (project.eighth != null)
// {
// foreach (var v in project.eighth)
// {
// string na = "ประเด็นยุทธศาสตร์ที่ ";
// v.strategic_issues = na + v.strategic_issues;
// string na2 = "กลยุทธ์ที่ ";
// v.measure = na2 + v.measure;
// }
// }
//
// 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.sixteenths != null)
// {
// foreach (var sixteenthData in project.sixteenths)
// {
// var sum1 = sixteenthData.sixteenths2.Sum(d => d.salaya);
// var sum2 = sixteenthData.sixteenths2.Sum(d => d.bophitphimuk);
// var sum3 = sixteenthData.sixteenths2.Sum(d => d.pohchang);
// var sum4 = sixteenthData.sixteenths2.Sum(d => d.klai_kangwon);
// sixteenthData.salaya_total = sum1;
// sixteenthData.bophitphimuk_total = sum2;
// sixteenthData.pohchang_total = sum3;
// sixteenthData.klai_kangwon_total = sum4;
// }
// }
//
// if (project.eighteenth != null)
// {
// foreach (var v in project.eighteenth)
// {
// foreach (var vv in v.eighteenths)
// {
// string na = "ครั้งที่ ";
// vv.the_time = na + vv.the_time;
// string na2 = " จำนวน ";
// vv.count_day = na2 + vv.count_day + " วัน";
// if (project.count_day != null)
// {
// project.text3 = "จำนวน " + project.count_day + " วัน";
// }
// }
// }
// }
//
// if (project.total_target != null)
// {
// project.text1 = "ผลรวมกลุ่มเป้าหมาย " + project.total_target;
// }
//
// if (project.total_board != null)
// {
// project.text2 = "ผลรวมคณะกรรมการ " + project.total_board;
// }
//
// if (project.twenty_one != null)
// {
// // foreach (var vv in project.twenty_one)
// // {
// // if (vv.activity != null || vv.activity!= "")
// // {
// // vv.activity = vv.activity;
// // }
// // if (vv.clause1 != null || vv.clause1!= "")
// // {
// // vv.clause1 = vv.clause1;
// // }
// // if (vv.clause2 != null || vv.clause2!= "")
// // {
// // vv.clause2 = vv.clause2;
// // }
// // if (vv.clause3 != null || vv.clause3!= "")
// // {
// // vv.clause3 = vv.clause3;
// // }
// // if (vv.clause4 != null || vv.clause4!= "")
// // {
// // vv.clause4 = vv.clause4;
// // }
// // if (vv.count_unit != null || vv.count_unit != "")
// // {
// // string na = "ผู้เข้าร่วมโครงการ จำนวน ";
// // string na2 = " หน่วยนับ";
// // project.text1 = na + vv.count_unit + na2;
// // }
// //
// // if (vv.count_project != null || vv.count_project != "")
// // {
// // string na = "จำนวนครั้งที่ดำเนินโครงการ ";
// // string na2 = " ครั้ง";
// // project.text2 = na + vv.count_project + na2;
// // }
// //
// // if (vv.count_training != null || vv.count_training != "")
// // {
// // string na = "จำนวนการจัดอบรมและสัมมนา ";
// // string na2 = " เรื่อง";
// // project.text3 = na + vv.count_training + na2;
// // }
// //
// // if (vv.count_knowledge != null || vv.count_knowledge != "")
// // {
// // string na = "จำนวนเผยแพร่ความรู้บริการวิชาการ ";
// // string na2 = " ครั้ง";
// // project.text4 = na + vv.count_knowledge + na2;
// // }
// // string na3 = "วัน/เดือน/ปี ที่จะดำเนินโครงการ ";
// // string na4 = " ถึง ";
// // project.text5 = na3 + vv.project_start_date + na4 + vv.project_end_date;
// // string na5 = "โครงการแล้วเสร็จตามเวลาที่กำหนด (ร้อยละ) ";
// // project.text6 = na5 + vv.percentage_finish;
// //
// // }
//
// if (project.twenty_one == null)
// {
// project.twenty_one = null;
// }
// }
//
//
// if (project.twenty_fifth != null)
// {
// foreach (var fifthData in project.twenty_fifth)
// {
// foreach (var acti in fifthData.activity)
// {
// fifthData.activitys = acti;
// }
//
// foreach (var locat in fifthData.location)
// {
// fifthData.locations = locat;
// }
// }
// }
//
// var _project = new List<project_principle_rationale>() { project };
//
// Report report = new Report();
// report.Load(_setting.report_path + "project_principle_rationale_no_activity.frx");
// report.RegisterData(_project, "project_principle_rationale");
// report.Prepare();
//
// MemoryStream stream = new MemoryStream();
// switch (type)
// {
// case "pdf":
// PDFExport pdf = new PDFExport();
// report.Export(pdf, stream);
// stream.Seek(0, SeekOrigin.Begin);
// return File(stream, "application/pdf");
//
// case "xls":
// case "xlsx":
// Excel2007Export excel = new Excel2007Export();
// report.Export(excel, stream);
// stream.Seek(0, SeekOrigin.Begin);
// return File(stream, "application/vnd.ms-excel");
// break;
// case "mht":
// MHTExport mht = new MHTExport();
// report.Export(mht, stream);
// stream.Seek(0, SeekOrigin.Begin);
// return File(stream, "multipart/related");
// break;
// case "csv":
// CSVExport csv = new CSVExport();
// report.Export(csv, stream);
// stream.Seek(0, SeekOrigin.Begin);
// return File(stream, "text/csv");
// break;
// case "doc":
// case "docx":
// Word2007Export word = new Word2007Export();
// report.Export(word, stream);
// stream.Seek(0, SeekOrigin.Begin);
// return File(stream, "appllication/vnd.ms-word");
// break;
// }
//
// return Ok();
// }
}
}
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using ClosedXML.Excel;
using FastReport;
using FastReport.Export.Csv;
@@ -13,46 +14,392 @@ using Swashbuckle.AspNetCore.Annotations;
namespace rmutr_report.Controllers
{
[SwaggerTag("สำหรับรายงานคำขอโครงการ Thailand 4.0 (ง.5-2.2)")]
public class project_request_thailand: Controller
public class project_request_thailand : Controller
{
readonly Setting _setting;
readonly Setting _setting;
public project_request_thailand(Setting setting)
{
this._setting = setting;
}
[HttpPost, Route("reports/project_request_thailand/{type}")]
[HttpPost, Route("reports/project_request_thailand/{type}")]
[ApiExplorerSettings(GroupName = "reports")]
public IActionResult GetRequestProjectReport([FromRoute] string type, [FromBody] project_request_thai project)
public IActionResult GetRequestProjectReport([FromRoute] string type,
[FromBody] project_principle_rationale project)
{
foreach (var v in project.five)
// foreach (var v in project.five)
// {
// string na = "ประเด็นยุทธศาสตร์ที่ " ;
// v.strategic_issues = na + v.strategic_issues;
// string na2 = "กลยุทธ์ที่ " ;
// v.measure = na2 + v.measure;
// }
// foreach (var v in project.eleventh)
// {
// foreach (var vv in v.elevenths)
// {
// string na = "ครั้งที่ ";
// vv.the_time = na + vv.the_time;
//
// }
// }
if (project != null)
{
string na = "ประเด็นยุทธศาสตร์ที่ " ;
v.strategic_issues = na + v.strategic_issues;
string na2 = "กลยุทธ์ที่ " ;
v.measure = na2 + v.measure;
}
foreach (var v in project.eleventh)
{
foreach (var vv in v.elevenths)
if (project.activity.Any())
{
string na = "ครั้งที่ ";
vv.the_time = na + vv.the_time;
// string na2 = " จำนวน ";
// // vv.count_day = na2 + vv.count_day + " วัน";
// // if (project.count_day != null)
// // {
// // project.text3 = "จำนวน " + project.count_day + " วัน";
// // }
if (project.activity == null)
{
foreach (var detail in project.activity)
{
detail.activity = null;
}
}
}
else
{
project.activity.Add(new activity_data()
{
activity = ""
});
}
if (project.ninth != null)
{
foreach (var vv in project.ninth)
{
if (vv.clause == "9.1 ตัวชี้วัดผลสัมฤทธิ์")
{
vv.clause = "11.1 ตัวชี้วัดผลสัมฤทธิ์";
}
if (vv.clause == "9.2 ตัวชี้วัดเชิงนโยบาย")
{
vv.clause = "11.2 ตัวชี้วัดเชิงนโยบาย";
}
if (vv.ninths.Any())
{
if (vv.ninths == null)
{
foreach (var detail6 in vv.ninths)
{
detail6.detail = null;
}
}
}
else
{
vv.ninths.Add(new ninth_data_detail()
{
detail = ""
});
}
}
}
if (project.sixteenths != null)
{
int t = 1;
foreach (var sixteenthData in project.sixteenths)
{
string a = "กิจกรรมที่ " + t + " ";
var sum1 = sixteenthData.sixteenths2.Sum(d => d.salaya);
var sum2 = sixteenthData.sixteenths2.Sum(d => d.bophitphimuk);
var sum3 = sixteenthData.sixteenths2.Sum(d => d.pohchang);
var sum4 = sixteenthData.sixteenths2.Sum(d => d.klai_kangwon);
sixteenthData.salaya_total = sum1;
sixteenthData.bophitphimuk_total = sum2;
sixteenthData.pohchang_total = sum3;
sixteenthData.klai_kangwon_total = sum4;
if (sixteenthData.activity_table != null)
{
sixteenthData.activity_table = a + sixteenthData.activity_table;
}
if (sixteenthData.activity_table == null)
{
sixteenthData.activity_table = null;
}
if (sixteenthData.total_target != null)
{
project.text1 = "ผลรวมกลุ่มเป้าหมาย " + sixteenthData.total_target;
}
if (sixteenthData.total_target == null)
{
project.text1 = "ผลรวมกลุ่มเป้าหมาย -";
}
if (sixteenthData.total_board != null)
{
project.text2 = "ผลรวมคณะกรรมการ " + sixteenthData.total_board;
}
if (sixteenthData.total_board == null)
{
project.text2 = "ผลรวมคณะกรรมการ -";
}
t++;
}
}
if (project.seventeenth != null)
{
int t = 1;
//int ti= 1;
foreach (var v in project.seventeenth)
{
string a = "กิจกรรมที่ " + t + " ";
if (v.activity != null)
{
v.activity = a + v.activity;
}
if (v.activity == null)
{
v.activity = null;
}
t++;
foreach (var vv in v.seventeenths)
{
string na = "ครั้งที่ ";
vv.the_time = na + "1";
//ti++;
foreach (var detail in vv.seventeenths2)
{
string in1 = "พื้นที่ (ภายในมหาวิทยาลัย) ";
string in2 = "ระบุสถานที่ ";
string out1 = "จังหวัด (ภายนอกมหาวิทยาลัย) ";
if (detail.internal_external1 == "ภายในมหาวิทยาลัย")
{
detail.text1 = "ภายในมหาวิทยาลัย";
detail.area_province1 = in1 + detail.area_province1;
detail.location1 = in2 + detail.location1;
}
if (detail.internal_external2 == "ภายนอกมหาวิทยาลัย")
{
detail.text2 = "ภายนอกมหาวิทยาลัย";
detail.area_province2 = out1 + detail.area_province2;
detail.location2 = in2 + detail.location2;
}
}
}
}
}
if (project.eighteenth != null)
{
int t = 1;
//int ti = 1;
foreach (var v in project.eighteenth)
{
string a = "กิจกรรมที่ " + t + " ";
if (v.activity != null)
{
v.activity = a + v.activity;
}
if (v.activity == null)
{
v.activity = null;
}
t++;
foreach (var vv in v.eighteenths)
{
string na = "ครั้งที่ ";
vv.the_time = na + vv.the_time;
//ti++;
string na2 = " จำนวน ";
vv.count_day = na2 + vv.count_day + " วัน";
if (project.count_day != null)
{
project.text3 = "จำนวน " + project.count_day + " วัน";
}
}
}
}
if (project.nineteenth != null)
{
int t = 1;
foreach (var v in project.nineteenth)
{
foreach (var vv in v.nineteenth_data_header)
{
string a = "กิจกรรมที่ " + t + " ";
if (vv.activity != null)
{
vv.activity = a + vv.activity;
}
if (vv.activity == null)
{
vv.activity = null;
}
t++;
}
}
}
if (project.twenty_one != null)
{
int t = 1;
foreach (var v in project.twenty_one)
{
string a = "กิจกรรมที่ " + t + " ";
if (v.activity != null)
{
v.activity = a + v.activity;
}
if (v.activity == null)
{
v.activity = null;
}
t++;
foreach (var vv in v.twenty_ones)
{
if (vv.count_quantitative != null)
{
string na = " หน่วยนับ";
vv.khrang1 = na;
}
if (vv.count_unit != null)
{
string na = "ผู้เข้าร่วมโครงการ ";
string na1 = " จำนวน ";
string na2 = " คน";
vv.text1 = na;
vv.text11 = na1;
vv.nuai_nap = na2;
}
if (vv.count_project != null)
{
vv.clause1 = "23.1 เชิงปริมาณ";
string na = "จำนวนครั้งที่ดำเนินโครงการ ";
string na2 = " ครั้ง";
vv.text2 = na;
vv.khrang2 = na2;
vv.text12 = "หน่วยนับ";
}
if (vv.count_training != null)
{
string na = "จำนวนการจัดอบรมและสัมมนา ";
string na2 = " เรื่อง";
vv.text3 = na;
vv.rueang = na2;
}
if (vv.count_knowledge != null)
{
string na = "จำนวนเผยแพร่ความรู้บริการวิชาการ ";
string na2 = " ครั้ง";
vv.text4 = na;
vv.khrang3 = na2;
}
if (vv.percentage_finish != null)
{
vv.clause2 = "23.2 เชิงเวลา";
// string na3 = "วัน/เดือน/ปี ที่จะดำเนินโครงการ ";
// string na4 = " ถึง ";
// vv.range = na4;
// vv.text5 = na3;
string na5 = "โครงการแล้วเสร็จตามเวลาที่กำหนด (ร้อยละ) ";
vv.text6 = na5;
}
if (vv.percentage1 != null || vv.percentage2 != null)
{
vv.clause3 = "23.3 เชิงคุณภาพ";
string na = "ผู้เข้าร่วมโครงการมีความรู้ความเข้าใจเพิ่มขึ้น (ร้อยละ) ";
string na1 = "ความพึงพอใจของผู้เข้ารับบริการในกระบวนการให้บริการ (ร้อยละ) ";
string na2 = "โครงการที่บรรลุผลตามวัตถุประสงค์ของโครงการ (ร้อยละ) ";
vv.text7 = na;
vv.text8 = na1;
vv.text9 = "ผู้เข้าร่วมโครงการสามารถนำความรู้ที่ได้รับไปบูรณาการอย่างไรบ้าง";
vv.text10 = na2;
}
if (vv.expenses != null)
{
vv.clause4 = "23.4 เชิงค่าใช้จ่าย";
vv.bath = " บาท";
}
}
}
}
}
var _project = new List<project_request_thai>() {project};
if (project.twenty_four != null)
{
int t = 1;
foreach (var v in project.twenty_four)
{
string a = "กิจกรรมที่ " + t + " ";
if (v.activity != null)
{
v.activity = a + v.activity;
}
if (v.activity == null)
{
v.activity = null;
}
t++;
}
}
if (project.twenty_fifth != null)
{
int t = 1;
foreach (var v in project.twenty_fifth)
{
foreach (var acti in v.activity)
{
v.activitys = acti;
}
foreach (var locat in v.location)
{
v.locations = locat;
}
string a = "กิจกรรมที่ " + t + " ";
if (v.activity_display_name != null)
{
v.activity_display_name = a + v.activity_display_name;
}
if (v.activity_display_name == null)
{
v.activity_display_name = null;
}
t++;
}
}
var _project = new List<project_principle_rationale>() { project };
Report report = new Report();
report.Load(_setting.report_path + "project_request_thailands.frx");
report.RegisterData(_project, "project_request_thai");
report.RegisterData(_project, "project_principle_rationale");
report.Prepare();
MemoryStream stream = new MemoryStream();
@@ -63,21 +410,21 @@ namespace rmutr_report.Controllers
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
break;
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/vnd.ms-excel");
break;
case "mht":
MHTExport mht = new MHTExport();
report.Export(mht, stream);
case "xlsx":
Excel2007Export excel1 = new Excel2007Export();
report.Export(excel1, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "multipart/related");
return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
break;
case "doc": case "docx":
case "doc":
case "docx":
Word2007Export word = new Word2007Export();
report.Export(word, stream);
stream.Seek(0, SeekOrigin.Begin);
@@ -87,6 +434,5 @@ namespace rmutr_report.Controllers
return Ok();
}
}
}
+17
View File
@@ -0,0 +1,17 @@
FROM registry.71dev.com/dotnetsdk:8.0 as build-env
WORKDIR /source
COPY . .
RUN dotnet restore --configfile nuget.config
RUN dotnet publish -o /publish --configuration Release
FROM registry.71dev.com/dotnetaspnet:8.0
WORKDIR /app
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends apt-utils
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated libc6-dev libgdiplus libx11-dev
RUN DEBIAN_FRONTEND=noninteractive rm -rf /var/lib/apt/lists/*
COPY --from=build-env /publish .
RUN mkdir -p /usr/local/share/fonts/fonts/sarabun
COPY Fonts/* /usr/local/share/fonts/sarabun/
RUN chmod 644 /usr/local/share/fonts/sarabun/*
ENV ASPNETCORE_URLS http://*:8080
ENTRYPOINT ["dotnet", "rmutr_report.dll"]
-23
View File
@@ -1,23 +0,0 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as build-env
WORKDIR /source
COPY . .
RUN dotnet restore --configfile nuget.config --disable-parallel
RUN dotnet build
RUN dotnet publish -o /publish --configuration Release;
FROM mcr.microsoft.com/dotnet/aspnet:3.1
COPY . .
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y fontconfig
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated libc6-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated libgdiplus
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated libx11-dev
RUN DEBIAN_FRONTEND=noninteractive rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/local/share/fonts/fonts/sarabun
COPY Fonts/* /usr/local/share/fonts/sarabun/
RUN chmod 644 /usr/local/share/fonts/sarabun/*
RUN fc-cache -fv
WORKDIR /app
COPY --from=build-env /publish .
ENV ASPNETCORE_URLS http://*:8080
ENTRYPOINT ["dotnet", "rmutr_report.dll"]
+1
View File
@@ -1,2 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=4EC9BE8E_002D1881_002D95C9_002D9F3E_002D1B17D679F3EC_002Fd_003AControllers_002Ff_003ABudget_002EController_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=4EC9BE8E_002D1881_002D95C9_002D9F3E_002D1B17D679F3EC_002Fd_003AControllers_002Ff_003APersonnel_002EController_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>
Binary file not shown.
@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace rmutr_report.Models.Personnel
{
public class budget_expenditure_proposal
{
[Key] public Guid? budget_expenditure_proposal_uid { get; set; }
public string academic_year_name_th { get; set; }
public string agency_category_name { get; set; }
public string agency_name_th { get; set; }
public string agency_type { get; set; }
public int? type { get; set; }
public DateTime? version { get; set; }
public List<t_budget_expenditure_proposal_detail> budget_expenditure_proposal_details { get; set; }
}
public class t_budget_expenditure_proposal_detail
{
[Key] public Guid? budget_expenditure_proposal_detail_uid { get; set; }
public Guid? budget_expenditure_proposal_uid { get; set; }
public string topic { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? act_year1_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? act_year1_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? disbursement_results_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? disbursement_results_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? budget_act_year2_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? budget_act_year2_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? adjust_the_base_year2_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? adjust_the_base_year2_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? request_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? request_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? offer_account1_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? offer_account1_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? offer_increase_decrease_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? offer_increase_decrease_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? offer_new_rate_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? offer_new_rate_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? offer_total_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? offer_total_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? increase_decrease_from_year_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? increase_decrease_from_year_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? increase_decrease_from_year_3 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? increase_decrease_from_year_4 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? mtef_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? mtef_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? mtef_3 { get; set; }
public string remark { get; set; }
public int? topic_type { get; set; }
public int? row { get; set; }
}
}
+139
View File
@@ -0,0 +1,139 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace rmutr_report.Models.Personnel
{
public class personnel_report
{
[Key] public Guid? personnel_uid { get; set; }
public Guid? sync_uid { get; set; }
public string academic_year_name_th { get; set; }
public string agency_name_th { get; set; }
public string personnel_type_code { get; set; }
public List<t_personnel_report_detail> personnel_report_detail { get; set; }
public double? value_1 { get; set; }
public double? value_2 { get; set; }
public double? value_3 { get; set; }
public double? value_4 { get; set; }
public double? value_5 { get; set; }
public double? value_6 { get; set; }
public double? value_7 { get; set; }
public double? value_8 { get; set; }
public double? value_9 { get; set; }
public double? value_10 { get; set; }
public double? value_11 { get; set; }
public double? value_12 { get; set; }
public double? value_13 { get; set; }
public double? value_14 { get; set; }
public double? value_15 { get; set; }
public double? value_16 { get; set; }
public double? value_17 { get; set; }
public double? value_18 { get; set; }
public double? value_19 { get; set; }
public double? value_20 { get; set; }
public double? value_21 { get; set; }
public double? value_22 { get; set; }
public double? value_23 { get; set; }
public double? value_24 { get; set; }
public double? value_25 { get; set; }
public double? value_26 { get; set; }
public double? value_27 { get; set; }
public double? value_28 { get; set; }
public double? value_29 { get; set; }
public double? value_30 { get; set; }
public double? value_31 { get; set; }
public double? value_32 { get; set; }
public double? value_33 { get; set; }
public double? value_34 { get; set; }
public double? value_35 { get; set; }
}
public class t_personnel_report_detail
{
[Key] public Guid? personnel_report_detail_uid { get; set; }
public Guid? personnel_report_uid { get; set; }
public int? topic_type { get; set; }
public string topic { get; set; }
public double? value_1 { get; set; }
public double? value_2 { get; set; }
public double? value_3 { get; set; }
public double? value_4 { get; set; }
public double? value_5 { get; set; }
public double? value_6 { get; set; }
public double? value_7 { get; set; }
public double? value_8 { get; set; }
public double? value_9 { get; set; }
public double? value_10 { get; set; }
public double? value_11 { get; set; }
public double? value_12 { get; set; }
public double? value_13 { get; set; }
public double? value_14 { get; set; }
public double? value_15 { get; set; }
public double? value_16 { get; set; }
public double? value_17 { get; set; }
public double? value_18 { get; set; }
public double? value_19 { get; set; }
public double? value_20 { get; set; }
public double? value_21 { get; set; }
public double? value_22 { get; set; }
public double? value_23 { get; set; }
public double? value_24 { get; set; }
public double? value_25 { get; set; }
public double? value_26 { get; set; }
public double? value_27 { get; set; }
public double? value_28 { get; set; }
public double? value_29 { get; set; }
public double? value_30 { get; set; }
public double? value_31 { get; set; }
public double? value_32 { get; set; }
public double? value_33 { get; set; }
public double? value_34 { get; set; }
public double? value_35 { get; set; }
public double? value_36 { get; set; }
public double? value_37 { get; set; }
public double? value_38 { get; set; }
public double? value_39 { get; set; }
public double? value_40 { get; set; }
public double? value_41 { get; set; }
public double? value_42 { get; set; }
public double? value_43 { get; set; }
public double? value_44 { get; set; }
public double? value_45 { get; set; }
public double? value_46 { get; set; }
public double? value_47 { get; set; }
public double? value_48 { get; set; }
public double? value_49 { get; set; }
public double? value_50 { get; set; }
}
}
+78
View File
@@ -0,0 +1,78 @@
using System.Collections.Generic;
namespace rmutr_report.Models.Personnel
{
public class summary_mtef
{
public string budget_year { get; set; }
public string year1 { get; set; }
public string year2 { get; set; }
public string year3 { get; set; }
public string year4 { get; set; }
public string year5 { get; set; }
public string year6 { get; set; }
public string year7 { get; set; }
public string year8 { get; set; }
public List<summary_mtef_detail>data { get; set; }
public decimal? budget_1 { get; set; }
public decimal? budget_2 { get; set; }
public decimal? budget_3 { get; set; }
public decimal? budget_4 { get; set; }
public decimal? budget_5 { get; set; }
public decimal? budget_6 { get; set; }
public decimal? budget_7 { get; set; }
public decimal? budget_8 { get; set; }
public decimal? budget_9 { get; set; }
}
public class summary_mtef_detail {
public string list { get; set; }
public decimal? budget_1 { get; set; }
public decimal? budget_2 { get; set; }
public decimal? budget_3 { get; set; }
public decimal? budget_4 { get; set; }
public decimal? budget_5 { get; set; }
public decimal? budget_6 { get; set; }
public decimal? budget_7 { get; set; }
public decimal? budget_8 { get; set; }
public decimal? budget_9 { get; set; }
}
public class mtef_plan
{
public string budget_project_name_th { get; set; }
public string year1 { get; set; }
public string year2 { get; set; }
public string year3 { get; set; }
public string year4 { get; set; }
public string year5 { get; set; }
public string year6 { get; set; }
public string year7 { get; set; }
public string year8 { get; set; }
public List<mtef_plan_detail>data { get; set; }
public decimal? budget_1 { get; set; }
public decimal? budget_2 { get; set; }
public decimal? budget_3 { get; set; }
public decimal? budget_4 { get; set; }
public decimal? budget_5 { get; set; }
public decimal? budget_6 { get; set; }
public decimal? budget_7 { get; set; }
public decimal? budget_8 { get; set; }
public decimal? budget_9 { get; set; }
}
public class mtef_plan_detail
{
public int? topic_type { get; set; }
public string list { get; set; }
public decimal? budget_1 { get; set; }
public decimal? budget_2 { get; set; }
public decimal? budget_3 { get; set; }
public decimal? budget_4 { get; set; }
public decimal? budget_5 { get; set; }
public decimal? budget_6 { get; set; }
public decimal? budget_7 { get; set; }
public decimal? budget_8 { get; set; }
public decimal? budget_9 { get; set; }
}
}
@@ -0,0 +1,37 @@
using System.Collections.Generic;
namespace rmutr_report.Models.RoThree
{
public class calculate_meeting_expenses
{
public int? topic_type { get; set; }
public string text1 { get; set; }
public string text2 { get; set; }
public string text3 { get; set; }
public string text4 { get; set; }
public string budget_year { get; set; }
public string date_range { get; set; }
public string product { get; set; }
public string agency_name_th { get; set; }
public string sector { get; set; }
public List<calculate_meeting_expenses_data_datail> data { get; set; }
public decimal? disbursement_result { get; set; }
public decimal? expense_rate { get; set; }
public decimal? count_person { get; set; }
public decimal? count_meetings { get; set; }
public decimal? total { get; set; }
}
public class calculate_meeting_expenses_data_datail
{
public int? topic_type { get; set; } //1 สีเหลือง 2 ข้อย่อย
public string no { get; set; }
public string row_no { get; set; }
public string topic_name { get; set; }
public decimal? disbursement_result { get; set; }
public decimal? expense_rate { get; set; }
public decimal? count_person { get; set; }
public decimal? count_meetings { get; set; }
public decimal? total { get; set; }
}
}
-1
View File
@@ -11,7 +11,6 @@ namespace rmutr_report.Models.RoThree
public string sector { get; set; }
public decimal? total_amount { get; set; }
public List<compensation_head_detail> data { get; set; }
}
public class compensation_head_detail
+27
View File
@@ -0,0 +1,27 @@
using System.Collections.Generic;
namespace rmutr_report.Models.RoThree
{
public class compensation_ro_three
{
public int? topic_type { get; set; } //1 2 3
public string topic_name { get; set; }
public string budget_year { get; set; }
public string date_range { get; set; }
public string product { get; set; }
public string agency_name_th { get; set; }
public string sector { get; set; }
public decimal? total_amount { get; set; }
public List<compensation_ro_three_detail> data { get; set; }
}
public class compensation_ro_three_detail
{
public string faculty_name_th { get; set; }
public string display_name_th { get; set; }
public decimal? salary_rate { get; set; }
public decimal? budget_amount { get; set; }
public string remark { get; set; }
}
}
@@ -0,0 +1,22 @@
using System.Collections.Generic;
namespace rmutr_report.Models.RoThree
{
public class consultant_compensation
{
public int? topic_type { get; set; } //1 2 3 4 5 6
public string topic_name { get; set; }
public decimal? total_amount { get; set; }
public List<consultant_compensation_detail> data { get; set; }
}
public class consultant_compensation_detail
{
public string list { get; set; }
public decimal? quantity_day { get; set; }
public decimal? quantity_person { get; set; }
public decimal? rate { get; set; }
public decimal? total_amount { get; set; }
}
}
+22
View File
@@ -0,0 +1,22 @@
using System.Collections.Generic;
namespace rmutr_report.Models.RoThree
{
public class contributions
{
public int? topic_type { get; set; } //1 2
public string topic_name { get; set; }
public decimal? total_amount { get; set; }
public List<contributions_detail> data { get; set; }
}
public class contributions_detail
{
public string position { get; set; }
public string qualification { get; set; }
public decimal? salary { get; set; }
public decimal? amount { get; set; }
public decimal? per_year { get; set; }
}
}
+11 -6
View File
@@ -9,6 +9,7 @@ namespace rmutr_report.Models.RoThree
[Key] public Guid? budget_income_qualification_uid { get; set; }
public Guid? budget_year_uid { get; set; }
public int? budget_income_qualification_no { get; set; }
public string qualification_no { get; set; }
public DateTime? budget_income_qualification_date { get; set; }
public string budget_income_qualification_dates { get; set; }
public string budget_income_qualification_topic { get; set; }
@@ -19,7 +20,9 @@ namespace rmutr_report.Models.RoThree
public string position_name { get; set; }
public Guid? agency_uid { get; set; }
public Guid? budget_plan_uid { get; set; }
public Guid? budget_project_uid { get; set; }
//
public string college_faculty_name_th { get; set; }
public string budget_project_name_th { get; set; }
@@ -30,21 +33,23 @@ namespace rmutr_report.Models.RoThree
public string year_budget_project { get; set; }
public int? budget_project_time_year { get; set; }
public int? budget_project_time_month { get; set; }
public string due_to { get; set; } //เนื่องจาก
public string due_to { get; set; }
public Guid? current_position_uid { get; set; }
public Guid? new_position_uid { get; set; }
public Guid? current_qualification_uid { get; set; }
public Guid? new_qualification_uid { get; set; }
//
public string current_position { get; set; }
public string new_position { get; set; }
public string new_position { get; set; }
public string current_qualification { get; set; }
public string new_qualification { get; set; }
[Column(TypeName ="decimal(18,2)")]
public decimal? current_salary { get; set; }
[Column(TypeName ="decimal(18,2)")]
public decimal? new_salary { get; set; }
[Column(TypeName = "decimal(18,2)")] public decimal? current_salary { get; set; }
[Column(TypeName = "decimal(18,2)")] public decimal? new_salary { get; set; }
public string budget_income_qualification_file_1 { get; set; }
public string budget_income_qualification_file_2 { get; set; }
public string remark { get; set; }//เนื่องจาก
}
}
+40
View File
@@ -54,6 +54,7 @@ namespace rmutr_report.Models.RoThree
public decimal? salary { get; set; }
public string new_position { get; set; }
//
public Guid? budget_project_uid { get; set; }
public Guid? budget_plan_uid { get; set; }
@@ -62,6 +63,45 @@ namespace rmutr_report.Models.RoThree
public string budget_year_name_th { get; set; }
public List<t_form_1_2_images> form_1_2_images { get; set; }
public List<t_form_1_2_images_2> form_1_2_images_2 { get; set; }
// New2570 spec — header-level
public int? request_count { get; set; }
public string division_name { get; set; }
public string overall_reason { get; set; }
// New2570 spec — signer (ผู้ขอ)
public string signer_type { get; set; }
public string signer_name { get; set; }
public string signer_position { get; set; }
// New2570 spec — approver (หัวหน้าหน่วยงาน)
public string approver_decision { get; set; }
public string approver_reason { get; set; }
public string approver_name { get; set; }
public string approver_admin_position { get; set; }
public List<form_1_2_positions> form_1_2_positions { get; set; }
}
public class form_1_2_positions
{
[Key] public Guid? form_1_2_position_uid { get; set; }
public Guid? form_1_2_uid { get; set; }
public int? row { get; set; }
public string old_position_no { get; set; }
public string old_position_name { get; set; }
public string old_qualification { get; set; }
public string old_division_name { get; set; }
public string old_workload { get; set; }
public string new_position_no { get; set; }
public string new_position_name { get; set; }
public string new_qualification { get; set; }
public string new_division_name { get; set; }
public string new_workload { get; set; }
public string reason { get; set; }
}
public class t_form_1_2_images
+3 -1
View File
@@ -55,6 +55,7 @@ namespace rmutr_report.Models.RoThree
//
public string another_document_remark { get; set; }
//
public string budget_year { get; set; }
public string agency_category_name { get; set; }
@@ -129,11 +130,12 @@ namespace rmutr_report.Models.RoThree
//
public int? row { get; set; }
//
public decimal? quantity { get; set; }
public List<t_form_1_3_files> files { get; set; }
}
public class t_form_1_3_files
{
[Key] public Guid? form_1_3_files_uid { get; set; }
+31
View File
@@ -0,0 +1,31 @@
using System.Collections.Generic;
namespace rmutr_report.Models.RoThree
{
public class house_rent_ro_three
{
public int? topic_type { get; set; } //1 2 3
public string topic_name { get; set; }
public string budget_year { get; set; }
public string product { get; set; }
public string agency_name_th { get; set; }
public string sector { get; set; }
public List<house_rent_ro_three_detail> data { get; set; }
}
public class house_rent_ro_three_detail
{
public string display_name_th { get; set; }
public string position { get; set; }
public string qualification { get; set; }
public decimal? salary_rate { get; set; }
public decimal? other_compensation { get; set; }
public decimal? rent_per_month { get; set; }
public decimal? rent_per_year { get; set; }
public decimal? book { get; set; }
public decimal? insurance { get; set; }
public decimal? fee { get; set; }
public string station { get; set; }
}
}
+20
View File
@@ -0,0 +1,20 @@
using System.Collections.Generic;
namespace rmutr_report.Models.RoThree
{
public class land_rent
{
public string budget_year { get; set; }
public decimal? total_amount { get; set; }
public List<land_rent_data_datail> data { get; set; }
}
public class land_rent_data_datail
{
public string list { get; set; }
public decimal? amount { get; set; }
public string unit { get; set; }
public decimal? unit_price { get; set; }
public decimal? total_amount { get; set; }
}
}
+76 -68
View File
@@ -10,99 +10,107 @@ namespace rmutr_report.Models.RoThree
public string semester_year_1 { get; set; }
public string semester_year_2 { get; set; }
public string material_semester_year_1 { get; set; }
public string material_semester_year_2 { get; set; }
//
public decimal? semester_year_1_level_1 { get; set; }
public decimal? semester_year_1_level_2 { get; set; }
public decimal? semester_year_1_level_3 { get; set; }
public decimal? semester_year_1_level_4 { get; set; }
public decimal? semester_year_1_level_5 { get; set; }
public decimal? semester_year_1_level_1 { get; set; }
public decimal? semester_year_1_level_2 { get; set; }
public decimal? semester_year_1_level_3 { get; set; }
public decimal? semester_year_1_level_4 { get; set; }
public decimal? semester_year_1_level_5 { get; set; }
public decimal? total_semester_year_level_1 { get; set; }
public decimal? rate_semester_year_level_1 { get; set; }
public decimal? rate_semester_year_level_1 { get; set; }
public decimal? material_amount_1 { get; set; }
//
public decimal? semester_year_2_level_1 { get; set; }
public decimal? semester_year_2_level_2 { get; set; }
public decimal? semester_year_2_level_3 { get; set; }
public decimal? semester_year_2_level_4 { get; set; }
public decimal? semester_year_2_level_5 { get; set; }
public decimal? semester_year_2_level_1 { get; set; }
public decimal? semester_year_2_level_2 { get; set; }
public decimal? semester_year_2_level_3 { get; set; }
public decimal? semester_year_2_level_4 { get; set; }
public decimal? semester_year_2_level_5 { get; set; }
public decimal? total_semester_year_level_2 { get; set; }
public decimal? rate_semester_year_level_2 { get; set; }
public decimal? material_amount_2 { get; set; }
public decimal? total_material { get; set; }
public List<material_education_detail1> data_1 { get; set; }
public decimal? rate_semester_year_level_2 { get; set; }
public decimal? material_amount_2 { get; set; }
public decimal? total_material { get; set; }
public List<material_education_detail1> data_1 { get; set; }
}
public class material_education_detail1
{
public string education_level { get; set; }
public decimal? semester_year_1_level_1 { get; set; }
public decimal? semester_year_1_level_2 { get; set; }
public decimal? semester_year_1_level_3 { get; set; }
public decimal? semester_year_1_level_4 { get; set; }
public decimal? semester_year_1_level_5 { get; set; }
public string education_level { get; set; }
public decimal? semester_year_1_level_1 { get; set; }
public decimal? semester_year_1_level_2 { get; set; }
public decimal? semester_year_1_level_3 { get; set; }
public decimal? semester_year_1_level_4 { get; set; }
public decimal? semester_year_1_level_5 { get; set; }
public decimal? total_semester_year_level_1 { get; set; }
public decimal? rate_semester_year_level_1 { get; set; }
public decimal? material_amount_1 { get; set; }
//
public decimal? semester_year_2_level_1 { get; set; }
public decimal? semester_year_2_level_2 { get; set; }
public decimal? semester_year_2_level_3 { get; set; }
public decimal? semester_year_2_level_4 { get; set; }
public decimal? semester_year_2_level_5 { get; set; }
public decimal? total_semester_year_level_2 { get; set; }
public decimal? rate_semester_year_level_2 { get; set; }
public decimal? material_amount_2 { get; set; }
public decimal? total_material { get; set; }
public List<material_education_detail2> data_2 { get; set; }
public decimal? rate_semester_year_level_1 { get; set; }
public decimal? material_amount_1 { get; set; }
//
public decimal? semester_year_2_level_1 { get; set; }
public decimal? semester_year_2_level_2 { get; set; }
public decimal? semester_year_2_level_3 { get; set; }
public decimal? semester_year_2_level_4 { get; set; }
public decimal? semester_year_2_level_5 { get; set; }
public decimal? total_semester_year_level_2 { get; set; }
public decimal? rate_semester_year_level_2 { get; set; }
public decimal? material_amount_2 { get; set; }
public decimal? total_material { get; set; }
public List<material_education_detail2> data_2 { get; set; }
}
public class material_education_detail2
{
public string curriculum { get; set; }
public decimal? semester_year_1_level_1 { get; set; }
public decimal? semester_year_1_level_2 { get; set; }
public decimal? semester_year_1_level_3 { get; set; }
public decimal? semester_year_1_level_4 { get; set; }
public decimal? semester_year_1_level_5 { get; set; }
public string curriculum { get; set; }
public decimal? semester_year_1_level_1 { get; set; }
public decimal? semester_year_1_level_2 { get; set; }
public decimal? semester_year_1_level_3 { get; set; }
public decimal? semester_year_1_level_4 { get; set; }
public decimal? semester_year_1_level_5 { get; set; }
public decimal? total_semester_year_level_1 { get; set; }
public decimal? rate_semester_year_level_1 { get; set; }
public decimal? material_amount_1 { get; set; }
//
public decimal? semester_year_2_level_1 { get; set; }
public decimal? semester_year_2_level_2 { get; set; }
public decimal? semester_year_2_level_3 { get; set; }
public decimal? semester_year_2_level_4 { get; set; }
public decimal? semester_year_2_level_5 { get; set; }
public decimal? total_semester_year_level_2 { get; set; }
public decimal? rate_semester_year_level_2 { get; set; }
public decimal? material_amount_2 { get; set; }
public decimal? total_material { get; set; }
public List<material_education_detail3> data_3 { get; set; }
public decimal? rate_semester_year_level_1 { get; set; }
public decimal? material_amount_1 { get; set; }
//
public decimal? semester_year_2_level_1 { get; set; }
public decimal? semester_year_2_level_2 { get; set; }
public decimal? semester_year_2_level_3 { get; set; }
public decimal? semester_year_2_level_4 { get; set; }
public decimal? semester_year_2_level_5 { get; set; }
public decimal? total_semester_year_level_2 { get; set; }
public decimal? rate_semester_year_level_2 { get; set; }
public decimal? material_amount_2 { get; set; }
public decimal? total_material { get; set; }
public List<material_education_detail3> data_3 { get; set; }
}
public class material_education_detail3
{
public string major { get; set; }
public decimal? semester_year_1_level_1 { get; set; }
public decimal? semester_year_1_level_2 { get; set; }
public decimal? semester_year_1_level_3 { get; set; }
public decimal? semester_year_1_level_4 { get; set; }
public decimal? semester_year_1_level_5 { get; set; }
public string major { get; set; }
public decimal? semester_year_1_level_1 { get; set; }
public decimal? semester_year_1_level_2 { get; set; }
public decimal? semester_year_1_level_3 { get; set; }
public decimal? semester_year_1_level_4 { get; set; }
public decimal? semester_year_1_level_5 { get; set; }
public decimal? total_semester_year_level_1 { get; set; }
public decimal? rate_semester_year_level_1 { get; set; }
public decimal? rate_semester_year_level_1 { get; set; }
public decimal? material_amount_1 { get; set; }
//
public decimal? semester_year_2_level_1 { get; set; }
public decimal? semester_year_2_level_2 { get; set; }
public decimal? semester_year_2_level_3 { get; set; }
public decimal? semester_year_2_level_4 { get; set; }
public decimal? semester_year_2_level_5 { get; set; }
public decimal? semester_year_2_level_1 { get; set; }
public decimal? semester_year_2_level_2 { get; set; }
public decimal? semester_year_2_level_3 { get; set; }
public decimal? semester_year_2_level_4 { get; set; }
public decimal? semester_year_2_level_5 { get; set; }
public decimal? total_semester_year_level_2 { get; set; }
public decimal? rate_semester_year_level_2 { get; set; }
public decimal? material_amount_2 { get; set; }
public decimal? total_material { get; set; }
public decimal? rate_semester_year_level_2 { get; set; }
public decimal? material_amount_2 { get; set; }
public decimal? total_material { get; set; }
}
}
+2 -3
View File
@@ -8,15 +8,14 @@ namespace rmutr_report.Models.RoThree
public string agency_name_th { get; set; }
public string sector { get; set; }
public decimal? total_amount { get; set; }
public List<material_fuel_lubricant_detail> data { get; set; }
public List<material_fuel_lubricant_detail> data { get; set; }
}
public class material_fuel_lubricant_detail
{
public string type { get; set; }
public decimal? total_amount { get; set; }
public List<material_fuel_lubricant_data_detail> data_detail { get; set; }
public List<material_fuel_lubricant_data_detail> data_detail { get; set; }
}
public class material_fuel_lubricant_data_detail
+2 -1
View File
@@ -4,6 +4,7 @@ namespace rmutr_report.Models.RoThree
{
public class material_ro_three
{
public string material_name { get; set; }
public string product { get; set; }
public string agency_name_th { get; set; }
public string sector { get; set; }
@@ -18,5 +19,5 @@ namespace rmutr_report.Models.RoThree
public decimal? unit_price { get; set; }
public decimal? material_amount { get; set; }
public string remark { get; set; }
}
}
}
+4 -9
View File
@@ -12,8 +12,6 @@ namespace rmutr_report.Models.RoThree
public string disbursement_result_year { get; set; }
public string set_year { get; set; }
public List<operating_budget_ro_three_detail> data_1 { get; set; }
}
public class operating_budget_ro_three_detail
@@ -26,8 +24,7 @@ namespace rmutr_report.Models.RoThree
public decimal? rate { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
public List<operating_budget_ro_three_detail2> data_2{ get; set; }
public List<operating_budget_ro_three_detail2> data_2 { get; set; }
}
public class operating_budget_ro_three_detail2
@@ -41,8 +38,7 @@ namespace rmutr_report.Models.RoThree
public decimal? rate { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
public List<operating_budget_ro_three_detail3> data_3{ get; set; }
public List<operating_budget_ro_three_detail3> data_3 { get; set; }
}
public class operating_budget_ro_three_detail3
@@ -56,8 +52,7 @@ namespace rmutr_report.Models.RoThree
public decimal? rate { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
public List<operating_budget_ro_three_detail4> data_4{ get; set; }
public List<operating_budget_ro_three_detail4> data_4 { get; set; }
}
public class operating_budget_ro_three_detail4
@@ -69,6 +64,6 @@ namespace rmutr_report.Models.RoThree
public decimal? quantity_2 { get; set; }
public decimal? rate { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
public string remark { get; set; }
}
}
@@ -8,22 +8,20 @@ namespace rmutr_report.Models.RoThree
public string area { get; set; }
public string faculty { get; set; }
public string semester { get; set; }
public string year { get; set; }
public string budget_project_name_th { get; set; }
public List<revenue_estimate_education_fee_detail1> data_1 { get; set; }
public string side { get; set; }
public decimal? total_curriculum { get; set; }
public decimal? total_revenue { get; set; }
public string year { get; set; }
public string budget_project_name_th { get; set; }
public List<revenue_estimate_education_fee_detail1> data_1 { get; set; }
public string side { get; set; }
public decimal? total_revenue { get; set; }
}
public class revenue_estimate_education_fee_detail1
{
public string curriculum { get; set; }
public decimal? total_curriculum { get; set; }
public List<revenue_estimate_education_fee_detail2> data_2 { get; set; }
}
public class revenue_estimate_education_fee_detail2
{
public string year_class { get; set; }
@@ -41,9 +39,8 @@ public decimal? total_revenue { get; set; }
public decimal? allocation { get; set; }
public decimal? total_allocation_amount { get; set; }
public List<revenue_estimate_education_fee_detail3> data_3 { get; set; }
}
public class revenue_estimate_education_fee_detail3
{
public string topic_code { get; set; }
@@ -10,8 +10,8 @@ namespace rmutr_report.Models.RoThree
public string register_semester_year_1 { get; set; }
public string register_semester_year_2 { get; set; }
public string education_semester_year_1 { get; set; }
public string education_semester_year_2 { get; set; }
public List<revenue_estimate_income_summary_detail> data{ get; set; }
public string education_semester_year_2 { get; set; }
public List<revenue_estimate_income_summary_detail> data { get; set; }
public decimal? sum_1 { get; set; }
public decimal? sum_2 { get; set; }
public decimal? sum_3 { get; set; }
@@ -31,7 +31,6 @@ namespace rmutr_report.Models.RoThree
public string test { get; set; }
public string position_test { get; set; }
public string test_date { get; set; }
}
public class revenue_estimate_income_summary_detail
@@ -50,6 +49,5 @@ namespace rmutr_report.Models.RoThree
public decimal? total_science { get; set; }
public decimal? total_social { get; set; }
public decimal? total_science_social { get; set; }
}
}
+25
View File
@@ -0,0 +1,25 @@
using System.Collections.Generic;
namespace rmutr_report.Models.RoThree
{
public class service_fee_ro_three
{
public string budget_year { get; set; }
public string date_range { get; set; }
public string product { get; set; }
public string agency_name_th { get; set; }
public string sector { get; set; }
public List<service_fee_ro_three_data_datail> data { get; set; }
}
public class service_fee_ro_three_data_datail
{
public string service_fee_type { get; set; }
public string list { get; set; }
public decimal? area { get; set; }
public decimal? count_person { get; set; }
public decimal? wage_month { get; set; }
public decimal? wage_year { get; set; }
}
}
@@ -0,0 +1,28 @@
using System.Collections.Generic;
namespace rmutr_report.Models.RoThree
{
public class summary_income_cooperative
{
public string budget_year { get; set; }
public string date_range { get; set; }
public string faculty_college { get; set; }
public string area { get; set; }
public List<summary_income_cooperative_detail> data { get; set; }
public string maker { get; set; }
public string position_maker { get; set; }
public string maker_date { get; set; }
}
public class summary_income_cooperative_detail
{
public int? topic_type { get; set; }
public string topic { get; set; }
public double? revenue_estimates { get; set; }
public double? deduct_expenses_percent60 { get; set; }
public double? deduct_expenses_percent10 { get; set; }
public double? balance { get; set; }
public double? deduct_tuition_fees { get; set; }
public double? balance_university { get; set; }
}
}
@@ -0,0 +1,50 @@
using System.Collections.Generic;
namespace rmutr_report.Models.RoThree
{
public class teaching_fee_extra_ro_three
{
public string budget_year { get; set; }
public string product { get; set; }
public string agency_name_th { get; set; }
public string sector { get; set; }
public string area { get; set; }
public string year { get; set; }
public string semester { get; set; }
public List<teaching_fee_extra_ro_three_data> data { get; set; }
public decimal? month_1 { get; set; }
public decimal? month_2 { get; set; }
public decimal? month_3 { get; set; }
public decimal? month_4 { get; set; }
public decimal? month_5 { get; set; }
public decimal? month_6 { get; set; }
public decimal? month_7 { get; set; }
public decimal? month_8 { get; set; }
public decimal? month_9 { get; set; }
public decimal? month_10 { get; set; }
public decimal? month_11 { get; set; }
public decimal? month_12 { get; set; }
public decimal? total { get; set; }
}
public class teaching_fee_extra_ro_three_data
{
public string row_no { get; set; }
public string display_name { get; set; }
public string position { get; set; }
public string subject { get; set; }
public decimal? month_1 { get; set; }
public decimal? month_2 { get; set; }
public decimal? month_3 { get; set; }
public decimal? month_4 { get; set; }
public decimal? month_5 { get; set; }
public decimal? month_6 { get; set; }
public decimal? month_7 { get; set; }
public decimal? month_8 { get; set; }
public decimal? month_9 { get; set; }
public decimal? month_10 { get; set; }
public decimal? month_11 { get; set; }
public decimal? month_12 { get; set; }
public decimal? total { get; set; }
}
}
+16 -59
View File
@@ -4,18 +4,17 @@ namespace rmutr_report.Models.RoThree
{
public class teaching_fee_ro_three
{
public string budget_year_1 { get; set; }
public string date_range_1 { get; set; }
public string product_1 { get; set; }
public string semester_1 { get; set; }
public string academic_year_1 { get; set; }
public string agency_name_th_1 { get; set; }
public string sector_1 { get; set; }
public string disbursement_result_year_1 { get; set; }
public string disbursement_result_semester_1 { get; set; }
public List<teaching_fee_ro_three_data_1> data_1 { get; set; }
//
public string budget_year { get; set; }
public string date_range { get; set; }
public string product { get; set; }
public string semester { get; set; }
public string academic_year { get; set; }
public string agency_name_th { get; set; }
public string sector { get; set; }
public string disbursement_result_year { get; set; }
public string disbursement_result_semester { get; set; }
public List<teaching_fee_ro_three_data> data { get; set; }
public decimal? table_1_ba_1 { get; set; }
public decimal? table_1_ma_1 { get; set; }
public decimal? table_1_ba_2 { get; set; }
@@ -25,54 +24,12 @@ namespace rmutr_report.Models.RoThree
public decimal? table_1_teaching_fee_1 { get; set; }
public decimal? table_1_teaching_fee_2 { get; set; }
public decimal? table_1_total { get; set; }
public string budget_year_2 { get; set; }
public string date_range_2 { get; set; }
public string product_2 { get; set; }
public string semester_2 { get; set; }
public string academic_year_2 { get; set; }
public string agency_name_th_2 { get; set; }
public string sector_2 { get; set; }
public string disbursement_result_year_2 { get; set; }
public string disbursement_result_semester_2 { get; set; }
public List<teaching_fee_ro_three_data_1> data_2 { get; set; }
//
public decimal? table_2_ba_1 { get; set; }
public decimal? table_2_ma_1 { get; set; }
public decimal? table_2_ba_2 { get; set; }
public decimal? table_2_ma_2 { get; set; }
public decimal? table_2_ba_3 { get; set; }
public decimal? table_2_ma_3 { get; set; }
public decimal? table_2_teaching_fee_1 { get; set; }
public decimal? table_2_teaching_fee_2 { get; set; }
public decimal? table_2_total { get; set; }
public string budget_year_3 { get; set; }
public string date_range_3 { get; set; }
public string product_3 { get; set; }
public string semester_3 { get; set; }
public string academic_year_3 { get; set; }
public string agency_name_th_3 { get; set; }
public string sector_3 { get; set; }
public string disbursement_result_year_3 { get; set; }
public string disbursement_result_semester_3 { get; set; }
public List<teaching_fee_ro_three_data_1> data_3 { get; set; }
//
public decimal? table_3_ba_1 { get; set; }
public decimal? table_3_ma_1 { get; set; }
public decimal? table_3_ba_2 { get; set; }
public decimal? table_3_ma_2 { get; set; }
public decimal? table_3_ba_3 { get; set; }
public decimal? table_3_ma_3 { get; set; }
public decimal? table_3_teaching_fee_1 { get; set; }
public decimal? table_3_teaching_fee_2 { get; set; }
public decimal? table_3_total { get; set; }
}
public class teaching_fee_ro_three_data_1
public class teaching_fee_ro_three_data
{
public string display_name { get; set; }
public string subject_name_th { get; set; }
public string position { get; set; }
public decimal? disbursement_result { get; set; }
public decimal? number_of_hours_ba_1 { get; set; }
@@ -81,8 +38,8 @@ namespace rmutr_report.Models.RoThree
public decimal? number_of_hours_ma_2 { get; set; }
public decimal? number_of_hours_ba_3 { get; set; }
public decimal? number_of_hours_ma_3 { get; set; }
public decimal? excess_teaching_fee_1 { get; set; }
public decimal? excess_teaching_fee_2 { get; set; }
public decimal? teaching_fee_1 { get; set; }
public decimal? teaching_fee_2 { get; set; }
public decimal? total { get; set; }
}
}
+391
View File
@@ -0,0 +1,391 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
public class agency_report
{
[Key] public Guid? agency_report_uid { get; set; }
public Guid? change_project_detail_uid { get; set; }
public string budget_year_uid { get; set; }
public string budget_year_name_th { get; set; }
public string project_name_th { get; set; }
public string responsible_agency_name_th { get; set; }
public string responsible_faculty_name_th { get; set; }
//4. ระยะเวลาดำเนินโครงการ
public DateTime? start_date { get; set; }
public DateTime? end_date { get; set; }
public string startdate { get; set; }
public string enddate { get; set; }
//5. สถานที่ดำเนินโครงการ
public string location { get; set; }
//6. ผลผลิต
public string text_6 { get; set; }
//7
public string text_7 { get; set; }
public string text_9 { get; set; }
public string text_10 { get; set; }
//11. งบประมาณ
public bool? bool_11_1 { get; set; }
public bool? bool_11_2 { get; set; }
public bool? bool_11_3 { get; set; }
public string bool_11_1_text { get; set; }
public string bool_11_2_text { get; set; }
public string bool_11_3_text { get; set; }
public string bool_11_3_remark { get; set; } //ไม่ได้ใช้
public string text_11_1 { get; set; }
public string text_11_2 { get; set; }
public string text_11_3 { get; set; }
public decimal? decimal_11_1 { get; set; }
public decimal? decimal_11_2 { get; set; }
public decimal? decimal_11_3 { get; set; }
//12.1 เชิงปริมาณ
public decimal? decimal_12_1_1 { get; set; }
public decimal? decimal_12_1_2 { get; set; }
public decimal? decimal_12_1_3 { get; set; }
public decimal? decimal_12_1_4 { get; set; }
public decimal? decimal_12_1_5 { get; set; }
public decimal? decimal_12_1_6 { get; set; }
public decimal? decimal_12_1_7 { get; set; }
public decimal? decimal_12_1_8 { get; set; }
public decimal? decimal_12_1_9 { get; set; }
public decimal? decimal_12_1_10 { get; set; }
public decimal? decimal_12_1_11 { get; set; }
public decimal? decimal_12_1_12 { get; set; }
public decimal? decimal_12_1_13 { get; set; }
public decimal? decimal_12_1_14 { get; set; }
public decimal? decimal_12_1_15 { get; set; }
public decimal? decimal_12_1_16 { get; set; }
public decimal? decimal_12_1_17 { get; set; }
public decimal? decimal_12_1_18 { get; set; }
public decimal? decimal_12_1_19 { get; set; }
public decimal? decimal_12_1_20 { get; set; }
public decimal? decimal_12_1_21 { get; set; }
public decimal? decimal_12_1_22 { get; set; }
//12.2 เชิงคุณภาพ (เลือกตอบตามผลผลิตของโครงการ)
public decimal? decimal_12_2_1 { get; set; }
public decimal? decimal_12_2_2 { get; set; }
public decimal? decimal_12_2_3 { get; set; }
public decimal? decimal_12_2_4 { get; set; }
public decimal? decimal_12_2_5 { get; set; }
public decimal? decimal_12_2_6 { get; set; }
public decimal? decimal_12_2_7 { get; set; }
public decimal? decimal_12_2_8 { get; set; }
public decimal? decimal_12_2_9 { get; set; }
public decimal? decimal_12_2_10 { get; set; }
public decimal? decimal_12_2_11 { get; set; }
public decimal? decimal_12_2_12 { get; set; }
public decimal? decimal_12_2_13 { get; set; }
public decimal? decimal_12_2_14 { get; set; }
public decimal? decimal_12_3_1 { get; set; }
//12.4 ตัวชี้วัดตามวัตถุประสงค์ของโครงการ
public string decimal_12_4_row_1_1 { get; set; }
public string decimal_12_4_row_1_2 { get; set; }
public string decimal_12_4_row_1_3 { get; set; }
public string decimal_12_4_row_1_4 { get; set; }
public string decimal_12_4_row_1_5 { get; set; }
public string decimal_12_4_row_2_1 { get; set; }
public string decimal_12_4_row_2_2 { get; set; }
public string decimal_12_4_row_2_3 { get; set; }
public string decimal_12_4_row_2_4 { get; set; }
public string decimal_12_4_row_2_5 { get; set; }
public string decimal_12_4_row_3_1 { get; set; }
public string decimal_12_4_row_3_2 { get; set; }
public string decimal_12_4_row_3_3 { get; set; }
public string decimal_12_4_row_3_4 { get; set; }
public string decimal_12_4_row_3_5 { get; set; }
public string decimal_12_4_file { get; set; }
//13. ผลการดำเนินโครงการนี้สอดคล้องค่านิยม (D - MOVE UP) ของมหาวิทยาลัยด้านใด
public bool? bool_13_1 { get; set; }
public bool? bool_13_2 { get; set; }
public bool? bool_13_3 { get; set; }
public bool? bool_13_4 { get; set; }
public bool? bool_13_5 { get; set; }
public bool? bool_13_6 { get; set; }
public bool? bool_13_7 { get; set; }
public string text_13_1 { get; set; }
public string text_13_2 { get; set; }
public string text_13_3 { get; set; }
public string text_13_4 { get; set; }
public string text_13_5 { get; set; }
public string text_13_6 { get; set; }
public string text_13_7 { get; set; }
public string text_13_remark { get; set; }
public string text_14 { get; set; }
//15. โครงการนี้สอดคล้องกับเป้าหมายการพัฒนาที่ยั่งยืน (Sustainable Development Goals : SDGs) ด้านใด
public string text_15 { get; set; }
//16. วิเคราะห์ความคุ้มค่าของการดำเนินงานโครงการ
public string text_16 { get; set; }
public string text_17 { get; set; }
public string text_18 { get; set; }
public string text_19 { get; set; }
public string text_20 { get; set; }
public string text_21 { get; set; }
//22. ผลที่คาดว่าจะได้รับ
public string text_22_1 { get; set; }
public string text_22_2 { get; set; }
//23. แผนการดำเนินการ
public string text_23 { get; set; }
public string text_24 { get; set; }
//25. ประสงค์จะนำเสนอโครงการนี้ในรายงานประจำปีของมหาวิทยาลัยฯ
public bool? bool_25_1 { get; set; }
public bool? bool_25_2 { get; set; }
public string text_25_1 { get; set; }
public string text_25_2 { get; set; }
public string text_25_row_1_1 { get; set; }
public string text_25_row_1_2 { get; set; }
public decimal? decimal_25_row_1_1 { get; set; }
public decimal? decimal_25_row_1_2 { get; set; }
public string text_25_row_2 { get; set; }
public decimal? decimal_25_row_2_1 { get; set; }
public decimal? decimal_25_row_2_2 { get; set; }
public string text_25_row_3 { get; set; }
public decimal? decimal_25_row_3_1 { get; set; }
public decimal? decimal_25_row_3_2 { get; set; }
public string text_25_row_4 { get; set; }
public decimal? decimal_25_row_4_1 { get; set; }
public decimal? decimal_25_row_4_2 { get; set; }
public string text_25_row_5 { get; set; }
public decimal? decimal_25_row_5_1 { get; set; }
public decimal? decimal_25_row_5_2 { get; set; }
public string text_25_row_6 { get; set; }
public decimal? decimal_25_row_6_1 { get; set; }
public decimal? decimal_25_row_6_2 { get; set; }
public string text_25_row_7 { get; set; }
public decimal? decimal_25_row_7_1 { get; set; }
public decimal? decimal_25_row_7_2 { get; set; }
public string text_25_row_8 { get; set; }
public decimal? decimal_25_row_8_1 { get; set; }
public decimal? decimal_25_row_8_2 { get; set; }
public string text_25_row_9 { get; set; }
public decimal? decimal_25_row_9_1 { get; set; }
public decimal? decimal_25_row_9_2 { get; set; }
public string text_25_row_10 { get; set; }
public decimal? decimal_25_row_10_1 { get; set; }
public decimal? decimal_25_row_10_2 { get; set; }
public string text_25_row_11 { get; set; }
public decimal? decimal_25_row_11_1 { get; set; }
public decimal? decimal_25_row_11_2 { get; set; }
public string text_25_row_12 { get; set; }
public decimal? decimal_25_row_12_1 { get; set; }
public decimal? decimal_25_row_12_2 { get; set; }
public string text_25_row_13 { get; set; }
public decimal? decimal_25_row_13_1 { get; set; }
public decimal? decimal_25_row_13_2 { get; set; }
public string text_25_row_14 { get; set; }
public decimal? decimal_25_row_14_1 { get; set; }
public decimal? decimal_25_row_14_2 { get; set; }
public string text_25_row_15 { get; set; }
public decimal? decimal_25_row_15_1 { get; set; }
public decimal? decimal_25_row_15_2 { get; set; }
public string text_25_row_16 { get; set; }
public decimal? decimal_25_row_16_1 { get; set; }
public decimal? decimal_25_row_16_2 { get; set; }
public string text_25_row_17 { get; set; }
public decimal? decimal_25_row_17_1 { get; set; }
public decimal? decimal_25_row_17_2 { get; set; }
public string text_25_row_18 { get; set; }
public decimal? decimal_25_row_18_1 { get; set; }
public decimal? decimal_25_row_18_2 { get; set; }
public string text_25_row_19 { get; set; }
public decimal? decimal_25_row_19_1 { get; set; }
public decimal? decimal_25_row_19_2 { get; set; }
public string text_25_row_20 { get; set; }
public decimal? decimal_25_row_20_1 { get; set; }
public decimal? decimal_25_row_20_2 { get; set; }
public string text_25_row_21 { get; set; }
public decimal? decimal_25_row_21_1 { get; set; }
public decimal? decimal_25_row_21_2 { get; set; }
public string text_25_row_22 { get; set; }
public decimal? decimal_25_row_22_1 { get; set; }
public decimal? decimal_25_row_22_2 { get; set; }
public string text_25_row_23 { get; set; }
public decimal? decimal_25_row_23_1 { get; set; }
public decimal? decimal_25_row_23_2 { get; set; }
public string text_25_row_24 { get; set; }
public decimal? decimal_25_row_24_1 { get; set; }
public decimal? decimal_25_row_24_2 { get; set; }
public string text_25_row_25 { get; set; }
public decimal? decimal_25_row_25_1 { get; set; }
public decimal? decimal_25_row_25_2 { get; set; }
public string text_25_row_26 { get; set; }
public decimal? decimal_25_row_26_1 { get; set; }
public decimal? decimal_25_row_26_2 { get; set; }
public string text_25_row_27 { get; set; }
public decimal? decimal_25_row_27_1 { get; set; }
public decimal? decimal_25_row_27_2 { get; set; }
public string text_25_row_28 { get; set; }
public decimal? decimal_25_row_28_1 { get; set; }
public decimal? decimal_25_row_28_2 { get; set; }
public string text_25_row_29 { get; set; }
public decimal? decimal_25_row_29_1 { get; set; }
public decimal? decimal_25_row_29_2 { get; set; }
public string text_25_row_30 { get; set; }
public decimal? decimal_25_row_30_1 { get; set; }
public decimal? decimal_25_row_30_2 { get; set; }
public string text_25_row_31 { get; set; }
public decimal? decimal_25_row_31_1 { get; set; }
public decimal? decimal_25_row_31_2 { get; set; }
public string text_25_row_32 { get; set; }
public decimal? decimal_25_row_32_1 { get; set; }
public decimal? decimal_25_row_32_2 { get; set; }
public string text_25_row_33 { get; set; }
public decimal? decimal_25_row_33_1 { get; set; }
public decimal? decimal_25_row_33_2 { get; set; }
public string text_25_row_34 { get; set; }
public decimal? decimal_25_row_34_1 { get; set; }
public decimal? decimal_25_row_34_2 { get; set; }
public string text_25_row_35 { get; set; }
public decimal? decimal_25_row_35_1 { get; set; }
public decimal? decimal_25_row_35_2 { get; set; }
public string text_25_row_36 { get; set; }
public decimal? decimal_25_row_36_1 { get; set; }
public decimal? decimal_25_row_36_2 { get; set; }
public string text_25_row_37 { get; set; }
public decimal? decimal_25_row_37_1 { get; set; }
public decimal? decimal_25_row_37_2 { get; set; }
public string text_25_row_38 { get; set; }
public decimal? decimal_25_row_38_1 { get; set; }
public decimal? decimal_25_row_38_2 { get; set; }
public string text_25_row_39 { get; set; }
public decimal? decimal_25_row_39_1 { get; set; }
public decimal? decimal_25_row_39_2 { get; set; }
public string text_25_row_40 { get; set; }
public decimal? decimal_25_row_40_1 { get; set; }
public decimal? decimal_25_row_40_2 { get; set; }
public string text_25_row_41 { get; set; }
public decimal? decimal_25_row_41_1 { get; set; }
public decimal? decimal_25_row_41_2 { get; set; }
public string text_25_row_42 { get; set; }
public decimal? decimal_25_row_42_1 { get; set; }
public decimal? decimal_25_row_42_2 { get; set; }
public decimal? decimal_25_total_1 { get; set; }
public decimal? decimal_25_total_2 { get; set; }
//26. แบบฟอร์มรายงานผลการดำเนินการโครงการ
public string text_26_1 { get; set; }
public string text_26_2 { get; set; }
public string text_26_3 { get; set; }
public string text_26_4_row_1_1 { get; set; }
public string text_26_4_row_1_2 { get; set; }
public string text_26_4_row_1_3 { get; set; }
public string text_26_4_row_2_1 { get; set; }
public string text_26_4_row_2_2 { get; set; }
public string text_26_4_row_2_3 { get; set; }
public string text_26_4_row_3_1 { get; set; }
public string text_26_4_row_3_2 { get; set; }
public string text_26_4_row_3_3 { get; set; }
public bool? is_sent { 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
{
//8. ประเด็นยุทธศาสตร์ของมหาวิทยาลัย
//14.1 ตัวชี้วัดผลสัมฤทธิ์
//14.2 ตัวชี้วัดเชิงนโยบาย
//25 แนบไฟล์
[Key] public Guid? agency_report_detail_uid { get; set; }
public Guid? agency_report_uid { get; set; }
public decimal? type { get; set; }
public string text_1 { get; set; }
public string text_2 { get; set; }
public string file_url { get; set; }
public string file_name { get; set; }
public decimal? row { get; set; }
}
@@ -17,50 +17,75 @@ namespace rmutr_report.Models
//public string agency_category_name { get; set; } //ผลผลิต
public decimal? total { get; set; }
public List<budget> budgets { get; set; }
//public List<budget> budgets2 { get; set; }
}
public class budget
{
public string topic { get; set; }
public decimal? total { get; set; } //แผนงาน
public personnel_list personnel_lists { get; set; }
public personnel_list personnel_lists { get; set; }
public List<personnel_list> personnel_list_s { get; set; }
}
public class personnel_list //รายการบุคลกร
{
public string topic { get; set; }
public decimal? total { get; set; }
public List<budget_personnel_list> budget_personnel_lists { get; set; }
public List<budget_personnel_list> budget_personnel_lists2 { get; set; }
}
public class budget_personnel_list //งบบุคลากร
{
public string topic { get; set; }
public decimal? rate { get; set; }
public decimal? total { get; set; }
public string text1 { get; set; }
public string text2 { get; set; }
public List<budget_personnel_list_2> budget_personnel_lists_2 { get; set; }
}
public class budget_personnel_list_2 //ค่าจ้างชั่วคราว
{
public int? row_no { get; set; }
public string topic { get; set; }
public decimal? rate { get; set; }
public decimal? total { get; set; }
public string text1 { get; set; }
public string text2 { get; set; }
public List<budget_rate> budget_rates { get; set; }
}
public class budget_rate //อัตราเดิม/อัตราใหม่
{
public int? row_no { get; set; }
public string topic { get; set; }
public decimal? rate { get; set; }
public decimal? total { get; set; }
public string text1 { get; set; }
public string text2 { get; set; }
public List<details> details { get; set; }
}
public class details //อันรองลงมา
{
public int? row_no { get; set; }
public string position_level { get; set; }
public string qualification { get; set; }
public decimal? rate { get; set; }
public decimal? total { get; set; }
public string text1 { get; set; }
public string text2 { get; set; }
public List<details2> details2 { get; set; }
}
public class details2 //อันรองลงมา
{
public int? row_no { get; set; }
public string topic { get; set; }
public decimal? total { get; set; }
public string text1 { get; set; }
}
}
@@ -0,0 +1,104 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class budget_expenditure_report_from_revenue_v2
{
public string academic_year_name_th { get; set; }
public string sector { get; set; } //ภาค
public string parent_agency_name { get; set; } //หน่วยงาน
public string agency_name_th { get; set; } //พื้นที่
public decimal? total { get; set; }
public string academic_year_1 { get; set; }
public string academic_year_2 { get; set; }
public List<budget_expenditure_report_from_revenue_v2_detail> details { get; set; }
}
public class budget_expenditure_report_from_revenue_v2_detail
{
public int? topic_type { get; set; }
public bool? is_other { get; set; }
public int? row { get; set; }
public int? row_no1 { get; set; }
public int? row_no2 { get; set; }
public int? row_no3 { get; set; }
public int? row_no4 { get; set; }
public int? row_no5 { get; set; }
public int? row_no6 { get; set; }
public int? row_no7 { get; set; }
public int? row_no8 { get; set; }
public int? row_no9 { get; set; }
public int? row_no10 { get; set; }
public string topic { get; set; }
public string qualification { get; set; }
public string unit { get; set; }
public decimal? value1 { get; set; }
public decimal? value2 { get; set; }
public decimal? value3 { get; set; }
public decimal? value4 { get; set; }
public string topic1 { get; set; }
public string topic2 { get; set; }
public string topic3 { get; set; }
public string topic4 { get; set; }
public string topic5 { get; set; }
public string topic6 { get; set; }
public string topic7 { get; set; }
public string topic8 { get; set; }
public string topic9 { get; set; }
public string topic10 { get; set; }
public string topic11 { get; set; }
public string topic12 { get; set; }
public string topic13 { get; set; }
public string topic14 { get; set; }
public string topic15 { get; set; }
public string topic16 { get; set; }
public string topic17 { get; set; }
public string topic18 { get; set; }
public decimal? amount1 { get; set; }
public decimal? amount2 { get; set; }
public decimal? amount3 { get; set; }
public decimal? amount4 { get; set; }
public decimal? amount5 { get; set; }
public decimal? amount6 { get; set; }
public decimal? amount7 { get; set; }
public decimal? amount8 { get; set; }
public decimal? amount9 { get; set; }
public decimal? amount10 { get; set; }
public decimal? amount11 { get; set; }
public decimal? amount12 { get; set; }
public decimal? amount13 { get; set; }
public decimal? amount14 { get; set; }
public decimal? amount15 { get; set; }
public decimal? amount16 { get; set; }
public decimal? amount17 { get; set; }
public decimal? amount18 { get; set; }
public decimal? amount19 { get; set; }
public decimal? amount20 { get; set; }
public string text1 { get; set; }
public string text2 { get; set; }
public string text3 { get; set; }
public string text4 { get; set; }
public string text5 { get; set; }
public string text6 { get; set; }
public string text7 { get; set; }
public string text8 { get; set; }
public string text9 { get; set; }
public string text10 { get; set; }
public string text11 { get; set; }
public string text12 { get; set; }
public string text13 { get; set; }
public string text14 { get; set; }
public string text15 { get; set; }
public string text16 { get; set; }
public string text17 { get; set; }
public string text18 { get; set; }
public string text19 { get; set; }
public string text20 { get; set; }
public string text21 { get; set; }
public string text22 { get; set; }
public string text23 { get; set; }
public string text24 { get; set; }
public string text25 { get; set; }
public string text26 { get; set; }
}
}
@@ -0,0 +1,20 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class budget_progress_insurances
{
public string budget_year { get; set; }
public List<budget_progress_insurances_detail> data { get; set; }
}
public class budget_progress_insurances_detail
{
public string car_number { get; set; }
public decimal? amount { get; set; }
public decimal? car_act { get; set; }
public int? month { get; set; }
public string month_th { get; set; }
public decimal? total_amount { get; set; }
}
}
+160 -336
View File
@@ -150,54 +150,55 @@ namespace rmutr_report.Models
public class operating_expenses_details2
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
public List<operating_expenses_details3> research_support_3 { get; set; }
//public List<operating_expenses_details3> research_support_3 { get; set; }
//public List<operating_expenses_details3> subsidy_science_3 { get; set; }
//public List<operating_expenses_details3> subsidy_society_3 { get; set; }
}
public class operating_expenses_details3
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
// public class operating_expenses_details3
// {
// public int? color { get; set; }
// public string list { get; set; }
// public decimal? total_amount { get; set; }
//
// public List<operating_expenses_details4> research_support_4 { get; set; }
// //public List<operating_expenses_details4> subsidy_science_4 { get; set; }
// //public List<operating_expenses_details4> subsidy_society_4 { get; set; }
// }
public List<operating_expenses_details4> research_support_4 { get; set; }
//public List<operating_expenses_details4> subsidy_science_4 { get; set; }
//public List<operating_expenses_details4> subsidy_society_4 { get; set; }
}
// public class operating_expenses_details4
// {
// public int? color { get; set; }
// public string list { get; set; }
// public decimal? total_amount { get; set; }
//
// public List<operating_expenses_details5> research_support_detail { get; set; }
// //public List<operating_expenses_details5> subsidy_science_detail { get; set; }
// //public List<operating_expenses_details5> subsidy_society_detail { get; set; }
// }
public class operating_expenses_details4
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
// public class operating_expenses_details5
// {
// public string list { get; set; }
// public decimal? total_amount { get; set; }
// public string remark { get; set; }
//
// public List<operating_expenses_details6> research_support_detail_2 { get; set; }
// //public List<operating_expenses_details_6> subsidy_science_detail_2 { get; set; }
// //public List<operating_expenses_details_6> subsidy_society_detail_2 { get; set; }
// }
public List<operating_expenses_details5> research_support_detail { get; set; }
//public List<operating_expenses_details5> subsidy_science_detail { get; set; }
//public List<operating_expenses_details5> subsidy_society_detail { get; set; }
}
public class operating_expenses_details5
{
public string list { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
public List<operating_expenses_details6> research_support_detail_2 { get; set; }
//public List<operating_expenses_details_6> subsidy_science_detail_2 { get; set; }
//public List<operating_expenses_details_6> subsidy_society_detail_2 { get; set; }
}
public class operating_expenses_details6
{
public string list { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
}
// public class operating_expenses_details6
// {
// public string list { get; set; }
// public decimal? total_amount { get; set; }
// public string remark { get; set; }
// }
public class subsidy_science_details
{
@@ -208,38 +209,6 @@ namespace rmutr_report.Models
}
public class subsidy_science_details2
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<subsidy_science_details3> subsidy_science_3 { get; set; }
}
public class subsidy_science_details3
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<subsidy_science_details4> subsidy_science_4 { get; set; }
}
public class subsidy_science_details4
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<subsidy_science_details5> subsidy_science_detail { get; set; }
}
public class subsidy_science_details5
{
public string list { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
public List<subsidy_science_details6> subsidy_science_detail_2 { get; set; }
}
public class subsidy_science_details6
{
public string list { get; set; }
public string unit { get; set; }
@@ -248,6 +217,7 @@ namespace rmutr_report.Models
public string remark { get; set; }
}
public class subsidy_society_details
{
public int? color { get; set; }
@@ -259,43 +229,15 @@ namespace rmutr_report.Models
public class subsidy_society_details2
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<subsidy_society_details3> subsidy_society_3 { get; set; }
}
public class subsidy_society_details3
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<subsidy_society_details4> subsidy_society_4 { get; set; }
}
public class subsidy_society_details4
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<subsidy_society_details5> subsidy_society_detail { get; set; }
}
public class subsidy_society_details5
{
public string list { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
public List<subsidy_society_details6> subsidy_society_detail_2 { get; set; }
}
public class subsidy_society_details6
{
public string list { get; set; }
public string unit { get; set; }
public decimal? unit_amount { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
}
// public class durable_articles_headers
// {
// public string header_name { get; set; }
@@ -495,7 +437,7 @@ namespace rmutr_report.Models
public class subsidy_service_headers_detail2
{
public int? color { get; set; }
//public string rowno { get; set; }
public string list { get; set; }
public decimal? amount_1 { get; set; }
@@ -504,64 +446,64 @@ namespace rmutr_report.Models
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? amount_6 { get; set; }
public decimal? amount_7 { get; set; }
//public string remark { get; set; }
public List<subsidy_service_headers_detail3> subsidy_service_3 { get; set; }
public string remark { get; set; }
//public List<subsidy_service_headers_detail3> subsidy_service_3 { get; set; }
//public List<subsidy_service_headers_detail3> subsidy_arts_culture_3 { get; set; }
}
//
// public class subsidy_service_headers_detail3
// {
// public int? color { get; set; }
//
// //public string rowno { get; set; }
// public string list { get; set; }
// public decimal? amount_1 { get; set; }
// public decimal? amount_2 { get; set; }
// public decimal? amount_3 { get; set; }
// public decimal? amount_4 { get; set; }
// public decimal? amount_5 { get; set; }
// public decimal? amount_6 { get; set; }
//
// public decimal? amount_7 { get; set; }
//
// //public string remark { get; set; }
// public List<subsidy_service_headers_detail4> subsidy_service_4 { get; set; }
// //public List<subsidy_service_headers_detail4> subsidy_arts_culture_4 { get; set; }
// }
public class subsidy_service_headers_detail3
{
public int? color { get; set; }
//public string rowno { get; set; }
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? amount_3 { get; set; }
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? amount_6 { get; set; }
public decimal? amount_7 { get; set; }
//public string remark { get; set; }
public List<subsidy_service_headers_detail4> subsidy_service_4 { get; set; }
//public List<subsidy_service_headers_detail4> subsidy_arts_culture_4 { get; set; }
}
public class subsidy_service_headers_detail4
{
public int? color { get; set; }
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? amount_3 { get; set; }
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? amount_6 { get; set; }
public decimal? amount_7 { get; set; }
public List<subsidy_service_headers_detail5> subsidy_service_detail { get; set; }
//public List<subsidy_service_headers_detail5> subsidy_arts_culture_detail { get; set; }
}
public class subsidy_service_headers_detail5
{
//public string color { get; set; }
//public string rowno { get; set; }
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? amount_3 { get; set; }
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? amount_6 { get; set; }
public decimal? amount_7 { get; set; }
public string remark { get; set; }
}
// public class subsidy_service_headers_detail4
// {
// public int? color { get; set; }
// public string list { get; set; }
// public decimal? amount_1 { get; set; }
// public decimal? amount_2 { get; set; }
// public decimal? amount_3 { get; set; }
// public decimal? amount_4 { get; set; }
// public decimal? amount_5 { get; set; }
// public decimal? amount_6 { get; set; }
// public decimal? amount_7 { get; set; }
//
// public List<subsidy_service_headers_detail5> subsidy_service_detail { get; set; }
// //public List<subsidy_service_headers_detail5> subsidy_arts_culture_detail { get; set; }
// }
//
// public class subsidy_service_headers_detail5
// {
// //public string color { get; set; }
// //public string rowno { get; set; }
// public string list { get; set; }
// public decimal? amount_1 { get; set; }
// public decimal? amount_2 { get; set; }
// public decimal? amount_3 { get; set; }
// public decimal? amount_4 { get; set; }
// public decimal? amount_5 { get; set; }
// public decimal? amount_6 { get; set; }
// public decimal? amount_7 { get; set; }
// public string remark { get; set; }
// }
public class subsidy_arts_culture_detail
{
@@ -584,62 +526,6 @@ namespace rmutr_report.Models
public class subsidy_arts_culture_detail2
{
public int? color { get; set; }
//public string rowno { get; set; }
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? amount_3 { get; set; }
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? amount_6 { get; set; }
//public decimal? amount_7 { get; set; }
//public string remark { get; set; }
public List<subsidy_arts_culture_detail3> subsidy_arts_culture_3 { get; set; }
}
public class subsidy_arts_culture_detail3
{
public int? color { get; set; }
//public string rowno { get; set; }
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? amount_3 { get; set; }
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? amount_6 { get; set; }
//public decimal? amount_7 { get; set; }
//public string remark { get; set; }
public List<subsidy_arts_culture_detail4> subsidy_arts_culture_4 { get; set; }
}
public class subsidy_arts_culture_detail4
{
public int? color { get; set; }
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? amount_3 { get; set; }
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? amount_6 { get; set; }
//public decimal? amount_7 { get; set; }
public List<subsidy_arts_culture_detail5> subsidy_arts_culture_detail { get; set; }
}
public class subsidy_arts_culture_detail5
{
//public string color { get; set; }
//public string rowno { get; set; }
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
@@ -653,6 +539,12 @@ namespace rmutr_report.Models
public string remark { get; set; }
}
public class thailand_details
{
public int? color { get; set; }
@@ -662,30 +554,6 @@ namespace rmutr_report.Models
}
public class thailand_detail2
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<thailand_detail3> thailand_3 { get; set; }
}
public class thailand_detail3
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<thailand_detail4> thailand_4 { get; set; }
}
public class thailand_detail4
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<thailand_detail5> thailand_detail { get; set; }
}
public class thailand_detail5
{
public string list { get; set; }
public string unit { get; set; }
@@ -694,6 +562,8 @@ namespace rmutr_report.Models
public string remark { get; set; }
}
public class subsidy_budget_details
{
public int? color { get; set; }
@@ -710,7 +580,6 @@ namespace rmutr_report.Models
public class subsidy_budget_details2
{
public int? color { get; set; }
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
@@ -719,61 +588,12 @@ namespace rmutr_report.Models
public decimal? amount_5 { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
public List<subsidy_budget_details3> subsidy_budget_project_3 { get; set; }
}
public class subsidy_budget_details3
{
public int? color { get; set; }
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? amount_3 { get; set; }
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
public List<subsidy_budget_details4> subsidy_budget_project_4 { get; set; }
}
public class subsidy_budget_details4
{
public int? color { get; set; }
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? amount_3 { get; set; }
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
public List<subsidy_budget_details5> subsidy_budget_project_detail { get; set; }
}
public class subsidy_budget_details5
{
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? amount_3 { get; set; }
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
public List<subsidy_budget_details6> subsidy_budget_project_detail_2 { get; set; }
}
public class subsidy_budget_details6
{
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? amount_3 { get; set; }
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
}
public class integrated_plan_details
{
public int? color { get; set; }
@@ -783,37 +603,39 @@ namespace rmutr_report.Models
}
public class integrated_plan_detail2
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<integrated_plan_detail3> integrated_plan_3 { get; set; }
}
public class integrated_plan_detail3
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<integrated_plan_detail4>integrated_plan_4 { get; set; }
}
public class integrated_plan_detail4
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<integrated_plan_detail5> integrated_plan_detail { get; set; }
}
public class integrated_plan_detail5
{
public string list { get; set; }
public string unit { get; set; }
public decimal? unit_amount { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
//public List<integrated_plan_detail3> integrated_plan_3 { get; set; }
}
// public class integrated_plan_detail3
// {
// public int? color { get; set; }
// public string list { get; set; }
// public decimal? total_amount { get; set; }
// public List<integrated_plan_detail4>integrated_plan_4 { get; set; }
// }
//
// public class integrated_plan_detail4
// {
// public int? color { get; set; }
// public string list { get; set; }
// public decimal? total_amount { get; set; }
// public List<integrated_plan_detail5> integrated_plan_detail { get; set; }
// }
// public class integrated_plan_detail5
// {
// public string list { get; set; }
// public string unit { get; set; }
// public decimal? unit_amount { get; set; }
// public decimal? total_amount { get; set; }
// public string remark { get; set; }
// }
public class strategic_plan_details
{
public int? color { get; set; }
@@ -823,35 +645,37 @@ namespace rmutr_report.Models
}
public class strategic_plan_details2
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<strategic_plan_details3> strategic_plan_3 { get; set; }
}
public class strategic_plan_details3
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<strategic_plan_details4> strategic_plan_4 { get; set; }
}
public class strategic_plan_details4
{
public int? color { get; set; }
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<strategic_plan_details5> strategic_plan_detail { get; set; }
}
public class strategic_plan_details5
{
public string list { get; set; }
public string unit { get; set; }
public decimal? unit_amount { get; set; }
public decimal? total_amount { get; set; }
public string remark { get; set; }
//public List<strategic_plan_details3> strategic_plan_3 { get; set; }
}
// public class strategic_plan_details3
// {
// public int? color { get; set; }
// public string list { get; set; }
// public decimal? total_amount { get; set; }
// public List<strategic_plan_details4> strategic_plan_4 { get; set; }
// }
//
// public class strategic_plan_details4
// {
// public int? color { get; set; }
// public string list { get; set; }
// public decimal? total_amount { get; set; }
// public List<strategic_plan_details5> strategic_plan_detail { get; set; }
// }
// public class strategic_plan_details5
// {
// public string list { get; set; }
// public string unit { get; set; }
// public decimal? unit_amount { get; set; }
// public decimal? total_amount { get; set; }
// public string remark { get; set; }
// }
}
@@ -0,0 +1,34 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class control_cost_construction
{
public int? topic_type { get; set; }
public string topic { get; set; }
public List<control_cost_construction_detail> data { get; set; }
}
public class control_cost_construction_detail
{
public decimal? quantity_day { get; set; }
public decimal? quantity_person { get; set; }
public decimal? amount { get; set; }
public decimal? quantity_work { get; set; }
public decimal? total_amount { get; set; }
}
public class control_cost_construction_wages
{
public decimal? total_amount { get; set; }
public List<control_cost_construction_wages_detail> data { get; set; }
}
public class control_cost_construction_wages_detail
{
public decimal? quantity_day { get; set; }
public decimal? quantity_person { get; set; }
public decimal? amount { get; set; }
public decimal? quantity_work { get; set; }
public decimal? total_amount { get; set; }
}
}
+1
View File
@@ -31,6 +31,7 @@ namespace rmutr_report.Models
{
public string year_range { get; set; }
public string strategic_issues { get; set;}
public bool is_reference_section { get; set; }
//public string agency_name { get; set; }
public List<detail_kpi_datas> data { get; set; }
}
+3 -2
View File
@@ -11,6 +11,7 @@ namespace rmutr_report.Models
public string responsible_person { get; set; }
public string phone_no { get; set; }
public string product { get; set; }
public string subject { get; set; }
public List<durable_articles_three_detail> data { get; set; }
public decimal? total_amount { get; set; }
public string durable_type { get; set; }
@@ -44,8 +45,8 @@ namespace rmutr_report.Models
public List<specification_datas> specification_data { get; set; }
public string specification { get; set; }
public string quantity_specification { get; set; }
public decimal? unit_price_specification { get; set; }
public decimal? amount_specification { get; set; }
public string unit_price_specification { get; set; }
public string amount_specification { get; set; }
public List<budget_spending_plans> budget_spending_plan {get; set; }
public string procurement_process { get; set; }
public string incurring_debt { get; set; }
+57
View File
@@ -0,0 +1,57 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class estimate_income_expenses
{
public string budget_year { get; set; }
public string date_range { get; set; }
public string faculty { get; set; }
public string branch_name { get; set; }
public List<estimate_income_expenses_detail> data_1 { get; set; }
}
public class estimate_income_expenses_detail
{
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? amount_3 { get; set; }
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? amount_6 { get; set; }
public decimal? amount_7 { get; set; }
public decimal? amount_8 { get; set; }
public decimal? total_amount { get; set; }
public List<estimate_income_expenses_detail2> data_2 { get; set; }
}
public class estimate_income_expenses_detail2
{
public int? row { get; set; }
public string type { get; set; }
public string list { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? amount_3 { get; set; }
public decimal? amount_4 { get; set; }
public decimal? amount_5 { get; set; }
public decimal? amount_6 { get; set; }
public decimal? amount_7 { get; set; }
public decimal? amount_8 { get; set; }
public decimal? total_amount { get; set; }
//public List<estimate_income_expenses_detail3> data_3 { get; set; }
}
// public class estimate_income_expenses_detail3
// {
// public string list { get; set; }
// public decimal? amount_1 { get; set; }
// public decimal? amount_2 { get; set; }
// public decimal? amount_3 { get; set; }
// public decimal? amount_4 { get; set; }
// public decimal? amount_5 { get; set; }
// public decimal? amount_6 { get; set; }
// public decimal? amount_7 { get; set; }
// public decimal? amount_8 { get; set; }
// public decimal? total_amount { get; set; }
// }
}
+21 -32
View File
@@ -5,39 +5,31 @@ namespace rmutr_report.Models
public class expenditure_budget_proposal
{
public string budget_year { get; set; }
// public decimal? budget_amount { get; set; }
// public decimal? total_amount_1 { get; set; }
// public decimal? total_amount_2 { get; set; }
public List<group_headers> group_header { get; set; }
public decimal? total_budget { get; set; }
public List<proposal_initial_project> projects { get; set; }
}
public class group_headers
{
public string list_1 { get; set; }
public string list_2 { get; set; }
public string rowno { get; set; }
public string list_3 { get; set; }
public decimal? budget_amount { get; set; }
public decimal? total_amount_1 { get; set; }
public decimal? total_amount_2 { get; set; }
public List<expenditure_budget_proposal_headers> header { get; set; }
}
public class expenditure_budget_proposal_headers
public class proposal_initial_project
{
public string rowno { get; set; }
public string header { get; set; }
public decimal? budget_amount { get; set; }
public List<expenditure_budget_proposal_headers2> data { get; set; }
public string project_name_th { get; set; }
public decimal? total_budget { get; set; }
public List<proposal_initial_type> types { get; set; }
}
public class expenditure_budget_proposal_headers2
public class proposal_initial_type
{
public string list { get; set; }
public string type_name { get; set; }
public decimal? total_budget { get; set; }
public List<proposal_initial_list> lists { get; set; }
}
public class proposal_initial_list
{
public string list_name { get; set; }
public decimal? target_group_count { get; set; }
public string target_group_unit { get; set; }
public decimal? time_count { get; set; }
@@ -46,15 +38,12 @@ namespace rmutr_report.Models
public string budget_unit { get; set; }
public decimal? quantity { get; set; }
public string quantity_unit { get; set; }
public decimal? budget_amount { get; set; }
public List<expenditure_budget_proposal_headers3> data2 { get; set; }
public decimal? total_budget { get; set; }
public List<proposal_initial_detail> details { get; set; }
}
public class expenditure_budget_proposal_headers3
public class proposal_initial_detail
{
public string list { get; set; }
public string detail_name { get; set; }
public decimal? target_group_count { get; set; }
public string target_group_unit { get; set; }
public decimal? time_count { get; set; }
@@ -63,6 +52,6 @@ namespace rmutr_report.Models
public string budget_unit { get; set; }
public decimal? quantity { get; set; }
public string quantity_unit { get; set; }
public decimal? budget_amount { get; set; }
public decimal? total_budget { get; set; }
}
}
+28
View File
@@ -0,0 +1,28 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class expense
{
public int? topic_type { get; set; }
public string topic { get; set; }
public string text_1 { get; set; }
public string text_2 { get; set; }
public decimal? quantity_1 { get; set; }
public decimal? quantity_2 { get; set; }
public decimal? quantity_3 { get; set; }
public decimal? quantity_4 { get; set; }
public decimal? total_amount { get; set; }
public List<expense_detail> data { get; set; }
}
public class expense_detail
{
public string topic { get; set; }
public decimal? quantity_1 { get; set; }
public decimal? quantity_2 { get; set; }
public decimal? quantity_3 { get; set; }
public decimal? quantity_4 { get; set; }
public decimal? total_amount { get; set; }
}
}
+1
View File
@@ -18,5 +18,6 @@ namespace rmutr_report.Models
public decimal? per_month { get; set; }
public decimal? per_year { get; set; }
public decimal? actual_disbursement { get; set; }
}
}
@@ -0,0 +1,25 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class investment_budget_summary
{
public string budget_year { get; set; }
// public decimal? total_request_count_item { get; set; }
// public decimal? total_request_amount { get; set; }
// public decimal? total_offer_count_item { get; set; }
// public decimal? total_offer_amount { get; set; }
public List<investment_budget_summary_detail> data { get; set; }
}
public class investment_budget_summary_detail
{
public int? topic_type { get; set; }
public string row_no { get; set; }
public string topic { get; set; }
public decimal? request_count_item { get; set; }
public decimal? request_amount { get; set; }
public decimal? offer_count_item { get; set; }
public decimal? offer_amount { get; set; }
}
}
+13 -2
View File
@@ -5,9 +5,20 @@ namespace rmutr_report.Models
public class kpi
{
public string academic_year { get; set; }
public List<kpi_data_detail> header_data { get; set; }
public List<kpi_reference_header> vision_data { get; set; }
public List<kpi_reference_header> popularity_data { get; set; }
public List<kpi_reference_header> uniqueness_data { get; set; }
public List<kpi_reference_header> identity_data { get; set; }
}
public class kpi_reference_header
{
public string header_1 { get; set; }
public List<kpi_data_details2> data_detail { get; set; }
}
public class kpi_data_detail
+2
View File
@@ -14,6 +14,8 @@ namespace rmutr_report.Models
{
public string strategic_issues { get; set; }
public bool is_reference_section { get; set; }
public List<detail_kpi_performance_result> data { get; set; }
}
+334
View File
@@ -0,0 +1,334 @@
using System;
using System.Collections.Generic;
public class manage_plan_budget
{
public string budget_year { get; set; }
public decimal? total_all_1 { get; set; }
public decimal? total_all_2 { get; set; }
public decimal? total_all_3 { get; set; }
public decimal? quarter_all_1_1 { get; set; }
public decimal? quarter_all_1_2 { get; set; }
public decimal? quarter_all_1_3 { get; set; }
public decimal? quarter_all_2_1 { get; set; }
public decimal? quarter_all_2_2 { get; set; }
public decimal? quarter_all_2_3 { get; set; }
public decimal? quarter_all_3_1 { get; set; }
public decimal? quarter_all_3_2 { get; set; }
public decimal? quarter_all_3_3 { get; set; }
public decimal? quarter_all_4_1 { get; set; }
public decimal? quarter_all_4_2 { get; set; }
public decimal? quarter_all_4_3 { get; set; }
public List<overall_indicators_detail> OverallIndicatorsDetails { get; set; }
public List<output_project_list> OutputProjectLists { get; set; }
}
public class overall_indicators_detail
{
public string indicators_name { get; set; }
public int? type { get; set; }
public string budget_unit_name { get; set; }
public decimal? total_1 { get; set; }
public decimal? total_2 { get; set; }
public decimal? total_3 { get; set; }
public decimal? quarter_1_1 { get; set; }
public decimal? quarter_1_2 { get; set; }
public decimal? quarter_1_3 { get; set; }
public decimal? quarter_2_1 { get; set; }
public decimal? quarter_2_2 { get; set; }
public decimal? quarter_2_3 { get; set; }
public decimal? quarter_3_1 { get; set; }
public decimal? quarter_3_2 { get; set; }
public decimal? quarter_3_3 { get; set; }
public decimal? quarter_4_1 { get; set; }
public decimal? quarter_4_2 { get; set; }
public decimal? quarter_4_3 { get; set; }
}
public class output_project_list
{
public List<strategy_detail> StrategyDetails { get; set; }
public List<allocation_strategy_detail> AllocationStrategyDetails { get; set; }
public List<output_project_detail> OutputProjectDetails { get; set; }
public List<indicators_list> Indicators_list { get; set; }//ตัวชี้วัด
public List<indicator_plan> IndicatorPlans { get; set; } //1.แผนการปฎิบัติงาน 1.1 ตัวชี้วัด
public List<budget_activitie> BudgetActivities { get; set; } //1.2. กิจกรรมหลัก
public List<budget_spending_plan> BudgetSpendingPlans { get; set; } //2.แผนการใช้จ่ายงบประมาณ
//public List<sub_budget_spending_plan> SubBudgetSpending { get; set; } //2.1 งบประมาณ
}
public class strategy_detail
{
public string strategy_name { get; set; }
public int? type { get; set; }
public int? order { get; set; }
public string budget_unit_name { get; set; }
public decimal? total_1 { get; set; }
public decimal? total_2 { get; set; }
public decimal? total_3 { get; set; }
public decimal? quarter_1_1 { get; set; }
public decimal? quarter_1_2 { get; set; }
public decimal? quarter_1_3 { get; set; }
public decimal? quarter_2_1 { get; set; }
public decimal? quarter_2_2 { get; set; }
public decimal? quarter_2_3 { get; set; }
public decimal? quarter_3_1 { get; set; }
public decimal? quarter_3_2 { get; set; }
public decimal? quarter_3_3 { get; set; }
public decimal? quarter_4_1 { get; set; }
public decimal? quarter_4_2 { get; set; }
public decimal? quarter_4_3 { get; set; }
}
public class allocation_strategy_detail
{
public string allocation_strategy_name { get; set; }
public int? type { get; set; }
public int? order { get; set; }
public string budget_unit_name { get; set; }
public decimal? total_1 { get; set; }
public decimal? total_2 { get; set; }
public decimal? total_3 { get; set; }
public decimal? quarter_1_1 { get; set; }
public decimal? quarter_1_2 { get; set; }
public decimal? quarter_1_3 { get; set; }
public decimal? quarter_2_1 { get; set; }
public decimal? quarter_2_2 { get; set; }
public decimal? quarter_2_3 { get; set; }
public decimal? quarter_3_1 { get; set; }
public decimal? quarter_3_2 { get; set; }
public decimal? quarter_3_3 { get; set; }
public decimal? quarter_4_1 { get; set; }
public decimal? quarter_4_2 { get; set; }
public decimal? quarter_4_3 { get; set; }
}
public class output_project_detail
{
public string output_project_name { get; set; }
public string budget_unit_name { get; set; }
public int? order { get; set; }
public decimal? total_1 { get; set; }
public decimal? total_2 { get; set; }
public decimal? total_3 { get; set; }
public decimal? quarter_1_1 { get; set; }
public decimal? quarter_1_2 { get; set; }
public decimal? quarter_1_3 { get; set; }
public decimal? quarter_2_1 { get; set; }
public decimal? quarter_2_2 { get; set; }
public decimal? quarter_2_3 { get; set; }
public decimal? quarter_3_1 { get; set; }
public decimal? quarter_3_2 { get; set; }
public decimal? quarter_3_3 { get; set; }
public decimal? quarter_4_1 { get; set; }
public decimal? quarter_4_2 { get; set; }
public decimal? quarter_4_3 { get; set; }
}
public class indicators_list
{
public string indicators_list_name { get; set; }
public int? indicators_type { get; set; } //1. ตัวชี้วัดเชิงคุณภาพ 2. ตัวชี้วัดเชิงปริมาณ 3. ตัวชี้วัดเชิงเวลา
public int? order { get; set; }
public string budget_unit_name { get; set; }
public decimal? total_1 { get; set; }
public decimal? total_2 { get; set; }
public decimal? total_3 { get; set; }
public decimal? quarter_1_1 { get; set; }
public decimal? quarter_1_2 { get; set; }
public decimal? quarter_1_3 { get; set; }
public decimal? quarter_2_1 { get; set; }
public decimal? quarter_2_2 { get; set; }
public decimal? quarter_2_3 { get; set; }
public decimal? quarter_3_1 { get; set; }
public decimal? quarter_3_2 { get; set; }
public decimal? quarter_3_3 { get; set; }
public decimal? quarter_4_1 { get; set; }
public decimal? quarter_4_2 { get; set; }
public decimal? quarter_4_3 { get; set; }
}
public class indicator_plan
{
public string indicator_plan_name { get; set; }
public int? indicators_type { get; set; } //1. ตัวชี้วัดเชิงคุณภาพ 2. ตัวชี้วัดเชิงปริมาณ 3. ตัวชี้วัดเชิงเวลา
public int? order { get; set; }
public string budget_unit_name { get; set; }
public decimal? total_1 { get; set; }
public decimal? total_2 { get; set; }
public decimal? total_3 { get; set; }
public decimal? quarter_1_1 { get; set; }
public decimal? quarter_1_2 { get; set; }
public decimal? quarter_1_3 { get; set; }
public decimal? quarter_2_1 { get; set; }
public decimal? quarter_2_2 { get; set; }
public decimal? quarter_2_3 { get; set; }
public decimal? quarter_3_1 { get; set; }
public decimal? quarter_3_2 { get; set; }
public decimal? quarter_3_3 { get; set; }
public decimal? quarter_4_1 { get; set; }
public decimal? quarter_4_2 { get; set; }
public decimal? quarter_4_3 { get; set; }
}
public class budget_activitie
{
public string budget_activitie_name { get; set; }
public string budget_unit_name { get; set; }
public int? order { get; set; }
public decimal? total_1 { get; set; }
public decimal? total_2 { get; set; }
public decimal? total_3 { get; set; }
public decimal? quarter_1_1 { get; set; }
public decimal? quarter_1_2 { get; set; }
public decimal? quarter_1_3 { get; set; }
public decimal? quarter_2_1 { get; set; }
public decimal? quarter_2_2 { get; set; }
public decimal? quarter_2_3 { get; set; }
public decimal? quarter_3_1 { get; set; }
public decimal? quarter_3_2 { get; set; }
public decimal? quarter_3_3 { get; set; }
public decimal? quarter_4_1 { get; set; }
public decimal? quarter_4_2 { get; set; }
public decimal? quarter_4_3 { get; set; }
}
public class budget_spending_plan
{
public string budget_spending_plan_name { get; set; }
public string budget_unit_name { get; set; }
public int? order { get; set; }
public decimal? total_1 { get; set; }
public decimal? total_2 { get; set; }
public decimal? total_3 { get; set; }
public decimal? quarter_1_1 { get; set; }
public decimal? quarter_1_2 { get; set; }
public decimal? quarter_1_3 { get; set; }
public decimal? quarter_2_1 { get; set; }
public decimal? quarter_2_2 { get; set; }
public decimal? quarter_2_3 { get; set; }
public decimal? quarter_3_1 { get; set; }
public decimal? quarter_3_2 { get; set; }
public decimal? quarter_3_3 { get; set; }
public decimal? quarter_4_1 { get; set; }
public decimal? quarter_4_2 { get; set; }
public decimal? quarter_4_3 { get; set; }
public List<sub_budget_spending_plan> SubBudgetSpending { get; set; }
}
public class sub_budget_spending_plan
{
public string sub_budget_spending_plan_name { get; set; }
public string budget_unit_name { get; set; }
public int? order { get; set; }
public decimal? total_1 { get; set; }
public decimal? total_2 { get; set; }
public decimal? total_3 { get; set; }
public decimal? quarter_1_1 { get; set; }
public decimal? quarter_1_2 { get; set; }
public decimal? quarter_1_3 { get; set; }
public decimal? quarter_2_1 { get; set; }
public decimal? quarter_2_2 { get; set; }
public decimal? quarter_2_3 { get; set; }
public decimal? quarter_3_1 { get; set; }
public decimal? quarter_3_2 { get; set; }
public decimal? quarter_3_3 { get; set; }
public decimal? quarter_4_1 { get; set; }
public decimal? quarter_4_2 { get; set; }
public decimal? quarter_4_3 { get; set; }
}
+45
View File
@@ -0,0 +1,45 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class material_edu_cal_form
{
public string budget_year { get; set; }
public string faculty_name_th { get; set; }
public string area { get; set; }
public List<material_edu_cal_form_detail> data { get; set; }
public decimal? total_amount { get; set; }
}
public class material_edu_cal_form_detail
{
public string faculty_name_th { get; set; }
public string area { get; set; }
public string curriculum_name_th { get; set; }
public string semester_1 { get; set; }
public string semester_2 { get; set; }
public string year_1 { get; set; }
public string year_2 { get; set; }
public decimal? amount { get; set; }
public List<material_edu_cal_form_detail2> data_detail { get; set; }
}
public class material_edu_cal_form_detail2
{
public int? topic_type { get; set; }
public string no { get; set; }
public string topic { get; set; }
// public string semester_1 { get; set; }
// public string semester_2 { get; set; }
// public string year_1 { get; set; }
// public string year_2 { get; set; }
public decimal? amount_1 { get; set; }
public decimal? rate_1 { get; set; }
public decimal? total_amount_1 { get; set; }
public decimal? amount_2 { get; set; }
public decimal? rate_2 { get; set; }
public decimal? total_amount_2 { get; set; }
public decimal? total_all_amount { get; set; }
}
}
+25
View File
@@ -0,0 +1,25 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class meal_costs_outside
{
public int? topic_type { get; set; }
public string topic { get; set; }
public decimal? day { get; set; }
public decimal? person { get; set; }
public decimal? amount { get; set; }
public decimal? total_amount { get; set; }
public List<meal_costs_outside_detail>data { get; set; }
}
public class meal_costs_outside_detail
{
public string topic { get; set; }
public decimal? day { get; set; }
public decimal? person { get; set; }
public decimal? amount { get; set; }
public decimal? total_amount { get; set; }
}
}
+23
View File
@@ -0,0 +1,23 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class national_budget_list
{
public int? report_type { get; set; }
public string type { get; set; }
public string budget_year { get; set; }
public List<national_budget_list_detail> data { get; set; }
}
public class national_budget_list_detail
{
public string list { get; set; }
public decimal? quantity { get; set; }
public string unit { get; set; }
public decimal? unit_price { get; set; }
public decimal? quantity_month { get; set; }
public decimal? total_amount { get; set; }
}
}
+2
View File
@@ -10,6 +10,8 @@ namespace rmutr_report.Models
// public string agency { get; set; }
// public string area { get; set; }
public string text { get; set; }
public string faculty_name_th { get; set; }
public string budget_location_name_th { get; set; }
public string request_year { get; set; }
public decimal? total_amount { get; set; }
public List<operating_expenses_detail> data { get; set; }
@@ -0,0 +1,30 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class parcel_inspection_committee
{
public string topic_name { get; set; }
public decimal? total_all_amount { get; set; }
public List<committee> data { get; set; }
}
public class committee
{
public string list { get; set; }
public decimal? total_amount { get; set; }
public List<committee_data> data_detail { get; set; }
}
public class committee_data
{
public decimal? quantity { get; set; }
public decimal? quantity_person { get; set; }
public decimal? amount { get; set; }
public decimal? total_amount { get; set; }
public decimal? quantity_work { get; set; }
public string unit { get; set; }
}
}
@@ -0,0 +1,156 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class project_performance_report_form
{
public string budget_year { get; set; }
public string project_name { get; set; }
public string responsible_person { get; set; }
public string faculty { get; set; }
public string start_date { get; set; }
public string end_date { get; set; }
public string project_location { get; set; }
public List<project_styles> project_style{ get; set; } //ข้อ 6
public string strategic_issues { get; set; }//ข้อ 7
public List<project_objectives> project_objective{ get; set; } //ข้อ 8
public List<operations_activities> operations_activitie { get; set; }//ข้อ 9
public bool? national_budget_money { get; set; }//ข้อ 10
public bool? income_budget { get; set; }//ข้อ 10
public bool? other { get; set; }//ข้อ 10
public string check_box1 { get; set; }//ข้อ 10
public string check_box2 { get; set; }//ข้อ 10
public string check_box3 { get; set; }//ข้อ 10
public string other_remark { get; set; }//ข้อ 10
public string product { get; set; }//ข้อ 10
public decimal? amount { get; set; }//ข้อ 10
public decimal? approval { get; set; }//ข้อ 10
public decimal? really_pay { get; set; }//ข้อ 10
public List<overall_operating_results> overall_operating_result { get; set; }//ข้อ 11.1
public List<qualitatives> qualitative { get; set; }//ข้อ 11.2
public List<times> time { get; set; }//ข้อ 11.3
public List<indicators_project_objectives> indicators_project_objective { get; set; }//ข้อ 11.4
public bool? digital_innovation { get; set; }//ข้อ 12
public bool? moral { get; set; }//ข้อ 12
public bool? open_mind { get; set; }//ข้อ 12
public bool? value { get; set; }//ข้อ 12
public bool? entrepreneurship { get; set; }//ข้อ 12
public bool? unity { get; set; }//ข้อ 12
public bool? porfessional { get; set; }//ข้อ 12
public string check_box4 { get; set; }//ข้อ 12
public string check_box5 { get; set; }//ข้อ 12
public string check_box6 { get; set; }//ข้อ 12
public string check_box7 { get; set; }//ข้อ 12
public string check_box8 { get; set; }//ข้อ 12
public string check_box9 { get; set; }//ข้อ 12
public string check_box10 { get; set; }//ข้อ 12
public string developed { get; set; }//ข้อ 12
public string explain { get; set; }//ข้อ 13
public string explain_SDG { get; set; }//ข้อ 14
public string value_analysis { get; set; }//ข้อ 15
public string output { get; set; }//ข้อ 16
public string outcome { get; set; }//ข้อ 17
public string effect { get; set; } //ข้อ 18
public string obstacle { get; set; } //ข้อ 19
public string suggestions { get; set; } //ข้อ 20
public string expected_results_inside { get; set; } //ข้อ 21
public string expected_results_outside { get; set; } //ข้อ 21
public string next_action_plan { get; set; } //ข้อ 22
public string results_continuous_development { get; set; } //ข้อ 23
public bool? check_twenty_four { get; set; }//ข้อ 24
public string check_twenty_four1 { get; set; }//ข้อ 24
public string check_twenty_four2 { get; set; }//ข้อ 24
public List<twenty_four_tables> twenty_four_table { get; set; }//ข้อ 24
public decimal? total_amount_1 { get; set; }
public decimal? total_amount_2 { get; set; }
}
public class project_styles
{
public bool? check { get; set; }//ข้อ 6
public string checkbox { get; set; }//ข้อ 6
public string project_style { get; set; }
}
public class project_objectives
{
public string row { get; set; }
public string project_objective { get; set; }//ข้อ 8
}
public class operations_activities
{
public string row { get; set; }
public string operations_activitie { get; set; }//ข้อ 9
}
public class overall_operating_results
{
public decimal? quantity { get; set; }
public decimal? participants_quantity { get; set; }
public decimal? participants_university { get; set; }
public decimal? board { get; set; }
public decimal? lecturer { get; set; }
public decimal? participants { get; set; }
public decimal? executive_1 { get; set; }
public decimal? teacher_1 { get; set; }
public decimal? student_1 { get; set; }
public decimal? support_personnel_1 { get; set; }
public decimal? government_officer { get; set; }
public decimal? university_staff { get; set; }
public decimal? government_employee { get; set; }
public decimal? temporary_employee { get; set; }
public decimal? external_participants { get; set; }
public decimal? external_lecturer { get; set; }
public decimal? external_participants2 { get; set; }
public decimal? executive_2 { get; set; }
public decimal? teacher_2 { get; set; }
public decimal? student_2 { get; set; }
public decimal? personnel_2 { get; set; }
public decimal? activity { get; set; }
}
public class qualitatives
{
public string topic { get; set; }
public List<data_lists> data { get; set; }
}
public class data_lists
{
public string list { get; set; }
public decimal? percentage { get; set; }
}
public class times
{
public decimal? percentage { get; set; }
}
public class indicators_project_objectives
{
public string kpi { get; set; }
public decimal? target_value_plan { get; set; }
public decimal? target_value_result { get; set; }
public string remark { get; set; }
}
public class twenty_four_tables
{
public int? topic_type { get; set; }
public string topic { get; set; }
public decimal? amount_1 { get; set; }
public decimal? amount_2 { get; set; }
}
}
+218 -149
View File
@@ -1,17 +1,22 @@
using System.Collections.Generic;
using DocumentFormat.OpenXml.Office2010.ExcelAc;
namespace rmutr_report.Models
{
public class project_principle_rationale
{
public string budget_year_name_th { get; set; }
public string responsible_person { get; set; }
public string area { get; set; }
public string faculty { get; set; }
public string product { get; set; }
public string side { get; set; }
public string project { get; set; }
//public int? count_project { get; set; }
public string login_name { get; set; }
public List<activity_data> activity { get; set; }
public string together_with { get; set; }
public string strategic_plan { get; set; } //ข้อ 2
public List<project_activity_styles> project_activity_style { get; set; } //2. ลักษณะกิจกรรมโครงการ
public string target_second { get; set; }
public string subject_second { get; set; }
public string country_reform_plan { get; set; } //ข้อ 3
@@ -37,32 +42,47 @@ namespace rmutr_report.Models
public string strategic_issues_thirteenth { get; set; } //ข้อ 13
public string subject_thirteenth { get; set; } //ข้อ 13
public string strategy_thirteenth { get; set; } //ข้อ 13
public decimal? durable_articles { get; set; } //งบลงทุน
public decimal? land_building { get; set; } // ค่าที่ดินและสิ่งก่อสร้าง
public List<fourteenth_data> fourteenth { get; set; } //ข้อ 14
public List<fifteenth_data> fifteenth { get; set; } //ข้อ 15
public int? count_activity { get; set; } //ข้อ 16
//public int? count_activity { get; set; } //ข้อ 16
public string text1 { get; set; } //ข้อ 16
public string text2 { get; set; } //ข้อ 16
public int? total_target { get; set; } //ข้อ 16 ผลรวมกลุ่มเป้าหมาย
public int? total_board { get; set; } //ข้อ 16 ผลรวมคณะกรรมการ
public string operational_activitie { get; set; }//ข้อ 15 ง.5-3
public string evaluation { get; set; }//ข้อ 16 ง.5-3
// public int? total_target { get; set; } //ข้อ 16 ผลรวมกลุ่มเป้าหมาย
// public int? total_board { get; set; } //ข้อ 16 ผลรวมคณะกรรมการ
public List<sixteenth_data> sixteenth { get; set; } //ข้อ 16
public List<sixteenth_data_detail> sixteenths { get; set; } //ข้อ 16 detail ตาราง
public List<seventeenth_data> seventeenth { get; set; } //ข้อ 17
public int? count_day { get; set; } //ข้อ 18
public string text3 { get; set; } //ข้อ 18
public List<eighteenth_data> eighteenth { get; set; } //ข้อ 18
public List<nineteenth_data> nineteenth { get; set; } //ข้อ 19
public List<nineteenth_data1> nineteenth1 { get; set; } //ข้อ 19
public List<seventeenth_datas> seventeenth_thai { get; set; } //ข้อ 17
public List<eighteenths_datas> eighteenth_thai { get; set; } //ข้อ 18
public List<eighteenths_datas> nineteenth_thai { get; set; } //ข้อ 19
public List<project_activity_styles> nineteenth_style { get; set; } //ข้อ 19 ลักษณะโครงการ
public decimal? budget_amount { get; set; } //ข้อ 20
public List<twentieth_data> twentieth { get; set; } //ข้อ 20
public List<twenty_one_data> twenty_one { get; set; } //ข้อ 21
public List<twenty_one_data_activity1> twenty_one_activity1 { get; set; } //ข้อ 21 มีหลายกิจกรรม
public List<twenty_one_data_activity2> twenty_one_activity2 { get; set; } //ข้อ 21 มีหลายกิจกรรม
public List<twenty_one_data_activity3> twenty_one_activity3 { get; set; } //ข้อ 21 มีหลายกิจกรรม
// public List<twenty_one_data_activity1> twenty_one_activity1 { get; set; } //ข้อ 21 มีหลายกิจกรรม
// public List<twenty_one_data_activity2> twenty_one_activity2 { get; set; } //ข้อ 21 มีหลายกิจกรรม
// public List<twenty_one_data_activity3> twenty_one_activity3 { get; set; } //ข้อ 21 มีหลายกิจกรรม
public string text4 { get; set; } //ข้อ 21
public string text5 { get; set; } //ข้อ 21
public string text6 { get; set; } //ข้อ 21
public string activity_description { get; set; } //ข้อ 21 พันธุกรรมพืช
public List<twenty_two_data> twenty_two { get; set; } //ข้อ 22
public List<twenty_three_data> twenty_three { get; set; } //ข้อ 23
public List<twenty_four_data> twenty_four { get; set; } //ข้อ 24
public List<twenty_fifth_data> twenty_fifth { get; set; } //ข้อ 25
public string url_file1 { get; set; } //ง.5-3
public string url_file2 { get; set; } //ง.5-3
public string url_file3 { get; set; } //ข้อ 23 ง.5-3
}
@@ -71,6 +91,10 @@ namespace rmutr_report.Models
public string activity { get; set; }
}
public class project_activity_styles
{
public string style { get; set; }
}
public class sixth_data
{
public string objective{ get; set; }
@@ -114,14 +138,14 @@ namespace rmutr_report.Models
public class fifteenth_data
{
public string activity { get; set; }
public string activity_table { get; set; }
public List<fifteenth_data_detail> fifteenths { get; set; }
//public string activity_table { get; set; }
//public List<fifteenth_data_detail> fifteenths { get; set; }
}
public class fifteenth_data_detail
{
public string detail { get; set; }
}
// public class fifteenth_data_detail
// {
// public string detail { get; set; }
// }
public class sixteenth_data
{
@@ -131,61 +155,71 @@ namespace rmutr_report.Models
public class sixteenth_data_detail
{
public string activity_table { get; set; }
public string budget_unit_name_th { get; set; }
public int? total_target { get; set; } //ข้อ 16 ผลรวมกลุ่มเป้าหมาย
public int? total_board { get; set; } //ข้อ 16 ผลรวมคณะกรรมการ
public int? count_activity { get; set; } //ข้อ 16 ผมรวมทั้งหมด
public List<sixteenth_data_details> sixteenths2 { get; set; }
public decimal? salaya_total { get; set; }
public decimal? bophitphimuk_total { get; set; }
public decimal? pohchang_total { get; set; }
public decimal? klai_kangwon_total { get; set; }
}
public class sixteenth_data_details
{
public decimal? salaya_executive { get; set; }
public decimal? bophitphimuk_executive { get; set; }
public decimal? pohchang_executive { get; set; }
public decimal? klai_kangwon_executive { get; set; }
public decimal? salaya_teacher { get; set; }
public decimal? bophitphimuk_teacher { get; set; }
public decimal? pohchang_teacher { get; set; }
public decimal? klai_kangwon_teacher { get; set; }
public decimal? salaya_officer { get; set; }
public decimal? bophitphimuk_officer { get; set; }
public decimal? pohchang_officer { get; set; }
public decimal? klai_kangwon_officer { get; set; }
public decimal? salaya_internal_student { get; set; }
public decimal? bophitphimuk_internal_student { get; set; }
public decimal? pohchang_internal_student { get; set; }
public decimal? klai_kangwon_internal_student { get; set; }
public decimal? salaya_external_student{ get; set; }
public decimal? bophitphimuk_external_student { get; set; }
public decimal? pohchang_external_student { get; set; }
public decimal? klai_kangwon_external_student { get; set; }
public decimal? salaya_person { get; set; }
public decimal? bophitphimuk_person { get; set; }
public decimal? pohchang_person{ get; set; }
public decimal? klai_kangwon_person { get; set; }
public decimal? salaya_lecturer { get; set; }
public decimal? bophitphimuk_lecturer { get; set; }
public decimal? pohchang_lecturer { get; set; }
public decimal? klai_kangwon_lecturer{ get; set; }
public string target_group { get; set; }
public decimal? salaya { get; set; }
public decimal? bophitphimuk{ get; set; }
public decimal? pohchang{ get; set; }
public decimal? klai_kangwon{ get; set; }
// public decimal? salaya_teacher { get; set; }
// public decimal? bophitphimuk_teacher { get; set; }
// public decimal? pohchang_teacher { get; set; }
// public decimal? klai_kangwon_teacher { get; set; }
// public decimal? salaya_officer { get; set; }
// public decimal? bophitphimuk_officer { get; set; }
// public decimal? pohchang_officer { get; set; }
// public decimal? klai_kangwon_officer { get; set; }
// public decimal? salaya_internal_student { get; set; }
// public decimal? bophitphimuk_internal_student { get; set; }
// public decimal? pohchang_internal_student { get; set; }
// public decimal? klai_kangwon_internal_student { get; set; }
// public decimal? salaya_external_student{ get; set; }
// public decimal? bophitphimuk_external_student { get; set; }
// public decimal? pohchang_external_student { get; set; }
// public decimal? klai_kangwon_external_student { get; set; }
// public decimal? salaya_person { get; set; }
// public decimal? bophitphimuk_person { get; set; }
// public decimal? pohchang_person{ get; set; }
// public decimal? klai_kangwon_person { get; set; }
// public decimal? salaya_lecturer { get; set; }
// public decimal? bophitphimuk_lecturer { get; set; }
// public decimal? pohchang_lecturer { get; set; }
// public decimal? klai_kangwon_lecturer{ get; set; }
public decimal? salaya_board { get; set; }
public decimal? bophitphimuk_board { get; set; }
public decimal? pohchang_board { get; set; }
public decimal? klai_kangwon_board { get; set; }
// public decimal? salaya_board { get; set; }
// public decimal? bophitphimuk_board { get; set; }
// public decimal? pohchang_board { get; set; }
// public decimal? klai_kangwon_board { get; set; }
//
// public decimal? salaya_driver { get; set; }
// public decimal? bophitphimuk_driver { get; set; }
// public decimal? pohchang_driver { get; set; }
// public decimal? klai_kangwon_driver{ get; set; }
//
// public decimal? salaya_other { get; set; }
// public decimal? bophitphimuk_other { get; set; }
// public decimal? pohchang_other { get; set; }
// public decimal? klai_kangwon_other { get; set; }
public decimal? salaya_driver { get; set; }
public decimal? bophitphimuk_driver { get; set; }
public decimal? pohchang_driver { get; set; }
public decimal? klai_kangwon_driver{ get; set; }
public decimal? salaya_other { get; set; }
public decimal? bophitphimuk_other { get; set; }
public decimal? pohchang_other { get; set; }
public decimal? klai_kangwon_other { get; set; }
public decimal? salaya_total { get; set; }
public decimal? bophitphimuk_total { get; set; }
public decimal? pohchang_total { get; set; }
public decimal? klai_kangwon_total { get; set; }
// public decimal? salaya_total { get; set; }
// public decimal? bophitphimuk_total { get; set; }
// public decimal? pohchang_total { get; set; }
// public decimal? klai_kangwon_total { get; set; }
}
public class seventeenth_data
@@ -209,7 +243,8 @@ namespace rmutr_report.Models
public string internal_external2 { get; set; }
public string area_province2 { get; set; }
public string location2 { get; set; }
// public string external_university { get; set; }
public string text1 { get; set; }
public string text2 { get; set; }
// public string province { get; set; }
// public string province_location { get; set; }
@@ -294,10 +329,12 @@ namespace rmutr_report.Models
{
public string header_name1 { get; set; }
public string header_name2 { get; set; }
//public string header_name3 { get; set; }
public string header_name3 { get; set; }
public string header_name4 { get; set; }
public List<nineteenth2_data_details> nineteenths_expenses1 { get; set; }
public List<nineteenth2_data_details2> nineteenths_expenses2 { get; set; }
public List<nineteenth2_data_details3> nineteenths_expenses3 { get; set; }
public List<nineteenth2_data_details2> nineteenths_expenses3 { get; set; }
public List<nineteenth2_data_details2> nineteenths_expenses4 { get; set; }
}
public class nineteenth2_data_details
@@ -316,24 +353,24 @@ namespace rmutr_report.Models
public decimal? count_person { get; set; }
public decimal? total_amount { get; set; }
}
public class nineteenth2_data_details3
{
// public class nineteenth2_data_details3
// {
public string header_name3 { get; set; }
public List<nineteenths_expenses3_detail> nineteenths_expenses3_details { get; set; }
//public string header_name3 { get; set; }
//public List<nineteenths_expenses3_detail> nineteenths_expenses3_details { get; set; }
}
//}
public class nineteenths_expenses3_detail
{
public string name { get; set; }
public decimal? amount { get; set; }
public decimal? potion { get; set; }
public decimal? count_person { get; set; }
public decimal? total_amount { get; set; }
}
// public class nineteenths_expenses3_detail
// {
// public string name { get; set; }
// public decimal? amount { get; set; }
// public decimal? potion { get; set; }
// public decimal? count_person { get; set; }
// public decimal? total_amount { get; set; }
// }
public class nineteenth_data_detail3
{
@@ -362,6 +399,13 @@ namespace rmutr_report.Models
}
public class twenty_one_data
{
public string activity { get; set; }
public string remark { get; set; }
public List<twenty_one_data_detail> twenty_ones { get; set; }
}
public class twenty_one_data_detail
{
public string text1 { get; set; }
public string text2 { get; set; }
@@ -373,6 +417,9 @@ namespace rmutr_report.Models
public string text8 { get; set; }
public string text9 { get; set; }
public string text10 { get; set; }
public string text11 { get; set; }
public string text12 { get; set; }
public string text13 { get; set; }
public string bath { get; set; }
public string nuai_nap { get; set; }
public string khrang1 { get; set; }
@@ -380,6 +427,7 @@ namespace rmutr_report.Models
public string khrang3 { get; set; }
public string rueang { get; set; }
public string clause1 { get; set; }
public string budget_unit_name_th { get; set; }
public string count_quantitative { get; set; }
public string count_unit { get; set; }
public string count_project { get; set; }
@@ -388,84 +436,96 @@ namespace rmutr_report.Models
public string clause2 { get; set; }
public string project_start_date { get; set; }
public string project_end_date { get; set; }
public string range { get; set; }
public string percentage_finish { get; set; }
public string day { get; set; }
public string clause3 { get; set; }
public string percentage1 { get; set; }
public string percentage2 { get; set; }
public string percentage3 { get; set; }
public string acquired_knowledge { get; set; }
public string detail1 { get; set; }
public string detail2 { get; set; }
public string clause4 { get; set; }
public decimal? expenses { get; set; }
}
public class twenty_one_data_activity1
{
public string clause1 { get; set; }
public string count_quantitative { get; set; }
public string khrang1 { get; set; }
public string text1 { get; set; }
public string count_unit { get; set; }
public string nuai_nap { get; set; }
public string text2 { get; set; }
public string count_project { get; set; }
public string khrang2 { get; set; }
public string text3 { get; set; }
public string count_training { get; set; }
public string rueang { get; set; }
public string text4 { get; set; }
public string count_knowledge { get; set; }
public string khrang3 { get; set; }
public List<twenty_one_data_activity1_detail> twenty_one_data_activity1_detail { get; set; }
}
public class twenty_one_data_activity1_detail
{
public string activity_clause1 { get; set; }
public string text1 { get; set; }
public string count_unit { get; set; }
public string nuai_nap { get; set; }
public string text2 { get; set; }
public string count_project { get; set; }
public string khrang2 { get; set; }
public string text3 { get; set; }
public string count_training { get; set; }
public string rueang { get; set; }
public string text4 { get; set; }
public string count_knowledge { get; set; }
public string khrang3 { get; set; }
}
public class twenty_one_data_activity2
{
public string clause2 { get; set; }
public string activity_clause2 { get; set; }
public string text5 { get; set; }
public string project_start_date { get; set; }
public string project_end_date { get; set; }
public string detail { get; set; }
//public string detail2 { get; set; }
public string text6 { get; set; }
public string percentage_finish { get; set; }
}
public class twenty_one_data_activity3
{
public string text7 { get; set; }
public string text8 { get; set; }
public string text9 { get; set; }
public string text10 { get; set; }
public string clause3 { get; set; }
public string percentage1 { get; set; }
public string percentage2 { get; set; }
public string acquired_knowledge { get; set; }
public string detail1 { get; set; }
public string detail2 { get; set; }
public string clause4 { get; set; }
public decimal? expenses { get; set; }
public string bath { get; set; }
public string target_1 { get; set; }
public string target_2 { get; set; }
public string target_3 { get; set; }
public string target_4 { get; set; }
public string results_1 { get; set; }
public string results_2 { get; set; }
public string results_3 { get; set; }
public string results_4 { get; set; }
}
// public class twenty_one_data_activity1
// {
// public string clause1 { get; set; }
// public string count_quantitative { get; set; }
// public string khrang1 { get; set; }
// public string text1 { get; set; }
// public string count_unit { get; set; }
// public string nuai_nap { get; set; }
// public string text2 { get; set; }
// public string count_project { get; set; }
// public string khrang2 { get; set; }
// public string text3 { get; set; }
// public string count_training { get; set; }
// public string rueang { get; set; }
// public string text4 { get; set; }
// public string count_knowledge { get; set; }
// public string khrang3 { get; set; }
// public List<twenty_one_data_activity1_detail> twenty_one_data_activity1_detail { get; set; }
//
// }
//
// public class twenty_one_data_activity1_detail
// {
// public string activity_clause1 { get; set; }
// public string text1 { get; set; }
// public string count_unit { get; set; }
// public string nuai_nap { get; set; }
// public string text2 { get; set; }
// public string count_project { get; set; }
// public string khrang2 { get; set; }
// public string text3 { get; set; }
// public string count_training { get; set; }
// public string rueang { get; set; }
// public string text4 { get; set; }
// public string count_knowledge { get; set; }
// public string khrang3 { get; set; }
// }
// public class twenty_one_data_activity2
// {
// public string clause2 { get; set; }
// public string activity_clause2 { get; set; }
//
// public string text5 { get; set; }
// public string project_start_date { get; set; }
// public string project_end_date { get; set; }
//
// public string text6 { get; set; }
// public string percentage_finish { get; set; }
//
// }
// public class twenty_one_data_activity3
// {
//
// public string text7 { get; set; }
// public string text8 { get; set; }
// public string text9 { get; set; }
// public string text10 { get; set; }
// public string clause3 { get; set; }
// public string percentage1 { get; set; }
// public string percentage2 { get; set; }
// public string acquired_knowledge { get; set; }
// public string detail1 { get; set; }
// public string detail2 { get; set; }
// public string clause4 { get; set; }
// public decimal? expenses { get; set; }
// public string bath { get; set; }
// }
public class twenty_two_data
{
public string list { get; set; }
@@ -478,6 +538,12 @@ namespace rmutr_report.Models
}
public class twenty_four_data
{
public string activity { get; set; }
public List<twenty_four_data_detail> twenty_fours { get; set; }
}
public class twenty_four_data_detail
{
public string text1 { get; set; }
public string text2 { get; set; }
@@ -490,15 +556,17 @@ namespace rmutr_report.Models
public string area { get; set; }
public string telephone_number { get; set; }
public string mobile_number { get; set; }
public string email { get; set; }
public string email { get; set; }
}
public class twenty_fifth_data
{
public string activity { get; set; }
public List<string> activity { get; set; }
public string activitys { get; set; }
public string activity_display_name { get; set; }
public string dates { get; set; }
public string location { get; set; }
public List<string> location { get; set; }
public string locations { get; set; }
public List<twenty_fifth_data_details> twenty_fifth_data_detail { get; set; }
}
@@ -509,6 +577,7 @@ namespace rmutr_report.Models
public string times { get; set; }
public string detail { get; set; }
public string lecturer { get; set; }
public string in_out { get; set; }
}
+67 -57
View File
@@ -85,60 +85,69 @@ namespace rmutr_report.Models
{
public string activity_table { get; set; }
public List<tenth2_datas_details> tenths2 { get; set; }
}
public class tenth2_datas_details
{
public decimal? salaya_executive { get; set; }
public decimal? bophitphimuk_executive { get; set; }
public decimal? pohchang_executive { get; set; }
public decimal? klai_kangwon_executive { get; set; }
public decimal? salaya_teacher { get; set; }
public decimal? bophitphimuk_teacher { get; set; }
public decimal? pohchang_teacher { get; set; }
public decimal? klai_kangwon_teacher { get; set; }
public decimal? salaya_officer { get; set; }
public decimal? bophitphimuk_officer { get; set; }
public decimal? pohchang_officer { get; set; }
public decimal? klai_kangwon_officer { get; set; }
public decimal? salaya_internal_student { get; set; }
public decimal? bophitphimuk_internal_student { get; set; }
public decimal? pohchang_internal_student { get; set; }
public decimal? klai_kangwon_internal_student { get; set; }
public decimal? salaya_external_student { get; set; }
public decimal? bophitphimuk_external_student { get; set; }
public decimal? pohchang_external_student { get; set; }
public decimal? klai_kangwon_external_student { get; set; }
public decimal? salaya_person { get; set; }
public decimal? bophitphimuk_person { get; set; }
public decimal? pohchang_person { get; set; }
public decimal? klai_kangwon_person { get; set; }
public decimal? salaya_lecturer { get; set; }
public decimal? bophitphimuk_lecturer { get; set; }
public decimal? pohchang_lecturer { get; set; }
public decimal? klai_kangwon_lecturer { get; set; }
public decimal? salaya_board { get; set; }
public decimal? bophitphimuk_board { get; set; }
public decimal? pohchang_board { get; set; }
public decimal? klai_kangwon_board { get; set; }
public decimal? salaya_driver { get; set; }
public decimal? bophitphimuk_driver { get; set; }
public decimal? pohchang_driver { get; set; }
public decimal? klai_kangwon_driver { get; set; }
public decimal? salaya_other { get; set; }
public decimal? bophitphimuk_other { get; set; }
public decimal? pohchang_other { get; set; }
public decimal? klai_kangwon_other { get; set; }
public decimal? salaya_total { get; set; }
public decimal? bophitphimuk_total { get; set; }
public decimal? pohchang_total { get; set; }
public decimal? klai_kangwon_total { get; set; }
}
public class tenth2_datas_details
{
public string target_group { get; set; }
public decimal? salaya { get; set; }
public decimal? bophitphimuk{ get; set; }
public decimal? pohchang{ get; set; }
public decimal? klai_kangwon{ get; set; }
// public decimal? salaya_executive { get; set; }
// public decimal? bophitphimuk_executive { get; set; }
// public decimal? pohchang_executive { get; set; }
// public decimal? klai_kangwon_executive { get; set; }
// public decimal? salaya_teacher { get; set; }
// public decimal? bophitphimuk_teacher { get; set; }
// public decimal? pohchang_teacher { get; set; }
// public decimal? klai_kangwon_teacher { get; set; }
// public decimal? salaya_officer { get; set; }
// public decimal? bophitphimuk_officer { get; set; }
// public decimal? pohchang_officer { get; set; }
// public decimal? klai_kangwon_officer { get; set; }
// public decimal? salaya_internal_student { get; set; }
// public decimal? bophitphimuk_internal_student { get; set; }
// public decimal? pohchang_internal_student { get; set; }
// public decimal? klai_kangwon_internal_student { get; set; }
// public decimal? salaya_external_student { get; set; }
// public decimal? bophitphimuk_external_student { get; set; }
// public decimal? pohchang_external_student { get; set; }
// public decimal? klai_kangwon_external_student { get; set; }
// public decimal? salaya_person { get; set; }
// public decimal? bophitphimuk_person { get; set; }
// public decimal? pohchang_person { get; set; }
// public decimal? klai_kangwon_person { get; set; }
// public decimal? salaya_lecturer { get; set; }
// public decimal? bophitphimuk_lecturer { get; set; }
// public decimal? pohchang_lecturer { get; set; }
// public decimal? klai_kangwon_lecturer { get; set; }
//
// public decimal? salaya_board { get; set; }
// public decimal? bophitphimuk_board { get; set; }
// public decimal? pohchang_board { get; set; }
// public decimal? klai_kangwon_board { get; set; }
//
// public decimal? salaya_driver { get; set; }
// public decimal? bophitphimuk_driver { get; set; }
// public decimal? pohchang_driver { get; set; }
// public decimal? klai_kangwon_driver { get; set; }
//
// public decimal? salaya_other { get; set; }
// public decimal? bophitphimuk_other { get; set; }
// public decimal? pohchang_other { get; set; }
// public decimal? klai_kangwon_other { get; set; }
//
// public decimal? salaya_total { get; set; }
// public decimal? bophitphimuk_total { get; set; }
// public decimal? pohchang_total { get; set; }
// public decimal? klai_kangwon_total { get; set; }
}
public class operating_activities
{
public string activity { get; set; }
@@ -146,18 +155,19 @@ namespace rmutr_report.Models
public class output_datas
{
public string kpi_name { get; set; }
public string quantity_kpi { get; set; }
public string quantity_target { get; set; }
public string quantity_measure { get; set; }
public string quality_kpi { get; set; }
public string quality_target { get; set; }
public string quality_measure { get; set; }
public string time_kpi { get; set; }
public string time_target { get; set; }
public string time_measure { get; set; }
public string cost_kpi { get; set; }
public string cost_target { get; set; }
public string cost_measure { get; set; }
// public string quality_kpi { get; set; }
// public string quality_target { get; set; }
// public string quality_measure { get; set; }
// public string time_kpi { get; set; }
// public string time_target { get; set; }
// public string time_measure { get; set; }
// public string cost_kpi { get; set; }
// public string cost_target { get; set; }
// public string cost_measure { get; set; }
}
public class thirteen_data
+1 -1
View File
@@ -18,6 +18,6 @@ namespace rmutr_report.Models
public string type_vehicle_transport { get; set; }
public decimal? quantity { get; set; }
public decimal? repair_rate { get; set; }
//public decimal? amount { get; set; }
public decimal? amount { get; set; }
}
}
+89
View File
@@ -0,0 +1,89 @@
using System.Collections.Generic;
namespace rmutr_report.Models.RoThree
{
public class request_summary
{
public string budget_year { get; set; }
public string short_budget_year { get; set; }
public List<budget_plan> plans { get; set; }
public List<request_summary_detail> data_1 { get; set; }
}
public class request_summary_detail
{
public string rowno { get; set; }
public string list { get; set; }
public List<budget_plan> plans { get; set; }
public List<request_summary_detail2> data_2 { get; set; }
}
public class request_summary_detail2
{
public string rowno { get; set; }
public string list { get; set; }
public List<budget_plan> plans { get; set; }
public bool? is_bold { get; set; } // 1 true 2 null 3 null , //true
public string color { get; set; } //1 ฟ้า 2 ส้ม 3 เหลือง ,
public List<request_summary_detail3> data_3 { get; set; }
}
public class request_summary_detail3
{
public string rowno { get; set; }
public string list { get; set; }
public List<budget_plan> plans { get; set; }
public bool? is_bold { get; set; } // true
}
public class budget_plan
{
public string budget_plan_name { get; set; }
public decimal? value { get; set; }
}
// public class request_summary_detail2
// {
// public string rowno { get; set; }
// public string list { get; set; }
// public decimal? amount_1 { get; set; }
// public decimal? amount_2 { get; set; }
// public decimal? amount_3{ get; set; }
// public decimal? amount_4 { get; set; }
// public decimal? amount_5 { get; set; }
// public decimal? amount_6 { get; set; }
// public decimal? amount_7 { get; set; }
// public decimal? amount_8 { get; set; }
// public decimal? amount_9 { get; set; }
// public decimal? amount_10 { get; set; }
// public decimal? amount_11 { get; set; }
// public decimal? amount_12 { get; set; }
// public decimal? amount_13 { get; set; }
// public decimal? amount_14 { get; set; }
// public bool? is_bold { get; set; }
// public string color { get; set; }
// public List<request_summary_detail3> data_3 { get; set; }
// }
//
// public class request_summary_detail3
// {
// public string rowno { get; set; }
// public string list { get; set; }
// public decimal? amount_1 { get; set; }
// public decimal? amount_2 { get; set; }
// public decimal? amount_3{ get; set; }
// public decimal? amount_4 { get; set; }
// public decimal? amount_5 { get; set; }
// public decimal? amount_6 { get; set; }
// public decimal? amount_7 { get; set; }
// public decimal? amount_8 { get; set; }
// public decimal? amount_9 { get; set; }
// public decimal? amount_10 { get; set; }
// public decimal? amount_11 { get; set; }
// public decimal? amount_12 { get; set; }
// public decimal? amount_13 { get; set; }
// public decimal? amount_14 { get; set; }
// public bool? is_bold { get; set; }
// }
}
+2
View File
@@ -46,6 +46,8 @@ namespace rmutr_report.Models
public decimal? contribution_central_budget { get; set; }
public decimal? contribution_central_expenditure { get; set; }
public decimal? expenditure_limit { get; set; }
public decimal? contribution_percent { get; set; }
public decimal? framework_percent { get; set; }
public int? topic_type { get; set; }
+53
View File
@@ -0,0 +1,53 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class student_admission_plan
{
public int? student_type_code { get; set; } //1นักศึกษารับใหม่ 2นักศึกษาทั้งหมด 3นักศึกษาสำเร็จ
public string student_type_name { get; set; }
public string academic_year_from { get; set; }
public string academic_year_to{ get; set; }
public string faculty_name_th { get; set; }
public string level { get; set; }
public string course_name_th { get; set; }
public string major_name_th { get; set; }
public string budget_project_name_th { get; set; }
public string agency_name_th { get; set; }
public string budget_location_name_th { get; set; }
//
public string year_1 { get; set; }
public string year_2 { get; set; }
public string year_3 { get; set; }
public string year_4 { get; set; }
public string year_5 { get; set; }
public string year_6 { get; set; }
public string text { get; set; }
public List<student_admission_plan_detail> data { get; set; }
}
public class student_admission_plan_detail
{
public int? topic_type { get; set; }
public string topic { get; set; }
public decimal? sector_normal_year_1 { get; set; }
public decimal? sector_normal_year_2 { get; set; }
public decimal? sector_normal_year_3 { get; set; }
public decimal? sector_normal_year_4 { get; set; }
public decimal? sector_normal_year_5 { get; set; }
public decimal? sector_normal_year_6 { get; set; }
public decimal? sector_associate_year_1 { get; set; }
public decimal? sector_associate_year_2 { get; set; }
public decimal? sector_associate_year_3 { get; set; }
public decimal? sector_associate_year_4 { get; set; }
public decimal? sector_associate_year_5 { get; set; }
public decimal? sector_associate_year_6 { get; set; }
public decimal? total_year_1 { get; set; }
public decimal? total_year_2 { get; set; }
public decimal? total_year_3 { get; set; }
public decimal? total_year_4 { get; set; }
public decimal? total_year_5 { get; set; }
public decimal? total_year_6 { get; set; }
}
}
+182
View File
@@ -0,0 +1,182 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class student_overview
{
public int? student_type_code { get; set; } //1นักศึกษารับใหม่ 2นักศึกษาทั้งหมด 3นักศึกษาสำเร็จ
public string student_type_name { get; set; }
public string academic_year_from { get; set; }
public string academic_year_to{ get; set; }
//
public string year_1 { get; set; }
public string year_2 { get; set; }
public string year_3 { get; set; }
public string year_4 { get; set; }
public string year_5 { get; set; }
public string year_6 { get; set; }
public List<student_overview_detail> data { get; set; }
public decimal? ba_degree_science_1 { get; set; }
public decimal? ba_degree_social_1{ get; set; }
public decimal? ba_degree_total_1 { get; set; }
public decimal? ma_degree_science_1 { get; set; }
public decimal? ma_degree_social_1 { get; set; }
public decimal? ma_degree_total_1 { get; set; }
public decimal? doctor_degree_science_1 { get; set; }
public decimal? doctor_degree_social_1 { get; set; }
public decimal? doctor_degree_total_1 { get; set; }
public decimal? total_science_1 { get; set; }
public decimal? total_social_1 { get; set; }
public decimal? total_1 { get; set; }
//
public decimal? ba_degree_science_2 { get; set; }
public decimal? ba_degree_social_2{ get; set; }
public decimal? ba_degree_total_2 { get; set; }
public decimal? ma_degree_science_2 { get; set; }
public decimal? ma_degree_social_2 { get; set; }
public decimal? ma_degree_total_2 { get; set; }
public decimal? doctor_degree_science_2 { get; set; }
public decimal? doctor_degree_social_2 { get; set; }
public decimal? doctor_degree_total_2 { get; set; }
public decimal? total_science_2 { get; set; }
public decimal? total_social_2 { get; set; }
public decimal? total_2 { get; set; }
//
public decimal? ba_degree_science_3 { get; set; }
public decimal? ba_degree_social_3{ get; set; }
public decimal? ba_degree_total_3 { get; set; }
public decimal? ma_degree_science_3 { get; set; }
public decimal? ma_degree_social_3 { get; set; }
public decimal? ma_degree_total_3 { get; set; }
public decimal? doctor_degree_science_3 { get; set; }
public decimal? doctor_degree_social_3 { get; set; }
public decimal? doctor_degree_total_3 { get; set; }
public decimal? total_science_3 { get; set; }
public decimal? total_social_3 { get; set; }
public decimal? total_3 { get; set; }
//
public decimal? ba_degree_science_4 { get; set; }
public decimal? ba_degree_social_4{ get; set; }
public decimal? ba_degree_total_4 { get; set; }
public decimal? ma_degree_science_4 { get; set; }
public decimal? ma_degree_social_4 { get; set; }
public decimal? ma_degree_total_4 { get; set; }
public decimal? doctor_degree_science_4 { get; set; }
public decimal? doctor_degree_social_4 { get; set; }
public decimal? doctor_degree_total_4 { get; set; }
public decimal? total_science_4 { get; set; }
public decimal? total_social_4 { get; set; }
public decimal? total_4 { get; set; }
//
public decimal? ba_degree_science_5 { get; set; }
public decimal? ba_degree_social_5{ get; set; }
public decimal? ba_degree_total_5 { get; set; }
public decimal? ma_degree_science_5 { get; set; }
public decimal? ma_degree_social_5 { get; set; }
public decimal? ma_degree_total_5 { get; set; }
public decimal? doctor_degree_science_5 { get; set; }
public decimal? doctor_degree_social_5 { get; set; }
public decimal? doctor_degree_total_5 { get; set; }
public decimal? total_science_5 { get; set; }
public decimal? total_social_5 { get; set; }
public decimal? total_5 { get; set; }
//
public decimal? ba_degree_science_6 { get; set; }
public decimal? ba_degree_social_6{ get; set; }
public decimal? ba_degree_total_6 { get; set; }
public decimal? ma_degree_science_6 { get; set; }
public decimal? ma_degree_social_6 { get; set; }
public decimal? ma_degree_total_6 { get; set; }
public decimal? doctor_degree_science_6 { get; set; }
public decimal? doctor_degree_social_6 { get; set; }
public decimal? doctor_degree_total_6 { get; set; }
public decimal? total_science_6 { get; set; }
public decimal? total_social_6 { get; set; }
public decimal? total_6 { get; set; }
}
public class student_overview_detail
{
public int? topic_type { get; set; }
public string row_no { get; set; }
public string topic { get; set; }
public decimal? ba_degree_science_1 { get; set; }
public decimal? ba_degree_social_1{ get; set; }
public decimal? ba_degree_total_1 { get; set; }
public decimal? ma_degree_science_1 { get; set; }
public decimal? ma_degree_social_1 { get; set; }
public decimal? ma_degree_total_1 { get; set; }
public decimal? doctor_degree_science_1 { get; set; }
public decimal? doctor_degree_social_1 { get; set; }
public decimal? doctor_degree_total_1 { get; set; }
public decimal? total_science_1 { get; set; }
public decimal? total_social_1 { get; set; }
public decimal? total_1 { get; set; }
//
public decimal? ba_degree_science_2 { get; set; }
public decimal? ba_degree_social_2{ get; set; }
public decimal? ba_degree_total_2 { get; set; }
public decimal? ma_degree_science_2 { get; set; }
public decimal? ma_degree_social_2 { get; set; }
public decimal? ma_degree_total_2 { get; set; }
public decimal? doctor_degree_science_2 { get; set; }
public decimal? doctor_degree_social_2 { get; set; }
public decimal? doctor_degree_total_2 { get; set; }
public decimal? total_science_2 { get; set; }
public decimal? total_social_2 { get; set; }
public decimal? total_2 { get; set; }
//
public decimal? ba_degree_science_3 { get; set; }
public decimal? ba_degree_social_3{ get; set; }
public decimal? ba_degree_total_3 { get; set; }
public decimal? ma_degree_science_3 { get; set; }
public decimal? ma_degree_social_3 { get; set; }
public decimal? ma_degree_total_3 { get; set; }
public decimal? doctor_degree_science_3 { get; set; }
public decimal? doctor_degree_social_3 { get; set; }
public decimal? doctor_degree_total_3 { get; set; }
public decimal? total_science_3 { get; set; }
public decimal? total_social_3 { get; set; }
public decimal? total_3 { get; set; }
//
public decimal? ba_degree_science_4 { get; set; }
public decimal? ba_degree_social_4{ get; set; }
public decimal? ba_degree_total_4 { get; set; }
public decimal? ma_degree_science_4 { get; set; }
public decimal? ma_degree_social_4 { get; set; }
public decimal? ma_degree_total_4 { get; set; }
public decimal? doctor_degree_science_4 { get; set; }
public decimal? doctor_degree_social_4 { get; set; }
public decimal? doctor_degree_total_4 { get; set; }
public decimal? total_science_4 { get; set; }
public decimal? total_social_4 { get; set; }
public decimal? total_4 { get; set; }
//
public decimal? ba_degree_science_5 { get; set; }
public decimal? ba_degree_social_5{ get; set; }
public decimal? ba_degree_total_5 { get; set; }
public decimal? ma_degree_science_5 { get; set; }
public decimal? ma_degree_social_5 { get; set; }
public decimal? ma_degree_total_5 { get; set; }
public decimal? doctor_degree_science_5 { get; set; }
public decimal? doctor_degree_social_5 { get; set; }
public decimal? doctor_degree_total_5 { get; set; }
public decimal? total_science_5 { get; set; }
public decimal? total_social_5 { get; set; }
public decimal? total_5 { get; set; }
//
public decimal? ba_degree_science_6 { get; set; }
public decimal? ba_degree_social_6{ get; set; }
public decimal? ba_degree_total_6 { get; set; }
public decimal? ma_degree_science_6 { get; set; }
public decimal? ma_degree_social_6 { get; set; }
public decimal? ma_degree_total_6 { get; set; }
public decimal? doctor_degree_science_6 { get; set; }
public decimal? doctor_degree_social_6 { get; set; }
public decimal? doctor_degree_total_6 { get; set; }
public decimal? total_science_6 { get; set; }
public decimal? total_social_6 { get; set; }
public decimal? total_6 { get; set; }
}
}
+4 -4
View File
@@ -8,7 +8,8 @@ namespace rmutr_report.Models
public string product { get; set; }
public string faculty { get; set; }
public List<study_material_detail1> data1 { get; set; }
//public string text { get; set; }
public decimal? total_cost_science { get; set; }
public decimal? total_cost_social { get; set; }
}
@@ -25,7 +26,8 @@ namespace rmutr_report.Models
{
public string year_class { get; set; }
public string code { get; set; }
public decimal? total_cost_science { get; set; }
public decimal? total_cost_social { get; set; }
public List<study_material_detail3> data3 { get; set; }
}
@@ -33,8 +35,6 @@ namespace rmutr_report.Models
{
public string academic_semester { get; set; }
public string student { get; set; }
// public string code { get; set; }
// public string major { get; set; }
public decimal? salaya { get; set; }
public decimal? bophitphimuk { get; set; }
public decimal? pohchang { get; set; }
+69
View File
@@ -0,0 +1,69 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class summary_budget_expense
{
public string budget_year { get; set; }
public string agency_name_th { get; set; }
public string budget_plan_name_th { get; set; }
public string parent_agency_name { get; set; }
public List<summary_budget_expense_detail> data { get; set; }
public decimal? total_equipment { get; set; }
public decimal? total_land_building { get; set; }
public decimal? total_subsidy { get; set; }
public decimal? total_compensation { get; set; }
public decimal? total_living_expenses { get; set; }
public decimal? total_material { get; set; }
public decimal? total_utilities { get; set; }
public decimal? total_other_expenses { get; set; }
public decimal? total_other_budget_expenses { get; set; }
public decimal? total_all { get; set; }
}
public class summary_budget_expense_detail
{
public string budget_project_name_th { get; set; }
public decimal? equipment { get; set; }
public decimal? land_building { get; set; }
public decimal? subsidy { get; set; }
public decimal? compensation { get; set; }
public decimal? living_expenses { get; set; }
public decimal? material { get; set; }
public decimal? utilities { get; set; }
public decimal? other_expenses { get; set; }
public decimal? other_budget_expenses { get; set; }
public decimal? total { get; set; }
}
public class summary_budget_expense_report
{
public string budget_year { get; set; }
public string agency_name_th { get; set; }
public string budget_plan_name_th { get; set; }
public string parent_agency_name { get; set; }
public string budget_project_name { get; set; }
public List<summary_budget_expense_report_detail> data { get; set; }
public decimal? total_equipment { get; set; }
public decimal? total_land_building { get; set; }
public decimal? total_subsidy_university_staff { get; set; }
public decimal? total_subsidy { get; set; }
public decimal? total_operating_expenses { get; set; }
public decimal? total_other_expenses { get; set; }
public decimal? total_other_budget_expenses { get; set; }
public decimal? total_all { get; set; }
}
public class summary_budget_expense_report_detail
{
public string budget_project_name_th { get; set; }
public decimal? equipment { get; set; }
public decimal? land_building { get; set; }
public decimal? subsidy_university_staff { get; set; }
public decimal? subsidy { get; set; }
public decimal? operating_expenses { get; set; }
public decimal? other_expenses { get; set; }
public decimal? other_budget_expenses { get; set; }
public decimal? total { get; set; }
}
}
@@ -0,0 +1,67 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace rmutr_report.Models
{
public class summary_demand_status_equipment
{
public string budget_year { get; set; }
public string request_assets_year_1 { get; set; }
public string request_assets_year_2 { get; set; }
public string request_assets_year_3 { get; set; }
public List<summary_demand_status_equipment_detail> data { get; set; }
}
public class summary_demand_status_equipment_detail
{
public string row_order { get; set; }
public string row_no { get; set; }
public int? topic_type { get; set; }
public string topic { get; set; }
public decimal? request_assets_year_1 { get; set; }
public decimal? request_assets_year_2 { get; set; }
public decimal? request_assets_year_3 { get; set; }
public decimal? asset_available_amount { get; set; }
public decimal? asset_broken_amount { get; set; }
public decimal? not_available { get; set; }
public decimal? average_service_life { get; set; }
public string unit { get; set; }
public decimal? unit_price { get; set; }
public decimal? replacement_original { get; set; }
public decimal? increase_efficiency { get; set; }
public decimal? building { get; set; }
public decimal? total_amount { get; set; }
public decimal? request_amount { get; set; }
public decimal? offer_amount { get; set; }
public string remark { get; set; }
public bool? conform_1 { get; set; }
public bool? conform_2 { get; set; }
public bool? conform_3 { get; set; }
public bool? standard_price_1 { get; set; }
public bool? standard_price_2 { get; set; }
public bool? standard_price_3 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? limit_price_1 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? limit_price_2 { get; set; }
[Column(TypeName = "decimal(18,4)")] public decimal? limit_price_3 { get; set; }
public bool? unique_feature_1 { get; set; }
public bool? unique_feature_2 { get; set; }
public bool? unique_feature_3 { get; set; }
public string budget_location_name_th { get; set; }
public string faculty_name_th { get; set; }
//
public string conform1 { get; set; }
public string conform2 { get; set; }
public string conform3 { get; set; }
public string standard_price1 { get; set; }
public string standard_price2 { get; set; }
public string standard_price3 { get; set; }
public string unique_feature1 { get; set; }
public string unique_feature2 { get; set; }
public string unique_feature3 { get; set; }
}
}
+125
View File
@@ -0,0 +1,125 @@
using System;
using System.Collections.Generic;
public class summary_invest : summary_invest_initial
{
public List<summary_invest_year> years { get; set; }
}
public class summary_invest_year : summary_invest_initial
{
public Guid? budget_year_uid { get; set; }
public string budget_year_name_th { get; set; }
public List<summary_invest_plan> plans { get; set; }
}
public class summary_invest_plan : summary_invest_initial
{
public Guid? budget_plan_uid { get; set; }
public string budget_plan_name_th { get; set; }
public List<summary_invest_project> projects { get; set; }
}
public class summary_invest_project : summary_invest_initial
{
public Guid? budget_project_uid { get; set; }
public string budget_project_name_th { get; set; }
public List<summary_invest_faculty> facultys { get; set; }
}
public class summary_invest_faculty : summary_invest_initial
{
public Guid? faculty_uid { get; set; }
public string faculty_name_th { get; set; }
public List<summary_invest_list> asset_lists { get; set; }
public List<summary_invest_list> construct_lists { get; set; }
}
public class summary_invest_list : summary_invest_initial
{
public Guid? invest_asset_approve_uid { get; set; }
public Guid? invest_construct_approve_uid { get; set; }
public Guid? key_uid { get; set; }
public Guid? key_request_uid { get; set; }
public string list_name { get; set; }
public string unit_name { get; set; }
public string seller { get; set; }
public string file { get; set; }
public int? row_order { get; set; }
public int? step_order { get; set; }
public int? amount { get; set; }
public bool? is_from_reject { get; set; }
public bool? is_edit { get; set; }
public bool? is_approve { get; set; }
public string approve_name { get; set; }
public string petitioner_full_name { get; set; }
public string phone_number { get; set; }
}
public class summary_invest_search
{
public Guid? budget_year_uid { get; set; }
public Guid? budget_project_uid { get; set; }
public Guid? budget_plan_uid { get; set; }
public Guid? faculty_uid { get; set; }
public string list_name { get; set; }
public string petitioner_full_name { get; set; }
public bool? is_asset { get; set; }
public bool? is_construct { get; set; }
public bool? is_approve { get; set; }
}
public class summary_invest_data_initial : summary_invest_search
{
public int? budget_year_number { get; set; }
public string budget_year_name_th { get; set; }
public string budget_project_name_th { get; set; }
public string budget_plan_name_th { get; set; }
public string faculty_name_th { get; set; }
}
public class summary_invest_initial
{
public decimal? unit_price { get; set; }
public decimal? total { get; set; }
public decimal? total_budget { get; set; }
public decimal? asset_unit_price { get; set; }
public decimal? asset_total_budget { get; set; }
public decimal? construct_unit_price { get; set; }
public decimal? construct_total_budget { get; set; }
}
public class summary_invest_v2 : summary_invest_initial
{
public List<summary_invest_year_v2> years { get; set; }
}
public class summary_invest_year_v2 : summary_invest_initial
{
public Guid? budget_year_uid { get; set; }
public string budget_year_name_th { get; set; }
public List<summary_invest_plan_v2> plans { get; set; }
}
public class summary_invest_plan_v2 : summary_invest_initial
{
public Guid? budget_plan_uid { get; set; }
public string budget_plan_name_th { get; set; }
public List<summary_invest_list_v2> asset_lists { get; set; }
public List<summary_invest_list_v2> construct_lists { get; set; }
}
public class summary_invest_list_v2 : summary_invest_initial
{
public Guid? budget_project_uid { get; set; }
public Guid? faculty_uid { get; set; }
public string budget_project_name_th { get; set; }
public string faculty_name_th { get; set; }
public Guid? invest_asset_approve_uid { get; set; }
public Guid? invest_construct_approve_uid { get; set; }
public Guid? key_uid { get; set; }
public Guid? key_request_uid { get; set; }
public string list_name { get; set; }
public string unit_name { get; set; }
public string seller { get; set; }
public string seller2 { get; set; }
public string file { get; set; }
public string file2 { get; set; }
public int? row_order { get; set; }
public int? step_order { get; set; }
public int? amount { get; set; }
public bool? is_from_reject { get; set; }
public bool? is_edit { get; set; }
public bool? is_approve { get; set; }
public string approve_name { get; set; }
public string petitioner_full_name { get; set; }
public string phone_number { get; set; }
}
@@ -0,0 +1,47 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class summary_overview_building
{
public string budget_year { get; set; }
public List<summary_overview_building_detail> data { get; set; }
}
public class summary_overview_building_detail
{
public string row_order { get; set; }
public string row_no { get; set; }
public int? topic_type { get; set; }
public string topic { get; set; }
public string province { get; set; }
public decimal? quantity { get; set; }
public string unit { get; set; }
public decimal? unit_price { get; set; }
public decimal? request_amount { get; set; }
public decimal? offer_amount { get; set; }
public string remark { get; set; }
public string assembly_details { get; set; }
public decimal? usable_area { get; set; }
public decimal? construction_period { get; set; }
public decimal? quantity_period_work { get; set; }
public bool? readiness_action_1 { get; set; }
public bool? readiness_action_2 { get; set; }
public bool? readiness_action_3 { get; set; }
public bool? readiness_action_4 { get; set; }
public bool? appearance_equipment_1 { get; set; }
public bool? appearance_equipment_2 { get; set; }
public bool? appearance_equipment_3 { get; set; }
public string education_type { get; set; }
public string budget_location_name_th { get; set; }
public string faculty_name_th { get; set; }
//
public string readiness_action1 { get; set; }
public string readiness_action2 { get; set; }
public string readiness_action3 { get; set; }
public string readiness_action4 { get; set; }
public string appearance_equipment1 { get; set; }
public string appearance_equipment2 { get; set; }
public string appearance_equipment3 { get; set; }
}
}
+27
View File
@@ -0,0 +1,27 @@
using System.Collections.Generic;
namespace rmutr_report.Models
{
public class target_budget_project
{
public string budget_project_name_th { get; set; }
public string plan_year_1 { get; set; }
public string plan_year_2 { get; set; }
public string plan_year_3 { get; set; }
public string plan_year_4 { get; set; }
public string plan_year_5 { get; set; }
public List<target_budget_project_detail> data { get; set; }
}
public class target_budget_project_detail
{
public string indicators_money_source { get; set; }
public string unit { get; set; }
public string plan_value_1 { get; set; }
public string plan_value_2 { get; set; }
public string plan_value_3 { get; set; }
public string plan_value_4 { get; set; }
public string plan_value_5 { get; set; }
}
}
+70 -23
View File
@@ -1,26 +1,73 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System.Net;
using System.Reflection;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.OpenApi.Models;
using rmutr_report.Models;
using IPNetwork = Microsoft.AspNetCore.HttpOverrides.IPNetwork;
namespace rmutr_report
var builder = WebApplication.CreateBuilder(args);
var configuration = builder.Configuration;
var setting = new Setting
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
report_path = configuration["Settings:ReportPath"]
};
builder.Services.AddSingleton(setting);
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}
builder.Services.AddControllers();
builder.Services.AddCors(options =>
{
options.AddPolicy("AllowAllOrigins", policy =>
{
policy.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod();
});
});
builder.Services.AddSwaggerGen(c =>
{
c.SwaggerDoc("reports", new OpenApiInfo { Title = "Reports API", Version = "v1" });
c.SwaggerDoc("graph", new OpenApiInfo { Title = "Graph API", Version = "v1" });
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
c.IncludeXmlComments(xmlPath);
c.EnableAnnotations();
});
var app = builder.Build();
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto,
KnownNetworks = { new IPNetwork(IPAddress.Any, 0) }
});
app.UseSwagger(c =>
{
c.RouteTemplate = "swagger/{documentName}/swagger.json";
c.PreSerializeFilters.Add((swaggerDoc, httpReq) =>
{
if (!httpReq.Headers.ContainsKey("X-Forwarded-Host")) return;
var serverUrl = $"{httpReq.Headers["X-Scheme"]}://" +
$"{httpReq.Headers["X-Forwarded-Host"]}" +
$"{httpReq.Headers["X-Forwarded-Prefix"]}";
swaggerDoc.Servers = new List<OpenApiServer> { new OpenApiServer { Url = serverUrl } };
});
});
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("reports/swagger.json", "Reports API v1");
c.SwaggerEndpoint("graph/swagger.json", "Graph API v1");
c.DefaultModelExpandDepth(0);
c.DefaultModelsExpandDepth(-1);
});
app.UseRouting();
app.UseAuthorization();
app.UseCors("AllowAllOrigins");
app.MapControllers();
app.Run();
-108
View File
@@ -1,108 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.OpenApi.Models;
using rmutr_report.Models;
namespace rmutr_report
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services)
{
var _setting = new Setting()
{
report_path = Configuration["Settings:ReportPath"]
};
services.AddSingleton(_setting);
services.AddControllers();
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("reports", new OpenApiInfo {Title = "Reports API", Version = "v1"});
c.SwaggerDoc("graph", new OpenApiInfo {Title = "Graph API", Version = "v1"});
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
c.IncludeXmlComments(xmlPath);
c.EnableAnnotations();
// c.MapType(typeof(TimeSpan?), () => new OpenApiSchema
// {
// Type = "string",
// Example = new OpenApiString("09:30:00")
// });
});
services.AddCors(options =>
{
options.AddPolicy(name: "AllowAllOrigins",
builder =>
{
builder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod();
});
});
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto,
KnownNetworks =
{
new IPNetwork(IPAddress.Any, 0)
}
});
app.UseSwagger(c => {
c.RouteTemplate = "swagger/{documentName}/swagger.json";
c.PreSerializeFilters.Add((swaggerDoc, httpReq) =>
{
if (!httpReq.Headers.ContainsKey("X-Forwarded-Host")) return;
var serverUrl = $"{httpReq.Headers["X-Scheme"]}://" +
$"{httpReq.Headers["X-Forwarded-Host"]}" +
$"{httpReq.Headers["X-Forwarded-Prefix"]}";
swaggerDoc.Servers = new List<OpenApiServer> { new OpenApiServer { Url =serverUrl}};// $"{httpReq.Scheme}://{httpReq.Host.Value}{swaggerBasePath}" } };
});
});
//Swagger interface
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("reports/swagger.json", "Reports API v1");
c.SwaggerEndpoint("graph/swagger.json", "Graph API v1");
c.DefaultModelExpandDepth(0);
c.DefaultModelsExpandDepth(-1);
});
app.UseRouting();
app.UseAuthorization();
app.UseCors("AllowAllOrigins");
app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More