ส่ง code แก้ไข OP Change Request 18 ข้อ
This commit is contained in:
@@ -72,7 +72,18 @@ CONCAT(he.firstname,he.lastname) as halfname,
|
||||
orgdata.id as department_id,orgdata.department_name,orgdata.department_code,he.salary,
|
||||
he.employee_type_id, het.employee_type_name,opd.position_id as position_id,
|
||||
u.email as user_email, u.id as user_id,hpl.position_level_name,he.position_level_id,
|
||||
he.position_type_id,hpt.position_type_name,he.packing_date
|
||||
he.position_type_id,hpt.position_type_name,he.packing_date,
|
||||
|
||||
(CASE WHEN (SELECT hrm_work_rec.id FROM hrm_working_records as hrm_work_rec
|
||||
WHERE hrm_work_rec.employee_id = he.employee_id
|
||||
AND hrm_work_rec.start_date <= now()
|
||||
AND hrm_work_rec.end_date >= now()
|
||||
AND hrm_work_rec.deleted_at IS null
|
||||
LIMIT 1) IS NOT null THEN 'ช่วยปฎิบัติหน้าที่'
|
||||
ELSE null END) as remark_hrm_work_record,
|
||||
|
||||
org_type_depart.department_degree_id
|
||||
|
||||
from public.hrm_employees as he
|
||||
left join public.hrm_position_types as hpt on he.position_type_id=hpt.id
|
||||
left join public.hrm_position_levels as hpl on he.position_level_id = hpl.id
|
||||
@@ -82,9 +93,21 @@ left join public.hrm_title_masters as htm on htm.id = he.prefix_card_name
|
||||
left join public.{0}DepartmentData{0} as orgdata on orgdata.id = he.department_id
|
||||
left join public.hrm_employee_types as het on het.id = he.employee_type_id
|
||||
left join public.users as u on u.employee_id = he.employee_id
|
||||
where he.workingstatus = 'สถานะปฏิบัติงาน' and he.deleted_at is null and mpn.deleted_at is null
|
||||
and opd.deleted_at is null --and htm.deleted_at is null
|
||||
order by he.firstname,he.lastname;
|
||||
left join public.org_type_departments as org_type_depart on orgdata.department_type_id = org_type_depart.id
|
||||
left join public.org_type_department_colors as org_depart_color on org_type_depart.department_degree_id = org_depart_color.id
|
||||
where he.deleted_at is null
|
||||
and hpt.deleted_at is null
|
||||
and hpl.deleted_at is null
|
||||
and mpn.deleted_at is null
|
||||
and opd.deleted_at is null
|
||||
and htm.deleted_at is null
|
||||
and orgdata.deleted_at is null
|
||||
and het.deleted_at is null
|
||||
and u.deleted_at is null
|
||||
and org_type_depart.deleted_at is null
|
||||
and org_depart_color.deleted_at is null
|
||||
and he.workingstatus = 'สถานะปฏิบัติงาน'
|
||||
order by he.firstname, he.lastname;
|
||||
", '"'.ToString());
|
||||
var para = db.GetParameterListNpgsql();
|
||||
DataTable dt = db.ExecuteDataTableNpgsql(sql, para);
|
||||
@@ -143,6 +166,14 @@ order by he.firstname,he.lastname;
|
||||
{
|
||||
i.packing_date = Convert.ToDateTime(dr["packing_date"]);
|
||||
}
|
||||
if (dr["department_degree_id"] != DBNull.Value)
|
||||
{
|
||||
i.department_degree_id = Convert.ToInt32(dr["department_degree_id"]);
|
||||
}
|
||||
if(dr["remark_hrm_work_record"] != DBNull.Value)
|
||||
{
|
||||
i.remark_hrm_work_record = dr["remark_hrm_work_record"].ToString();
|
||||
}
|
||||
|
||||
result.Add(i);
|
||||
}
|
||||
|
||||
@@ -28,37 +28,27 @@ namespace TodoAPI2.Models
|
||||
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 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 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 int? worked_month // ทำงานมาแล้วกี่เดือน
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user