package com.casic.missiles.service.finance;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.casic.missiles.dto.BaseApprovalSubmitRequest;
import com.casic.missiles.dto.ReturnDTO;
import com.casic.missiles.dto.finance.*;
import com.casic.missiles.dto.flowable.ApprovalDeleteRequest;
import com.casic.missiles.model.finance.FinanceAgreementInfo;

import java.util.List;

/**
 * <p>
 * 合同表 服务类
 * </p>
 *
 * @author wangpeng
 * @since 2023-03-31
 */
public interface IFinanceAgreementInfoService extends IService<FinanceAgreementInfo> {

    List<AgreementApprovalListResponse> agreementApprovalListPage(AgreementApprovalListRequest request, Page<AgreementApprovalListResponse> page) throws Exception;

    ReturnDTO<AgreementInfoSaveResponse> saveAgreementInfo(FinanceAgreementInfo agreementInfo);

    ReturnDTO agreementDraftUpdate(FinanceAgreementInfo agreementInfo);

    ReturnDTO submitAgreement(BaseApprovalSubmitRequest request);

    ReturnDTO agreementDelete(Long id);

    ReturnDTO<FinanceAgreementInfo> agreementDetail(Long id) throws Exception;

    ReturnDTO agreementApprovalDelete(ApprovalDeleteRequest request);

    ReturnDTO agreementFailUpdate(FinanceAgreementInfo agreementInfo);

    Page<FinanceAgreementInfo> listPage(Page<FinanceAgreementInfo> page, AgreementListRequest request) throws Exception;

    List<FinanceAgreementInfo> list(AgreementListRequest request) throws Exception;
}
