package com.ruoyi.warehouseBusiness.mapper;


import com.ruoyi.warehouseBusiness.domain.TWarehouseAgreementitems;
import com.ruoyi.warehouseBusiness.dto.TWarehouseAgreementitem;
import org.apache.ibatis.annotations.Param;

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

/**
 * 仓储费明细表Mapper接口
 *
 * @author ruoyi
 * @date 2020-12-11
 */
public interface TWarehouseAgreementitemsMapper {
    /**
     * 查询仓储费明细表
     *
     * @param fId 仓储费明细表ID
     * @return 仓储费明细表
     */
    public TWarehouseAgreementitems selectTWarehouseAgreementitemsById(Long fId);

    /**
     * 查询仓储费明细表列表
     *
     * @param tWarehouseAgreementitems 仓储费明细表
     * @return 仓储费明细表集合
     */
    public List<TWarehouseAgreementitems> selectTWarehouseAgreementitemsList(TWarehouseAgreementitems tWarehouseAgreementitems);

    public List<Map<String, Object>> selectTWarehouseAgreementitemsList1(TWarehouseAgreementitems tWarehouseAgreementitems);

    public List<Map<String, Object>> selectTWarehouseAgreementitemList(TWarehouseAgreementitem tWarehouseAgreementitem);
    /**
     * 新增仓储费明细表
     *
     * @param tWarehouseAgreementitems 仓储费明细表
     * @return 结果
     */
    public int insertTWarehouseAgreementitems(TWarehouseAgreementitems tWarehouseAgreementitems);

    /**
     * 修改仓储费明细表
     *
     * @param tWarehouseAgreementitems 仓储费明细表
     * @return 结果
     */
    public int updateTWarehouseAgreementitems(TWarehouseAgreementitems tWarehouseAgreementitems);

    /**
     * 删除仓储费明细表
     *
     * @param fId 仓储费明细表ID
     * @return 结果
     */
    public int deleteTWarehouseAgreementitemsById(Long fId);

    /**
     * 批量删除仓储费明细表
     *
     * @param fIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteTWarehouseAgreementitemsByIds(Long[] fIds);

    int deleteByFPid(Long fId);

    /**
     *
     * @param fCorpid 出库客户Id
     * @param fGoodsid 物资类型Id
     * @return
     */
    List<TWarehouseAgreementitems> getItemsBytWarehouseAgreementMsg(@Param("fCorpid") Long fCorpid,
                                                                    @Param("fGoodsid") Long fGoodsid,
                                                                    @Param("feeUnitid") Long feeUnitid);

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