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

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

/**
 * @author:dxfeng
 * @createTime: 2022/06/21
 * @version: 1.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@OrganizationTable(pageId = "c0583f20-f10c-11ec-9947-00e04c680716",
        fields = "t.id," +
                "t.lastname," +
                "t.departmentid," +
                "t.subcompanyid1," +
                "t.jobtitle," +
                "t.mobile," +
                "t.telephone," +
                "t.managerid, " +
                "t.dsporder ",
        fromSql = "FROM hrmresource t left join cus_fielddata t0 on t.id = t0.id and t0.scopeid ='-1' left join cus_fielddata t1 on t.id = t1.id and t1.scopeid ='1' left join cus_fielddata t2 on t.id = t2.id and t2.scopeid ='3' ",
        orderby = " t.dsporder ",
        sortway = " asc",
        primarykey = "id",
        operates = {
                @OrganizationTableOperate(text = "查看"),
                @OrganizationTableOperate(index = "1", text = "另存为版本")
        },
        tableType = WeaTableType.CHECKBOX
)
public class HrmResourceVO {
    /**
     * 主键
     */
    @OrganizationTableColumn(column = "id", display = false)
    private Long id;

    /**
     * 姓名
     */
    @OrganizationTableColumn(text = "姓名", width = "25%", column = "lastname")
    private String lastName;
    /**
     * 部门
     */
    @OrganizationTableColumn(text = "部门", width = "25%", column = "departmentid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getDepartmentName")
    private String departmentName;

    /**
     * 分部
     */
    @OrganizationTableColumn(text = "分部", width = "25%", column = "subcompanyid1", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getCompanyName")
    private String companyName;

    @OrganizationTableColumn(text = "岗位", width = "25%", column = "jobtitle", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getJobName")
    private String jobName;

    /**
     * 移动电话
     */
    @OrganizationTableColumn(text = "移动电话", width = "25%", column = "mobile")
    private String mobile;
    /**
     * 办公室电话
     */
    @OrganizationTableColumn(text = "办公室电话", width = "25%", column = "telephone")
    private String telephone;
    /**
     * 直接上级
     */
    @OrganizationTableColumn(text = "直接上级", width = "25%", column = "managerid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getManagerName")
    private String managerName;

    @OrganizationTableColumn(text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
    private Integer showOrder;
}
