package cn.edu.whu.boot.statistics.mapper;

import cn.edu.whu.boot.statistics.bean.Collector;
import cn.edu.whu.boot.statistics.bean.CollectorWorkload;
import cn.edu.whu.boot.statistics.bean.ReviewerWorkload;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

@Repository
public interface CollectorMapper {

    int getTaskId(@Param("tskName") String tskName);

    List<Collector> getTaskWorkers(@Param("taskId") int taskId);

    List<HashMap> getCollectorRoute(@Param("collector") String name , @Param("tblName") String tblName);

    int getCollectorWorkLoad(@Param("tblName") String tblName , @Param("collector") int id);

    List<HashMap> getCollectorWorkLoadDaily(@Param("tblName") String tblName , @Param("collector") int id);

    List<HashMap<String, Long>> statDaily(@Param("tblName") String tblName);

    List<HashMap<String, Long>> statMonthly(@Param("tblName") String tblName);

    List<HashMap<String, Double>> statDailyRatio(@Param("tblName") String tblName);

    List<HashMap<String, Double>> statMonthlyRatio(@Param("tblName") String tblName);

    List<ReviewerWorkload> countWorkloadByReviewer(@Param("table") String table);

    List<CollectorWorkload> countWorkloadByCollector(@Param("table") String table);
}
