package com.ruoyi.postCheck.domain.excel.problem;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * 岗检问题表导入导出
 */
@EqualsAndHashCode
@Data
@ApiModel(value = "导出问题")
public class ProblemExportBean implements Serializable {


    private static final long serialVersionUID = 6506329872841019561L;
    @ApiModelProperty("序号")
    @Excel(name = "序号", width = 6)
    private Integer no;

    @ApiModelProperty("问题ID")
    @TableField(value = "id")
    private Long id;

    @ApiModelProperty("问题编号")
    @TableField(value = "problem_no")
    @Excel(name = "问题编号", width = 20)
    private String problemNo;

//    @ApiModelProperty("非Excel列：检查工作组ID")
//    @TableField(value = "check_workgroup_id")
//    private Long checkWorkgroupId;

    @ApiModelProperty("岗检工作组")
    @TableField(exist = false)
    @Excel(name = "岗检工作组")
    private String checkWorkgroupName;

//    @ApiModelProperty("非Excel列：检查小组ID")
//    @TableField(value = "check_group_id")
//    private Long checkGroupId;

    @ApiModelProperty("岗检小组")
    @TableField(exist = false)
    @Excel(name = "岗检小组")
    private String checkGroupName;

    @ApiModelProperty("检查人员")
    @TableField(value = "check_user_name")
    @Excel(name = "检查人员", width = 10)
    private String checkUserName;

    @ApiModelProperty("检查时间")
    @TableField(value = "check_time")
    @Excel(name = "检查时间", width = 10, dateFormat = "yyyy/M/d")
    @JsonFormat(pattern = "yyyy/M/d")
    private Date checkTime;

    @ApiModelProperty("受检部门")
    @TableField(value = "checked_dept_name")
    @Excel(name = "受检部门")
    private String checkedDeptName;

//    @ApiModelProperty("非Excel列：受检部门ID")
//    @TableField(value = "checked_dept_id")
//    private Long checkedDeptId;
    //    @ApiModelProperty("非Excel列：Version-部门类型：1-职能；2-生产")
//    @TableField(value = "checked_dept_type")
//    private Integer checkedDeptType;

    @ApiModelProperty("受检岗位")
    @TableField(value = "checked_post_name")
    @Excel(name = "受检岗位")
    private String checkedPostName;

//    @ApiModelProperty("非Excel列：受检岗位ID")
//    @TableField(value = "checked_post_id")
//    private Long checkedPostId;

    @ApiModelProperty("问题级别")
    @TableField(value = "problem_level")
    @Excel(name = "问题级别", width = 13, readConverterExp = "1=一般,2=重要")
    private Integer problemLevel;

    @ApiModelProperty("职责类别")
    @TableField(value = "duty_type")
    @Excel(name = "职责类别", width = 13, readConverterExp = "1=业务职责,2=党建及党风廉政建设职责,3=安全环保职责,4=合规与保密职责,5=任职资格与能力素质要求,6=岗位责任制文件完整性与适宜性")
    private Integer dutyType;

    @ApiModelProperty("问题属性")
    @TableField(value = "problem_attribute")
    @Excel(name = "问题属性", width = 13, readConverterExp = "1=完整性,2=有效性,3=适宜性")
    private Integer problemAttribute;

    @ApiModelProperty("问题类别")
    @TableField(value = "problem_category")
    @Excel(name = "问题类别", width = 13, readConverterExp = "1=职责权限问题,2=工作内容问题,3=工作标准问题,4=考核奖励问题,5=任职资格问题,6=其他")
    private Integer problemCategory;

    @ApiModelProperty("问题描述")
    @TableField(value = "description")
    @Excel(name = "问题描述")
    private String description;

    @ApiModelProperty("整改责任人")
    @TableField(value = "rectification_responsible_name")
    @Excel(name = "整改责任人", width = 10)
    private String rectificationResponsibleName;

    //    ===================================以上是导出的问题内容===========================================
//    ===================================以下是整改责任人填写的的内容===========================================
//    ===================================方案填写===========================================
    @ApiModelProperty("问题原因")
    @TableField(value = "problem_cause")
    @Excel(name = "问题原因")
    private String problemCause;

    @ApiModelProperty("是否立行立改问题")
    @TableField(value = "is_immediately_corrected")
    @Excel(name = "是否立行立改问题", readConverterExp = "1=是,2=否")
    private Integer isImmediatelyCorrected;

    @ApiModelProperty("整改措施/建议")
    @TableField(value = "rectification_measure")
    @Excel(name = "整改措施/建议")
    private String rectificationMeasure;

    @ApiModelProperty("整改期限")
    @TableField(value = "rectification_period")
    @Excel(name = "整改期限", width = 10, dateFormat = "yyyy/M/d")
    @JsonFormat(pattern = "yyyy/M/d")
    private Date rectificationPeriod;

    @ApiModelProperty("专业审核部门")
    @TableField(exist = false)
    @Excel(name = "专业审核部门")
    private String specialityDepartment;

    @ApiModelProperty("专业审核人")
    @TableField(value = "speciality_department_reviewer_name")
    @Excel(name = "专业审核人", width = 10)
    private String specialityDepartmentReviewerName;

    @ApiModelProperty("专业审核人ID")
    @TableField(value = "speciality_department_reviewer_id")
    private Long specialityDepartmentReviewerId;


    //    ===================================实施填写===========================================
    @ApiModelProperty("整改情况")
    @TableField(value = "is_rectification_completed")
    @Excel(name = "整改情况", width = 10, readConverterExp = "1=是,2=否")
    private Integer isRectificationCompleted;

    @ApiModelProperty("整改完成时间")
    @TableField(value = "rectification_completion_time")
    @Excel(name = "整改完成时间", width = 16, dateFormat = "yyyy/M/d")
    @JsonFormat(pattern = "yyyy/M/d")
    private Date rectificationCompletionTime;

    @ApiModelProperty("复查部门")
    @TableField(exist = false)
    @Excel(name = "复查部门")
    private String reviewDepartment;

    @ApiModelProperty("复查人")
    @TableField(value = "review_department_reviewer_name")
    @Excel(name = "复查人", width = 10)
    private String reviewDepartmentReviewerName;

    @ApiModelProperty("复查人ID")
    @TableField(value = "review_department_reviewer_id")
    private Long reviewDepartmentReviewerId;

    /**
     * true：仅为方案导入
     * false：方案 + 实施 导入
     */
    private boolean programmeFlag = false;
//    @ApiModelProperty("复查结论")
//    @TableField(value = "review_conclusion")
//    @Excel(name = "复查结论")
//    private String reviewConclusion;

//    @ApiModelProperty("未通过理由")
//    @TableField(value = "reason")
//    @Excel(name = "未通过理由")
//    private String reason;

    //    ==================显示字段==============
//    @ApiModelProperty("部门经理审核人姓名")
//    @TableField(value = "dept_approve_user_name")
//    private String deptApproveUserName;

//    @ApiModelProperty("整改记录")
//    @TableField(exist = false)
//    private String postCheckedProblemRecord;
}
