95 lines
3.6 KiB
C#
95 lines
3.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using TTSW.EF;
|
|
using TTSW.Utils;
|
|
using TTSW.Constant;
|
|
using TTSW.Common;
|
|
|
|
namespace TodoAPI2.Models
|
|
{
|
|
public class dept_mappingViewModel
|
|
{
|
|
public int? id { get; set; }
|
|
public int? id2 { get; set; }
|
|
public string full_dep { get; set; }
|
|
public string department_name { get; set; }
|
|
public string department_code { get; set; }
|
|
public int? parent_department_id { get; set; }
|
|
public int? sort_order { get; set; }
|
|
public int? department_degree_id { get; set; }
|
|
}
|
|
|
|
public class employee_leaveViewModel
|
|
{
|
|
public decimal? sum_day_sick_leave { get; set; }
|
|
public decimal? count_sick_leave { get; set; }
|
|
public decimal? sum_day_personal_leave { get; set; }
|
|
public decimal? count_personal_leave { get; set; }
|
|
public decimal? sum_day_vacation_leave { get; set; }
|
|
public decimal? count_vacation_leave { get; set; }
|
|
public decimal? count_stop_working { get; set; }
|
|
public decimal? count_late_tad_processing_time_results { get; set; }
|
|
public decimal? count_absence_tad_processing_time_results { get; set; }
|
|
public decimal? sum_day_sick_personal_leave { get; set; }
|
|
public decimal? count_sick_personal_leave { get; set; }
|
|
}
|
|
public class external_employeeViewModel
|
|
{
|
|
public int id { get; set; }
|
|
public string position_number { get; set; }
|
|
public string position_name { get; set; }
|
|
public string fullname { get; set; }
|
|
public string halfname { get; set; }
|
|
public int? employee_type_id { get; set; }
|
|
public int? position_id { get; set; }
|
|
public int? position_type_id { get; set; }
|
|
public int? hpt_position_type_id { get; set; }
|
|
public string position_type_name { get; set; }
|
|
public string user_email { get; set; }
|
|
public int? user_id { get; set; }
|
|
public int? department_id { get; set; }
|
|
public string department_name { get; set; }
|
|
public string department_code { get; set; }
|
|
public decimal? salary { get; set; }
|
|
public string employee_type_name { get; set; }
|
|
public string employee_no { get; set; }
|
|
public int? position_level_id { get; set; }
|
|
public int? hpl_position_level_id { get; set; }
|
|
public string position_level_text { get; set; }
|
|
public DateTime? packing_date { get; set; }
|
|
public int? department_degree_id { get; set; }
|
|
public string remark_hrm_work_record { get; set; }
|
|
public decimal? cost_of_living { get; set; }
|
|
public decimal? position_allowance { get; set; }
|
|
public decimal? other_money { get; set; }
|
|
public string profile_picture { get; set; }
|
|
|
|
public string timerecorder_id { get; set; }
|
|
public int count_resigns { get; set; }
|
|
|
|
public int? worked_month // ทำงานมาแล้วกี่เดือน
|
|
{
|
|
get
|
|
{
|
|
if (packing_date.HasValue)
|
|
{
|
|
DateTime startDate = packing_date.Value;
|
|
DateTime endDate = DateTime.Now;
|
|
int monthsApart = 12 * (startDate.Year - endDate.Year) + startDate.Month - endDate.Month;
|
|
return Math.Abs(monthsApart);
|
|
}
|
|
else
|
|
{
|
|
return 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|