package com.engine.salary.wrapper;

import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.entity.taxagent.param.TaxAgentSaveBaseParam;
import com.engine.salary.entity.taxagent.po.TaxAgentBasePO;
import com.engine.salary.service.TaxAgentBaseService;
import com.engine.salary.service.impl.TaxAgentBaseServiceImpl;
import weaver.hrm.User;

/**
 * 个税扣缴义务人基础信息
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
public class TaxAgentBaseWrapper extends Service {

    private TaxAgentBaseService getTaxAgentBaseService(User user) {
        return ServiceUtil.getService(TaxAgentBaseServiceImpl.class, user);
    }

    /**
     * 获取个税扣缴义务人基本信息表单
     *
     * @return
     */
    public TaxAgentBasePO getFrom() {
        TaxAgentBasePO base = getTaxAgentBaseService(user).getBaseInfo();
        return base;
    }

    /**
     * 保存个税扣缴义务人基本信息
     *
     * @param saveBaseParam
     * @return
     */
    public String save(TaxAgentSaveBaseParam saveBaseParam) {
        return getTaxAgentBaseService(user).save(saveBaseParam);
    }
}
