/* * @Author: mikey.hanzg * @Date: 2019-09-19 14:25:00 * @Last Modified by: mikey.zhaopeng * @Last Modified time: 2019-09-24 10:15:03 */ import { ApiClientFactory } from '../core/api.client.factory'; import { ProblemCountFilter, ProblemTypeCountFilter, ProgressInfosData, WeeklyPlanPeriodsList, ProblemTypeCountList, ProblemCountList, PlanPeriodsDate, ProgressSite, IQualitySite, ISafetySite, IQualityDetails, ISafetyDetails, ITreeData, IProgressModelIds } from '../model/bimModel.model'; export class BimModelService { constructor(private factory: ApiClientFactory) {} // 按时间段统计质量问题数量(模型) async loadQualitysProblemCount(projectId: string, queryParams: ProblemCountFilter): Promise { const url = `/web/projects/${projectId}/qualitys/problemCount`; const result = await this.factory.gssApi.get(url, queryParams); return result; } // 按类别统计问题数量(模型) async loadQualitysProblemTypeCount( projectId: string, queryParams: ProblemTypeCountFilter ): Promise { const url = `/web/projects/${projectId}/qualitys/problemTypeCount`; const result = await this.factory.gssApi.get(url, queryParams); return result; } // 获取周计划(模型) async loadWeeklyPlanPeriods(projectId: string): Promise { const url = `/gss/bimproduct/projects/${projectId}/bim5dWeeklyPlanPeriods`; const result = await this.factory.gssApi.get(url); return result; } // 项目进度情况(模型) async loadProgressInfos(projectId: string): Promise { const url = `gss/bimproduct/projects/${projectId}/progressInfos`; const result = await this.factory.gssApi.get(url); return result; } // 按时间段统计安全问题数量(模型) async loadSafetysProblemCount(projectId: string, queryParams: ProblemCountFilter): Promise { const url = `/web/projects/${projectId}/safetys/problemCount`; const result = await this.factory.gssApi.get(url, queryParams); return result; } // 按类别统计问题数量(模型) async loadSafetysProblemTypeCount( projectId: string, queryParams: ProblemTypeCountFilter ): Promise { const url = `/web/projects/${projectId}/safetys/problemTypeCount`; const result = await this.factory.gssApi.get(url, queryParams); return result; } // 进度流水段坐标信息接口 (模型) async loadProgressSiteInfo(projectId: string, periodId: string, userCloudToken: string): Promise { const url = `/gss/bimproduct/projects/${projectId}/weeklyPlanPeriods/${periodId}?userCloudToken=${userCloudToken}`; const result = await this.factory.gssApi.get(url); return result; } // 质量坐标信息接口 (模型) async loadQualitySiteInfo(projectId: string, startDate: string, endDate: string): Promise { const url = `/web/projects/${projectId}/qualitys/problems`; const result = await this.factory.gssApi.get(url, { startDate, endDate }); return result; } // 安全坐标信息接口 (模型) async loadSafetySiteInfo(projectId: string, startDate: string, endDate: string): Promise { const url = `/web/projects/${projectId}/safetys/problems`; const result = await this.factory.gssApi.get(url, { startDate, endDate }); return result; } // 质量坐标信息详情二级弹框 (模型) async loadQualitySiteDetails(projectId: string, id: string, tenantId: string): Promise { const url = `/web/projects/${projectId}/qualitys/problems/${id}`; const result = await this.factory.gssApi.get(url, { tenantId }); return result; } // 安全坐标信息详情二级弹框 (模型) async loadSafetySiteDetails(projectId: string, id: string, tenantId: string): Promise { const url = `/web/projects/${projectId}/safetys/problems/${id}`; const result = await this.factory.gssApi.get(url, { tenantId }); return result; } // 进度流水段任务信息接口-二级页面 async loadPlanPeriods(projectId: string, periodId: string, elementId: string, userCloudToken: string): Promise { const url = `/gss/bimproduct/projects/${projectId}/weeklyPlanPeriods/${periodId}/elements/${elementId}`; const result = await this.factory.gssApi.get(url, {userCloudToken}); return result; } // 获取构件树结构 async loadTreeData(projectId: string) { const url = `/gss/bimproduct/projects/${projectId}/modelTree`; const result = await this.factory.gssApi.get(url); return result; }; // 获取模型图元显隐 async loadProgressModelIds(projectId: string) { const url = `/gss/bimproduct/projects/${projectId}/bim5dSegmentModelData`; const result = await this.factory.gssApi.get(url); return result; } }