package com.jsh.erp.datasource.mappers;

import com.jsh.erp.datasource.entities.DepotHead;
import com.jsh.erp.datasource.entities.DepotItem;
import com.jsh.erp.datasource.entities.DepotItemExample;
import java.util.List;

import com.jsh.erp.datasource.pda.vo.PDADepotItemVO;
import com.jsh.erp.datasource.pda.vo.PDAPrintVo;
import org.apache.ibatis.annotations.Param;

public interface DepotItemMapper  extends BaseMapperX<DepotItem>{

    /**
     * 根据单据ID获取单据详情
     * @param id 订单ID
     * @return
     */
    List<PDADepotItemVO> pdaList(@Param("id") Long id);

    /**
     * 根据商品订单ID获取单据详情
     * @param id 商品订单ID
     * @return
     */
    PDADepotItemVO pdaDetail(@Param("id") Long id);

    /**
     * pda根据商品订单ID查询商品详情
     * @param materialId 商品ID
     * @return
     */
    List<PDADepotItemVO> materialDepotDetail(@Param("type")String type, @Param("materialId") Long materialId);

    /**
     * 根据单据子表id查询商品打印信息
     * @param id
     * @return
     */
    PDAPrintVo pdaPrintMaterial(@Param("id")Long id) ;

    long countByExample(DepotItemExample example);

    int deleteByExample(DepotItemExample example);

    int deleteByPrimaryKey(Long id);

    int insert(DepotItem record);

    int insertSelective(DepotItem record);

    List<DepotItem> selectByExample(DepotItemExample example);

    DepotItem selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") DepotItem record, @Param("example") DepotItemExample example);

    int updateByExample(@Param("record") DepotItem record, @Param("example") DepotItemExample example);

    int updateByPrimaryKeySelective(DepotItem record);

    int updateByPrimaryKey(DepotItem record);
}