import http from './http';

export function goLogin(data) {
  return http({
    url: '/auth/b/doLogin',
    method: 'post',
    data: data
  })
}

export function getLoginUser(data) {
  return http({
    url: '/auth/b/getLoginUser',
    method: 'get',
    params: data
  })
}

// 预警
export function getWarnList(data) {
  return http({
    url: '/warning/warningInfo/page',
    method: 'post',
    data: data
  })
}

// 获取巡检数量
export function getPollingNum(data) {
  return http({
    url: '/ai/taskInspection/getNum',
    method: 'get',
    params: data
  })
}

// 获取任务巡检分页
export function getTaskPage(data) {
  return http({
    url: '/ai/taskInspection/page',
    method: 'get',
    params: data
  })
}

// 根据id获取任务巡检详情
export function getTaskById(data) {
  return http({
    url: '/ai/taskInspection/detail',
    method: 'get',
    params: data
  })
}

// 提交任务巡检
export function putTask(data) {
  return http({
    url: '/ai/taskInspection/edit',
    method: 'post',
    data: data
  })
}

// 日常任务分页
export function getDailyPage(data) {
  return http({
    url: '/ai/dailyInspection/page',
    method: 'get',
    params: data
  })
}

// 根据id获取日常任务详情
export function getDailyById(data) {
  return http({
    url: '/ai/dailyInspection/detail',
    method: 'get',
    params: data
  })
}

// 提交日常巡检
export function putDaily(data) {
  return http({
    url: '/ai/dailyInspection/edit',
    method: 'post',
    data: data
  })
}

// 获取栋
export function getPigpenList(data) {
  return http({
    url: '/biz/pigpen/listBuild',
    method: 'get',
    params: data
  })
}

// 获取单元
export function getUnitList(data) {
  return http({
    url: '/biz/pigpen/listUnit',
    method: 'get',
    params: data
  })
}

// 获取环控 实时监测
export function getEnvByUnit(data) {
  return http({
    url: '/env/envData/getLastDataByPigpenId',
    method: 'get',
    params: data
  })
}

// 获取环控温湿度曲线
export function getEnvByChart(data) {
  return http({
    url: '/env/envData/listDataByPigpenId',
    method: 'post',
    data: data
  })
}

// 能耗栋舍树
export function getPigpenTree(data) {
  return http({
    url: '/biz/pigpen/mobileTree',
    method: 'get',
    params: data
  })
}

// 移动端能耗实时监测
export function getEnergyVal(data) {
  return http({
    url: '/energy/energyElectricity/getToday',
    method: 'post',
    data: data
  })
}

// 能耗水chart
export function getEnergyWaterChart(data) {
  return http({
    url: '/energy/energyWater/listTrend',
    method: 'get',
    params: data
  })
}

// 能耗电chart
export function getEnergyEleChart(data) {
  return http({
    url: '/energy/energyElectricity/listTrend',
    method: 'get',
    params: data
  })
}

// 人员行为识别
export function getAiPersonList(data) {
  return http({
    url: '/ai/personCapture/page',
    method: 'get',
    params: data
  })
}

// 车辆识别
export function getAiCarList(data) {
  return http({
    url: '/ai/carCapture/page',
    method: 'get',
    params: data
  })
}

// 外来人员
export function getAiSpeciesList(data) {
  return http({
    url: '/ai/speciesCapture/page',
    method: 'get',
    params: data
  })
}

// 外来人员
export function getAiDirtyList(data) {
  return http({
    url: '/ai/dirtyCapture/page',
    method: 'get',
    params: data
  })
}

// 精准饲喂全场
export function getFeedWhole(data) {
  return http({
    url: '/feed/feedinglist/listFatMove',
    method: 'post',
    data: data
  })
}
// 精准饲喂整栋
export function getFeedPigpen(data) {
  return http({
    url: '/feed/feedinglist/listFatByUnitId',
    method: 'post',
    data: data
  })
}

// 精准饲喂单元
export function getFeedUnitPage(data) {
  return http({
    url: '/feed/feedinglist/fatPage',
    method: 'post',
    data: data
  })
}

// 精准饲喂详情采食
export function getFeedDetailChart(data) {
  return http({
    url: '/feed/feedinglist/listDetail',
    method: 'post',
    data: data
  })
}
