/*
 * @Author: SunTao 328867980@qq.com
 * @Date: 2024-11-27 10:58:33
 * @LastEditors: SunTao 328867980@qq.com
 * @LastEditTime: 2025-02-21 14:11:52
 * @FilePath: \znxjxt-ui\src\api\xj\document.js
 * @Description: 养护通知单相关接口
 */

import request from "@/utils/request";

// 路段下拉数据
export function getSegment() {
  return request({
    url: "/api/v2/segment/selectList",
    method: "post",
  });
}

// 查询列表病害类型
export function getDefectList(params) {
  return request({
    url: "/bigscreen/v2/getDefectTypesDrowDown",
    method: "get",
    params,
  });
}

// 病害状态下拉类型
export function getDefectStatus() {
  return request({
    url: "/metadata/defectState",
    method: "get",
  });
}

// 获取养护通知单列表
export function getMaintenanceNoticeList(params) {
  return request({
    url: "/maintenance-notice/list",
    method: "get",
    params,
  });
}

// 获取工单推测数据
export function getMaintenanceDetail(data) {
  return request({
    url: "/maintenance-notice/getInferredData",
    method: "post",
    data,
  });
}

// 生成养护通知单
export function addMaintenanceNotice(data) {
  return request({
    url: "/maintenance-notice/create",
    method: "post",
    data,
  });
}

// 根据id查询养护通知单
export function getMaintenanceNoticeById(params) {
  return request({
    url: `/maintenance-notice/getNoticeByDefectId`,
    method: "get",
    params,
  });
}

// 查询病害列表
export function listDefect(query) {
  return request({
    url: "/xj/defect/list",
    method: "get",
    params: query,
  });
}

// 查询病害成因下拉列表
export function getCausesList(params) {
  return request({
    url: "/hxDic/diseCauses",
    method: "get",
    params,
  });
}

// 获取路段类型下拉列表
export function getSegmentTypeList(params) {
  return request({
    url: "/hxDic/roadPosiType",
    method: "get",
    params,
  });
}

// 获取匝道类型下拉数据
export function getRampTypeList(params) {
  return request({
    url: "/hxDic/rampType",
    method: "get",
    params,
  });
}

// 获取道路方向下拉数据
export function getRoadDirectionList(params) {
  return request({
    url: "/hxDic/roadDirection",
    method: "get",
    params,
  });
}

//获取收费站位置下拉数据
export function getStationLocation(params) {
  return request({
    url: "/hxDic/stationLocation",
    method: "get",
    params,
  });
}

// 获取一级病害类型下拉列表
export function getDiseFirstType(params) {
  return request({
    url: "/hxDic/diseFirstType",
    method: "get",
    params,
  });
}

// 获取病害详细类型下拉数据
export function getDiseTypeDetailed(params) {
  return request({
    url: "/hxDic/diseTypeDetailed",
    method: "get",
    params,
  });
}

// 获取海信路段下拉数据
export function getDiseRoadPartDropDown(params) {
  return request({
    url: "/hxsection/dropDown",
    method: "get",
    params,
  });
}

// 获取工区下拉数据
export function getTaskareaDropDown(params) {
  return request({
    url: "/hxtaskarea/dropDown",
    method: "get",
    params,
  });
}

// 获取工作站下拉数据
export function getWorkstationDropDown(params) {
  return request({
    url: "/hxworkstation/dropDown",
    method: "get",
    params,
  });
}

// 获取桥梁下拉数据
export function getBridgeDropDown(params) {
  return request({
    url: "/hxBridge/dropDown",
    method: "get",
    params,
  });
}

// 获取隧道下拉数据
export function getTunnelDropDown(params) {
  return request({
    url: "/hxtunnel/dropDown",
    method: "get",
    params,
  });
}

// 获取收费站下拉数据
export function getStationDropDown(params) {
  return request({
    url: "/hxstation/dropDown",
    method: "get",
    params,
  });
}

// 获取匝道下拉数据
export function getRampDropDown(params) {
  return request({
    url: "/hxramp/dropDown",
    method: "get",
    params,
  });
}

// 获取互通立交下拉数据
export function getCrossDropDown(params) {
  return request({
    url: "/hxCross/dropDown",
    method: "get",
    params,
  });
}
