package com.jeeplus.test.cw.projectReport.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.test.cw.projectReport.domain.CwProjectReport;
import com.jeeplus.test.cw.projectReport.domain.CwProjectReportFile;
import com.jeeplus.test.cw.projectReport.service.dto.ProjectReportWorkAttachmentDTO;
import com.jeeplus.test.oss.domain.WorkAttachment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 新建行文件表
 * @author: 王强
 * @create: 2022-11-16 21:23
 **/
@Mapper
public interface ProjectReportWorkAttachmentMapper extends BaseMapper<CwProjectReportFile> {

    void updateFileInfo(ProjectReportWorkAttachmentDTO dto);

    List<String> getIdByAttachmentId(String id);

    List<String> getFileId(String id);

    void deleteByRepotyId(String id);

    void deleteByAttachMnentId(String id);

    List<ProjectReportWorkAttachmentDTO> selectByInfoId(String id);

    List<ProjectReportWorkAttachmentDTO> selectByInfoIdAndNewLineId(String id);

    CwProjectReportFile selectInfoByFileId(@Param("id") String id,@Param("fileType") String fileTType);

    /**
     * 查询电子章文件信息
     * @param id
     * @return
     */
    List<WorkAttachment> selectWorkAttachmentByReportId(String id);

    /**
     * 根据id修改文件信息（cw签章文件替换）
     * @param workattachment
     * @return
     */
    Integer updateByIdOnSignature(WorkAttachment workattachment);
}
