package com.bonus.material.lease.mapper;

import java.util.List;

import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
import com.bonus.material.ma.domain.Type;

/**
 * 领料出库详细Mapper接口
 * 
 * @author xsheng
 * @date 2024-10-16
 */
public interface LeaseOutDetailsMapper {
    /**
     * 查询领料出库详细
     * 
     * @param id 领料出库详细主键
     * @return 领料出库详细
     */
    public LeaseOutDetails selectLeaseOutDetailsById(Long id);

    /**
     * 查询领料出库详细列表
     * 
     * @param leaseOutDetails 领料出库详细
     * @return 领料出库详细集合
     */
    public List<LeaseOutDetails> selectLeaseOutDetailsList(LeaseOutDetails leaseOutDetails);

    /**
     * 查询领料出库详细列表--by任务id
     *
     * @param parentId 任务id
     * @return 领料出库详细集合
     */
    List<LeaseOutDetails> selectLeaseOutDetailsListByParentId(String parentId);

    /**
     * 新增领料出库详细
     * 
     * @param leaseOutDetails 领料出库详细
     * @return 结果
     */
    public int insertLeaseOutDetails(LeaseOutDetails leaseOutDetails);

    /**
     * 修改领料出库详细
     * 
     * @param leaseOutDetails 领料出库详细
     * @return 结果
     */
    public int updateLeaseOutDetails(LeaseOutDetails leaseOutDetails);

    /**
     * 删除领料出库详细
     * 
     * @param id 领料出库详细主键
     * @return 结果
     */
    public int deleteLeaseOutDetailsById(Long id);

    /**
     * 批量删除领料出库详细
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteLeaseOutDetailsByIds(Long[] ids);

    /**
     * 查询实时库存
     * @param record
     * @return
     */
    int getCountOfCodeMachine(LeaseOutDetails record);

    /**
     * 根据类型id查询类型
     * @param record
     * @return
     */
    Type selectByTypeId(LeaseOutDetails record);

    /**
     * 根据任务id删除领料出库详细
     * @param leaseOutDetails
     * @return
     */
    int deleteLeaseOutDetails(LeaseOutDetails leaseOutDetails);

    /**
     * 添加领料出库明细lease_out_num
     * @param record
     * @return
     */
    int insertLeaseOutNum(LeaseOutDetails record);

    /**
     * 修改机具数据
     * @param record
     * @return
     */
    int updateMachine(LeaseOutDetails record);

    /**
     * 修改领料出库详细
     * @param leaseApplyInfo
     * @return
     */
    int updateLeaseOutSign(LeaseApplyInfo leaseApplyInfo);
}
