import request from '@/utils/request'

/**************** 信息记录 ******************/
// 气体下拉框
export function airbottleStockGroupBottleName (query) {
  return request({
    url: '/airbottle/stock/groupBottleName',
    method: 'get',
    params: query
  })
}

// 出入库统计
export function airbottleStatisticsList (query) {
  return request({
    url: '/airbottle/statistics/list',
    method: 'get',
    params: query
  })
}

// 用气数统计
export function airbottleStatisticsOutList (query) {
  return request({
    url: '/airbottle/statistics/outList',
    method: 'get',
    params: query
  })
}

// 用气量统计
export function airbottleStatisticsApplyList (query) {
  return request({
    url: '/airbottle/statistics/applyList',
    method: 'get',
    params: query
  })
}

/**************** 信标列表 ******************/
// 信标列表
export function airbottleBeaconList (data) {
  return request({
    url: '/airbottle/beacon/list',
    method: 'post',
    data: data
  })
}
// 信标列表-新增
export function airbottleBeaconAdd (data) {
  return request({
    url: '/airbottle/beacon/add',
    method: 'post',
    data: data
  })
}
// 信标列表-详情
export function airbottleBeaconFindById (query) {
  return request({
    url: '/airbottle/beacon/findById',
    method: 'get',
    params: query
  })
}
// 信标列表-删除
export function airbottleBeaconDelete (data) {
  return request({
    url: '/airbottle/beacon/delete',
    method: 'post',
    data: data
  })
}

/**************** 使用记录 ******************/
// 信标列表
export function airbottleUsageRecordList (data) {
  return request({
    url: '/airbottle/usageRecord/list',
    method: 'post',
    data: data
  })
}
// 信标列表-详情
export function airbottleUsageRecordFindById (query) {
  return request({
    url: '/airbottle/usageRecord/findById',
    method: 'get',
    params: query
  })
}
/**************** 入库/出库记录 ******************/
// 入库/出库列表  type:1-入库,2-出库
export function airbottleInOutRecordList (data) {
  return request({
    url: '/airbottle/inOutRecord/list',
    method: 'post',
    data: data
  })
}
// 入库/出库-详情
export function airbottleInOutRecordFindById (query) {
  return request({
    url: '/airbottle/inOutRecord/findById',
    method: 'get',
    params: query
  })
}

/**************** 气瓶类型 ******************/
// 气瓶类型-列表
export function airbottleBottleTypeList (data) {
  return request({
    url: '/airbottle/bottleType/list',
    method: 'post',
    data: data
  })
}
// 气瓶类型-新增
export function airbottleBottleTypeAdd (data) {
  return request({
    url: '/airbottle/bottleType/add',
    method: 'post',
    data: data
  })
}
// 气瓶类型-编辑
export function airbottleBottleTypeUpdate (data) {
  return request({
    url: '/airbottle/bottleType/update',
    method: 'post',
    data: data
  })
}
// 气瓶类型-详情
export function airbottleBottleTypeFindById (query) {
  return request({
    url: '/airbottle/bottleType/findById',
    method: 'get',
    params: query
  })
}
// 气瓶类型-删除
export function airbottleBottleTypeDelete (data) {
  return request({
    url: '/airbottle/bottleType/delete',
    method: 'post',
    data: data
  })
}

/**************** 库存信息 ******************/
// 气瓶类型-列表
export function airbottleStockList (data) {
  return request({
    url: '/airbottle/stock/list',
    method: 'post',
    data: data
  })
}
/**************** 实验室气瓶查询 ******************/
export function airbottleStockFindClassifyBySubId (query) {
  return request({
    url: '/airbottle/stock/findClassifyBySubId',
    method: 'get',
    params: query
  })
}

/**************** 处理预警 ******************/
// 处理预警
export function laboratoryWarningNoticeLogUpdate (data) {
  return request({
    url: '/laboratory/warningNoticeLog/updateDeal',
    method: 'post',
    data: data
  })
}

/*根据楼层实验室ID查询危险源列表*/
export function airbottleStock (query) {
  return request({
    url: '/airbottle/stock/'+query,
    method: 'get',
  })
}
/*获取气瓶报警数据*/
export function airbottleBluetoothGetBeaconNotice (query) {
  return request({
    url: '/airbottle/bluetooth/getBeaconNotice',
    method: 'get',
  })
}
