package com.yunzhi.marketing.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhi.marketing.base.ResponseBean;
import com.yunzhi.marketing.entity.TaPersonBuilding;
import com.yunzhi.marketing.entity.TaPreselection;

import java.util.List;

/**
 * <p>
 * 预选表  服务类
 * </p>
 *
 * @author jobob
 * @since 2020-02-26
 */
public interface ITaPreselectionService extends IService<TaPreselection> {

    /**
     * 获取预选列表
     *
     * @param pageSize
     * @param pageNum
     * @param salesBatchName
     * @param buildingId
     * @param orgId
     * @param status
     * @return
     */
    ResponseBean listPresecretByCondition(Integer pageSize, Integer pageNum, String salesBatchName, String buildingId,
                                          Integer orgId, Integer status, List<TaPersonBuilding> taPersonBuildingListByUserId);

    /**
     * 批量删除
     *
     * @param taPreselectionList
     * @param orgId
     * @return
     */
    ResponseBean batchDelete(List<TaPreselection> taPreselectionList, Integer orgId);


    /**
     * @param id
     * @param orgId
     * @return
     */
    ResponseBean getPresecretById(Integer id, Integer orgId);

    /**
     * 校验批次下是否添加预选
     *
     * @param salesBatchId
     * @param orgId
     * @return
     */
    ResponseBean checkHavingRecordForSalesBatch(Integer salesBatchId, Integer orgId);

}
