package com.yunzhi.marketing.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhi.marketing.excel.ConsultantKPIExport;
import com.yunzhi.marketing.entity.TaPerson;
import com.yunzhi.marketing.entity.TaRecommendCustomer;
import com.yunzhi.marketing.entity.TsConsultantKpi;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 置业顾问KPI  服务类
 * </p>
 *
 * @author yansen
 * @since 2020-04-14
 */
public interface ITsConsultantKpiService extends IService<TsConsultantKpi> {

    IPage<TsConsultantKpi> stsKPIDaily(Integer pageNum, Integer pageSize, Integer orgId, Integer userId, String buildingId, String startDate, String endDate, String asc, String desc);

    TsConsultantKpi stsKPITotalByOrg(Integer orgId, Integer userId, String buildingId, String startDate, String endDate);

    List<ConsultantKPIExport> stsKPIDailyExport(Integer orgId, Integer userId, String buildingId, String startDate, String endDate);

    IPage<TaRecommendCustomer> getCustomerListOfConsultant(IPage<TaRecommendCustomer> page, Integer orgId, String userId, String buildingId, LocalDateTime startDate, LocalDateTime endDate);

    IPage<TaPerson> getConsultantShareCustomers(IPage<TaPerson> page, Integer orgId, String userId, String buildingId, LocalDateTime startDate, LocalDateTime endDate);

    IPage<TaPerson> getConsultantHomePagePersons(IPage<TaPerson> page, Integer orgId, String userId, String buildingId, LocalDateTime startDate, LocalDateTime endDate);

    IPage<TaPerson> getConsultantHomePageTimes(IPage<TaPerson> page, Integer orgId, String userId, String buildingId, LocalDateTime startDate, LocalDateTime endDate, String personId);

    IPage<TaPerson> getConsultantChatPersons(IPage<TaPerson> page, Integer orgId, String userId, String buildingId, LocalDateTime startDate, LocalDateTime endDate);

    IPage<TaPerson> getConsultantFavor(IPage<TaPerson> page, Integer orgId, String userId, String buildingId, LocalDateTime startDate, LocalDateTime endDate);

    IPage<TaPerson> getConsultantShareTargets(IPage<TaPerson> page, Integer orgId, String userId, String buildingId, LocalDateTime startDate, LocalDateTime endDate, String targetType, String targetName);

    IPage<TaPerson> getConsultantSharePersons(IPage<TaPerson> page, Integer orgId, String userId, String buildingId, LocalDateTime startDate, LocalDateTime endDate);

    IPage<TaPerson> getConsultantShareTimes(IPage<TaPerson> page, Integer orgId, String userId, String buildingId, LocalDateTime startDate, LocalDateTime endDate, String targetType, String targetName, String userName, String personId);
}
