import { ApiClientFactory } from '../core/api.client.factory'; import { ILaunchingGantryDeviceInfo, ILaunchingGantryDriverInfo, ISaveDriverInfo, ISaveDeviceInfo, ISaveCamerasInfo, IGetCamerasInfo, ILaunchingGantryDynamicDetailInfo } from '../model/launchingGantry.model'; import { CarameList } from '../model/devices.model'; export class LaunchingGantryService { constructor(private factory: ApiClientFactory) { } // 查询设备列表见 devices.service.ts // 架桥机======设备信息查询 async loadLaunchingGantryDeviceDetailInfo(projectId: string, deviceId: string): Promise { const data = await this.factory.entity.get( `api/web/projects/${projectId}/launchingGantry/deviceId/${deviceId}/getDeviceInfo` ); return data; } // 架桥机======司机信息查询 async loadLaunchingGantryDriverDetailInfo(projectId: string, deviceId: string): Promise { const data = await this.factory.entity.get( `api/web/projects/${projectId}/launchingGantry/deviceId/${deviceId}/getDriverInfo` ); return data; } // 架桥机======设备基础动态详情动态信息 async loadLaunchingGantryDynamicDetailInfo(projectId: string, deviceId: string): Promise { const data = await this.factory.entity.get( `api/web/projects/${projectId}/launchingGantry/deviceId/${deviceId}/getDeviceModelData` ); return data; } // 架桥机=====保存司机信息 async loadLaunchingGantrySaveDriverInfo(projectId: string, deviceId: string, data: ISaveDriverInfo): Promise { const url = `/api/web/projects/${projectId}/launchingGantry/deviceId/${deviceId}/saveDriverInfo`; const result = await this.factory.entity.post( url, {...data} ); return result; } // 架桥机=====保存设备信息 async loadLaunchingGantrySaveDeviceInfo(projectId: string, deviceId: string, data: ISaveDeviceInfo): Promise { const url = `/api/web/projects/${projectId}/launchingGantry/deviceId/${deviceId}/saveDeviceInfo`; const result = await this.factory.entity.post( url, {...data} ); return result; } // 架桥机=====保存摄像头信息 async loadLaunchingGantrySaveCamerasInfo(projectId: string, deviceId: string, data: ISaveCamerasInfo[]): Promise { const url = `/api/web/projects/${projectId}/launchingGantry/deviceId/${deviceId}/saveCamerasInfo`; const result = await this.factory.entity.post( url, data ); return result; } // 架桥机=====获取摄像头信息 async loadLaunchingGantryGetCamerasInfo(projectId: string, deviceId: string): Promise { const url = `/api/web/projects/${projectId}/launchingGantry/deviceId/${deviceId}/getCamerasInfo`; const result = await this.factory.entity.get( url ); return result; } // 架桥机=====删除指定摄像头 async loadLaunchingGantryDelCameraInfo(projectId: string, deviceId: string, cameraDeviceId: string): Promise { const url = `/api/web/projects/${projectId}/launchingGantry/deviceId/${deviceId}/delCameraInfo/${cameraDeviceId}`; const result = await this.factory.entity.delete( url ); return result; } // 架桥机=====获取所有摄像头列表 async loadLaunchingGantryCaremaDevices(projectId: string): Promise { const devices = await this.factory.entity.get( `/api/web/projects/${projectId}/launchingGantry/getCameraListByProjectId` ); return devices; } }