package com.crm.manager.service;

import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
import com.crm.rely.backend.core.dto.sales.SalesSalaryRecordDto;
import com.crm.rely.backend.core.entity.sales.SalesBalanceWithdrawalEntity;
import com.crm.rely.backend.core.entity.sales.SalesSalaryRecordAddEntity;
import com.crm.rely.backend.core.entity.sales.SalesSalaryRecordListEntity;
import com.crm.rely.backend.core.pojo.table.FinanceBalanceTable;
import com.crm.rely.backend.exception.ServiceException;

import java.util.List;

public interface SalesSalaryRecordService {

    void save(SalesSalaryRecordAddEntity entity) throws ServiceException;

    SalesSalaryRecordDto searchById(Long id) throws ServiceException;

    BaseResultWithPagerDto<List<SalesSalaryRecordDto>> searchList(SalesSalaryRecordListEntity entity) throws ServiceException;

    /**
     * 销售提取薪资
     * @param entity
     * @throws ServiceException
     */
    void salesBalanceWithdrawal(SalesBalanceWithdrawalEntity entity) throws ServiceException;

    /**
     * 薪资提取回调
     * @param financeBalanceTable
     * @throws ServiceException
     */
    void salesBalanceCallback(FinanceBalanceTable financeBalanceTable) throws ServiceException;
}
