| import { environment } from 'environments/environment'; | 
| import { _HttpClient } from '@delon/theme'; | 
| import { Injectable } from '@angular/core'; | 
| import { Observable } from 'rxjs/Observable'; | 
| import { ResultBean } from '@business/entity/grid'; | 
| import { AlarmConfig, DeviceAdjustValue } from '@business/entity/data'; | 
|   | 
| @Injectable() | 
| export class DeviceAdjustValueService { | 
|   private urls = { | 
|     getByDid: environment.SERVER_BASH_URL + 'device-adjust/get-by-did', | 
|     save: environment.SERVER_BASH_URL + 'device-adjust/add-or-modify', | 
|   }; | 
|   constructor(private http: _HttpClient) { } | 
|   /** | 
|    *  | 
|    * @param did 设备ID | 
|    */ | 
|   public getByDid(did: number): Observable<ResultBean<DeviceAdjustValue>> { | 
|     return this.http.get(this.urls.getByDid, {deviceId: did}); | 
|   } | 
|   public save(data: DeviceAdjustValue): Observable<any> { | 
|     return this.http.post(this.urls.save, data); | 
|   } | 
| } |