package com.jeeplus.finance.projectDict.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.finance.fileDict.domain.ProgramFileDict;
import com.jeeplus.finance.projectDict.domain.ProgramProjectDict;
import com.jeeplus.finance.projectDict.domain.vo.FileDictVo;
import com.jeeplus.sys.service.dto.WorkAttachmentInfoDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProjectDictMapper extends BaseMapper<ProgramProjectDict> {

    /**
     * 根据类型值查询父节点
     * @return
     */
    List<FileDictVo> getParentList(@Param("sortList")List<String> sortList);

    List<FileDictVo> parentList();

    List<FileDictVo> list(@Param("type") String type, @Param("attachmentProjectSort") String attachmentProjectSort, @Param("projectLevel") String projectLevel);

    List<ProgramFileDict> getFileParentList(@Param("id") String id, @Param("fileIds") List<String> fileIds);

    List<ProgramFileDict> getFileList(@Param("id") String id, @Param("fileIds") List<String> fileIds);

    FileDictVo findById(@Param("id") String id);

    /**
     * 根据文件attachmentId 和moduleType 查询附件信息
     * @param attachmentId
     * @param moduleType
     * @return
     */
    List<WorkAttachmentInfoDTO> getFileListByAttachmentAndModuleType(@Param("attachmentId")String attachmentId , @Param("moduleType")String moduleType);
}
