import request from '@/utils/request'

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

// 查询每日生产报告列表
export function listReportMonthly(query) {
  return request({
    url: '/production/report/listReportMonthly',
    method: 'get',
    params: query
  })
}

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

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

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

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

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

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

// 查询日期最新的每日生产报告详细
export function getReportByMaxDate() {
  return request({
    url: '/production/report/selectTDailyProductionReportByMaxDate',
    method: 'get'
  })
}
