package org.dromara.main.service;

import jakarta.servlet.http.HttpServletResponse;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.main.domain.bo.MainBackOrderBo;
import org.dromara.main.domain.bo.PortalCheckOrderCreateBo;
import org.dromara.main.domain.vo.MainBackOrderCandidateVo;
import org.dromara.main.domain.vo.MainBackOrderVo;

import java.util.List;

/**
 * 背调订单Service接口
 */
public interface IMainBackOrderService {

    /**
     * 查询背调订单分页列表
     */
    TableDataInfo<MainBackOrderVo> queryPageList(MainBackOrderBo bo, PageQuery pageQuery);

    /**
     * 查询门户当前企业的背调订单列表
     */
    List<MainBackOrderVo> queryPortalListByTenantId(String tenantId);

    /**
     * 查询门户订单详情
     */
    MainBackOrderVo queryPortalDetail(String orderNo, String tenantId);

    /**
     * 门户创建背调订单
     */
    MainBackOrderVo createPortalOrder(String tenantId, PortalCheckOrderCreateBo bo);

    /**
     * 门户余额支付
     */
    Boolean payOrderByBalance(Long orderId, String tenantId);

    /**
     * 完成背调订单
     */
    Boolean completeOrder(Long id);

    /**
     * 门户打印授权书后确认候选人授权
     */
    MainBackOrderCandidateVo confirmPortalCandidateAuthorization(Long recordId, String tenantId);

    /**
     * 生成或获取门户候选人报告
     */
    String generatePortalCandidateReport(Long recordId, String tenantId);

    /**
     * 下载门户候选人报告
     */
    void downloadPortalCandidateReport(Long recordId, String tenantId, HttpServletResponse response);
}
