package com.bonus.material.lease.service;


import com.bonus.common.biz.domain.LeaseRecordInfo;
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
import com.bonus.common.biz.domain.lease.LeasePublishInfo;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.lease.domain.LeaseApplyDetails;
import com.bonus.material.lease.domain.LeasePublishDetails;
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
import com.bonus.material.lease.domain.vo.LeaseDeptInfo;
import com.bonus.material.ma.domain.Type;
import com.bonus.material.ma.domain.vo.MaTypeVoLevelTwo;

import java.util.List;

/**
 * @author hay
 * @description 业务办理--领用任务
 * @date 2025/2/17 13:15
 */
public interface ILeaseTaskService {


    /**
     * 新增领用任务
     *
     * @param leaseApplyRequestVo 领用任务
     * @return 结果
     */
    AjaxResult insertLeaseApplyInfo(LeaseApplyRequestVo leaseApplyRequestVo);

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

    /**
     * 领用记录详情查看
     *
     * @param id
     * @param keyWord
     * @return
     */
    LeaseApplyRequestVo selectLeaseApplyInfoById(Long id, String keyWord);

    /**
     * 修改领用任务
     *
     * @param leaseApplyRequestVo 领用任务
     * @return 结果
     */
    boolean updateLeaseApplyInfo(LeaseApplyRequestVo leaseApplyRequestVo);

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

    /**
     * 查询规格型号对应数据
     *
     * @param bean
     * @return
     */
    List<Type> getTypeDataList(Type bean);

    List<LeaseApplyInfo> selectAuditLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo);

    /**
     * 生成采购单号
     *
     * @return
     */
    LeaseDeptInfo getCode();

    List<MaTypeVoLevelTwo> selectParentId();


    /**
     * 查询物资类型3级--前端联动式下拉框
     * 没有4级规格型号
     * @return
     */
    List<Type> getEquipmentThreeTypes();

    LeaseApplyInfo getApplyInfo(Long taskId);


    List<LeaseApplyDetails> getApplyDetails(Long taskId);

    /**
     * 领用申请发布查询
     * @param leaseApplyInfo
     * @return
     */
    List<LeasePublishInfo> getPublishList(LeaseApplyInfo leaseApplyInfo);

    /**
     * 领用申请发布详情查询
     * @param leaseApplyInfo
     * @return
     */
    LeaseApplyRequestVo getDetailsById(LeaseApplyInfo leaseApplyInfo);

    /**
     * 发布数据保存
     * @param leaseApplyRequestVo
     * @return
     */
    AjaxResult addPublish(LeaseApplyRequestVo leaseApplyRequestVo);

    /**
     * 领用发布驳回
     * @param leaseApplyRequestVo
     * @return
     */
    AjaxResult leasePublishReject(LeaseApplyDetails leaseApplyRequestVo);

    /**
     * 领用发布终结
     * @param leaseApplyInfo
     * @return
     */
    AjaxResult endPublish(LeaseApplyInfo leaseApplyInfo);

    /**
     * 导出领料发布详情
     * @param leaseApplyInfo
     * @return
     */
    List<LeasePublishDetails> getPublishDetails(LeaseApplyInfo leaseApplyInfo);

    /**
     * 导出领料记录查询
     * @param leaseApplyInfo
     * @return
     */
    List<LeaseRecordInfo> getLeaseRecordList(LeaseApplyInfo leaseApplyInfo);

    /**
     * 领用申请发布详情查询
     * @param typeId
     * @return
     */
    AjaxResult getPendingOutNumByTypeId(Long typeId);

    /**
     * 领用出库驳回
     * @param leaseApplyDetails
     * @return
     */
    AjaxResult leaseOutReject(LeaseApplyDetails leaseApplyDetails);

    /**
     * 领料详情删除
     * @param leaseApplyDetails
     * @return
     */
    AjaxResult delLeaseDetails(LeaseApplyDetails leaseApplyDetails);
}

