import request from '@/utils/request'

// 查询设备工艺列表
export function listTechnology(query) {
  return request({
    url: '/iscs/machinery/getIsMachineryPage',
    method: 'get',
    params: query
  })
}


// 查询设备工艺详细
export function getTechnologyInfo(deptId) {
  return request({
    url: '/iscs/machinery/selectIsMachineryById?machineryId=' + deptId,
    method: 'get'
  })
}


// 新增设备工艺
export function addTechnology(data) {
  return request({
    url: '/iscs/machinery/insertIsMachinery',
    method: 'post',
    data: data
  })
}

// 保存设备工艺与隔离点的关系
export function saveMachineryPoints(data) {
  return request({
    url: '/iscs/machinery/saveMachineryPoints',
    method: 'post',
    data: data
  })
}
// 修改设备工艺
export function updateTechnology(data) {
  return request({
    url: '/iscs/machinery/updateIsMachinery',
    method: 'post',
    data: data
  })
}

// 删除设备工艺
export function delTechnology(deptId) {
  return request({
    url: '/iscs/machinery/deleteIsMachineryByTechnologyIds?machineryIds=' + deptId,
    method: 'post'
  })
}
