import request from '@/utils/request'

// 查询故障报修工单实例节点列表
export function listActivity(query) {
  return request({
    url: '/dms/activity/list',
    method: 'get',
    params: query
  })
}

// 查询故障报修工单实例节点详细
export function getActivity(instanceActivityId) {
  return request({
    url: '/dms/activity/' + instanceActivityId,
    method: 'get'
  })
}

// 新增故障报修工单实例节点
export function addActivity(data) {
  return request({
    url: '/dms/activity',
    method: 'post',
    data: data
  })
}

// 修改故障报修工单实例节点
export function updateActivity(data) {
  return request({
    url: '/dms/activity',
    method: 'put',
    data: data
  })
}

// 删除故障报修工单实例节点
export function delActivity(instanceActivityId) {
  return request({
    url: '/dms/activity/' + instanceActivityId,
    method: 'delete'
  })
}
//通过inspectInstanceId查询用户id
export function selectUserIdByInspectInstanceId(repairInstanceId,userId) {
  return request({
    url:`/dms/activity/selectUserIdByDmsFaultInstanceActivity/${repairInstanceId}/userId/${userId}`,
    method:'get'
  })
}
