package com.ga.core.mapper.settle;

import com.ga.core.vo.settle.OverrideSettleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Mapper
public interface OverrideSettleMapper {
    int insert(OverrideSettleVO vo);
    int insertBatch(@Param("list") List<OverrideSettleVO> list);
    List<OverrideSettleVO> selectByUpper(@Param("upperAgentId") Long upperAgentId,
                                         @Param("settleMonth") String settleMonth);
    int deleteBySettleMonth(@Param("settleMonth") String settleMonth);
    /** 정산월 + 상위설계사별 override 합계 */
    List<Map<String, Object>> aggregateByUpper(@Param("settleMonth") String settleMonth);
    BigDecimal sumByMonth(@Param("settleMonth") String settleMonth);
}
