import request from '@/utils/request';

export function getStuFdyName(stuNo){
  return request({
    url: '/workstudy/stuPost/getStuFdyName/'+stuNo,
    method: 'get'
  })
}

export function getOwnFdyName(){
  return request({
    url: '/workstudy/stuPost/getOwnFdyName',
    method: 'get'
  })
}


export function doReply(data) {
  return request({
    url: '/workstudy/stuPost/doReply',
    method: 'post',
    data: data
  })
}


//通过岗位id查询学生在岗数
export function countStuPostInByPostId(id) {
  return request({
    url: '/workstudy/stuPost/countStuPostInByPostId/' + id,
    method: 'get'
  })
}


export function doQuit(data) {
  return request({
    url: '/workstudy/stuPost/doQuit',
    method: 'post',
    data
  })
}

export function listAllCanSelectPost(query) {
  return request({
    url: '/workstudy/stuPost/listAllCanSelectPost',
    method: 'get',
    params: query
  })
}

export function listTeacherCanSelectPost(query) {
  return request({
    url: '/workstudy/stuPost/listTeacherCanSelectPost',
    method: 'get',
    params: query
  })
}

export function listOwnCanSelectPost(query) {
  return request({
    url: '/workstudy/stuPost/listOwnCanSelectPost',
    method: 'get',
    params: query
  })
}

export function listZdlsAll(query) {
  return request({
    url: '/workstudy/stuPost/listZdlsAll',
    method: 'get',
    params: query
  })
}

export function listFdyAll(query) {
  return request({
    url: '/workstudy/stuPost/listFdyAll',
    method: 'get',
    params: query
  })
}

export function listZzbldAll(query) {
  return request({
    url: '/workstudy/stuPost/listZzbldAll',
    method: 'get',
    params: query
  })
}

export function doAudit(data) {
  return request({
    url: '/workstudy/stuPost/doAudit',
    method: 'post',
    data
  })
}

export function manyAudit(data) {
  return request({
    url: '/workstudy/stuPost/manyAudit',
    method: 'post',
    data
  })
}


export function listZdls(query) {
  return request({
    url: '/workstudy/stuPost/listZdls',
    method: 'get',
    params: query
  })
}

export function listFdy(query) {
  return request({
    url: '/workstudy/stuPost/listFdy',
    method: 'get',
    params: query
  })
}

export function listZzbld(query) {
  return request({
    url: '/workstudy/stuPost/listZzbld',
    method: 'get',
    params: query
  })
}


export function cancelApply(id) {
  return request({
    url: '/workstudy/stuPost/cancelApply/' + id,
    method: 'post'
  })
}


export function listOwnApply(query) {
  return request({
    url: '/workstudy/stuPost/listOwnApply',
    method: 'get',
    params: query
  })
}

export function doApply(data) {
  return request({
    url: '/workstudy/stuPost/doApply',
    method: 'post',
    data: data
  })
}

export function doSave(data) {
  return request({
    url: '/workstudy/stuPost/doSave',
    method: 'post',
    data: data
  })
}

// 查询学生岗位列表
export function listStuPost(query) {
  return request({
    url: '/workstudy/stuPost/list',
    method: 'get',
    params: query
  })
}

// 查询学生岗位列表
export function getListStuPost(query) {
  return request({
    url: '/workstudy/stuPost/getList',
    method: 'get',
    params: query
  })
}

// 查询学生岗位详细
export function getStuPost(id) {
  return request({
    url: '/workstudy/stuPost/' + id,
    method: 'get'
  })
}

// 新增学生岗位
export function addStuPost(data) {
  return request({
    url: '/workstudy/stuPost/add',
    method: 'post',
    data: data
  })
}

// 修改学生岗位
export function updateStuPost(data) {
  return request({
    url: '/workstudy/stuPost/update',
    method: 'post',
    data: data
  })
}

// 删除学生岗位
export function delStuPost(id) {
  return request({
    url: '/workstudy/stuPost/' + id,
    method: 'post'
  })
}
