package com.mortals.xhx.module.window.model;
import java.math.BigDecimal;
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.WindowPerformSummaryVo;
import lombok.Data;
/**
* 窗口绩效汇总登记实体对象
*
* @author zxfei
* @date 2025-03-10
*/
@Data
public class WindowPerformSummaryEntity extends WindowPerformSummaryVo {
    private static final long serialVersionUID = 1L;

    /**
    * 考核年度
    */
    @Excel(name = "考核年度")
    private Integer year;
    /**
    * 考核月份
    */
    @Excel(name = "考核月份")
    private Integer month;
    /**
    * 入驻部门id
    */
    private Long deptId;
    /**
    * 入驻部门名称
    */
    @Excel(name = "入驻部门(单位名称)")
    private String deptName;
    /**
    * 窗口建设得分
    */
    @Excel(name = "窗口建设得分")
    private BigDecimal ckjsdf;
    /**
    * 重点任务推进得分
    */
    @Excel(name = "重点任务推进得分")
    private BigDecimal zdrwdf;
    /**
    * 加分
    */
    @Excel(name = "加分")
    private BigDecimal addTotalScore;
    /**
    * 合计得分
    */
    @Excel(name = "合计得分")
    private BigDecimal sumScore;
    /**
    * 评选建议
    */
    @Excel(name = "评选建议", readConverterExp = "0=无,1=红旗窗口")
    private Integer suggestion;
    /**
    * 备注
    */
    @Excel(name = "备注")
    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 WindowPerformSummaryEntity) {
            WindowPerformSummaryEntity tmp = (WindowPerformSummaryEntity) 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.deptId = null;
            this.deptName = "";
            this.ckjsdf = BigDecimal.ZERO;
            this.zdrwdf = BigDecimal.ZERO;
            this.addTotalScore = BigDecimal.ZERO;
            this.sumScore = BigDecimal.ZERO;
            this.suggestion = 0;
            this.remark = "";
    }
}