/*
 * @Author: Kane
 * @Date: 2023-03-16 09:32:53
 * @LastEditors: Kane
 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/archievement/department/DepartmentArchievementQueryResult.java
 * @Description: 
 * 
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 */
package com.cpic.xim.web.controllers.archievement.department;

import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import com.cpic.xim.mybatis.pojo.MensualArchievementItem;
import com.cpic.xim.web.controllers.QueryResponse;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * 查询部门业绩返回结果。
 * MensualArchievementList 每月业绩，要保证数据是按照月份排序。
 */
public class DepartmentArchievementQueryResult extends QueryResponse
{
    @JsonProperty( "total_archievement" )
    private long totalArchievement; // 总业绩

    // 每月业绩列表
    // 要保证数据是按照月份排序。
    @JsonProperty( "mensual_archievement_list" )
    private ArrayList<MensualArchievementItem> mensualArchievementList;

    @JsonProperty( "insurance_renewal_rate" )
    private String insuranceRenewalRate; // 续保率

    @JsonProperty( "insurance_renewal_rate_target" )
    private String insuranceRenewalRateTarget; // 续保率目标值

    @JsonProperty( "attaching_rate" )
    private String attachingRate; // 车非渗透率

    @JsonProperty( "attaching_rate_target" )
    private String attachingRateTarget; // 车非渗透率目标值

    @JsonProperty( "leading_reward_gainers" )
    private Vector<String> leadingRewardGainers; // 领跑奖

    @JsonProperty( "advance_reward_gainers" )
    private Vector<String> advanceRewardGainers; // 飞跃奖

    @JsonProperty( "backward_list" )
    private Vector<String> backwardList; // 消七灭六坐席

    public DepartmentArchievementQueryResult()
    {
        mensualArchievementList = new ArrayList<MensualArchievementItem>();
        advanceRewardGainers = new Vector<String>();
        leadingRewardGainers = new Vector<String>();
        backwardList = new Vector<String>();
    }

    public long getTotalArchievement()
    {
        return totalArchievement;
    }

    public void setTotalArchievement( long totalArchievement )
    {
        this.totalArchievement = totalArchievement;
    }

    public List<MensualArchievementItem> getMensualArchievementList()
    {
        return mensualArchievementList;
    }

    public void setMensualArchievementList(
            ArrayList<MensualArchievementItem> mensualArchievementList )
    {
        this.mensualArchievementList = mensualArchievementList;
    }

    public String getInsuranceRenewalRate()
    {
        return insuranceRenewalRate;
    }

    public void setInsuranceRenewalRate( String insuranceRenewalRate )
    {
        this.insuranceRenewalRate = insuranceRenewalRate;
    }

    public String getAttachingRate()
    {
        return attachingRate;
    }

    public void setAttachingRate( String attachingRate )
    {
        this.attachingRate = attachingRate;
    }

    public void addLeadingRewardGainer( String name )
    {
        this.leadingRewardGainers.add( name );
    }

    public Vector<String> getLeadingRewardGainers()
    {
        return leadingRewardGainers;
    }

    public void setLeadingRewardGainers( Vector<String> leadingRewardGainers )
    {
        this.leadingRewardGainers = leadingRewardGainers;
    }

    public void addAdvanceRewardGainer( String name )
    {
        advanceRewardGainers.add( name );
    }

    public Vector<String> getAdvanceRewardGainers()
    {
        return advanceRewardGainers;
    }

    public void setAdvanceRewardGainers( Vector<String> advanceRewardGainers )
    {
        this.advanceRewardGainers = advanceRewardGainers;
    }

    public void addBackwardStaff( String name )
    {
        backwardList.add( name );
    }

    public Vector<String> getBackwardList()
    {
        return backwardList;
    }

    public void setBackwardList( Vector<String> backwardList )
    {
        this.backwardList = backwardList;
    }

    public String getInsuranceRenewalRateTarget()
    {
        return insuranceRenewalRateTarget;
    }

    public void setInsuranceRenewalRateTarget( String insuranceRenewalRateTarget )
    {
        this.insuranceRenewalRateTarget = insuranceRenewalRateTarget;
    }

    public String getAttachingRateTarget()
    {
        return attachingRateTarget;
    }

    public void setAttachingRateTarget( String attachingRateTarget )
    {
        this.attachingRateTarget = attachingRateTarget;
    }

    @Override
    public String toString()
    {
        return "DepartmentArchievementQueryResult [totalArchievement=" + totalArchievement
                + ", mensualArchievementList=" + mensualArchievementList + ", insuranceRenewalRate="
                + insuranceRenewalRate + ", insuranceRenewalRateTarget="
                + insuranceRenewalRateTarget + ", attachingRate=" + attachingRate
                + ", attachingRateTarget=" + attachingRateTarget + ", leadingRewardGainers="
                + leadingRewardGainers + ", advanceRewardGainers=" + advanceRewardGainers
                + ", backwardList=" + backwardList + "]";
    }

    @Override
    public int hashCode()
    {
        final int prime = 31;
        int result = super.hashCode();
        result = prime * result + (int) (totalArchievement ^ (totalArchievement >>> 32));
        result = prime * result
                + ((mensualArchievementList == null) ? 0 : mensualArchievementList.hashCode());
        result = prime * result
                + ((insuranceRenewalRate == null) ? 0 : insuranceRenewalRate.hashCode());
        result = prime * result + ((insuranceRenewalRateTarget == null) ? 0
                : insuranceRenewalRateTarget.hashCode());
        result = prime * result + ((attachingRate == null) ? 0 : attachingRate.hashCode());
        result = prime * result
                + ((attachingRateTarget == null) ? 0 : attachingRateTarget.hashCode());
        result = prime * result
                + ((leadingRewardGainers == null) ? 0 : leadingRewardGainers.hashCode());
        result = prime * result
                + ((advanceRewardGainers == null) ? 0 : advanceRewardGainers.hashCode());
        result = prime * result + ((backwardList == null) ? 0 : backwardList.hashCode());
        return result;
    }

    @Override
    public boolean equals( Object obj )
    {
        if ( this == obj )
            return true;
        if ( !super.equals( obj ) )
            return false;
        if ( getClass() != obj.getClass() )
            return false;
        DepartmentArchievementQueryResult other = (DepartmentArchievementQueryResult) obj;
        if ( totalArchievement != other.totalArchievement )
            return false;
        if ( mensualArchievementList == null )
        {
            if ( other.mensualArchievementList != null )
                return false;
        }
        else if ( !mensualArchievementList.equals( other.mensualArchievementList ) )
            return false;
        if ( insuranceRenewalRate == null )
        {
            if ( other.insuranceRenewalRate != null )
                return false;
        }
        else if ( !insuranceRenewalRate.equals( other.insuranceRenewalRate ) )
            return false;
        if ( insuranceRenewalRateTarget == null )
        {
            if ( other.insuranceRenewalRateTarget != null )
                return false;
        }
        else if ( !insuranceRenewalRateTarget.equals( other.insuranceRenewalRateTarget ) )
            return false;
        if ( attachingRate == null )
        {
            if ( other.attachingRate != null )
                return false;
        }
        else if ( !attachingRate.equals( other.attachingRate ) )
            return false;
        if ( attachingRateTarget == null )
        {
            if ( other.attachingRateTarget != null )
                return false;
        }
        else if ( !attachingRateTarget.equals( other.attachingRateTarget ) )
            return false;
        if ( leadingRewardGainers == null )
        {
            if ( other.leadingRewardGainers != null )
                return false;
        }
        else if ( !leadingRewardGainers.equals( other.leadingRewardGainers ) )
            return false;
        if ( advanceRewardGainers == null )
        {
            if ( other.advanceRewardGainers != null )
                return false;
        }
        else if ( !advanceRewardGainers.equals( other.advanceRewardGainers ) )
            return false;
        if ( backwardList == null )
        {
            if ( other.backwardList != null )
                return false;
        }
        else if ( !backwardList.equals( other.backwardList ) )
            return false;
        return true;
    }
}
