package com.jeeplus.finance.projectReport.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.finance.projectReport.domain.CwProjectReportData;
import com.jeeplus.finance.projectReport.domain.CwProjectReview;
import com.jeeplus.finance.reimbursementApproval.approvalInfo.service.dto.ReportNoDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author: 王强
 * @create: 2022-12-12 20:35
 **/
@Mapper
//@InterceptorIgnore(tenantLine = "true")
public interface CwProjectReportReviewMapper extends BaseMapper<CwProjectReview> {

    @InterceptorIgnore(tenantLine = "true")
    CwProjectReview selectByReportId(String id);

    void updateReviewStatysByReportId(@Param("reviewStatus") String reviewStatus,@Param("id") String id,
                                      @Param("needUpdate2") String needUpdate2,
                                      @Param("needUpdate3") String needUpdate3,
                                      @Param("remark2") String remark2,
                                      @Param("remark3") String remark3
                                      );

    void updateReviewStatusByReportId(@Param("reviewStatus") String reviewStatus,@Param("reportId") String reportId);

    CwProjectReportData selectByPortId(String id);

    /**
     * 根据reportId获取关联的项目id
     * @param id
     * @return
     */
    String getProjectIdByReportId(String id);

    /**
     * 根据报告号查询报告信息
     * @param number
     * @return
     */
    ReportNoDto getProjectReportByNumber(String number);


    @InterceptorIgnore(tenantLine = "true")
    CwProjectReview selectById(String id);

    @InterceptorIgnore(tenantLine = "true")
    void updateReviewById(CwProjectReview review);

}
