package com.dsk.cscec.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.cscec.domain.CbSummary;
import com.dsk.cscec.domain.bo.CbSummaryBo;
import com.dsk.cscec.domain.vo.CbSummaryActualListVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 成本汇总(CbSummary)表数据库访问层
 *
 * @author cyf
 * @since 2024-02-06
 */
public interface CbSummaryMapper extends BaseMapper<CbSummary> {

    List<CbSummaryActualListVo> getByParentId(@Param("parentId") Long parentId, @Param("expenseDate") String expenseDate);

    /**
     * 获取已添加成本月份
     *
     * @param bo
     * @return
     */
    List<String> getExpenseDateList(@Param("bo") CbSummaryBo bo);

    /**
     * 根据level获取名称/成本科目
     *
     * @param bo
     * @return
     */
    List<Map<String, Object>> selectByLevel(@Param("bo") CbSummaryBo bo);
}
