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.ExpelledBizInfo;
import com.chinaweal.aiccs.aiccs.expelled.entity.ExpelledEntInfo;
import com.chinaweal.aiccs.aiccs.expelled.vo.BizInfoVo;
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/5 10:51
 */
public interface IExpelledBizInfoService extends IService<ExpelledBizInfo> {

    /**
     * 启动除名告知业务
     */
    RestResult<?> startNoticeBiz(ExpelledBizInfo query, HttpServletRequest request);

    /**
     * 查询除名告知业务
     */
    RestResult<?> getNoticeBiz(String bizId);

    /**
     * 除名告知业务审批流程
     */
    RestResult<?> nextNoticeBiz(RemoveApproveInfo removeApproveInfo, HttpServletRequest request);

    TSTaskList startNoticeBizAccept(AICUser user, TSTaskList tsTaskList, ExpelledBizInfo noticeInfo);

    TSTaskList saveNoticeAuditProcess(AICUser user, TSTaskList tsTaskList, ExpelledBizInfo noticeInfo, TSOpinion opinion, String nextNodeId, String[] nextPerformerIds, String[] nextPerformerNames);

    /**
     * 根据业务号查询市场主体拟除名名单业务信息
     */
    ExpelledBizInfo getExpelledBizInfoByBizNo(String bizNo);

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

    /**
     * 分页查询可引用的市场主体拟除名告知业务信息
     */
    IPage<BizInfoVo> listTodoNoticeInfo(BaseQuery<BizInfoVo> query);

    /**
     * 生成审批表
     */
    void createApproveDoc(ExpelledBizInfo noticeInfo, TSTaskList tsTaskList);

    /**
     * 生成除名告知书
     */
    void createNoticeDoc(ExpelledEntInfo entInfo);

    /**
     * 下载除名告知书
     */
    void downloadNoticeDoc(HttpServletResponse response, String noticeNo);
}
