package com.bonus.sgzb.material.mapper;

import com.bonus.sgzb.base.api.domain.SltAgreementApply;
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
import com.bonus.sgzb.base.api.domain.SltAgreementRelation;
import com.bonus.sgzb.material.domain.AgreementInfo;
import com.bonus.sgzb.material.domain.TmTask;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * @author c liu
 * @date 2024/2/22
 */
@Mapper
public interface SltAgreementInfoMapper {
    List<AgreementInfo> getSltAgreementInfo(AgreementInfo bean);

    List<SltAgreementInfo> getLeaseList(AgreementInfo bean);
    List<SltAgreementInfo> getLeaseListOne(AgreementInfo bean);
    List<SltAgreementInfo> getLeaseListThree(AgreementInfo bean);

    List<TmTask> getTaskList(@Param("bean") AgreementInfo bean, @Param("taskType")String taskType);

    List<SltAgreementInfo> getRepairDetailsList(@Param("taskList") List<TmTask> taskList);

    List<SltAgreementInfo> getScrapDetailsList(@Param("taskList") List<TmTask> taskList);

    List<SltAgreementInfo> getLoseList(AgreementInfo bean);

    int selectNumByDate(Date nowDate);

    int insApply(SltAgreementApply apply);

    int insRelation(SltAgreementRelation relation);

    int insDetails(SltAgreementInfo info);

    List<SltAgreementApply> getSltExam(AgreementInfo bean);

    List<SltAgreementRelation> getRelations(SltAgreementApply apply);

    String getCost(SltAgreementApply apply);

    int updateInfoStatus(String agreementId);

    int updateRelation(SltAgreementApply apply);

    int updateApply(SltAgreementApply apply);

    int updateMaStatus(SltAgreementInfo agreementInfo);

    int updateTrimDay(SltAgreementInfo sltAgreementInfo);

    int updateInfoOneStatus(SltAgreementInfo apply);

    List<SltAgreementInfo> getLeaseListOneMonth(@Param("bean") AgreementInfo bean, @Param("ids") List<String> idList);

    List<SltAgreementInfo> getLeaseListThreeMonth(AgreementInfo bean);

    List<SltAgreementInfo> getLeaseListMonth(AgreementInfo bean);

    List<SltAgreementInfo> getLeaseListMonthNotNull(AgreementInfo bean);

    List<SltAgreementInfo> getPreScrapDetailsList(@Param("taskList") List<TmTask> taskList);

    int updateOutSourceCosts(SltAgreementInfo sltAgreementInfo);

     int updateBmAgreementInfo(@Param("agreementId") String agreementId);

    int updateRecodeIsSlt(String id);
}
