/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.projectcontentinfo.dao;

import com.jeeplus.common.persistence.CrudDao;
import com.jeeplus.common.persistence.annotation.MyBatisDao;
import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 报告详情DAO接口
 * @author yangfan
 * @version 2018-06-05
 */
@MyBatisDao
public interface ProjectReportDataDao extends CrudDao<ProjectReportData> {

    ProjectReportData getNoInvalid(@Param("id") String id);

    ProjectReportData getNumber(ProjectReportData projectReportData);

    int updateFileStatus(ProjectReportData projectReportData);

    List<ProjectReportData> findInvalidList(ProjectReportData projectReportData);

    List<ProjectReportData> findInfoList(ProjectReportData projectReportData);
    List<ProjectReportData> findInfoListByStatus(ProjectReportData projectReportData);
    /**
     * 更新流程实例ID
     * @return
     */
    public int updateProcessInstanceId(ProjectReportData projectReportData);

    /**
     * 修改作废信息
     * @param projectReportData
     * @return
     */
    public int saveInvalid(ProjectReportData projectReportData);

    /**
     * 根据流程实例ID获取WorkReimbursement
     * @param processInstanceId
     * @return
     */
    public ProjectReportData getByProcessInstanceId(String processInstanceId);
    /**
     * 更新流程实例ID
     * @return
     */
    public int updateInvalidProcessInstanceId(ProjectReportData projectReportData);
    public void deleteReportDataInfo( @Param("reportId") String reportId);
    public void deleteReportDataBased( @Param("reportId") String reportId);
    public void deleteContentChange(@Param("infoId") String infoId);
    public String getChangeId(@Param("id") String id);

    /**
     * 根据流程实例ID获取WorkReimbursement
     * @param invalidProcessInstanceId
     * @return
     */
    public ProjectReportData getByInvalidProcessInstanceId(String invalidProcessInstanceId);

    void reportNumber(@Param("reportId") String reportId,@Param("number") String number,@Param("url") String url);

    int updateUpId(@Param("id")String id,@Param("upId")String upId);

    List<ProjectReportData> findByProjectId(String projectId);

    ProjectReportData findByNum(String number);
}