package com.jeeplus.assess.assessSignatureDaily.mapper;

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.assess.assessSignatureDaily.domain.AssessSignatureProjectReportRelation;
import com.jeeplus.assess.assessSignatureDaily.service.dto.AssessSignatureProjectReportRelationDTO;
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 AssessSignatureProjectReportMapper extends BaseMapper<AssessSignatureProjectReportRelation> {

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

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

    AssessSignatureProjectReportRelationDTO findById(@Param("id") String id);

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

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

    void updateSignatureInfo(AssessSignatureProjectReportRelationDTO relationDTO);

    AssessSignatureProjectReportRelationDTO getByDocumentId(@Param("documentId") String documentId);

    AssessSignatureProjectReportRelationDTO getByContractId(@Param("contractId") String contractId);
}
