package com.engine.salary.cmd.TaxRate;

import com.engine.common.biz.AbstractCommonCommand;
import com.engine.common.entity.BizLogContext;
import com.engine.core.interceptor.CommandContext;
import com.engine.salary.biz.TaxRateBiz;
import com.engine.salary.entity.taxrate.vo.TaxRateFormVo;
import weaver.general.Util;
import weaver.hrm.User;

import java.util.HashMap;
import java.util.Map;

public class TaxRateGetFormCmd extends AbstractCommonCommand<Map<String, Object>> {

    public TaxRateGetFormCmd(Map<String, Object> params, User user) {
        this.user = user;
        this.params = params;
    }

    @Override
    public BizLogContext getLogContext() {
        return null;
    }

    @Override
    public Map<String, Object> execute(CommandContext commandContext) {
        Map<String, Object> apidatas = new HashMap<String, Object>(16);
        TaxRateBiz taxRateBiz = new TaxRateBiz();
        Long id = Long.valueOf(Util.null2String(params.get("id")));
        TaxRateFormVo form = taxRateBiz.getForm(id);
        apidatas.put("form",form);
        return apidatas;
    }


}
