package ink.wgink.module.activiti.dao.oa;

import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.interfaces.init.IInitBaseTable;
import ink.wgink.module.activiti.pojo.dtos.oa.OaOnFileDTO;
import ink.wgink.module.activiti.pojo.pos.oa.OaOnFilePO;
import org.springframework.stereotype.Repository;

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

/**
 * @ClassName: IOaOnFileDao
 * @Description: 归档
 * @Author: wanggeng
 * @Date: 2022/5/13 09:49
 * @Version: 1.0
 */
@Repository
public interface IOaOnFileDao extends IInitBaseTable {

    /**
     * 新增
     *
     * @param params
     * @throws SaveException
     */
    void save(Map<String, Object> params) throws SaveException;

    /**
     * 删除
     *
     * @param params
     * @throws RemoveException
     */
    void remove(Map<String, Object> params) throws RemoveException;


    /**
     * 删除（物理）
     *
     * @param params
     * @throws RemoveException
     */
    void delete(Map<String, Object> params) throws RemoveException;

    /**
     * 列表
     *
     * @param params
     * @return
     */
    OaOnFileDTO get(Map<String, Object> params);

    /**
     * 列表
     *
     * @param params
     * @return
     */
    OaOnFilePO getPO(Map<String, Object> params);

    /**
     * 列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<OaOnFilePO> listPO(Map<String, Object> params) throws SearchException;

    /**
     * 列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<OaOnFileDTO> list(Map<String, Object> params) throws SearchException;

    /**
     * 未归档的流程实例ID列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<String> listUnOnFileProcessInstanceId(Map<String, Object> params) throws SearchException;

    /**
     * 统计
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer count(Map<String, Object> params) throws SearchException;


}
