import request from "@/api/request.js";

// 概览页--------------------------------------------------------------------
// 概览统计
export function getStatCount(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchHome/statCount`,
        params
    })
}

// 分类接口
export function getStatSort(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchHome/statSort`,
        params
    })
}

// 调查进展
export function getStatDetails() {
    return request({
        method: 'GET',
        url: `/api/marketsearchHome/statDetails`
    })
}


// 调查数量
/**
 * @param {byYorM} 
 */
export function getStatNum(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchHome/statNum`,
        params
    })
}

// 查询关税税率
/**
 * @param {byYorM} 
 */
export function getSearchTariff(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getSearchTariff`,
        params
    })
}

// 制裁领域分布
/**
 * @param {years} 
 */
export function getStatArea(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchHome/statArea`,
        params
    })
}

// 受调查企业地域分布
/**
 * @param {years} 
 */
export function getCompanyPlace(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchHome/getOrgDistribution`,
        params
    })
}

// 制裁领域分布-企业接口分布
/**
 * @param {years} 
 */
export function getStatAreaCompanyList() {
    return request({
        method: 'GET',
        url: `/api/marketsearchHome/getOrgSanctionsDomain`,
    })
}

// 受调查国家分布
/**
 * @param {year, sortCode} 
 */
export function getSearchCountry(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getSearchCountry`,
        params
    })
}

// 调查结果分布
/**
 * @param {searchId, sortCode} 
 */
export function getSearchResult(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/searchResult`,
        params
    })
}

// 资源库
// 左侧行业领域列表
export function getHylyList() {
    return request({
        method: 'GET',
        url: `/api/billImpactAnalysis/industry/hylyList`,
    })
}

// 左侧发布机构
export function getSearchAllOrg(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getSearchAllOrg`,
        params
    })
}

// 左侧受调查国家/地区
export function getSearchAllCountry() {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getSearchAllCountry`,
    })
}

// 获取调查列表接口
/**
 * @param {currentPage, pageSize, sortCode, publishYear, Area, sortField, sortOrder} 
 */
export function getSurveyList(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchHome/statList`,
        params
    })
}


// 详情页---------------------------------------------------
// 调查分类详情接口
/**
 * @param { sortCode } 
 */
export function getSurvyInfo(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchHome/statSortDetails`,
        params
    })
}

// 查询调查的所有发布领域 /marketsearchDetails/getSearchAllArea
export function getSearchAllArea(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getSearchAllArea`,
        params
    })
}

// 查询调查的所有发布时间
export function getSearchAllYear(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getSearchYears`,
        params
    })
}


// 调查简介
export function getSearchBlurb(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/searchBlurb`,
        params
    })
}

// 获取原文
export function getOriginalUrl(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getOriginalUrl/${params.id}`,
    })
}

// 获取相关事件
export function getRelatedEvents(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getRelatedEvents`,
        params
    })
}
// 获取相关行政举措
export function getSearchAOMeasures(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getSearchAOMeasures`,
        params
    })
}

// 获取事件脉络
export function getSearchContext(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getSearchContext`,
        params
    })
}

// getSearchMeasures 报复性措施
export function getSearchMeasures(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getSearchMeasures`,
        params
    })
}


// /marketsearchDetails/getSearchDirection 查询调查方向和结果信息
export function getSearchDirection(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getSearchDirection`,
        params
    })
}

// 中国公司受调查情况 /marketsearchDetails/statcnOrgCount
export function getStatcnOrgCount(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/statcnOrgCount`,
        params
    })
}

// /marketsearchDetails/getSearchConclusion 查询调查结论
export function getSearchConclusion(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getSearchConclusion`,
        params
    })
}

// getReportAnalyze 报告分析
export function getReportAnalyze(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getReportAnalyze`,
        params
    })
}

// 被诉企业列表
export function getSuedOrg(params) {
    return request({
        method: 'GET',
        url: `/api/marketsearchDetails/getSuedOrg`,
        params
    })
}

// 进出口数据
export function getOrgImportAndExport(params) {
    return request({
        method: 'GET',
        url: `/api/organization/scale/getOrgImportAndExport`,
        params
    })
}

// 营收数据
export function getRevenue(params) {
    return request({
        method: 'GET',
        url: `/api/organization/scale/revenue`,
        params
    })
}

// 净利润数据
export function getNetProfit(params) {
    return request({
        method: 'GET',
        url: `/api/organization/scale/netProfit`,
        params
    })
}

// 获取调查进展状态列表
export function getAllProgressStatus() {
    return request({
        method: 'GET',
        url: `/api/marketsearchHome/getAllInvestProgressStatus`,
    })
}