package com.brilliance.isc.mda.dao;

import com.brilliance.isc.bo.Dbl;
import com.brilliance.isc.bo.bopdecbo.Dba;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

@Mapper
public interface DblMapper {

    int insert(Dbl record);

    int insertSelective(Dbl record);

    int updateByPrimaryKeySelective(Dbl record);

    int updateByPrimaryKey(Dbl record);

    int deleteByPrimaryKey(Dbl record);

    int deleteByIds(Collection<Object> collection);

    Dbl selectByPrimaryKey(Dbl record);

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

    List<Dbl> dyncRead(Map<String, Object> dyncMap);
    List<Dbl> selectByConditions(Dbl dbl);
    int dblCountByCustcod(@Param("custcod") String custcod);

    Dbl selectByObjtypAndInr(@Param("objtyp") String objtyp, @Param("objinr") String objinr);

    int selectCountByRptno(@Param("rptno")String rptno);

    List<Map<String,String>> selectDbaDbgByCountryAndOppuser(@Param("country")String country, @Param("oppuser")String oppuser);

    List<Map<String,String>> selectDbbDbhByCountryAndOppuser(@Param("country")String country, @Param("oppuser")String oppuser);

    List<Map<String,String>> selectDbcDbkByCountryAndOppuser(@Param("country")String country, @Param("oppuser")String oppuser);

    Dbl selectByTrninr(@Param("trninr") String trninr);

    /**
     * 通过 OBJTYP 和 TRNINR 查询dbl 记录
     */

    Dbl selectByOBjtypAndTrninr(@Param("objtyp") String objtyp,@Param("trninr") String trninr);

    List<Map<String,String>> selectBopsndInfoBas();

    List<Map<String,String>> selectBopsndInfoVrf();

    Dbl selectByinr(String inr);

    Dbl selectByRptno(@Param("rptno") String rptno);

    List<Dbl> selectNewByObjtypAndInrs(@Param("basInrs") List<String> basInrs,@Param("objtyp")String objtyp);

    Dbl selectByTrninrAndBassta(@Param("trninr") String trninr,@Param("bassta") String bassta);
}