package com.brilliance.isc.mda.dao;


import com.brilliance.isc.bo.Invuse;
import com.brilliance.isc.common.invchk.vo.ImfQueryVo;
import com.brilliance.isc.common.invchk.vo.ImfResponseVo;
import com.brilliance.isc.common.invchk.vo.InvlstVo;
import com.brilliance.isc.common.invchk.vo.InvselQueryVo;
import com.brilliance.isc.vo.InvRequestVo;
import com.brilliance.isc.vo.InvuseResponeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface InvuseMapper {

    List<Invuse> selectBySeqnum(String seqnum);

    List<Invuse> selectByCodeNum(@Param("invcod") String invcod, @Param("invnum") String invnum);

    Invuse selectByCodeNumSeqnum(@Param("invcod") String invcod, @Param("invnum") String invnum, @Param("seqnum") String seqnum);

    int insert(Invuse record);

    List<Invuse> selectByCodeNumSeqnumForUpdate(@Param("invcod") String invcod, @Param("invnum") String invnum, @Param("seqnum") String seqnum);

    int updateByPrimaryKey(Invuse record);

    int deleteByCondition(String inr);

    int deleteBySeqnum(String seqnum);

    Invuse selectByPrimaryKey(String inr);

    List<Invuse> getInvlistBySmhInr(@Param("smhinr")String smhinr);

    int updateInvuseByIsusedmsgidAndInsidx(Invuse invuse);

    Invuse selectInvByIsusedmsgidAndInsidx(@Param("isusedmsgid")String isusedmsgid,@Param("insidx") String insidx);

    List<InvlstVo> selectByOwnref(String ownref);

    List<Invuse> getInvlistForupdate(String seqnum);

    int updateByCodeNumSeqnum(Invuse record);

    List<Invuse> selectByImgnum(String imgnum);

    List<InvuseResponeVo> selectByInvuseQueryVo(InvRequestVo invQueryVo);

    int deleteByListSeqnum(@Param("seqnum") String seqnum);

    int insertSelective(Invuse record);

    List<Invuse> selectBySeqnumStateReason(String imgnum);

    List<Invuse> selectByOwnrefAndCodAndNum(@Param("ownref")String ownref, @Param("invcod") String invcod, @Param("invnum") String invnum);

    int deleteBySeqnumStateReason(String seqnum);

    List<Invuse> getInvList(InvselQueryVo invselQueryVo);

    List<InvlstVo> selectBySptinr(@Param("ownref") String ownref, @Param("sptinr") String sptinr);

    List<InvlstVo> selectByImfinr(String imfinr);

    List<Invuse> selectBalanceByCondition(@Param("invcod") String invcod, @Param("invnum") String invnum);

    List<Invuse> selectByOwnrefStateReason(String ownref);

    List<Invuse> selectByImgnumList(@Param("imgnumList") List<String> imgnumList);

    List<ImfResponseVo> selectInvByCondition(ImfQueryVo imfQueryVo);

    List<InvlstVo> selectByOwnrefSkipped(String ownref);

    List<InvlstVo> selectByOwnrefMonstatus(@Param("ownref") String ownref, @Param("ignflg") String ignflg);

    List<InvlstVo> selectImfinvBySeqnum(String seqnum);

    List<Invuse> selectInvuseByImfinr(String imfinr);

    int updateOwnrefByImfinr(@Param("imfinr") String imfinr, @Param("ownref") String ownref);

    InvlstVo selectImfinvByInr(String inr);

    InvlstVo selectByInr(String inr);

    int updateStateBySeqnum(String seqnum);

    List<Invuse> selectByImgnumAndFilenam(Invuse record);

    int deleteByImgnumAndFilenam(Invuse record);

    List<InvlstVo> selectByBfdOwnref(String ownref);

    List<Invuse> selectByImgnumFilenam(@Param("imgnum") String imgnum, @Param("filnam") String filnam);

    List<InvlstVo> selectMonResultByImgnumList(@Param("imgnumList") List<String> imgnumList);

    int deleteByPrimaryKey(Invuse record);

    int deleteByInrList(@Param("inrList") List<String> inrList);

    int updateByInrList(@Param("inrList") List<String> inrList);

    List<String> selectByownrefAndvalflg(String ownref);

    int getAbnormalInvCount(@Param("branch") String branch);

    List<Invuse> selectInvuseByOwnref(String ownref);

    List<Invuse> selectInvuseByBfdOwnref(String ownref);

    int updateSelfByInrList(@Param("inrList") List<String> inrList);

    List<InvlstVo> selectBySelfownref(String selfownref);

    List<InvlstVo> selectBySelfSkip(String selfownref);

    List<Invuse> selectInvuseByOwnrefSkipped(String ownref);

    List<InvlstVo> selectInvlstByOwnref(String ownref);

    List<InvlstVo> selectInvlsBySelfownref(String selfownref);

    List<Invuse> getAbnormalInvByOwnref(String ownref);


    List<InvlstVo> selectByPntref(String pntref);

    List<InvlstVo> selectByInrList(@Param("inrList") List<String> inrList);

    int deleteByImgnum(String imgnum);
}
