package com.zzsmart.qomo.kn.cost.manage.vo;

public class CostcenterMonth {
    private String costcenter;
    private String ymonth;

    public CostcenterMonth(HiveSapAfru hiveSapAfru){
        costcenter=hiveSapAfru.kostl;
        ymonth=hiveSapAfru.budat.substring(0,6);
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((costcenter == null) ? 0 : costcenter.hashCode());
        result = prime * result + ((costcenter == null) ? 0 : costcenter.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        CostcenterMonth other = (CostcenterMonth) obj;
        if (costcenter == null) {
            if (other.costcenter != null)
                return false;
        } else if (!costcenter.equals(other.costcenter))
            return false;
        if (ymonth == null) {
            if (other.ymonth != null)
                return false;
        } else if (!ymonth.equals(other.ymonth))
            return false;
        return true;
    }
}
