import request from "@/utils/request";
// 岗检计划接口
// 修改
export function updatePostPlan(data) {
  return request({
    url: "/postCheck/postPlan",
    method: "put",
    data: data,
  });
}

// 新增
export function addPostPlan(data) {
  return request({
    url: "/postCheck/postPlan",
    method: "post",
    data: data,
  });
}

// 查询详细
export function getPostPlan(Id) {
  return request({
    url: "/postCheck/postPlan/" + Id,
    method: "get",
  });
}
// 删除
export function delPostPlan(Id) {
  return request({
    url: "/postCheck/postPlan/" + Id,
    method: "delete",
  });
}

// 查询列表
export function listPostPlan(query) {
  return request({
    url: "/postCheck/postPlan/listV2",
    method: "get",
    params: query,
  });
}
// 岗检计划明细表接口
// 修改
export function updatePostPlanInfo(data) {
    return request({
      url: "/postCheck/postPlanInfo",
      method: "put",
      data: data,
    });
  }

  // 新增
  export function addPostPlanInfo(data) {
    return request({
      url: "/postCheck/postPlanInfo",
      method: "post",
      data: data,
    });
  }

  // 查询详细
  export function getPostPlanInfo(Id) {
    return request({
      url: "/postCheck/postPlanInfo/" + Id,
      method: "get",
    });
  }
  // 删除
  export function delPostPlanInfo(Id) {
    return request({
      url: "/postCheck/postPlanInfo/" + Id,
      method: "delete",
    });
  }

  // 查询列表
  export function listPostPlanInfo(query) {
    return request({
      url: "/postCheck/postPlanInfo/list",
      method: "get",
      params: query,
    });
  }

// 岗检计划明细检查人表接口
  // 修改
export function updatePlanInfoUser(data) {
    return request({
      url: "/postCheck/planInfoUser",
      method: "put",
      data: data,
    });
  }

  // 新增
  export function addPlanInfoUser(data) {
    return request({
      url: "/postCheck/planInfoUser",
      method: "post",
      data: data,
    });
  }

  // 查询详细
  export function getPlanInfoUser(Id) {
    return request({
      url: "/postCheck/planInfoUser/" + Id,
      method: "get",
    });
  }
  // 删除
  export function delPlanInfoUser(Id) {
    return request({
      url: "/postCheck/planInfoUser/" + Id,
      method: "delete",
    });
  }

  // 查询列表
  export function listPlanInfoUser(query) {
    return request({
      url: "/postCheck/planInfoUser/list",
      method: "get",
      params: query,
    });
  }
  // 岗检方案审核
export function approveHr(data) {
  return request({
    url: "/postCheck/postPlan/approveHr",
    method: "put",
    params: data,
  });
}
export function approveIcfa(data) {
  return request({
    url: "/postCheck/postPlan/approveIcfa",
    method: "put",
    params: data,
  });
}
export function publish(data) {
  return request({
    url: "/postCheck/postPlan/publish",
    method: "put",
    params: data,
  });
}