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.CwProjectReportData;
import com.jeeplus.test.cw.projectReport.domain.CwProjectReview;
import com.jeeplus.test.cw.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
public interface CwProjectReportReviewMapper extends BaseMapper<CwProjectReview> {

    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);

}
