package com.mortals.xhx.module.perform.model;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.perform.model.vo.PerformOtherRecordVo;
import lombok.Data;
/**
* 其它绩效记录信息实体对象
*
* @author zxfei
* @date 2023-07-11
*/
@Data
public class PerformOtherRecordEntity extends PerformOtherRecordVo {
    private static final long serialVersionUID = 1L;

    /**
    * 员工ID
    */
    private Long staffId;
    /**
    * 员工姓名
    */
    private String staffName;
    /**
    * 工号
    */
    private String workNum;
    /**
    * 窗口编号
    */
    private String windowNum;
    /**
    * 所属部门
    */
    private Long deptId;
    /**
    * 所属部门名称
    */
    private String deptName;
    /**
    * 违规类型(1.工作纪律)
    */
    private Integer irregularOtherType;
    /**
    * 发生时间
    */
    private Date happenTime;
    /**
    * 持续时间，秒
    */
    private Integer duration;
    /**
    * 绩效规则id
    */
    private Long ruleId;
    /**
    * 规则名称
    */
    private String ruleName;
    /**
    * 评分标准
    */
    private String ruleDesc;
    /**
    * 扣分方式(1.系统自动,2.人工添加)
    */
    private Integer subMethod;
    /**
    * 扣分人员
    */
    private String deductPerson;
    /**
    * 扣分时间
    */
    private Date deductTime;
    /**
    * 扣分或增加分值
    */
    private BigDecimal score;
    /**
    * 处理状态(1.未核查,2.已核查)
    */
    private Integer processStatus;
    /**
    * 备注
    */
    private String remark;
    /**
    * 附件名称，多个逗号分割
    */
    @Excel(name = "附件名称，多个逗号分割")
    private String fileNames;
    /**
    * 附件下载地址，多个逗号分割
    */
    @Excel(name = "附件下载地址，多个逗号分割")
    private String filePaths;
    /**
    * 绩效规则分类id
    */
    private Long categoryId;
    /**
    * 规则名称
    */
    private String categoryName;
    /**
    * 增减类型(1.增加,2.扣除)
    */
    private Integer subAddType;
    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof PerformOtherRecordEntity) {
            PerformOtherRecordEntity tmp = (PerformOtherRecordEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

            this.staffId = 0L;

            this.staffName = "";

            this.workNum = "";

            this.windowNum = "";

            this.deptId =0L;

            this.deptName = "";

            this.irregularOtherType = 1;

            this.happenTime = null;

            this.duration = 0;

            this.ruleId = null;

            this.ruleName = "";

            this.ruleDesc = "";

            this.subMethod = 1;

            this.deductPerson = "";

            this.deductTime = null;

            this.score = BigDecimal.valueOf(0.00);

            this.processStatus = 1;

            this.remark = "";

            this.fileNames = "";

            this.filePaths = "";

            this.categoryId = null;

            this.categoryName = "";

            this.subAddType = 1;
    }
}