import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { DmsBillsInspectInstanceActivityVO, DmsBillsInspectInstanceActivityForm, DmsBillsInspectInstanceActivityQuery } from '@/api/dms/dmsBillsInspectInstanceActivity/types';

/**
 * 查询点巡检工单实例节点;此暂时不用列表
 * @param query
 * @returns {*}
 */

export const listDmsBillsInspectInstanceActivity = (query?: DmsBillsInspectInstanceActivityQuery): AxiosPromise<DmsBillsInspectInstanceActivityVO[]> => {
  return request({
    url: '/dms/dmsBillsInspectInstanceActivity/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询点巡检工单实例节点;此暂时不用详细
 * @param instanceActivityId
 */
export const getDmsBillsInspectInstanceActivity = (instanceActivityId: string | number): AxiosPromise<DmsBillsInspectInstanceActivityVO> => {
  return request({
    url: '/dms/dmsBillsInspectInstanceActivity/' + instanceActivityId,
    method: 'get'
  });
};

/**
 * 新增点巡检工单实例节点;此暂时不用
 * @param data
 */
export const addDmsBillsInspectInstanceActivity = (data: DmsBillsInspectInstanceActivityForm) => {
  return request({
    url: '/dms/dmsBillsInspectInstanceActivity',
    method: 'post',
    data: data
  });
};

/**
 * 修改点巡检工单实例节点;此暂时不用
 * @param data
 */
export const updateDmsBillsInspectInstanceActivity = (data: DmsBillsInspectInstanceActivityForm) => {
  return request({
    url: '/dms/dmsBillsInspectInstanceActivity',
    method: 'put',
    data: data
  });
};

/**
 * 删除点巡检工单实例节点;此暂时不用
 * @param instanceActivityId
 */
export const delDmsBillsInspectInstanceActivity = (instanceActivityId: string | number | Array<string | number>) => {
  return request({
    url: '/dms/dmsBillsInspectInstanceActivity/' + instanceActivityId,
    method: 'delete'
  });
};

/**
 * 下拉框查询点巡检工单实例节点;此暂时不用列表
 * @param query
 * @returns {*}
 */
export function getDmsBillsInspectInstanceActivityList (query) {
    return request({
        url: '/dms/dmsBillsInspectInstanceActivity/getDmsBillsInspectInstanceActivityList',
        method: 'get',
        params: query
    });
};
