import { defHttp } from '@/utils/http/axios';
enum Api {
  // 巡查台账-人员
  GetPunchStatistics = '/api/MiViolationReport/GetPunchStatistics',
  // 巡查台账-人员-巡查次数
  GetPunchDetailData = '/api/MiViolationReport/GetPunchDetailData',
  // 巡查台账-人员-上报次数
  GetReportDetailData = '/api/MiViolationReport/GetReportDetailData',
  // 巡查台账-人员-处理次数
  GetDealDetailData = '/api/MiViolationReport/GetDealDetailData',
  
  // 巡查台账-点位
  GetPointPunchStatistics = '/api/MiViolationReport/GetPointPunchStatistics',
  // 巡查台账-点位-巡查次数
  GetPointPunchDetailData = '/api/MiViolationReport/GetPointPunchDetailData',
  // 巡查台账-点位-上报次数
  GetPointReportDetailData = '/api/MiViolationReport/GetPointReportDetailData',
  // 巡查台账-点位-处理次数
  GetPointDealDetailData = '/api/MiViolationReport/GetPointDealDetailData',
  // 违法处理台账
  GetReportStatistics = '/api/MiViolationReport/GetReportStatistics',
  // 巡查台账清单
  LoadPunchRecordPage = '/api/MiViolationReport/LoadPunchRecordPage',
}
export function GetPunchStatistics(params) {
  return defHttp.get({
    url: Api.GetPunchStatistics,
    params,
  });
}
export const getUserCountApi = (type: string, params) => {
  switch(type){
    case "punchCount":
      return GetPunchDetailData(params)
    case "reportCount":
      return GetReportDetailData(params)
    case "dealCount":
      return GetDealDetailData(params)
  }
}
export function GetPunchDetailData(params: { userid: string, begindate?: string, enddate?: string }) {
  return defHttp.get({
    url: Api.GetPunchDetailData,
    params,
  });
}
export function GetReportDetailData(params: { userid: string, begindate?: string, enddate?: string }) {
  return defHttp.get({
    url: Api.GetReportDetailData,
    params,
  });
}
export function GetDealDetailData(params: { userid: string, begindate?: string, enddate?: string }) {
  return defHttp.get({
    url: Api.GetDealDetailData,
    params,
  });
}


export const getPointCountApi = (type: string, params) => {
  switch(type){
    case "punchCount":
      return GetPointPunchDetailData(params)
    case "reportCount":
      return GetPointReportDetailData(params)
    case "dealCount":
      return GetPointDealDetailData(params)
  }
}
export function GetPointPunchStatistics(params) {
  return defHttp.get({
    url: Api.GetPointPunchStatistics,
    params,
  });
}

export function GetPointPunchDetailData(params: { pointid: string, begindate?: string, enddate?: string }) {
  return defHttp.get({
    url: Api.GetPointPunchDetailData,
    params,
  });
}
export function GetPointReportDetailData(params: { pointid: string, begindate?: string, enddate?: string }) {
  return defHttp.get({
    url: Api.GetPointReportDetailData,
    params,
  });
}
export function GetPointDealDetailData(params: { pointid: string, begindate?: string, enddate?: string }) {
  return defHttp.get({
    url: Api.GetPointDealDetailData,
    params,
  });
}



export function GetReportStatistics(params) {
  return defHttp.get({
    url: Api.GetReportStatistics,
    params,
  });
}
export function LoadPunchRecordPage(params) {
  return defHttp.get({
    url: Api.LoadPunchRecordPage,
    params,
  });
}