import request from '@/utils/request'

// 查询点巡检工单实例节点列表
export function listDmsBillsInspectActivity(query) {
  return request({
    url: '/dms/dmsBillsInspectActivity/list',
    method: 'get',
    params: query
  })
}

// 查询点巡检工单实例节点详细
export function getDmsBillsInspectActivity(instanceActivityId) {
  return request({
    url: '/dms/dmsBillsInspectActivity/' + instanceActivityId,
    method: 'get'
  })
}

// 新增点巡检工单实例节点
export function addDmsBillsInspectActivity(data) {
  return request({
    url: '/dms/dmsBillsInspectActivity',
    method: 'post',
    data: data
  })
}

// 修改点巡检工单实例节点
export function updateDmsBillsInspectActivity(data) {
  return request({
    url: '/dms/dmsBillsInspectActivity',
    method: 'put',
    data: data
  })
}

// 删除点巡检工单实例节点
export function delDmsBillsInspectActivity(instanceActivityId) {
  return request({
    url: '/dms/dmsBillsInspectActivity/' + instanceActivityId,
    method: 'delete'
  })
}

//通过inspectInstanceId查询用户id
export function selectUserIdByInspectInstanceId(inspectInstanceId,userId) {
  return request({
    url:`/dms/dmsBillsInspectActivity/selectUserIdByDmsBillsInspectInstanceActivityId/${inspectInstanceId}/userId/${userId}`,
    method:'get'
  })
}
