import request from '@/utils/request'

// 查询检修工单实例节点;最后一步作为检修记录列表
export function listRepairInstanceActivity(query) {
  return request({
    url: '/dms/repairInstanceActivity/list',
    method: 'get',
    params: query
  })
}

// 查询检修工单实例节点;最后一步作为检修记录详细
export function getRepairInstanceActivity(instanceActivityId) {
  return request({
    url: '/dms/repairInstanceActivity/' + instanceActivityId,
    method: 'get'
  })
}

// 新增检修工单实例节点;最后一步作为检修记录
export function addRepairInstanceActivity(data) {
  return request({
    url: '/dms/repairInstanceActivity',
    method: 'post',
    data: data
  })
}

// 修改检修工单实例节点;最后一步作为检修记录
export function updateRepairInstanceActivity(data) {
  return request({
    url: '/dms/repairInstanceActivity',
    method: 'put',
    data: data
  })
}

// 删除检修工单实例节点;最后一步作为检修记录
export function delRepairInstanceActivity(instanceActivityId) {
  return request({
    url: '/dms/repairInstanceActivity/' + instanceActivityId,
    method: 'delete'
  })
}
//通过repairinstanceid查询用户id
export function selectUserIdByRepairInstanceId(repairInstanceId,userId) {
  return request({
    url:`/dms/repairInstanceActivity/selectUserIdByRepairInstanceId/${repairInstanceId}/userId/${userId}`,
    method:'get'
  })
}
