package com.yunfeiyun.agmp.fms.mapper;

import com.yunfeiyun.agmp.fms.domain.TssTracecodeapply;
import com.yunfeiyun.agmp.fms.domain.reqvo.SelectCountOfScreenReqVo;
import com.yunfeiyun.agmp.fms.domain.reqvo.TssTracecodeapplyReqVo;
import com.yunfeiyun.agmp.fms.domain.resvo.TssTraceCodeApplyResVo;
import com.yunfeiyun.agmp.fms.domain.resvo.TssTracecodeapplyManagerListResVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 溯源码生成单Mapper接口
 * 
 * @author 杨晓辉
 * @date 2023-07-04
 */
public interface TssTracecodeapplyMapper 
{
    /**
     * 查询溯源码生成单
     * 
     * @param tarcecodeapplyId 溯源码生成单主键
     * @return 溯源码生成单
     */
    public TssTracecodeapply selectTssTracecodeapplyByTarcecodeapplyId(String tarcecodeapplyId);

    /**
     * 查询溯源码生成单列表
     *
     * @param tssTracecodeapply 溯源码生成单
     * @return 溯源码生成单集合
     */
    public List<TssTracecodeapply> selectTssTracecodeapplyList(TssTracecodeapply tssTracecodeapply);

    /**
     * 查询溯源码生成单列表
     *
     * @param tssTracecodeapply 溯源码生成单
     * @return 溯源码生成单集合
     */
    public List<TssTracecodeapply> selectTssTracecodeapplyListByTarcecodeapplynos(String[] tarcecodeapplynos);

    /**
     *  查询溯源码数量
     * @param reqVo
     * @return
     */
    public Integer selectCountOfTssTracecodeapply(SelectCountOfScreenReqVo reqVo);

    /**
     * 新增溯源码生成单
     * 
     * @param tssTracecodeapply 溯源码生成单
     * @return 结果
     */
    public int insertTssTracecodeapply(TssTracecodeapply tssTracecodeapply);

    public int insertTssTracecodeapplyByBatch(List<TssTracecodeapply> list);

    /**
     * 修改溯源码生成单
     * 
     * @param tssTracecodeapply 溯源码生成单
     * @return 结果
     */
    public int updateTssTracecodeapply(TssTracecodeapply tssTracecodeapply);

    public int matchSpmOrder(@Param("spmOrderId") String spmOrderId,@Param("tarcecodeapplyno") String tarcecodeapplyno);
    public int unMatchSpmOrder(@Param("tarcecodeapplyno") String tarcecodeapplyno);

    /**
     * 删除溯源码生成单
     * 
     * @param tarcecodeapplyId 溯源码生成单主键
     * @return 结果
     */
    public int deleteTssTracecodeapplyByTarcecodeapplyId(String tarcecodeapplyId);

    /**
     * 批量删除溯源码生成单
     * 
     * @param tarcecodeapplyIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTssTracecodeapplyByTarcecodeapplyIds(String[] tarcecodeapplyIds);

    public List<TssTracecodeapplyManagerListResVo> selectTssTracecodeapplyManagerListResVoList(TssTracecodeapplyReqVo tssTracecodeapply);

    public List<TssTraceCodeApplyResVo> selectTssTraceCodeApplyResVoList(TssTracecodeapply tssTracecodeapply);
}
