import request from '@/utils/request'

// 查询保养工单实例节点列表
export function listDmsMaintInstanceActivity(query) {
  return request({
    url: '/dms/dmsMaintInstanceActivity/list',
    method: 'get',
    params: query
  })
}

// 查询保养工单实例节点详细
export function getDmsMaintInstanceActivity(instanceActivityId) {
  return request({
    url: '/dms/dmsMaintInstanceActivity/' + instanceActivityId,
    method: 'get'
  })
}

// 新增保养工单实例节点
export function addDmsMaintInstanceActivity(data) {
  return request({
    url: '/dms/dmsMaintInstanceActivity',
    method: 'post',
    data: data
  })
}

// 修改保养工单实例节点
export function updateDmsMaintInstanceActivity(data) {
  return request({
    url: '/dms/dmsMaintInstanceActivity',
    method: 'put',
    data: data
  })
}

// 删除保养工单实例节点
export function delDmsMaintInstanceActivity(instanceActivityId) {
  return request({
    url: '/dms/dmsMaintInstanceActivity/' + instanceActivityId,
    method: 'delete'
  })
}

export function selectUserIdByDmsMaintInstanceActivityId(maintInstanceId,userId) {
  return request({
    url:`/dms/dmsMaintInstanceActivity/selectUserIdByDmsMaintInstanceActivityId/${maintInstanceId}/userId/${userId}`,
    method:'get'
  })
}
