package com.ruoyi.system.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.math.BigDecimal;

public class ReprotSummaryInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 单位ID */
    private Long deptId;

    /** 单位名称 */
    @Excel(name = "单位名称")
    private String deptName;

    /** 单位简称 */
    @Excel(name = "单位简称")
    private String deptShortName;

    @Excel(name = "报送代码")
    private String reportCode;

    @Excel(name = "报送年份")
    private String reportYear;

    @Excel(name = "报送月份")
    private String reportMonth;

    @Excel(name = "职级代码")
    private String postLevel;

    @Excel(name = "职级名称")
    private String postLevelName;

    @Excel(name = "职务代码")
    private String postTitle;

    @Excel(name = "职务名称")
    private String postTitleName;

    @Excel(name = "员工数量")
    private int num;

    @Excel(name = "总工资")
    private BigDecimal totalWages;

    @Excel(name = "总平均工资")
    private BigDecimal totalAverageWages;

    @Excel(name = "正式员工数量")
    private int permanentNum;

    @Excel(name = "正式员工平均工资")
    private BigDecimal permanentAverageWages;

    @Excel(name = "正式员工总工资")
    private BigDecimal permanentTotalWages;

    @Excel(name = "外部员工数量")
    private int temporaryNum;

    @Excel(name = "外部员工平均工资")
    private BigDecimal temporaryAverageWages;

    @Excel(name = "外部员工总工资")
    private BigDecimal temporaryTotalWages;

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptShortName() {
        return deptShortName;
    }

    public void setDeptShortName(String deptShortName) {
        this.deptShortName = deptShortName;
    }

    public String getReportCode() {
        return reportCode;
    }

    public void setReportCode(String reportCode) {
        this.reportCode = reportCode;
    }

    public String getReportYear() {
        return reportYear;
    }

    public void setReportYear(String reportYear) {
        this.reportYear = reportYear;
    }

    public String getReportMonth() {
        return reportMonth;
    }

    public void setReportMonth(String reportMonth) {
        this.reportMonth = reportMonth;
    }

    public String getPostLevel() {
        return postLevel;
    }

    public void setPostLevel(String postLevel) {
        this.postLevel = postLevel;
    }

    public String getPostLevelName() {
        return postLevelName;
    }

    public void setPostLevelName(String postLevelName) {
        this.postLevelName = postLevelName;
    }

    public String getPostTitle() {
        return postTitle;
    }

    public void setPostTitle(String postTitle) {
        this.postTitle = postTitle;
    }

    public String getPostTitleName() {
        return postTitleName;
    }

    public void setPostTitleName(String postTitleName) {
        this.postTitleName = postTitleName;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public BigDecimal getTotalWages() {
        return totalWages;
    }

    public void setTotalWages(BigDecimal totalWages) {
        this.totalWages = totalWages;
    }

    public BigDecimal getTotalAverageWages() {
        if(totalWages == null){
            return BigDecimal.ZERO;
        }else{
            if(this.num == 0){
                return BigDecimal.ZERO;
            }else{
                return totalWages.divide(new BigDecimal(this.num) , 2, BigDecimal.ROUND_HALF_EVEN) ;
            }
        }
    }

    public void setTotalAverageWages(BigDecimal totalAverageWages) {
        this.totalAverageWages = totalAverageWages;
    }

    public int getPermanentNum() {
        return permanentNum;
    }

    public void setPermanentNum(int permanentNum) {
        this.permanentNum = permanentNum;
    }

    public BigDecimal getPermanentAverageWages() {
        if(permanentTotalWages == null){
            return BigDecimal.ZERO;
        }else{
            if(this.permanentNum == 0){
                return BigDecimal.ZERO;
            }else{
                return permanentTotalWages.divide(new BigDecimal(this.permanentNum) , 2, BigDecimal.ROUND_HALF_EVEN) ;
            }
        }
    }

    public void setPermanentAverageWages(BigDecimal permanentAverageWages) {
        this.permanentAverageWages = permanentAverageWages;
    }

    public BigDecimal getPermanentTotalWages() {
        return permanentTotalWages;
    }

    public void setPermanentTotalWages(BigDecimal permanentTotalWages) {
        this.permanentTotalWages = permanentTotalWages;
    }

    public int getTemporaryNum() {
        return temporaryNum;
    }

    public void setTemporaryNum(int temporaryNum) {
        this.temporaryNum = temporaryNum;
    }

    public BigDecimal getTemporaryAverageWages() {
        if(temporaryTotalWages == null){
            return BigDecimal.ZERO;
        }else{
            if(this.temporaryNum == 0){
                return BigDecimal.ZERO;
            }else{
                return temporaryTotalWages.divide(new BigDecimal(this.temporaryNum) , 2, BigDecimal.ROUND_HALF_EVEN) ;
            }
        }
    }

    public void setTemporaryAverageWages(BigDecimal temporaryAverageWages) {
        this.temporaryAverageWages = temporaryAverageWages;
    }

    public BigDecimal getTemporaryTotalWages() {
        return temporaryTotalWages;
    }

    public void setTemporaryTotalWages(BigDecimal temporaryTotalWages) {
        this.temporaryTotalWages = temporaryTotalWages;
    }

    @Override
    public String toString() {
        return "ReportSummary{" +
                "deptId=" + deptId +
                ", deptName='" + deptName + '\'' +
                ", num=" + num +
                ", totalWages=" + totalWages +
                '}';
    }
}
