package com.sunxung.factoring.service.purchcontractmanagement;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sunxung.factoring.entity.purchcontractmanagement.PurchContractApproval;
import com.sunxung.factoring.entity.purchcontractmanagement.vo.PurchContractApprovalVo;
import com.sunxung.factoring.entity.sys.FileStorage;

import java.io.IOException;

/**
 * @Description : 采购合同审批service
 * @Author : JiaYf
 * @Date: 2021-09-18 15:09
 */
public interface PurchContractApprovalService extends IService<PurchContractApproval> {

    /**
     * 查询信息、用于历史列表展示
     *
     * @param id
     * @return
     */
    PurchContractApprovalVo getView(Long id);

    /**
     * 获取详情
     *
     * @param id
     * @return
     */
    PurchContractApprovalVo getDetail(Long id);

    /**
     * 根据合同基本信息ID获取最新的审核信息
     *
     * @param id
     * @return
     */
    PurchContractApproval getLatestPurchContractApproval(Long id,Integer visible);

    /**
     * 法务审核
     *
     * @param purchContractApprovalVo
     * @return
     */
    void audit(PurchContractApprovalVo purchContractApprovalVo) throws IOException;

    /**
     * 制作合同
     * @param purchContractApprovalVo
     * @param makeContract
     * @return
     */
    FileStorage makeContractPdf(PurchContractApprovalVo purchContractApprovalVo, boolean makeContract);
}
