import request from '@/utils/request'

// 查询玛氏岗位列表
export function listMarsDept(query) {
  return request({
    url: '/iscs/workstation/getIsWorkstationPage',
    method: 'get',
    params: query
  })
}

// 查询玛氏岗位列表（排除节点）
export function listMarsDeptExcludeChild(deptId) {
  return request({
    url: '/system/dept/list/exclude/' + deptId,
    method: 'get'
  })
}

// 查询玛氏岗位详细
export function getMarsDept(deptId) {
  return request({
    url: '/iscs/workstation/selectIsWorkstationById?workstationId=' + deptId,
    method: 'get'
  })
}


// 新增玛氏岗位
export function addMarsDept(data) {
  return request({
    url: '/iscs/workstation/insertIsWorkstation',
    method: 'post',
    data: data
  })
}

// 修改玛氏岗位
export function updateMarsDept(data) {
  return request({
    url: '/iscs/workstation/updateIsWorkstation',
    method: 'post',
    data: data
  })
}
// 修改玛氏岗位 状态
export function updateMarsDeptStatus(data) {
  return request({
    url: '/iscs/workstation/updateIsWorkstationStatus',
    method: 'post',
    data: data
  })
}

// 删除玛氏岗位
export function delMarsDept(deptId) {
  return request({
    url: '/iscs/workstation/deleteIsWorkstationByWorkstationIds?workstationIds=' + deptId,
    method: 'post'
  })
}
