import request from '@/utils/request'
/** ****************行政网格报表*******************/
// 查询零售汇总
export function getCollectList1(data) {
  return request({
    url: '/ibs/GridCount/LsList',
    method: 'get',
    params: data
  })
}

// 查询公司汇总
export function getCollectList2(data) {
  return request({
    url: '/ibs/GridCount/GsList',
    method: 'get',
    params: data
  })
}

// 查询零售客户明细
export function getColDetailList1(data) {
  return request({
    url: '/ibs/GridCount/LsCustList',
    method: 'get',
    params: data
  })
}

// 查询公司客户明细
export function getColDetailList2(data) {
  return request({
    url: '/ibs/GridCount/GsCustList',
    method: 'get',
    params: data
  })
}

// 导出零售汇总
export function downloadLs(data) {
  return request({
    url: '/ibs/GridCount/exportLs',
    method: 'get',
    params: data,
    responseType: 'blob'
  })
}

// 导出公司汇总
export function downloadGs(data) {
  return request({
    url: '/ibs/GridCount/exportGs',
    method: 'get',
    params: data,
    responseType: 'blob'
  })
}

// 导出零售客户汇总
export function downloadLsCust(data) {
  return request({
    url: '/ibs/GridCount/exportLsCust',
    method: 'get',
    params: data,
    responseType: 'blob'
  })
}
// 导出公司客户汇总
export function downloadGsCust(data) {
  return request({
    url: '/ibs/GridCount/exportGsCust',
    method: 'get',
    params: data,
    responseType: 'blob'
  })
}

// 查询热力图数据-乡镇
export function searchEchartTownData(data) {
  return request({
    url: '/admin/region/town',
    method: 'get',
    params: data
  })
}

// 查询热力图数据-村
export function searchEchartVillageData(data) {
  return request({
    url: '/admin/region/village',
    method: 'get',
    params: data
  })
}

// 查询热力图业务指标
export function getPerIndcList(data) {
  return request({
    url: '/admin/region/index',
    method: 'get',
    params: data
  })
}

// 查询热力图详情数据
export function getHotMapInfo(data) {
  return request({
    url: '/admin/region/detail',
    method: 'get',
    params: data
  })
}

// 查询走访热力图数据-按区间查
export function getPointInfo1(data) {
  return request({
    url: '/trajectory/list',
    method: 'get',
    params: data
  })
}

// 查询走访热力图数据-按日期查
export function getPointInfo2(data) {
  return request({
    url: '/trajectory/date/list',
    method: 'get',
    params: data
  })
}

/** ****************自定义名单统计*******************/
// 查询零售名单统计
export function getCollectListNm1(data) {
  return request({
    url: '/ibs/gridVirtualCount/lsList',
    method: 'get',
    params: data
  })
}

// 查询公司名单统计
export function getCollectListNm2(data) {
  return request({
    url: '/ibs/gridVirtualCount/gsList',
    method: 'get',
    params: data
  })
}

// 查询零售名单统计客户明细
export function getColDetailListNm1(data) {
  return request({
    url: '/ibs/gridVirtualCount/lsCustList',
    method: 'get',
    params: data
  })
}

// 查询公司名单统计客户明细
export function getColDetailListNm2(data) {
  return request({
    url: '/ibs/gridVirtualCount/gsCustList',
    method: 'get',
    params: data
  })
}
// 导出零售名单统计
export function downloadLsNm(data) {
  return request({
    url: '/ibs/gridVirtualCount/lsExport',
    method: 'post',
    params: data,
    responseType: 'blob'
  })
}

// 导出公司名单统计
export function downloadGsNm(data) {
  return request({
    url: '/ibs/gridVirtualCount/gsExport',
    method: 'post',
    params: data,
    responseType: 'blob'
  })
}

// 导出零售名单统计客户汇总
export function downloadLsCustNm(data) {
  return request({
    url: '/ibs/gridVirtualCount/lsmxExport',
    method: 'post',
    params: data,
    responseType: 'blob'
  })
}
// 导出公司名单统计客户汇总
export function downloadGsCustNm(data) {
  return request({
    url: '/ibs/gridVirtualCount/gsmxExport',
    method: 'post',
    params: data,
    responseType: 'blob'
  })
}

/** ****************自定义地图网格报表*******************/
// 查询零售地图网格
export function getCollectListMap1(data) {
  return request({
    url: '/system/gridShapeCount/lsList',
    method: 'get',
    params: data
  })
}

// 查询公司地图网格
export function getCollectListMap2(data) {
  return request({
    url: '/system/gridShapeCount/gsList',
    method: 'get',
    params: data
  })
}

// 查询零售地图网格客户明细
export function getColDetailListMap1(data) {
  return request({
    url: '/system/gridShapeCount/lsCustList',
    method: 'get',
    params: data
  })
}

// 查询公司地图网格客户明细
export function getColDetailListMap2(data) {
  return request({
    url: '/system/gridShapeCount/gsCustList',
    method: 'get',
    params: data
  })
}
// 导出零售地图网格
export function downloadLsMap(data) {
  return request({
    url: '/system/gridShapeCount/lsExport',
    method: 'post',
    params: data,
    responseType: 'blob'
  })
}

// 导出公司地图网格
export function downloadGsMap(data) {
  return request({
    url: '/system/gridShapeCount/gsExport',
    method: 'post',
    params: data,
    responseType: 'blob'
  })
}

// 导出零售地图网格客户汇总
export function downloadLsCustMap(data) {
  return request({
    url: '/system/gridShapeCount/lsmxExport',
    method: 'post',
    params: data,
    responseType: 'blob'
  })
}
// 导出公司地图网格客户汇总
export function downloadGsCustMap(data) {
  return request({
    url: '/system/gridShapeCount/gsmxExport',
    method: 'post',
    params: data,
    responseType: 'blob'
  })
}

// 查询热力图数据-自定义地图
export function searchEchartMapData(data) {
  return request({
    url: '/admin/region/town',
    method: 'get',
    params: data
  })
}

// 自建名单网格热力图-公司
export function getHeatMapGsList(data) {
  return request({
    url: '/system/gridShapeCount/heatMapGsList',
    method: 'get',
    params: data
  })
}

// 自建名单网格热力图-零售
export function getHeatMapLsList(data) {
  return request({
    url: '/system/gridShapeCount/heatMapLsList',
    method: 'get',
    params: data
  })
}

// 自建名单网格热力图-指标查询
export function getHeatMapIndexList(data) {
  return request({
    url: '/system/gridShapeCount/indexList',
    method: 'get',
    params: data
  })
}

// 自建名单网格热力图-零售-区域名称查询
export function getShapeNameLsList(data) {
  return request({
    url: '/system/gridShapeCount/shapeNameLsList',
    method: 'get',
    params: data
  })
}

// 自建名单网格热力图-公司-区域名称查询
export function getShapeNameGsList(data) {
  return request({
    url: '/system/gridShapeCount/shapeNameGsList',
    method: 'get',
    params: data
  })
}

// 网格整体业绩
// 查询零售整体业绩
export function getCollectListAll1(data) {
  return request({
    url: '/ibs/GridUnionCount/LsList',
    method: 'get',
    params: data
  })
}

// 查询公司整体业绩
export function getCollectListAll2(data) {
  return request({
    url: '/ibs/GridUnionCount/GsList',
    method: 'get',
    params: data
  })
}

// 查询零售整体业绩客户明细
export function getColDetailListAll1(data) {
  return request({
    url: '/ibs/GridUnionCount/LsCustList',
    method: 'get',
    params: data
  })
}

// 查询临海客户授权
export function getLicenseAuthorization(data) {
  return request({
    url: '/tabPersonal/licenseAuthorization',
    method: 'get',
    params: data
  })
}

// 查询公司整体业绩客户明细
export function getColDetailListAll2(data) {
  return request({
    url: '/ibs/GridUnionCount/GsCustList',
    method: 'get',
    params: data
  })
}
// 导出零售整体业绩
export function downloadLsAll(data) {
  return request({
    url: '/ibs/GridUnionCount/exportLs',
    method: 'get',
    params: data,
    responseType: 'blob'
  })
}

// 导出公司整体业绩
export function downloadGsAll(data) {
  return request({
    url: '/ibs/GridUnionCount/exportGs',
    method: 'get',
    params: data,
    responseType: 'blob'
  })
}

// 导出零售整体业绩客户汇总1000
export function downloadLsCustAll(data) {
  return request({
    url: '/ibs/GridUnionCount/exportLsCustLimit',
    method: 'get',
    params: data,
    responseType: 'blob'
  })
}
// 导出公司整体业绩客户汇总1000
export function downloadGsCustAll(data) {
  return request({
    url: '/ibs/GridUnionCount/exportGsCustLimit',
    method: 'get',
    params: data,
    responseType: 'blob'
  })
}
