package com.casic.missiles.service.business;

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.business.outsource.*;
import com.casic.missiles.dto.flowable.ApprovalDeleteRequest;
import com.casic.missiles.model.business.BusinessOutsourcerInfo;

import java.util.List;

/**
 * <p>
 * 分包方 服务类
 * </p>
 *
 * @author wangpeng
 * @since 2023-03-23
 */
public interface IBusinessOutsourcerInfoService extends IService<BusinessOutsourcerInfo> {

    Page<BusinessOutsourcerInfo> listPage(Page<BusinessOutsourcerInfo> page, OutsourcerListRequest request) throws Exception;

    List<BusinessOutsourcerInfo> list(OutsourcerListRequest request);

    List<OutsourcerApprovalListResponse> outsourcerApprovalListPage(OutsourcerApprovalListRequest request, Page<OutsourcerApprovalListResponse> page) throws Exception;

    ReturnDTO addBusinessOutsourcerList(List<BusinessOutsourcerInfo> list) throws Exception;

    ReturnDTO<OutsourcerSaveResponse> saveOutsourcer(BusinessOutsourcerInfo outsourcerInfo);

    ReturnDTO draftUpdate(BusinessOutsourcerInfo outsourcerInfo);

    ReturnDTO submitOutsourcer(BaseApprovalSubmitRequest request);

    ReturnDTO deleteOutsourcer(Long id);

    ReturnDTO deleteBatchOutsourcer(List<Long> ids);

    ReturnDTO<BusinessOutsourcerInfo> outsourcerDetail(Long id) throws Exception;

    ReturnDTO approvalDelete(ApprovalDeleteRequest request);

    ReturnDTO failUpdate(BusinessOutsourcerInfo outsourcerInfo);
}
