import { ApiClientFactory } from '../core/api.client.factory'; import { AlarmMonthDataModel } from '../model/alarmMonth.model'; import { AffectDayDataModel } from '../model/affectDayData.model'; import { MonthlyAlertListModel } from '../model/monthlyAlertList.model'; export class WeatherWarningService { constructor(private factory: ApiClientFactory) {} // 获取和风预警设备的开始时间,从设备创建开始统计天气预警情况。 async LoadAlarmMonthData(projectId: string): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/weatherAlarms/hfStartMonth` ); return result; } // 实际影响工期天数 async LoadActualDayData(projectId: string,alarmMonth:string): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/weatherAlarms/month/${alarmMonth}/actualDay` ); return result; } // 影响工期天数 async LoadAffectProjectDayData(projectId: string,alarmMonth:string): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/weatherAlarms/month/${alarmMonth}/affectProjectDay` ); return result; } // 根据预警类别,按月获取预警列表 async LoadMonthlyAlertListData(projectId: string,alarmMonth:string,alarmType:string): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/weatherAlarms/month/${alarmMonth}?alarmType=${alarmType}` ); return result; } // 批量修改修改预警记录 天数和备注信息 async LoadBatchModifyWarningInformation(projectId: string,tableData:any): Promise { return await this.factory.entity.post( `/api//web/projects/${projectId}/weatherAlarms/batchModify `, tableData ); } }