This commit is contained in:
kamonwan taengsuk
2023-05-30 18:07:47 +07:00
parent 74b47bc2aa
commit 9c1bef4d43
8 changed files with 296 additions and 291 deletions

View File

@@ -3760,113 +3760,140 @@ namespace rmutr_report.Controllers
if (_personnel != null)
{
ws.Range(ws.Cell(row, 3), ws.Cell(row, 5)).Merge().Value = "รวมทั้งสิ้น";
// ws.Cell(row, 16).Value = _personnel.salary;
// ws.Cell(row, 17).Value = _personnel.estimated_salary_3_percent_1;
// ws.Cell(row, 18).Value = _personnel.estimated_salary_3_percent_2;
// ws.Cell(row, 19).Value = _personnel.estimated_salary_3_percent_3;
// ws.Cell(row, 20).Value = _personnel.estimated_salary_3_percent_4;
// ws.Cell(row, 21).Value = _personnel.estimated_salary_3_percent_sum;
// ws.Cell(row, 22).Value = _personnel.retiree;
// ws.Cell(row, 23).Value = _personnel.salary_per_month;
// ws.Cell(row, 24).Value = _personnel.salary_per_month_12;
// ws.Cell(row, 25).Value = _personnel.salary_minus_retirement_year;
// ws.Cell(row, 26).Value = _personnel.position_money;
// ws.Cell(row, 27).Value = _personnel.position_money_12;
// ws.Cell(row, 28).Value = _personnel.compensation_monthly;
// ws.Cell(row, 29).Value = _personnel.compensation_monthly_12;
// ws.Cell(row, 30).Value = _personnel.position_money_2;
// ws.Cell(row, 31).Value = _personnel.position_money_2_12;
// ws.Cell(row, 32).Value = _personnel.compensation_monthly_2;
// ws.Cell(row, 33).Value = _personnel.compensation_monthly_2_12;
// ws.Cell(row, 34).Value = _personnel.total;
// ws.Cell(row, 35).Value = _personnel.position_money_3;
// ws.Cell(row, 36).Value = _personnel.position_money_3_12;
// ws.Cell(row, 37).Value = _personnel.compensation_monthly_3;
// ws.Cell(row, 38).Value = _personnel.compensation_monthly_3_12;
// ws.Cell(row, 39).Value = _personnel.position_money_4;
// ws.Cell(row, 40).Value = _personnel.position_money_4_12;
// ws.Cell(row, 41).Value = _personnel.compensation_monthly_4;
// ws.Cell(row, 42).Value = _personnel.compensation_monthly_4_12;
// ws.Cell(row, 43).Value = _personnel.house_rent;
// ws.Cell(row, 44).Value = _personnel.compensation_paid;
// ws.Cell(row, 45).Value = _personnel.compensation_paid_12;
// ws.Cell(row, 46).Value = _personnel.special_compensation_with_full_salary;
// ws.Cell(row, 47).Value = _personnel.special_compensation;
//
// ws.Cell(row, 48).Value = _personnel.special_compensation_12;
// ws.Cell(row, 49).Value = _personnel.compensation_1;
// ws.Cell(row, 50).Value = _personnel.compensation_2;
// ws.Cell(row, 51).Value = _personnel.compensation_3;
// ws.Cell(row, 52).Value = _personnel.compensation_4;
// ws.Cell(row, 53).Value = _personnel.compensation_5;
// ws.Cell(row, 54).Value = _personnel.compensation_6;
// ws.Cell(row, 55).Value = _personnel.other;
// ws.Cell(row, 56).Value = _personnel.other_price;
// ws.Cell(row, 57).Value = _personnel.total_2;
// ws.Cell(row, 58).Value = _personnel.total_including_salary_and_fittings;
// ws.Cell(row, 59).Value = _personnel.total_including_salary_and_fittings_12;
// //ws.Cell(row, 59).Value = _personnel.total_including_salary_and_fittings;
//ws.Cell(row, 16).Value = _personnel.salary;
ws.Cell(row, 17).Value = _personnel.wages1;
ws.Cell(row, 18).Value = _personnel.wages2;
ws.Cell(row, 19).Value = _personnel.wages3;
ws.Cell(row, 20).Value = _personnel.wages4;
ws.Cell(row, 21).Value = _personnel.wages5;
ws.Cell(row, 22).Value = _personnel.total_wages;
ws.Cell(row, 23).Value = _personnel.promote;
ws.Cell(row, 24).Value = _personnel.total_salary;
ws.Cell(row, 25).Value = _personnel.welfare_benefit1;
ws.Cell(row, 26).Value = _personnel.welfare_benefit2;
ws.Cell(row, 27).Value = _personnel.welfare_benefit3;
ws.Cell(row, 28).Value = _personnel.welfare_benefit4;
ws.Cell(row, 29).Value = _personnel.welfare_benefit5;
ws.Cell(row, 30).Value = _personnel.total_welfare_benefit;
ws.Cell(row, 31).Value = _personnel.total_salary_welfare_benefit;
ws.Cell(row, 32).Value = _personnel.birth_date;
ws.Cell(row, 33).Value = _personnel.retiree;
ws.Cell(row, 34).Value = _personnel.salary_per_month;
ws.Cell(row, 35).Value = _personnel.position_money;
ws.Cell(row, 36).Value = _personnel.monthly_remuneration;
ws.Cell(row, 37).Value = _personnel.position_money_2;
ws.Cell(row, 38).Value = _personnel.monthly_remuneration_2;
ws.Cell(row, 39).Value = _personnel.compensation;
ws.Cell(row, 40).Value = _personnel.other;
ws.Cell(row, 41).Value = _personnel.other_price;
ws.Cell(row, 42).Value = _personnel.total;
ws.Cell(row, 43).Value = _personnel.position_money_3;
ws.Cell(row, 44).Value = _personnel.monthly_remuneration_3;
ws.Cell(row, 45).Value = _personnel.position_money_4;
ws.Cell(row, 46).Value = _personnel.monthly_remuneration_4;
ws.Cell(row, 47).Value = _personnel.total2;
ws.Cell(row, 48).Value = _personnel.total_wage;
// ws.Cell(row, 49).Value = _personnel.compensation_1;
// ws.Cell(row, 50).Value = _personnel.compensation_2;
// ws.Cell(row, 51).Value = _personnel.compensation_3;
// ws.Cell(row, 52).Value = _personnel.compensation_4;
// ws.Cell(row, 53).Value = _personnel.compensation_5;
// ws.Cell(row, 54).Value = _personnel.compensation_6;
// ws.Cell(row, 55).Value = _personnel.other;
// ws.Cell(row, 56).Value = _personnel.other_price;
// ws.Cell(row, 57).Value = _personnel.total_2;
// ws.Cell(row, 58).Value = _personnel.total_including_salary_and_fittings;
// ws.Cell(row, 59).Value = _personnel.total_including_salary_and_fittings_12;
//ws.Cell(row, 59).Value = _personnel.total_including_salary_and_fittings;
//ws.Cell(row, 60).Value = _personnel.total_including_salary_and_fittings_12;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.LeftBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontName =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.TopBorder =
XLBorderStyleValues.Double;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Style.Alignment.Horizontal =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 16)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 5), ws.Cell(row, 8)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 9), ws.Cell(row, 10)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 11), ws.Cell(row, 15)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 16), ws.Cell(row, 59)).Style.Alignment.Horizontal =
ws.Range(ws.Cell(row, 17), ws.Cell(row, 48)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 16), ws.Cell(row, 45)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 46), ws.Cell(row, 54)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 56), ws.Cell(row, 59)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 17), ws.Cell(row, 48)).Style.NumberFormat.SetFormat("#,#");
row++;
foreach (var detail in _personnel.personnel_salary_university)
{
// ws.Range(ws.Cell(row, 3), ws.Cell(row, 5)).Merge().Value = detail.agency_category_name;
// ws.Cell(row, 16).Value = detail.salary;
// ws.Cell(row, 17).Value = detail.estimated_salary_3_percent_1;
// ws.Cell(row, 18).Value = detail.estimated_salary_3_percent_2;
// ws.Cell(row, 19).Value = detail.estimated_salary_3_percent_3;
// ws.Cell(row, 20).Value = detail.estimated_salary_3_percent_4;
// ws.Cell(row, 21).Value = detail.estimated_salary_3_percent_sum;
// ws.Cell(row, 22).Value = detail.retiree;
// ws.Cell(row, 23).Value = detail.salary_per_month;
// ws.Cell(row, 24).Value = detail.salary_per_month_12;
// ws.Cell(row, 25).Value = detail.salary_minus_retirement_year;
// ws.Cell(row, 26).Value = detail.position_money;
// ws.Cell(row, 27).Value = detail.position_money_12;
// ws.Cell(row, 28).Value = detail.compensation_monthly;
// ws.Cell(row, 29).Value = detail.compensation_monthly_12;
// ws.Cell(row, 30).Value = detail.position_money_2;
// ws.Cell(row, 31).Value = detail.position_money_2_12;
// ws.Cell(row, 32).Value = detail.compensation_monthly_2;
// ws.Cell(row, 33).Value = detail.compensation_monthly_2_12;
// ws.Cell(row, 34).Value = detail.total;
// ws.Cell(row, 35).Value = detail.position_money_3;
// ws.Cell(row, 36).Value = detail.position_money_3_12;
// ws.Cell(row, 37).Value = detail.compensation_monthly_3;
// ws.Cell(row, 38).Value = detail.compensation_monthly_3_12;
// ws.Cell(row, 39).Value = detail.position_money_4;
// ws.Cell(row, 40).Value = detail.position_money_4_12;
// ws.Cell(row, 41).Value = detail.compensation_monthly_4;
// ws.Cell(row, 42).Value = detail.compensation_monthly_4_12;
// ws.Cell(row, 43).Value = detail.house_rent;
// ws.Cell(row, 44).Value = detail.compensation_paid;
// ws.Cell(row, 45).Value = detail.compensation_paid_12;
// ws.Cell(row, 46).Value = detail.special_compensation_with_full_salary;
// ws.Cell(row, 47).Value = detail.special_compensation;
// ws.Cell(row, 48).Value = detail.special_compensation_12;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Merge().Value = detail.agency_category_name;
// ws.Cell(row, 1).Value = no;
// no++;
// ws.Cell(row, 2).Value = detail.manpower;
// ws.Cell(row, 3).Value = detail.first_name_th;
// ws.Cell(row, 4).Value = detail.last_name_th;
// ws.Cell(row, 5).Value = detail.parent_agency_name;
// ws.Cell(row, 6).Value = detail.area;
// ws.Cell(row, 7).Value = detail.position;
// ws.Cell(row, 8).Value = detail.salary;
// if (detail2.is_academic_line == true)
// {
// ws.Cell(row, 9).Value = "/";
// }
//
// if (detail2.is_academic_line == false)
// {
// ws.Cell(row, 9).Value = "";
// }
//
// if (detail2.is_support_line == true)
// {
// ws.Cell(row, 10).Value = "/";
// }
//
// if (detail2.is_support_line == false)
// {
// ws.Cell(row, 10).Value = "";
// }
//
// ws.Cell(row, 11).Value = detail.management_position_name;
// ws.Cell(row, 12).Value = detail.position_name;
// ws.Cell(row, 13).Value = detail.assign_no_plus_assign_effective_date;
// ws.Cell(row, 14).Value = detail.education_level;
// ws.Cell(row, 15).Value = detail.education_of_manpower;
// ws.Cell(row, 16).Value = detail.salary2;
ws.Cell(row, 17).Value = detail.wages1;
ws.Cell(row, 18).Value = detail.wages2;
ws.Cell(row, 19).Value = detail.wages3;
ws.Cell(row, 20).Value = detail.wages4;
ws.Cell(row, 21).Value = detail.wages5;
ws.Cell(row, 22).Value = detail.total_wages;
ws.Cell(row, 23).Value = detail.promote;
ws.Cell(row, 24).Value = detail.total_salary;
ws.Cell(row, 25).Value = detail.welfare_benefit1;
ws.Cell(row, 26).Value = detail.welfare_benefit2;
ws.Cell(row, 27).Value = detail.welfare_benefit3;
ws.Cell(row, 28).Value = detail.welfare_benefit4;
ws.Cell(row, 29).Value = detail.welfare_benefit5;
ws.Cell(row, 30).Value = detail.total_welfare_benefit;
ws.Cell(row, 31).Value = detail.total_salary_welfare_benefit;
ws.Cell(row, 32).Value = detail.birth_date;
ws.Cell(row, 33).Value = detail.retiree;
ws.Cell(row, 34).Value = detail.salary_per_month;
ws.Cell(row, 35).Value = detail.position_money;
ws.Cell(row, 36).Value = detail.monthly_remuneration;
ws.Cell(row, 37).Value = detail.position_money_2;
ws.Cell(row, 38).Value = detail.monthly_remuneration_2;
ws.Cell(row, 39).Value = detail.compensation;
ws.Cell(row, 40).Value = detail.other;
ws.Cell(row, 41).Value = detail.other_price;
ws.Cell(row, 42).Value = detail.total;
ws.Cell(row, 43).Value = detail.position_money_3;
ws.Cell(row, 44).Value = detail.monthly_remuneration_3;
ws.Cell(row, 45).Value = detail.position_money_4;
ws.Cell(row, 46).Value = detail.monthly_remuneration_4;
ws.Cell(row, 47).Value = detail.total2;
ws.Cell(row, 48).Value = detail.total_wage;
// ws.Cell(row, 49).Value = detail.compensation_1;
// ws.Cell(row, 50).Value = detail.compensation_2;
// ws.Cell(row, 51).Value = detail.compensation_3;
@@ -3878,137 +3905,126 @@ namespace rmutr_report.Controllers
// ws.Cell(row, 57).Value = detail.total_2;
// ws.Cell(row, 58).Value = detail.total_including_salary_and_fittings;
// ws.Cell(row, 59).Value = detail.total_including_salary_and_fittings_12;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.LeftBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.LeftBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Fill.BackgroundColor = XLColor.LightYellow;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Fill.BackgroundColor = XLColor.LightYellow;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontName =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.TopBorder =
// XLBorderStyleValues.Double;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 8)).Style.Alignment.Horizontal =
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 9), ws.Cell(row, 10)).Style.Alignment.Horizontal =
ws.Range(ws.Cell(row, 7), ws.Cell(row, 16)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 11), ws.Cell(row, 15)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Left;
ws.Range(ws.Cell(row, 16), ws.Cell(row, 59)).Style.Alignment.Horizontal =
ws.Range(ws.Cell(row, 17), ws.Cell(row, 48)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 16), ws.Cell(row, 45)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 46), ws.Cell(row, 54)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 56), ws.Cell(row, 59)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 17), ws.Cell(row, 31)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 33), ws.Cell(row, 39)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 41), ws.Cell(row, 48)).Style.NumberFormat.SetFormat("#,#");
row++;
foreach (var detail2 in detail.personnel_salary_university_deltail)
{
CultureInfo culture = new CultureInfo("th-TH");
// if (detail2.first_name_th != "รวม")
// {
// ws.Cell(row, 1).Value = no;
// no++;
// ws.Cell(row, 2).Value = detail2.manpower;
// ws.Cell(row, 3).Value = detail2.prefix + detail2.first_name_th;
// ws.Cell(row, 4).Value = detail2.last_name_th;
// ws.Cell(row, 5).Value = detail2.parent_agency_name;
// ws.Cell(row, 6).Value = detail2.area;
// ws.Cell(row, 7).Value = detail2.position;
// ws.Cell(row, 8).Value = detail2.position_level;
// if (detail2.is_academic_line == true)
// {
// ws.Cell(row, 9).Value = "/";
// }
//
// if (detail2.is_academic_line == false)
// {
// ws.Cell(row, 9).Value = "";
// }
//
// if (detail2.is_support_line == true)
// {
// ws.Cell(row, 10).Value = "/";
// }
//
// if (detail2.is_support_line == false)
// {
// ws.Cell(row, 10).Value = "";
// }
//
// ws.Cell(row, 11).Value = detail2.management_position_name;
// ws.Cell(row, 12).Value = detail2.position_name;
// ws.Cell(row, 13).Value = detail2.assign_no + " " + detail2.assign_document_date;
// if (detail2.assign_effective_date != null)
// {
// ws.Cell(row, 14).Value =
// detail2.assign_effective_date.Value.ToString("dd MMMM yyyy", culture);
// }
//
// if (detail2.assign_effective_date == null)
// {
// ws.Cell(row, 14).Value = null;
// }
//
// ws.Cell(row, 15).Value = detail2.retire_year;
// ws.Cell(row, 16).Value = detail2.salary;
// ws.Cell(row, 17).Value = detail2.estimated_salary_3_percent_1;
// ws.Cell(row, 18).Value = detail2.estimated_salary_3_percent_2;
// ws.Cell(row, 19).Value = detail2.estimated_salary_3_percent_3;
// ws.Cell(row, 20).Value = detail2.estimated_salary_3_percent_4;
// ws.Cell(row, 21).Value = detail2.estimated_salary_3_percent_sum;
// ws.Cell(row, 22).Value = detail2.retiree;
// ws.Cell(row, 23).Value = detail2.salary_per_month;
// ws.Cell(row, 24).Value = detail2.salary_per_month_12;
// ws.Cell(row, 25).Value = detail2.salary_minus_retirement_year;
// ws.Cell(row, 26).Value = detail2.position_money;
// ws.Cell(row, 27).Value = detail2.position_money_12;
// ws.Cell(row, 28).Value = detail2.compensation_monthly;
// ws.Cell(row, 29).Value = detail2.compensation_monthly_12;
// ws.Cell(row, 30).Value = detail2.position_money_2;
// ws.Cell(row, 31).Value = detail2.position_money_2_12;
// ws.Cell(row, 32).Value = detail2.compensation_monthly_2;
// ws.Cell(row, 33).Value = detail2.compensation_monthly_2_12;
// ws.Cell(row, 34).Value = detail2.total;
// ws.Cell(row, 35).Value = detail2.position_money_3;
// ws.Cell(row, 36).Value = detail2.position_money_3_12;
// ws.Cell(row, 37).Value = detail2.compensation_monthly_3;
// ws.Cell(row, 38).Value = detail2.compensation_monthly_3_12;
// ws.Cell(row, 39).Value = detail2.position_money_4;
// ws.Cell(row, 40).Value = detail2.position_money_4_12;
// ws.Cell(row, 41).Value = detail2.compensation_monthly_4;
// ws.Cell(row, 42).Value = detail2.compensation_monthly_4_12;
// ws.Cell(row, 43).Value = detail2.house_rent;
// ws.Cell(row, 44).Value = detail2.compensation_paid;
// ws.Cell(row, 45).Value = detail2.compensation_paid_12;
// ws.Cell(row, 46).Value = detail2.special_compensation_with_full_salary;
// ws.Cell(row, 47).Value = detail2.special_compensation;
// ws.Cell(row, 48).Value = detail2.special_compensation_12;
// ws.Cell(row, 49).Value = detail2.compensation_1;
// ws.Cell(row, 50).Value = detail2.compensation_2;
// ws.Cell(row, 51).Value = detail2.compensation_3;
// ws.Cell(row, 52).Value = detail2.compensation_4;
// ws.Cell(row, 53).Value = detail2.compensation_5;
// ws.Cell(row, 54).Value = detail2.compensation_6;
// ws.Cell(row, 55).Value = detail2.other;
// ws.Cell(row, 56).Value = detail2.other_price;
// ws.Cell(row, 57).Value = detail2.total_2;
// ws.Cell(row, 58).Value = detail2.total_including_salary_and_fittings;
// ws.Cell(row, 59).Value = detail2.total_including_salary_and_fittings_12;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.OutsideBorder =
// XLBorderStyleValues.Thin;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.LeftBorder =
// XLBorderStyleValues.Thin;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.RightBorder =
// XLBorderStyleValues.Thin;
//
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontName =
// "TH SarabunPSK";
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontSize = 16;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.WrapText = true;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Alignment.Vertical =
// XLAlignmentVerticalValues.Center;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
if (detail2.first_name_th != "รวมมีคนครองกับอัตราว่าง")
{
ws.Cell(row, 1).Value = no;
no++;
ws.Cell(row, 2).Value = detail2.manpower;
ws.Cell(row, 3).Value = detail2.first_name_th;
ws.Cell(row, 4).Value = detail2.last_name_th;
ws.Cell(row, 5).Value = detail2.parent_agency_name;
ws.Cell(row, 6).Value = detail2.area;
ws.Cell(row, 7).Value = detail2.position;
ws.Cell(row, 8).Value = detail2.position_level;
if (detail2.is_academic_line == true)
{
ws.Cell(row, 9).Value = "/";
}
if (detail2.is_academic_line == false)
{
ws.Cell(row, 9).Value = "";
}
if (detail2.is_support_line == true)
{
ws.Cell(row, 10).Value = "/";
}
if (detail2.is_support_line == false)
{
ws.Cell(row, 10).Value = "";
}
ws.Cell(row, 11).Value = detail2.management_position_name;
ws.Cell(row, 12).Value = detail2.position_name;
ws.Cell(row, 13).Value = detail2.assign_no_plus_assign_effective_date;
ws.Cell(row, 14).Value = detail2.education_level;
ws.Cell(row, 15).Value = detail2.education_of_manpower;
ws.Cell(row, 16).Value = detail2.salary;
ws.Cell(row, 17).Value = detail2.wages1;
ws.Cell(row, 18).Value = detail2.wages2;
ws.Cell(row, 19).Value = detail2.wages3;
ws.Cell(row, 20).Value = detail2.wages4;
ws.Cell(row, 21).Value = detail2.wages5;
ws.Cell(row, 22).Value = detail2.total_wages;
ws.Cell(row, 23).Value = detail2.promote;
ws.Cell(row, 24).Value = detail2.total_salary;
ws.Cell(row, 25).Value = detail2.welfare_benefit1;
ws.Cell(row, 26).Value = detail2.welfare_benefit2;
ws.Cell(row, 27).Value = detail2.welfare_benefit3;
ws.Cell(row, 28).Value = detail2.welfare_benefit4;
ws.Cell(row, 29).Value = detail2.welfare_benefit5;
ws.Cell(row, 30).Value = detail2.total_welfare_benefit;
ws.Cell(row, 31).Value = detail2.total_salary_welfare_benefit;
ws.Cell(row, 32).Value = detail2.birth_date;
ws.Cell(row, 33).Value = detail2.retiree;
ws.Cell(row, 34).Value = detail2.salary_per_month;
ws.Cell(row, 35).Value = detail2.position_money;
ws.Cell(row, 36).Value = detail2.monthly_remuneration;
ws.Cell(row, 37).Value = detail2.position_money_2;
ws.Cell(row, 38).Value = detail2.monthly_remuneration_2;
ws.Cell(row, 39).Value = detail2.compensation;
ws.Cell(row, 40).Value = detail2.other;
ws.Cell(row, 41).Value = detail2.other_price;
ws.Cell(row, 42).Value = detail2.total;
ws.Cell(row, 43).Value = detail2.position_money_3;
ws.Cell(row, 44).Value = detail2.monthly_remuneration_3;
ws.Cell(row, 45).Value = detail2.position_money_4;
ws.Cell(row, 46).Value = detail2.monthly_remuneration_4;
ws.Cell(row, 47).Value = detail2.total2;
ws.Cell(row, 48).Value = detail2.total_wage;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.TopBorder =
// XLBorderStyleValues.Double;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 16)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 17), ws.Cell(row, 48)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 17), ws.Cell(row, 31)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 33), ws.Cell(row, 39)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 41), ws.Cell(row, 48)).Style.NumberFormat.SetFormat("#,#");
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Alignment.Horizontal =
// XLAlignmentHorizontalValues.Center;
// ws.Range(ws.Cell(row, 3), ws.Cell(row, 8)).Style.Alignment.Horizontal =
// XLAlignmentHorizontalValues.Left;
@@ -4033,76 +4049,64 @@ namespace rmutr_report.Controllers
// ws.Cell(row, 48).Style.Fill.BackgroundColor = XLColor.LightGreen;
// ws.Cell(row, 59).Style.Fill.BackgroundColor = XLColor.LightGreen;
//
// row++;
// }
row++;
}
// if (detail2.first_name_th == "รวม")
// {
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Merge().Value = detail2.first_name_th;
// ws.Cell(row, 16).Value = detail2.salary;
// ws.Cell(row, 17).Value = detail2.estimated_salary_3_percent_1;
// ws.Cell(row, 18).Value = detail2.estimated_salary_3_percent_2;
// ws.Cell(row, 19).Value = detail2.estimated_salary_3_percent_3;
// ws.Cell(row, 20).Value = detail2.estimated_salary_3_percent_4;
// ws.Cell(row, 21).Value = detail2.estimated_salary_3_percent_sum;
// ws.Cell(row, 22).Value = detail2.retiree;
// ws.Cell(row, 23).Value = detail2.salary_per_month;
// ws.Cell(row, 24).Value = detail2.salary_per_month_12;
// ws.Cell(row, 25).Value = detail2.salary_minus_retirement_year;
// ws.Cell(row, 26).Value = detail2.position_money;
// ws.Cell(row, 27).Value = detail2.position_money_12;
// ws.Cell(row, 28).Value = detail2.compensation_monthly;
// ws.Cell(row, 29).Value = detail2.compensation_monthly_12;
// ws.Cell(row, 30).Value = detail2.position_money_2;
// ws.Cell(row, 31).Value = detail2.position_money_2_12;
// ws.Cell(row, 32).Value = detail2.compensation_monthly_2;
// ws.Cell(row, 33).Value = detail2.compensation_monthly_2_12;
// ws.Cell(row, 34).Value = detail2.total;
// ws.Cell(row, 35).Value = detail2.position_money_3;
// ws.Cell(row, 36).Value = detail2.position_money_3_12;
// ws.Cell(row, 37).Value = detail2.compensation_monthly_3;
// ws.Cell(row, 38).Value = detail2.compensation_monthly_3_12;
// ws.Cell(row, 39).Value = detail2.position_money_4;
// ws.Cell(row, 40).Value = detail2.position_money_4_12;
// ws.Cell(row, 41).Value = detail2.compensation_monthly_4;
// ws.Cell(row, 42).Value = detail2.compensation_monthly_4_12;
// ws.Cell(row, 43).Value = detail2.house_rent;
// ws.Cell(row, 44).Value = detail2.compensation_paid;
// ws.Cell(row, 45).Value = detail2.compensation_paid_12;
// ws.Cell(row, 46).Value = detail2.special_compensation_with_full_salary;
// ws.Cell(row, 47).Value = detail2.special_compensation;
// ws.Cell(row, 48).Value = detail2.special_compensation_12;
// ws.Cell(row, 49).Value = detail2.compensation_1;
// ws.Cell(row, 50).Value = detail2.compensation_2;
// ws.Cell(row, 51).Value = detail2.compensation_3;
// ws.Cell(row, 52).Value = detail2.compensation_4;
// ws.Cell(row, 53).Value = detail2.compensation_5;
// ws.Cell(row, 54).Value = detail2.compensation_6;
// ws.Cell(row, 55).Value = detail2.other;
// ws.Cell(row, 56).Value = detail2.other_price;
// ws.Cell(row, 57).Value = detail2.total_2;
// ws.Cell(row, 58).Value = detail2.total_including_salary_and_fittings;
// ws.Cell(row, 59).Value = detail2.total_including_salary_and_fittings_12;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.OutsideBorder =
// XLBorderStyleValues.Thin;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.LeftBorder =
// XLBorderStyleValues.Thin;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.RightBorder =
// XLBorderStyleValues.Thin;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Border.TopBorder =
// XLBorderStyleValues.Double;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.FontName =
// "TH SarabunPSK";
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).Style.Font.SetBold().Font.FontSize = 16;
// ws.Range(ws.Cell(row, 1), ws.Cell(row, 59)).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.Alignment.Horizontal =
// XLAlignmentHorizontalValues.Center;
// ws.Range(ws.Cell(row, 16), ws.Cell(row, 59)).Style.Alignment.Horizontal =
// XLAlignmentHorizontalValues.Right;
// ws.Range(ws.Cell(row, 16), ws.Cell(row, 59)).Style.NumberFormat.SetFormat("#,#");
// }
if (detail2.first_name_th == "รวมมีคนครองกับอัตราว่าง")
{
ws.Range(ws.Cell(row, 1), ws.Cell(row, 4)).Merge().Value = detail2.first_name_th;
ws.Cell(row, 17).Value = detail2.wages1;
ws.Cell(row, 18).Value = detail2.wages2;
ws.Cell(row, 19).Value = detail2.wages3;
ws.Cell(row, 20).Value = detail2.wages4;
ws.Cell(row, 21).Value = detail2.wages5;
ws.Cell(row, 22).Value = detail2.total_wages;
ws.Cell(row, 23).Value = detail2.promote;
ws.Cell(row, 24).Value = detail2.total_salary;
ws.Cell(row, 25).Value = detail2.welfare_benefit1;
ws.Cell(row, 26).Value = detail2.welfare_benefit2;
ws.Cell(row, 27).Value = detail2.welfare_benefit3;
ws.Cell(row, 28).Value = detail2.welfare_benefit4;
ws.Cell(row, 29).Value = detail2.welfare_benefit5;
ws.Cell(row, 30).Value = detail2.total_welfare_benefit;
ws.Cell(row, 31).Value = detail2.total_salary_welfare_benefit;
ws.Cell(row, 32).Value = detail2.birth_date;
ws.Cell(row, 33).Value = detail2.retiree;
ws.Cell(row, 34).Value = detail2.salary_per_month;
ws.Cell(row, 35).Value = detail2.position_money;
ws.Cell(row, 36).Value = detail2.monthly_remuneration;
ws.Cell(row, 37).Value = detail2.position_money_2;
ws.Cell(row, 38).Value = detail2.monthly_remuneration_2;
ws.Cell(row, 39).Value = detail2.compensation;
ws.Cell(row, 40).Value = detail2.other;
ws.Cell(row, 41).Value = detail2.other_price;
ws.Cell(row, 42).Value = detail2.total;
ws.Cell(row, 43).Value = detail2.position_money_3;
ws.Cell(row, 44).Value = detail2.monthly_remuneration_3;
ws.Cell(row, 45).Value = detail2.position_money_4;
ws.Cell(row, 46).Value = detail2.monthly_remuneration_4;
ws.Cell(row, 47).Value = detail2.total2;
ws.Cell(row, 48).Value = detail2.total_wage;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.OutsideBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.LeftBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.RightBorder =
XLBorderStyleValues.Thin;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Border.TopBorder =
XLBorderStyleValues.Double;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.FontName =
"TH SarabunPSK";
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Font.SetBold().Font.FontSize = 16;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 48)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 16)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Center;
ws.Range(ws.Cell(row, 17), ws.Cell(row, 48)).Style.Alignment.Horizontal =
XLAlignmentHorizontalValues.Right;
ws.Range(ws.Cell(row, 17), ws.Cell(row, 31)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 33), ws.Cell(row, 39)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 41), ws.Cell(row, 48)).Style.NumberFormat.SetFormat("#,#");
}
}
// if (detail.is_footer == true)

View File

@@ -131,7 +131,7 @@ namespace rmutr_report.Models.Personnel
public class t_personnel_salary_university_deltail
{
[Key]
[Key]
public Guid? personnel_salary_university_deltail_uid { get; set; }
public Guid? personnel_salary_university_uid { get; set; }
@@ -143,6 +143,7 @@ namespace rmutr_report.Models.Personnel
public string parent_agency_name { get; set; }
public string area { get; set; }
public string position { get; set; }
public string position_level { get; set; }
public int? salary { get; set; }
public bool? is_academic_line { get; set; }
public bool? is_support_line { get; set; }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.