import { ApiClientFactory } from '../core/api.client.factory'; import { BimMilestoneArrayData } from '../model/bimMilestone.model'; import { TaskCompletionRateModel } from '../model/taskCompletionRate.model'; import { TaskCompletionRateInWeekModel } from '../model/taskCompletionRateInWeek.model'; import { ReasonAnalysisModel } from '../model/reasonAnalysis.model'; import { ReasonAnalysisDetailsModel } from '../model/reasonAnalysisDetails.model'; import { CraneUtilizationModel } from '../model/craneUtilization.model'; import { CraneUtilizationDetailsModel } from '../model/craneUtilizationDetails.model'; import { ProjectProgressModel } from '../model/progress.model'; export class ScheduleService { constructor(private factory: ApiClientFactory) {} // 项目进度 async loadProjectProgress(projectId: string) { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/progress`); return result; } // 里程碑节点 async LoadMileStoneData(projectId: string): Promise { const result = await this.factory.gssApi.get( `/gss/bimproduct/projects/${projectId}/bim5dLandmarkSchedules` ); return result; } // 任务完成率 async LoadTaskCompletionRateData(projectId: string): Promise { const result = await this.factory.gssApi.get( `/gss/bimproduct/projects/${projectId}/bim5dPlanItems` ); return result; } // 查询本周任务按分包单位完成率 async LoadTaskCompletionRateInWeekData(projectId: string, weekOrder: number): Promise { const result = await this.factory.gssApi.get( `/gss/bimproduct/projects/${projectId}/currentbim5dPlanItems`, { weekOrder } ); return result; } // 滞后原因分析 async LoadReasonAnalysisData(projectId: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimproduct/projects/${projectId}/bim5dReasons`); return result; } // 滞后原因分析 详情 async LoadReasonAnalysisDetailsData(projectId: string, reasonId: string): Promise { const result = await this.factory.gssApi.get( `/gss/bimproduct/projects/${projectId}/bim5dWeeklyPlanRecords`, { reasonId } ); return result; } // 塔吊 async LoadCraneUtilizationData(projectId: string): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/cranes/hoistNum/lastFourMonth` ); return result; } // 塔吊 async LoadCraneUtilizationDetailsData(projectId: string, week: number): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/cranes/hoistNum?week=${week}` ); return result; } }