package com.mortals.xhx.module.window.model;
import java.math.BigDecimal;
import java.util.List;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.window.model.vo.WindowPerformVo;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailEntity;
import lombok.Data;
/**
 * 窗口考核登记实体对象
 *
 * @author zxfei
 * @date 2024-01-27
 */
@Data
public class WindowPerformEntity extends WindowPerformVo {
    private static final long serialVersionUID = 1L;

    /**
     * 考核年度
     */
    private Integer year;
    /**
     * 考核月份
     */
    private Integer month;
    /**
     * 窗口ID
     */
    private Long windowId;
    /**
     * 窗口名称
     */
    private String windowName;
    /**
     * 窗口负责人id
     */
    private Long ownerId;
    /**
     * 窗口负责人名称
     */
    private String ownerName;
    /**
     * 所属部门id
     */
    private Long deptId;
    /**
     * 所属部门名称
     */
    private String deptName;
    /**
     * 所属大厅
     */
    private Long salaId;
    /**
     * 所属大厅名称
     */
    private String salaName;
    /**
     * 工作总结
     */
    private String workSummary;
    /**
     * 加分申报
     */
    private String bonusReport;
    /**
     * 加分佐证附件名称
     */
    private String proof;
    /**
     * 加分佐证附件地址
     */
    private String proofUrl;
    /**
     * 扣分情况
     */
    private String deductStatement;
    /**
     * 扣分分值
     */
    private BigDecimal deductScore;
    /**
     * 工作纪律自评得分
     */
    private BigDecimal discipline;
    /**
     * 服务规范自评得分
     */
    private BigDecimal specification;
    /**
     * 加分
     */
    private BigDecimal bonusScore;
    /**
     * 合计得分
     */
    private BigDecimal sumScore;
    /**
     * 自评等级1红旗窗口2黑旗窗口
     */
    private Integer selfLevel;
    /**
     * 备注
     */
    private String remark;
    /**
     * 自评附件名称
     */
    private String annex;
    /**
     * 自评附件地址
     */
    private String annexUrl;
    /**
     * 填报时间
     */
    private Date fillDate;
    /**
     * 填报状态0暂存1提交
     */
    private Integer fillStatus;
    /**
     * 窗口编号
     */
    private String windowCode;
    /**
     * 窗口人员考核汇总明细信息
     */
    private List<WindowWorkmanPerformDetailEntity> windowWorkmanPerformDetailList=new ArrayList<>();;
    public List<WindowWorkmanPerformDetailEntity> getWindowWorkmanPerformDetailList(){
        return windowWorkmanPerformDetailList;
    }

    public void setWindowWorkmanPerformDetailList(List<WindowWorkmanPerformDetailEntity> windowWorkmanPerformDetailList){
        this.windowWorkmanPerformDetailList = windowWorkmanPerformDetailList;
    }
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof WindowPerformEntity) {
            WindowPerformEntity tmp = (WindowPerformEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.year = DateUtil.year(new Date());
        this.month = DateUtil.month(new Date())+1;
        this.windowId = null;
        this.windowName = "";
        this.ownerId = null;
        this.ownerName = "";
        this.deptId = null;
        this.deptName = "";
        this.salaId = null;
        this.salaName = "";
        this.workSummary = "";
        this.bonusReport = "";
        this.proof = "";
        this.proofUrl = "";
        this.deductStatement = "";
        this.deductScore = BigDecimal.ZERO;
        this.discipline = BigDecimal.ZERO;
        this.specification = BigDecimal.ZERO;
        this.bonusScore = BigDecimal.ZERO;
        this.sumScore = BigDecimal.ZERO;
        this.selfLevel = 0;
        this.remark = "";
        this.annex = "";
        this.annexUrl = "";
        this.fillDate = new Date();
        this.fillStatus = 0;
        this.windowCode = "";
    }
}