package com.brilliance.isc.mda.dao;

import com.brilliance.isc.bo.Cbe;
import com.brilliance.isc.bo.Pte;
import com.brilliance.isc.vo.lg.CbeVo;
import com.brilliance.isc.vo.report.ReportForUdpSetVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

@Mapper
public interface CbeMapper {

    int insert(Cbe record);

    int insertSelective(Cbe record);

    int updateByPrimaryKeySelective(Cbe record);

    int updateByPrimaryKey(Cbe record);

    int deleteByPrimaryKey(Cbe record);

    int deleteByIds(Collection<Object> collection);

    Cbe selectByPrimaryKey(Cbe record);

    int dyncDelete(Map<String,Object> dyncMap);

    List<Cbe> dyncRead(Map<String,Object> dyncMap);

    List<Cbe> getCbeListByTrnTypeAndInr(@Param("trntyp") String trnTyp, @Param("trninr") String trnInr);

    List<Cbe> getCbeListByTrnTypeAndInrWithEFlag(@Param("trntyp")String trnTyp, @Param("trninr")String trnInr);

    List<Cbe> getCbeListByObjTypeAndInr(@Param("objtyp") String objTyp, @Param("objinr") String objInr);

    List<Cbe> getCbeListByObjTypAndInrWithCbt(@Param("objtyp")String objTyp,
                                              @Param("objinr")String objInr,
                                              @Param("cbt")String cbt);

    List<Cbe> selectByObjtypAndObjinrAndCbtAndTrninr(@Param("objtyp") String objtyp, @Param("objinr") String objinr,
                                                     @Param("cbt") String cbt, @Param("trninr") String trninr);

    List<String> getCurListByAccInCcv(@Param("objtyp")String objTyp,
                                      @Param("objinr")String objInr,
                                      @Param("acc")String acc);


    List<Cbe> queryCbe(@Param("objtyp") String objtyp, @Param("objinr") String objinr,@Param("pteList") List<Pte> pteList);

    BigDecimal getSumamtByObjtypObjinrAccCur(@Param("objtyp")String objtyp,
                                             @Param("objinr")String objinr,
                                             @Param("acc")String acc,
                                                @Param("cur")String cur);
    CbeVo getSumamtByObjtypObjinr(@Param("objtyp")String objtyp,
                                  @Param("objinr")String objinr);
    CbeVo getSumamtByObjtypinrAndCbt(@Param("objtyp")String objtyp,
                                  @Param("objinr")String objinr,
                                  @Param("cbt")String cbt );


    Cbe selectCecmCbe(@Param("objtyp") String objtyp,@Param("objinr") String objinr,
                            @Param("trninr") String trninr,@Param("cbt") String cbt,
                            @Param("list") List<String> list);

    // 根据objinr 查询cbe数据
    Cbe selectPayamt(@Param("objinr") String objinr, @Param("cbtpfx") String cbtpfx);

    /**
     * 远期信用证承兑付款报表付款金额
     */
    List<ReportForUdpSetVo> reportForSet(@Param("inrs") List<String> inrs);

    //获取保证金的cbe列表
    List<Cbe> getCcvCbeList(@Param("objtyp")String objtyp, @Param("objinr")String objinr);

}