/** @format */

import request from "@/utils/request";

//启动流程
export function saveReceived(data) {
  return request({
    url: "/offcial/receive/startReceive",
    method: "post",
    data: data,
  });
}

// 查询收文列表
export function listReceive(query) {
  return request({
    url: '/offcial/receive/list',
    method: 'get',
    params: query
  })
}

// 查询收文详细
export function getReceive(id) {
  return request({
    url: '/offcial/receive/' + id,
    method: 'get'
  })
}

// 查询收文详细
export function getReceiveByWorkId(workId) {
  return request({
    url: '/offcial/receive/sel/' + workId,
    method: 'get'
  })
}

// 新增收文
export function addReceive(data) {
  return request({
    url: '/offcial/receive',
    method: 'post',
    data: data
  })
}

// 修改收文
export function updateReceive(data) {
  return request({
    url: '/offcial/receive',
    method: 'put',
    data: data
  })
}

// 删除收文
export function delReceive(id) {
  return request({
    url: '/offcial/receive/' + id,
    method: 'delete'
  })
}
