package com.eactive.eai.rms.onl.statistics.trand.vo;

public class TrandBean {

    /** 거래년월 */
    private int statcYm;
    /** 건수 */
    private long trsmtNoitm;
    /** 이동평균값 */
    private float moveAvg;

    private int month = 0;

    /** 이동평균중앙값 */
    private float middelMoveAvg;

    private long sumTrsmtNoitm;

    public void sumTrsmtNoitm(long trsmtNoitm) {
        this.sumTrsmtNoitm = this.sumTrsmtNoitm + trsmtNoitm;
    }

    public void setSumTrsmtNoitmToAvg(int count) {
        moveAvg = sumTrsmtNoitm / count;
    }

    public float getThisMonthPercentage() {
        if (middelMoveAvg != 0) {
            return (trsmtNoitm * 100) / middelMoveAvg;
        } else {
            return 0;
        }
    }

    public long getTrsmtNoitm() {
        return trsmtNoitm;
    }

    public void setTrsmtNoitm(long ddTrsmtNoitm) {
        trsmtNoitm = ddTrsmtNoitm;
    }

    public float getMiddelMoveAvg() {
        return middelMoveAvg;
    }

    public void setMiddelMoveAvg(float middelMoveAvg) {
        this.middelMoveAvg = middelMoveAvg;
    }

    public float getMoveAvg() {
        return moveAvg;
    }

    public void setMoveAvg(long moveAvg) {
        this.moveAvg = moveAvg;
    }

    public int getStatcYm() {
        return statcYm;
    }

    public void setStatcYm(int statcYm) {
        this.statcYm = statcYm;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public long getSumTrsmtNoitm() {
        return sumTrsmtNoitm;
    }

    public void setSumTrsmtNoitm(long sumTrsmtNoitm) {
        this.sumTrsmtNoitm = sumTrsmtNoitm;
    }

}
