import request from '@/utils/request'

// 质控活动
// 勤务组织相关接口
export function getAnalysisReport(data) {
  return request({
    url: '/system/analysisReport/check',
    method: 'post',
    data: data
  })
}

// 出勤人次分析
export function getCalculate(data) {
  return request({
    url: '/quality/attendance/calculate',
    method: 'post',
    data: data
  })
}

// 出勤人次趋势数据
export function getCalculateTrendData(data) {
  return request({
    url: '/quality/attendance/trend-data',
    method: 'post',
    data: data
  })
}

// 获取资质等级分布饼状图数据
export function getQualificationPieChart(query) {
  return request({
    url: '/statistics/qualification/pie-chart',
    method: 'get',
    params: query
  })
}

// 获取资质等级分布柱状图数据
export function getQualificationBarChart(query) {
  return request({
    url: '/statistics/qualification/bar-chart',
    method: 'get',
    params: query
  })
}

// 质控活动相关接口
// 获取物品分类统计
export function getCategoryStats(query) {
  return request({
    url: '/quality/item-category-stats/category-stats',
    method: 'get',
    params: query
  })
}

// 获取查获时段趋势图
export function getSeizureTimeTrend(query) {
  return request({
    url: '/quality/item-category-stats/seizure-time-trend',
    method: 'get',
    params: query
  })
}

// 获取隐匿夹带部位分布统计
export function getConcealmentPositionStats(query) {
  return request({
    url: '/quality/item-category-stats/concealment-position-stats',
    method: 'get',
    params: query
  })
}

// 获取岗位分类统计
export function getPostCategoryStats(query) {
  return request({
    url: '/quality/item-category-stats/post-category-stats',
    method: 'get',
    params: query
  })
}

// 获取通道排名统计
export function getChannelRankingStats(query) {
  return request({
    url: '/quality/item-category-stats/channel-ranking-stats',
    method: 'get',
    params: query
  })
}

// 获取各科室查获排名
export function getDepartmentRanking(query) {
  return request({
    url: '/quality/item-category-stats/brigade-ranking',
    method: 'get',
    params: query
  })
}

// 风险隐患相关接口
// 移交公安数据
export function getPoliceData(params = {}) {
  return request({
    url: '/quality/item-category-stats/police-data',
    method: 'get',
    params
  })
}

// 移交公安数据统计
export function getPoliceDataStats(params = {}) {
  return request({
    url: '/quality/item-category-stats/police-stats',
    method: 'get',
    params
  })
}

// X光机漏检数据
export function getXrayMissCheck(params = {}) {
  return request({
    url: '/quality/item-category-stats/xray-miss-check',
    method: 'get',
    params
  })
}

// X光机漏检人员统计TOP3
export function getXrayMissCheckStats(params = {}) {
  return request({
    url: '/quality/item-category-stats/xray-miss-check-top3',
    method: 'get',
    params
  })
}

// 异常查获数据
export function getAbnormalSeizureData(params = {}) {
  return request({
    url: '/quality/item-category-stats/abnormal-seizure-data',
    method: 'get',
    params
  })
}

// 异常查获数据TOP3
export function getAbnormalSeizureStats(params = {}) {
  return request({
    url: '/quality/item-category-stats/abnormal-seizure-data-top3',
    method: 'get',
    params
  })
}

// 抽问抽答相关接口
// 抽问抽答完成趋势
export function getCompletionTrend(params = {}) {
  return request({
    url: '/v1/cs/app/daily-exam/completion-comparison',
    method: 'get',
    params
  })
}

// 错题分析 - 总体问题分布
export function getWrongAnalysisOverview(params = {}) {
  return request({
    url: '/v1/cs/app/daily-exam/wrong-analysis/pc-overview',
    method: 'get',
    params
  })
}

// 错题分析 - 问题分布对比（雷达图）
export function getWrongAnalysisRadar(params = {}) {
  return request({
    url: '/v1/cs/app/daily-exam/wrong-analysis/pc-radar',
    method: 'get',
    params
  })
}

// 基于时间维度的绩效统计查询趋势图
export function getCalculateByTime(data) {
  return request({
    url: '/performance/dimension/calculate-by-time',
    method: 'post',
    data: data
  })
}

// 基于时间维度的绩效统计查询列表
export function getCalculateByTimeList(data) {
  return request({
    url: '/performance/dimension/calculate-by-time-list',
    method: 'post',
    data: data
  })
}

// 使用报告
export function getUsageReport(query) {
  return request({
    url: '/system/usageReport/report',
    method: 'get',
    params: query
  })
}