import { ApiClientFactory } from '../core/api.client.factory'; import { CloudtProject } from '../model/cloudt/project'; import { UnloadPlatformValues, UnloadPlatformWarningRecord, UnloadPlatformRecentData, TreasuryData, CuringRoomData, PitchMixStation, IPaverData, SewageData, } from '../model/elevator.model'; export class UnloadPlatformService { constructor(private factory: ApiClientFactory) { } // 获取卸料平台实时数据 async loadUnloadPlatformDetail(projectId: string, deviceId: string): Promise { const UnloadPlatform = await this.factory.entity .get(`/api/web/projects/${projectId}/unloadingPlatform/${deviceId}`); return UnloadPlatform; } // 获取近24小时所有数据 async loadUnloadPlatformRecentData(projectId: string, deviceId: string): Promise { const UnloadPlatform = await this.factory.entity .get(`/api/web/projects/${projectId}/unloadingPlatform/recentlyRecord?deviceId=${deviceId}`); return UnloadPlatform; } // 查看近几天卸料平台报警数据 async loadUnloadPlatformWarningRecord(projectId: string, deviceId: string, days: number): Promise { const UnloadPlatform = await this.factory.entity .get(`/api/web/projects/${projectId}/unloadingPlatform/alarmRecord?deviceId=${deviceId}&days=${days}`); return UnloadPlatform; } // 获取库房监测数据 async loadTreasuryMonitor(projectId: string, deviceId: string): Promise { const Treasury = await this.factory.entity .get(`/api/web/projects/${projectId}/treasury/lastInfo?deviceId=${deviceId}`); return Treasury; } // 获取养护室监测数据 async loadCuringRoomMonitor(projectId: string, deviceId: string): Promise { const CuringRoom = await this.factory.entity .get(`/api/web/projects/${projectId}/curingRoom/lastInfo?deviceId=${deviceId}`); return CuringRoom; } // 获取沥青拌合站数据 async loadPitchMixStation(projectId: string, deviceId: string): Promise { const PitchMixStation = await this.factory.entity .get(`/api/web/projects/${projectId}/pitchMixStation/deviceInfo/${deviceId}`); return PitchMixStation; } // 获取摊铺机数据 async loadPaver(projectId: string, deviceId: string): Promise { const Paver = await this.factory.entity .get(`/api/web/projects/${projectId}/paverCompactor/paver/${deviceId}`); return Paver; } // 获取压实机数据 async loadCompactor(projectId: string, deviceId: string): Promise { const Compactor = await this.factory.entity .get(`/api/web/projects/${projectId}/paverCompactor/compactor/${deviceId}`); return Compactor; } }