package com.engine.organization.entity.staff.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;

/**
 * @description:
 * @author:dxfeng
 * @createTime: 2022/05/25
 * @version: 1.0
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@OrganizationTable(pageId = "0cdfd5bb-dc09-11ec-b69e-00ffcbed7508",
        fields = "id,is_used,plan_id,comp_id,dept_id,job_id,staff_num,permanent_num,freeze_num,lack_status,staff_desc",
        fromSql = "FROM jcl_org_staff t ",
        orderby = "id desc",
        primarykey = "id",
        operates = {
                @OrganizationTableOperate(text = "编辑"),
                @OrganizationTableOperate(index = "1", text = "删除"),
                @OrganizationTableOperate(index = "2", text = "变更")
        }, tableType = WeaTableType.CHECKBOX,
        operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatStaffOperates", otherpara = "column:is_used"),
        checkboxPopedom = @CheckboxPopedom(showmethod = "com.engine.organization.util.ConfigTrans.getCheckBoxPopedom", popedompara = "column:is_used")

)
public class StaffTableVO {
    /**
     * 主键
     */
    @OrganizationTableColumn(column = "id", display = false)
    private Long id;
    /**
     * 是否被引用
     */
    @OrganizationTableColumn(column = "isUsed", display = false)
    private Integer isUsed;
    /**
     * 方案id
     */
    @OrganizationTableColumn(text = "方案", width = "10%", column = "plan_id", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getSpanById")
    private String planId;
    /**
     * 分部
     */
    @OrganizationTableColumn(text = "分部", width = "10%", column = "comp_id", transmethod = "com.engine.organization.transmethod.CompTransMethod.getSpanById")
    private String compId;
    /**
     * 部门
     */
    @OrganizationTableColumn(text = "部门", width = "10%", column = "dept_id", transmethod = "com.engine.organization.transmethod.DepartmentTransMethod.getSpanById")
    private String deptId;
    /**
     * 岗位
     */
    @OrganizationTableColumn(text = "岗位", width = "10%", column = "job_id", transmethod = "com.engine.organization.transmethod.JobTransMethod.getSpanById")
    private String jobId;
    /**
     * 编制数
     */
    @OrganizationTableColumn(text = "编制数", width = "10%", column = "staff_num")
    private Integer staffNum;
    /**
     * 在编
     */
    @OrganizationTableColumn(text = "在编", width = "10%", column = "permanent_num")
    private Integer permanentNum;
    /**
     * 冻结数
     */
    @OrganizationTableColumn(text = "冻结数", width = "10%", column = "freeze_num")
    private Integer freezeNum;
    /**
     * 缺编状态
     */
    @OrganizationTableColumn(text = "缺编状态", width = "10%", column = "lack_status", transmethod = "com.engine.organization.transmethod.StaffTransMethod.getLackSpan")
    private String lackStatus;
    /**
     * 编制描述
     */
    @OrganizationTableColumn(text = "编制描述", width = "10%", column = "staff_desc")
    private String staffDesc;

}
