diff --git a/Controllers/Personnel.Controller.cs b/Controllers/Personnel.Controller.cs index 7bb320e..eb7ae7e 100644 --- a/Controllers/Personnel.Controller.cs +++ b/Controllers/Personnel.Controller.cs @@ -501,7 +501,10 @@ namespace rmutr_report.Controllers { var workbook = new XLWorkbook(); var ws = workbook.Worksheets.Add("พนักงานราชการ"); - + if (_personnel.year == "2567") + { + _personnel.year = "2566"; + } ws.Range("A1:T1").Merge().Value = "รายละเอียดเงินเดือนและส่วนควบของพนักงานราชการ ประจำปีงบประมาณ พ.ศ. " + _personnel.year; ws.Cell("A1").Style.Alignment.WrapText = true; @@ -556,21 +559,21 @@ namespace rmutr_report.Controllers ws.Cell("F4").Style.Font.FontName = "TH SarabunPSK"; ws.Cell("F4").Style.Font.SetBold().Font.FontSize = 16; - ws.Range("H4:H7").Merge().Value = "เงินเดือน ณ " + _personnel.salary_text_1; + ws.Range("H4:H7").Merge().Value = "เงินเดือน ณ 1 ต.ค. 64 - 30 ก.ย. 65"; ws.Cell("H4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell("H4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range("H4:H7").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell("H4").Style.Font.FontName = "TH SarabunPSK"; ws.Cell("H4").Style.Font.SetBold().Font.FontSize = 16; - ws.Range("I4:I6").Merge().Value = "ประมาณการเงินเดือน " + _personnel.salary_text_2 + " (4 %)"; + ws.Range("I4:I6").Merge().Value = "ประมาณการเงินเดือน 1 ต.ค. 65- 30 ก.ย. 66"; ws.Cell("I4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell("I4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range("I4:I6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell("I4").Style.Font.FontName = "TH SarabunPSK"; ws.Cell("I4").Style.Font.SetBold().Font.FontSize = 16; - ws.Range("J4:J6").Merge().Value = "เลื่อนขั้น 4%" + _personnel.salary_text_3; + ws.Range("J4:J6").Merge().Value = "เลื่อนขั้น 4% 1 ต.ค. 66- 30 ก.ย. 67"; ws.Cell("J4").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center; ws.Cell("J4").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; ws.Range("J4:J6").Style.Border.OutsideBorder = XLBorderStyleValues.Thin; @@ -865,7 +868,9 @@ namespace rmutr_report.Controllers ws.Cell(row, 1).Value = no; no++; ws.Cell(row, 2).Value = deltail2.manpower; - ws.Range(ws.Cell(row, 3), ws.Cell(row, 4)).Merge().Value = deltail2.full_name; + ws.Cell(row, 3).Value = deltail2.first_name_th; + ws.Cell(row, 4).Value = deltail2.last_name_th; + //ws.Range(ws.Cell(row, 3), ws.Cell(row, 4)).Merge().Value = deltail2.full_name; ws.Cell(row, 5).Value = deltail2.position; ws.Cell(row, 6).Value = deltail2.parent_agency_name; ws.Cell(row, 7).Value = deltail2.area; @@ -885,8 +890,12 @@ namespace rmutr_report.Controllers ws.Cell(row, 21).Value = deltail2.special_compensation_1; ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; - ws.Cell(row, 3).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; - ws.Cell(row, 4).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; + ws.Cell(row, 3).Style.Border.LeftBorder = XLBorderStyleValues.Thin; + ws.Cell(row, 3).Style.Border.RightBorder = XLBorderStyleValues.None; + ws.Cell(row, 3).Style.Border.BottomBorder = XLBorderStyleValues.Thin; + ws.Cell(row, 4).Style.Border.LeftBorder = XLBorderStyleValues.None; + ws.Cell(row, 4).Style.Border.RightBorder = XLBorderStyleValues.Thin; + ws.Cell(row, 4).Style.Border.BottomBorder = XLBorderStyleValues.Thin; ws.Cell(row, 5).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 6).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; ws.Cell(row, 7).Style.Border.OutsideBorder = XLBorderStyleValues.Thin; @@ -972,7 +981,11 @@ namespace rmutr_report.Controllers } } } + } + var richText = ws.PageSetup.Footer.Left.AddText("หมายเหตุ : ในกรณีที่เงินเดือนตุลาคม 2564 ยังไม่เลื่อนขั้นเงินเดือน ให้กรอกเงินเลื่อนขั้น 4% ในช่อง (2)", XLHFOccurrence.FirstPage); + richText.FontSize = 16; + richText.FontName = "TH SarabunPSK"; using (var stream1 = new MemoryStream()) { diff --git a/Models/Personnel/personnel_salary_permanent.cs b/Models/Personnel/personnel_salary_permanent.cs index ab070d3..55c89b6 100644 --- a/Models/Personnel/personnel_salary_permanent.cs +++ b/Models/Personnel/personnel_salary_permanent.cs @@ -10,9 +10,9 @@ namespace rmutr_report.Models.Personnel public Guid? personnel_salary_permanent_root_uid { get; set; } public Guid? log_report_uid { get; set; } public string year { get; set; } - public string salary_text_1 { get; set; } - public string salary_text_2 { get; set; } - public string salary_text_3 { get; set; } + // public string salary_text_1 { get; set; } + // public string salary_text_2 { get; set; } + // public string salary_text_3 { get; set; } public int? salary { get; set; } public int? estimate_promote_1 { get; set; } public int? estimate_promote_2 { get; set; } diff --git a/bin/Debug/net5.0/ref/rmutr-report.dll b/bin/Debug/net5.0/ref/rmutr-report.dll index 69b31c2..df3ec87 100644 Binary files a/bin/Debug/net5.0/ref/rmutr-report.dll and b/bin/Debug/net5.0/ref/rmutr-report.dll differ diff --git a/bin/Debug/net5.0/rmutr-report.dll b/bin/Debug/net5.0/rmutr-report.dll index 8203eca..d13c18f 100644 Binary files a/bin/Debug/net5.0/rmutr-report.dll and b/bin/Debug/net5.0/rmutr-report.dll differ diff --git a/bin/Debug/net5.0/rmutr-report.pdb b/bin/Debug/net5.0/rmutr-report.pdb index d8d35d5..37cef05 100644 Binary files a/bin/Debug/net5.0/rmutr-report.pdb and b/bin/Debug/net5.0/rmutr-report.pdb differ diff --git a/obj/Debug/net5.0/ref/rmutr-report.dll b/obj/Debug/net5.0/ref/rmutr-report.dll index 69b31c2..df3ec87 100644 Binary files a/obj/Debug/net5.0/ref/rmutr-report.dll and b/obj/Debug/net5.0/ref/rmutr-report.dll differ diff --git a/obj/Debug/net5.0/rmutr-report.dll b/obj/Debug/net5.0/rmutr-report.dll index 8203eca..d13c18f 100644 Binary files a/obj/Debug/net5.0/rmutr-report.dll and b/obj/Debug/net5.0/rmutr-report.dll differ diff --git a/obj/Debug/net5.0/rmutr-report.pdb b/obj/Debug/net5.0/rmutr-report.pdb index d8d35d5..37cef05 100644 Binary files a/obj/Debug/net5.0/rmutr-report.pdb and b/obj/Debug/net5.0/rmutr-report.pdb differ