package com.dsk.cscec.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.common.core.domain.R;
import com.dsk.cscec.domain.CbProjectFile;
import com.dsk.cscec.domain.CbSummary;
import com.dsk.cscec.domain.bo.CbSummaryActualBo;
import com.dsk.cscec.domain.bo.CbSummaryActualListBo;
import com.dsk.cscec.domain.bo.CbSummaryActualLockBo;
import com.dsk.cscec.domain.bo.CbSummaryBo;
import com.dsk.cscec.domain.vo.CbSummaryActualListVo;

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


/**
 * 成本汇总(CbSummary)表服务接口
 *
 * @author cyf
 * @since 2024-02-06
 */
public interface CbSummaryService extends IService<CbSummary> {

    /**
     * 项目汇总导入
     * @param projectId
     */
    void importCbProject(Long projectId);

    /**
     * 获取一级名称/成本科目列表
     *
     * @param bo
     * @return
     */
    List<Map<String, Object>> getCbNameList(CbSummaryBo bo);

    /**
     * 根据父级id获取子级数据
     *
     * @param bo
     * @return
     */
    List<CbSummaryActualListVo> getActualList(CbSummaryActualListBo bo);

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

    /**
     * 获取已锁定成本月份
     *
     * @param bo
     * @return
     */
    List<String> getLockedList(CbSummaryBo bo);

    /**
     * 新增/更新每月费用
     *
     * @param boList
     * @return
     */
    boolean insertOrUpdateActual(List<CbSummaryActualBo> boList);

    /**
     * 获取未填写成本一级大类
     * @param bo
     * @return
     */
    R getUnfilled(CbSummaryActualLockBo bo);

    /**
     * 锁定成本
     * @param bo
     * @return
     */
    boolean lockActual(CbSummaryActualLockBo bo);

    /**
     * 导出列表获取
     * @param bo
     * @return
     */
    List<CbSummaryActualListVo> getAll(CbSummaryActualListBo bo);
}
