package com.bonus.sgzb.material.mapper;

import com.bonus.sgzb.base.api.domain.*;
import com.bonus.sgzb.material.domain.LeaseApplyDetails;
import com.bonus.sgzb.material.domain.LeaseApplyInfo;
import com.bonus.sgzb.material.domain.TmTask;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author：梁超
 * @date：2024/3/4 - 14:49
 */
@Mapper
public interface WorkSiteDirectManageMapper {

    /**
     * 根据协议id查询在用数据
     *
     * @param
     * @return
     */
    List<SltAgreementInfo> getUseringData(SltAgreementInfo sltAgreementInfo);

    int saveDirectApplyInfo(DirectApplyInfo directApplyInfo);


    int saveDirectApplyDetails(DirectApplyDetails directApplyInfo);

    int refuseDirectApplyInfo(DirectApplyInfo directApplyInfos);


    List<DirectApplyInfo> getList(DirectApplyInfo directApplyInfo);

    DirectApplyInfo getDirectApplyInfoById(String id);

    int insertSelective(LeaseApplyInfo leaseApplyInfo);

    int batchInsert(List<LeaseApplyDetails> leaseApplyDetailsList);

    int batchDel(@Param("ids") ArrayList<Integer> ids);

    DirectApplyInfo getMachineStatus(LeaseOutDetails leaseOutDetails);

    int updateLeaseApplyDetailsOutNum(@Param("record")LeaseOutDetails leaseOutDetails);

    int insertLeaseOutDetails(LeaseOutDetails leaseOutDetails);

    List<DirectApplyInfo> getListLease();

    int updateMaTypeStockNum(@Param("record")LeaseOutDetails leaseOutDetails);

    int updateMaMachineStatus(@Param("record")LeaseOutDetails leaseOutDetails);

    int insertBackApplyInfo(TmTask task);

    DirectApplyInfo getInfoById(SltAgreementInfo sltAgreementInfo);

    List<DirectApplyDetails> getDetailById(SltAgreementInfo sltAgreementInfo);

    List<DirectApplyInfo> getListAll();
}
