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.TBCrmResult;
import com.qmth.sop.business.bean.result.UserArchivesAllocationResult;
import com.qmth.sop.business.bean.result.UserArchivesAllocationSubTotalResult;
import com.qmth.sop.business.bean.result.analyze.serviceUnit.ServiceUnitOverview;
import com.qmth.sop.business.bean.result.analyze.serviceUnit.ServiceUnitPersonnel;
import com.qmth.sop.business.entity.TBService;

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

public interface ServiceAnalyseService extends IService<TBService> {
    List<TBService> list(Long startTime, Long endTime);

    @Deprecated
    Map<String, Object> overview1(Long serviceUnitId);

    ServiceUnitOverview overview(Long serviceUnitId);

    Map<String, Object> supplier(Long serviceUnitId);

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

    List<Map<String, Object>> supplierRole(Long serviceUnitId, Long supplierId);

    List<Map<String, Object>> supplierRegion(Long serviceUnitId, Long supplierId);

    List<Map<String, Object>> device(Long serviceUnitId);

    @Deprecated
    List<Map<String, Object>> personnel1(Long serviceUnitId);

    ServiceUnitPersonnel personnel(Long serviceUnitId);

    UserArchivesAllocationSubTotalResult findCrmAllocationSubTotal(Long serviceUnitId, Long regionId, Long supplierId);

    List<UserArchivesAllocationResult> findCrmAllocation(Long serviceUnitId, Long regionId, Long supplierId);

    /**
     * 查找当前大区待划定派单数量
     *
     * @param regionId
     * @return
     */
    int findWaitZone(Long regionId);
}
