import request from '@/utils/request'

/**      ------------------服务器带宽收益-------------------        */
// 查询列表
export function listBandWidth(data) {
    return request({
        url: '/system/bandwidth/list',
        method: 'post',
        data: data
    })
}

// 查询详细
export function getBandWidth(Id) {
    return request({
        url: '/system/bandwidth/' + Id,
        method: 'get'
    })
}

// 新增
export function addBandWidth(data) {
    return request({
        url: '/system/bandwidth',
        method: 'post',
        data: data
    })
}

// 修改
export function updateBandWidth(data) {
    return request({
        url: '/system/bandwidth',
        method: 'put',
        data: data
    })
}

// 重新计算
export function recalBandWidth(Id) {
  return request({
    url: '/system/bandwidth/recalculate/' + Id,
    method: 'get'
  })
}
// 相关数据
export function relatedBandWidth(data) {
  return request({
    url: '/system/bandwidth/relatedData/traffic?id=' + data['id'] + '&pageNum=' + data['pageNum'] + '&pageSize=' + data['pageSize'],
    method: 'get'
  })
}
// 月均日95的 相关数据
export function avgDetailMsg(Id) {
  return request({
    url: '/system/bandwidth/getAvgDetailMsg/' + Id,
    method: 'get'
  })
}
// 月均日95的新增
export function calculateAvg(data) {
  return request({
    url: '/system/bandwidth/calculateAvg',
    method: 'post',
    data: data
  })
}

// 包端----图
export function graPackage(data) {
  return request({
    url: '/system/bandwidth/graphicalAnalysisPackage',
    method: 'post',
    data: data
  })
}
// 95带宽值Mbps/月---图
export function graMonthly(data) {
  return request({
    url: '/system/bandwidth/graphicalAnalysisMonthly',
    method: 'post',
    data: data
  })
}
// 有效-95带宽值Mbps/月---图
export function graEffectiveMonthly(data) {
  return request({
    url: '/system/bandwidth/graphicalAnalysisEffectiveMonthly',
    method: 'post',
    data: data
  })
}
// 有效-95带宽值Mbps/日---图
export function graEffectiveDaily(data) {
  return request({
    url: '/system/bandwidth/graphicalAnalysisEffectiveDaily',
    method: 'post',
    data: data
  })
}
// 有效月均日95值----图
export function graEffectiveAvgMonthly(data) {
  return request({
    url: '/system/bandwidth/graphicalAnalysisEffectiveAvgMonthly',
    method: 'post',
    data: data
  })
}
// 95带宽值/日----图
export function graDaily(data) {
  return request({
    url: '/system/bandwidth/graphicalAnalysisDaily',
    method: 'post',
    data: data
  })
}
// 月均日95值----图
export function graAvgMonthly(data) {
  return request({
    url: '/system/bandwidth/graphicalAnalysisAvgMonthly',
    method: 'post',
    data: data
  })
}

/**      ------------------服务器和交换机的 图形分析-------------------     */
// 服务器日
export function serverGraphDaily(data) {
  return request({
    url: '/system/epsTrafficData/getServerGraphicalAnalysisDaily',
    method: 'post',
    data: data
  })
}
// 服务器月
export function serverGraphMonth(data) {
  return request({
    url: '/system/epsTrafficData/getServerGraphicalAnalysisMonthy',
    method: 'post',
    data: data
  })
}
// 交换机日
export function switchGraphDaily(data) {
  return request({
    url: '/system/switchInfoDetails/getGraphicalAnalysisDaily',
    method: 'post',
    data: data
  })
}
// 交换机月
export function switchGraphMonth(data) {
  return request({
    url: '/system/switchInfoDetails/getGraphicalAnalysisMonthy',
    method: 'post',
    data: data
  })
}

/**      ------------------业务管理-------------------        */

// 查询列表
export function listBusiness(data) {
  return request({
    url: '/system/business/list',
    method: 'post',
    data: data
  })
}
// 查询全部列表
export function listAllBusinessList(data) {
  return request({
    url: '/system/business/getAllBusinessMsg',
    method: 'post',
    data: {}
  })
}

// 查询详细
export function getBusiness(Id) {
  return request({
    url: '/system/business/' + Id,
    method: 'get'
  })
}

// 新增
export function addBusiness(data) {
  return request({
    url: '/system/business',
    method: 'post',
    data: data
  })
}

// 修改
export function updateBusiness(data) {
  return request({
    url: '/system/business',
    method: 'put',
    data: data
  })
}
// 查询业务号
export function getBusinessCode() {
  return request({
    url: '/system/business/getBusinessCode',
    method: 'get',
  })
}
// 验证名称是否重复
export function countBusinessName(data) {
  return request({
    url: '/system/business/countByBusinessName',
    method: 'post',
    data: data
  })
}

// 删除
export function delBusiness(roleId) {
  return request({
    url: '/system/business/' + roleId,
    method: 'delete'
  })
}

/**      ------------------收益方式配置-------------------        */
// 查询列表
export function listRevenueConfig(data) {
  return request({
    url: '/system/revenueConfig/list',
    method: 'post',
    data: data
  })
}

// 查询详细
export function getRevenueConfig(Id) {
  return request({
    url: '/system/revenueConfig/' + Id,
    method: 'get'
  })
}

// 修改
export function updateRevenueConfig(data) {
  return request({
    url: '/system/revenueConfig',
    method: 'put',
    data: data
  })
}

/**      ------------------收益方式修改记录-------------------        */
// 查询列表
export function listRecord(data) {
  return request({
    url: '/system/record/list',
    method: 'post',
    data: data
  })
}

// 查询详细
export function getRecord(Id) {
  return request({
    url: '/system/record/' + Id,
    method: 'get'
  })
}

// 修改
export function updateRecord(data) {
  return request({
    url: '/system/record',
    method: 'put',
    data: data
  })
}

/**      ------------------业务脚本管理-------------------        */
// 查询列表
export function listBusScript(data) {
  return request({
    url: '/system/businessScript/list',
    method: 'post',
    data: data
  })
}

// 查询详细
export function getBusScript(Id) {
  return request({
    url: '/system/businessScript/' + Id,
    method: 'get'
  })
}

// 新增
export function addBusScript(data) {
  return request({
    url: '/system/businessScript',
    method: 'post',
    data: data
  })
}

// 修改
export function updateBusScript(data) {
  return request({
    url: '/system/businessScript',
    method: 'put',
    data: data
  })
}

// 脚本名称
export function getAllBusScriptName(data) {
  return request({
    url: '/system/businessScript/getAllScriptName',
    method: 'get'
  })
}

// 删除
export function delBusScript(roleId) {
  return request({
    url: '/system/businessScript/' + roleId,
    method: 'delete'
  })
}

/**      ------------------业务下发管理-------------------        */
// 查询列表
export function listBusDeploy(data) {
  return request({
    url: '/system/businessDeploy/list',
    method: 'post',
    data: data
  })
}

// 查询详细
export function getBusDeploy(Id) {
  return request({
    url: '/system/businessDeploy/' + Id,
    method: 'get'
  })
}

// 新增
export function addBusDeploy(data) {
  return request({
    url: '/system/businessDeploy',
    method: 'post',
    data: data
  })
}

// 修改
export function updateBusDeploy(data) {
  return request({
    url: '/system/businessDeploy',
    method: 'put',
    data: data
  })
}

// 删除
export function delBusDeploy(roleId) {
  return request({
    url: '/system/businessDeploy/' + roleId,
    method: 'delete'
  })
}
// 提交审核
export function reviewBusiness(data) {
  return request({
    url: '/system/businessDeploy/reviewBusiness',
    method: 'post',
    data: data
  })
}
/**      ------------------业务95值计算-------------------        */
// 查询列表
export function listTaskStatic(data) {
  return request({
    url: '/system/taskStatistics/list',
    method: 'post',
    data: data
  })
}

// 新增
export function addTaskStatic(data) {
  return request({
    url: '/system/taskStatistics',
    method: 'post',
    data: data
  })
}
// 交换机级联接口
export function switchNameTree(data) {
  return request({
    url: '/system/switchManagement/getAllSwitchNameTree',
    method: 'get'
  })
}

// 修改
export function updateRelate(data) {
  return request({
    url: '/system/taskStatistics/updateRelateData',
    method: 'post',
    data: data
  })
}

// 重新计算
export function taskRecaculate(data) {
  return request({
    url: '/system/taskStatistics/recaculate',
    method: 'post',
    data: data
  })
}
// 相关数据
export function taskRelate(data) {
  return request({
    url: '/system/taskStatistics/getRelateData',
    method: 'post',
    data: data
  })
}
// 查看图形
export function taskRraphical(data) {
  return request({
    url: '/system/taskStatistics/getRraphicalMsg',
    method: 'post',
    data: data
  })
}
// 获取月均日95时间
export function getAvgTimeList(data) {
  return request({
    url: '/system/taskStatistics/getAvgTimeList',
    method: 'post',
    data: data
  })
}
