package com.engine.salary.maintainer.salaryacct;

import com.engine.salary.entity.datacollection.DataCollectionEmployee;

public abstract class SupAcctThread implements Runnable {

    private SalaryAcctSupplementParam calculateParam;

    private DataCollectionEmployee simpleEmployee;

    public SalaryAcctSupplementParam getCalculateParam() {
        return calculateParam;
    }

    public void setCalculateParam(SalaryAcctSupplementParam calculateParam) {
        this.calculateParam = calculateParam;
    }

    public DataCollectionEmployee getSimpleEmployee() {
        return simpleEmployee;
    }

    public void setSimpleEmployee(DataCollectionEmployee simpleEmployee) {
        this.simpleEmployee = simpleEmployee;
    }

    public SupAcctThread(SalaryAcctSupplementParam calculateParam, DataCollectionEmployee simpleEmployee) {
        this.calculateParam = calculateParam;
        this.simpleEmployee = simpleEmployee;
    }

    @Override
    public void run() {
        try {
            execute(calculateParam, simpleEmployee);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public abstract void execute(SalaryAcctSupplementParam calculateParam, DataCollectionEmployee simpleEmployee) throws Exception;
}
