import { ApiClientFactory } from '../core/api.client.factory'; import { IProductionImageProgress, IProductionImageProgressDetail, IEmploymentAnalysis, IEmploymentAnalysisDetail, IProgressList, IProgressListDetail, IProgressMasterWarn, IProgressMasterWarnParams } from '../model/progress.model'; import any = jasmine.any; export class ProgressService { constructor(private factory: ApiClientFactory) { } // 获取进度周计划 async loadWeeklyPlans(projectId: string, type: string): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/bim5dWeeklyPlans`, { range: type }); return result; } // 获取项目信息 async loadZtProjectInfo(projectId: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/info/get`); return result; } // 获取项目年产值完成率 async loadProjectOutputValueOfYear(projectId: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/value/year/get`); return result; } // 获取项目季产值完成率 async loadProjectOutputValueOfSeason(projectId: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/value/season/get`); return result; } // 获取项目月产值 async loadProjectOutputValueOfMonth(projectId: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/value/month/get`); return result; } // 获取项目产值列表 async loadProjectOutputValueOfList(projectId: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/value/month/list`); return result; } // 获取现场大事件 async loadProjectFieldEvent(projectId: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/events/list`); return result; } // 获取形象进度照片 async loadProjectImageProgressPhoto(projectId: string, type: number): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/progresss/list`, { type }); return result; } // 获取生产形象进度照片 async loadProductionImageProgress(projectId: string): Promise { const result = await this.factory.gssApi.get( `/gss/bimproduct/projects/${projectId}/bim5dProgressAttachments` ); return result; } // 获取生产形象进度照片二级数据 async loadProductionImageProgressDetail(projectId: string, startDate: string = '', endDate: string = ''): Promise { const result = await this.factory.gssApi.get( `/gss/bimproduct/projects/${projectId}/bim5dProgressAttachments/byDateGroup`, { ...startDate && endDate ? { startDate, endDate } : {} } ); return result; } // 获取工点产值排名 async loadProjectStationOutputValueRanking(projectId: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/floor/value/get`); return result; } // 获取实物量形象进度-年列表 async loadProjectPhysicalQuantityProgressOfYearList(projectId: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/physicals/years/list`); return result; } // 获取实物量形象进度-季列表 async loadProjectPhysicalQuantityProgressOfSeasonList(projectId: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/physicals/seasons/list`); return result; } // 获取实物量形象进度-月列表 async loadProjectPhysicalQuantityProgressOfMonthList(projectId: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/physicals/months/list`); return result; } // 获取实物量形象进度-周列表 async loadProjectPhysicalQuantityProgressOfWeekList(projectId: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/physicals/weeks/list`); return result; } // 获取实物量形象进度-年数据 async loadProjectPhysicalQuantityProgressOfYearData(projectId: string, year: string): Promise { const result = await this.factory.gssApi.get(`/gss/bimbase/projects/${projectId}/physicals/years/${year}/get`); return result; } // 获取实物量形象进度-季数据 async loadProjectPhysicalQuantityProgressOfSeasonData(projectId: string, year: string, season: string): Promise { const result = await this.factory.gssApi.get( `/gss/bimbase/projects/${projectId}/physicals/years/${year}/seasons/${season}/get` ); return result; } // 获取实物量形象进度-月数据 async loadProjectPhysicalQuantityProgressOfMonthData(projectId: string, year: string, month: string): Promise { const result = await this.factory.gssApi.get( `/gss/bimbase/projects/${projectId}/physicals/years/${year}/months/${month}/get` ); return result; } // 获取实物量形象进度-周数据 async loadProjectPhysicalQuantityProgressOfWeekData( projectId: string, year: string, month: string, week: string ): Promise { const result = await this.factory.gssApi.get( `/gss/bimbase/projects/${projectId}/physicals/years/${year}/months/${month}/weeks/${week}/get` ); return result; } // 获取精益生产-按日用工分析 async loadEmploymentAnalysis(projectId: string): Promise { const result = await this.factory.gssApi.get( `/gss/PbsBim5d/projects/${projectId}/labor/analyse/bySubConstructor` ); return result; } // 获取精益生产-按日用工分析 async loadEmploymentAnalysisDetail(projectId: string, subConstructorId: string): Promise { const result = await this.factory.gssApi.get( `/gss/PbsBim5d/projects/${projectId}/labor/analyse/byWorkType/details?subConstructorId=${subConstructorId}` ); return result; } // 斑马进度列表 async loadProgressList(projectId: string): Promise { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/progress/progressList` ); return result; } // 斑马进度信息 async loadProgressListDetail(projectId: string, postData: any): Promise { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/progress/detail`, postData ); return result; } // 斑马进度数据 async loadProgressMasterDetail(projectId: string): Promise { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/progress/masterDetail` ); return result; } // 斑马进度里程碑预警数据 async loadProgressMasterWarn(projectId: string, params: IProgressMasterWarnParams): Promise { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/progress/detail/milestone`, params ); return result; } }