import { ApiClientFactory } from '..'; import { RiskResultRequestModel, PageRequestModel } from '../model/Risk.model'; import { Pageable } from '../'; /** * 隐患 */ export class RiskService { constructor(private factory: ApiClientFactory) {} fetchResult(objectId: string, objectType: string, params: RiskResultRequestModel): Promise> { const url = `/api/safe/rectification/resultBoard/page?`; return this.factory.entity.get(url, { objectId, objectType, ...params, }); } fetchDetail(objectId: string, objectType: string, params: PageRequestModel): Promise> { const url = `/api/safe/rectification/resultBoard/detail`; return this.factory.entity.get(url, { objectId, objectType, ...params, }); } confirm(objectId: string) { const url = `/api/safe/rectification/resultBoard/confirm?objectId=${objectId}`; return this.factory.entity.put(url); } delete(objectId: string) { const url = `/api/safe/rectification/resultBoard/delete?objectId=${objectId}`; return this.factory.entity.delete(url); } indexStatistics( objectId: string, objectType: string, params?: { fromTime: string; toTime: string; } ) { const url = `/api/safe/rectification/resultBoard/indexStatistics`; return this.factory.entity.get(url, { objectId, objectType, ...params, }); } }