import { request } from '@/service/request';

/** 获取历年省控线列表 */
export function fetchGetHistoryScoreControlLineList(params?: Api.Art.HistoryScoreControlLineSearchParams) {
  return request<Api.Art.HistoryScoreControlLineList>({
    url: '/art/historyScoreControlLine/list',
    method: 'get',
    params
  });
}
/** 新增历年省控线 */
export function fetchCreateHistoryScoreControlLine(data: Api.Art.HistoryScoreControlLineOperateParams) {
  return request<boolean>({
    url: '/art/historyScoreControlLine',
    method: 'post',
    data
  });
}

/** 修改历年省控线 */
export function fetchUpdateHistoryScoreControlLine(data: Api.Art.HistoryScoreControlLineOperateParams) {
  return request<boolean>({
    url: '/art/historyScoreControlLine',
    method: 'put',
    data
  });
}

/** 批量删除历年省控线 */
export function fetchBatchDeleteHistoryScoreControlLine(controlIds: CommonType.IdType[]) {
  return request<boolean>({
    url: `/art/historyScoreControlLine/${controlIds.join(',')}`,
    method: 'delete'
  });
}
