import { ApiClientFactory } from '../core/api.client.factory'; import { ConstructionCostInfo, ConstructionCostDetailInfo, ConstructionCostParams, ConstructionCostDetailItem, ConstructionCostDetailList, CloudtGatewayParams, ImplementationRate, ImplementationRateParams, DangerousDigProjectData, ISafetySource, ISafetySourceTable, ISafetyObserver, SafetyStarLedgerlList, ISafetyBehaviorCard, SafetyStarParams, BehaviourSafetyObserverData, ISafetyTeam, ISafetyLog, ISafetyLogTable, ISafetyManagementWarningData } from '../model/safetyConstructionCost.model'; export class SafetyConstructionCostService { constructor(protected factory: ApiClientFactory) {} // 安全文明施工费-合同费用 async loadConstructionCostInfo(tenantId: string, projectId: string): Promise { const url = `/web/projects/${tenantId}/${projectId}/safety/construction/costs/info`; const result = await this.factory.gssApi.get(url); return result; } // 安全文明施工费-分布 async loadConstructionCostDetailInfo(tenantId: string, projectId: string): Promise { const url = `/web/projects/${tenantId}/${projectId}/safety/construction/costs/detail/info`; const result = await this.factory.gssApi.get(url); return result; } // 安全文明施工费-保存 async saveConstructionCost(tenantId: string, projectId: string, contractAmount: number): Promise { const url = `/web/projects/${tenantId}/${projectId}/safety/construction/costs/save`; const result = await this.factory.gssApi.post(url, { contractAmount }); return result; } // 安全文明施工费-明细列表 async loadConstructionCostDetailList( tenantId: string, projectId: string, params: ConstructionCostParams ): Promise { const url = `/web/projects/${tenantId}/${projectId}/safety/construction/costs/details`; const result = await this.factory.gssApi.post(url, params); return result; } // 安全文明施工费-删除明细 async deleteConstructionCostDetail(tenantId: string, projectId: string, id: number): Promise { const url = `/web/projects/${tenantId}/${projectId}/safety/construction/costs/detail/${id}`; const result = await this.factory.gssApi.post(url); return result; } // 安全文明施工费-新增/编辑明细 async addOrEditConstructionCostDetail( tenantId: string, projectId: string, data: ConstructionCostDetailItem ): Promise { const url = `/web/projects/${tenantId}/${projectId}/safety/construction/costs/detail/save`; const result = await this.factory.gssApi.post(url, data); return result; } // 安全风险管控-风险统计 async safetyCloudtGateway(projectId: string, params: CloudtGatewayParams): Promise { const url = `/gss/cloudtGateway/projects/${projectId}`; const result = await this.factory.gssApi.post(url, params); return result; } // -项目层风险类别排查率 async SafetyHiddenImplementationRate( projectId: string, params: ImplementationRateParams ): Promise { const url = `/web/projects/${projectId}/safety/risk/riskType/implementationRate`; const result = await this.factory.gssApi.post(url, params); return result; } // 安全风险管控-风险统计二级弹窗 async safetyCloudtGatewayPopup(projectId: string, params: any): Promise { const url = `/web/projects/${projectId}/safety/risk/analysis/drillDown`; const result = await this.factory.gssApi.post(url, params); return result; } // 危大工程 async getDangerousDigProject(projectId: string): Promise { const url = `/web/projects/${projectId}/safety/risk/dangerous-big-project/amount/project`; const result = await this.factory.gssApi.get(url); return result; } // 安全之星-行为安全来源统计 async getSafetySource(projectId: string, params: { month?: string; year?: string; }): Promise { const url = `/web/projects/${projectId}/safety/star/observer/behavior/group`; const result = await this.factory.gssApi.get(url, params); return result; } // 安全之星-行为安全来源统计二级弹窗 async getSafetySourceTable(projectId: string, params: { month?: string; year?: string; pageIndex: number; pageSize: number; }): Promise { const url = `/web/projects/${projectId}/safety/star/observer/behavior/detail`; const result = await this.factory.gssApi.get(url, params); return result; } // 安全之星-安全观察员 async getSafetyObserver(projectId: string): Promise { const url = `/web/projects/${projectId}/safety/star/observers`; const result = await this.factory.gssApi.get(url); return result; } // 年/月-安全之星 async loadSafetyStarLedger(projectId: string, params: SafetyStarParams): Promise { const url = `/web/projects/${projectId}/safety/star/ledger/worker/star`; const result = await this.factory.gssApi.get(url, params); return result; } // 安全之星-行为安全卡个人排行 async getSafetyBehaviorCardOfPersonage(projectId: string, params: { month?: string; year?: string; isSigned?: boolean }): Promise { const url = `/web/projects/${projectId}/safety/star/ledger/worker/card`; const result = await this.factory.gssApi.get(url, params); return result; } // 安全之星-行为安全卡班组排行 async getSafetyBehaviorCardOfTeam(projectId: string, params: { month?: string; year?: string; }): Promise { const url = `/web/projects/${projectId}/safety/star/ledger/group/card`; const result = await this.factory.gssApi.get(url, params); return result; } // 现场行为安全观察 async loadBehaviourSafetyObserver(projectId: string, params: SafetyStarParams): Promise { const url = `/web/projects/${projectId}/safety/star/observer/reward`; const result = await this.factory.gssApi.get(url, params); return result; } // 年/月-平安班组 async loadSafetyTeam(projectId: string, params: SafetyStarParams): Promise { const url = `/web/projects/${projectId}/safety/star/ledger/group/star`; const result = await this.factory.gssApi.get(url, params); return result; } // 安全日志 async loadSafetyLog(projectId: string, params: { startDate: number; endDate: number; }): Promise { const url = `/web/projects/${projectId}/safetyLog/day/sum`; const result = await this.factory.gssApi.get(url, params); return result; } // 安全日志-二级 async loadSafetyLogTable(projectId: string, params: string): Promise { const url = `/web/projects/${projectId}/safetyLog/items`; const result = await this.factory.gssApi.get(url, { date: params }); return result; } // 安全日志-三级 async loadSafetyLogParticulars(projectId: string, id: string): Promise { const url = `/web/projects/${projectId}/safetyLog/${id}`; const result = await this.factory.gssApi.get(url); return result; } // 安全管理预警 async loadSafetyManagementWarningData(projectId: string): Promise { const result = await this.factory.gssApi.get(`/web/projects/${projectId}/safety/riskWarning`); return result; } }