package com.ym.mec.biz.dal.dao;

import com.ym.mec.biz.dal.dto.OrganMaxAmountDto;
import com.ym.mec.biz.dal.entity.Organization;
import com.ym.mec.biz.dal.entity.SporadicChargeInfo;
import com.ym.mec.common.dal.BaseDAO;
import org.apache.ibatis.annotations.Param;

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

public interface SporadicChargeInfoDao extends BaseDAO<Integer, SporadicChargeInfo> {
    SporadicChargeInfo findInfoById(@Param("id") Integer id);

    SporadicChargeInfo findByOrganIdAndType(@Param("organId") Integer organId, @Param("chargeType") Integer chargeType);

    /**
     * 根据分部和类型获取活动信息
     *
     * @param organId
     * @param chargeType
     * @return
     */
    List<SporadicChargeInfo> getOrganActiveInfo(@Param("organId") Integer organId, @Param("chargeType") Integer chargeType);

    List<SporadicChargeInfo> findSporadicChargeInfos(Map<String, Object> params);

    /**
     * 获取所有的活动分部
     *
     * @param type
     * @return
     */
    List<Organization> getActiveOrgans(@Param("type") Integer type);

    /**
     * 获取活动分部的最大缴费金额
     * @param type
     * @return
     */
    List<OrganMaxAmountDto> getActiveOrgansMaxAmount(@Param("type") Integer type);
}
