package com.sunxung.factoring.service.ledger;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sunxung.factoring.entity.GridPage;
import com.sunxung.factoring.entity.ledger.LedgerAccountBasicInfo;
import com.sunxung.factoring.entity.ledger.vo.SupplierListVo;
import com.sunxung.factoring.entity.project.vo.SearchBusinessProcessingTask;

import java.util.List;

/**
 * @author liutao
 * @date 2021.11.11
 */
public interface LedgerAccountBasicInfoService extends IService<LedgerAccountBasicInfo> {

    /**
     * 列表页查询
     *
     * @param search
     * @return
     */
    GridPage<LedgerAccountBasicInfo> list(SearchBusinessProcessingTask search);

    /**
     * 获取供应商列表
     *
     * @param businessNumber
     * @return
     */
    List<SupplierListVo> getSupplierList(String businessNumber);

    /**
     * 获得最新审批未通过的分账基础信息
     *
     * @param manageId
     * @return
     */
    LedgerAccountBasicInfo getLatestByManageIdAndNotApproval(Long manageId);

    /**
     * 获得分账基础信息详情
     *
     * @param id
     * @return
     */
    LedgerAccountBasicInfo getDetail(Long id);

    /**
     * 根据分账管理id集合和生效状态查询
     *
     * @param managementIds
     * @param isEffective
     * @return
     */
    List<LedgerAccountBasicInfo> findByManagementIdsAndEffective(List<Long> managementIds, Integer isEffective);

    /**
     * 查询最新的临时数据
     *
     * @param manageId
     * @param visible
     * @return
     */
    LedgerAccountBasicInfo findByVisable(Long manageId, Boolean visible);

    /**
     * 获取最新记录
     *
     * @param managementId
     * @return
     */
    LedgerAccountBasicInfo getLatestById(Long managementId);
}
