package com.qmth.sop.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.sop.business.bean.result.CrmAnalyseResult;
import com.qmth.sop.business.bean.result.TBCrmResult;
import com.qmth.sop.business.entity.TBCrm;
import com.qmth.sop.common.enums.ProductTypeEnum;

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


/**
 * @author dhshu
 * @date:
 */
public interface CrmAnalyseService extends IService<TBCrm> {
    Map<String, Object> countCustomType(Long startTime, Long endTime);

    IPage<TBCrmResult> customTypeDetail(Page<Object> objectPage, Long startTime, Long endTime, ProductTypeEnum type);

    Map<String, List<Map<String, Object>>> monthly(Long startTime, Long endTime, ProductTypeEnum type);

    IPage<TBCrmResult> monthlyDetail(Page<Object> objectPage, String year, String month, ProductTypeEnum type, Long startTime, Long endTime);

    List<CrmAnalyseResult> supplier(Long startTime, Long endTime);

    IPage<TBCrmResult> supplierDetail(Page<Object> objectPage, Long startTime, Long endTime, Long supplierId);

    List<CrmAnalyseResult> region(Long startTime, Long endTime, ProductTypeEnum type);

    IPage<TBCrmResult> regionDetail(Page<Object> objectPage, Long startTime, Long endTime, String province, ProductTypeEnum type);

    List<CrmAnalyseResult> project(Long startTime, Long endTime);

    IPage<TBCrmResult> projectDetail(Page<Object> objectPage, Long startTime, Long endTime, Long serviceId);

    Map<String, Object> projectCount(Long startTime, Long endTime);
}
