package com.chinaweal.aiccs.aiccs.seriousillegal.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaweal.aiccs.aiccs.abnormal.entity.EBaseinfo;
import com.chinaweal.aiccs.aiccs.abnormal.entity.dto.EntWritsDto;
import com.chinaweal.aiccs.aiccs.seriousillegal.entity.TSSerIllegalList;
import com.chinaweal.aiccs.common.base.entity.dto.task.UniTaskListDto;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 严重违法企业名单 Mapper 接口
 * </p>
 *
 * @author <a href="https://blog.lroyia.top">lroyia</a>
 * @since 2021-01-26
 */
public interface TSSerIllegalListMapper extends BaseMapper<TSSerIllegalList> {

    List<TSSerIllegalList> selectEntList(@Param("serIllegalModel") TSSerIllegalList serIllegalListModel);

    IPage<TSSerIllegalList> selectTSSerIllegalTimeoutByPage(IPage<TSSerIllegalList> page,
                                                            @Param("tsSerIllegalListModel") TSSerIllegalList tsSerIllegalListModel,
                                                            @Param("currentDate") Date currentDate);

    IPage<TSSerIllegalList> selectTSSerIllegalApplyByPage(IPage<TSSerIllegalList> page,
                                                         @Param("tsSerIllegalListModel") TSSerIllegalList tsSerIllegalListModel,
                                                         @Param("currentDate") Date currentDate);

    IPage<TSSerIllegalList> selectTSSerIllegalListByPage(IPage<TSSerIllegalList> page, @Param("tsSerIllegalListModel") TSSerIllegalList tsSerIllegalListModel);

    IPage<TSSerIllegalList> selectCreditTSSerIllegalByPage(IPage<TSSerIllegalList> page, @Param("tsSerIllegalListModel") TSSerIllegalList tsSerIllegalListModel);

    IPage<TSSerIllegalList> selectTSSerIllegalListCountByPage(IPage<TSSerIllegalList> page, @Param("tsSerIllegalListModel") TSSerIllegalList tsSerIllegalListModel,
                                                                         @Param("regorgArrStr")String[] regorgArrStr, @Param("territorialArrStr")String[] territorialArrStr);

    IPage<TSSerIllegalList> selectTSSerIllegalDissentByPage(IPage<TSSerIllegalList> page, @Param("tsSerIllegalListModel") TSSerIllegalList tsSerIllegalListModel);

    TSSerIllegalList getSerIllegalModel(@Param("tsSerIllegalListModel")TSSerIllegalList tsSerIllegalListModel, @Param("currentDate") Date currentDate);

    List<TSSerIllegalList> selectLimitInfoByPripid(@Param("pripid")String pripid);

    List<TSSerIllegalList> selectSerIllegalInfoList(@Param("pripid")String pripid);

    /**
     * 查询第一个严重违法失信企业名录
     * @param ew 查询参数与包装
     * @return 查询结果
     * @author lroyia
     * @since 2021年3月23日 14:52:17
     */
    TSSerIllegalList selectFirstIllegalListRecord(@Param(Constants.WRAPPER) Wrapper<TSSerIllegalList> ew);

    /**
     * 查询统一严重违法失信企业个人待办
     * @param page 分页参数
     * @param params 查询参数
     * @return  查询结果
     * @author lroyia
     * @since  2021年4月19日 16:54:33
     */
    IPage<UniTaskListDto> selectUniIllegalTaskListPage(IPage<UniTaskListDto> page, @Param("params") Map<String, Object> params);

    /**
     * 查询严重违法失信企业个人待办总量
     * @param params 查询参数
     * @return  统计结果
     * @author lroyia
     * @since  2021年4月19日 16:54:33
     */
    int selectIllegalTaskListCount(@Param("params") Map<String, Object> params);
    /**
     * 查询列入严重违法失信企业名单列表
     * @return 分页结果
     * @author lwd
     * @since  2021年8月05日 19:05:38
     */
    IPage<TSSerIllegalList> selectSerillegalList(IPage<TSSerIllegalList> page, @Param("params")Map<String, Object> params);

    List<TSSerIllegalList> queryByPripid(String pripid);

    TSSerIllegalList selecttsSerIllegalAppByMap(@Param("params")Map<String, Object> params);

    TSSerIllegalList selecttsSerIllegalAppByid(@Param("illegalListID")String illegalListID);

    List<TSSerIllegalList> listOutTimeIllegalList(@Param("date") String date);

    List<TSSerIllegalList> listCancelEnts();

    IPage<TSSerIllegalList> queryAbnormalLrList(IPage<TSSerIllegalList> iPage);

    IPage<TSSerIllegalList> queryAbnormalYcList(IPage<TSSerIllegalList> page);

    /**
     * 严重违法拟列入文书公示
     * @param page
     * @param pram
     * @return
     */
    IPage<EntWritsDto> queryToIllegalByNameList(IPage<EntWritsDto> page, @Param("params")Map<String, Object> pram);

    /**
     * 严重违法列入文书公示
     * @param page
     * @param pram
     * @return
     */
    IPage<EntWritsDto> queryAbnormalLrByNameList(IPage<EntWritsDto> page, @Param("params")Map<String, Object> pram);

    /**
     * 严重违法移出文书公示
     * @param page
     * @param pram
     * @return
     */
    IPage<EntWritsDto> queryAbnormalYcByNameList(IPage<EntWritsDto> page, @Param("params")Map<String, Object> pram);

    List<TSSerIllegalList> queryByzdyc();

    int countBySerill(String pripid, String abntime, String SPECAUSE, String SPEREASONS, String OPERATESTATUS);

    Boolean saveabnlistid(String abnlistid);

    IPage<EBaseinfo> queryEBaseinfoInSeriousIllegal(Page<EBaseinfo> eBaseinfoPage, @Param("entity") EBaseinfo entity);
}
