package com.jeeplus.business.reimbursement.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.business.reimbursement.domain.*;
import com.jeeplus.business.reimbursement.service.dto.JyReimbursementInfoDTO;
import com.jeeplus.sys.domain.WorkAttachmentInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface JyReimbursementInfoMapper extends BaseMapper<JyReimbursementInfo> {

    IPage<JyReimbursementInfoDTO> findPageList(Page<JyReimbursementInfoDTO> page, @Param(Constants.WRAPPER) QueryWrapper<JyReimbursementInfoDTO> queryWrapper);

    List<WorkAttachmentInfo> findList(@Param("id") String id);

    Integer findIsExit(@Param("id") String id, @Param("name")String name);
    @InterceptorIgnore(tenantLine = "true")
    JyReimbursementInfo findById(@Param("id") String id);
    @InterceptorIgnore(tenantLine = "true")
    List<JyReimbursementDetailInfoBorrow> getBorrowDetailList(@Param("id")String id);
    @InterceptorIgnore(tenantLine = "true")
    List<JyReimbursementDetailInfoPayment> getPaymentDetailList(@Param("id")String id);
    @InterceptorIgnore(tenantLine = "true")
    List<JyReimbursementDetailInfoOther> getOtherDetailList(@Param("id")String id);

    List<WorkAttachmentInfo> findFiles(@Param("id") String id);

    @InterceptorIgnore(tenantLine = "true")
    List<JyReimbursementDetailInfoProject> getProjectDetailList(@Param("id")String id);

    void updateStatusById(@Param("status") String status,@Param("id") String id);
}
