import { ApiClientFactory } from '../core/api.client.factory'; import { Type, Warehouse, WarehouseList } from '../model/warehouse.model'; export class WarehouseService { constructor(private factory: ApiClientFactory) { } // 库房监测-查询规则配置信息 async getWarehouseList(projectId: string, type: Type): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/treasury/config/${type}`); return result; } // 库房监测-保存规则配置信息 async saveWarehouseInfo(projectId: string, type: Type, data: Warehouse): Promise { const result = await this.factory.entity.post(`/api/web/projects/${projectId}/treasury/config/${type}`, data); return result; } // 库房监测-删除配置信息 async deleteWarehouseInfo(projectId: string, id: string): Promise { const result = await this.factory.entity.delete(`/api/web/projects/${projectId}/treasury/config?id=${id}`); return result; } }