import request from '@/utils/request'

// 导出月报
export function exportMonthlyReport(year) {
  return request({
    url: '/production/monthly/export/' + year,
    method: 'get'
  })
}

// 修改Cracker Raw Material
export function updateCrackerRawMaterial(data) {
  return request({
    url: '/production/monthly/crackerRawMaterial',
    method: 'put',
    data: data
  })
}

// 修改Cracker Output Product
export function updateCrackerOutputProduct(data) {
  return request({
    url: '/production/monthly/crackerOutputProduct',
    method: 'put',
    data: data
  })
}

// 修改Aromatics Raw Material
export function updateAromaticsRawMaterial(data) {
  return request({
    url: '/production/monthly/aAromaticsRawMaterial',
    method: 'put',
    data: data
  })
}

// 修改Aromatics Output Product
export function updateAromaticsOutputProduct(data) {
  return request({
    url: '/production/monthly/aromaticsOutputProduct',
    method: 'put',
    data: data
  })
}

// 修改Product Yield
export function updateProductYield(data) {
  return request({
    url: '/production/monthly/productYield',
    method: 'put',
    data: data
  })
}

// 修改Cracker Energy Consumption
export function updateCrackerEnergyConsumption(data) {
  return request({
    url: '/production/monthly/crackerEnergyConsumption',
    method: 'put',
    data: data
  })
}

// 修改Aromatics Energy Consumption
export function updateAromaticsEnergyConsumption(data) {
  return request({
    url: '/production/monthly/aromaticsEnergyConsumption',
    method: 'put',
    data: data
  })
}

// 修改Plant Load
export function updatePlantLoad(data) {
  return request({
    url: '/production/monthly/plantLoad',
    method: 'put',
    data: data
  })
}

// 修改Otherside
export function updateOtherside(data) {
  return request({
    url: '/production/monthly/otherside',
    method: 'put',
    data: data
  })
}

// 修改SCTU Utility Consumption
export function updateSctuUtilityConsumption(data) {
  return request({
    url: '/production/monthly/sctuUtilityConsumption',
    method: 'put',
    data: data
  })
}

// 修改Summary
export function updateSummary(data) {
  return request({
    url: '/production/monthly/summary',
    method: 'put',
    data: data
  })
}

// 修改SUB Utility Consumption
export function updateSUBUtilityConsumption(data) {
  return request({
    url: '/production/monthly/subUtilityConsumption',
    method: 'put',
    data: data
  })
}

// 修改SCTF Utility Consumption
export function updateSctfUtilityConsumption(data) {
  return request({
    url: '/production/monthly/sctfUtilityConsumption',
    method: 'put',
    data: data
  })
}

// 修改KBI
export function updateKbi(data) {
  return request({
    url: '/production/monthly/kbi',
    method: 'put',
    data: data
  })
}

// 修改Cost Fr Ethylene
export function updateCostFrEthylene(data) {
  return request({
    url: '/production/monthly/costFrEthylene',
    method: 'put',
    data: data
  })
}

// 修改Chemical Consume
export function updateChemicalConsume(data) {
  return request({
    url: '/production/monthly/chemicalConsume',
    method: 'put',
    data: data
  })
}

// 修改Runing Rate
export function updateRuningRate(data) {
  return request({
    url: '/production/monthly/runingRate',
    method: 'put',
    data: data
  })
}

// 修改Shoudown Hour
export function updateShoudownHour(data) {
  return request({
    url: '/production/monthly/shoudownHour',
    method: 'put',
    data: data
  })
}

// 修改Aromatics Utility Consumption
export function updateAromaticsUtilityConsumption(data) {
  return request({
    url: '/production/monthly/aromaticsUtilityConsumption',
    method: 'put',
    data: data
  })
}

// 修改Cracker Utility Consumption
export function updateCrackerUtilityConsumption(data) {
  return request({
    url: '/production/monthly/crackerUtilityConsumption',
    method: 'put',
    data: data
  })
}

// 修改Eligible Product Rate
export function updateEligibleProductRate(data) {
  return request({
    url: '/production/monthly/eligibleProductRate',
    method: 'put',
    data: data
  })
}

// 按年份查询Summary
export function getSummary(year) {
  return request({
    url: '/production/monthly/summary/' + year,
    method: 'get'
  })
}

// 按年份查询KBI
export function getKbi(year) {
  return request({
    url: '/production/monthly/kbi/' + year,
    method: 'get'
  })
}

// 按年份查询SCTF Utility Consumption
export function getSCTFUtilityConsumption(year) {
  return request({
    url: '/production/monthly/SCTFUtilityConsumption/' + year,
    method: 'get'
  })
}

// 按年份查询SUB Utility Consumption
export function getSUBUtilityConsumption(year) {
  return request({
    url: '/production/monthly/SUBUtilityConsumption/' + year,
    method: 'get'
  })
}

// 按年份查询SCTU Utility Consumption
export function getSCTUUtilityConsumption(year) {
  return request({
    url: '/production/monthly/SCTUUtilityConsumption/' + year,
    method: 'get'
  })
}

// 按年份查询Chemical Consume
export function getChemicalConsume(year) {
  return request({
    url: '/production/monthly/chemicalConsume/' + year,
    method: 'get'
  })
}

// 按年份查询Otherside
export function getOtherside(year) {
  return request({
    url: '/production/monthly/otherside/' + year,
    method: 'get'
  })
}

// 按年份查询Shoudown Hour
export function getShoudownHour(year) {
  return request({
    url: '/production/monthly/shoudownHour/' + year,
    method: 'get'
  })
}

// 按年份查询Runing Rate
export function getRuningRate(year) {
  return request({
    url: '/production/monthly/runingRate/' + year,
    method: 'get'
  })
}

// 按年份查询Cost Fr Ethylene
export function getCostFrEthylene(year) {
  return request({
    url: '/production/monthly/costFrEthylene/' + year,
    method: 'get'
  })
}

// 按年份查询Plant Load
export function getPlantLoad(year) {
  return request({
    url: '/production/monthly/plantLoad/' + year,
    method: 'get'
  })
}

// 按年份查询Aromatics Energy Consumption
export function getAromaticsEnergyConsumption(year) {
  return request({
    url: '/production/monthly/aromaticsEnergyConsumption/' + year,
    method: 'get'
  })
}

// 按年份查询Aromatics Utility Consumption
export function getAromaticsUtilityConsumption(year) {
  return request({
    url: '/production/monthly/aromaticsUtilityConsumption/' + year,
    method: 'get'
  })
}

// 按年份查询Cracker Energy Consumption
export function getCrackerEnergyConsumption(year) {
  return request({
    url: '/production/monthly/crackerEnergyConsumption/' + year,
    method: 'get'
  })
}

// 按年份查询Cracker Utility Consumption
export function getCrackerUtilityConsumption(year) {
  return request({
    url: '/production/monthly/crackerUtilityConsumption/' + year,
    method: 'get'
  })
}

// 按年份查询Product Yield
export function getProductYield(year) {
  return request({
    url: '/production/monthly/productYield/' + year,
    method: 'get'
  })
}

// 按年份查询Eligible Product Rate
export function getEligibleProductRate(year) {
  return request({
    url: '/production/monthly/eligibleProductRate/' + year,
    method: 'get'
  })
}

// 按年份查询Aromatics Output Product
export function getAromaticsOutputProduct(year) {
  return request({
    url: '/production/monthly/aromaticsOutputProduct/' + year,
    method: 'get'
  })
}

// 按年份查询Aromatics Raw Material
export function getAromaticsRawMaterial(year) {
  return request({
    url: '/production/monthly/aromaticsRawMaterial/' + year,
    method: 'get'
  })
}

// 按年份查询Cracker Output Product
export function getCrackerOutputProduct(year) {
  return request({
    url: '/production/monthly/crackerOutputProduct/' + year,
    method: 'get'
  })
}

// 按年份查询Cracker Raw Material
export function getCrackerRawMaterial(year) {
  return request({
    url: '/production/monthly/crackerRawMaterial/' + year,
    method: 'get'
  })
}

// 查询趋势分析数据
export function getAnalysisData(query) {
  return request({
    url: '/production/monthly/analysis',
    method: 'get',
    params: query
  })
}

// 查询每月生产报告列表
export function listReport(query) {
  return request({
    url: '/production/monthly/list',
    method: 'get',
    params: query
  })
}

// 查询每月生产报告详细
export function getReport(id) {
  return request({
    url: '/production/monthly/' + id,
    method: 'get'
  })
}

// 新增每月生产报告
export function addReport(data) {
  return request({
    url: '/production/monthly',
    method: 'post',
    data: data
  })
}

// 修改每月生产报告
export function updateReport(data) {
  return request({
    url: '/production/monthly',
    method: 'put',
    data: data
  })
}

// 删除每月生产报告
export function delReport(id) {
  return request({
    url: '/production/monthly/' + id,
    method: 'delete'
  })
}

// 导出每月生产报告
export function exportReport(query) {
  return request({
    url: '/production/monthly/export',
    method: 'get',
    params: query
  })
}
