import { ApiClientFactory } from '../core/api.client.factory'; import { FoundationPitPointsCollect, FoundationPitPointInfo, FoundationPitPointDetail, FoundationPitDraw, SafeInfoModel, IFoundationPitAlarmCondition, IFoundationPitAlarmDetail, IFoundationDeviceInfos, IFoundationTable, IFoundationPointList, IFoundationDevice, IFoundationNum, IFoundationRateNum, IFoundationMonitor, IFoundationNickName, DeepHorDisMonitor } from '../model/foundationPit.model'; export class FoundationPitService { constructor(private factory: ApiClientFactory) {} async loadFouPitPointsCollect(projectId: string): Promise { const collect = await this.factory.foundationPit.get( `/api/analysis/query/${projectId}` ); return collect; } async loadFouPitPointsList(projectId: string): Promise { const pointList = await this.factory.foundationPit.get( `/api/analysis/pointList/${projectId}` ); return pointList; } async loadFouPitPointDetail(projectId: string, pointId: string): Promise { const detailInfo = await this.factory.foundationPit.get( `/api/analysis/queryById/${projectId}?id=${pointId}` ); return detailInfo; } async loadFouPitDraw(projectId: string): Promise { const draw = await this.factory.foundationPit.get(`/api/analysis/queryDrawing/${projectId}`); return draw; } async loadSafeInfo(projectId: string): Promise { const safeInfo = await this.factory.foundationPit.get(`/api/analysis/safeInfo/${projectId}`); return safeInfo; } // 近30天报警情况统计 async loadFoundationPitAlarmCondition(projectId: string): Promise { const url = `/api/web/projects/${projectId}/foundation/alarmNum`; const result = await this.factory.entity.get(url); return result; } // 近30天报警情况统计 - 二级弹窗 async loadFoundationPitAlarmDetail(projectId: string, params: any): Promise { const url = `/api/open/web/projects/${projectId}/foundation/dataCenter/alarm/excelRecords`; const result = await this.factory.entity.get(url, params); return result; } // 获取基坑设备列表 async getFoundationDeviceInfos(projectId: string): Promise { const url = `/api/web/projects/${projectId}/foundation/deviceInfos`; const result = await this.factory.entity.get(url); return result; } // 保存基坑地图 async saveFoundationMap(projectId: string, params: any): Promise { const url = `api/web/projects/${projectId}/program/maps/programType/foundation`; const result = await this.factory.entity.post(url, params); return result; } // 获取报警值表格数据 async getFoundationTable(projectId: string): Promise { const url = `/api/web/projects/${projectId}/foundation/rule`; const result = await this.factory.entity.get(url); return result; } // 删除表格数据 async deleteFoundationTable(projectId: string, id: string): Promise { const url = `/api/web/projects/${projectId}/foundation/rule?id=${id}`; const result = await this.factory.entity.delete(url); return result; } // 保存、修改告警阈值配置 async saveFoundationConfig(projectId: string, params: any): Promise { const url = `/api/web/projects/${projectId}/foundation/rule`; const result = await this.factory.entity.post(url, params); return result; } // 实时数据列表、地图、开始时间 async loadFoundationPointList(projectId: string): Promise { const url = `/api/web/projects/${projectId}/foundation/pointList`; const result = await this.factory.entity.get(url); return result; } // 某设备实时数据 async getFoundationDevice(projectId: string, deviceId: string): Promise { const url = `/api/web/projects/${projectId}/foundation/point?deviceId=${deviceId}`; const result = await this.factory.entity.get(url); return result; } // 监测数量 async getFoundationNum(projectId: string): Promise { const url = `/api/web/projects/${projectId}/foundation/num`; const result = await this.factory.entity.get(url); return result; } // 监测类型占比 async getFoundationRateNum(projectId: string): Promise { const url = `/api/web/projects/${projectId}/foundation/rateNum`; const result = await this.factory.entity.get(url); return result; } // 获取基坑设备列表 + 点位 async getFoundationPointsLocation(projectId: string): Promise { const url = `/api/web/projects/${projectId}/foundation/pointsLocation`; const result = await this.factory.entity.get(url); return result; } // 获取深基坑测点列表 async getFoundationNickName(projectId: string, pointType: string): Promise { const url = `/api/web/projects/${projectId}/foundation/nickname`; const result = await this.factory.entity.get(url, { pointType }); return result; } // 获取深基坑监测数据 async getFoundationMonitor(projectId: string, deviceId: string, dateStart: number, dateEnd: number): Promise { const url = `/api/web/projects/${projectId}/foundation/monitor`; const result = await this.factory.entity.get(url, { deviceId, dateStart, dateEnd }); return result; } // 获取深基坑测点列表 async getFoundationCount(projectId: string, deviceId: string): Promise { const url = `/api/web/projects/${projectId}/foundation/count`; const result = await this.factory.entity.get(url, { deviceId }); return result; } // 深层次水平位移检测 async getdeepHorDisMonitor(projectId: string, deviceId: string, number?: number): Promise { const url = `/api/web/projects/${projectId}/foundation/deepHorDisMonitor`; const result = await this.factory.entity.get(url, { deviceId, number }); return result; } }