import { ApiClientFactory } from '../core/api.client.factory'; import { ARGlasses, ARGlassesCondition } from '../model/arglasses.model'; export class ARGlassesService { constructor(private factory: ApiClientFactory) {} // 获取ar设备列表 async queryDeviceList(projectId: string): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/ar/glass/deviceList`); return result; } // 获取ar设备状态信息 async queryARCondition(projectId: string): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/ar/glass/webVo`); return result; } // 获取协作记录数据 async queryARAssistVoList(projectId: string, pageIndex: number, pageSize: number): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/ar/glass/arGlassAssistVOList?pageIndex=${pageIndex}&pageSize=${pageSize}` ); return result; } // 获取识别记录数据 async queryARIdentifyRecords( projectId: string, pageIndex: number, pageSize: number, startDate: string, endDate: string ): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/ar/glass/arGlassResultVOList?pageIndex=${pageIndex}&pageSize=${pageSize}&startDate=${startDate}&endDate=${endDate}` ); return result; } // 查询待接入设备房间接口 async queryARGlassToAccessVOList(projectId: string, pageIndex: number, pageSize: number): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/ar/glass/arGlassToAccessVOList?pageIndex=${pageIndex}&pageSize=${pageSize}` ); return result; } // 创建房间会话接口 async queryARGlassToAccess(projectId: string, deviceId: string, roomId: string, actor: string): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/ar/glass/arGlassToAccess?deviceId=${deviceId}&roomId=${roomId}&actor=${actor}` ); return result; } // 设备会话GPS数据 async getArGlassGps(projectId: string, deviceId: string): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/ar/glass/getArGlassGps?deviceId=${deviceId}` ); return result; } // 创建房间会话接口 async queryCreateRoom(projectId: string, deviceId: string, actor: string): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/ar/glass/createRoom?deviceId=${deviceId}&actor=${actor}` ); return result; } // room退出接口 async outRoom(projectId: string, deviceId: string, rommId: string): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/ar/glass/outRoom?deviceId=${deviceId}&roomId=${rommId}` ); return result; } }