package com.chinaweal.aiccs.aiccs.revoke.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaweal.aiccs.aiccs.auditing.entity.TSOpinion;
import com.chinaweal.aiccs.aiccs.revoke.entity.BizRevEnt;
import com.chinaweal.aiccs.aiccs.revoke.entity.Tsbizrevlist;
import com.chinaweal.aiccs.aiccs.revoke.entity.Tsrevtasklist;
import com.chinaweal.aiccs.aiccs.revoke.entity.dto.DirectRevokeDto;
import com.chinaweal.aiccs.aiccs.revoke.entity.dto.DirectRevokeResultDto;
import com.chinaweal.aicorg.model.AICUser;
import com.chinaweal.youfool.framework.springboot.mybatis.plus.BaseService;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Lee
 * @since 2021-03-26
 */
public interface TsbizrevlistService extends BaseService<Tsbizrevlist> {

    /**
     * 批量吊销待办启动
     * @param user 当前登录用户
     * @param revtaskListModel 待办信息
     * @param bizrevlists  拟吊销主体列表
     * @return 创建结果
     * @author lroyia
     * @since 2021年1月22日 13:36:00
     */
    Tsrevtasklist saveRevListAccept(AICUser user, Tsrevtasklist revtaskListModel, List<Tsbizrevlist> bizrevlists);

    IPage<Tsbizrevlist> queryRevocationTzsList(IPage<Tsbizrevlist> page);

    IPage<Tsbizrevlist> queryRevocationJdsList(IPage<Tsbizrevlist> page);

    IPage<Tsbizrevlist> queryRevocationTzsByNameList(IPage<Tsbizrevlist> page, Map<String, Object> pram);

    IPage<Tsbizrevlist> queryRevocationJdsByNameList(IPage<Tsbizrevlist> page, Map<String, Object> pram);

    BizRevEnt getByPripidandBizseq(String pripid, String bizseq);

    IPage<Tsbizrevlist> getNoOpenRevListPage(IPage<Tsbizrevlist> page, Map<String, Object> paramMap);

    List<Tsbizrevlist> getBizRevEntList(Tsbizrevlist bizrevlistParam);


    IPage<Tsbizrevlist> getRevEntPage(IPage<Tsbizrevlist> page, Map<String, Object> pram);

    List<Tsbizrevlist> selectInBiz(String pripid);

    Tsbizrevlist getOneBybizseq(String bizseq);

    /**
     * 生成听证告知书pdf文件流供下载预览
     * @param bizseq
     * @param pripid
     * @param fileName
     * @param os
     * @throws Exception
     */
    void createHearingPdf (String bizseq,String pripid, String fileName, ServletOutputStream os)throws Exception;

    /**
     * 生成处罚决定书pdf文件流供下载预览
     * @param bizseq
     * @param pripid
     * @param fileName
     * @param os
     * @throws Exception
     */
    void createPunishDecPdf(String bizseq,String pripid, String fileName, ServletOutputStream os)throws Exception;

    IPage<Tsbizrevlist> getForceLogoutNoticetPage(Page<Tsbizrevlist> objectPage, Map<String, Object> customParamMap);

    List<Tsbizrevlist> selectInZxBiz(String pripid);

    /**
     * 批量直接吊销市场主体（无需审批）
     * @param dto 批量直接吊销请求参数
     * @param user 当前登录用户
     * @return 吊销结果
     */
    DirectRevokeResultDto directRevoke(DirectRevokeDto dto, AICUser user);
}
