import request from "@/utils/request";

// 查询线路检修完成情况列表
export function listMaintenanceStatistics(query) {
  return request({
    url: "/powerdistribution/maintenance/statistics/list",
    method: "get",
    params: query,
  });
}

// 查询线路检修完成情况详细
export function getMaintenanceStatistics(eventNo) {
  return request({
    url: "/powerdistribution/maintenance/statistics/" + eventNo,
    method: "get",
  });
}

// 新增线路检修完成情况
export function addMaintenanceStatistics(data) {
  return request({
    url: "/powerdistribution/maintenance/statistics",
    method: "post",
    data: data,
  });
}

// 修改线路检修完成情况
export function updateMaintenanceStatistics(data) {
  return request({
    url: "/powerdistribution/maintenance/statistics",
    method: "put",
    data: data,
  });
}

// 删除线路检修完成情况
export function delMaintenanceStatistics(eventNo) {
  return request({
    url: "/powerdistribution/maintenance/statistics/" + eventNo,
    method: "delete",
  });
}

// 查询线路
export function selectCompleteList(params) {
  return request({
    url: "/power/line/selectCompleteList",
    method: "get",
    params,
  });
}
// 查询分支线路
export function selectBranchLineCompleteList(params) {
  return request({
    url: "/power/branchLine/selectBranchLineCompleteList",
    method: "get",
    params,
  });
}

// 新增时户数考核规则分级
export function addExamineRoleTarget(data) {
  return request({
    url: "/power/examineRoleTarget",
    method: "post",
    data: data,
  });
}

// 获取时户数考核规则分级详细信息
export function examineRoleTarget(id) {
  return request({
    url: `/power/examineRoleTarget/${id}`,
    method: "get",
  });
}

//删除时户数考核规则分级
export function dleExamineRoleTarget(ids) {
  return request({
    url: `/power/examineRoleTarget/delete/${ids}`,
    method: "get",
  });
}
//查询时户数考核规则分级列表
export function examineRoleTargetList(params) {
  return request({
    url: `/power/examineRoleTarget/list`,
    method: "get",
    params,
  });
}

// 修改时户数考核规则分级
export function updateExamineRoleTarget(data) {
  return request({
    url: "/power/examineRoleTarget/update",
    method: "post",
    data: data,
  });
}

//新增时户数考核规则明细
export function addExamineRoleDetail(data) {
  return request({
    url: "/power/examineRoleDetail/add",
    method: "post",
    data: data,
  });
}

// 获取时户数考核规则明细详细信息
export function dxamineRoleDetail(id) {
  return request({
    url: `/power/examineRoleDetail/${id}`,
    method: "get",
  });
}

//删除时户数考核规则分级
export function dleExamineRoleDetail(ids) {
  return request({
    url: `/power/examineRoleDetail/delete/${ids}`,
    method: "get",
  });
}
//查询时户数考核规则分级列表
export function examineRoleDetailList(params) {
  return request({
    url: `/power/examineRoleDetail/list`,
    method: "get",
    params,
  });
}

// 修改时户数考核规则分级
export function updateExamineRoleDetail(data) {
  return request({
    url: "/power/examineRoleDetail/update",
    method: "post",
    data: data,
  });
}

export function getExamineCountyInfo() {
  return request({
    url: `/powerdistribution/pdmExamineCounty/getExamineCountyInfo`,
    method: "get",
  });
}

export function saveBatch(data) {
  return request({
    url: "/powerdistribution/pdmExamineCounty/saveBatch",
    method: "post",
    data: data,
  });
}
export function upPdmExamineCounty(data) {
  return request({
    url: "/powerdistribution/pdmExamineCounty",
    method: "post",
    data: data,
  });
}
