import {request} from '@/service/ajax'

const newsUrl = '/api/statistics/'
// 获取基本信息
//获取对应的统计类型
export const getUserType = (data) => request(newsUrl + 'type', 'post', { ...data },true)
//员工-工作数量统计
export const getUserWorkload = (data) => request(newsUrl + 'workload', 'post', { ...data },true)
//员工-任务工作明细
export const getUserWorkloadItem = (data) => request(newsUrl + 'workload-item', 'post', { ...data },true)
//员工-业绩汇总
export const getUserPerformance = (data) => request(newsUrl + 'performance', 'post', { ...data },true)
//员工-业绩明细
export const getUserPerformanceItem = (data) => request(newsUrl + 'performance-item', 'post', { ...data },true)

//管理员-财务汇总占比
export const getSysCashier = (data) => request(newsUrl + 'sys-cashier', 'post', { ...data },true)
//管理员-财务明细
export const getSysMoneyList = (data) => request(newsUrl + 'sys-money', 'post', { ...data },true)
//管理员-在途资金汇总
export const getSysPassage = (data) => request(newsUrl + 'sys-passage', 'post', { ...data },true)
//管理员-年龄区域统计
export const getSysAge = (data) => request(newsUrl + 'sys-age', 'post', { ...data },true)
//管理员-行业统计
export const getSysIndustry = (data) => request(newsUrl + 'sys-industry', 'post', { ...data },true)

//部长-业绩排行
export const getRanking = (data) => request(newsUrl + 'ranking', 'post', { ...data },true)
//部长-资金日报-资金报表统计
export const getDepartmentMoney = (data) => request(newsUrl + 'department-money', 'post', { ...data },true)
//部长-资金日报-员工业绩明细
export const getUserMoney = (data) => request(newsUrl + 'user-money', 'post', { ...data },true)
//部长-资金日报-员工任务明细
export const getUserItem = (data) => request(newsUrl + 'user-item', 'post', { ...data },true)

// 部长-消金统计-获取消类型
export const getConsumeType = (data) => request(newsUrl + 'consume-type', 'post', { ...data },true)
// 部长-消金统计-业绩报表统计
export const getConsumeMoney = (data) => request(newsUrl + 'consume-money', 'post', { ...data },true)
// 部长-消金统计-员工任务明细
export const getConsumeUser = (data) => request(newsUrl + 'consume-user', 'post', { ...data },true)
// 部长-消金统计-员工明细
export const getConsumeItem = (data) => request(newsUrl + 'consume-item', 'post', { ...data },true)

// 部长到访记录
export const getBusinessList = (data) => request(newsUrl + 'business-list', 'post', { ...data },true)
export const getRouteList = (data) => request(newsUrl + 'route-list', 'post', { ...data },true)
export const getUseList = (data) => request(newsUrl + 'use-list', 'post', { ...data },true)

// 获取统计状态
export const getStatus = (data) => request(newsUrl + 'status', 'post', { ...data },true)

export const getAdd = (data) => request(newsUrl + 'add', 'post', { ...data },true)
export const getCapitalMoney = (data) => request(newsUrl + 'capital', 'post', { ...data },true)
export const getStatisticsExcel = (data) => request(newsUrl + 'excel', 'post', { ...data },true)


// 员工-任务统计个人 同比环比  1
export const getUserContrastWorkload = (data) => request(newsUrl + 'contrast-workload', 'post', { ...data },true)
// 员工-业绩统计个人 同比环比   2
export const getUserContrastPerformance = (data) => request(newsUrl + 'contrast-performance', 'post', { ...data },true)

// 资金or提放 统计-部门 同比环比   4 or 6
export const getContrastDepartmentMoney = (data) => request(newsUrl + 'contrast-department-money', 'post', { ...data },true)
// 消金 统计-部门 同比环比   7
export const getContrastConsumeMoney = (data) => request(newsUrl + 'contrast-consume-money', 'post', { ...data },true)

// 汇总统计-公司 同比环比（财务汇总占比）  3
export const getContrastSysCashier = (data) => request(newsUrl + 'contrast-sys-cashier', 'post', { ...data },true)
// 汇总统计-公司 同比环比（任务资金汇总）  3
export const getContrastSysPassage = (data) => request(newsUrl + 'contrast-sys-passage', 'post', { ...data },true)
