package com.chinaweal.aiccs.aiccs.expelled.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chinaweal.aiccs.aiccs.auditing.entity.TSOpinion;
import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList;
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledApplyInfo;
import com.chinaweal.aiccs.aiccs.expelled.vo.AuditInfoVo;
import com.chinaweal.aiccs.aiccs.expelled.vo.RemoveApproveInfo;
import com.chinaweal.aicorg.model.AICUser;
import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery;
import com.chinaweal.youfool.framework.springboot.rest.RestResult;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Description: 市场主体除名申请业务表接口类
 * @Author: TiAmo-cc
 * @Email: 1049976610@qq.com
 * @Date: 2026/1/8 10:24
 */
public interface IExpelledApplyInfoService extends IService<ExpelledApplyInfo> {

    /**
     * 启动除名修复业务
     */
    RestResult<?> startRepairBiz(AuditInfoVo query, HttpServletRequest request);

    /**
     * 查询除名修复业务
     */
    RestResult<?> getRepairBiz(String bizId);

    /**
     * 除名修复业务审批流程
     */
    RestResult<?> nextRepairBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request);

    /**
     * 启动除名复议业务
     */
    RestResult<?> startReviewBiz(AuditInfoVo query, HttpServletRequest request);

    /**
     * 查询除名复议业务
     */
    RestResult<?> getReviewBiz(String bizId);

    /**
     * 除名复议业务审批流程
     */
    RestResult<?> nextReviewBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request);

    /**
     * 启动除名撤销业务
     */
    RestResult<?> startRevokeBiz(AuditInfoVo query, HttpServletRequest request);

    /**
     * 查询除名撤销业务
     */
    RestResult<?> getRevokeBiz(String bizId);

    /**
     * 除名复议撤销审批流程
     */
    RestResult<?> nextRevokeBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request);

    /**
     * 根据业务ID查询除名申请业务信息
     */
    ExpelledApplyInfo getExpelledApplyInfoByBizId(String bizId);

    TSTaskList startApplyBizAccept(AICUser user, TSTaskList tsTaskList, ExpelledApplyInfo applyInfo);

    TSTaskList saveApplyAuditProcess(AICUser user, TSTaskList tsTaskList, ExpelledApplyInfo applyInfo, TSOpinion opinion, String nextNodeId, String[] nextPerformerIds, String[] nextPerformerNames);

    /**
     * 分页查询撤销除名公告管理
     */
    IPage<ExpelledApplyInfo> listRevokeAnnouncement(BaseQuery<ExpelledApplyInfo> query);

    /**
     * 生成审批表
     */
    void createApproveDoc(ExpelledApplyInfo applyInfo, TSTaskList tsTaskList);

    /**
     * 下载审批表
     */
    void downloadApproveDoc(HttpServletResponse response, String bizId, String attachType);
}
