package com.jeeplus.finance.projectReportArchive.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.finance.invoice.domain.CwFinanceInvoice;
import com.jeeplus.finance.projectReportArchive.domain.CwProjectReportArchive;
import com.jeeplus.finance.projectReportArchive.service.dto.CwProjectReportArchiveDTO;
import com.jeeplus.finance.projectReportArchive.service.dto.ReportDTO;
import com.jeeplus.finance.projectReportArchive.service.dto.WorkAttachmentArchiveDto;
import com.jeeplus.sys.domain.WorkAttachmentInfo;
import com.jeeplus.sys.service.dto.UserDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
//@InterceptorIgnore(tenantLine = "true")
public interface CwProjectReportArchiveMapper extends BaseMapper<CwProjectReportArchive> {
    @InterceptorIgnore(tenantLine = "true")
    List<WorkAttachmentArchiveDto> findDtos(@Param("id") String id);

    void updateBorrowTypeById(@Param("id") String id, @Param("status")String status);
    //@InterceptorIgnore(tenantLine = "true")
    IPage<CwProjectReportArchiveDTO> findList(Page<CwProjectReportArchiveDTO> page, @Param("currentUser") UserDTO currentUser, @Param("isBmzr") String isBmzr, @Param("officeIds") String officeIds, @Param(Constants.WRAPPER) QueryWrapper<CwProjectReportArchive> queryWrapper, @Param("sta") String sta);

    @InterceptorIgnore(tenantLine = "true")
    CwProjectReportArchiveDTO queryById(@Param("id") String id);

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

    /**
     * 根据报告id查询信息
     * @param reportId
     * @return
     */
    CwProjectReportArchiveDTO queryByReportId(@Param("reportId") String reportId);


    /**
     * 修改归档信息
     * @param cwProjectReportArchive
     */
    @InterceptorIgnore(tenantLine = "true")
    void updateInfoById(CwProjectReportArchive cwProjectReportArchive);

    void updateAuditMoneyByReportId(CwProjectReportArchive cwProjectReportArchive);

    /**
     * 查询暂时未归档报告归档数据
     * @param queryWrapper
     * @return
     */
    @InterceptorIgnore(tenantLine = "true")
    List<CwProjectReportArchiveDTO> getNotFiledYetList (@Param(Constants.WRAPPER) QueryWrapper<CwProjectReportArchive> queryWrapper);

}




