/**
 * 数据查询接口
 */
import request from '@/utils/request'
// import qs from 'qs'

export function personInOutRecord(params) {
  return request({
    url: '/statistics/personListPage',
    method: 'get',
    params
  })
}

export function carInOutRecord(params) {
  return request({
    url: '/statistics/carListPage',
    method: 'get',
    params
  })
}

// 各营门人员出入次数
export function personInOutCount(params) {
  return request({
    url: '/statistics/personPassCount',
    method: 'get',
    params
  })
}

// 各营门车辆出入次数
export function carInOutCount(params) {
  return request({
    url: '/statistics/carPassCount',
    method: 'get',
    params
  })
}

// 人员所处时长统计
export function personDurationStatistics(params) {
  return request({
    url: '/statistics/personDurationListPage',
    method: 'get',
    params
  })
}

// 车辆所处时长统计
export function carDurationStatistics(params) {
  return request({
    url: '/statistics/carDurationListPage',
    method: 'get',
    params
  })
}

// 综合控制室数量统计
export function getStatisticsData() {
  return request({
    url: '/overview/statistics',
    method: 'get'
  })
}

// 今日进出营情况占比
export function inOutToday() {
  return request({
    url: '/overview/todayPassPercentage',
    method: 'get'
  })
}

// 各类型设备安装数量
export function devCount() {
  return request({
    url: '/overview/devicePercentage',
    method: 'get'
  })
}

// 进出营数量统计
export function inOutCount(params) {
  return request({
    url: '/overview/passCountByType',
    method: 'get',
    params
  })
}

// 各重点区域出入情况
export function inOutKeyCount() {
  return request({
    url: '/overview/keyareaPassPercentage',
    method: 'get'
  })
}

// 各类型报警数量统计
export function devAlarmCount(params) {
  return request({
    url: '/overview/alarmCountByType',
    method: 'get',
    params
  })
}

// 各营门出入营量统计
export function inOutDoorCount(params) {
  return request({
    url: '/overview/passCountByArea',
    method: 'get',
    params
  })
}
