package com.ruoyi.postCheck.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 岗检计划对象 post_plan
 *
 * @author csg
 * @date 2023-12-19
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "岗检计划对象")
@TableName("post_plan") // 数据库表名
public class PostPlan extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("名称")
    @TableField(value = "name")
    @Excel(name = "名称")
    private String name;

    @ApiModelProperty("内容")
    @TableField(value = "content")
    @Excel(name = "内容")
    private String content;

    @ApiModelProperty("开始时间")
    @TableField(value = "start_time")
    @Excel(name = "开始时间")
    private String startTime;

    @ApiModelProperty("结束时间")
    @TableField(value = "end_time")
    @Excel(name = "结束时间")
    private String endTime;

    @ApiModelProperty("状态：1-待审核；2-审核中；3-通过；4-驳回；")
    @TableField(value = "status")
    @Excel(name = "状态：1-待审核；2-审核中；3-通过；4-驳回；")
    private Integer status;

    @ApiModelProperty("审核人ID")
    @TableField(value = "status_user_id")
    @Excel(name = "审核人ID")
    private Long statusUserId;

    @ApiModelProperty("审核时间")
    @TableField(value = "status_time")
    @Excel(name = "审核时间")
    private Date statusTime;

    @ApiModelProperty("人力资源审批-状态：1-待审核；3-通过；4-驳回；")
    @TableField(value = "status_hr")
    @Excel(name = "人力资源审批-状态：1-待审核；3-通过；4-驳回；")
    private Integer statusHr;

    @ApiModelProperty("人力资源审批人ID")
    @TableField(value = "status_hr_user_id")
    @Excel(name = "人力资源审批人ID")
    private Long statusHrUserId;

    @ApiModelProperty("人力资源审批-通过日期")
    @TableField(value = "date_hr")
    @Excel(name = "人力资源审批-通过日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dateHr;

    @ApiModelProperty("人力资源审批-未通过理由")
    @TableField(value = "reason_hr")
    @Excel(name = "人力资源审批-未通过理由")
    private String reasonHr;

    @ApiModelProperty("内控法务部审批-状态：1-待审核；3-通过；4-驳回；")
    @TableField(value = "status_icfa")
    @Excel(name = "内控法务部审批-状态：1-待审核；3-通过；4-驳回；")
    private Integer statusIcfa;

    @ApiModelProperty("内控法务部审批人ID")
    @TableField(value = "status_icfa_user_id")
    @Excel(name = "内控法务部审批人ID")
    private Long statusIcfaUserId;

    @ApiModelProperty("内控法务部审批-通过日期")
    @TableField(value = "date_icfa")
    @Excel(name = "内控法务部审批-通过日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dateIcfa;

    @ApiModelProperty("内控法务部审批-未通过理由")
    @TableField(value = "reason_icfa")
    @Excel(name = "内控法务部审批-未通过理由")
    private String reasonIcfa;

    @ApiModelProperty("create_user_id")
    @TableField(value = "create_user_id")
    @Excel(name = "create_user_id")
    private Long createUserId;

    @ApiModelProperty("检查工作组ID")
    @TableField(value = "check_group_id")
    @Excel(name = "检查工作组ID")
    private Long checkGroupId;

    @ApiModelProperty("检查小组")
    @TableField(value = "check_team_id")
    @Excel(name = "检查小组")
    private Long checkTeamId;


    /**
     * 岗检计划明细信息
     */
    @ApiModelProperty("检查人员数组")
    @TableField(exist = false)
    private List<PostPlanCheckUser> checkUserChildren = new ArrayList<>();

    /**
     * 岗检计划明细信息
     */
    @ApiModelProperty("检查小组数组")
    @TableField(exist = false)
    private List<PostPlanInfo> children = new ArrayList<>();


//    =======================页面显示值===============

    @ApiModelProperty("检查工作组名称")
    @TableField(exist = false)
    private String checkGroupName;

    @ApiModelProperty("检查小组名称")
    @TableField(exist = false)
    private String checkTeamName;

    @ApiModelProperty("检查人员中文名称逗号拼接")
    @TableField(exist = false)
    private String checkedUserNames;

    @ApiModelProperty("被检查部门名称")
    @TableField(exist = false)
    private String checkedDeptNames;

    @ApiModelProperty("被检查岗位名称（多个拼接）")
    @TableField(exist = false)
    private String checkedPostNames;
//    =======================页面显示值===============

    @ApiModelProperty("步骤：0-初始状态；1-内控法务部；2-人力资源审核后；3-方案入档")
    @TableField(value = "step")
    private Integer step;

}
