package com.ruoyi.basicData.mapper;

import com.ruoyi.basicData.domain.TWarehouseArea;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 库区Mapper接口
 *
 * @author ruoyi
 * @date 2020-12-11
 */
public interface TWarehouseAreaMapper {
    /**
     * 查询库区
     *
     * @param fId 库区ID
     * @return 库区
     */
    public TWarehouseArea selectTWarehouseAreaById(Long fId);

    /**
     * 查询库区列表
     *
     * @param tWarehouseArea 库区
     * @return 库区集合
     */
    public List<TWarehouseArea> selectTWarehouseAreaList(TWarehouseArea tWarehouseArea);

    /**
     * 新增库区
     *
     * @param tWarehouseArea 库区
     * @return 结果
     */
    public int insertTWarehouseArea(TWarehouseArea tWarehouseArea);

    /**
     * 修改库区
     *
     * @param tWarehouseArea 库区
     * @return 结果
     */
    public int updateTWarehouseArea(TWarehouseArea tWarehouseArea);

    /**
     * 删除库区
     *
     * @param fId 库区ID
     * @return 结果
     */
    public int deleteTWarehouseAreaById(Long fId);

    public int deleteTWarehouseAreaByTWarehoused(Long fId);

    /**
     * 批量删除库区
     *
     * @param fIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteTWarehouseAreaByIds(Long[] fIds);

    /**
     *  检验编号唯一
     * @param fNo
     * @return
     */
    public TWarehouseArea checkFNoUnique(@Param("fNo")String fNo,@Param("fWarehouseid")Long fWarehouseid);

    /**
     *  检验名称
     * @param fNname
     * @return
     */
    public TWarehouseArea checkUFNnameUnique(@Param("fNname")String fNname,@Param("fWarehouseid")Long  fWarehouseid);

    /**
     * 查询库区
     *
     * @param fId 库区ID
     * @return 库区
     */
    public TWarehouseArea selectTWarehouseAreaByWarehouseId(Long fId);


    public BigDecimal selectTWarehouseArea(Long fId);

}
