import { ApiClientFactory } from '../core/api.client.factory'; import { IParamsData, IProblemDetails, IProblemCountBySubcontractor, IProblemCountByCategory, IProblemCount, IProblemCountPerson, IThreeProblemDetails, ISafetyCount, TrendsByDateRange, IGroupCategoryCount, IRootRiskDetails, IBdreSafetyproblemCount, IBdreSafetyproblemDetail, IBdreSafetyproblemLevel, IBdreSafetyproblemCategory, IBdreSafetyproblemTrends, IBdreSafetyproblemRectify, ISafetyConstructionAssessment, SafetyProblemCountByRegion, SafetyProblemDetailsByRegion, IQualityWarn } from '../model/qualitySafety.model'; export class QualitySafetyService { constructor(private factory: ApiClientFactory) {} // 质量相关接口 // 质量问题统计 async loadProblemCountByDateRange(projectId: string, params?: IParamsData): Promise { const url = `/web/projects/${projectId}/qualitys/problemCountByDateRange`; const result = await this.factory.gssApi.get(url, params); return result; } // 质量问题统计明细(二级页面) async loadProblemDetailsByDateRange(projectId: string, params: IParamsData): Promise { const url = `/web/projects/${projectId}/qualitys/getProblemDetailsByDateRange`; const result = await this.factory.gssApi.get(url, params); return result; } // 未销项按责任人统计数量 async loadProblemCountByDutyPerson(projectId: string, params: IParamsData): Promise { const url = `/web/projects/${projectId}/qualitys/getProblemCountByDutyPerson`; const result = await this.factory.gssApi.get(url, params); return result; } // 未销项按责任人统计明细(二级页面) async loadProblemDetailsByDutyPerson(projectId: string, params: IParamsData): Promise { const url = `/web/projects/${projectId}/qualitys/getProblemDetailsByDutyPerson`; const result = await this.factory.gssApi.get(url, params); return result; } // 未销项按责任单位统计数量 async loadProblemCountBySubcontractor(projectId: string, params: IParamsData): Promise { const url = `/web/projects/${projectId}/qualitys/getProblemCountBySubcontractor`; const result = await this.factory.gssApi.get(url, params); return result; } // 未销项按责任单位统计明细(二级页面) async loadProblemDetailsBySubcontractor(projectId: string, params: IParamsData): Promise { const url = `/web/projects/${projectId}/qualitys/getProblemDetailsBySubcontractor`; const result = await this.factory.gssApi.get(url, params); return result; } // 按问题类型进行汇总 async loadProblemCountByCategory(projectId: string, params?: IParamsData): Promise { const url = `/web/projects/${projectId}/qualitys/getProblemCountByCategory`; const result = await this.factory.gssApi.get(url, params || {}); return result; } // 问题类型统计明细(二级页面) async loadProblemDetailsByProblemType(projectId: string, params: IParamsData): Promise { const url = `/web/projects/${projectId}/qualitys/getProblemDetailsByProblemType`; const result = await this.factory.gssApi.get(url, params); return result; } // 问题趋势汇总 async loadProblemTrendsByDateRange(projectId: string, params: IParamsData): Promise { const url = `web/projects/${projectId}/qualitys/getProblemTrendsByDateRange`; const result = await this.factory.gssApi.get(url, params); return result; } // 质量二级 async loadSecondTrendsByDateRange(projectId: string, params: any): Promise { const url = `web/projects/${projectId}/qualitys/getProblemTrendsByDate`; const result = await this.factory.gssApi.get(url, params); return result; } // 质量三级弹窗 async loadProblemDetails(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 loadQualityRootGroupCategoryCount(projectId: string): Promise { const url = `/web/projects/${projectId}/qualitys/getQualityRootGroupCategoryCount`; const result = await this.factory.gssApi.get(url); return result; } // 质量问题分类汇总二级页面 async loadQualityRootRiskDetails(projectId: string, params: any): Promise { const url = `/web/projects/${projectId}/qualitys/getQualityRootRiskDetails`; const result = await this.factory.gssApi.get(url, params); return result; } // 安全相关接口 // 安全隐患统计 async loadSafetyCountByDateRange(projectId: string, params?: IParamsData): Promise { const url = `/web/projects/${projectId}/safety/problemCountByDateRange`; const result = await this.factory.gssApi.get(url, params); return result; } // 安全隐患统计明细(二级页面) async loadSafetyDetailsByDateRange(projectId: string, params: IParamsData): Promise { const url = `/web/projects/${projectId}/safety/getProblemDetailsByDateRange`; const result = await this.factory.gssApi.get(url, params); return result; } // 未销项按责任人统计数量 async loadSafetyCountByDutyPerson(projectId: string, params: IParamsData): Promise { const url = `/web/projects/${projectId}/safety/getProblemCountByDutyPerson`; const result = await this.factory.gssApi.get(url, params); return result; } // 未销项按责任人统计明细(二级页面) async loadSafetyDetailsByDutyPerson(projectId: string, params: IParamsData): Promise { const url = `/web/projects/${projectId}/safety/getProblemDetailsByDutyPerson`; const result = await this.factory.gssApi.get(url, params); return result; } // 未销项按责任单位统计数量 async loadSafetyCountBySubcontractor(projectId: string, params: IParamsData): Promise { const url = `/web/projects/${projectId}/safety/getProblemCountBySubcontractor`; const result = await this.factory.gssApi.get(url, params); return result; } // 未销项按责任单位统计明细(二级页面) async loadSafetyDetailsBySubcontractor(projectId: string, params: IParamsData): Promise { const url = `/web/projects/${projectId}/safety/getProblemDetailsBySubcontractor`; const result = await this.factory.gssApi.get(url, params); return result; } // 按隐患类型进行汇总 async loadSafetyCountByCategory(projectId: string, params?: IParamsData): Promise { const url = `/web/projects/${projectId}/safety/getProblemCountByCategory`; const result = await this.factory.gssApi.get(url, params || {}); return result; } // 隐患类型统计明细(二级页面) async loadSafetyDetailsByProblemType(projectId: string, params: IParamsData): Promise { const url = `/web/projects/${projectId}/safety/getProblemDetailsByProblemType`; const result = await this.factory.gssApi.get(url, params); return result; } // 隐患趋势汇总 async loadSafetyTrendsByDateRange(projectId: string, params: IParamsData): Promise { const url = `web/projects/${projectId}/safety/getProblemTrendsByDateRange`; const result = await this.factory.gssApi.get(url, params); return result; } // 质量二级 async loadSecondSafetyByDateRange(projectId: string, params: any): Promise { const url = `web/projects/${projectId}/safety/getProblemTrendsByDate`; const result = await this.factory.gssApi.get(url, params); return result; } // 安全三级弹窗 async loadSafetyDetails(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 loadSafetyRootGroupCategoryCount(projectId: string): Promise { const url = `/web/projects/${projectId}/safety/getSafetyRootGroupCategoryCount`; const result = await this.factory.gssApi.get(url); return result; } // 安全问题分类汇总二级页面 async loadSafetyRootRiskDetails(projectId: string, params: any): Promise { const url = `/web/projects/${projectId}/safety/getSafetyRootRiskDetails`; const result = await this.factory.gssApi.get(url, params); return result; } // 博大瑞尔 - 隐患数量 async loadBdreSafetyproblemCount(projectId: string): Promise { const url = `/web/projects/${projectId}/bodaSafety/problemCountByProjectId`; const result = await this.factory.gssApi.get(url); return result; } // 博大瑞尔 - 隐患数量详情 async loadBdreSafetyproblemDetail(projectId: string, params: any): Promise { const url = `/web/projects/${projectId}/bodaSafety/problemDetails`; const result = await this.factory.gssApi.get(url, params); return result; } // 博大瑞尔 - 级别 async loadBdreSafetyproblemLevel(projectId: string): Promise { const url = `/web/projects/${projectId}/bodaSafety/problemLevel`; const result = await this.factory.gssApi.get(url); return result; } // 博大瑞尔 - 级别详情 async loadBdreSafetyLevelDetail(projectId: string, params: any): Promise { const url = `/web/projects/${projectId}/bodaSafety/problemLevelDetails`; const result = await this.factory.gssApi.get(url, params); return result; } // 博大瑞尔 - 类别 async loadBdreSafetyproblemCategory(projectId: string): Promise { const url = `/web/projects/${projectId}/bodaSafety/problemCategory`; const result = await this.factory.gssApi.get(url); return result; } // 博大瑞尔 - 类别详情 async loadBdreSafetyCategoryDetail(projectId: string, params: any): Promise { const url = `/web/projects/${projectId}/bodaSafety/getProblemDetailsByProblemType`; const result = await this.factory.gssApi.get(url, params); return result; } // 博大瑞尔 - 近7天隐患趋势 async loadBdreSafetyproblemTrends(projectId: string): Promise { const url = `/web/projects/${projectId}/bodaSafety/getBodaProblemTrends`; const result = await this.factory.gssApi.get(url); return result; } // 博大瑞尔 - 本月整改情况 async loadBdreSafetyproblemRectify(projectId: string): Promise { const url = `/web/projects/${projectId}/bodaSafety/getRectifyCondition`; const result = await this.factory.gssApi.get(url); return result; } // 安全文明工地自评 - 查询数据 async loadSafetyConstructionAssessment(projectId: string, tenantId: string): Promise { const url = `/web/projects/${tenantId}/${projectId}/safety/evaluation/info`; const result = await this.factory.gssApi.get(url); return result; } // 安全文明工地自评 - 修改数据 async ediSafetyConstructionAssessment(projectId: string, tenantId: string, params: ISafetyConstructionAssessment): Promise { const url = `/web/projects/${tenantId}/${projectId}/safety/evaluation/save`; const result = await this.factory.gssApi.post(url, params); return result; } // 安全文明工地自评 - 查询责任人 async loadSafetyConstruction(projectId: string, tenantId: string): Promise { const url = `/web/projects/${tenantId}/${projectId}/safety/evaluation/users`; const result = await this.factory.gssApi.get(url); return result; } // 安全文明工地自评 - 下载表格 async exportSafetyConstructionAssessment(projectId: string, tenantId: string): Promise { const url = `/web/projects/${tenantId}/${projectId}/safety/evaluation/download`; const result = await this.factory.gssApi.exportFile(url); return result; } // 工序验收 - 按时间段统计汇总信息 async getWorkingProcedureAcceptance(projectId: string, startDate?: any, endDate?:any): Promise { const url = `/web/projects/${projectId}/quality/process/sumInfoByDateRange`; const result = await this.factory.gssApi.get(url, { startDate, endDate }); return result; } // 工序验收 - 验收状态二级界面 async getWorkingProcedureAcceptanceTwoLevel(projectId: string, status: number,pageIndex: number, pageSize: number, startDate?: any, endDate?:any): Promise { const url = `/web/projects/${projectId}/quality/process/statusDetails`; const result = await this.factory.gssApi.get(url, { status, pageIndex, pageSize, startDate, endDate }); return result; } // 工序验收 - 根据记录id获取详细信息 async getWorkingProcedureAcceptanceThreeLevel(projectId: string, id: string): Promise { const url = `/web/projects/${projectId}/quality/process/statusDetailsById/${id}`; const result = await this.factory.gssApi.get(url); return result; } // 安全按部位进行汇总 async loadProblemCountByRegion(projectId: string, params: SafetyProblemCountByRegion): Promise { const url = `/web/projects/${projectId}/safety/getProblemCountByRegion`; const result = await this.factory.gssApi.get(url, params); return result; } // 安全按部位统计二级页面 async loadProblemDetailsType(projectId: string, params: SafetyProblemDetailsByRegion): Promise { const url = `/web/projects/${projectId}/safety/getProblemDetailsByRegion`; const result = await this.factory.gssApi.post(url, params); return result; } // 质量按部位进行汇总 async loadQualityProblemCountByRegion(projectId: string, params: SafetyProblemCountByRegion): Promise { const url = `/web/projects/${projectId}/qualitys/getProblemCountByRegion`; const result = await this.factory.gssApi.get(url, params); return result; } // 质量按部位统计二级页面 async loadQualityProblemDetailsType(projectId: string, params: SafetyProblemDetailsByRegion): Promise { const url = `/web/projects/${projectId}/qualitys/getProblemDetailsByRegion`; const result = await this.factory.gssApi.post(url, params); return result; } // 分包一次验收通过率 top 10 async getFirstPassTop10(projectId: string): Promise { const url = `/web/projects/${projectId}/process/getFirstPassTop10`; const result = await this.factory.gssApi.get(url); return result; } // 分包一次验收通过率 二级table async getStatisticsForTeam(projectId: string): Promise { const url = `web/projects/${projectId}/process/record/getStatisticsForTeam`; const result = await this.factory.gssApi.get(url); return result; } // 质量管理预警 async getQualityWarn(projectId: string): Promise { const url = `/web/projects/${projectId}/qualityWarn/getQualityWarn`; const result = await this.factory.gssApi.get(url); return result; } }