package com.bonus.material.settlement.mapper;

import com.bonus.material.settlement.domain.SltAgreementReduce;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 结算协议减免Mapper接口
 *
 * @author yuecs
 * @date 2025-10-16
 */
public interface SltAgreementReduceMapper {

    List<SltAgreementReduce> selectSltAgreementReduceList(SltAgreementReduce sltAgreement);

    List<SltAgreementReduce> getApplyReduceList(SltAgreementReduce sltAgreement);

    String getMaxCode(String date);

    Long insertReduce(SltAgreementReduce sltAgreement);

    void insertReduceDetail(SltAgreementReduce sltAgreementReduce);

    void insertBatchReduceDetail(@Param("detailList") List<SltAgreementReduce> detailList);

    List<SltAgreementReduce> findOverlappingReductions(SltAgreementReduce detail);


    List<SltAgreementReduce> selectByMatype(SltAgreementReduce sltAgreement);

    List<SltAgreementReduce> selectByMaModel(SltAgreementReduce sltAgreement);

    /**
     * 根据协议Id查询减免明细
     */
    List<SltAgreementReduce> getReductionList(SltAgreementReduce bean);

    /**
     * 批量查询减免明细
     */
    List<SltAgreementReduce> getReductionListBatch(SltAgreementReduce bean);

    List<SltAgreementReduce> selectAuditReduceList(SltAgreementReduce sltAgreement);

    void deleteReduceDetail(Long id);

    Long updateReduce(SltAgreementReduce sltAgreement);
}
