import request from '@/utils/request'

// 查询润滑计划明细列表
export function listDmsPlanLubeDetail(query) {
  return request({
    url: '/dms/dmsPlanLubeDetail/list',
    method: 'get',
    params: query
  })
}

// 查询润滑计划明细详细
export function getDmsPlanLubeDetail(planLubeDetailId) {
  return request({
    url: '/dms/dmsPlanLubeDetail/' + planLubeDetailId,
    method: 'get'
  })
}

// //根据计划id查询润滑计划明细
// export function selectPlanLubeDetailByPlanLubeId(planLubeId){
//   return request({
//     url:`/dms/dmsPlanLubeDetail/getDmsPlanDetailByPlanLubeId/${planLubeId}`,
//     method: 'get',
//   })
// }
export function selectPlanLubeDetailByPlanLubeId(planLubeId) {
  // alert(planLubeId)
  return request({
    url:`/dms/dmsPlanLubeDetail/getDmsPlanDetailByPlanLubeId/${planLubeId}`,
    method:'get'
  })
}

// 新增润滑计划明细
export function addDmsPlanLubeDetail(data) {
  return request({
    url: '/dms/dmsPlanLubeDetail',
    method: 'post',
    data: data
  })
}

// 修改润滑计划明细
export function updateDmsPlanLubeDetail(data) {
  return request({
    url: '/dms/dmsPlanLubeDetail',
    method: 'put',
    data: data
  })
}

// 删除润滑计划明细
export function delDmsPlanLubeDetail(planLubeDetailId) {
  return request({
    url: '/dms/dmsPlanLubeDetail/' + planLubeDetailId,
    method: 'delete'
  })
}



// 获取润滑部位
export function getLubeStations(query) {
  return request({
    url: '/dms/dmsPlanLubeDetail/getLubeStations',
    method: 'get',
    params: query
  })
}


// 获取润滑标准
export function getLubeStandards(query) {
  return request({
    url: '/dms/dmsPlanLubeDetail/getLubeStandards',
    method: 'get',
    params: query
  })
}


// 获取设备列表
export function getBaseDeviceLedgers(query) {
  return request({
    url: '/dms/dmsPlanLubeDetail/getBaseDeviceLedgers',
    method: 'get',
    params: query
  })
}

