package com.goafanti.RD.service;

import com.goafanti.RD.bo.InputRdDetails;
import com.goafanti.RD.bo.InputRdList;
import com.goafanti.RD.bo.OutRdDetails;
import com.goafanti.common.bo.Result;
import com.goafanti.common.model.RdDetails;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

public interface RDService {
    int add(RdDetails in);



    OutRdDetails details(Long id);

    Object list(InputRdList in);

    Object batchList(MultipartFile file);

    Result exportList(InputRdList in, String uploadPath);

    /**
     *
     * @param rdNo 编号
     * @param id 新增为null 修改为当前编号
     * @return
     */
    boolean checkRdNo(String rdNo, Long id);

    int update(InputRdDetails in);

    /**
     *
     * @param id 编号
     * @param type  0为浏览 1为下载
     * @return
     */
    int updateBrowseOrDownload(Long id, Integer type);

    void pushDownloadDetailsWord(Long id, HttpServletResponse response);

    void pushDownloadDetailsPDF(Long id, HttpServletResponse response);
}
