Documentation ¶
Index ¶
- Variables
- func AppendWarning(args *ArgsAppendWarning) (haveData bool, err error)
- func CheckWarningByRoomID(roomID int64, callType int) (b bool)
- func DeleteRoom(args *ArgsDeleteRoom) (err error)
- func DeleteSensorClear(args *ArgsDeleteSensorClear) (err error)
- func GetRoomCountByOrgID(orgID int64) (count int64)
- func GetRoomIDByInfo(infoID int64) (roomID int64)
- func GetRoomName(id int64) (name string)
- func GetRoomNames(args *ArgsGetRoomMore) (dataList map[int64]string, err error)
- func GetRoomsName(args *ArgsGetRooms) (data map[int64]string, err error)
- func Init()
- func Run()
- func UnWarning(args *ArgsAppendWarning) (err error)
- func UpdateRoom(args *ArgsUpdateRoom) (errCode string, err error)
- func UpdateRoomColor(args *ArgsUpdateRoomColor) (err error)
- func UpdateServiceSortBindGroup(args *ArgsUpdateServiceSortBindGroup) (err error)
- func UpdateServiceSortMissionExpire(args *ArgsUpdateServiceSortMissionExpire) (err error)
- func UpdateServiceStatus(args *ArgsUpdateServiceStatus) (errCode string, err error)
- func UpdateStatus(args *ArgsUpdateStatus) (errCode string, err error)
- type ArgsAppendWarning
- type ArgsCreateRoom
- type ArgsDeleteRoom
- type ArgsDeleteSensorClear
- type ArgsGetLogList
- type ArgsGetRoomByInfo
- type ArgsGetRoomByOrg
- type ArgsGetRoomCode
- type ArgsGetRoomID
- type ArgsGetRoomList
- type ArgsGetRoomMore
- type ArgsGetRoomSearch
- type ArgsGetRooms
- type ArgsGetSensorAnalysis
- type ArgsGetSensorList
- type ArgsGetSensorMore
- type ArgsGetSensorMoreMarks
- type ArgsGetWarningByRooms
- type ArgsGetWarningList
- type ArgsUpdateRoom
- type ArgsUpdateRoomColor
- type ArgsUpdateServiceSortBindGroup
- type ArgsUpdateServiceSortMissionExpire
- type ArgsUpdateServiceStatus
- type ArgsUpdateStatus
- type DataGetRoomAndInfosSearch
- type DataGetRoomSearch
- type DataGetSensorAnalysis
- func GetSensorAnalysis(args *ArgsGetSensorAnalysis) (dataList []DataGetSensorAnalysis, err error)
- func GetSensorAnalysisAvg(args *ArgsGetSensorAnalysis) (dataList []DataGetSensorAnalysis, err error)
- func GetSensorAnalysisMax(args *ArgsGetSensorAnalysis) (dataList []DataGetSensorAnalysis, err error)
- func GetSensorAnalysisMin(args *ArgsGetSensorAnalysis) (dataList []DataGetSensorAnalysis, err error)
- type DataInfoNoInRoom
- type FieldsLog
- type FieldsRoom
- func CreateRoom(args *ArgsCreateRoom) (data FieldsRoom, err error)
- func GetAllRoomListByOrgID(orgID int64) (dataList []FieldsRoom, err error)
- func GetRoomByInfo(args *ArgsGetRoomByInfo) (data FieldsRoom, err error)
- func GetRoomByOrg(args *ArgsGetRoomByOrg) (dataList []FieldsRoom, err error)
- func GetRoomCode(args *ArgsGetRoomCode) (data FieldsRoom, err error)
- func GetRoomID(args *ArgsGetRoomID) (data FieldsRoom, err error)
- func GetRoomList(args *ArgsGetRoomList) (dataList []FieldsRoom, dataCount int64, err error)
- func GetRoomListByInfo(infoID int64) (dataList []FieldsRoom, err error)
- func GetRoomMore(args *ArgsGetRoomMore) (dataList []FieldsRoom, err error)
- func GetRooms(args *ArgsGetRooms) (dataList []FieldsRoom, err error)
- type FieldsSensor
- type FieldsWarning
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AppendWarning ¶
func AppendWarning(args *ArgsAppendWarning) (haveData bool, err error)
AppendWarning 推送一个新的应急呼叫日志 1分钟内重复请求创建不会被记录到系统,不会抛出错误信息
func CheckWarningByRoomID ¶
CheckWarningByRoomID 判断房间是否存在紧急呼叫?
func DeleteSensorClear ¶
func DeleteSensorClear(args *ArgsDeleteSensorClear) (err error)
DeleteSensorClear 清理指定数据
func GetRoomCountByOrgID ¶
GetRoomCountByOrgID 获取房间总数
func GetRoomIDByInfo ¶
func GetRoomName ¶
func GetRoomNames ¶
func GetRoomNames(args *ArgsGetRoomMore) (dataList map[int64]string, err error)
func GetRoomsName ¶
func GetRoomsName(args *ArgsGetRooms) (data map[int64]string, err error)
func UpdateRoom ¶
func UpdateRoom(args *ArgsUpdateRoom) (errCode string, err error)
UpdateRoom 更新房间基本信息
func UpdateRoomColor ¶
func UpdateRoomColor(args *ArgsUpdateRoomColor) (err error)
UpdateRoomColor 更新房间颜色
func UpdateServiceSortBindGroup ¶
func UpdateServiceSortBindGroup(args *ArgsUpdateServiceSortBindGroup) (err error)
UpdateServiceSortBindGroup 设置分类的默认分配ID
func UpdateServiceSortMissionExpire ¶
func UpdateServiceSortMissionExpire(args *ArgsUpdateServiceSortMissionExpire) (err error)
UpdateServiceSortMissionExpire 设置分类的请求时间长度
func UpdateServiceStatus ¶
func UpdateServiceStatus(args *ArgsUpdateServiceStatus) (errCode string, err error)
UpdateServiceStatus 修改房间呼叫状态
func UpdateStatus ¶
func UpdateStatus(args *ArgsUpdateStatus) (errCode string, err error)
UpdateStatus 修改房间入驻状态
Types ¶
type ArgsAppendWarning ¶
type ArgsAppendWarning struct { //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //房间ID RoomID int64 `db:"room_id" json:"roomID" check:"id" empty:"true"` //设备ID DeviceID int64 `db:"device_id" json:"deviceID" check:"id" empty:"true"` //是否需要推送MQTT NeedMQTT bool `json:"needMQTT" check:"bool"` //呼叫类型 // 0 紧急呼叫; 1 普通呼叫 CallType int `db:"call_type" json:"callType"` }
ArgsAppendWarning 推送一个新的应急呼叫日志参数
type ArgsCreateRoom ¶
type ArgsCreateRoom struct { //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //分类ID SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"` //标签 Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"` //入驻人员列 Infos pq.Int64Array `db:"infos" json:"infos" check:"ids" empty:"true"` //房间编号 Code string `db:"code" json:"code" check:"mark" empty:"true"` //名称 Name string `db:"name" json:"name" check:"name"` //描述 Des string `db:"des" json:"des" check:"des" min:"1" max:"1000" empty:"true"` //封面 CoverFileID int64 `db:"cover_file_id" json:"coverFileID" check:"id" empty:"true"` //描述图 DesFiles pq.Int64Array `db:"des_files" json:"desFiles" check:"ids" empty:"true"` //扩展参数 Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"` }
ArgsCreateRoom 创建新的房间参数
type ArgsDeleteRoom ¶
type ArgsDeleteRoom struct { //ID ID int64 `db:"id" json:"id" check:"id"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` }
ArgsDeleteRoom 删除房间参数
type ArgsDeleteSensorClear ¶
type ArgsDeleteSensorClear struct { //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //房间ID RoomID int64 `db:"room_id" json:"roomID" check:"id" empty:"true"` //设备ID DeviceID int64 `db:"device_id" json:"deviceID" check:"id" empty:"true"` //数据标识码 Mark string `db:"mark" json:"mark" check:"mark" empty:"true"` //是否为历史数据 IsHistory bool `json:"isHistory" check:"bool"` }
ArgsDeleteSensorClear 删除统计数据参数
type ArgsGetLogList ¶
type ArgsGetLogList struct { //分页 Pages CoreSQLPages.ArgsDataList `json:"pages"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //房间ID RoomID int64 `db:"room_id" json:"roomID" check:"id" empty:"true"` //状态 // 0 进入; 1 退出; 2 退房中(核对清理状态); 3 清理中; 4 呼叫中; 5 已经应答并发出任务; 6 任务处理完成 Status int `db:"status" json:"status" check:"intThan0" empty:"true"` //入驻人员 InfoID int64 `db:"info_id" json:"infoID" check:"id" empty:"true"` //任务ID MissionID int64 `db:"mission_id" json:"missionID" check:"id" empty:"true"` //搜索 Search string `json:"search" check:"search" empty:"true"` }
ArgsGetLogList 获取日志列表参数
type ArgsGetRoomByInfo ¶
type ArgsGetRoomByInfo struct { //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //入驻人员 InfoID int64 `db:"info_id" json:"infoID" check:"id" empty:"true"` //状态 // -1 不过滤状态; 0 空闲; 1 有人; 2 退房; 3 不可用 Status int `db:"status" json:"status" check:"intThan0" empty:"true"` }
ArgsGetRoomByInfo 获取人员入驻的房间参数
type ArgsGetRoomByOrg ¶
type ArgsGetRoomByOrg struct { //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //分类ID SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"` //是否存在呼叫 NeedCall bool `json:"needCall" check:"bool"` IsCall bool `json:"isCall" check:"bool"` }
ArgsGetRoomByOrg 获取组织下所有可用房间参数
type ArgsGetRoomCode ¶
type ArgsGetRoomCode struct { //房间编号 Code string `db:"code" json:"code" check:"mark"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` }
ArgsGetRoomCode 获取指定房间ID参数
type ArgsGetRoomID ¶
type ArgsGetRoomID struct { //ID ID int64 `db:"id" json:"id" check:"id"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` }
ArgsGetRoomID 获取指定房间ID参数
type ArgsGetRoomList ¶
type ArgsGetRoomList struct { //分页 Pages CoreSQLPages.ArgsDataList `json:"pages"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //分类ID SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"` //标签 Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"` //状态 // 0 空闲; 1 有人; 2 退房; 3 不可用 Status int `db:"status" json:"status" check:"intThan0" empty:"true"` //入驻人员 InfoID int64 `db:"info_id" json:"infoID" check:"id" empty:"true"` //是否删除 IsRemove bool `db:"is_remove" json:"isRemove" check:"bool"` //搜索 Search string `json:"search" check:"search" empty:"true"` }
ArgsGetRoomList 获取房屋列表参数
type ArgsGetRoomMore ¶
type ArgsGetRoomMore struct { //ID列 IDs pq.Int64Array `json:"ids" check:"ids"` //是否包含删除数据 HaveRemove bool `json:"haveRemove" check:"bool"` }
ArgsGetRoomMore 获取一组房间参数
type ArgsGetRoomSearch ¶
type ArgsGetRoomSearch struct { //最大个数 Max int64 `db:"max" json:"max" check:"max"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //搜索 Search string `json:"search" check:"search" empty:"true"` }
ArgsGetRoomSearch 搜索房间参数
type ArgsGetRooms ¶
type ArgsGetRooms struct { //ID列 IDs pq.Int64Array `json:"ids" check:"ids"` //是否包含删除数据 HaveRemove bool `json:"haveRemove" check:"bool"` }
ArgsGetRooms 获取一组房间参数
type ArgsGetSensorAnalysis ¶
type ArgsGetSensorAnalysis struct { //查询时间范围 TimeBetween CoreSQLTime.FieldsCoreTime `json:"timeBetween"` //结构方式 // year / month / day / hour TimeType string `json:"timeType"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //房间ID RoomID int64 `db:"room_id" json:"roomID" check:"id" empty:"true"` //设备ID DeviceID int64 `db:"device_id" json:"deviceID" check:"id" empty:"true"` //数据标识码 Mark string `db:"mark" json:"mark" check:"mark"` //是否为历史数据 IsHistory bool `json:"isHistory" check:"bool"` }
ArgsGetSensorAnalysis 获取统计数据SUM参数
type ArgsGetSensorList ¶
type ArgsGetSensorList struct { //分页 Pages CoreSQLPages.ArgsDataList `json:"pages"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //房间ID RoomID int64 `db:"room_id" json:"roomID" check:"id" empty:"true"` //设备ID DeviceID int64 `db:"device_id" json:"deviceID" check:"id" empty:"true"` //数据标识码 Mark string `db:"mark" json:"mark" check:"mark" empty:"true"` //是否为历史数据 IsHistory bool `json:"isHistory" check:"bool"` }
ArgsGetSensorList 获取统计数据列表参数
type ArgsGetSensorMore ¶
type ArgsGetSensorMore struct { //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //房间ID列 RoomIDs pq.Int64Array `db:"room_ids" json:"roomIDs" check:"ids"` //数据标识码 Mark string `db:"mark" json:"mark" check:"mark"` }
ArgsGetSensorMore 获取一组房间最新的数据参数
type ArgsGetSensorMoreMarks ¶
type ArgsGetSensorMoreMarks struct { //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //房间ID列 RoomIDs pq.Int64Array `db:"room_ids" json:"roomIDs" check:"ids"` //数据标识码 Marks pq.StringArray `db:"marks" json:"marks" check:"marks"` }
ArgsGetSensorMoreMarks 获取一组房间最新的数据参数
type ArgsGetWarningByRooms ¶
type ArgsGetWarningByRooms struct { //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id"` //房间ID RoomIDs pq.Int64Array `db:"room_ids" json:"roomIDs" check:"ids"` //呼叫类型 // 0 紧急呼叫; 1 普通呼叫 CallType int `db:"call_type" json:"callType"` }
ArgsGetWarningByRooms 获取一批房间的预警情况参数
type ArgsGetWarningList ¶
type ArgsGetWarningList struct { //分页 Pages CoreSQLPages.ArgsDataList `json:"pages"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //房间ID RoomID int64 `db:"room_id" json:"roomID" check:"id" empty:"true"` //设备ID DeviceID int64 `db:"device_id" json:"deviceID" check:"id" empty:"true"` //是否需要完成 NeedIsFinish bool `db:"need_is_finish" json:"needIsFinish" check:"bool"` IsFinish bool `db:"is_finish" json:"isFinish" check:"bool"` }
ArgsGetWarningList 获取应急呼叫日志列表参数
type ArgsUpdateRoom ¶
type ArgsUpdateRoom struct { //ID ID int64 `db:"id" json:"id" check:"id"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //分类ID SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"` //标签 Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"` //房间编号 Code string `db:"code" json:"code" check:"mark" empty:"true"` //入驻人员列 Infos pq.Int64Array `db:"infos" json:"infos" check:"ids" empty:"true"` //名称 Name string `db:"name" json:"name" check:"name"` //描述 Des string `db:"des" json:"des" check:"des" min:"1" max:"1000" empty:"true"` //封面 CoverFileID int64 `db:"cover_file_id" json:"coverFileID" check:"id" empty:"true"` //描述图 DesFiles pq.Int64Array `db:"des_files" json:"desFiles" check:"ids" empty:"true"` //扩展参数 Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"` }
ArgsUpdateRoom 更新房间基本信息参数
type ArgsUpdateRoomColor ¶
type ArgsUpdateRoomColor struct { //ID ID int64 `db:"id" json:"id" check:"id"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //背景色 BgColor string `db:"bg_color" json:"bgColor" check:"color" empty:"true"` }
ArgsUpdateRoomColor 更新房间颜色参数
type ArgsUpdateServiceSortBindGroup ¶
type ArgsUpdateServiceSortBindGroup struct { //分类ID ID int64 `db:"id" json:"id" check:"id"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //设置组织分组ID // 如果留空将无法自动分配任务 GroupID int64 `db:"group_id" json:"groupID" check:"id" empty:"true"` }
ArgsUpdateServiceSortBindGroup 设置分类的默认分配ID参数
type ArgsUpdateServiceSortMissionExpire ¶
type ArgsUpdateServiceSortMissionExpire struct { //分类ID ID int64 `db:"id" json:"id" check:"id"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //时间长度 // 以秒为单位 ExpireTime int64 `db:"expire_time" json:"expireTime" check:"int64Than0"` }
ArgsUpdateServiceSortMissionExpire 设置分类的请求时间长度参数
type ArgsUpdateServiceStatus ¶
type ArgsUpdateServiceStatus struct { //ID ID int64 `db:"id" json:"id" check:"id"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //服务呼叫状态 // 0 无呼叫; 1 正在呼叫; 2 已经应答并处置 // 处置完成后将回归0状态 ServiceStatus int `db:"service_status" json:"serviceStatus" check:"intThan0" empty:"true"` //服务工作人员 // 如果没有指定,将自动分配 ServiceBindID int64 `db:"service_bind_id" json:"serviceBindID" check:"id" empty:"true"` //联动行政任务 // 任务完成后将自动清除为0,否则将一直挂起 // 如果没有指定,将自动生成 ServiceMissionID int64 `db:"service_mission_id" json:"serviceMissionID" check:"id" empty:"true"` }
ArgsUpdateServiceStatus 修改房间呼叫状态参数
type ArgsUpdateStatus ¶
type ArgsUpdateStatus struct { //ID ID int64 `db:"id" json:"id" check:"id"` //组织ID OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"` //状态 // 0 空闲; 1 有人; 2 退房; 3 不可用; 4 清理中 Status int `db:"status" json:"status"` //入驻人员列 // 只有入驻时,从0->1时生效;如果为2则清理该人员信息 Infos pq.Int64Array `db:"infos" json:"infos"` }
ArgsUpdateStatus 修改房间入驻状态参数
type DataGetRoomAndInfosSearch ¶
type DataGetRoomAndInfosSearch struct { //ID ID int64 `db:"id" json:"id"` //名称 Name string `db:"name" json:"name"` //入驻人员列 Infos pq.Int64Array `db:"infos" json:"infos"` }
DataGetRoomAndInfosSearch 搜索房间数据据
func GetRoomAndInfosSearch ¶
func GetRoomAndInfosSearch(args *ArgsGetRoomSearch) (dataList []DataGetRoomAndInfosSearch, err error)
GetRoomAndInfosSearch 搜索房间
type DataGetRoomSearch ¶
type DataGetRoomSearch struct { //ID ID int64 `db:"id" json:"id"` //名称 Name string `db:"name" json:"name"` }
func GetRoomSearch ¶
func GetRoomSearch(args *ArgsGetRoomSearch) (dataList []DataGetRoomSearch, err error)
GetRoomSearch 搜索房间
type DataGetSensorAnalysis ¶
type DataGetSensorAnalysis struct { //时间 DayTime string `db:"d" json:"dayTime"` //数据 Data int64 `db:"data" json:"data"` DataF float64 `db:"data_f" json:"dataF"` }
func GetSensorAnalysis ¶
func GetSensorAnalysis(args *ArgsGetSensorAnalysis) (dataList []DataGetSensorAnalysis, err error)
GetSensorAnalysis 获取统计数据SUM
func GetSensorAnalysisAvg ¶
func GetSensorAnalysisAvg(args *ArgsGetSensorAnalysis) (dataList []DataGetSensorAnalysis, err error)
GetSensorAnalysisAvg 获取统计数据AVG
func GetSensorAnalysisMax ¶
func GetSensorAnalysisMax(args *ArgsGetSensorAnalysis) (dataList []DataGetSensorAnalysis, err error)
GetSensorAnalysisMax 获取统计数据MAX
func GetSensorAnalysisMin ¶
func GetSensorAnalysisMin(args *ArgsGetSensorAnalysis) (dataList []DataGetSensorAnalysis, err error)
GetSensorAnalysisMin 获取统计数据MIN
type DataInfoNoInRoom ¶
type DataInfoNoInRoom struct { //人员ID InfoID int64 `json:"infoID"` //状态 // 0 等待; 1 离开 Status int `json:"status"` }
func GetInfoNoInRoom ¶
func GetInfoNoInRoom(orgID int64, page int, limit int) (dataList []DataInfoNoInRoom)
GetInfoNoInRoom 没有在房间的人员统计
type FieldsLog ¶
type FieldsLog struct { //ID ID int64 `db:"id" json:"id"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt"` //组织ID OrgID int64 `db:"org_id" json:"orgID"` //房间ID RoomID int64 `db:"room_id" json:"roomID"` //任务ID // 可能为0 MissionID int64 `db:"mission_id" json:"missionID"` //状态 // 0 进入; 1 退出; 2 退房中(核对清理状态); 3 清理中; 4 呼叫中; 5 已经应答并发出任务; 6 任务处理完成; 7 应急呼叫器按下; 8 应急呼叫器处理 Status int `db:"status" json:"status"` //入驻人员列 Infos pq.Int64Array `db:"infos" json:"infos"` //备注 Des string `db:"des" json:"des"` }
func GetLogList ¶
func GetLogList(args *ArgsGetLogList) (dataList []FieldsLog, dataCount int64, err error)
GetLogList 获取日志列表
type FieldsRoom ¶
type FieldsRoom struct { //ID ID int64 `db:"id" json:"id"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt"` //更新时间 UpdateAt time.Time `db:"update_at" json:"updateAt"` //删除时间 DeleteAt time.Time `db:"delete_at" json:"deleteAt"` //组织ID OrgID int64 `db:"org_id" json:"orgID"` //分类ID SortID int64 `db:"sort_id" json:"sortID"` //标签 Tags pq.Int64Array `db:"tags" json:"tags"` //状态 // 0 空闲; 1 有人; 2 退房; 3 不可用; 4 清理中 Status int `db:"status" json:"status"` //服务呼叫状态 // 0 no 无呼叫; 1 call 正在呼叫; 2 ok 已经应答并处置 // 处置完成后将回归0状态 ServiceStatus int `db:"service_status" json:"serviceStatus"` //服务工作人员 ServiceBindID int64 `db:"service_bind_id" json:"serviceBindID"` //联动行政任务 // 任务完成后将自动清除为0,否则将一直挂起 ServiceMissionID int64 `db:"service_mission_id" json:"serviceMissionID"` //入驻人员列 Infos pq.Int64Array `db:"infos" json:"infos"` //房间编号 Code string `db:"code" json:"code"` //名称 Name string `db:"name" json:"name"` //描述 Des string `db:"des" json:"des"` //封面 CoverFileID int64 `db:"cover_file_id" json:"coverFileID"` //描述图 DesFiles pq.Int64Array `db:"des_files" json:"desFiles"` //背景色 BgColor string `db:"bg_color" json:"bgColor" check:"color" empty:"true"` //扩展参数 Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"` }
func CreateRoom ¶
func CreateRoom(args *ArgsCreateRoom) (data FieldsRoom, err error)
CreateRoom 创建新的房间
func GetAllRoomListByOrgID ¶
func GetAllRoomListByOrgID(orgID int64) (dataList []FieldsRoom, err error)
GetAllRoomListByOrgID 获取组织下所有房间
func GetRoomByInfo ¶
func GetRoomByInfo(args *ArgsGetRoomByInfo) (data FieldsRoom, err error)
GetRoomByInfo 获取人员入驻的房间参数
func GetRoomByOrg ¶
func GetRoomByOrg(args *ArgsGetRoomByOrg) (dataList []FieldsRoom, err error)
GetRoomByOrg 获取组织下所有可用房间
func GetRoomCode ¶
func GetRoomCode(args *ArgsGetRoomCode) (data FieldsRoom, err error)
GetRoomCode 获取指定房间ID
func GetRoomID ¶
func GetRoomID(args *ArgsGetRoomID) (data FieldsRoom, err error)
GetRoomID 获取指定房间ID
func GetRoomList ¶
func GetRoomList(args *ArgsGetRoomList) (dataList []FieldsRoom, dataCount int64, err error)
GetRoomList 获取房屋列表参数
func GetRoomListByInfo ¶
func GetRoomListByInfo(infoID int64) (dataList []FieldsRoom, err error)
GetRoomListByInfo 获取信息档案入住的房间列表
func GetRoomMore ¶
func GetRoomMore(args *ArgsGetRoomMore) (dataList []FieldsRoom, err error)
GetRoomMore 获取一组房间
func GetRooms ¶
func GetRooms(args *ArgsGetRooms) (dataList []FieldsRoom, err error)
GetRooms 获取一组房间
type FieldsSensor ¶
type FieldsSensor struct { //ID ID int64 `db:"id" json:"id"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt"` //设备ID DeviceID int64 `db:"device_id" json:"deviceID"` //组织ID OrgID int64 `db:"org_id" json:"orgID"` //房间ID RoomID int64 `db:"room_id" json:"roomID"` //数据标识码 Mark string `db:"mark" json:"mark"` //数据 Data int64 `db:"data" json:"data"` DataF float64 `db:"data_f" json:"dataF"` DataS string `db:"data_s" json:"dataS"` }
FieldsSensor 房间设备统计数据
func GetSensorList ¶
func GetSensorList(args *ArgsGetSensorList) (dataList []FieldsSensor, dataCount int64, err error)
GetSensorList 获取统计数据列表参数
func GetSensorMore ¶
func GetSensorMore(args *ArgsGetSensorMore) (dataList []FieldsSensor, err error)
GetSensorMore 获取一组房间最新的数据
func GetSensorMoreMarks ¶
func GetSensorMoreMarks(args *ArgsGetSensorMoreMarks) (dataList []FieldsSensor, err error)
GetSensorMoreMarks 获取一组房间最新的数据 最大上限反馈600条数据,最多不能超出30个房间
type FieldsWarning ¶
type FieldsWarning struct { //ID ID int64 `db:"id" json:"id"` //创建时间 CreateAt time.Time `db:"create_at" json:"createAt"` //完成时间 FinishAt time.Time `db:"finish_at" json:"finishAt"` //呼叫类型 // 0 紧急呼叫; 1 普通呼叫 CallType int `db:"call_type" json:"callType"` //组织ID OrgID int64 `db:"org_id" json:"orgID"` //房间ID RoomID int64 `db:"room_id" json:"roomID"` //触发设备ID DeviceID int64 `db:"device_id" json:"deviceID"` }
FieldsWarning 房间紧急呼叫
func GetWarningByRooms ¶
func GetWarningByRooms(args *ArgsGetWarningByRooms) (dataList []FieldsWarning, err error)
GetWarningByRooms 获取一批房间的预警情况 只会反馈存在未完成应急呼叫的数据包
func GetWarningList ¶
func GetWarningList(args *ArgsGetWarningList) (dataList []FieldsWarning, dataCount int64, err error)
GetWarningList 获取应急呼叫日志列表
Source Files ¶
- core.go
- fields_iot_sensor.go
- fields_log.go
- fields_room.go
- fields_warning.go
- info_no_room.go
- iot_sensor.go
- log.go
- push_mqtt_warning.go
- push_nats.go
- room_analysis.go
- room_cache.go
- room_craete.go
- room_delete.go
- room_get.go
- room_update.go
- run.go
- run_sensor.go
- sub_mqtt.go
- sub_mqtt_service_status.go
- sub_mqtt_warning.go
- sub_nats.go
- warning.go
- warning_cache.go