package com.brilliance.isc.mda.dao;

import com.brilliance.isc.bo.Bch;
import com.brilliance.isc.bo.Pta;
import com.brilliance.isc.vo.component.ptapta.PtaInfoVo;
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 PtaMapper {

    int insert(Pta record);

    int insertSelective(Pta record);

    int updateByPrimaryKeySelective(Pta record);

    int updateByPrimaryKey(Pta record);

    int deleteByPrimaryKey(Pta record);

    int deleteByIds(Collection<Object> collection);

    Pta selectByPrimaryKey(Pta record);

    Pta selectByInr(String inr);

    Pta selectByPtyInrAndUsg(@Param(value = "ptyinr") String ptyinr, @Param(value = "usg") String usg);

    Pta selectByPtyextkeyAndUsg(@Param(value = "ptyextkey") String ptyextkey, @Param(value = "usg") String usg);

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

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

    String selectInrByPtyinr(String ptyinr);

    List<String> selectInrsByPtyinr(String ptyinr);

    List<Pta> selectByPtyInr(String ptyinr);

    int selectCountByTidAndPtyinr(String ptyinr);
    List<PtaInfoVo> getPtaInfo(@Param("etgextkey") String etgextkey,
                           @Param("bchlst") List<String> bchlst,
                           @Param("ptytyp") String ptytyp,
                           @Param("extkey") String extkey);

    String selectIssbchinf(String ptyinr);

    String selectIssbchinfbyPtainr(String ptainr);

    int updateupdpts(String ptyinr);

    int updatemainaddress(@Param("ptyinr") String ptyinr, @Param("newbchlst") String newbchlst);

    int deleteByInrs(@Param("ptalist") List<String> ptaList);

    int deleteByAdrinr(@Param("adrinr") String adrinr);

    int insertAdrPta(Pta pta);

    List<Pta> selectByPtyExtkey(@Param("ptyextkey")String ptyextkey);

    Pta selectAdrByCon(Pta pta);

    int changeMainAdr(Pta pta);

    Pta selectByObjtypAndInr(String inr);

    int updateNam1ByPtyinr(@Param("ptyinr")String ptyinr, @Param("nam1")String nam1);

    Pta selectByBranchinrAndPtyextkey(@Param("branchinr")String branchinr, @Param("ptyextkey")String ptyextkey);

    Pta queryDetailByObjkey(@Param("objkey")String objkey);

    Pta queryDetailByBic(@Param("bic")String bic);

    List<Pta> selectListByBranchinrAndPtyextkey(@Param("ptyextkey")String ptyextkey, @Param("list")List<Bch> bchList,@Param("gartyp")String gartyp);

    List<Pta> selectListByPtyextkeyAndPtytyp(@Param("ptyextkey")String ptyextkey,@Param("ptytyp") String ptytyp);

    String selectBranchinrByPtaInr(@Param("ptainr") String ptainr);

    List<Pta> selectByExtkeyAndBranch(@Param("extkey") String extkey, @Param("branch") String branch);

    List<Pta> checkDedgrpExtkey(@Param("extkey") String extkey);

    List<Pta> selectEInfoByPtyInr(@Param("ptyinr") String ptyinr);
}