package com.bonus.material.lease.mapper;

import java.util.Date;
import java.util.List;
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
import com.bonus.common.biz.domain.lease.LeaseOutSign;
import org.apache.ibatis.annotations.Param;

/**
 * 领料任务Mapper接口
 * 
 * @author xsheng
 * @date 2024-10-16
 */
public interface LeaseApplyInfoMapper {
    /**
     * 查询领料任务
     * 
     * @param leaseApplyInfo
     * @return 领料任务
     */
    LeaseApplyInfo selectLeaseApplyInfoById(LeaseApplyInfo leaseApplyInfo);

    /**
     * 查询领料任务列表
     * 
     * @param leaseApplyInfo 领料任务
     * @return 领料任务集合
     */
    List<LeaseApplyInfo> selectLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo);

    /**
     * 新增领料任务
     * 
     * @param leaseApplyInfo 领料任务
     * @return 结果
     */
    int insertLeaseApplyInfo(LeaseApplyInfo leaseApplyInfo);

    /**
     * 修改领料任务
     * 
     * @param leaseApplyInfo 领料任务
     * @return 结果
     */
    int updateLeaseApplyInfo(LeaseApplyInfo leaseApplyInfo);

    /**
     * 领料任务电子签名
     */
    int updateLeaseApplyInfoSign(LeaseApplyInfo leaseApplyInfo);

    /**
     * 材料员确认
     * @param id
     * @param isConfirm
     * @param confirmTime
     * @param confirmRemark
     * @return
     */
    int confirmLeaseTask(@Param("id") String id,@Param("isConfirm") Integer isConfirm,@Param("materialMan") Long materialMan,@Param("confirmTime") Date confirmTime, @Param("confirmRemark") String confirmRemark);

    /**
     * 删除领料任务
     * 
     * @param id 领料任务主键
     * @return 结果
     */
    int deleteLeaseApplyInfoById(Long id);

    /**
     * 批量删除领料任务
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int deleteLeaseApplyInfoByIds(Long[] ids);

    String getTaskId(Long parentId);

    /** 设置审批人为默认的董班长 --防止代码冲突 **/
    Long getDirectAuditBy();

    /** 设置审批人签名url  防止代码冲突  **/
    String getDirectAuditUrl(LeaseApplyInfo leaseApplyInfo);

    /** 设置发料单位  防止代码冲突  **/
    String getSendUnit(LeaseApplyInfo leaseApplyInfo);

    /**
     * 查询领用出库数据
     * @param leaseApplyInfo
     * @return
     */
    List<LeaseApplyInfo> selectPublishList(LeaseApplyInfo leaseApplyInfo);

    /**
     * 查询领料单的领料单出库签名
     * @param id
     * @return
     */
    List<LeaseOutSign> selectLeaseApplyOutList(Long id);

    /**
     * 修改领用发布签名
     * @param leaseApplyInfo
     * @return
     */
    int updateLeasePublishInfoSign(LeaseApplyInfo leaseApplyInfo);
}
