import request from '@/utils/request';
//查询sim卡列表
export function getList(data) {
  let param = '?pageIndex=' + data.page + '&size=' + data.size;
  if (data.iccid != '' && data.iccid != undefined) {
    param += '&iccid=' + data.iccid;
  }
  if (data.status != '' && data.status != undefined) {
    param += '&status=' + data.status;
  }
  return request({
    url: '/telcom/api/getSimList' + param,
    method: 'get',
    data,
  });
}
//查询单个卡流量使用情况
export function getTrafficBySim(data) {
  const param =
    '?accessNum=' + data.accessNum + '&billingCycleID=' + data.billingCycleID;
  return request({
    url: '/telcom/api/getTrafficBySim' + param,
    method: 'get',
    data,
  });
}
//sim卡绑定设备
export function simBindDevice(data) {
  const param =
    '?accessNum=' + data.accessNum + '&deviceCode=' + data.deviceCode;
  return request({
    url: '/telcom/api/simBindDevice' + param,
    method: 'post',
    data,
  });
}
//查询企业用户数
export function getSimTotal(data) {
  return request({
    url: '/telcom/api/getSimTotal',
    method: 'get',
    data,
  });
}
//本月流量排名
export function rankCurrentMonth(data) {
  return request({
    url: '/telcom/api/rankCurrentMonth',
    method: 'post',
    data,
  });
}
//根据项目id查询力鼎站点列表
export function ldDeviceByProjectId(data) {
  return request({
    url: '/telcom/api/ldDeviceByProjectId?projectId=' + data.projectId,
    method: 'get',
    data,
  });
}
