import request from '@/utils/request'

/******************楼栋楼层*******************/
//楼栋tree列表
export function systemBuildingGetTreeList(data) {
  return request({
    url: '/system/building/getTreeList',
    method: 'post',
    data: data
  })
}
//应急处置-获取楼层-智能物联设备列表
export function iotBigViewDeviceFindByType(data) {
  return request({
    url: '/iot/bigView/device/findByType',
    method: 'post',
    data: data
  })
}
//查询当前正在发生的预案
export function laboratoryBigViewSelectTriggerInfo(query) {
  return request({
    url: '/laboratory/bigView/large/selectTriggerInfo',
    method: 'get',
    params: query
  })
}
//应急处置-获取楼层布局数据
export function laboratoryBigViewGetFloorByBigView(query) {
  return request({
    url: '/laboratory/bigView/getFloorByBigView',
    method: 'get',
    params: query
  })
}
//应急处置-查询楼层/实验室人员
export function laboratoryBigViewOnLineUserList(data) {
  return request({
    url: '/laboratory/bigView/onLineUserList',
    method: 'post',
    data: data
  })
}
/*                部门下拉列表(无数据权限)
* deptName        名称
* level           查询级别
* deptType        1.学院 0.非学院
*/
export function getDeptDropList(data) {
  return request({
    url: '/system/dept/dropList',
    method: 'post',
    data: data
  })
}

/*
应急处置-指定物联设备查询列表
typeKey:'camera'//摄像头
楼层或实验室 floorId 楼层ID  subjectId  实验室ID
*/
export function iotBigViewDeviceList(data) {
  return request({
    url: '/iot/bigView/device/list',
    method: 'post',
    data: data
  })
}

//应急处置-查询实验室传感器列表
export function iotBigViewDeviceFindBySubId(query) {
  return request({
    url: '/iot/bigView/device/findBySubId',
    method: 'get',
    params: query
  })
}

//执行记录-详情
export function laboratoryEventFindByEventId(query) {
  return request({
    url: '/laboratory/event/findByEventId',
    method: 'get',
    params: query
  })
}
//实验室-详情
export function laboratorySubRelInfoGetDetailInfo(query) {
  return request({
    url: '/laboratory/subRelInfo/getDetailInfo',
    method: 'get',
    params: query
  })
}

//应急处置-喇叭播放文本
export function iotBigViewSpeakerPlayText(query) {
  return request({
    url: '/iot/bigView/speaker/playText',
    method: 'get',
    params: query
  })
}

//应急处置-结束预案
export function laboratoryPlanCloseRiskPlan(query) {
  return request({
    url: '/laboratory/plan/closeRiskPlan',
    method: 'get',
    params: query
  })
}

//获取摄像头流地址
export function iotCameraFindByCondition(data) {
  return request({
    url: '/iot/camera/findByCondition',
    method: 'post',
    data: data
  })
}
//根据设备ID获取摄像头流地址
export function iotCameraGetPreviewURLs(query) {
  return request({
    url: '/iot/camera/getPreviewURLs',
    method: 'get',
    params: query
  })
}
/******************************** 安全总览 ********************************/
//实验室状态统计
export function reportReportBigDataLabStateStatistics(query) {
  return request({
    url: '/report/report/bigData/labStateStatistics',
    method: 'get',
    params: query
  })
}
//实验室状态统计-列表
export function reportReportBigDataLabDeptGroupCount(data) {
  return request({
    url: '/report/report/bigData/labDeptGroupCount',
    method: 'post',
    data: data
  })
}
//危险源总数排行
export function reportReportBigDataHazardTotalSort (query) {
  return request({
    url: '/report/report/bigData/hazardTotalSort',
    method: 'get',
    params: query
  })
}
//危险源总数排行-列表
export function reportReportBigDataHazardDeptGroupCount (data) {
  return request({
    url: '/report/report/bigData/hazardDeptGroupCount',
    method: 'post',
    data: data
  })
}
//危化品存量排行
export function reportReportBigDataChemicalStockSort (query) {
  return request({
    url: '/report/report/bigData/chemicalStockSort',
    method: 'get',
    params: query
  })
}
//危化品存量排行-列表
export function reportReportBigDataStockDeptGroupCount (data) {
  return request({
    url: '/report/report/bigData/stockDeptGroupCount',
    method: 'post',
    data: data
  })
}
//安全风险预警处置
export function reportReportBigDataWarningHandle (query) {
  return request({
    url: '/report/report/bigData/warningHandle',
    method: 'get',
    params: query
  })
}
//访问人数
export function reportReportBigDataCountStatistics (query) {
  return request({
    url: '/report/report/bigData/countStatistics',
    method: 'get',
    params: query
  })
}

//人员设备安全
export function reportReportBigDataPersonDeviceSafety (query) {
  return request({
    url: '/report/report/bigData/personDeviceSafety',
    method: 'get',
    params: query
  })
}

//人员设备安全-列表
export function reportReportBigDataDeviceSafetyGroupCount (data) {
  return request({
    url: '/report/report/bigData/deviceSafetyGroupCount',
    method: 'post',
    data: data
  })
}

//安全隐患分布
export function reportReportBigDataDangerDistribution (query) {
  return request({
    url: '/report/report/bigData/dangerDistribution',
    method: 'get',
    params: query
  })
}
//安全隐患分布-列表
export function reportReportBigDataDangerDistrGroupCount (data) {
  return request({
    url: '/report/report/bigData/dangerDistrGroupCount',
    method: 'post',
    data: data
  })
}
//安全隐患排行
export function reportReportBigDataDangerSort (query) {
  return request({
    url: '/report/report/bigData/dangerSort',
    method: 'get',
    params: query
  })
}
//安全隐患排行-列表
export function reportReportBigDataDangerSortGroupCount (data) {
  return request({
    url: '/report/report/bigData/dangerSortGroupCount',
    method: 'post',
    data: data
  })
}
//资源设备统计-笼位预约概况
export function reportReportBsCageRateList (query) {
  return request({
    url: '/report/reportBsCageRate/list',
    method: 'get',
    params: query
  })
}

//资源设备统计-设备使用寿命统计
export function reportReportBsEquipLifeList (query) {
  return request({
    url: '/report/reportBsEquipLife/list',
    method: 'get',
    params: query
  })
}

//设备使用寿命统计-列表
export function reportReportBsEquipLifeGetReportBsEquipLifeList (data) {
  return request({
    url: '/report/reportBsEquipLife/getReportBsEquipLifeList',
    method: 'post',
    data: data
  })
}

//资源设备统计-超期服役设备统计
export function reportReportBsEquipOverdueList (query) {
  return request({
    url: '/report/reportBsEquipOverdue/list',
    method: 'get',
    params: query
  })
}
//资源设备统计-设备隐患统计
export function reportReportBsEquipDangerList (data) {
  return request({
    url: '/report/reportBsEquipDanger/list',
    method: 'post',
    data: data
  })
}
//资源设备统计-设备隐患统计
export function laboratorySubRelInfoKeySubList  (data) {
  return request({
    url: '/laboratory/subRelInfo/keySubList ',
    method: 'post',
    data: data
  })
}
//校级-校区-楼栋-楼层-列表
export function laboratoryLabDeptTreeGetTreeList (data) {
  return request({
    url: '/laboratory/labDeptTree/getTreeList',
    method: 'post',
    data: data
  })
}
//楼层下查询房间列表
export function laboratoryLabDeptTreeGetRoomList (data) {
  return request({
    url: '/laboratory/labDeptTree/getRoomList',
    method: 'post',
    data: data
  })
}
// 分级下拉列表
export function laboratoryLevelConfigGetLevelTitleList(data) {
  return request({
    url: '/laboratory/levelConfig/getLevelTitleList',
    method: 'post',
    data: data
  })
}
// 大仪预约情况概览
export function reportReportBsEquipStatusList(query) {
  return request({
    url: '/report/reportBsEquipStatus/list',
    method: 'get',
    params: query
  })
}
// 大仪使用排行
export function reportReportBsEquipRankTopList(query) {
  return request({
    url: '/report/reportBsEquipRank/topList',
    method: 'get',
    params: query
  })
}
// 大仪使用排行-列表
export function reportReportBsEquipRankList(data) {
  return request({
    url: '/report/reportBsEquipRank/list',
    method: 'post',
    data: data
  })
}
// 大仪预约排行
export function reportReportBsEquipAppointTopList(query) {
  return request({
    url: '/report/reportBsEquipAppoint/topList',
    method: 'get',
    params: query
  })
}
// 大仪预约排行
export function reportReportBsEquipAppointList(data) {
  return request({
    url: '/report/reportBsEquipAppoint/list',
    method: 'post',
    data: data
  })
}
// 资源设备统计-资源分类占比统计
export function reportReportBsResourceRateAnalysisList(query) {
  return request({
    url: '/report/reportBsResourceRate/analysisList',
    method: 'get',
    params: query
  })
}

//资源设备统计-资源预约情况概览
export function reportReportBsResourceRateRresourceList (query) {
  return request({
    url: '/report/reportBsResourceRate/resourceList',
    method: 'get',
    params: query
  })
}


/*
* 获取楼栋楼层实验室打卡在线记录
* buildId-楼栋
* floorId-楼层/楼道
* subId-实验室
*/
export function laboratorySubPassOutGetCountByBuildId (data) {
  return request({
    url: '/laboratory/subPassOut/getCountByBuildId',
    method: 'post',
    data: data
  })
}
/*
* 查询楼层-危险源数据
* floorId-楼层
*/
export function laboratoryBigViewHazardStatistics (query) {
  return request({
    url: '/laboratory/bigView/hazardStatistics',
    method: 'get',
    params: query
  })
}
/* 新安全总览 */
//全校实验室实时统计数量
export function laboratorySubRelInfoLabStateStatisticsAll (query) {
  return request({
    url: '/laboratory/subRelInfo/labStateStatisticsAll',
    method: 'get',
    params: query
  })
}
//全校实验室实时统计数量
export function laboratorySubRelInfoGetLabTypeStatistics (query) {
  return request({
    url: '/laboratory/subRelInfo/getLabTypeStatistics',
    method: 'get',
    params: query
  })
}

//实验室危险源种类数量
export function chemicalStockHazardClassStatistics (query) {
  return request({
    url: '/chemical/stock/hazardClassStatistics',
    method: 'get',
    params: query
  })
}

//危险源统计分析
export function chemicalStockHazMartClassStatistics (query) {
  return request({
    url: '/chemical/stock/hazMartClassStatistics',
    method: 'get',
    params: query
  })
}

//新楼栋-楼层树结构
export function laboratoryLabDeptTreeLargeTree (data) {
  return request({
    url: '/laboratory/labDeptTree/large/tree',
    method: 'post',
    data: data
  })
}
//楼层下查询房间列表
export function laboratoryLabDeptTreeLargeRooms (data) {
  return request({
    url: '/laboratory/labDeptTree/large/rooms',
    method: 'post',
    data: data
  })
}

//根据过滤条件获取摄像头流地址
export function iotCameraLargeFindByCondition(data) {
  return request({
    url: '/iot/camera/large/findByCondition',
    method: 'post',
    data: data
  })
}

//纯水设备数据获取
export function waterMonitorWaterUseData(query) {
  return request({
    url: '/water/monitor/waterUseData',
    method: 'get',
    params: query
  })
}
//获取纯水报警数据
export function waterWaterWarnRecordGetWarnById(data) {
  return request({
    url: '/water/waterWarnRecord/getWarnById',
    method: 'post',
    data: data
  })
}
