package com.engine.organization.entity.job.vo;

import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.OrganizationTable;
import com.engine.organization.annotation.OrganizationTableColumn;
import com.engine.organization.annotation.OrganizationTableOperate;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author:dxfeng
 * @createTime: 2022/07/15
 * @version: 1.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@OrganizationTable(pageId = "98e9c62f-cd12-11ec-a15f-00ffcbed7123",
        fields = "t.id, t.job_no,t.ec_company ,t.ec_department, h.jobtitlename as name, t.sequence_id, t.scheme_id , t.grade_id , t.level_id , e.jobactivityname, f.jobgroupname ",
        fromSql = "FROM jcl_org_job t" +
                " left join hrmjobtitles h on t.ec_jobTitle = h.id" +
                " left join hrmjobactivities e on h.jobactivityid =e.id" +
                " left join hrmjobgroups f on e.jobgroupid =f.id ",
        orderby = "id",
        sortway = "asc",
        primarykey = "id",
        operates = {
                @OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
                @OrganizationTableOperate(index = "1", labelId = 547135, text = "删除")
        },
        tableType = WeaTableType.CHECKBOX
)
public class JobBrowserVO {

    @OrganizationTableColumn(labelId = 547597, text = "标识", width = "25%", column = "id", display = false)
    private Long id;

    @OrganizationTableColumn(labelId = 547118, text = "编号", width = "25%", column = "job_no")
    private String jobNo;

    @OrganizationTableColumn(labelId = 547332, text = "分部", width = "25%", column = "ec_company", transmethod = "com.engine.organization.transmethod.CompTransMethod.getSpanById")
    private String subCompanyName;

    @OrganizationTableColumn(labelId = 547331, text = "部门", width = "25%", column = "ec_department", transmethod = "com.engine.organization.transmethod.DepartmentTransMethod.getSpanById")
    private String departmentName;

    @OrganizationTableColumn(labelId = 547595, text = "岗位名称", width = "25%", column = "name")
    private String jobName;

    @OrganizationTableColumn(labelId = 547433, text = "职务类别", width = "25%", column = "jobGroupName")
    private String jobGroupName;

    @OrganizationTableColumn(labelId = 547434, text = "所属职务", width = "25%", column = "jobActivityName")
    private String jobActivityName;

}
