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.ExpelledAuditInfo;
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledEntInfo;
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledResultInfo;
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/7 10:41
 */
public interface IExpelledAuditInfoService extends IService<ExpelledAuditInfo> {

    /**
     * 分页查询已异议或者决定市场主体拟除名业务信息
     */
    IPage<AuditInfoVo> listHavedoAuditInfo(BaseQuery<AuditInfoVo> query);

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

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

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

    /**
     * 启动除名决定业务
     */
    RestResult<?> startAuditBiz(AuditInfoVo query, HttpServletRequest request);

    /**
     * 查询除名决定业务
     */
    RestResult<?> getAuditBiz(String bizId);

    /**
     * 除名决定业务审批流程
     */
    RestResult<?> nextAuditBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request);

    TSTaskList startBizAccept(AICUser user, TSTaskList tsTaskList, ExpelledAuditInfo auditInfo);

    TSTaskList saveAuditProcess(AICUser user, TSTaskList tsTaskList, ExpelledAuditInfo auditInfo, TSOpinion opinion, String nextNodeId, String[] nextPerformerIds, String[] nextPerformerNames);

    /**
     * 根据业务号查询市场主体拟除名名单异议/决定业务信息
     */
    ExpelledAuditInfo getExpelledAuditInfoByAuditNo(String auditNo);

    /**
     * 生成业务号
     */
    String generateAuditNo();

    /**
     * 生成审批表
     */
    void createApproveDoc(ExpelledAuditInfo auditInfo, TSTaskList tsTaskList);

    /**
     * 生成除名决定书
     */
    void createAuditDoc(ExpelledResultInfo resultInfo, ExpelledEntInfo entInfo);

    /**
     * 下载除名决定书
     */
    void downloadAuditDoc(HttpServletResponse response, String resultId, String noticeNo);
}
