package org.jeecg.ctop.material.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import org.jeecg.common.api.vo.Result;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
import java.util.Set;

public interface IMaterialReportOverViewV2Service {

    //递归查询下级
    Set<String> recursiveQuerySubordinate(String userId);
    List<JSONObject> getDesignTeamList(String userId, int mediaId);

    //查询用户参与的项目
    Set<JSONObject> queryProjectBy(Set<String> userIds, int mediaId);

    JSONArray queryProjectIdBy(Set<String> userIds, int mediaId);

    //查询总消耗、视频总数、爆款视频数、有效是视频数
    Map<String,Object> getTotalModule(int mediaId, String startDate, String endDate, JSONArray projects, String dimension, String leaderId, String designerId, String userId);
    //查询 视频上新 和 有效
    Map<String,Object> sumDataVideoNewEffective(int mediaId, String startDate, String endDate, JSONArray projects, String dimension, String leaderId, String designerId, String userId);
    //查询 爆款
    Map<String,Object> sumDataVideoHot(int mediaId, String startDate, String endDate, JSONArray projects, String dimension, String leaderId, String designerId, String userId, int type);

    //查询消耗趋势图
    List<JSONObject> getTotalChat(int mediaId, String startDate, String endDate, JSONArray projects, String dimension, String leaderId, String designerId, String userId);

    //查询标签占比图
    JSONObject getTagProportion(int mediaId, String startDate, String endDate, int tagId);

    //查询Top素材排行榜
    List<JSONObject> getTopMaterialList(int mediaId, String startDate, String endDate, JSONArray projects, String dimension, String leaderId, String designerId, String userId, Integer channelType);

    //素材查看更多
   PageInfo<JSONObject> getTopMaterialList(Integer mediaId, String startDate, String endDate, JSONArray projects, String userId, String md5, String dimension, String leaderId, String designerId, Integer materialQuality, Integer materialType, Integer innovative, String target, String order, Integer pageNo, Integer pageSize);

    //导出
    void exportBytedanceExcel(JSONObject requestBody, HttpServletRequest request, HttpServletResponse response);

    void exportKuaishouExcel(JSONObject requestBody, HttpServletRequest request, HttpServletResponse response);

    //查询设计人员排行榜
    PageInfo getTopDesignList(Integer mediaId, String startDate, String endDate,String userId, Integer type, int pageNUmber, int pageSize);

    // 视频详情页
    JSONObject getMaterialDetailInfo(int mediaId, String md5);

    Map<String,Object> materialDetailAnalyse(int mediaId, String md5);

    List<JSONObject> getMaterialDetailChat(int mediaId, String md5);
    //查询人群分析数据列表
    Result populationAnalysisList(String signature);
    //查询人群分析数据图
    Result populationAnalysisChart(String signature);
    /**  最优定向组合
     * @param
     * @return
     */
    Result optimalCombination(String signature);
    /**  相似素材
     * @param
     * @return
     */
    Result similarMaterial(String signature);

    Map<String, Object> getDesignerAvgData(Integer mediaId, String startDate, String endDate, String userId, String leaderId);
    /**
     * 标签占比
     */
    JSONObject labelRatio(Integer mediaId, String startDate, String endDate, JSONArray projects, String dimension, String leaderId, String designerId, String userId, int type);

    Result getRole(String userId);
}
