package com.mortals.xhx.module.perform.model;
import java.math.BigDecimal;
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.PerformPerposeVo;
import lombok.Data;
/**
 * 考核目标实体对象
 *
 * @author zxfei
 * @date 2023-05-17
 */
@Data
public class PerformPerposeEntity extends PerformPerposeVo {
    private static final long serialVersionUID = 1L;

    /**
     * 负责人id号
     */
    private Long ownerId;
    /**
     * 负责人名称
     */
    private String ownerName;
    /**
     * 窗口工作人员id号
     */
    private Long staffId;
    /**
     * 请假类型(1.旷工率,2.缺卡率,3.迟到率,4.早退率,5.请假率,6.离岗率,7.睡觉率,8.玩手机率,9.办件超期率,10.差评率)
     */
    private Integer assessmentType;
    /**
     * 考核范围(1.部门,2.个人)
     */
    private Integer assessmentScope;
    /**
     * 考比较类型(1.不高于,2.等于,3.不低于)
     */
    private Integer compareScope;
    /**
     * 比例
     */
    private BigDecimal ratio;
    /**
     * 周期类型(1.全年,2.半年,3.季度4.月份)
     */
    private Integer periodType;
    /**
     * 年
     */
    private Integer year;
    /**
     * 月
     */
    private Integer month;
    /**
     * 半年类型(1.上半年,2.下半年)
     */
    private Integer halfYear;
    /**
     * 季度类型(1.第一季度,2.第二季度, 3.第三季度,4.第四季度)
     */
    private Integer quarter;
    /**
     * 负责人，多个逗号分割
     */
    private String leaders;
    /**
     * 负责人电话，多个逗号分割
     */
    private String leaderMobiles;
    /**
     * 备注
     */
    private String remark;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof PerformPerposeEntity) {
            PerformPerposeEntity tmp = (PerformPerposeEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

        this.ownerId = -1L;

        this.ownerName = "";

        this.staffId = -1L;

        this.assessmentType = -1;

        this.assessmentScope = 1;

        this.compareScope = 1;

        this.ratio = BigDecimal.valueOf(0.00);

        this.periodType = 1;

        this.year = -1;

        this.month = -1;

        this.halfYear = 1;

        this.quarter = 1;

        this.leaders = "";

        this.leaderMobiles = "";

        this.remark = "";
    }
}