/*
 * @Author: wrh
 * @Date: 2024-03-07 17:33:37
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-03-08 15:44:00
 */
import request from '@/utils/request'

// 查询岗位列表
export function listPost(query) {
  return request({
    url: '/system/post/list',
    method: 'get',
    params: query
  })
}

// 查询驾驶员列表
export function listDriver() {
  return request({
    url: '/system/post/driverList',
    method: 'get'
  })
}

// 查询岗位详细
export function getPost(postId) {
  return request({
    url: '/system/post/' + postId,
    method: 'get'
  })
}

// 新增岗位
export function addPost(data) {
  return request({
    url: '/system/post',
    method: 'post',
    data: data
  })
}

// 修改岗位
export function updatePost(data) {
  return request({
    url: '/system/post',
    method: 'put',
    data: data
  })
}

// 删除岗位
export function delPost(postId) {
  return request({
    url: '/system/post/' + postId,
    method: 'delete'
  })
}


// 查询当前用户的部门负责人
export function getUsersDeptLeader(query) {
  return request({
    url: '/system/post/deptLeader',
    method: 'get',
    params: query
  })
}

// 查询当前部门的部门负责人
export function getUsersDeptLeaderByDept(query) {
  return request({
    url: '/system/post/deptLeaderByDept',
    method: 'get',
    params: query
  })
}

// 查询当前用户的分管领导
export function getUsersManageLeader(query) {
  return request({
    url: '/system/post/manageLeader',
    method: 'get',
    params: query
  })
}

// 查询当前部门的分管领导
export function getUsersManageLeaderByDept(query) {
  return request({
    url: '/system/post/manageLeaderByDept',
    method: 'get',
    params: query
  })
}