package com.ruoyi.warehouseBusiness.mapper;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ruoyi.reportManagement.domain.TWareHouseItemsExcel;
import com.ruoyi.warehouseBusiness.domain.TWareHouseExcelItems;
import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
import org.apache.ibatis.annotations.Param;


import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 详情主表Mapper接口
 *
 * @author ruoyi
 * @date 2020-12-11
 */
public interface TWarehouseBillsMapper extends BaseMapper<TWarehouseBills> {
    /**
     * 查询详情主表
     *
     * @param fId 详情主表ID
     * @return 详情主表
     */
    public TWarehouseBills selectTWarehousebillsById(Long fId);

    /**
     * 查询对仓库物详情的列表
     *
     * @param tWarehousebills 详情主表
     * @return 结果
     */
    public List<Map<String, Object>> selectWarehouseBusinessList(TWarehouseBills tWarehousebills);

    /**
     * 查询详情主表列表
     *
     * @param tWarehousebills 详情主表
     * @return 详情主表集合
     */
    public List<TWarehouseBills> selectTWarehousebillsList(TWarehouseBills tWarehousebills);

    /**
     * 新增详情主表
     *
     * @param tWarehousebills 详情主表
     * @return 结果
     */
    public int insertTWarehousebills(TWarehouseBills tWarehousebills);

    /**
     * 修改详情主表
     *
     * @param tWarehousebills 详情主表
     * @return 结果
     */
    public int updateTWarehousebills(TWarehouseBills tWarehousebills);

    /**
     * 删除详情主表
     *
     * @param fId 详情主表ID
     * @return 结果
     */
    public int deleteTWarehousebillsById(Long fId);

    /**
     * 批量删除详情主表
     *
     * @param fIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteTWarehousebillsByIds(Long[] fIds);

    /**
     *  根据主表id 更新库存主表对应状态
     *
     * @param fettle 对应状态
     * @param fPid 主表id
     * @return  结果
     */
    int warehouseFollowUpdate(@Param("fPid") Long fPid, @Param("fettle") Long fettle, @Param("auditItem") Date auditItem);

    /**
     * 查询详情主表列表
     * @param fid
     * @return 详情主表集合
     */
    public List<TWareHouseExcelItems> selectTWarehousebillsItemsList(@Param("fId") Long fid);

    List<Map<String, Object>> selectInventorySJRKList(TWarehouseBills tWarehousebills);
    List<Map<String, Object>> selectInventorySJCKList(TWarehouseBills tWarehousebills);

    public List<TWareHouseItemsExcel> selectTWarehousebillsItemList(TWarehouseBills tWarehouseBills);
}
