/*
 * @Date: 2024-09-25 11:14:29
 * @LastEditors: shirlwang
 * @LastEditTime: 2025-12-23 17:40:11
 */
import request from '@/utilsRc/request'

// 查询角色列表
export function listJobRecommend(query) {
  return request({
    url: '/process/processJobRecommend/list',
    method: 'get',
    params: query
  })
}
// 查询角色列表
export function getWorkListReq(query) {
  return request({
    // url: '/personnel/personBaseInfo/postRecommend',
    url: '/manage/info/postElectedList',
    method: 'get',
    params: query
  })
}

// 查询角色详细
export function getJobRecommend(ids) {
  return request({
    url: '/process/processJobRecommend/' + ids,
    method: 'get'
  })
}

// 新增角色
export function addJobRecommend(data) {
  return request({
    url: '/process/processJobRecommend',
    method: 'post',
    data: data
  })
}

//岗位推荐保存和办结
export function saveJobRecommend(data) {
  return request({
    url: '/process/processJobRecommend/createJob',
    method: 'post',
    data: data
  })
}

// 修改角色
export function updateJobRecommend(data) {
  return request({
    url: '/process/processJobRecommend',
    method: 'put',
    data: data
  })
}

// 删除角色
export function delJobRecommend(ids) {
  return request({
    url: '/process/processJobRecommend/' + ids,
    method: 'delete'
  })
}

// 获取绑定的职位
export function getAddedJobs(params) {
  return request({
    // url: '/company/postDeliverInfo/list',
    url: '/manage/info/no/permission/list',
    method: 'get',
    params,
  })
}

export function recommendJob(data) {
    const params = {};
    if (data?.jobName !== undefined && data?.jobName !== null && data?.jobName !== '') {
        params.jobName = String(data.jobName);
    }

    return request({
        url: '/job/recommendJobByJobName',
        method: 'get',
        params: params,
        baseUrlType: 'zytp'
    })
}
