import request from '@/utils/http'

// 代办事项列表
export function getToDoList() {
  return request({
    url: '/supplierAppV2/dispatchApp/toDoMessage/toDoList',
    method:'POST',
  })
}
// 调度APP待办事项列表New
export function toDoListNew() {
  return request({
    url: '/supplierAppV2/dispatchApp/toDoMessage/toDoListNew',
    method:'POST',
  })
}
// 代办事项审核
export function toDoAudit(data){
  return request({
    url:'/supplierAppV2/dispatchApp/toDoMessage/toDoAudit',
    method:'POST',
    contentType: 'application/json',
    data
  })
}
//
export function getOrderDetail(data){
  return request({
    url:'/supplierAppV2/dispatchApp/order/getOrderDetail',
    method:'POST',
    contentType:'application/json',
    data
  })
}
// 工单司机位置
export function showVehiclePositionInfo(data){
  return request({
    url:'/supplierAppV2/dispatchApp/order/showVehiclePositionInfo',
    method:'POST',
    contentType:'application/json',
    data
  })
}
// 工单报备
export  function orderReporting(data){
  return request({
    url:'/supplierAppV2/dispatchApp/order/orderReporting',
    method:'POST',
    contentType:'application/json',
    data
  })
}
// 查看报备列表
export  function  orderReportingList(data){
  return request({
    url:'/supplierAppV2/dispatchApp/order/orderReportingList',
    method:'POST',
    contentType:'application/json',
    data
  })
}
// 获取订单结算单信息
export function getOrderSettlement(data){
  return request({
    url:'/supplierAppV2/dispatchApp/order/getOrderSettlement',
    method:'POST',
    contentType:'application/json',
    data
  })
}
// 修改结算信息
export function updateOrderSettlement(data){
  return request({
    url:'/supplierAppV2/dispatchApp/order/updateOrderSettlement',
    method:'POST',
    contentType:'application/json',
    data
  })
}
// 获取司机信息
export function getDriverInfo(data){
  return request({
    url:'/supplierAppV2/dispatchApp/order/getDriverInfo',
    method:'POST',
    contentType:'application/json',
    data
  })
}
// 电瓶数量列表
export function batteryCountList(){
  return request({
    url:'/supplierAppV2/dispatchApp/battery/batteryCountList',
    method:'POST',
    contentType:'application/json',
    // data
  })
}
// 电瓶详情
export function batteryDetailList (data){
  return request({
    url:'/supplierAppV2/dispatchApp/battery/batteryDetailList',
    method:'POST',
    contentType:'application/json',
    data
  })
}

// 查询未读告知函
export function selectUnReadNotifyBySupplier() {
  return request({
    url: '/supplierManage/correction/notify/selectUnReadNotifyBySupplier',
    method:'POST',
  })
}

// 阅读告知函
export function correctionHandle(data) {
  return request({
    url: '/supplierManage/correction/record/correctionHandle',
    method:'POST',
    data
  })
}


// 获取报警列表
export function getAlarmList(data) {
  return request({
    url: '/supplierAppV2/dispatchApp/alarm/alarmList',
    method:'POST',
    contentType: 'application/json',
    data
  })
}

// 获取报警数目
export function getAlarmCount(data) {
  return request({
    url: '/supplierAppV2/dispatchApp/alarm/alarmCount',
    method:'POST',
    data
  })
}

// 获取报警详情
export function getAlarmByCode(data) {
  return request({
    url: '/supplierAppV2/dispatchApp/alarm/getAlarmByCode',
    method:'POST',
    data
  })
}

// 处理报警
export function dealWithAlarm(data) {
  return request({
    url: '/supplierAppV2/dispatchApp/alarm/handAlarm',
    method:'POST',
    data
  })
}

//获取当前任务信息
export function getConfigByCode(data){
  return request({
    url: '/base/baseConfig/getConfigByCode',
    method:'POST',
    data
  })
}

//获取最新版本
export function getNewVersion(key){
  return request({
    url: '/driverApp/app/updateVersion',
    method:'GET',
    params: key
  })
}

export function getLog(data){
  // 添加log
  return request({
    url: '/ureport/pageView/save',
    method:'POST',
    contentType:'application/json',
    data
  })
}


//获取最新版本
export function getUserBO(){
  return request({
    url: '/base/user/getUserBO',
    method:'POST',
  })
}

